/* ============================================================================
   wp-methode - wedding planner
   Charte F « Archives et papier », TROISIÈME encre : vert sapin, valeur haute.
   Typographie : Bricolage Grotesque (titres) + IBM Plex Sans (corps).
   Aucune dépendance, aucun CDN.
   ========================================================================== */

:root {
  /* La dominante doit être visible AU-DESSUS DE LA LIGNE DE FLOTTAISON, sinon
     la table des dominantes de CHARTES.md ne sert à rien (leçon lux-riviera). */
  --papier:      #FBFBF8;
  --papier-2:    #F2F3EE;
  --trame:       #E2E5DC;
  --ink:         #171A13;
  --ink-doux:    #5C6356;
  --vert:        #1B7A4B;
  --vert-fonce:  #0E4B2E;
  --vert-pale:   #E4F1E9;
  --rayon:       2px;
  --large:       1180px;
  --gouttiere:   clamp(20px, 5vw, 56px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--papier);
  color: var(--ink);
  font-family: 'IBM Plex Sans', system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  /* La trame de quadrillage du papier, en fond de page : c'est le motif de la
     charte photo transposé à l'écran. Très pâle, presque subliminal. */
  background-image:
    linear-gradient(var(--trame) 1px, transparent 1px),
    linear-gradient(90deg, var(--trame) 1px, transparent 1px);
  background-size: 28px 28px, 28px 28px;
  background-position: -1px -1px, -1px -1px;
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(120% 90% at 50% 0%, transparent 40%, var(--papier) 100%);
}
main, header, footer { position: relative; z-index: 1; }

h1, h2, h3, h4 {
  font-family: 'Bricolage Grotesque', 'IBM Plex Sans', system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 6.2vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); }
h3 { font-size: 1.16rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
h4 { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }
p  { margin: 0 0 1em; }
a  { color: inherit; }
img { max-width: 100%; height: auto; display: block; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- 1. Rideau d'ouverture : une GRILLE qui se dessine --------------
   Variation propre à ce modèle. `mariage-jour-j` fait apparaître un monogramme ;
   ici les lignes du quadrillage se tracent, puis le rideau se lève. */
#rideau {
  position: fixed; inset: 0; z-index: 999; background: var(--papier);
  display: grid; place-items: center;
  transition: opacity .6s ease .15s, visibility 0s linear .75s;
}
#rideau .grille {
  width: min(58vw, 340px); aspect-ratio: 16 / 9;
  background-image:
    linear-gradient(var(--vert) 1.5px, transparent 1.5px),
    linear-gradient(90deg, var(--vert) 1.5px, transparent 1.5px);
  background-size: 100% 12.5%, 8.333% 100%;
  background-repeat: repeat;
  opacity: .28;
  /* les lignes se révèlent de gauche à droite puis de haut en bas */
  -webkit-mask-image: linear-gradient(90deg, #000 0 0), linear-gradient(#000 0 0);
  mask-image: linear-gradient(90deg, #000 0 0), linear-gradient(#000 0 0);
  -webkit-mask-size: 0% 100%, 100% 0%;
  mask-size: 0% 100%, 100% 0%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-composite: source-over; mask-composite: add;
  transition: -webkit-mask-size .62s cubic-bezier(.7,0,.2,1), mask-size .62s cubic-bezier(.7,0,.2,1);
}
#rideau .grille.on { -webkit-mask-size: 100% 100%, 100% 100%; mask-size: 100% 100%, 100% 100%; }
body.ouvert #rideau { opacity: 0; visibility: hidden; }

/* ---------- 2. Barre de progression et en-tête ---------------------------- */
#barre {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  background: var(--vert); z-index: 60;
}
#entete {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 22px;
  padding: 18px var(--gouttiere);
  background: color-mix(in srgb, var(--papier) 88%, transparent);
  backdrop-filter: blur(9px);
  border-bottom: 1px solid transparent;
  transition: padding .28s ease, border-color .28s ease;
}
#entete.reduite { padding-top: 9px; padding-bottom: 9px; border-bottom-color: var(--trame); }
.marque {
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800;
  font-size: 1.32rem; letter-spacing: -0.03em; text-decoration: none;
}
.marque::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 6px; background: var(--vert); vertical-align: 3px; }
.menu { display: none; gap: 20px; margin-left: auto; }
.menu a {
  font-size: .82rem; color: var(--ink-doux); text-decoration: none;
  padding-bottom: 2px; border-bottom: 1.5px solid transparent; cursor: pointer;
  transition: color .2s ease, border-color .2s ease;
}
.menu a:hover { color: var(--ink); }
.menu a[aria-current] { color: var(--vert-fonce); border-bottom-color: var(--vert); }
@media (min-width: 1080px) { .menu { display: flex; } #entete .bouton { margin-left: 0; } }

.bouton {
  display: inline-block; background: var(--vert); color: #fff;
  font-size: .88rem; font-weight: 600; text-decoration: none;
  padding: 11px 20px; border-radius: var(--rayon); border: 0; cursor: pointer;
  font-family: inherit; transition: background .2s ease, transform .2s ease;
}
.bouton:hover { background: var(--vert-fonce); transform: translateY(-1px); }
.bouton.gros { padding: 15px 28px; font-size: 1rem; }
#entete .bouton { margin-left: auto; display: none; }
@media (min-width: 700px) { #entete .bouton { display: inline-block; } }
.lien { color: var(--vert-fonce); font-weight: 500; text-decoration: none; border-bottom: 1.5px solid var(--vert); padding-bottom: 1px; cursor: pointer; }

/* menu mobile */
#burger { margin-left: auto; width: 40px; height: 34px; background: none; border: 0; display: grid; gap: 7px; align-content: center; cursor: pointer; }
#burger span { height: 1.5px; background: var(--ink); transition: transform .28s ease, opacity .28s ease; }
body.nav-ouverte #burger span:first-child { transform: translateY(4.2px) rotate(45deg); }
body.nav-ouverte #burger span:last-child  { transform: translateY(-4.2px) rotate(-45deg); }
@media (min-width: 1080px) { #burger { display: none; } }
#voile {
  position: fixed; inset: 0; z-index: 45; background: var(--papier);
  display: grid; align-content: center; gap: 6px; padding: 0 var(--gouttiere);
  opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility 0s linear .3s;
}
body.nav-ouverte #voile { opacity: 1; visibility: visible; transition-delay: 0s; }
#voile a { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: clamp(1.6rem, 7vw, 2.4rem); letter-spacing: -0.03em; text-decoration: none; padding: 5px 0; cursor: pointer; }

/* ---------- 3. Révélations ------------------------------------------------ */
.mot { display: inline-block; overflow: hidden; vertical-align: bottom; }
.mot > i { display: inline-block; font-style: inherit; transform: translateY(105%); transition: transform .72s cubic-bezier(.16,1,.3,1); transition-delay: var(--md, 0s); }
[data-split].is-in .mot > i { transform: translateY(0); }

[data-anim] { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s cubic-bezier(.16,1,.3,1); }
[data-anim].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .mot > i { transform: none; transition: none; }
  [data-anim] { opacity: 1; transform: none; transition: none; }
  #rideau { display: none; }
}

/* ---------- Mise en page générale ---------------------------------------- */
.bloc { max-width: var(--large); margin: 0 auto; padding: clamp(64px, 9vw, 120px) var(--gouttiere); }
.bloc.sombre {
  max-width: none; background: var(--vert-fonce); color: #EFF3EF;
  margin-block: clamp(48px, 7vw, 90px);
}
.bloc.sombre > * { max-width: var(--large); margin-inline: auto; }
.bloc.sombre .intro, .bloc.sombre .num { color: #A9C2B4; }
.bloc.sombre .carte { background: rgba(255,255,255,.055); border-color: rgba(255,255,255,.14); }
.bloc.sombre .carte h3 { color: #fff; }

.entete-bloc { max-width: 760px; margin-bottom: clamp(34px, 5vw, 56px); }
.num { font-size: .78rem; font-weight: 600; letter-spacing: .16em; color: var(--vert); margin: 0 0 14px; }
.intro { color: var(--ink-doux); font-size: 1.06rem; margin-top: 18px; }
.sous { font-size: 1.5rem; margin: clamp(44px,6vw,72px) 0 26px; }

/* ---------- 1. Hero ------------------------------------------------------- */
.hero { max-width: var(--large); margin: 0 auto; padding: clamp(34px, 6vw, 72px) var(--gouttiere) clamp(40px, 6vw, 80px); }
.hero-txt { max-width: 800px; }
.sur { font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--vert); margin-bottom: 20px; }
.chapo { font-size: clamp(1.02rem, 1.8vw, 1.2rem); color: var(--ink-doux); max-width: 62ch; margin-top: 26px; }
.chiffres { font-size: .95rem; color: var(--ink-doux); padding-top: 14px; border-top: 1px solid var(--trame); display: inline-block; }
.chiffres b { color: var(--ink); font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 26px; margin-top: 12px; }
.hero-img { margin: clamp(36px, 5vw, 60px) 0 0; overflow: hidden; border: 1px solid var(--trame); border-radius: var(--rayon); }
.hero-img img { width: 100%; }

/* ---------- 2. Tableau des formules --------------------------------------- */
.tableau-enrob { overflow-x: auto; border: 1px solid var(--trame); border-radius: var(--rayon); background: #fff; }
table.formules { border-collapse: collapse; width: 100%; min-width: 720px; font-size: .93rem; }
table.formules th, table.formules td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--trame); vertical-align: top; }
table.formules thead th { background: var(--papier-2); font-family: 'Bricolage Grotesque', sans-serif; font-weight: 600; font-size: .98rem; letter-spacing: -0.01em; position: sticky; top: 0; }
table.formules thead th span { display: block; font-weight: 400; font-size: .84rem; color: var(--ink-doux); }
table.formules tbody th { font-weight: 400; color: var(--ink); }
table.formules td { text-align: center; width: 17%; }
table.formules .oui  { color: var(--vert); font-weight: 600; }
table.formules .non  { color: #A9AFA4; }
table.formules .part { color: var(--ink-doux); font-size: .84rem; }
table.formules .txt  { font-size: .84rem; color: var(--ink-doux); }
table.formules tfoot th, table.formules tfoot td { background: var(--vert-pale); border-bottom: 0; font-size: .86rem; }
table.formules tfoot th { font-weight: 600; }
.apartir { margin-top: 26px; font-size: 1.02rem; }
.apartir b { color: var(--vert-fonce); font-weight: 600; }
.cta-inline { margin-top: 34px; }

/* ---------- 3. Le test de date -------------------------------------------- */
.test { display: grid; gap: 30px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.15); border-radius: var(--rayon); padding: clamp(22px, 4vw, 38px); }
@media (min-width: 860px) { .test { grid-template-columns: 320px 1fr; gap: 44px; } }
.test-saisie label { display: block; font-size: .86rem; font-weight: 600; margin-bottom: 10px; }
.test-saisie input {
  width: 100%; padding: 13px 15px; font: inherit; color: #fff;
  background: rgba(0,0,0,.22); border: 1px solid rgba(255,255,255,.28);
  border-radius: var(--rayon); cursor: pointer;
}
.test-saisie input::-webkit-calendar-picker-indicator { filter: invert(1); cursor: pointer; }
.aide { font-size: .8rem; color: #A9C2B4; margin-top: 10px; }
.reste { font-size: 1.12rem; margin-bottom: 20px; }
.reste b { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 1.5rem; color: #fff; }
.reste b.bat { animation: bat .45s ease; }
@keyframes bat { 0% { transform: translateY(-3px); opacity: .5; } 100% { transform: none; opacity: 1; } }
.verdict { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 10px; }
.verdict li { display: flex; align-items: center; gap: 12px; font-size: .95rem; padding: 11px 14px; background: rgba(0,0,0,.16); border-radius: var(--rayon); }
.verdict li b { font-weight: 600; }
.verdict li i { font-style: normal; margin-left: auto; font-size: .84rem; color: #A9C2B4; text-align: right; }
.pastille { width: 9px; height: 9px; flex: 0 0 9px; background: #6E7A70; border-radius: 50%; }
.verdict li.ok .pastille  { background: #5BD69B; }
.verdict li.non .pastille { background: #C6705E; }
.verdict li.non { opacity: .55; }
.conseil { font-size: .95rem; color: #CFE0D5; border-left: 2px solid var(--vert); padding-left: 14px; margin: 0; }

/* ---------- 4. Documents et frise ----------------------------------------- */
.docs { display: grid; gap: 20px; }
@media (min-width: 780px) { .docs { grid-template-columns: repeat(3, 1fr); } }
.doc { margin: 0; cursor: pointer; }
.doc img { border: 1px solid var(--trame); border-radius: var(--rayon); transition: transform .35s cubic-bezier(.16,1,.3,1); }
.doc:hover img { transform: translateY(-4px); }
.doc figcaption { font-size: .88rem; color: var(--ink-doux); margin-top: 14px; }
.doc figcaption b { display: block; color: var(--ink); font-weight: 600; font-size: .98rem; margin-bottom: 4px; font-family: 'Bricolage Grotesque', sans-serif; letter-spacing: -0.01em; }

.frise-enrob { margin-top: 10px; }
.frise { list-style: none; margin: 0; padding: 0 0 0 40px; position: relative; }
.frise .rail { position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px; background: var(--trame); }
.frise .rail i { display: block; width: 100%; height: 0; background: var(--vert); transition: height .18s linear; }
.etape { position: relative; padding: 0 0 34px; opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s cubic-bezier(.16,1,.3,1); }
.etape.is-in { opacity: 1; transform: none; }
.etape::before { content: ""; position: absolute; left: -34px; top: 7px; width: 10px; height: 10px; background: var(--papier); border: 2px solid var(--trame); border-radius: 50%; transition: border-color .3s ease, background .3s ease; }
.etape.is-in::before { border-color: var(--vert); }
.etape.jour-j::before { background: var(--vert); border-color: var(--vert); }
.quand { font-size: .76rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--vert); margin: 0 0 5px; }
.etape h4 { margin-bottom: 5px; }
.etape p:last-child { color: var(--ink-doux); font-size: .94rem; margin: 0; max-width: 62ch; }
@media (prefers-reduced-motion: reduce) { .etape { opacity: 1; transform: none; } }

/* ---------- Cartes, listes, illustrations --------------------------------- */
.deux, .trois { display: grid; gap: 20px; }
@media (min-width: 780px) { .deux { grid-template-columns: 1fr 1fr; } .trois { grid-template-columns: repeat(3, 1fr); } }
.carte { background: #fff; border: 1px solid var(--trame); border-radius: var(--rayon); padding: clamp(20px, 3vw, 28px); }
.carte h3 { margin-bottom: 12px; }
.carte ul { margin: 0; padding-left: 18px; }
.carte li { margin-bottom: 8px; font-size: .95rem; }
.carte p { font-size: .95rem; }
.carte p:last-child { margin-bottom: 0; }
.carte.vert { background: var(--vert-pale); border-color: #C6DFD1; }
.carte .note { font-size: .86rem; color: var(--vert-fonce); margin-top: 14px; padding-top: 12px; border-top: 1px solid #C6DFD1; }
.cas .meta { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--vert); margin-bottom: 10px; }
.cas h3 { margin-bottom: 14px; }
.cas p b { font-weight: 600; }
.cas-liste { margin-bottom: 26px; }

blockquote.carte { margin: 0; }
blockquote.carte p { font-size: 1rem; }
blockquote.carte footer { font-size: .84rem; color: #A9C2B4; margin-top: 14px; }
blockquote.carte footer span { color: var(--vert); text-transform: uppercase; letter-spacing: .08em; font-size: .74rem; }

.illus { margin: clamp(30px, 4vw, 46px) 0 0; }
.illus img { border: 1px solid var(--trame); border-radius: var(--rayon); }
.bloc.sombre .illus img { border-color: rgba(255,255,255,.16); }
.illus figcaption { font-size: .88rem; color: var(--ink-doux); margin-top: 12px; max-width: 70ch; }
.bloc.sombre .illus figcaption { color: #A9C2B4; }
.illus figcaption b { color: var(--ink); font-weight: 600; }
.illus.large img { width: 100%; }

.zone-grille { display: grid; gap: 26px; }
@media (min-width: 860px) { .zone-grille { grid-template-columns: 1fr 1fr; align-items: start; } .zone-grille .illus { margin-top: 0; } }
.liste-zone { list-style: none; margin: 0; padding: 0; }
.liste-zone li { padding: 15px 0; border-bottom: 1px solid var(--trame); font-size: .97rem; }
.liste-zone b { font-weight: 600; }

/* ---------- 12. Formulaire ------------------------------------------------ */
.appel-grille { display: grid; gap: 34px; }
@media (min-width: 900px) { .appel-grille { grid-template-columns: 1.15fr .85fr; gap: 52px; align-items: start; } }
#form { display: grid; gap: 18px; }
.champ label { display: block; font-size: .86rem; font-weight: 600; margin-bottom: 7px; }
.champ label span { font-weight: 400; color: var(--ink-doux); }
.champ input, .champ select, .champ textarea {
  width: 100%; padding: 12px 14px; font: inherit; color: var(--ink);
  background: #fff; border: 1px solid var(--trame); border-radius: var(--rayon);
}
.champ select, .champ input[type="date"] { cursor: pointer; }
.champ input:focus, .champ select:focus, .champ textarea:focus { outline: 2px solid var(--vert); outline-offset: 1px; border-color: var(--vert); }
.champ textarea { resize: vertical; }
#form .bouton { justify-self: start; }
.rassure { list-style: none; margin: 24px 0 0; padding: 0; }
.rassure li { font-size: .92rem; color: var(--ink-doux); padding: 10px 0 10px 22px; position: relative; border-bottom: 1px solid var(--trame); }
.rassure li::before { content: ""; position: absolute; left: 0; top: 18px; width: 9px; height: 2px; background: var(--vert); }
.manque { margin-top: 22px; padding: 16px 18px; background: var(--vert-pale); border-left: 2px solid var(--vert); font-size: .89rem; color: var(--vert-fonce); }
.manque b { display: block; font-weight: 600; margin-bottom: 4px; }
.merci { margin-top: 30px; padding: 18px 22px; background: var(--vert-pale); border-left: 2px solid var(--vert); font-weight: 500; opacity: 0; transform: translateY(10px); transition: opacity .45s ease, transform .45s ease; }
.merci.on { opacity: 1; transform: none; }

/* ---------- 13. FAQ ------------------------------------------------------- */
.faq { border-top: 1px solid var(--trame); }
.info { border-bottom: 1px solid var(--trame); }
.info summary {
  list-style: none; cursor: pointer; padding: 18px 34px 18px 0; position: relative;
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 600; font-size: 1.02rem; letter-spacing: -0.01em;
}
.info summary::-webkit-details-marker { display: none; }
.info summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 11px; height: 11px; margin-top: -8px; border-right: 1.5px solid var(--vert); border-bottom: 1.5px solid var(--vert); transform: rotate(45deg); transition: transform .28s ease; }
.info[open] summary::after { transform: rotate(-135deg); margin-top: -3px; }
.info p { color: var(--ink-doux); font-size: .96rem; padding-bottom: 20px; margin: 0; max-width: 74ch; }

/* ---------- Pied ---------------------------------------------------------- */
.pied { border-top: 1px solid var(--trame); padding: 44px var(--gouttiere); max-width: var(--large); margin: 0 auto; display: grid; gap: 18px; }
@media (min-width: 780px) { .pied { grid-template-columns: 1fr auto; align-items: end; } }
.pied .marque { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 1.2rem; margin-bottom: 4px; }
.pied p { font-size: .88rem; color: var(--ink-doux); margin: 0; }
.mentions { font-size: .8rem !important; }

/* ---------- Lightbox ------------------------------------------------------ */
#lb { position: fixed; inset: 0; z-index: 200; background: rgba(20,24,19,.94); display: none; place-items: center; padding: clamp(16px, 5vw, 60px); }
#lb.on { display: grid; }
#lb img { max-width: 100%; max-height: 82vh; object-fit: contain; border-radius: var(--rayon); }
#lb button { position: absolute; background: rgba(255,255,255,.1); color: #fff; border: 0; width: 46px; height: 46px; border-radius: 50%; font-size: 1.3rem; cursor: pointer; transition: background .2s ease; }
#lb button:hover { background: rgba(255,255,255,.22); }
#lb-fermer { top: 20px; right: 20px; }
#lb-prec { left: 16px; top: 50%; margin-top: -23px; }
#lb-suiv { right: 16px; top: 50%; margin-top: -23px; }
#lb-compte { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; color: #A9C2B4; font-size: .84rem; margin: 0; }
