/* Couleurs et polices reprises de lascendant.com (css/style.css) */
:root {
  --cream: #f3ece1;
  --cream-dark: #e8ddcc;
  --brown: #2b211a;
  --brown-soft: #6b5a4f;
  --ink: #14100d;
  --ink-soft: #1f1813;
  --gold: #c6a96b;
  --gold-soft: #d8c093;
  --gold-light: #efe0bb;
  --wine: #9b1c31;
  --wine-dark: #6b1322;
  --border: #e4d5c2;
  --white: #fffdfa;
  --error: #9b1c31;

  /* Transparences */
  --veil: rgba(255, 253, 250, .55);
  --veil-strong: rgba(255, 253, 250, .78);
  --gold-line: rgba(198, 169, 107, .45);
  --gold-faint: rgba(198, 169, 107, .18);

  /* Doré brillant : un reflet clair qui traverse le doré */
  --gold-shine: linear-gradient(110deg, #a8884c 0%, #c6a96b 30%, #f4e6c2 48%, #c6a96b 62%, #a8884c 100%);

  --font-heading: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 18px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--brown);
  background-color: var(--cream);
  /* Lueurs très douces, comme une lumière qui entre par une fenêtre */
  background-image:
    radial-gradient(ellipse 80% 50% at 15% 0%, rgba(239, 224, 187, .55), transparent 70%),
    radial-gradient(ellipse 70% 45% at 100% 100%, rgba(232, 221, 204, .8), transparent 70%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  transition: background-color .8s var(--ease), color .8s var(--ease);
}
body.theme-dark {
  color: rgba(243, 236, 225, .92);
  background-color: var(--ink);
  background-image:
    radial-gradient(ellipse 70% 45% at 50% 0%, rgba(198, 169, 107, .16), transparent 70%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(155, 28, 49, .10), transparent 70%);
}

h1, h2 { font-family: var(--font-heading); font-weight: 400; line-height: 1.25; margin: 0 0 .5em; letter-spacing: .01em; }
h1 { font-size: clamp(2rem, 7vw, 2.9rem); }
h2 { font-size: clamp(1.55rem, 5vw, 2rem); color: var(--brown); }
h1:focus, h2:focus { outline: none; }

a { color: var(--wine); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.theme-dark a { color: var(--gold-light); }

main { flex: 1; width: 100%; max-width: 640px; margin: 0 auto; padding: 32px 16px 48px; position: relative; }

/* ---------- Brillance du doré ---------- */
.shine {
  background: var(--gold-shine);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 9s ease-in-out infinite;
}
@keyframes shimmer {
  0%, 100% { background-position: 100% 0; }
  50% { background-position: 0% 0; }
}

/* Filet doré qui scintille */
.gold-rule {
  display: block;
  width: 72px;
  height: 1px;
  margin: 22px auto 0;
  background: var(--gold-shine);
  background-size: 250% 100%;
  animation: shimmer 9s ease-in-out infinite;
}

/* Poussière d'étoiles sur les écrans sombres */
.theme-dark main::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(244, 230, 194, .8), transparent 60%),
    radial-gradient(1px 1px at 82% 9%, rgba(244, 230, 194, .7), transparent 60%),
    radial-gradient(1.5px 1.5px at 90% 34%, rgba(244, 230, 194, .6), transparent 60%),
    radial-gradient(1px 1px at 6% 52%, rgba(244, 230, 194, .6), transparent 60%),
    radial-gradient(1px 1px at 72% 66%, rgba(244, 230, 194, .5), transparent 60%),
    radial-gradient(1.5px 1.5px at 22% 84%, rgba(244, 230, 194, .5), transparent 60%);
  animation: twinkle 7s ease-in-out infinite;
}
@keyframes twinkle { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

/* ---------- Écrans ---------- */
.step { animation: fadein .9s var(--ease); position: relative; }
@keyframes fadein { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.step-dark { text-align: center; padding-top: 16px; }
.step-dark .intro { text-align: left; max-width: 520px; margin: 0 auto 32px; }
.step-dark .intro p { margin: 0 0 1.1em; }
.step-dark .lead { font-family: var(--font-heading); font-style: italic; font-size: 1.3rem; color: var(--gold-light); }

.logo {
  display: block;
  margin: 0 auto 22px;
  width: 110px;
  height: auto;
}
/* Halo doré discret derrière le lotus, sur fond sombre */
.theme-dark .logo { filter: drop-shadow(0 0 18px rgba(198, 169, 107, .35)); }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .74rem;
  font-weight: 600;
  margin: 0 0 .9em;
}
.step-dark h1 { color: var(--cream); margin-bottom: 30px; }

.step-intro { color: var(--brown-soft); margin: 0 0 32px; font-size: 1.05rem; }

/* Sur les pages claires, le formulaire repose sur un voile translucide */
body:not(.theme-dark) #demande {
  background: var(--veil);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  padding: 32px 20px 24px;
  box-shadow: 0 20px 50px -30px rgba(107, 90, 79, .35);
}
body:not(.theme-dark) .step h2::after {
  content: "";
  display: block;
  width: 48px;
  height: 1px;
  margin-top: 14px;
  background: var(--gold-shine);
  background-size: 250% 100%;
  animation: shimmer 9s ease-in-out infinite;
}

/* ---------- Champs ---------- */
.field { margin: 0 0 30px; border: 0; padding: 0; min-width: 0; }
.field:not(.field-check) > label:not(.dropzone):not(.choice), .field > legend, .label {
  display: block;
  font-weight: 400;
  font-size: 1.06rem;
  color: var(--ink);
  margin-bottom: 10px;
  padding: 0;
  line-height: 1.5;
}
.req { color: var(--wine); }
.optional { font-weight: 400; color: var(--brown-soft); }
.help { color: var(--brown-soft); font-size: .94rem; margin: 0 0 12px; }

input[type="text"], input[type="tel"], input[type="email"], input[type="date"], textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem; /* 16px minimum : évite le zoom automatique sur iPhone */
  color: var(--brown);
  background: var(--veil-strong);
  border: 1px solid var(--gold-line);
  border-radius: 12px;
  padding: 13px 15px;
  transition: border-color .3s, box-shadow .3s, background-color .3s;
}
textarea { resize: vertical; min-height: 140px; line-height: 1.6; }
input:focus, textarea:focus {
  outline: none;
  background: var(--white);
  border-color: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-faint);
}

[aria-invalid="true"] { border-color: var(--error) !important; }
.error-msg { color: var(--error); font-size: .92rem; font-weight: 600; margin: 8px 0 0; }
.theme-dark .error-msg { color: var(--gold-light); }

/* Choix (radio) : grandes zones faciles à toucher */
.choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 15px;
  margin: 0 0 8px;
  background: rgba(255, 253, 250, .5);
  border: 1px solid var(--gold-line);
  border-radius: 12px;
  cursor: pointer;
  font-weight: 400;
  transition: border-color .3s, background-color .3s, box-shadow .3s;
}
.choice:hover { background: var(--veil-strong); border-color: var(--gold); }
.choice:has(input:checked) {
  background: var(--white);
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-faint), 0 6px 18px -12px rgba(155, 28, 49, .45);
}
.choice input { margin: 4px 0 0; flex-shrink: 0; }
.choices-inline { display: flex; flex-wrap: wrap; gap: 8px; }
.choices-inline .choice { margin: 0; }
fieldset[aria-invalid="true"] .choice { border-color: var(--error); }

input[type="radio"], input[type="checkbox"] { accent-color: var(--wine); width: 20px; height: 20px; }
.theme-dark input[type="checkbox"] { accent-color: var(--gold); }

.field-check { display: flex; align-items: flex-start; gap: 12px; }
.field-check input { margin: 3px 0 0; flex-shrink: 0; }
.field-check label { font-weight: 400; margin: 0; cursor: pointer; }
.step-dark .field-check { max-width: 520px; margin: 0 auto 22px; text-align: left; font-size: 1.1rem; }
.field-optin { margin-top: -8px; font-size: .94rem; color: var(--brown-soft); }

.notice {
  border-left: 1px solid var(--gold);
  padding: 4px 0 4px 16px;
  margin: 0 0 14px;
  font-family: var(--font-heading);
  font-style: italic;
  color: var(--brown-soft);
}

.minor-msg {
  max-width: 520px;
  margin: 0 auto 24px;
  padding: 16px 18px;
  border: 1px solid var(--gold-line);
  border-radius: 12px;
  background: rgba(255, 253, 250, .04);
  text-align: left;
}

/* ---------- Images ---------- */
.dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  border: 1px dashed var(--gold);
  border-radius: var(--radius);
  background: rgba(255, 253, 250, .45);
  cursor: pointer;
  font-weight: 500;
  color: var(--wine);
  transition: background-color .3s;
}
.dropzone:hover { background: var(--veil-strong); }
.dropzone:focus-within { outline: 3px solid var(--gold-faint); outline-offset: 2px; border-color: var(--gold); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone.is-full { opacity: .5; cursor: not-allowed; }

.thumbs { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.thumbs li { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: rgba(232, 221, 204, .6); border: 1px solid var(--gold-line); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; padding: 6px; text-align: center; font-size: .72rem; color: var(--brown-soft); word-break: break-all; }
.thumb-placeholder strong { font-size: .85rem; color: var(--brown); }
.thumb-remove {
  position: absolute; top: 5px; right: 5px;
  width: 30px; height: 30px;
  border-radius: 50%; border: 1px solid rgba(255, 253, 250, .5);
  background: rgba(43, 33, 26, .55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--white);
  font-size: 1.1rem; line-height: 1; cursor: pointer;
}
.thumb-remove:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.images-errors p { color: var(--error); font-size: .92rem; font-weight: 600; margin: 8px 0 0; }

/* ---------- Boutons et navigation ---------- */
.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px;
  padding: 12px 30px;
  border-radius: 30px;
  border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: .98rem;
  letter-spacing: .04em;
  cursor: pointer;
  transition: background-color .3s, color .3s, border-color .3s, box-shadow .3s;
}
/* Reflet qui glisse sur le bouton au survol */
.btn::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: skewX(-20deg);
  transition: left .9s var(--ease);
  pointer-events: none;
}
.btn:hover::after { left: 130%; }

.btn-wine { background: var(--wine); color: var(--white); box-shadow: 0 8px 22px -12px rgba(155, 28, 49, .7); }
.btn-wine:hover { background: #8a1a2c; }
.btn-gold {
  background: var(--gold-shine);
  background-size: 250% 100%;
  animation: shimmer 9s ease-in-out infinite;
  color: var(--ink);
  box-shadow: 0 0 28px -6px rgba(198, 169, 107, .55);
}
.btn-ghost { background: rgba(255, 253, 250, .35); color: var(--brown); border-color: var(--gold-line); }
.btn-ghost:hover { background: var(--veil-strong); border-color: var(--gold); }
.btn:focus-visible, .choice:has(input:focus-visible), .field-check input:focus-visible, a:focus-visible {
  outline: 3px solid var(--wine);
  outline-offset: 2px;
}
.theme-dark .btn:focus-visible, .theme-dark a:focus-visible, .theme-dark .field-check input:focus-visible { outline-color: var(--gold-light); }

.actions { display: flex; justify-content: space-between; gap: 12px; }
.actions-center { justify-content: center; }
.actions .btn-wine { margin-left: auto; }

.stepper { margin-top: 12px; }
.progress { height: 2px; background: var(--gold-faint); border-radius: 2px; overflow: hidden; margin-bottom: 10px; }
.progress-bar {
  height: 100%; width: 0;
  background: var(--gold-shine);
  background-size: 250% 100%;
  animation: shimmer 9s ease-in-out infinite;
  transition: width .8s var(--ease);
}
.progress-label { font-size: .8rem; color: var(--brown-soft); margin: 0 0 20px; letter-spacing: .12em; text-transform: uppercase; }

/* ---------- Envoi ---------- */
.turnstile { margin: 0 0 16px; }
.turnstile:empty { margin: 0; }
.envoi { margin: 0 0 16px; }
.envoi .progress { height: 3px; }
.btn:disabled { opacity: .6; cursor: progress; }

/* ---------- Remerciement ---------- */
.journal {
  max-width: 520px;
  margin: 8px auto 32px;
  padding: 28px 24px;
  text-align: left;
  background: rgba(255, 253, 250, .04);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(198, 169, 107, .35);
  border-radius: var(--radius);
  box-shadow: 0 0 40px -20px rgba(198, 169, 107, .4);
}
.journal-intro { font-style: italic; color: var(--gold-light); margin: 0 0 16px; }
.journal ol { margin: 0; padding-left: 1.3em; }
.journal li { margin: 0 0 1em; font-family: var(--font-heading); font-size: 1.1rem; line-height: 1.55; }
.journal li::marker { color: var(--gold); }
.signature { font-family: var(--font-heading); font-style: italic; font-size: 1.4rem; }
.signature .shine { font-style: italic; }
.signature small { display: block; font-style: normal; font-family: var(--font-body); font-size: .74rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }

.fin {
  max-width: 520px;
  margin: 36px auto 0;
  padding-top: 28px;
  border-top: 1px solid rgba(198, 169, 107, .25);
  font-size: .95rem;
  color: rgba(243, 236, 225, .75);
}
.fin p { margin: 0 0 .8em; }
.btn-ghost-dark {
  margin-top: 16px;
  background: transparent;
  color: var(--gold-light);
  border-color: rgba(198, 169, 107, .45);
  text-decoration: none;
}
.btn-ghost-dark:hover { border-color: var(--gold); background: rgba(198, 169, 107, .08); }

/* ---------- Pages de texte (confidentialité) ---------- */
.page-texte {
  background: var(--veil);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  padding: 32px 20px;
}
.page-texte h1 { text-align: center; color: var(--ink); font-size: clamp(1.8rem, 6vw, 2.4rem); }
.page-texte h2 { font-size: 1.3rem; margin: 2em 0 .6em; color: var(--ink); }
.page-texte h2::after { content: ""; display: block; width: 40px; height: 1px; margin-top: 10px; background: var(--gold); }
.page-texte p, .page-texte li { color: var(--brown); }
.page-texte ul { padding-left: 1.2em; }
.page-texte li { margin-bottom: .5em; }
.page-texte li::marker { color: var(--gold); }
.texte-centre { text-align: center; color: var(--wine); }
.version { text-align: center; color: var(--brown-soft); font-size: .9rem; margin: 0 0 28px; }
.chapeau { font-family: var(--font-heading); font-style: italic; font-size: 1.12rem; line-height: 1.6; }
.retour-formulaire { text-align: center; margin: 40px 0 0; }
.retour-formulaire .btn { text-decoration: none; }
@media (min-width: 700px) { .page-texte { padding: 48px 48px; } }

/* ---------- Pied de page ---------- */
.site-footer { text-align: center; padding: 24px 16px 32px; font-size: .82rem; color: var(--brown-soft); letter-spacing: .03em; }
.site-footer a { color: inherit; }
.theme-dark .site-footer { color: rgba(243, 236, 225, .55); }
.site-footer span { margin: 0 8px; color: var(--gold); }

/* ---------- Divers ---------- */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
[hidden] { display: none !important; }

/* Étiquette « À VALIDER » pour un futur texte pas encore approuvé par Nathalie */
.av {
  display: inline-block;
  font: 700 .66rem/1 var(--font-body);
  letter-spacing: .08em;
  padding: 4px 7px;
  margin: 0 6px 6px 0;
  border-radius: 4px;
  background: #ffe28a;
  color: #3a2c00;
  vertical-align: middle;
}

@media (min-width: 700px) {
  main { padding-top: 56px; }
  body:not(.theme-dark) #demande { padding: 44px 44px 32px; }
}

/* Si la personne a demandé moins de mouvement : tout reste immobile */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
