/* =========================================================
   Site de mariage — Clémence & Alexis
   Style : faire-part « Germinal » (Cotton Bird)
   → papier blanc, fleurs des champs à l'aquarelle,
     texte brun, capitales espacées et italiques.
   👉 Pour changer une couleur ou une police, modifie seulement
      les variables ci-dessous (:root). Aucune couleur n'est écrite ailleurs.

   Sommaire (dans l'ordre du fichier) :
     1. Variables (couleurs, polices, tailles)
     2. Base (page, titres, textes communs)
     3. Pictos et boutons
     4. Navigation (menu du haut)
     5. Accueil (recto du faire-part) + compte à rebours
     6. Sections, photos, galerie du lieu
     7. Programme
     8. Cartes (Accès, Hébergements) et carte Google Maps
     9. Infos pratiques (FAQ)
    10. Fleurs dans les coins (RSVP, pied de page)
    11. Formulaire RSVP
    12. Pied de page, page Merci
    13. Animation d'apparition
    14. Réglages téléphone et tablette
   ========================================================= */

/* ---------- 1. Variables ---------- */
:root {
  --encre: #574838;        /* brun du texte du faire-part — titres, texte */
  --encre-douce: #8A7B6A;  /* brun clair — textes secondaires */
  --vert: #6F9459;         /* vert feuillage */
  --vert-pale: #EFF3E9;    /* fond vert très clair (Hébergements) */
  --rose: #E6A3A2;         /* rose sauvage */
  --jaune: #F2CF52;        /* marguerite */
  --coquelicot: #E15C43;   /* petites fleurs rouges */
  --myosotis: #8DB3D8;     /* petites fleurs bleues */
  --papier: #FFFEFB;       /* blanc papier — fond principal */
  --creme: #F9F5EE;        /* crème — fonds alternés */
  --trait: #E7DED2;        /* fines bordures */
  --blanc: #FFFFFF;        /* fond des champs du formulaire, texte sur vert */
  --rayure: #F1EBDF;       /* rayures des cadres photo vides */
  --menu-fond: rgba(255, 254, 251, .95);   /* papier légèrement transparent (menu au défilement) */
  --ombre: 0 12px 34px -22px rgba(87, 72, 56, .45);  /* ombre douce des cartes */
  --halo-vert: rgba(111, 148, 89, .18);    /* halo autour d'un champ sélectionné */

  --serif: "Cormorant Garamond", Georgia, serif;   /* titres, comme le faire-part */
  --texte: "EB Garamond", Georgia, serif;          /* texte courant, bien lisible */

  --radius: 18px;          /* coins arrondis, comme la carte */
  --max: 1100px;           /* largeur maximale du contenu */
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  font-family: var(--texte);
  font-size: 18px;
  line-height: 1.7;
  color: var(--encre);
  background: var(--papier);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

/* Titres : capitales espacées, comme « LOUISE ET GABIN » sur le faire-part */
h1, h2, h3 { font-family: var(--serif); font-weight: 500; color: var(--encre); line-height: 1.2; margin: 0 0 .6em; }
h2 { font-size: clamp(1.7rem, 4.5vw, 2.5rem); text-transform: uppercase; letter-spacing: .14em; }
h3 { font-size: 1.5rem; letter-spacing: .03em; }
p { margin: 0 0 1em; }

/* Sur-titre : italique en capitales, comme « LE MARIAGE DE » */
.eyebrow {
  font-family: var(--serif);
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: .3em;
  font-size: .9rem;
  font-weight: 500;
  color: var(--encre-douce);
  margin-bottom: .6em;
}
.lead { font-size: 1.1rem; color: var(--encre-douce); max-width: 640px; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }
.note { font-size: .95rem; color: var(--encre-douce); font-style: italic; }
.hidden { display: none; }

/* Petit brin fleuri sous les titres de section */
.section__head h2::after, .center h2::after {
  content: ""; display: block; width: 130px; height: 36px; margin: .5rem auto 0;
  background: url(../images/brin.svg) center / contain no-repeat;
}

/* ---------- 3. Pictos et boutons ---------- */
/* Pictos au trait (dessins définis en haut de index.html) */
.icone { width: 56px; height: 56px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; color: var(--encre); }

.btn {
  display: inline-block;
  padding: .85em 2.2em;
  background: var(--encre);
  color: var(--papier);
  text-decoration: none;
  border: 1px solid var(--encre);
  border-radius: 999px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .25s, color .25s, transform .25s;
}
.btn:hover { background: transparent; color: var(--encre); transform: translateY(-1px); }
.btn--outline { background: transparent; color: var(--encre); }
.btn--outline:hover { background: var(--encre); color: var(--papier); }
.btn--full { width: 100%; }

/* ---------- 4. Navigation (menu du haut) ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.5rem;
  transition: background .3s, box-shadow .3s, padding .3s;
}
.nav.is-scrolled { background: var(--menu-fond); backdrop-filter: blur(8px); box-shadow: 0 1px 0 var(--trait); padding-block: .6rem; }
.nav__logo { font-family: var(--serif); font-size: 1.5rem; letter-spacing: .12em; color: var(--encre); text-decoration: none; }
.nav__logo span, .footer__names span { font-style: italic; color: var(--vert); }
.nav__links { display: flex; gap: 1.5rem; align-items: center; }
.nav__links a { text-decoration: none; font-family: var(--serif); font-weight: 500; font-size: .9rem; letter-spacing: .12em; text-transform: uppercase; color: var(--encre); }
.nav__links a:hover { color: var(--vert); }
.nav__cta { border: 1px solid var(--encre); padding: .35em 1.1em; border-radius: 999px; }
.nav__toggle { display: none; background: none; border: 0; width: 32px; height: 32px; cursor: pointer; position: relative; }
.nav__toggle span { position: absolute; left: 4px; right: 4px; height: 1.5px; background: var(--encre); transition: transform .3s, top .3s; }
.nav__toggle span:first-child { top: 11px; }
.nav__toggle span:last-child { top: 20px; }
.nav.is-open .nav__toggle span:first-child { top: 15px; transform: rotate(45deg); }
.nav.is-open .nav__toggle span:last-child { top: 15px; transform: rotate(-45deg); }

/* ---------- 5. Accueil (recto du faire-part) ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: 7rem 1.5rem 15rem;
  background: url(../images/prairie.svg) center bottom / auto 150px repeat-x, var(--papier);
  overflow: hidden;
}
/* Bouquets d'aquarelle dans les coins bas */
.hero::before, .hero::after {
  content: ""; position: absolute; bottom: 0; z-index: 1; pointer-events: none;
  width: clamp(170px, 30vw, 440px); aspect-ratio: 420 / 520;
  background: center bottom / contain no-repeat;
}
.hero::before { left: 0; background-image: url(../images/fleurs-gauche.svg); }
.hero::after { right: 0; background-image: url(../images/fleurs-droite.svg); }
.hero__content { position: relative; z-index: 2; }
.hero__names {
  font-size: clamp(2.1rem, 6.5vw, 4.4rem); font-weight: 500;
  text-transform: uppercase; letter-spacing: .16em; margin: .1em 0 .3em;
}
.hero__names .et { font-style: italic; text-transform: none; letter-spacing: .02em; color: var(--encre-douce); }
.hero__invite { font-family: var(--serif); font-style: italic; font-size: clamp(1.15rem, 2.6vw, 1.45rem); color: var(--encre-douce); margin-bottom: .4em; }
.hero__dates {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem); text-transform: uppercase; letter-spacing: .25em;
  color: var(--encre); margin-bottom: .3em;
}
.hero__place { font-family: var(--serif); font-style: italic; font-size: clamp(1.1rem, 2.4vw, 1.35rem); color: var(--encre-douce); }

/* Compte à rebours (chiffres mis à jour par js/main.js) */
.countdown { display: flex; justify-content: center; gap: 2.2rem; margin: 1.8rem 0 2.2rem; }
.countdown div { display: flex; flex-direction: column; align-items: center; }
.countdown strong { font-family: var(--serif); font-size: 2.6rem; font-weight: 500; color: var(--encre); line-height: 1; }
.countdown span { font-family: var(--serif); font-style: italic; font-size: .85rem; text-transform: uppercase; letter-spacing: .2em; color: var(--encre-douce); margin-top: .4em; }

/* ---------- 6. Sections, photos, galerie du lieu ---------- */
.section { padding: clamp(4.5rem, 10vw, 7.5rem) 1.5rem; }
.section--sand { background: var(--creme); }
.section--sauge { background: var(--vert-pale); }
.container { max-width: var(--max); margin: 0 auto; }
.narrow { max-width: 720px; }
.section__head { text-align: center; margin-bottom: 3rem; }
.section__head .lead { margin-inline: auto; }

/* Photo : un cadre rayé s'affiche tant que l'image n'existe pas */
.photo {
  margin: 0; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden;
  background: repeating-linear-gradient(135deg, var(--creme), var(--creme) 12px, var(--rayure) 12px, var(--rayure) 24px);
  position: relative;
}
.photo img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.photo::after {
  content: "📷 " attr(data-label);
  position: absolute; inset: auto 0 1rem 0; text-align: center;
  font-size: .8rem; color: var(--encre-douce);
}

/* Notre histoire : 4 photos par rangée (2 sur téléphone), une sur deux légèrement décalée */
.photos-histoire { display: grid; grid-template-columns: repeat(4, 1fr); align-items: start; gap: 1.2rem; padding-bottom: 2rem; }
.photos-histoire .photo:nth-child(even) { transform: translateY(2rem); }
.photos-histoire .photo img { object-position: 50% 30%; }

/* Le lieu, rangée 1 — ordinateur : photo verticale | façade | photo verticale */
.gallery { display: grid; grid-template-columns: 1fr 2.2fr 1fr; gap: 1rem; height: clamp(380px, 42vw, 520px); }
.gallery .photo { aspect-ratio: auto; height: 100%; }
/* Deuxième rangée : voiture + Étretat côte à côte */
.gallery-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.gallery-duo .photo { aspect-ratio: 3 / 2; }

/* ---------- 7. Programme (verso du faire-part) ---------- */
.events { display: grid; max-width: 920px; margin-inline: auto; }
.event { background: var(--papier); border-radius: var(--radius); padding: clamp(2rem, 5vw, 3rem); text-align: center; box-shadow: var(--ombre); }
.event__date { font-family: var(--serif); font-style: italic; text-transform: uppercase; letter-spacing: .25em; font-size: .95rem; color: var(--encre-douce); font-weight: 500; }
.event h3 { text-transform: uppercase; letter-spacing: .16em; font-size: 1.6rem; }
.event__place { font-family: var(--serif); font-style: italic; font-size: 1.2rem; color: var(--encre-douce); }

/* Les moments de la journée : picto + nom + heure */
/* max-width : 4 moments par ligne au maximum (samedi), puis le dimanche en dessous */
.moments { list-style: none; padding: 0; margin: 2.2rem auto 1.5rem; max-width: 680px; display: flex; flex-wrap: wrap; justify-content: center; gap: 2rem 1.5rem; }
.moments li { width: 140px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.moments .icone { width: 64px; height: 64px; margin-bottom: .6rem; }
.moments strong { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 1.25rem; letter-spacing: .04em; line-height: 1.25; }
.moments time { font-family: var(--serif); font-style: italic; font-size: 1rem; color: var(--encre-douce); letter-spacing: .06em; margin-top: .2rem; }

/* ---------- 8. Cartes (Accès, Hébergements) et carte Google Maps ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.card { padding: 2rem; border-radius: var(--radius); background: var(--creme); text-align: center; }
.card .card__icon { width: 52px; height: 52px; margin: 0 auto .6rem; display: block; }
.card h3 { font-style: italic; }
.card--blanche { background: var(--papier); border: 1px solid var(--trait); }
.tag { font-family: var(--serif); font-style: italic; font-size: .85rem; text-transform: uppercase; letter-spacing: .2em; color: var(--vert); }
.link { color: var(--vert); text-decoration: none; font-style: italic; }
.link:hover { text-decoration: underline; }

/* Trajet de la journée (section Accès) : église → voiture → château */
.trajet { display: flex; justify-content: center; align-items: flex-start; gap: 1rem; margin-bottom: 3rem; text-align: center; }
.trajet__etape { flex: 0 1 260px; }
.trajet__etape .icone { width: 64px; height: 64px; margin-bottom: .4rem; }
.trajet__etape .tag { margin-bottom: .2em; }
.trajet__lieu { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--encre-douce); }
/* Route : pointillés de part et d'autre de la voiture */
.trajet__route { flex: 0 1 220px; display: flex; flex-direction: column; align-items: center; padding-top: 1.2rem;
  background: linear-gradient(90deg, var(--encre-douce) 50%, transparent 50%) 0 calc(1.2rem + 20px) / 10px 1px repeat-x; }
.trajet__route .icone { width: 44px; height: 44px; background: var(--papier); padding: 0 6px; box-sizing: content-box; }
.trajet__route p { font-family: var(--serif); font-style: italic; font-size: 1rem; color: var(--encre-douce); margin: .2rem 0 0; }

/* Cartes Google Maps (section Accès) : église | château, côte à côte */
.maps { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 2.5rem; text-align: center; }
.maps .tag { margin-bottom: .2em; }
.maps__num { display: inline-block; width: 1.6em; height: 1.6em; line-height: 1.6em; border-radius: 50%; border: 1px solid var(--vert); font-style: normal; letter-spacing: 0; margin-right: .3em; }
.maps__itineraire { text-align: center; margin: 2rem 0 0; }
.maps__lieu { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--encre-douce); margin-bottom: .8em; }
.map { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; background: var(--creme); }
.map iframe { width: 100%; height: 100%; border: 0; }

/* ---------- 9. Infos pratiques (FAQ) ---------- */

/* FAQ : questions qui s'ouvrent au clic */
.faq details { border-bottom: 1px solid var(--trait); padding: 1.1rem 0; }
.faq summary { cursor: pointer; list-style: none; font-family: var(--serif); font-weight: 500; font-size: 1.35rem; color: var(--encre); display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--serif); font-size: 1.6rem; color: var(--vert); transition: transform .3s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: .8rem 0 0; color: var(--encre-douce); }

/* ---------- 10. Fleurs dans les coins d'une section (RSVP, pied de page) ---------- */
.fleurie { position: relative; overflow: hidden; }
.fleurie::before, .fleurie::after {
  content: ""; position: absolute; bottom: 0; z-index: 0; pointer-events: none;
  width: clamp(130px, 22vw, 320px); aspect-ratio: 420 / 520;
  background: center bottom / contain no-repeat;
}
.fleurie::before { left: 0; background-image: url(../images/fleurs-gauche.svg); }
.fleurie::after { right: 0; background-image: url(../images/fleurs-droite.svg); }
.fleurie > * { position: relative; z-index: 1; }

/* ---------- 11. Formulaire RSVP (Netlify Forms) ---------- */
.rsvp { background: var(--papier); padding: clamp(1.5rem, 5vw, 3rem); border-radius: var(--radius); box-shadow: var(--ombre); }
.field { margin: 0 0 1.4rem; border: 0; padding: 0; }
.field label, .field legend { display: block; font-family: var(--serif); font-size: 1.1rem; font-weight: 600; color: var(--encre); margin-bottom: .4rem; }
.field input[type="text"], .field input[type="email"], .field input[type="number"], .field textarea {
  width: 100%; padding: .75rem 1rem; font: inherit; font-size: 1rem;
  border: 1px solid var(--trait); border-radius: 10px; background: var(--blanc); color: var(--encre);
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--vert); box-shadow: 0 0 0 3px var(--halo-vert); }
.rsvp__note { text-align: center; margin: 1rem 0 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.choices { display: flex; flex-wrap: wrap; gap: .6rem; }
.choices label { font-family: var(--texte); font-size: 1rem; font-weight: 400; color: var(--encre); border: 1px solid var(--trait); border-radius: 999px; padding: .45rem 1rem; cursor: pointer; margin: 0; }
/* Boutons « Avec joie ! / Malheureusement non » : vert quand sélectionné */
.choices label:has(input:checked) { border-color: var(--vert); background: var(--vert); color: var(--blanc); }
.choices input { accent-color: var(--vert); margin-right: .3rem; }

/* ---------- 12. Pied de page, page Merci ---------- */
.footer { background: var(--papier); color: var(--encre-douce); text-align: center; padding: 4rem 1.5rem 9rem; border-top: 1px solid var(--trait); }
.footer__names { font-family: var(--serif); font-size: clamp(1.6rem, 5vw, 2.2rem); text-transform: uppercase; letter-spacing: .16em; color: var(--encre); }
.footer__names span { text-transform: none; letter-spacing: 0; }
.footer a { color: var(--encre); }
.footer__small { font-family: var(--serif); font-style: italic; letter-spacing: .3em; margin-top: 1.5rem; }
/* merci.html : espace au-dessus du bouton « Retour au site » (= une ligne de texte) */
.merci__retour { padding-top: 1.7em; }

/* ---------- 13. Apparition au défilement (classe .reveal, gérée par js/main.js) ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- 14. Réglages téléphone et tablette ---------- */
/* Tablette et téléphone (900 px et moins) */
@media (max-width: 900px) {
  .photos-histoire { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .cards { grid-template-columns: 1fr; }
  /* Téléphone : la façade en grand, puis les deux photos verticales côte à côte */
  .gallery { grid-template-columns: 1fr 1fr; height: auto; }
  .gallery .photo { height: auto; aspect-ratio: 3 / 4.6; }
  .gallery .photo--large { grid-column: 1 / -1; order: -1; aspect-ratio: 16 / 10; }
  .gallery-duo { grid-template-columns: 1fr; }
  .gallery-duo .photo { aspect-ratio: 16 / 10; }
  .maps { grid-template-columns: 1fr; gap: 2rem; }
  /* Trajet en colonne : église, puis voiture (pointillés verticaux), puis château */
  .trajet { flex-direction: column; align-items: center; gap: 0; }
  .trajet__etape { flex: none; }
  .trajet__route { flex: none; padding: 1.4rem 0;
    background: linear-gradient(180deg, var(--encre-douce) 50%, transparent 50%) center 0 / 1px 10px repeat-y; }
  .trajet__route p { background: var(--papier); padding: .1rem .4rem; }
}
/* Menu : bouton ☰ et menu plein écran (820 px et moins) */
@media (max-width: 820px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed; inset: 0; background: var(--papier);
    flex-direction: column; justify-content: center; gap: 1.6rem;
    opacity: 0; pointer-events: none; transition: opacity .3s;
  }
  .nav__links a { font-size: 1.3rem; }
  .nav.is-open .nav__links { opacity: 1; pointer-events: auto; }
  .nav__toggle, .nav__logo { position: relative; z-index: 2; }
}
/* Téléphone (600 px et moins) */
@media (max-width: 600px) {
  body { font-size: 17px; }
  /* Prénoms sur trois lignes : CLÉMENCE / et / ALEXIS */
  .hero__names span { display: block; }
  .hero__names { font-size: clamp(2.1rem, 10vw, 2.8rem); }
  .hero { padding-bottom: 12rem; background-size: auto 110px; }
  .countdown { gap: 1.4rem; }
  .countdown strong { font-size: 2.1rem; }
  .moments li { width: 42%; }
  .rsvp { padding: 1.5rem 1.2rem; }
  .section.fleurie { padding-bottom: 9rem; }
}
