/* =========================================================
   Concours Génépi Dolin — DA Dolin
   Couleurs relevées sur le logo officiel.
   ========================================================= */
:root {
  --vert: #305f3d;        /* vert du logo DOLIN */
  --vert-fonce: #16321d;  /* ombre des lettres / texte */
  --vert-nuit: #10261a;
  --vert-pale: #e6eadc;
  --rouge: #ae1524;       /* écu de Savoie */
  --rouge-fonce: #8c101d;
  --creme: #fbf8f2;       /* fond du logo */
  --papier: #fffdf8;
  --encre: #16321d;
  --gris: #5b6a5f;
  --ligne: #e3dccb;
  --champ: #ffffff;
  --erreur: #ae1524;

  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --script: 'Pinyon Script', 'Snell Roundhand', cursive;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 16px;
  --gutter: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--encre);
  background: var(--creme);
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2 { font-family: var(--serif); font-weight: 600; line-height: 1.02; margin: 0; }
p, figure { margin: 0; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Éléments à remplacer avant mise en ligne */
.tbd {
  background: rgba(174, 21, 36, .07);
  outline: 1px dashed currentColor;
  outline-offset: 1px;
  border-radius: 3px;
  padding: 0 .2em;
}

/* ---------- Layout ---------- */
.page { min-height: 100vh; display: flex; flex-direction: column; border-top: 4px solid var(--rouge); }
.layout { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--creme);
  padding: 18px var(--gutter) 0;
  overflow: hidden;
}
.hero-top {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
}
.logo { width: 150px; height: auto; }
.hero-link {
  position: absolute;
  right: 0;
  top: 2px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--vert);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}
.hero-link:hover { color: var(--rouge); }

.hero-text {
  position: relative;
  z-index: 2;
  padding: 26px 0 120px;
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.eyebrow {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--rouge);
  margin-bottom: 12px;
}
.hero h1 {
  font-size: clamp(2.6rem, 11vw, 4.8rem);
  font-weight: 700;
  color: var(--vert);
  letter-spacing: -.01em;
}
.hero h1 em {
  display: block;
  font-family: var(--script);
  font-style: normal;
  font-weight: 400;
  font-size: .82em;
  line-height: 1.1;
  color: var(--vert-fonce);
  margin-top: -.06em;
}
.lede { margin-top: 14px; color: var(--gris); max-width: 40ch; }

/* Carte du lot */
.lot-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  margin-top: 26px;
  background: #fff;
  border: 1px solid var(--ligne);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  box-shadow: 0 1px 2px rgba(22, 50, 29, .05), 0 20px 40px -24px rgba(22, 50, 29, .35);
}
.lot-card .lot-photo { width: 86%; height: auto; margin: 4px auto 6px; }
.lot-card figcaption { display: flex; flex-direction: column; gap: 3px; padding-top: 12px; border-top: 1px solid var(--ligne); }
.lot-card strong { font-family: var(--serif); font-size: 1.3rem; font-weight: 700; color: var(--vert-fonce); line-height: 1.15; }
.lot-card figcaption span { font-size: .8rem; color: var(--gris); line-height: 1.45; }
.lot-badge {
  position: absolute;
  top: -16px;
  left: -10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 66px; height: 66px;
  border-radius: 50%;
  background: var(--rouge);
  color: #fff;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.7rem;
  line-height: 1;
  box-shadow: 0 8px 18px -8px rgba(174, 21, 36, .7);
  transform: rotate(-8deg);
}
.lot-badge small { font-size: .75em; margin-right: 2px; font-weight: 600; }

.dates {
  margin-top: 22px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .02em;
  padding: 7px 14px;
  border: 1px solid rgba(48, 95, 61, .35);
  border-radius: 999px;
  color: var(--vert);
  background: rgba(255, 255, 255, .6);
}

.hero-cta { margin-top: 18px; min-width: 220px; text-decoration: none; }

.mountains {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  width: 100%;
  height: 170px;
  z-index: 1;
}

/* ---------- Formulaire ---------- */
.form-wrap {
  background:
    radial-gradient(90% 60% at 100% 0%, rgba(48, 95, 61, .55), transparent 70%),
    var(--vert-fonce);
  padding: 36px var(--gutter) 48px;
}
.card {
  max-width: 560px;
  margin: 0 auto;
  background: var(--papier);
  border-radius: var(--radius);
  padding: 28px 20px 24px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .55);
}
.card h2 { font-size: 2.1rem; color: var(--vert); font-weight: 700; }

.steps {
  list-style: none;
  padding: 0;
  margin: 14px 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--gris);
}
.steps li { display: flex; align-items: center; gap: 7px; }
.steps span {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--vert);
  color: #fff;
  font-size: .7rem;
}

.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 14px; }
.field { margin-bottom: 14px; }
.field label, .label {
  display: block;
  font-size: .86rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.req { color: var(--rouge); }

input[type="text"], input[type="tel"], input[type="email"] {
  width: 100%;
  height: 52px;
  padding: 0 14px;
  font: inherit;
  font-size: 16px; /* évite le zoom iOS */
  color: var(--encre);
  background: var(--champ);
  border: 1px solid var(--ligne);
  border-radius: 10px;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
  appearance: none;
}
input::placeholder { color: #a3a99f; }
input:focus { outline: none; border-color: var(--vert); box-shadow: 0 0 0 3px rgba(48, 95, 61, .2); }

.error { color: var(--erreur); font-size: .8rem; font-weight: 500; margin-top: 5px; }
.error:empty { display: none; }
.has-error input[type="text"], .has-error input[type="tel"], .has-error input[type="email"],
.has-error .dropzone { border-color: var(--erreur); }

/* Dépôt du ticket */
.field .dropzone {
  margin: 0;
  font-weight: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  padding: 22px 16px;
  background: var(--champ);
  border: 1.5px dashed #c9bfa8;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.is-drag { border-color: var(--vert); background: #f4f6ee; }
.dropzone:focus-within { border-color: var(--vert); box-shadow: 0 0 0 3px rgba(48, 95, 61, .2); }
.dz-icon { width: 34px; height: 34px; color: var(--vert); margin-bottom: 4px; }
.dz-title { font-weight: 700; color: var(--vert); }
.dz-hint { font-size: .78rem; color: var(--gris); }

.preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: var(--champ);
  border: 1px solid var(--ligne);
  border-radius: 12px;
}
.preview img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; background: #eee; }
.preview-icon { width: 56px; height: 56px; padding: 12px; color: var(--vert); background: var(--vert-pale); border-radius: 8px; }
.preview-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.preview-name { font-weight: 600; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-size { font-size: .78rem; color: var(--gris); }
.link-btn {
  font: inherit; font-size: .82rem; font-weight: 600;
  color: var(--rouge); background: none; border: 0; padding: 8px; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}

/* Cases à cocher */
.checks { margin: 8px 0 16px; }
.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: .86rem;
  line-height: 1.45;
  padding: 7px 0;
  cursor: pointer;
}
.check input {
  flex: none;
  width: 20px; height: 20px;
  margin: 1px 0 0;
  accent-color: var(--vert);
  cursor: pointer;
}
.check a { color: var(--vert); font-weight: 600; text-underline-offset: 3px; }
.checks .error { margin: -2px 0 4px 32px; }
.has-error.check span { color: var(--erreur); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Boutons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid rgba(48, 95, 61, .45); outline-offset: 2px; }
.btn-primary { background: var(--rouge); color: #fff; }
.btn-primary:hover { background: var(--rouge-fonce); }
.btn-ghost { background: transparent; color: var(--vert); border-color: var(--ligne); }
.btn-ghost:hover { border-color: var(--vert); }
.btn-submit { width: 100%; min-height: 56px; font-size: 1.02rem; }
.btn-submit[disabled] { opacity: .75; cursor: progress; }
.spinner {
  display: none;
  width: 18px; height: 18px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.is-loading .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-error {
  margin-bottom: 14px;
  padding: 12px 14px;
  font-size: .88rem;
  color: var(--erreur);
  background: #f9e8e8;
  border-radius: 10px;
}
.fine { margin-top: 14px; font-size: .74rem; color: var(--gris); line-height: 1.5; }
.fine a { color: var(--gris); }

/* Confirmation */
.success { text-align: center; padding: 40px 24px; }
.success:focus { outline: none; }
.success-mark {
  width: 64px; height: 64px;
  margin: 0 auto 18px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--vert);
  color: #fff;
}
.success-mark svg { width: 30px; height: 30px; }
.success h2 { font-size: 2.4rem; margin-bottom: 12px; }
.success p { color: var(--gris); max-width: 40ch; margin: 0 auto; }
.success .tbd { color: var(--encre); }
.demo-note { margin-top: 16px !important; font-size: .8rem; padding: 10px 12px; background: #f3efe2; border-radius: 8px; }
.success-sign { margin-top: 24px !important; font-family: var(--serif); font-size: 1.2rem; font-weight: 600; color: var(--vert) !important; }
.success-sign span { display: block; font-family: var(--script); font-weight: 400; font-size: 1.7rem; color: var(--vert-fonce); margin-top: 2px; }

/* ---------- Footer ---------- */
.footer {
  background: var(--vert-nuit);
  color: rgba(251, 248, 242, .7);
  padding: 24px var(--gutter) calc(24px + env(safe-area-inset-bottom));
  text-align: center;
  font-size: .78rem;
}
.evin { color: var(--creme); font-weight: 700; font-size: .9rem; margin-bottom: 12px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-bottom: 10px; }
.footer-links a { text-underline-offset: 3px; }
.footer-links a:hover { color: #fff; }

/* ---------- Âge ---------- */
.age-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: var(--gutter);
  background: rgba(16, 38, 26, .92);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.age-card {
  width: 100%;
  max-width: 420px;
  background: var(--creme);
  border-radius: var(--radius);
  border-top: 4px solid var(--rouge);
  padding: 28px 24px 22px;
  text-align: center;
}
.age-logo { width: 170px; height: auto; margin: 0 auto 20px; }
.age-card h2 { font-size: 2rem; color: var(--vert); font-weight: 700; margin-bottom: 10px; }
.age-card > p { color: var(--gris); font-size: .92rem; }
.age-actions { display: grid; gap: 10px; margin-top: 22px; }
.age-actions .btn-primary { background: var(--vert); }
.age-actions .btn-primary:hover { background: var(--vert-fonce); }
.age-refused { margin-top: 18px; color: var(--erreur) !important; font-weight: 600; }
.age-legal { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--ligne); font-size: .74rem !important; }

/* ---------- Stickers ---------- */
.sticker {
  position: absolute;
  z-index: 4;
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 6px 10px rgba(22, 50, 29, .22));
}
.sticker--alambic { width: 56px; top: 24px; left: 14px; transform: rotate(-8deg); }
.sticker--inline {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  width: .85em;
  margin-left: .1em;
  transform: rotate(14deg) translateY(-.18em);
}
.sticker--bottle { width: 44px; top: -46px; right: 12px; transform: rotate(9deg); }
.card { position: relative; }
.sticker--bouquet { width: 78px; top: -40px; right: -6px; transform: rotate(12deg); }
.age-card { position: relative; }
.sticker--age { width: 42px; top: -30px; right: 22px; transform: rotate(10deg); }
.lot-card { margin-top: 46px; }
.form-wrap { padding-top: 56px; }

/* ---------- Tablette ---------- */
@media (min-width: 560px) {
  :root { --gutter: 32px; }
  .logo { width: 180px; }
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { padding: 36px 34px 30px; }
  .lot-card { display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: 16px; text-align: left; padding: 18px 20px; }
  .lot-card .lot-photo { width: 100%; margin: 0; }
  .lot-card figcaption { border-top: 0; border-left: 1px solid var(--ligne); padding: 4px 0 4px 16px; }
  .mountains { height: 200px; }
  .sticker--alambic { width: 72px; top: 22px; left: 28px; }
  .sticker--bottle { width: 48px; }
}

/* ---------- Desktop : écran partagé ---------- */
@media (min-width: 980px) {
  :root { --gutter: 56px; }
  .layout { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); }
  .hero { padding-top: 32px; min-height: calc(100vh - 4px); }
  .hero-top { justify-content: flex-start; }
  .logo { width: 170px; }
  .hero-link { top: 10px; }
  .hero-text {
    flex: 1;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    margin: 0;
    max-width: 600px;
    padding: 28px 0 200px;
  }
  .hero h1 { font-size: clamp(4rem, 5.6vw, 5.6rem); }
  .lot-card { max-width: 500px; }
  .mountains { height: 240px; }
  .form-wrap { display: flex; flex-direction: column; justify-content: center; padding: 64px var(--gutter); }
  .hero-cta { display: none; }
  .sticker--alambic { width: 96px; left: auto; right: 6%; top: 84px; }
  .sticker--bottle { width: 80px; top: auto; bottom: -22px; right: -100px; }
  .sticker--bouquet { width: 118px; top: -56px; right: -34px; }
  .form-wrap { padding-top: 72px; }
  .card { width: 100%; padding: 42px 42px 34px; }
  .card h2 { font-size: 2.5rem; }
}

@media (min-width: 1200px) {
  .sticker--alambic { width: 150px; right: 7%; top: 25%; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation-duration: 1.5s !important; }
}
