/* ---- Polices auto-hébergées (Cormorant Garamond, subsets latin) ---- */
/* Le fichier latin est variable : il couvre les graisses 300–700 (400 et
 * 500 utilisées par le site). Aucun lien Google Fonts : tout est local. */
@font-face {
    font-family: 'Cormorant Garamond';
    src: url('fonts/cormorant-garamond-latin.woff2') format('woff2');
    font-weight: 300 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Cormorant Garamond';
    src: url('fonts/cormorant-garamond-latin-italic.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --blue: #104861;
    --blue-deep: #0c3a50;
    --gold: #ffc000;
    --gold-soft: rgba(255, 192, 0, 0.35);
    --cream: #fbf7ee;
    --ink: #24333c;
    --white: #ffffff;
    --line: rgba(16, 72, 97, 0.22);
    --radius: 4px;
    --transition: 0.25s ease;
    --shadow: 0 18px 45px rgba(12, 58, 80, 0.12);
    --shadow-deep: 0 24px 60px rgba(12, 58, 80, 0.18);
    --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--blue);
    background: var(--white);
    font-size: clamp(17px, 1.7vw, 21px);
    line-height: 1.55;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

::selection {
    background: var(--gold);
    color: var(--blue-deep);
}

:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}

a:hover,
a:focus-visible {
    color: var(--blue);
    text-decoration: underline;
    text-underline-offset: 0.25em;
}

h1,
h2,
h3,
h4,
p,
ul {
    margin-top: 0;
}

h1,
h2,
h3 {
    font-family: var(--font-display);
    font-weight: 500;
    line-height: 1.08;
}

h1 {
    font-size: clamp(38px, 6vw, 72px);
}

h2 {
    font-size: clamp(32px, 4.2vw, 52px);
    margin-bottom: 24px;
}

h3 {
    font-size: clamp(25px, 3vw, 37px);
    margin-bottom: 16px;
}

p,
li {
    font-weight: 400;
}

ul {
    padding-left: 1.2em;
}

hr {
    border: 0;
    border-top: 1px solid var(--line);
    width: 100%;
}

.container {
    width: min(1160px, calc(100% - 36px));
    margin: 0 auto;
}

.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 20;
}

/* Fine ligne dorée sous l'en-tête : dégradé or → transparent. */
.site-header::after {
    content: "";
    display: block;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), rgba(255, 192, 0, 0));
}

.site-nav {
    position: relative;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-toggle {
    display: none;
    appearance: none;
    background: none;
    border: 0;
    padding: 0;
}

.nav-burger-bar {
    display: none;
}

.brand-mobile {
    display: none;
}

.nav-links {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr auto 1fr 1fr 1fr;
    gap: clamp(18px, 3vw, 42px);
    align-items: center;
    justify-items: center;
}

.nav-links a {
    font-size: clamp(18px, 1.9vw, 26px);
    white-space: nowrap;
    /* Soulignement doré animé : 0 → 100 % au survol / focus. */
    padding-bottom: 4px;
    background-image: linear-gradient(90deg, var(--gold), var(--gold));
    background-repeat: no-repeat;
    background-position: left bottom;
    background-size: 0% 2px;
    transition: background-size var(--transition), color var(--transition);
}

.nav-links a:hover,
.nav-links a:focus-visible {
    background-size: 100% 2px;
    text-decoration: none;
}

/* Le logo central ne reçoit pas l'animation de soulignement. */
.nav-links a.brand-desktop {
    background-image: none;
    padding-bottom: 0;
}

.brand-desktop img {
    width: 160px;
}

.site-main {
    /* overflow: clip (et non hidden) : hidden créerait un scroll container,
     * auquel se rattacherait animation-timeline: view() des sections — qui
     * ne défileraient alors plus. clip clippe sans scroll container. */
    overflow: clip;
}

.hero {
    position: relative;
    min-height: clamp(440px, 68vw, 760px);
    display: flex;
    align-items: flex-end;
    margin-bottom: 42px;
    background: var(--cream);
}

.hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    /* Dégradé cinématographique : translucide en haut, bleu profond opaque en bas. */
    background:
        radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 55%, rgba(12, 58, 80, 0.35) 100%),
        linear-gradient(180deg,
            rgba(12, 58, 80, 0.30) 0%,
            rgba(12, 58, 80, 0.45) 35%,
            rgba(10, 45, 62, 0.72) 70%,
            rgba(9, 38, 52, 0.94) 100%);
}

/* Vignette légère pour concentrer le regard. */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 62%, rgba(0, 0, 0, 0.28) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1160px, calc(100% - 36px));
    margin: 0 auto;
    padding: 0 0 clamp(42px, 8vw, 96px);
    color: var(--white);
    /* Animation d'entrée unique : fade-up. */
    animation: hero-fade-up 0.8s ease-out both;
}

@keyframes hero-fade-up {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.hero-content h1 {
    max-width: 760px;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

/* Kicker du hero d'accueil (fond sombre) : doré, lisible sur l'image. */
.hero-content .kicker {
    color: var(--gold);
}

.hero-intro {
    max-width: 720px;
    margin-top: 14px;
    color: var(--cream);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 8px;
}

.hero-actions .button {
    min-width: 0;
    margin-top: 20px;
}

.section {
    padding: clamp(44px, 7vw, 92px) 0;
}

/* Ancres : laisser passer l'en-tête collant. */
[id] {
    scroll-margin-top: 180px;
}

.section-soft {
    background: var(--cream);
}

.centered {
    text-align: center;
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
}

.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(28px, 6vw, 76px);
    align-items: center;
}

.split-reverse .image-col {
    order: 2;
}

.split-reverse .text-col {
    order: 1;
}

.image-frame {
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--cream);
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
}

.image-frame img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.image-frame:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-deep);
}

.image-frame:hover img {
    transform: scale(1.03);
}

/* Liseré doré supérieur, commun aux cartes au survol. */
.card,
.mini-card,
.image-frame {
    position: relative;
}

.card::after,
.mini-card::after,
.image-frame::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gold);
    opacity: 0;
    transition: opacity var(--transition);
    pointer-events: none;
}

.card:hover::after,
.mini-card:hover::after,
.image-frame:hover::after {
    opacity: 1;
}

.card {
    padding: clamp(28px, 5vw, 56px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-deep);
}

.kicker {
    display: inline-block;
    margin-bottom: 14px;
    font-size: 0.9em;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink);
}

.kicker::before {
    content: "";
    display: inline-block;
    width: 34px;
    height: 2px;
    margin-right: 12px;
    vertical-align: middle;
    background: var(--gold);
}

.button,
button.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: min(100%, 360px);
    min-height: 58px;
    margin-top: 20px;
    padding: 14px 32px;
    border: 1px solid var(--blue-deep);
    border-radius: var(--radius);
    background: linear-gradient(180deg, var(--blue), var(--blue-deep));
    color: var(--gold);
    font: inherit;
    line-height: 1.1;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
}

.button:hover,
.button:focus-visible,
button.button:hover,
button.button:focus-visible {
    color: var(--gold);
    text-decoration: none;
    filter: brightness(1.05);
    transform: translateY(-2px);
    box-shadow: 0 10px 26px var(--gold-soft);
}

.button:active,
button.button:active {
    transform: translateY(0);
}

/* Variante or : fond or, texte bleu. */
.button-gold {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--blue-deep);
}

.button-gold:hover,
.button-gold:focus-visible {
    background: #ffd23e;
    color: var(--blue-deep);
}

/* Variante fantôme : transparente, bordure bleue sur fond clair. */
.button-ghost {
    background: transparent;
    border-color: var(--blue);
    color: var(--blue);
}

.button-ghost:hover,
.button-ghost:focus-visible {
    color: var(--blue-deep);
    background: transparent;
    box-shadow: 0 10px 26px rgba(12, 58, 80, 0.15);
}

/* Sur fond sombre (hero), le fantôme passe en crème. */
.hero .button-ghost {
    border-color: var(--cream);
    color: var(--cream);
}

.hero .button-ghost:hover,
.hero .button-ghost:focus-visible {
    color: var(--white);
    border-color: var(--white);
    background: rgba(251, 247, 238, 0.08);
}

.page-hero {
    padding: clamp(60px, 10vw, 130px) 0 clamp(48px, 8vw, 86px);
    text-align: center;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
}

.page-hero p {
    max-width: 860px;
    margin: 0 auto;
}

.content-narrow {
    width: min(920px, calc(100% - 36px));
    margin: 0 auto;
}

.lead {
    font-family: var(--font-display);
    font-size: clamp(21px, 2.5vw, 30px);
    line-height: 1.25;
}

.statement {
    padding: clamp(30px, 6vw, 64px);
    border-left: 4px solid var(--gold);
    border-radius: var(--radius);
    background: var(--cream);
    box-shadow: var(--shadow);
}

.statement p:first-child {
    font-style: italic;
}

.grid-2,
.grid-4 {
    display: grid;
    gap: 22px;
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mini-card {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 10px 26px rgba(12, 58, 80, 0.07);
    transition: transform var(--transition), box-shadow var(--transition);
}

.mini-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-deep);
}

/* Chiffres d'étape (01–04) : grand serif or, trait fin dessous. */
.step-num {
    display: block;
    margin-bottom: 10px;
    padding-bottom: 10px;
    font-family: var(--font-display);
    font-size: clamp(33px, 3.8vw, 48px);
    font-weight: 500;
    line-height: 0.8;
    color: var(--gold);
}

.step-num::after {
    content: "";
    display: block;
    width: 34px;
    height: 2px;
    margin-top: 12px;
    background: var(--gold-soft);
}

.mini-card h3 {
    font-size: clamp(23px, 2.5vw, 31px);
}

.legal-section {
    padding: 34px 0;
    border-bottom: 1px solid var(--line);
}

.legal-section h2 {
    font-size: clamp(28px, 3.4vw, 43px);
}

.legal-block {
    margin-bottom: 28px;
}

.legal-block h3 {
    font-size: clamp(21px, 2.5vw, 30px);
    margin-bottom: 8px;
}

.newsletter-box {
    max-width: 760px;
    margin: 0 auto;
    padding: clamp(30px, 6vw, 60px);
    border: 1px solid var(--blue);
    border-top: 4px solid var(--gold);
    border-radius: var(--radius);
    text-align: center;
    background: var(--white);
    box-shadow: var(--shadow);
    position: relative;
}

.form-grid {
    display: grid;
    gap: 16px;
    margin-top: 26px;
}

.form-control {
    width: 100%;
    min-height: 58px;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--blue);
    font: inherit;
    background: var(--white);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus,
.form-control:focus-visible {
    border-color: var(--blue-deep);
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 72, 97, 0.18);
}

.checkbox-row input {
    accent-color: var(--gold);
}

.checkbox-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    text-align: left;
    font-size: 0.88em;
}

.checkbox-row input {
    margin-top: 0.45em;
}

/* Statut du formulaire après redirection (newsletter.php?status=…). */
.form-status {
    max-width: 760px;
    margin: 0 auto 18px;
    padding: 14px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 6px 18px rgba(12, 58, 80, 0.08);
    text-align: center;
    font-size: clamp(16px, 1.5vw, 18px);
}

.form-status.success {
    border-color: #2f6b45;
    color: #2f6b45;
    background: #f2f7f2;
}

.form-status.error {
    border-color: #8c2f2f;
    color: #8c2f2f;
    background: #faf1f1;
}

/* Honeypot : hors écran et hors lecture vocale, jamais tabulable. */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.hp-input {
    border: 0;
    padding: 0;
}

.footer-claim {
    font-family: var(--font-display);
    font-size: clamp(22px, 2.7vw, 33px);
    font-weight: 500;
    font-style: italic;
    line-height: 1.15;
    margin-bottom: 0;
}

.footer-claim::first-line {
    color: var(--gold);
}

.footer-claim::before {
    content: "";
    display: block;
    width: 34px;
    height: 2px;
    margin: 0 auto 16px;
    background: var(--gold);
}

.site-footer {
    padding: 56px 0 28px;
    border-top: 4px solid var(--gold);
    background: linear-gradient(180deg, var(--blue-deep), var(--blue));
    color: var(--cream);
}

.site-footer a,
.site-footer p,
.site-footer span,
.site-footer strong {
    color: var(--cream);
}

.site-footer a {
    transition: color var(--transition), background-size var(--transition);
}

.site-footer a:hover,
.site-footer a:focus-visible {
    color: var(--gold);
    text-decoration: none;
    /* Soulignement doré animé, cohérent avec la navigation. */
    background-image: linear-gradient(90deg, var(--gold), var(--gold));
    background-repeat: no-repeat;
    background-position: left bottom;
    background-size: 100% 2px;
    padding-bottom: 3px;
}

.site-footer h3 {
    color: var(--gold);
}

.site-footer hr {
    border-top-color: rgba(251, 247, 238, 0.25);
}

/* Logo sur fond bleu profond : halo crème pour la lisibilité. */
.site-footer img {
    filter: drop-shadow(0 0 12px rgba(251, 247, 238, 0.55));
}

.footer-logo-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 24px;
    align-items: center;
    margin-bottom: 24px;
}

.footer-logo-row img {
    width: 140px;
}

.footer-intro,
.footer-endline {
    text-align: center;
    max-width: 840px;
    margin: 0 auto 34px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px;
    margin: 34px 0;
}

.footer-grid h3 {
    font-size: 23px;
    margin-bottom: 10px;
}

.footer-grid a,
.footer-grid span {
    display: block;
    margin: 5px 0;
}

.copyright {
    margin-top: 22px;
    font-size: 0.86em;
    color: rgba(251, 247, 238, 0.75);
}

/* Révélation au défilement : CSS scroll-driven (aucun JavaScript).
 * Sans support navigateur ou si le visiteur refuse les animations,
 * le contenu s'affiche intégralement, sans transformation. */
@supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
        .section,
        .mini-card,
        .card,
        .statement,
        .image-frame {
            animation: reveal 1ms linear both;
            animation-timeline: view();
            animation-range: entry 0% entry 15%;
        }

        @keyframes reveal {
            from {
                opacity: 0;
                transform: translateY(20px);
            }

            to {
                opacity: 1;
                transform: none;
            }
        }
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .hero-content {
        animation: none;
    }

    .image-frame img,
    .card,
    .mini-card,
    .image-frame,
    .button,
    button.button,
    .nav-links a,
    .nav-burger-bar,
    .form-control,
    .site-footer a {
        transition: none;
    }

    .card:hover,
    .mini-card:hover,
    .image-frame:hover,
    .button:hover,
    .button:focus-visible,
    button.button:hover,
    button.button:focus-visible {
        transform: none;
    }

    .image-frame:hover img {
        transform: none;
    }
}

@media (max-width: 900px) {
    [id] {
        scroll-margin-top: 130px;
    }

    .site-nav {
        min-height: 108px;
        justify-content: space-between;
    }

    .brand-mobile {
        display: block;
    }

    .brand-mobile img {
        width: 105px;
    }

    .nav-toggle {
        display: inline-flex;
        width: 58px;
        height: 58px;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 7px;
        border: 1px solid var(--blue);
        cursor: pointer;
        user-select: none;
        background: none;
        padding: 0;
    }

    .nav-burger-bar {
        display: block;
        width: 28px;
        height: 3px;
        background: var(--blue);
        border-radius: 0;
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .site-nav.open .nav-burger-bar:nth-child(1) {
        transform: translateY(10px) rotate(45deg);
    }

    .site-nav.open .nav-burger-bar:nth-child(2) {
        opacity: 0;
    }

    .site-nav.open .nav-burger-bar:nth-child(3) {
        transform: translateY(-10px) rotate(-45deg);
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        grid-template-columns: 1fr;
        gap: 0;
        padding: 14px 0 22px;
        border-top: 1px solid var(--line);
        border-bottom: 1px solid var(--line);
        background: var(--white);
    }

    .nav-links a {
        width: 100%;
        padding: 12px 0;
        text-align: center;
    }

    .brand-desktop {
        display: none;
    }

    .site-nav.open .nav-links {
        display: grid;
    }

    .split,
    .grid-2,
    .grid-4,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .split-reverse .image-col,
    .split-reverse .text-col {
        order: initial;
    }

    .footer-logo-row {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .footer-logo-row hr {
        display: none;
    }

    .hero {
        min-height: 520px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-actions .button {
        margin-top: 0;
    }
}

@media (max-width: 560px) {
    .container,
    .content-narrow,
    .hero-content {
        width: min(100% - 28px, 1160px);
    }

    .section {
        padding: 42px 0;
    }

    .card,
    .mini-card,
    .newsletter-box {
        padding: 24px;
    }

    .button,
    button.button {
        width: 100%;
    }

    .hero-actions .button {
        margin-top: 0;
    }
}
