/* Papier ancien, encre, sépia. Polices système : aucune requête vers un tiers. */
:root {
  color-scheme: light;
  --papier: #f3ead8;
  --papier-clair: #faf5ea;
  --papier-fonce: #e6d9bf;
  --encre: #2a2119;
  --encre-douce: #5b4d3e;
  --sepia: #8c4a2b;
  --sepia-fonce: #6e3519;
  --vert: #4a5a3c;
  --trait: #cdbb98;
  --ombre: 0 1px 2px rgba(60, 40, 20, .08), 0 6px 20px rgba(60, 40, 20, .08);
  --titre: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --texte: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --rayon: 6px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--papier);
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(255,255,255,.55), transparent 60%),
    radial-gradient(ellipse at 100% 100%, rgba(140,74,43,.07), transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .25 0 0 0 0 .15 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--encre);
  font-family: var(--texte);
  font-size: 1.0625rem;
  line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { color: var(--sepia); }
a:hover { color: var(--sepia-fonce); }

.page { width: 100%; max-width: 46rem; margin: 0 auto; padding: 0 1rem; }
.page-large { max-width: 64rem; }

h1, h2, h3 { font-family: var(--titre); font-weight: 600; line-height: 1.2; color: var(--encre); margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 8vw, 3.25rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.55rem, 5.5vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.surtitre {
  font-family: var(--ui); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--sepia); margin: 0 0 .8rem; font-weight: 600;
}

.filet { border: 0; height: 1px; background: var(--trait); margin: 0; }
.ornement { text-align: center; color: var(--trait); letter-spacing: .6em; margin: 0; font-size: .9rem; user-select: none; }

/* En-tête */
.entete { padding: 1rem 0; }
.entete .page { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.marque { font-family: var(--titre); font-size: 1.15rem; text-decoration: none; color: var(--encre); font-style: italic; }
.entete a.lien-discret { font-family: var(--ui); font-size: .85rem; }

/* Boutons */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--ui); font-size: 1rem; font-weight: 600;
  background: var(--sepia); color: #fff8ee; text-decoration: none;
  border: 0; border-radius: var(--rayon); padding: .95rem 1.4rem; min-height: 48px;
  cursor: pointer; box-shadow: 0 2px 0 var(--sepia-fonce);
  transition: background .15s, transform .05s;
}
.bouton:hover { background: var(--sepia-fonce); color: #fff8ee; }
.bouton:active { transform: translateY(1px); }
.bouton:disabled { opacity: .6; cursor: wait; }
.bouton-plein { width: 100%; }
.bouton-second {
  background: transparent; color: var(--sepia); box-shadow: none;
  border: 1px solid var(--sepia);
}
.bouton-second:hover { background: rgba(140,74,43,.08); color: var(--sepia-fonce); }

/* Sections */
section { padding: 3.25rem 0; }
.hero { padding: 1.5rem 0 3rem; }
.hero .accroche { font-size: 1.2rem; color: var(--encre-douce); max-width: 34rem; }
.hero .actions { display: flex; flex-direction: column; gap: .75rem; margin: 1.6rem 0 1rem; }
.hero .note { font-family: var(--ui); font-size: .85rem; color: var(--encre-douce); }

.hero-visuel { margin-top: 2rem; }
.hero-visuel svg { width: 100%; height: auto; }

.carte {
  background: var(--papier-clair); border: 1px solid var(--trait); border-radius: var(--rayon);
  padding: 1.25rem; box-shadow: var(--ombre);
}

/* Étapes */
.etapes { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1rem; counter-reset: etape; }
.etapes li { position: relative; padding: 1.1rem 1.1rem 1.1rem 3.6rem; }
.etapes li::before {
  counter-increment: etape; content: counter(etape);
  position: absolute; left: 1rem; top: 1rem; width: 2rem; height: 2rem; border-radius: 50%;
  border: 1px solid var(--sepia); color: var(--sepia); font-family: var(--titre);
  display: grid; place-items: center; font-size: 1.05rem;
}
.etapes h3 { margin-bottom: .3em; }
.etapes p { margin: 0; color: var(--encre-douce); }

/* Ce qu'on reçoit */
.recus { display: grid; gap: 1rem; margin-top: 1.5rem; }
.recu h3 { margin-bottom: .35em; }
.recu p { margin: 0; color: var(--encre-douce); }
.recu .picto { width: 44px; height: 44px; margin-bottom: .6rem; color: var(--sepia); }

/* Exemple Thomas */
.exemple-chiffres { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin: 1rem 0 1.5rem; font-family: var(--ui); }
.exemple-chiffres div { display: flex; flex-direction: column; }
.exemple-chiffres strong { font-family: var(--titre); font-size: 1.9rem; color: var(--sepia); line-height: 1.1; }
.exemple-chiffres span { font-size: .8rem; color: var(--encre-douce); }
.fiches { display: grid; gap: 1rem; }
.fiche { display: grid; grid-template-columns: 88px 1fr; gap: 1rem; align-items: start; }
.fiche .acte-vignette {
  width: 88px; height: 112px; border: 1px solid var(--trait); border-radius: 3px; overflow: hidden;
  background:
    repeating-linear-gradient(to bottom, transparent 0 9px, rgba(90,70,50,.18) 9px 10px),
    linear-gradient(#efe3c8, #e3d2ae);
  box-shadow: inset 0 0 18px rgba(110,70,30,.18);
}
.fiche .acte-vignette img { width: 100%; height: 100%; object-fit: cover; }
.fiche h3 { margin-bottom: .2em; }
.fiche .dates { font-family: var(--ui); font-size: .82rem; color: var(--sepia); margin: 0 0 .4em; letter-spacing: .02em; }
.fiche p { margin: 0; font-size: .97rem; color: var(--encre-douce); }
.legende { font-family: var(--ui); font-size: .8rem; color: var(--encre-douce); margin-top: 1rem; }

/* Offre */
.offre { text-align: center; padding: 2rem 1.25rem; border: 1px solid var(--sepia); position: relative; }
.offre::before, .offre::after {
  content: ""; position: absolute; inset: 6px; border: 1px solid var(--trait); border-radius: 3px; pointer-events: none;
}
.offre::after { display: none; }
.offre .prix { font-family: var(--titre); font-size: 2.3rem; color: var(--sepia); margin: .2rem 0; }
.offre ul { text-align: left; max-width: 26rem; margin: 1.2rem auto 1.5rem; padding-left: 1.2rem; }
.offre li { margin-bottom: .4rem; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--trait); padding: .2rem 0; }
.faq details:first-of-type { border-top: 1px solid var(--trait); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1rem 2rem 1rem 0; position: relative;
  font-family: var(--titre); font-size: 1.1rem; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: .25rem; top: .85rem; font-family: var(--ui);
  font-size: 1.3rem; color: var(--sepia); font-weight: 400;
}
.faq details[open] summary::after { content: "−"; }
.faq .reponse { padding: 0 0 1rem; color: var(--encre-douce); }
.faq .reponse ul { padding-left: 1.2rem; margin: 0 0 1em; }

/* Formulaire */
.formulaire fieldset { border: 0; padding: 0; margin: 0 0 1.75rem; min-width: 0; }
.formulaire legend { font-family: var(--titre); font-size: 1.25rem; font-weight: 600; padding: 0; margin-bottom: .3rem; }
.formulaire .aide { font-family: var(--ui); font-size: .85rem; color: var(--encre-douce); margin: 0 0 1rem; }
.champ { margin-bottom: 1rem; }
.champ label, .champ .etiquette { display: block; font-family: var(--ui); font-size: .9rem; font-weight: 600; margin-bottom: .35rem; }
.champ .facultatif { font-weight: 400; color: var(--encre-douce); }
input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%; font: inherit; font-family: var(--ui); font-size: 16px; /* 16px : évite le zoom iOS */
  color: var(--encre); background: #fffdf8; border: 1px solid var(--trait); border-radius: var(--rayon);
  padding: .75rem .8rem; min-height: 48px;
}
textarea { min-height: 7rem; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus, summary:focus-visible, .bouton:focus-visible, a:focus-visible {
  outline: 2px solid var(--sepia); outline-offset: 2px;
}
.grille-2 { display: grid; gap: 0 1rem; }

.personne { background: var(--papier-clair); border: 1px solid var(--trait); border-radius: var(--rayon); margin-bottom: .75rem; }
.personne > summary {
  cursor: pointer; list-style: none; padding: .9rem 2.5rem .9rem 1rem; position: relative;
  font-family: var(--ui); font-weight: 600; font-size: .98rem;
}
.personne > summary::-webkit-details-marker { display: none; }
.personne > summary::after { content: "+"; position: absolute; right: 1rem; top: .75rem; color: var(--sepia); font-size: 1.25rem; font-weight: 400; }
.personne[open] > summary::after { content: "−"; }
.personne > summary .resume { display: block; font-weight: 400; font-size: .82rem; color: var(--encre-douce); }
.personne .corps { padding: 0 1rem .5rem; }
.choix { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; font-family: var(--ui); font-size: .95rem; }
.choix label { display: inline-flex; align-items: center; gap: .4rem; font-weight: 400; margin: 0; min-height: 36px; }
.choix input { width: 1.1rem; height: 1.1rem; accent-color: var(--sepia); }

.consentement { display: flex; gap: .7rem; align-items: flex-start; font-family: var(--ui); font-size: .9rem; }
.consentement input { width: 1.3rem; height: 1.3rem; margin-top: .15rem; flex: none; accent-color: var(--sepia); }

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

.message { font-family: var(--ui); border-radius: var(--rayon); padding: 1rem; margin: 1rem 0; }
.message-ok { background: #e9eedd; border: 1px solid #b7c49c; color: #2f3b22; }
.message-erreur { background: #f7e1d7; border: 1px solid #d9a58c; color: #6e2a12; }
.message[hidden] { display: none; }

/* Pied de page */
.pied { padding: 2.5rem 0 3rem; font-family: var(--ui); font-size: .82rem; color: var(--encre-douce); text-align: center; }
.pied p { margin: .3rem 0; }

/* Barre d'action fixe sur mobile */
.barre-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  padding: .6rem 1rem calc(.6rem + env(safe-area-inset-bottom));
  background: rgba(243, 234, 216, .96); border-top: 1px solid var(--trait);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transform: translateY(110%); transition: transform .25s ease;
}
.barre-cta.visible { transform: none; }
.barre-cta .bouton { width: 100%; }

/* ---- Page résultat ---- */
.res-entete { text-align: center; padding: 1.5rem 0 1rem; }
.eventail-cadre { background: var(--papier-clair); border: 1px solid var(--trait); border-radius: var(--rayon); padding: .5rem; box-shadow: var(--ombre); overflow-x: auto; }
.eventail-cadre svg { display: block; width: 100%; min-width: 560px; height: auto; }
.eventail .secteur { cursor: pointer; transition: fill .15s; }
.eventail .secteur:hover, .eventail .secteur.actif { fill: #ead9b6; }
.eventail text { font-family: var(--texte); fill: var(--encre); pointer-events: none; }
.eventail .annees { fill: var(--sepia); font-family: var(--ui); }
.astuce { font-family: var(--ui); font-size: .8rem; color: var(--encre-douce); text-align: center; margin: .6rem 0 0; }

.detail-personne { margin-top: 1rem; }
.detail-personne[hidden] { display: none; }
.detail-personne dl { display: grid; grid-template-columns: auto 1fr; gap: .2rem 1rem; margin: 0; font-size: .97rem; }
.detail-personne dt { font-family: var(--ui); font-size: .82rem; color: var(--encre-douce); padding-top: .15rem; }
.detail-personne dd { margin: 0; }

.generations h3 { font-size: 1rem; font-family: var(--ui); text-transform: uppercase; letter-spacing: .1em; color: var(--sepia); margin: 1.5rem 0 .5rem; }
.generations ul { list-style: none; padding: 0; margin: 0; }
.generations li { padding: .55rem 0; border-bottom: 1px dotted var(--trait); }
.generations li .qui { font-weight: 600; }
.generations li .quoi { display: block; font-size: .92rem; color: var(--encre-douce); }
.generations button.lien { background: none; border: 0; padding: 0; font: inherit; color: var(--sepia); text-decoration: underline; cursor: pointer; font-family: var(--ui); font-size: .85rem; }

.recit { font-size: 1.1rem; line-height: 1.75; }
.recit p:first-of-type::first-letter { font-family: var(--titre); float: left; font-size: 3.4em; line-height: .85; padding: .08em .1em 0 0; color: var(--sepia); }

.actes { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
.actes figure { margin: 0; }
.actes a { display: block; border: 1px solid var(--trait); border-radius: 3px; overflow: hidden; background: var(--papier-fonce); aspect-ratio: 3 / 4; }
.actes img { width: 100%; height: 100%; object-fit: cover; }
.actes figcaption { font-family: var(--ui); font-size: .78rem; color: var(--encre-douce); margin-top: .3rem; }

.paiement { text-align: center; }
.paiement .bouton { font-size: 1.1rem; padding: 1.05rem 1.6rem; }
.etat { text-align: center; padding: 4rem 0; }

/* Écrans plus larges */
@media (min-width: 640px) {
  .page { padding: 0 1.5rem; }
  .hero { padding: 3rem 0 4rem; }
  .hero .actions { flex-direction: row; }
  .grille-2 { grid-template-columns: 1fr 1fr; }
  .recus { grid-template-columns: repeat(3, 1fr); }
  .actes { grid-template-columns: repeat(3, 1fr); }
  .barre-cta { display: none; }
}
@media (min-width: 900px) {
  .hero-grille { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2.5rem; align-items: center; }
  .hero-visuel { margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .barre-cta { transition: none; }
}
@media print {
  .barre-cta, .entete, .paiement, .pied { display: none; }
  body { background: #fff; }
}
