/* ==========================================================
   FLAG — Feuille de styles
   Palette tirée du logo : cuivre, brun, crème
   ========================================================== */

:root {
    --cuivre-900: #3b1a08;
    --cuivre-800: #5a260b;
    --cuivre-700: #7a3a12;
    --cuivre-600: #9a4a16;
    --cuivre-500: #b8683a;
    --cuivre-300: #e0b08c;
    --cuivre-100: #f6e8dd;
    --creme: #fbf6f1;
    --blanc: #ffffff;
    --texte: #2b1a12;
    --texte-doux: #6b4a38;
    --bordure: #e6d5c8;
    --erreur: #b3261e;
    --succes: #2e7d32;
    --rayon: 10px;
    --ombre: 0 6px 24px rgba(90, 38, 11, .08);
    --police: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --largeur: 1140px;
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--police);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--texte);
    background: var(--blanc);
    -webkit-font-smoothing: antialiased;
}

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

a { color: var(--cuivre-700); text-underline-offset: 3px; }
a:hover { color: var(--cuivre-500); }

h1, h2, h3 { line-height: 1.2; color: var(--cuivre-900); margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

:focus-visible { outline: 3px solid var(--cuivre-500); outline-offset: 2px; border-radius: 4px; }

.conteneur { width: min(100% - 32px, var(--largeur)); margin-inline: auto; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.evitement {
    position: absolute; left: 16px; top: -60px; z-index: 100;
    background: var(--cuivre-700); color: #fff; padding: 10px 16px; border-radius: 6px;
}
.evitement:focus { top: 12px; color: #fff; }

/* ---------- Boutons ---------- */
.bouton {
    display: inline-flex; align-items: center; justify-content: center; gap: .5em;
    padding: .8em 1.5em;
    background: linear-gradient(180deg, var(--cuivre-600), var(--cuivre-700));
    color: #fff; font-weight: 600; font-size: 1rem; text-decoration: none;
    border: 2px solid var(--cuivre-700); border-radius: 999px; cursor: pointer;
    transition: transform .15s, box-shadow .15s, background .15s;
    box-shadow: 0 4px 14px rgba(122, 58, 18, .25);
}
.bouton:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(122, 58, 18, .3); }
.bouton--contour { background: transparent; color: var(--cuivre-700); box-shadow: none; }
.bouton--contour:hover { background: var(--cuivre-100); color: var(--cuivre-800); box-shadow: none; }
.bouton--petit { padding: .5em 1.1em; font-size: .95rem; }
.bouton--grand { padding: 1em 2em; font-size: 1.05rem; }
.bouton--plein-largeur { width: 100%; }

/* ---------- En-tête ---------- */
.entete {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--bordure);
}
.entete__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 84px; }

.marque { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--texte); }
.marque img { width: 150px; }
.marque__texte { display: flex; flex-direction: column; line-height: 1.25; font-size: .82rem; color: var(--texte-doux); }
.marque__texte strong { color: var(--cuivre-900); font-size: .9rem; }

.nav { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.nav a:not(.bouton) {
    padding: .5em .85em; border-radius: 8px; text-decoration: none;
    color: var(--texte); font-weight: 500;
}
.nav a:not(.bouton):hover { background: var(--cuivre-100); color: var(--cuivre-800); }
.nav a.actif:not(.bouton) { color: var(--cuivre-700); background: var(--cuivre-100); }
.nav .bouton { margin-left: 8px; }

.menu-bouton {
    display: none; width: 46px; height: 46px; border: 1px solid var(--bordure);
    background: #fff; border-radius: 10px; cursor: pointer; position: relative;
}
.menu-bouton__barres, .menu-bouton__barres::before, .menu-bouton__barres::after {
    position: absolute; left: 12px; width: 20px; height: 2px; background: var(--cuivre-800);
    content: ""; transition: transform .2s, opacity .2s;
}
.menu-bouton__barres { top: 22px; }
.menu-bouton__barres::before { top: -6px; left: 0; }
.menu-bouton__barres::after { top: 6px; left: 0; }
.menu-bouton[aria-expanded="true"] .menu-bouton__barres { background: transparent; }
.menu-bouton[aria-expanded="true"] .menu-bouton__barres::before { transform: translateY(6px) rotate(45deg); }
.menu-bouton[aria-expanded="true"] .menu-bouton__barres::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1180px) {
    .marque__texte { display: none; }
}
@media (max-width: 820px) {
    .menu-bouton { display: block; }
    .nav {
        position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 2px;
        background: #fff; padding: 12px 16px 20px; border-bottom: 1px solid var(--bordure);
        box-shadow: var(--ombre); display: none;
    }
    .nav.ouvert { display: flex; }
    .nav a:not(.bouton) { padding: .8em 1em; }
    .nav .bouton { margin: 8px 0 0; }
    .marque img { width: 120px; }
}

/* ---------- Hero ---------- */
.hero {
    background:
        radial-gradient(900px 400px at 85% 20%, rgba(224, 176, 140, .35), transparent 60%),
        linear-gradient(180deg, var(--creme), #fff);
    padding: clamp(48px, 8vw, 96px) 0;
}
.hero__grille { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero__visuel img { width: 100%; max-width: 520px; margin-inline: auto; filter: drop-shadow(0 10px 24px rgba(90, 38, 11, .12)); }
.surtitre {
    display: inline-block; margin-bottom: 1em; padding: .3em .9em;
    background: var(--cuivre-100); color: var(--cuivre-700); border-radius: 999px;
    font-size: .85rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
}
.chapeau { font-size: 1.15rem; color: var(--texte-doux); max-width: 60ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

@media (max-width: 820px) {
    .hero__grille { grid-template-columns: 1fr; }
    .hero__visuel { order: -1; }
    .hero__visuel img { max-width: 360px; }
}

/* ---------- Bandeau de page ---------- */
.bandeau {
    background: linear-gradient(135deg, var(--cuivre-800), var(--cuivre-600));
    color: #fff; padding: clamp(40px, 6vw, 72px) 0;
    position: relative; overflow: hidden;
}
.bandeau::after {
    content: ""; position: absolute; right: -60px; top: -40px; width: 320px; height: 320px;
    background: linear-gradient(160deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, 0));
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.bandeau h1 { color: #fff; }
.bandeau .chapeau { color: rgba(255, 255, 255, .88); }
.bandeau .surtitre { background: rgba(255, 255, 255, .15); color: #fff; }

/* ---------- Sections ---------- */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section--teinte { background: var(--creme); }
.titre-section { text-align: center; margin-bottom: 1.4em; }
.titre-section::after {
    content: ""; display: block; width: 0; height: 0; margin: 14px auto 0;
    border-left: 10px solid transparent; border-right: 10px solid transparent;
    border-top: 12px solid var(--cuivre-500);
}
.titre-section--gauche { text-align: left; }
.titre-section--gauche::after { margin-left: 0; }

/* Chiffres */
.bande-chiffres { background: var(--cuivre-900); color: #fff; }
.chiffres { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; padding: 28px 0; }
.chiffres div { padding: 8px; border-right: 1px solid rgba(255, 255, 255, .12); }
.chiffres div:last-child { border-right: 0; }
.chiffres strong { display: block; font-size: 1.9rem; color: var(--cuivre-300); }
.chiffres span { font-size: .9rem; opacity: .85; }
@media (max-width: 700px) {
    .chiffres { grid-template-columns: repeat(2, 1fr); gap: 12px 0; }
    .chiffres div:nth-child(2) { border-right: 0; }
}

/* Cartes */
.cartes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cartes--4 { grid-template-columns: repeat(4, 1fr); }
.carte {
    background: #fff; border: 1px solid var(--bordure); border-radius: var(--rayon);
    padding: 28px; box-shadow: var(--ombre);
}
.carte p { color: var(--texte-doux); margin: 0; }
.carte--simple { border-top: 4px solid var(--cuivre-500); }
.carte__icone {
    width: 52px; height: 52px; border-radius: 12px; margin-bottom: 16px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--cuivre-100), var(--cuivre-300));
}
.carte__icone svg { width: 26px; height: 26px; fill: var(--cuivre-700); }
@media (max-width: 900px) {
    .cartes, .cartes--4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .cartes, .cartes--4 { grid-template-columns: 1fr; }
}

/* Deux colonnes / prix */
.deux-colonnes { display: grid; grid-template-columns: 1.3fr .9fr; gap: 48px; align-items: center; }
@media (max-width: 820px) { .deux-colonnes { grid-template-columns: 1fr; } }

.liste-coches { list-style: none; padding: 0; margin: 1em 0 0; }
.liste-coches li { position: relative; padding-left: 32px; margin-bottom: .6em; }
.liste-coches li::before {
    content: ""; position: absolute; left: 0; top: .35em; width: 18px; height: 18px; border-radius: 50%;
    background: var(--cuivre-500) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='3.5' d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/12px no-repeat;
}

.encart-prix {
    background: #fff; border-radius: 16px; padding: 32px; text-align: center;
    border: 1px solid var(--bordure); box-shadow: 0 14px 40px rgba(90, 38, 11, .12);
}
.encart-prix__label { text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; color: var(--texte-doux); margin: 0; }
.encart-prix__montant { font-size: 3.4rem; font-weight: 800; color: var(--cuivre-700); margin: 0; line-height: 1.2; }
.encart-prix__detail { color: var(--texte-doux); }
.note { font-size: .85rem; color: var(--texte-doux); margin-top: 12px; }

/* Appel à l'action */
.appel {
    display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
    background: linear-gradient(135deg, var(--cuivre-100), #fff);
    border: 1px solid var(--bordure); border-radius: 16px; padding: 32px 40px;
}
.appel h2 { margin-bottom: .3em; }
.appel p { margin: 0; color: var(--texte-doux); }

/* Texte long */
.texte-long { max-width: 780px; }
.texte-long h2 { margin-top: 1.6em; }
.texte-long h2:first-child { margin-top: 0; }
.texte-long h3 { margin-top: 1.2em; color: var(--cuivre-700); }

/* Engagements */
.engagements { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 40px; }
.engagements article { padding: 24px 0 24px 0; border-top: 2px solid var(--bordure); }
.engagements__num { font-size: .9rem; font-weight: 800; color: var(--cuivre-500); letter-spacing: .1em; }
.engagements h2 { font-size: 1.35rem; margin: .3em 0 .5em; }
.engagements p { color: var(--texte-doux); margin: 0; }
@media (max-width: 700px) { .engagements { grid-template-columns: 1fr; } }

/* ---------- Formulaires ---------- */
.formulaire-grille { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
@media (max-width: 960px) { .formulaire-grille { grid-template-columns: 1fr; } }

.formulaire fieldset {
    border: 1px solid var(--bordure); border-radius: var(--rayon);
    padding: 24px 28px 12px; margin: 0 0 24px; background: #fff;
}
.formulaire legend {
    font-weight: 700; font-size: 1.1rem; color: var(--cuivre-800);
    padding: 0 10px; margin-left: -10px;
}
.ligne { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.ligne--cp { grid-template-columns: 180px 1fr; }
@media (max-width: 600px) {
    .ligne, .ligne--cp { grid-template-columns: 1fr; }
    .formulaire fieldset { padding: 20px 16px 8px; }
}

.champ { margin-bottom: 18px; }
.champ label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .95rem; }
.requis { color: var(--erreur); }
.facultatif { font-weight: 400; color: var(--texte-doux); font-size: .88em; }

input[type="text"], input[type="email"], input[type="tel"], input[type="date"],
input[type="number"], select, textarea {
    width: 100%; padding: .75em .9em; font: inherit; font-size: 1rem; color: var(--texte);
    background: var(--creme); border: 1.5px solid var(--bordure); border-radius: 8px;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
textarea { resize: vertical; min-height: 160px; }
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--cuivre-500); background: #fff;
    box-shadow: 0 0 0 4px rgba(184, 104, 58, .18);
}
[aria-invalid="true"] { border-color: var(--erreur) !important; background: #fff6f5; }
.champ__erreur { color: var(--erreur); font-size: .88rem; margin: 6px 0 0; font-weight: 500; }
.champ__erreur::before { content: "⚠ "; }

.compteur { text-align: right; font-size: .8rem; color: var(--texte-doux); margin: 4px 0 0; }

.choix-groupe { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.choix-groupe--compact { grid-template-columns: repeat(2, 140px); }
@media (max-width: 600px) { .choix-groupe { grid-template-columns: 1fr; } }
.choix-carte {
    position: relative; display: flex; align-items: center; gap: 10px;
    padding: 14px 16px; border: 1.5px solid var(--bordure); border-radius: 10px;
    background: var(--creme); cursor: pointer; font-weight: 500; transition: .15s;
}
.choix-carte:hover { border-color: var(--cuivre-300); }
.choix-carte input { accent-color: var(--cuivre-700); width: 18px; height: 18px; margin: 0; }
.choix-carte:has(input:checked) { border-color: var(--cuivre-600); background: var(--cuivre-100); color: var(--cuivre-900); }

.info-cotisation { background: var(--cuivre-100); border-radius: 8px; padding: 14px 16px; }

.rib { background: var(--creme); border: 1px dashed var(--cuivre-300); border-radius: 10px; padding: 16px 18px; margin-bottom: 18px; }
.rib p:last-child { margin-bottom: 0; }
.rib dl { display: grid; grid-template-columns: 90px 1fr; gap: 4px 12px; margin: 0; }
.rib dt { color: var(--texte-doux); }
.rib dd { margin: 0; font-weight: 600; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .03em; }

.saisie-euro { display: flex; align-items: center; gap: 8px; max-width: 200px; }
.saisie-euro span { font-weight: 700; color: var(--cuivre-700); }

.total {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px;
    padding: 16px 18px; margin-bottom: 16px; border-radius: 10px;
    background: linear-gradient(135deg, var(--cuivre-800), var(--cuivre-600)); color: #fff;
}
.total strong { font-size: 1.4rem; }
.total__net { font-size: .9rem; opacity: .85; }

.case { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; cursor: pointer; font-size: .95rem; }
.case input { accent-color: var(--cuivre-700); width: 20px; height: 20px; margin-top: 3px; flex-shrink: 0; }

.piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alerte { padding: 14px 18px; border-radius: 10px; margin-bottom: 20px; font-weight: 500; }
.alerte--erreur { background: #fdecea; color: var(--erreur); border: 1px solid #f5c2bd; }

/* Encarts latéraux */
.aside-info { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 104px; }
@media (max-width: 960px) { .aside-info { position: static; } }
.encart { background: var(--creme); border: 1px solid var(--bordure); border-radius: var(--rayon); padding: 22px; font-size: .95rem; }
.encart h2 { font-size: 1.15rem; color: var(--cuivre-700); }
.encart p:last-child { margin-bottom: 0; }
.encart address { font-style: normal; }
.encart--sombre { background: var(--cuivre-900); color: #f3e3d7; border-color: var(--cuivre-900); }
.encart--sombre h2 { color: var(--cuivre-300); }
.encart__attention { background: #fff; border-left: 4px solid var(--cuivre-500); padding: 10px 12px; border-radius: 0 6px 6px 0; }

/* Confirmation */
.confirmation {
    grid-column: 1; text-align: center; background: #fff; border: 1px solid var(--bordure);
    border-radius: 16px; padding: 48px 32px; box-shadow: var(--ombre);
}
.confirmation__icone {
    width: 72px; height: 72px; margin: 0 auto 20px; border-radius: 50%;
    display: grid; place-items: center; font-size: 2.2rem; color: #fff;
    background: linear-gradient(135deg, var(--cuivre-500), var(--cuivre-700));
}
.encadre { text-align: left; background: var(--creme); border-radius: 10px; padding: 20px 24px; margin: 24px auto; max-width: 560px; }

/* ---------- Pied de page ---------- */
.pied { background: var(--cuivre-900); color: #e9d6c8; margin-top: 0; font-size: .95rem; }
.pied__grille { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; padding: 56px 0 40px; }
.pied__logo { width: 140px; margin-bottom: 16px; background: #fff; border-radius: 10px; padding: 8px 10px; }
.pied h2 { font-size: 1rem; color: var(--cuivre-300); text-transform: uppercase; letter-spacing: .08em; }
.pied a { color: #fff; }
.pied a:hover { color: var(--cuivre-300); }
.pied address { font-style: normal; }
.pied__liens { list-style: none; margin: 0; padding: 0; }
.pied__liens li { margin-bottom: .5em; }
.pied__bas { border-top: 1px solid rgba(255, 255, 255, .1); padding: 18px 0; font-size: .85rem; opacity: .75; }
@media (max-width: 800px) { .pied__grille { grid-template-columns: 1fr; gap: 28px; } }

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; scroll-behavior: auto !important; }
}
