/* =================================================== */
/* 1. CONFIGURATION GLOBALE ET VARIABLES              */
/* =================================================== */
:root {
    /* Palette principale */
    --primary: #1D0469;
    --secondary: #FA5DFF;
    --tertiary: #FF8A3F;
    
    /* Couleurs neutres et contrastes */
    --secondary-dark: #D830E0;
    --bg-color: #FAFAFA;
    --surface: #FFFFFF;
    --text-dark: #333333;
    --text-light: #666666;
    --border: #EAEAEA;
    
    /* Variables de style */
    --border-radius: 8px;
    --transition: 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-dark);
    line-height: 1.6;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--secondary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* =================================================== */
/* 2. HEADER ET NAVIGATION                            */
/* =================================================== */
header {
    background-color: var(--surface);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

/* Le bouton "Nous contacter" réparé */
.btn-nav {
    background-color: var(--primary);
    color: var(--surface) !important;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background-color var(--transition), transform 0.2s ease;
    display: inline-block;
}

.btn-nav:hover {
    background-color: var(--secondary);
    transform: translateY(-2px);
}

/* =================================================== */
/* 3. HERO SECTION ET BRANCHES                        */
/* =================================================== */
.hero {
    text-align: center;
    padding: 6rem 0 4rem;
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto 2rem;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 3rem;
    font-weight: 700;
}

.branches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    transition: transform var(--transition);
    border-top: 4px solid var(--primary);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.card.skynium { border-top-color: var(--secondary); }
.card.ats { border-top-color: var(--tertiary); }

.card h3 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.card p {
    color: var(--text-light);
}

/* =================================================== */
/* 4. LA DIRECTION (PROFILS)                          */
/* =================================================== */
.team-section {
    background-color: var(--surface);
    padding: 5rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin: 2rem 0;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 4rem;
}

.profile {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

/* Images de profil rondes et ajustées */
.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden; /* Coupe l'image en rond parfait */
    border: 3px solid #f0f0f0;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Maintient les proportions */
}

.profile-info h3 {
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.profile-info h4 {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 1rem;
}

.profile-info p {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.7;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: underline;
    color: var(--secondary-dark);
}

/* =================================================== */
/* 5. FORMULAIRE DE CONTACT                           */
/* =================================================== */
.contact-section {
    padding: 5rem 0;
}

.contact-form {
    background-color: var(--surface);
    padding: 3rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    max-width: 800px;
    margin: 0 auto;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.form-group.full { grid-column: 1 / -1; }

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
}

.form-group input, 
.form-group textarea {
    padding: 12px;
    border: 1px solid #CCC;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color var(--transition);
    background-color: var(--surface);
}

.form-group input:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.checkbox-group, .radio-group {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.checkbox-item, .radio-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    cursor: pointer;
}

.btn-submit {
    background-color: var(--primary);
    color: var(--surface);
    border: none;
    padding: 15px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    transition: background-color var(--transition);
    margin-top: 1rem;
}

.btn-submit:hover {
    background-color: var(--secondary);
}

.status-message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    display: none;
}
.status-message.success { background-color: #e6f4ea; color: #1e8e3e; border: 1px solid #cce8d6; display: block; }
.status-message.error { background-color: #fce8e6; color: #d93025; border: 1px solid #fad2cf; display: block; }

/* =================================================== */
/* 6. FOOTER CORRIGÉ (Pleine Largeur)                 */
/* =================================================== */
/* On écrase le comportement natif de .container pour le footer
   afin qu'il prenne 100% de la largeur de l'écran 
*/
footer.container {
    max-width: 100%;
    width: 100%;
    margin: 0;
    background-color: var(--primary);
    color: var(--surface);
    padding: 4rem 10% 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 3rem;
    margin-top: 4rem;
}

footer div {
    flex: 1;
    min-width: 200px;
}

footer h3 {
    font-size: 1.25rem;
    color: var(--secondary);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

footer p { margin-bottom: 0.5rem; color: #e0e0e0; font-size: 0.95rem; }

footer ul { list-style: none; padding: 0; }
footer ul li { margin-bottom: 0.8rem; }

footer a {
    color: #e0e0e0 !important;
    font-size: 0.95rem;
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

footer a:hover {
    color: var(--secondary) !important;
    text-decoration: underline;
}

.footer-bottom {
    width: 100%;
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.85rem;
    color: #aaa;
    flex: 0 0 100%;
}

/* =================================================== */
/* 7. ACCESSIBILITÉ (Bouton et Panneau Skynium)       */
/* =================================================== */
.skip-link {
    position: absolute; top: -100px; left: 10px; z-index: 9999; 
    padding: 12px 20px; background-color: var(--primary); 
    color: var(--surface); font-weight: 700; border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3); transition: top 0.3s;
}
.skip-link:focus { top: 10px; }

*:focus { outline: 3px solid var(--tertiary); outline-offset: 2px; }

#accessibility-button {
    position: fixed; bottom: 20px; left: 20px; z-index: 10000; 
    width: 60px; height: 60px; background-color: var(--primary); 
    color: var(--surface); border: none; border-radius: 50%; 
    font-size: 1.8rem; cursor: pointer; box-shadow: 0 4px 15px rgba(0,0,0,0.3); 
    display: flex; align-items: center; justify-content: center;
}
#accessibility-button:hover { background-color: var(--secondary); }

#accessibility-panel {
    position: fixed; top: 0; right: -400px; width: 400px; height: 100vh; 
    background-color: var(--surface); box-shadow: -5px 0 20px rgba(0,0,0,0.3); 
    z-index: 10001; overflow-y: auto; transition: right 0.4s ease; padding: 20px;
}
#accessibility-panel.open { right: 0; }

.close-btn { position: absolute; top: 15px; right: 15px; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-dark); }
#accessibility-panel h2 { color: var(--primary); margin-bottom: 1.5rem; font-size: 1.5rem; }
.accessibility-section { margin-bottom: 2rem; }
.accessibility-section h3 { font-size: 1.1rem; color: var(--secondary-dark); margin-bottom: 1rem; }

.accessibility-option {
    display: flex; align-items: center; justify-content: space-between; 
    padding: 12px; margin-bottom: 10px; background-color: var(--bg-color); 
    border-radius: 8px; cursor: pointer; border: 2px solid transparent;
}
.accessibility-option.active { border-color: var(--tertiary); background-color: #fff4e6; }
.option-desc { font-size: 0.8rem; color: var(--text-light); margin-top: 4px; }

.toggle-switch {
    position: relative; width: 46px; height: 24px; background-color: #ccc; 
    border-radius: 20px; transition: 0.3s; flex-shrink: 0;
}
.toggle-switch.active { background-color: var(--secondary); }
.toggle-switch::after {
    content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; 
    background-color: white; border-radius: 50%; transition: 0.3s;
}
.toggle-switch.active::after { transform: translateX(22px); }

/* --- Scripts d'accessibilité --- */
body.epilepsy-safe { filter: brightness(0.9) contrast(0.9); animation: none !important; }
body.visually-impaired { filter: contrast(1.2) brightness(1.1); font-weight: 500; }
body.monochrome { filter: grayscale(100%); }
body.dyslexia-font { font-family: 'Comic Sans MS', sans-serif !important; }
body.highlight-links a { background-color: #FFFF99 !important; color: #000 !important; }
body.highlight-headings h1, body.highlight-headings h2 { background-color: yellow; color: black; }

/* =================================================== */
/* 8. RESPONSIVE MOBILE                               */
/* =================================================== */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .form-grid { grid-template-columns: 1fr; }
    .team-grid { grid-template-columns: 1fr; }
    .profile { flex-direction: column; align-items: center; text-align: center; }
    .contact-form { padding: 1.5rem; }
    footer.container { padding: 3rem 5%; flex-direction: column; text-align: center; }
    
    #accessibility-panel { width: 100%; right: -100%; }
}