/* La Bougie Perlée : l'étiquette du sachet (panneau nuit, double filet or) porte le contenu,
   le reste de la page reste sur le fond crème de la photo. */

@font-face { font-family: "IM Fell English SC"; src: url("/fonts/im-fell-english-sc-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IM Fell English"; src: url("/fonts/im-fell-english-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IM Fell English"; src: url("/fonts/im-fell-english-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("/fonts/montserrat.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }

:root {
  --creme: #ebe9e1;      /* fond de la photo */
  --nuit: #0c161e;       /* fond du sachet */
  --or: #b4a57f;         /* lettrage de l'étiquette */
  --ivoire: #e6e1d3;     /* texte sur la nuit */
  --encre: #1d2329;      /* texte sur le crème */
  --oeillet: #964532;    /* rouge des œillets, numéros d'étapes */
  --gris: #565a58;
  --titre: "IM Fell English SC", Georgia, serif;
  --serif: "IM Fell English", Georgia, serif;
  --sans: "Montserrat", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--creme);
  color: var(--encre);
  font: 400 1.0625rem/1.7 var(--sans);
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .2em; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--oeillet); outline-offset: 3px; }

/* Le visuel, centré dans le premier écran */
.visuel {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 4svh 16px;
}
.visuel img {
  width: auto;
  max-width: min(92vw, 100%);
  max-height: 92vh;
  max-height: 92svh;
}

/* L'étiquette : panneau nuit, double filet or */
.etiquette {
  background: var(--nuit);
  color: var(--ivoire);
  margin: 0 auto;
  width: calc(100% - 32px);
  max-width: 44rem;
  padding: clamp(2.5rem, 7vw, 4rem) clamp(1.5rem, 6vw, 4rem);
  text-align: center;
  position: relative;
}
.etiquette::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid var(--or);
  box-shadow: inset 0 0 0 4px var(--nuit), inset 0 0 0 5px rgba(180, 165, 127, .45);
  pointer-events: none;
}
.etiquette h1, .etiquette h2 { color: var(--or); }
.etiquette p { margin: 0 auto; max-width: 34em; }
.filet { width: 9rem; height: 1px; background: var(--ivoire); opacity: .7; border: 0; margin: 1.6rem auto; }

h1, h2 {
  font-family: var(--titre);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: .01em;
  margin: 0;
}
h1 { font-size: clamp(2rem, 5.5vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 3.8vw, 2.2rem); margin-bottom: 1.4rem; }
h3 { font: 500 1.0625rem/1.4 var(--sans); margin: 0 0 .3rem; }

.chapo {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.2rem, 2.6vw, 1.4rem);
  line-height: 1.6;
}

/* Sections sur le crème : une colonne de lecture, alignée à gauche */
.section {
  max-width: 40rem;
  margin: 0 auto;
  padding: clamp(3.5rem, 9vw, 6rem) 16px 0;
}
.section > p { margin: 0 0 1rem; }

/* Étapes : une vraie séquence, numérotée en chiffres anciens */
.etapes { list-style: none; margin: 0; padding: 0; counter-reset: etape; }
.etapes li {
  counter-increment: etape;
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  gap: 0 1rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(29, 35, 41, .14);
}
.etapes li:last-child { border-bottom: 1px solid rgba(29, 35, 41, .14); }
.etapes li::before {
  content: counter(etape);
  font: 400 2.2rem/1 var(--serif);
  color: var(--oeillet);
  padding-top: .1rem;
}
.etapes p { margin: 0; }
.section > .apres { margin-top: 1.4rem; color: var(--gris); }

/* Qualités : liste simple, deux colonnes sur grand écran */
.qualites { margin: 0; display: grid; gap: 1.6rem 2.5rem; }
@media (min-width: 40rem) { .qualites { grid-template-columns: 1fr 1fr; } }
.qualites dt { font-family: var(--serif); font-size: 1.35rem; line-height: 1.3; color: var(--encre); margin-bottom: .25rem; }
.qualites dd { margin: 0; color: var(--gris); }

/* Le sachet : seconde étiquette, comme l'encart du paquet */
.section-etiquette { padding-top: clamp(3.5rem, 9vw, 6rem); }
.fiche { margin: 0; }
.fiche div { padding: .55rem 0; }
.fiche dt { font-size: .85rem; letter-spacing: .04em; color: var(--or); }
.fiche dd { margin: 0; font-family: var(--serif); font-size: 1.3rem; }

/* Questions */
.questions details { border-top: 1px solid rgba(29, 35, 41, .14); }
.questions details:last-child { border-bottom: 1px solid rgba(29, 35, 41, .14); }
.questions summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 2rem 1rem 0;
  position: relative;
  font-weight: 500;
}
.questions summary::-webkit-details-marker { display: none; }
.questions summary::after {
  content: "+";
  position: absolute;
  right: .2rem;
  top: .75rem;
  font: 400 1.5rem/1 var(--serif);
  color: var(--oeillet);
}
.questions details[open] summary::after { content: "−"; }
.questions details p { margin: 0 0 1.1rem; color: var(--gris); }

/* Pied de page */
.pied {
  max-width: 40rem;
  margin: 0 auto;
  padding: clamp(4rem, 10vw, 6rem) 16px 2.5rem;
  font-size: .9rem;
  color: var(--gris);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem 1.5rem;
}

/* Page de texte (mentions légales) */
.texte { max-width: 40rem; margin: 0 auto; padding: clamp(2.5rem, 7vw, 4rem) 16px 0; }
.texte h1 { margin-bottom: .4rem; }
.texte h2 { font-size: 1.5rem; margin: 2.2rem 0 .6rem; }
.texte p { margin: 0 0 .8rem; }
.retour { display: inline-block; margin-bottom: 2rem; font-family: var(--titre); font-size: 1.25rem; text-decoration: none; }
.retour:hover { text-decoration: underline; }

/* Bulle de contact : l'étiquette du sachet, en petit, en bas à droite */
.bulle {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 20;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 0;
  background: var(--nuit);
  color: var(--or);
  box-shadow: inset 0 0 0 5px var(--nuit), inset 0 0 0 6px var(--or), 0 6px 18px rgba(12, 22, 30, .28);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.bulle svg { width: 26px; height: 26px; }
.bulle:focus-visible { outline: 2px solid var(--oeillet); outline-offset: 3px; }

.panneau {
  position: fixed;
  right: 20px;
  bottom: 92px;
  z-index: 20;
  width: min(360px, calc(100vw - 32px));
  max-height: calc(100svh - 112px);
  overflow-y: auto;
  background: var(--nuit);
  color: var(--ivoire);
  padding: 1.9rem 1.6rem 1.6rem;
  box-shadow: 0 14px 40px rgba(12, 22, 30, .35);
  transform-origin: bottom right;
  animation: panneau-entree .18s ease-out;
}
.panneau[hidden] { display: none; }
.panneau::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid var(--or);
  pointer-events: none;
}
@keyframes panneau-entree { from { opacity: 0; transform: scale(.96) translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .panneau { animation: none; } }

.panneau h2 { color: var(--or); font-size: 1.55rem; margin: 0 1.6rem .5rem 0; }
.panneau .accroche { margin: 0 0 1.1rem; font-family: var(--serif); font-style: italic; font-size: 1.12rem; line-height: 1.45; }
.panneau-fermer {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  background: none;
  color: var(--ivoire);
  font: 400 1.6rem/1 var(--serif);
  cursor: pointer;
}
.panneau-fermer:focus-visible { outline: 2px solid var(--or); }

.champ { display: block; margin-bottom: .85rem; position: relative; }
.champ span { display: block; font-size: .85rem; margin-bottom: .3rem; }
.champ span small { opacity: .7; font-size: .8rem; }
.champ input, .champ textarea {
  width: 100%;
  font: 400 1rem/1.4 var(--sans);
  color: var(--encre);
  background: var(--creme);
  border: 1px solid transparent;
  border-radius: 2px;
  padding: .6rem .7rem;
}
.champ textarea { resize: vertical; min-height: 4.5rem; }
.champ input:focus, .champ textarea:focus { outline: 2px solid var(--or); outline-offset: 1px; }
.piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-demande button[type="submit"] {
  width: 100%;
  margin-top: .3rem;
  padding: .75rem 1rem;
  border: 0;
  border-radius: 2px;
  background: var(--or);
  color: var(--nuit);
  font: 500 1rem/1 var(--sans);
  cursor: pointer;
}
.form-demande button[type="submit"]:hover { background: #c4b58f; }
.form-demande button[type="submit"]:focus-visible { outline: 2px solid var(--ivoire); outline-offset: 2px; }
.form-demande button[disabled] { opacity: .7; cursor: wait; }
.rgpd { font-size: .78rem; line-height: 1.5; opacity: .8; margin: .9rem 0 0; }
.demande-etat { margin: 0; outline: none; }
.demande-etat:empty { display: none; }
.demande-erreur { margin-top: .8rem; color: #f0b9a8; font-size: .9rem; }
.demande-ok { font-family: var(--serif); font-size: 1.2rem; line-height: 1.5; }

@media (max-width: 30rem) {
  .bulle { right: 16px; bottom: 16px; }
  .panneau { right: 16px; left: 16px; width: auto; bottom: 88px; }
}

/* Boutons vers /contact : or sur la nuit, nuit sur le crème */
.cta-ligne { margin: 1.8rem 0 0; }
.cta {
  display: inline-block;
  padding: .8rem 1.4rem;
  background: var(--or);
  color: var(--nuit);
  font: 500 1rem/1.2 var(--sans);
  text-decoration: none;
  border-radius: 2px;
}
.cta:hover { background: #c4b58f; }
.cta:focus-visible { outline: 2px solid var(--ivoire); outline-offset: 3px; }
.cta-nuit { background: var(--nuit); color: var(--or); box-shadow: inset 0 0 0 1px var(--or), inset 0 0 0 4px var(--nuit), inset 0 0 0 5px rgba(180, 165, 127, .45); }
.cta-nuit:hover { background: #1a2833; }
.cta-nuit:focus-visible { outline: 2px solid var(--oeillet); }
.section.relance > p { margin-bottom: 1.4rem; }
.pied-liens { display: flex; gap: 1.5rem; }

/* Page /contact : le sachet à gauche, l'étiquette et le formulaire à droite */
.contact {
  max-width: 66rem;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.5rem) 16px 0;
}
.contact .retour { margin-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.contact-grille { display: grid; gap: 2.5rem; align-items: center; }
.contact-visuel img { margin: 0 auto; max-height: 78vh; width: auto; }
.contact-carte { width: 100%; max-width: 30rem; margin: 0 auto; text-align: left; padding: clamp(2rem, 6vw, 2.75rem) clamp(1.4rem, 5vw, 2.5rem); }
.contact-carte h1 { font-size: clamp(2rem, 4.6vw, 2.7rem); margin-bottom: .6rem; }
.contact-carte .accroche { font-family: var(--serif); font-style: italic; font-size: 1.25rem; line-height: 1.45; margin: 0 0 .6rem; max-width: none; }
.contact-carte .rappel { font-size: .9rem; opacity: .85; margin: 0 0 1.5rem; max-width: none; }
.contact-carte .demande-ok { font-size: 1.3rem; }
@media (min-width: 52rem) {
  .contact-grille { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 51.99rem) {
  .contact-visuel { order: 2; }
  .contact-visuel img { max-height: 60vh; }
}
/* « .etiquette p » centre et annule les marges : on rétablit celles du bouton et des messages */
.etiquette .cta-ligne { margin-top: 1.8rem; }
.etiquette .rgpd { margin: .9rem 0 0; max-width: none; }
.etiquette .demande-etat { margin: 0; max-width: none; }
.etiquette .demande-erreur { margin-top: .8rem; }
.pied-large { max-width: 66rem; }
