/* ===============================================
   GROUPE RENOUVEAU - SITE INSTITUTIONNEL
   Conforme RGAA - Design sobre et accessible
   =============================================== */

/* === VARIABLES CSS === */
:root {
    /* Palette de couleurs */
    --primary-color: #2d8bba;
    --secondary-color: #f6a70d;
    --accent-green: #00bf63;
    --accent-purple: #6d3450;

    /* Couleurs de texte et fond */
    --text-color: #1f2937;
    --text-light: #6b7280;
    --white: #ffffff;
    --light-bg: #f9fafb;
    --gray-bg: #f3f4f6;

    /* Typographie */
    --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-size-base: 16px;
    --line-height-base: 1.6;

    /* Espacements */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 5rem;

    /* Transitions */
    --transition-base: 0.3s ease;
}

/* === RESET ET STYLES DE BASE === */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: var(--font-size-base);
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    line-height: var(--line-height-base);
    color: var(--text-color);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === ACCESSIBILITÉ === */

/* Lien d'évitement */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    font-weight: 600;
    z-index: 9999;
    transition: top var(--transition-base);
}

.skip-link:focus {
    top: 0;
    outline: 3px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Classe pour masquer visuellement mais garder accessible */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus visible pour l'accessibilité au clavier */
a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 3px;
}

/* === CONTAINER === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* === HEADER ET NAVIGATION === */
header {
    background-color: var(--white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--spacing-sm);
    padding-bottom: var(--spacing-sm);
}

.logo img {
    height: 50px;
    width: auto;
    display: block;
    object-fit: contain;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
    margin: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 1.05rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all var(--transition-base);
}

.nav-links a:hover,
.nav-links a:focus {
    color: var(--primary-color);
    background-color: rgba(45, 139, 186, 0.1);
}

/* Menu burger mobile */
.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: 2px solid var(--primary-color);
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color var(--transition-base);
}

.menu-toggle:hover,
.menu-toggle:focus {
    background-color: rgba(45, 139, 186, 0.1);
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--primary-color);
    margin: 3px 0;
    transition: all var(--transition-base);
}

/* === SECTION HERO === */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e6b8f 100%);
    color: var(--white);
    padding: 4rem 2rem;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-overlay {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-overlay .container {
    max-width: 850px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    letter-spacing: -0.5px;
    text-align: center;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.6;
    opacity: 0.98;
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

/* === SECTION PRÉSENTATION === */
.presentation {
    padding: var(--spacing-xl) 0;
    background-color: var(--white);
}

.presentation h2 {
    font-size: 2.25rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-lg);
    text-align: center;
    font-weight: 600;
}

.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.intro-text {
    font-size: 1.25rem;
    color: var(--text-color);
    margin-bottom: var(--spacing-md);
    line-height: 1.7;
}

.presentation p {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.7;
}

/* === SECTION VISION & MISSION === */
.vision-mission {
    padding: var(--spacing-xl) 0;
    background-color: var(--light-bg);
}

.vm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    max-width: 1000px;
    margin: 0 auto;
}

.vm-card {
    background-color: var(--white);
    padding: var(--spacing-lg);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-top: 4px solid var(--primary-color);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.vm-card:hover,
.vm-card:focus-within {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.vm-card:nth-child(1) {
    border-top-color: var(--secondary-color);
}

.vm-card:nth-child(2) {
    border-top-color: var(--accent-green);
}

.vm-card h3 {
    font-size: 1.75rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    font-weight: 600;
}

.vm-card p {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.7;
}

/* === SECTION DÉCLARATION D'ACCESSIBILITÉ === */
.accessibility-statement {
    padding: var(--spacing-xl) 0;
    background-color: var(--white);
}

.accessibility-statement .container {
    max-width: 900px;
}

.accessibility-statement h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-lg);
    font-weight: 600;
}

.accessibility-statement h2 {
    font-size: 1.75rem;
    color: var(--primary-color);
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    font-weight: 600;
}

.accessibility-statement h3 {
    font-size: 1.35rem;
    color: var(--text-color);
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
}

.accessibility-statement p {
    margin-bottom: var(--spacing-sm);
    line-height: 1.7;
}

.accessibility-statement ul {
    margin: var(--spacing-sm) 0;
    padding-left: 2rem;
    line-height: 1.8;
}

.accessibility-statement li {
    margin-bottom: 0.5rem;
}

.accessibility-statement a {
    color: var(--primary-color);
    text-decoration: underline;
}

.accessibility-statement a:hover,
.accessibility-statement a:focus {
    color: var(--accent-green);
}

.accessibility-statement hr {
    margin: var(--spacing-lg) 0;
    border: none;
    border-top: 1px solid var(--gray-bg);
}

.update-info {
    font-style: italic;
    color: var(--text-light);
    margin-top: var(--spacing-md);
}

/* === SECTION CONTACT === */
.contact {
    padding: var(--spacing-xl) 0;
    background-color: var(--white);
}

.contact h2 {
    font-size: 2.25rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-lg);
    text-align: center;
    font-weight: 600;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-content p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
}

.contact-email {
    margin-top: var(--spacing-md);
}

.contact-email a {
    display: inline-block;
    font-size: 1.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 6px;
    transition: all var(--transition-base);
    border: 2px solid transparent;
}

.contact-email a:hover,
.contact-email a:focus {
    color: var(--white);
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* === FOOTER === */
footer {
    background-color: var(--text-color);
    color: var(--white);
    padding: var(--spacing-lg) 0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
    text-align: center;
}

.footer-logos img {
    height: 50px;
    width: auto;
    opacity: 0.9;
}

footer p {
    font-size: 0.95rem;
    opacity: 0.8;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: var(--spacing-sm) 0;
}

.footer-links li {
    margin: 0.5rem 0;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 0.95rem;
    opacity: 0.9;
    transition: opacity var(--transition-base);
}

.footer-links a:hover,
.footer-links a:focus {
    opacity: 1;
    text-decoration: underline;
}

/* === RESPONSIVE === */

/* Tablettes */
@media (max-width: 968px) {
    .container {
        padding: 0 var(--spacing-md);
    }

    .hero {
        min-height: 320px;
        padding: 3.5rem 2rem;
    }

    .hero h1 {
        font-size: 2.5rem;
        margin-bottom: 1.25rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
        line-height: 1.55;
    }

    .presentation h2,
    .contact h2 {
        font-size: 2rem;
    }

    .vm-card h3 {
        font-size: 1.5rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --spacing-xl: 3rem;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        flex-direction: column;
        background-color: var(--white);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        padding: var(--spacing-md);
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height var(--transition-base);
    }

    .nav-links.active {
        max-height: 500px;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: var(--spacing-sm);
        text-align: left;
        width: 100%;
    }

    .hero {
        min-height: 280px;
        padding: 3rem var(--spacing-md);
    }

    .hero h1 {
        font-size: 2rem;
        margin-bottom: 1.25rem;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        line-height: 1.6;
        padding: 0 var(--spacing-sm);
    }

    .presentation h2,
    .contact h2 {
        font-size: 1.75rem;
    }

    .intro-text {
        font-size: 1.1rem;
    }

    .presentation p {
        font-size: 1rem;
    }

    .vm-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .contact-email a {
        font-size: 1.25rem;
        word-break: break-all;
    }
}

/* Très petits écrans */
@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-sm);
    }

    .logo img {
        height: 50px;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }
}

/* === MODE CONTRASTE ÉLEVÉ === */
@media (prefers-contrast: high) {
    .vm-card {
        border-width: 2px;
        border-style: solid;
    }

    .nav-links a:hover,
    .nav-links a:focus {
        border: 2px solid var(--primary-color);
    }
}

/* === RÉDUCTION DES ANIMATIONS === */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* === IMPRESSION === */
@media print {
    header,
    footer,
    .skip-link {
        display: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
    }

    a {
        text-decoration: underline;
        color: #000;
    }

    .hero {
        background: none;
        color: #000;
        border-bottom: 2px solid #000;
    }
}