/* ==========================================================================
   AEW PATRIMOINE SANTÉ - FEUILLE DE STYLE PRINCIPALE
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CONFIGURATION DE BASE ET VARIABLES
   -------------------------------------------------------------------------- */
:root {
    /* Couleurs primaires */
    --aew-red: #C22338;
    --aew-slate: #5D87A1;
    --aew-navy: #1A2550;

    /* Couleurs de support */
    --background-light: #f8f9fa;
    --background-white: #FFFFFF;
    --text-dark: #212529;
    --text-light: #FFFFFF;
    --text-muted: #6c757d;
    --border-color: #dee2e6;

    /* Typographie */
    --font-main: 'Aileron', sans-serif;
    --font-complementary: 'Interstate Condensed', sans-serif;
    
    /* Transitions */
    --transition-speed: 0.3s;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background-white);
    margin: 0;
    padding-top: 80px;
}

/* --------------------------------------------------------------------------
   2. TYPOGRAPHIE GLOBALE
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 {
    font-family: var(--font-main);
    font-weight: 700;
    color: var(--aew-navy);
    line-height: 1.2;
    margin-top: 0;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; text-align: center; margin-bottom: 2rem; }
h3 { font-size: 1.5rem; }

p { margin-top: 0; margin-bottom: 1rem; }
a { color: var(--aew-red); text-decoration: none; }
a:hover { text-decoration: underline; }

.section-title { margin-bottom: 3rem; }
.subtitle { font-size: 2.75rem; color: var(--aew-red); }

/* --------------------------------------------------------------------------
   3. COMPOSANTS GLOBAUX ET ACCESSIBILITÉ
   -------------------------------------------------------------------------- */
.cta-button {
    font-family: var(--font-main);
    font-weight: bold;
    font-size: 1rem;
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: background-color var(--transition-speed), color var(--transition-speed), border-color var(--transition-speed);
    cursor: pointer;
    border: 2px solid transparent;
}

.cta-button.primary {
    background-color: var(--aew-red);
    color: var(--text-light);
    border-color: var(--aew-red);
}

.cta-button.primary:hover {
    background-color: #a11b2d;
    border-color: #a11b2d;
    color: var(--text-light);
    text-decoration: none;
}

.cta-button.secondary {
    background-color: var(--background-white);
    color: var(--aew-red);
    border-color: var(--aew-red);
}

.cta-button.secondary:hover {
    background-color: var(--aew-red);
    color: var(--text-light);
    text-decoration: none;
}

section {
    padding: 60px 20px;
}

/* Style pour une prise de focus visible, essentiel pour l'accessibilité */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, iframe:focus-visible {
    outline: 3px solid var(--aew-slate);
    outline-offset: 2px;
    border-radius: 2px;
}

/* --------------------------------------------------------------------------
   4. HEADER ET NAVIGATION
   -------------------------------------------------------------------------- */
.main-header {
    background-color: var(--background-white);
    border-bottom: 1px solid var(--border-color);
    padding: 0 20px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: auto;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
}

.navbar-logo img {
    height: 150px;
    width: auto;
}

.navbar-links a {
    font-weight: bold;
    color: var(--aew-navy);
    font-size: 1.2rem;
    text-decoration: none;
    transition: color var(--transition-speed);
}

.navbar-links a:not(.cta-button):hover {
    color: var(--aew-red);
}

/* --------------------------------------------------------------------------
   4.B. MENU BURGER RESPONSIVE (MOBILE)
   -------------------------------------------------------------------------- */
.burger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 2rem;
    height: 2rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.burger-menu span {
    width: 2rem;
    height: 0.25rem;
    background: var(--aew-navy);
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

.burger-menu.is-active span:nth-child(1) { transform: rotate(45deg); }
.burger-menu.is-active span:nth-child(2) { opacity: 0; transform: translateX(20px); }
.burger-menu.is-active span:nth-child(3) { transform: rotate(-45deg); }

.navbar-links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 70vw;
    background-color: var(--background-white);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

.navbar-links.is-active {
    transform: translateX(0);
}

/* --------------------------------------------------------------------------
   5. STYLES DES SECTIONS
   -------------------------------------------------------------------------- */

/* ----- HERO SECTION ----- */
.hero-section {
    background: url('../images/hero-sante.jpg') no-repeat center center/cover;
    color: var(--text-light);
    text-align: center;
    padding: 60px 10px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 37, 80, 0.6);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}
.hero-content h1 { color: var(--text-light); }
.hero-content .subtitle { color: rgba(255, 255, 255, 0.8); margin-bottom: 2rem; }

/* ----- KPI & PILIERS ----- */
.kpi-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 2rem 0;
    flex-wrap: wrap; /* Important pour le responsive */
}

.kpi-item {
    flex: 1; /* Permet aux items de prendre une part égale de l'espace */
    text-align: center; /* Centre le contenu de chaque item */
    display: flex;
    flex-direction: column;
    align-items: center; /* Centre horizontalement les éléments enfants */
}
.kpi-value {
    font-size: 2rem; /* MODIFIÉ : Augmenté de 2rem à 2.5rem */
    font-weight: bold;
}
.kpi-label {
    font-size: 1rem; /* MODIFIÉ : Augmenté de 0.9rem à 1rem */
}

.piliers-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.pillar-card {
    background-color: var(--background-white);
    padding: 30px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}
.pillar-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05); }
.pillar-card .pillar-icon { height: 150px; margin-bottom: 1rem; }
.pillar-card h3 { margin-bottom: 1rem; }

/* ----- STRATEGIE & TRANSCRIPTION VIDEO ----- */
.strategie-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

/* Styles pour la transcription vidéo accessible */
.video-transcription {
    margin-top: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.5rem 1rem;
    text-align: left;
}
.video-transcription summary {
    cursor: pointer;
    font-weight: bold;
    color: var(--aew-navy);
}
.video-transcription summary:hover {
    color: var(--aew-red);
}
.video-transcription div {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* ----- SOUSCRIPTION, RISQUES, FRAIS, DOCUMENTS ----- */
.souscription-section .content-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center; /* Ajout de cette ligne */
}
.cta-button {
    margin: 0 auto; /* Cette ligne s'assure que le bouton est centré si ce n'est pas déjà le cas */
}

.steps-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin: 3rem 0;
    text-align: left;
    width: 100%;
}

/* Centrer le texte sous les numéros sur petits écrans */
@media (max-width: 768px) {
    .steps-container {
        align-items: center; /* Centre les éléments dans la colonne */
    }
    
    .step {
        text-align: center; /* Centre le texte de chaque étape */
    }
}

.step-number {
    width: 50px; 
    height: 50px; 
    border: 2px solid var(--aew-red); 
    border-radius: 50%; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    font-size: 1.5rem; 
    font-weight: bold; 
    color: var(--aew-red); 
    margin: 0 auto 1rem auto; 
}

.risques-container, .documents-section {
    max-width: 1200px;
    margin: 0 auto;
}

.risque-items {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.risque-item {
    flex: 1;
    background-color: var(--background-white);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.risque-item h3 {
    text-align: center;
    color: var(--aew-red);
}

.risque-item p {
    text-align: justify;
}

.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
}

.frais-table {
    width: 100%;
    margin: 20px auto;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.frais-table th, .frais-table td {
    padding: 18px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}

.frais-table th {
    background-color: var(--aew-navy);
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.frais-table tbody tr {
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.frais-table tbody tr:last-child td {
    border-bottom: none;
}

.frais-table th:last-child, .frais-table td:last-child {
    border-right: none;
}

.frais-table tbody tr:hover {
    background-color: rgba(93, 135, 161, 0.05);
    transform: scale(1.015);
    cursor: pointer;
}

.frais-table tbody td:first-child {
    font-weight: 600;
    color: var(--aew-navy);
}

.indicative-fee-text {
    color: var(--aew-red);
    text-align: center;
    margin-top: 25px;
    font-style: italic;
}

.documents-section {
    text-align: center;
}

.document-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin: 2rem 0;
}

.disclaimer-box {
    max-width: 1200px;
    margin: 3rem auto 0 auto;
    padding: 2rem;
    border: 3px solid var(--aew-red);
    text-align: left;
}

.disclaimer-box .eyebrow-headline {
    font-family: var(--font-complementary);
    text-transform: uppercase;
    color: var(--aew-red);
    font-weight: bold;
}

.disclaimer {
    font-family: var(--font-complementary);
    font-size: 1.2rem;
    text-transform: none;
    color: var(--text-muted);
    text-align: justify;
}

/* --------------------------------------------------------------------------
   6. FOOTER
   -------------------------------------------------------------------------- */
.main-footer {
    background-color: var(--aew-navy);
    color: var(--text-light);
    padding: 40px 20px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 30px;
}

.footer-logo { height: 150px; }

.footer-contact p, .footer-links a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin: 0;
}

.footer-links a:hover { color: var(--text-light); }

.footer-links { 
    display: flex; 
    flex-wrap: wrap; 
    justify-content: center; 
    gap: 20px; 
}

.footer-bottom { 
    text-align: center; 
    margin-top: 30px; 
    padding-top: 20px; 
    border-top: 1px solid rgba(255, 255, 255, 0.2); 
    font-size: 0.8rem; 
    color: rgba(255, 255, 255, 0.5); 
}

/* --------------------------------------------------------------------------
   7. MODAL
   -------------------------------------------------------------------------- */
.modal {
    display: none; /* Cacher la modal par défaut */
    position: fixed;
    z-index: 1000; /* Au-dessus des autres éléments */
    left: 0;
    top: 0;
    width: 100%; /* Largeur pleine */
    height: 100%; /* Hauteur pleine */
    overflow: auto; /* Activer le défilement si nécessaire */
    background-color: rgba(0, 0, 0, 0.5); /* Fond semi-transparent */
}

.modal-content {
    background-color: #fff;
    margin: 10% auto; /* Ajustez la marge pour centrer verticalement */
    padding: 20px;
    border: 1px solid #888;
    width: 90%; /* Ajustez la largeur selon vos besoins */
    max-width: 4000px; /* Largeur maximale de la modal */
    border-radius: 8px; /* Coins arrondis */
    display: flex;
    flex-direction: column; /* Permet d'aligner les éléments verticalement */
    justify-content: space-between; /* Espace entre les éléments pour pousser le bouton vers le bas */
    height: auto; /* Permet de s'adapter à la taille du contenu */
}

.modal-content p {
    text-align: justify; /* Justifie le texte dans la modal */
    font-size: 1rem; /* Taille de la police pour le texte */
    line-height: 1.5; /* Ajuste l'interligne pour une meilleure lisibilité */
}

#confirmSubscription {
    align-self: center; /* Centre le bouton horizontalement */
    margin-top: 20px; /* Ajoute un peu d'espace au dessus du bouton */
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* --------------------------------------------------------------------------
   8. RESPONSIVE DESIGN (APPROCHE MOBILE-FIRST)
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
    body { font-size: 18px; }
    h1 { font-size: 3rem; }
    h2 { font-size: 2.5rem; }

    .burger-menu { display: none; }

    .navbar-links {
        position: static;
        transform: translateX(0);
        height: auto;
        width: auto;
        flex-direction: row;
        background-color: transparent;
        box-shadow: none;
        gap: 20px;
    }

    .hero-section { padding: 80px 20px; }
    /* .kpi-container { flex-direction: row; }  <--  SUPPRIMÉ : Déjà géré par le CSS principal */
    .piliers-grid { grid-template-columns: repeat(2, 1fr); }
    .strategie-container { flex-direction: row; }
    .steps-container { flex-direction: row; text-align: center;}
    .risque-items { flex-direction: row; }
    .footer-content { flex-direction: row; justify-content: space-between; text-align: left; align-items: flex-start; }
}

@media (min-width: 1024px) {
    body { font-size: 20px; }
    h1 { font-size: 3.5rem; }
    .navbar-links { gap: 30px; }
    .piliers-grid { grid-template-columns: repeat(4, 1fr); }
}
