/* Import base styles similar to styles_contact.css */
:root {
    --primary-color: #592F5C; 
    --accent-color: #D8563E; 
    --secondary-color: #CC7C90; 
    --light-bg: #F5F7FA; 
    --dark-text: #1A1A1A; 
    --light-text: #fff; 
    --neon-glow: rgba(216, 86, 62, 0.5); 
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.2); 
    --border-radius: 16px; 
    --card-hover-bg: rgba(216, 86, 62, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Orbitron', 'Roboto Mono', sans-serif;
    background: linear-gradient(180deg, #1A1A1A 0%, #2E1A47 100%);
    color: var(--light-text);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

main {
    position: relative;
    z-index: 1;
}

#loader,
.loader {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 28% 18%, rgba(0, 245, 202, 0.12), transparent 55%),
        radial-gradient(circle at 72% 82%, rgba(120, 93, 255, 0.12), transparent 55%),
        linear-gradient(135deg, rgba(3, 6, 21, 0.96), rgba(5, 11, 32, 0.96));
    z-index: 9999;
    transition: opacity 360ms ease, visibility 360ms ease;
    overflow: hidden;
    visibility: visible;
}

#loader::before,
.loader::before {
    content: '';
    position: absolute;
    width: clamp(220px, 28vw, 280px);
    height: clamp(220px, 28vw, 280px);
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.12);
    border-top-color: rgba(0, 245, 202, 0.8);
    border-right-color: rgba(120, 93, 255, 0.75);
    background: radial-gradient(circle at 50% 50%, rgba(0, 245, 202, 0.1), transparent 70%);
    box-shadow:
        0 0 32px rgba(0, 245, 202, 0.22),
        inset 0 0 24px rgba(0, 245, 202, 0.18);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: loaderOrbit 1.9s linear infinite;
}

#loader::after,
.loader::after {
    content: 'FEI-AIX';
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    letter-spacing: 0.28rem;
    font-size: clamp(1.4rem, 2.6vw, 2.2rem);
    color: #ffffff;
    text-shadow: 0 0 18px rgba(0, 245, 202, 0.6);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 1.4rem;
    border-radius: 999px;
    background: rgba(3, 7, 18, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 18px rgba(0, 245, 202, 0.25);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: loaderPulse 1.9s ease-in-out infinite;
    white-space: nowrap;
}

.loader.loader-hidden,
#loader.loader-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

@keyframes loaderOrbit {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes loaderPulse {
    0%, 100% {
        opacity: 0.65;
        letter-spacing: 0.24rem;
        box-shadow: 0 0 14px rgba(0, 245, 202, 0.2);
    }
    50% {
        opacity: 1;
        letter-spacing: 0.34rem;
        box-shadow: 0 0 26px rgba(0, 245, 202, 0.45);
    }
}

/* Header (copié de styles_contact.css) */
header {
    background: rgba(26, 0, 43, 0.95);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(216, 86, 62, 0.3);
    backdrop-filter: blur(5px);
}
.logo-container { display: flex; align-items: center; }
.fei-logo { max-width: 7rem; height: auto; margin-right: 1rem; filter: drop-shadow(0 0 8px var(--neon-glow)); transition: transform 0.3s ease; }
.fei-logo:hover { transform: scale(1.05); }
.logo-text { display: flex; flex-direction: column; font-size: 1.1rem; font-weight: 700; color: var(--light-text); line-height: 1.3; }
.desktop-nav ul { list-style: none; display: flex; gap: 20px; }
.desktop-nav a { color: var(--light-text); text-decoration: none; font-weight: 700; font-size: 1rem; padding: 0.6rem 1.2rem; border-radius: var(--border-radius); transition: all 0.3s ease; position: relative; }
.desktop-nav a:hover, .desktop-nav a.active { background: var(--accent-color); box-shadow: 0 0 15px var(--neon-glow); }

/* Mobile Nav (copié de styles_contact.css) */
.menu-toggle { display: none; }
.mobile-nav { display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.95); width: 90%; max-width: 500px; background: rgba(26, 0, 43, 0.98); backdrop-filter: blur(15px); z-index: 999; padding: 2rem; border-radius: var(--border-radius); box-shadow: 0 0 30px rgba(0, 0, 0, 0.7); opacity: 0; transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out; flex-direction: column; align-items: center; justify-content: center; }
.menu-toggle:checked ~ .mobile-nav { display: flex; opacity: 1; transform: translate(-50%, -50%) scale(1); }
.mobile-nav ul { list-style: none; padding: 0; margin: 0; width: 100%; text-align: center; }
.mobile-nav ul li { margin: 1rem 0; }
.mobile-nav ul li a { color: var(--light-text); text-decoration: none; font-size: 1.2rem; padding: 0.8rem 1.5rem; border-radius: var(--border-radius); transition: all 0.3s ease; display: block; width: 100%; }
.mobile-nav ul li a:hover, .mobile-nav ul li a.active { background: var(--accent-color); box-shadow: 0 0 15px var(--neon-glow); transform: scale(1.02); }
.menu-icon { display: none; position: fixed; bottom: 2rem; right: 2rem; background: var(--accent-color); border-radius: 50%; width: 3.5rem; height: 3.5rem; cursor: pointer; z-index: 1001; flex-direction: column; justify-content: center; align-items: center; transition: background 0.3s, transform 0.3s; box-shadow: 0 0 15px var(--neon-glow); }
.menu-icon:hover { background: var(--secondary-color); transform: scale(1.1); }
.menu-icon span { background: var(--light-text); display: block; height: 0.1875rem; width: 1.8rem; margin: 0.25rem 0; transition: all 0.3s ease; }
.menu-toggle:checked ~ .menu-icon span:nth-child(1) { transform: rotate(45deg) translate(0.6rem, 0.6rem); }
.menu-toggle:checked ~ .menu-icon span:nth-child(2) { opacity: 0; }
.menu-toggle:checked ~ .menu-icon span:nth-child(3) { transform: rotate(-45deg) translate(0.6rem, -0.6rem); }
.overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.7); z-index: 998; opacity: 0; transition: opacity 0.4s ease-in-out; }
.menu-toggle:checked ~ .overlay { display: block; opacity: 1; }

/* Hero Section (copié de styles_contact.css et adapté) */
.hero-section { position: relative; height: 60vh; display: flex; justify-content: center; align-items: center; text-align: center; overflow: hidden; background: linear-gradient(45deg, var(--primary-color), #2E1A47); }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: radial-gradient(circle, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%); z-index: 1; }
.hero-content { position: relative; z-index: 2; max-width: 900px; padding: 0 2rem; }
.hero-content h1 { font-size: 3.5rem; font-weight: 700; color: var(--light-text); text-shadow: 0 0 20px var(--neon-glow); margin-bottom: 1.5rem; }
.glitch::before, .glitch::after { content: attr(data-text); position: absolute; top: 0; left: 0; width: 100%; height: 100%; color: var(--light-text); }
.glitch::before { left: 2px; text-shadow: -2px 0 var(--accent-color); animation: glitch-anim-1 2s infinite linear alternate-reverse; }
.glitch::after { left: -2px; text-shadow: -2px 0 var(--secondary-color); animation: glitch-anim-2 3s infinite linear alternate-reverse; }
@keyframes glitch-anim-1 { 0% { clip: rect(78px, 9999px, 80px, 0); } 10% { clip: rect(44px, 9999px, 56px, 0); } 20% { clip: rect(70px, 9999px, 84px, 0); } 30% { clip: rect(10px, 9999px, 20px, 0); } 40% { clip: rect(60px, 9999px, 70px, 0); } 50% { clip: rect(20px,9999px, 30px, 0); } 60% { clip: rect(90px, 9999px, 92px, 0); } 70% { clip: rect(5px, 9999px, 15px, 0); } 80% { clip: rect(30px, 9999px, 40px, 0); } 90% { clip: rect(65px, 9999px, 75px, 0); } 100% { clip: rect(78px, 9999px, 80px, 0); } }
@keyframes glitch-anim-2 { 0% { clip: rect(20px, 9999px, 30px, 0); } 15% { clip: rect(85px, 9999px, 100px, 0); } 30% { clip: rect(5px, 9999px, 15px, 0); } 45% { clip: rect(70px, 9999px, 80px, 0); } 60% { clip: rect(10px, 9999px, 25px, 0); } 75% { clip: rect(90px, 9999px, 100px, 0); } 90% { clip: rect(40px, 9999px, 50px, 0); } 100% { clip: rect(20px, 9999px, 30px, 0); } }
.hero-content .subtitle { font-size: 1.3rem; color: rgba(255, 255, 255, 0.9); max-width: 700px; margin: 0 auto; }

/* Inscription Form Section */
#inscription-form-section {
    padding: 3rem 1.5rem;
    background: #1A1A1A;
    display: flex;
    justify-content: center;
    align-items: center;
}

.inscription-form-container {
    background: rgba(40, 20, 60, 0.7); /* Slightly different from contact for distinction */
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 0 35px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(216, 86, 62, 0.4);
    max-width: 900px;
    width: 100%;
}

#inscription-form fieldset {
    border: 1px solid rgba(216, 86, 62, 0.3);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

#inscription-form legend {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
    padding: 0 0.8rem;
    margin-left: 1rem;
    text-shadow: 0 0 8px var(--neon-glow);
}

.form-group {
    margin-bottom: 1.2rem;
    display: flex;
    flex-direction: column;
    text-align: left;
}
.form-group.checkbox-group div {
    margin-bottom: 0.5rem;
}
.form-group.checkbox-group input[type="checkbox"] {
    margin-right: 0.5rem;
    vertical-align: middle;
}
.form-group.checkbox-group label {
    font-weight: normal;
    font-size: 1rem;
    vertical-align: middle;
}
.inline-label { /* For checkboxes where label is not on top */
    font-weight: normal !important;
    margin-left: 5px;
    vertical-align: middle;
}


.form-group label {
    font-size: 1rem;
    margin-bottom: 0.4rem;
    font-weight: 700;
    color: var(--light-text);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="url"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.7rem;
    font-size: 0.95rem;
    font-family: 'Roboto Mono', monospace;
    border: 1px solid rgba(216, 86, 62, 0.5);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--light-text);
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 10px var(--neon-glow);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-group select {
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23D8563E" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    background-size: 1.2rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group-inline {
    display: flex;
    gap: 1rem;
}
.form-group-inline .form-group {
    flex: 1;
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.radio-group div {
    display: flex;
    align-items: center;
}
.radio-group input[type="radio"] {
    margin-right: 0.3rem;
}
.radio-group label {
    font-weight: normal;
    font-size: 0.95rem;
    margin-bottom: 0; /* Override default form-group label margin */
}

.fieldset-description {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
    font-style: italic;
}
.fieldset-description a {
    color: var(--accent-color);
    text-decoration: none;
}
.fieldset-description a:hover {
    text-decoration: underline;
}


.sub-fieldset {
    border: 1px dashed rgba(204, 124, 144, 0.4); /* --secondary-color with alpha */
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}
.sub-fieldset h3 {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-weight: 700;
}
.option-group {
    border-left: 3px solid var(--secondary-color);
    padding-left: 1rem;
    margin-top: 1rem;
}
.option-group > label strong { /* The main label for the option checkbox */
    font-size: 1.1rem;
    color: var(--light-text);
}
.option-group input[type="checkbox"] {
    margin-right: 0.5rem;
    vertical-align: middle;
}

small {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    display: block;
    margin-top: 0.3rem;
}


.submit-button {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 2rem auto 0 auto;
    padding: 1rem 2rem;
    background: var(--accent-color);
    color: var(--light-text);
    border: none;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px var(--neon-glow);
}

.submit-button:hover {
    background: var(--secondary-color);
    transform: translateY(-5px);
    box-shadow: 0 0 25px var(--neon-glow);
}

.form-message { margin-top: 1.5rem; font-size: 1.1rem; text-align: center; }
.form-message.error { color: var(--accent-color); text-shadow: 0 0 8px var(--neon-glow); }
.form-message.success { color: #76ff7a; text-shadow: 0 0 8px rgba(76, 175, 80, 0.5); }

/* Status Popup (copié de styles_contact.css) */
.status-popup { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.7); z-index: 1000; justify-content: center; align-items: center; }
.status-popup.show { display: flex; } /* Used by JS to show */
.status-popup-content { background: rgba(26, 0, 43, 0.98); padding: 2rem; border-radius: var(--border-radius); max-width: 500px; width: 90%; position: relative; box-shadow: 0 0 30px rgba(0, 0, 0, 0.7); backdrop-filter: blur(15px); color: var(--light-text); text-align: center; animation: fadeInScale 0.5s ease-out forwards; }
@keyframes fadeInScale { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
.status-popup-content h2 { font-size: 2rem; margin: 0 0 1rem; color: var(--accent-color); text-shadow: 0 0 10px var(--neon-glow); }
.status-popup-content p { font-size: 1.1rem; margin: 0; line-height: 1.5; color: rgba(255, 255, 255, 0.9); }
.close-popup { position: absolute; top: 1rem; right: 1rem; font-size: 1.8rem; cursor: pointer; color: var(--accent-color); transition: color 0.3s; }
.close-popup:hover { color: var(--secondary-color); }

/* Footer (copié de styles_contact.css) */
footer { background: rgba(26, 0, 43, 0.95); padding: 2rem; text-align: center; color: rgba(255, 255, 255, 0.8); border-top: 1px solid rgba(216, 86, 62, 0.3); }
footer p { margin-bottom: 1rem; }
footer ul { list-style: none; display: flex; justify-content: center; gap: 1.5rem; }
footer a { color: rgba(255, 255, 255, 0.8); text-decoration: none; transition: all 0.3s ease; }
footer a:hover { color: var(--accent-color); text-shadow: 0 0 5px var(--neon-glow); }
.footer-socials {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.footer-socials a {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.3));
    background: rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}
.footer-socials a:hover,
.footer-socials a:focus-visible {
    transform: translateY(-2px);
    color: var(--dark-bg, #0c0216);
    background: var(--accent-color);
    border-color: var(--accent-color);
    outline: none;
    box-shadow: 0 0 25px var(--neon-glow);
}
.footer-socials svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Scroll-to-Top Button (copié de styles_contact.css) */
#scroll-top { position: fixed; bottom: 2rem; right: 2rem; background: var(--accent-color); color: var(--light-text); border: none; border-radius: 50%; width: 3.5rem; height: 3.5rem; font-size: 1.8rem; cursor: pointer; z-index: 1000; transition: all 0.3s ease; box-shadow: 0 0 15px var(--neon-glow); opacity: 0; visibility: hidden; /* Start hidden */ }
#scroll-top.show { opacity: 1; visibility: visible; } /* JS will add .show */
#scroll-top:hover { background: var(--secondary-color); transform: scale(1.1); }

/* reCAPTCHA v3 Badge */
.grecaptcha-badge {
    position: fixed; 
    bottom: 100px !important;
    right: 20px !important; 
    z-index: 999; 
    transform: scale(0.9); 
    transform-origin: bottom right; 
    opacity: 0.85; 
    transition: opacity 0.3s ease, transform 0.3s ease; 
    background: rgba(26, 0, 43, 0.8); 
    border-radius: 4px; 
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); 
    padding: 5px;
}
.grecaptcha-badge:hover { opacity: 1; transform: scale(1); }


/* Responsive adjustments */
@media (max-width: 768px) {
    header { padding: 1rem; justify-content: center; }
    .logo-container { margin-right: 0; }
    .fei-logo { max-width: 6rem; }
    .logo-text { display: none; }
    .desktop-nav { display: none; }
    .menu-icon { display: flex; }

    .hero-section { height: auto; padding: 4rem 1rem; }
    .hero-content h1 { font-size: 2.5rem; }
    .hero-content .subtitle { font-size: 1.1rem; }

    #inscription-form-section { padding: 2rem 1rem; }
    .inscription-form-container { padding: 1.5rem; }
    #inscription-form legend { font-size: 1.3rem; }
    .form-group-inline { flex-direction: column; gap: 0; }
    .form-group-inline .form-group { margin-bottom: 1.2rem; } /* Keep consistent spacing */

    .submit-button { font-size: 1.1rem; }
    #scroll-top { bottom: 6rem; /* Adjust if menu icon overlaps */}
    .grecaptcha-badge { bottom: 80px !important; transform: scale(0.85); }
}

@media (max-width: 480px) {
    .hero-content h1 { font-size: 2rem; }
    .hero-content .subtitle { font-size: 1rem; }
    .inscription-form-container { padding: 1rem; }
    #inscription-form legend { font-size: 1.2rem; }
    .form-group label { font-size: 0.9rem; }
    .form-group input, .form-group select, .form-group textarea { font-size: 0.9rem; padding: 0.6rem; }
    .radio-group { gap: 0.5rem; }
    .radio-group label { font-size: 0.9rem; }
    .submit-button { font-size: 1rem; padding: 0.8rem 1.5rem; }
    #scroll-top { width: 3rem; height: 3rem; font-size: 1.5rem; bottom: 5.5rem; right: 1.5rem; }
    .grecaptcha-badge { bottom: 70px !important; transform: scale(0.8); }
}