/* =========================
   BASE
========================= */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
    background-color: #f7f5f0;
    color: #2f2f2f;
    line-height: 1.75;
    font-size: 18px;
    -webkit-font-smoothing: antialiased;
    margin: 0;
    overflow-x: hidden;
}

/* =========================
   TYPOGRAPHIE
========================= */
h1, h2, h3 {
    margin: 0;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: #1f1f1f;
}

h1 { font-size: clamp(36px, 6vw, 68px); font-weight: 600; }
h2 { font-size: clamp(26px, 4vw, 48px); }
h3 { font-size: clamp(20px, 2.5vw, 24px); }

p {
    margin-bottom: 22px;
    font-size: clamp(17px, 1.8vw, 20px);
}

.lead {
    font-size: clamp(18px, 2vw, 22px);
}

/* =========================
   LISTES
========================= */
ul {
    margin: 10px 0 0 0;
    padding-left: 40px;
    text-align: left;
}

ul li {
    margin-bottom: 6px;
    font-size: clamp(17px, 1.8vw, 20px);
    text-align: left;
}

ul + h3 {
    margin-top: 32px;
}

/* =========================
   HERO
========================= */
.hero {
    position: relative;
    height: 100vh;
    min-height: 500px;
    background: url('images/hero.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

.hero-content {
    position: relative;
    max-width: 700px;
    padding: 20px;
}

.hero h1,
.hero h2,
.hero p {
    color: white;
    max-width: 100%;
}

.hero h1 {
    font-size: clamp(38px, 7vw, 72px);
    margin-bottom: 10px;
}

.hero h2 {
    font-size: clamp(18px, 4vw, 36px);
    font-weight: 300;
    margin-bottom: 25px;
}

.hero-text {
    font-size: clamp(16px, 2vw, 24px);
    margin-bottom: 40px;
}

/* =========================
   BOUTONS
========================= */
.btn-white,
.btn.light {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 30px;
    text-decoration: none;
    border: 1.5px solid white;
    color: white;
    background: transparent;
    transition: all 0.3s ease;
    min-height: 48px; /* meilleur touch target mobile */
    font-size: clamp(15px, 1.5vw, 17px);
}

.btn-white:hover,
.btn.light:hover {
    background: white;
    color: #1f1f1f;
}

/* =========================
   LAYOUT SPLIT
========================= */
.split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    padding: 100px 10%;
}

.split.reverse {
    flex-direction: row-reverse;
}

/* TEXTE : prend l'espace disponible */
.text {
    flex: 1 1 0;
    min-width: 0; /* évite le débordement flex */
}

/* IMAGE : max 45% de la largeur, jamais plus haute que son contenu */
.image {
    flex: 0 0 45%;
    max-width: 45%;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* l'image s'aligne en haut, pas étirée */
}

/* =========================
   IMAGES
========================= */
.image img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 65vh;    /* ne jamais dépasser 65% de la hauteur visible */
    object-fit: contain; /* préserve les proportions sans rogner */
    border-radius: 4px;
}

/* PAYSAGE → limite de largeur raisonnable */
.image.paysage img {
    max-width: 480px;
    max-height: 55vh;
}

/* PORTRAIT → plus étroit pour ne pas écraser le texte */
.image.portrait img {
    max-width: 280px;
    max-height: 60vh;
}

/* =========================
   FORMATEURS
========================= */
.formateurs {
    padding: 100px 10%;
}

.formateurs > h2 {
    margin-bottom: 60px;
}

.formateurs-grid {
    display: flex;
    gap: 60px;
    align-items: flex-start;
}

.formateur-card {
    flex: 1;
}

.formateur-photo {
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 4px;
    margin-bottom: 24px;
}

.formateur-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.formateur-card h3 {
    margin-bottom: 12px;
}

.formateur-card p {
    margin-bottom: 14px;
    font-size: clamp(17px, 1.8vw, 20px);
}

.formateur-card a {
    color: #2b4a3a;
    text-decoration: none;
    font-size: clamp(16px, 1.6vw, 18px);
    border-bottom: 1px solid currentColor;
    padding-bottom: 1px;
    transition: opacity 0.2s ease;
}

.formateur-card a:hover {
    opacity: 0.6;
}

/* =========================
   TÉMOIGNAGES
========================= */
.temoignages {
    padding: 100px 10%;
}

.temoignages > h2 {
    margin-bottom: 60px;
}

.temoignages-grid {
    display: flex;
    gap: 60px;
    align-items: flex-start;
}

.temoignage {
    flex: 1;
    margin: 0;
}

.temoignage p {
    font-size: clamp(18px, 1.9vw, 21px);
    font-style: italic;
    margin-bottom: 16px;
    color: #2f2f2f;
}

.temoignage cite {
    font-size: clamp(15px, 1.4vw, 16px);
    color: #777;
    font-style: normal;
}

/* =========================
   FAQ
========================= */
.faq {
    padding: 100px 10%;
}

.faq > h2 {
    margin-bottom: 50px;
    max-width: 520px;
}

.faq-list {
    display: flex;
    flex-direction: column;
    max-width: 680px;
}

.faq-item {
    padding: 28px 0;
    border-bottom: 1px solid #c8c4bc;
}

.faq-item:first-child {
    border-top: 1px solid #c8c4bc;
}

.faq-item h3 {
    font-size: clamp(17px, 1.8vw, 20px);
    font-weight: 500;
    margin-bottom: 10px;
}

.faq-item p {
    margin-bottom: 0;
    font-size: clamp(16px, 1.6vw, 18px);
    color: #4a4a4a;
}

/* =========================
   CTA
========================= */
.cta {
    background: linear-gradient(180deg, #2b4a3a 0%, #1f352a 100%);
    color: white;
    display: flex;
    justify-content: center;
    padding: 120px 20px;
}

.cta-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    max-width: 700px;
    width: 100%;
}

.cta h2 {
    color: white;
    font-size: clamp(26px, 4vw, 42px);
    text-align: center;
}

.cta p {
    color: white;
    text-align: center;
    font-size: clamp(17px, 1.8vw, 20px);
    max-width: 560px;
}

/* =========================
   TABLETTE (≤ 900px)
========================= */
@media (max-width: 900px) {
    .formateurs,
    .temoignages,
    .faq {
        padding: 70px 8%;
    }

    .faq-list {
        max-width: 100%;
    }
    .split {
        gap: 40px;
        padding: 70px 8%;
    }

    .image {
        flex: 0 0 42%;
        max-width: 42%;
    }

    h1 { font-size: clamp(32px, 5vw, 48px); }
    h2 { font-size: clamp(22px, 3.5vw, 34px); }

    .hero h1 { font-size: clamp(34px, 6vw, 52px); }
    .hero h2 { font-size: clamp(16px, 2.5vw, 24px); }
}

/* =========================
   MOBILE (≤ 640px)
========================= */
@media (max-width: 640px) {

    /* ── GLOBAL : tout à gauche sauf hero et CTA ── */
    body {
        font-size: 16px;
        text-align: left;
    }

    /* ── TITRES ── */
    h1 { font-size: 30px; }
    h2 { font-size: 22px; }
    h3 { font-size: 17px; }

    p, li {
        font-size: 16px;
    }

    /* ── SECTIONS SPLIT : colonne, image au-dessus ── */
    .split,
    .split.reverse {
        flex-direction: column-reverse;
        align-items: flex-start;
        gap: 20px;
        padding: 44px 6%;
        text-align: left;
    }

    /* Tous les enfants du texte à gauche */
    .text,
    .text h2,
    .text h3,
    .text p,
    .text ul,
    .text li {
        text-align: left;
        width: 100%;
    }

    /* ── IMAGES : pleine largeur, hauteur raisonnable ── */
    .image {
        flex: none;
        width: 100%;
        max-width: 100%;
        justify-content: flex-start;
    }

    .image img,
    .image.paysage img,
    .image.portrait img {
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: 55vw; /* proportionnel à l'écran, jamais énorme */
        object-fit: cover;
        border-radius: 6px;
    }

    /* ── LISTES ── */
    ul {
        padding-left: 22px;
        text-align: left;
    }

    ul li {
        text-align: left;
        font-size: 16px;
    }

    /* ── HERO ── */
    .hero {
        height: 90vh;
    }

    .hero h1 { font-size: 34px; }
    .hero h2 { font-size: 17px; }
    .hero-text { font-size: 15px; }

    .hero-content {
        padding: 16px;
    }

    /* ── BOUTONS ── */
    .btn-white,
    .btn.light {
        padding: 14px 22px;
        font-size: 16px;
        width: 100%;
        text-align: center;
        display: block;
    }

    /* ── FORMATEURS ── */
    .formateurs,
    .temoignages,
    .faq {
        padding: 44px 6%;
    }

    .formateurs > h2,
    .temoignages > h2,
    .faq > h2 {
        font-size: 22px;
        margin-bottom: 30px;
    }

    .formateurs-grid,
    .temoignages-grid {
        flex-direction: column;
        gap: 36px;
    }

    /* Photos formateurs : hauteur fixe raisonnable sur mobile */
    .formateur-photo {
        aspect-ratio: 3 / 2;
    }

    .formateur-card p {
        font-size: 16px;
    }

    /* ── TÉMOIGNAGES ── */
    .temoignage p {
        font-size: 16px;
    }

    /* ── FAQ ── */
    .faq-list {
        max-width: 100%;
    }

    .faq-item h3 {
        font-size: 16px;
    }

    .faq-item p {
        font-size: 15px;
    }

    /* ── CTA ── */
    .cta {
        padding: 60px 6%;
    }

    .cta h2 {
        font-size: 22px;
        text-align: center;
    }

    .cta p {
        font-size: 16px;
        text-align: center;
    }
}