/* LA PAGE CLIENTS (3.38.0 ; envoi des photos en 3.39.0) — src/pages/depot.html. Autonome : rien de
   style.css. Trois modèles (classe modele-… sur body) : le fond du haut de page et sa couleur de texte
   (ton-…). Deux modes (mode-tel / mode-ordi, posés par depot.js) : les gros boutons, ou le QR code et
   la zone de dépôt. */

:root {
  --fond: #faf6ef; --carte: #ffffff; --bord: #e8dccb; --encre: #2a1f16; --doux: #5a4634; --or: #9a5a1f;
  --sombre: #221810; --creme: #f6ecdc; --ok: #2f7d4f; --ko: #a8322a; --attention-fond: #fff3dc; --attention: #6b4410;
  --ombre: 0 1px 2px rgba(42, 31, 22, .06), 0 8px 24px rgba(42, 31, 22, .08);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --fond: #16110c; --carte: #211912; --bord: #3a2d21; --encre: #f3e9da; --doux: #cdbba3; --or: #e0b070;
    --ok: #7fcf9a; --ko: #f19a90; --attention-fond: #3a2a14; --attention: #f0d29c; --ombre: none; }
}

/* Chaque modèle : son fond, son cadrage (téléphone / grand écran), son voile et son panneau. */
.modele-telephone { --hero-img: url(/depot/fond-telephone.jpg); --hero-pos: center 30%; --hero-pos-large: center 72%; --panneau: #f6efe3;
  --voile: linear-gradient(180deg, rgba(250,244,234,.92) 0%, rgba(250,244,234,.7) 34%, rgba(250,244,234,0) 56%); }
.modele-atelier { --hero-img: url(/depot/fond-atelier.jpg); --hero-pos: center 62%; --hero-pos-large: center 70%; --panneau: #1f160f;
  --voile: linear-gradient(180deg, rgba(24,16,10,.94) 0%, rgba(24,16,10,.76) 36%, rgba(24,16,10,0) 60%); }
.modele-table { --hero-img: url(/depot/fond-table.jpg); --hero-pos: center 72%; --hero-pos-large: center 66%; --panneau: #f4ede2;
  --voile: linear-gradient(180deg, rgba(250,246,238,.9) 0%, rgba(250,246,238,.66) 34%, rgba(250,246,238,0) 54%); }
.ton-clair { --hero-encre: #2a1f16; --hero-doux: #5a4634; --hero-or: #9a5a1f; --cta-fond: #2a1f16; --cta-encre: #f6ecdc; --sous-fond: rgba(255, 251, 244, .84); }
.ton-sombre { --hero-encre: #f6ecdc; --hero-doux: #e3d2b8; --hero-or: #e0b070; --cta-fond: #e0b070; --cta-encre: #2a1f16; --sous-fond: rgba(20, 14, 9, .62); }

* { box-sizing: border-box; }
/* `hidden` doit gagner contre les display des classes (grilles, flex) posées plus bas. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--fond); color: var(--encre); font: 16px/1.5 var(--sans); overflow-x: hidden; }

/* ---- Haut de page ---------------------------------------------------------------------------- */
.hero { position: relative; min-height: min(88svh, 760px); background: var(--sombre) var(--hero-img) var(--hero-pos) / cover no-repeat; }
.hero-voile { position: absolute; inset: 0; background: var(--voile); }
.hero-texte { position: relative; padding: calc(28px + env(safe-area-inset-top)) max(22px, env(safe-area-inset-right)) 28px max(22px, env(safe-area-inset-left));
  max-width: 640px; color: var(--hero-encre); }
.kicker { margin: 0 0 14px; font: 700 13px/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--hero-or); }
h1 { margin: 0 0 14px; font: 700 clamp(32px, 8.4vw, 60px)/1.08 var(--serif); letter-spacing: -.01em; text-wrap: balance; overflow-wrap: break-word; }
/* La phrase sous le titre (02/10/2026 : « on ne la voit pas bien ») : texte foncé et plus gras, et sur
   téléphone, où la photo passe derrière, un léger cartouche crème qui la détache du fond. */
.sous { display: inline-block; max-width: 100%; margin: 0 0 22px; padding: 10px 14px; border-radius: 12px;
  font: 600 clamp(17px, 4.3vw, 22px)/1.45 var(--sans); color: var(--hero-encre); background: var(--sous-fond);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.cta { display: inline-block; padding: 14px 24px; border-radius: 999px; background: var(--cta-fond); color: var(--cta-encre);
  font: 700 17px/1 var(--sans); text-decoration: none; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
.cta:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid var(--or); outline-offset: 2px; }

@media (min-width: 900px) {
  /* Grand écran : le texte sur un panneau à gauche, la photo à droite, comme l'aperçu du lien. */
  .hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 560px; background: var(--panneau); }
  .hero::after { content: ""; grid-column: 2; grid-row: 1; background: var(--hero-img) var(--hero-pos-large) / cover no-repeat; }
  .hero-voile { display: none; }
  .sous { padding: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .hero-texte { grid-column: 1; grid-row: 1; align-self: center; padding: 56px 48px 56px max(48px, calc((100vw - 1200px) / 2)); }
}

.atouts { list-style: none; margin: 0; padding: 14px 12px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px;
  background: #2a1f16; color: var(--creme); font: 600 clamp(13px, 3.6vw, 15px)/1.3 var(--sans); }
.atouts li { display: flex; align-items: center; gap: 14px; white-space: nowrap; }
.atouts li + li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #e0b070; }

/* ---- Corps ----------------------------------------------------------------------------------- */
main { max-width: 760px; margin: 0 auto; padding: 22px 16px 8px; display: grid; gap: 18px; }
.carte { background: var(--carte); border: 1px solid var(--bord); border-radius: 16px; padding: 22px 20px; box-shadow: var(--ombre); min-width: 0; }
h2 { margin: 0 0 10px; font: 700 24px/1.2 var(--serif); }
h3 { margin: 0 0 6px; font: 700 18px/1.25 var(--serif); }
.conseil { margin: 0 0 18px; color: var(--doux); }
button { font: inherit; cursor: pointer; }
.cache { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
.lien { padding: 4px 0; border: 0; background: none; color: var(--or); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }

.boutons { display: grid; gap: 10px; margin-bottom: 14px; }
@media (min-width: 560px) { .boutons { grid-template-columns: 1fr 1fr; } }
.gros { min-height: 58px; padding: 12px 16px; border-radius: 14px; border: 2px solid var(--encre); background: transparent; color: var(--encre);
  font-weight: 700; font-size: 17px; }
.gros:active, .moyen:active, .envoyer:active { transform: translateY(1px); }
.moyen { min-height: 48px; padding: 10px 18px; border-radius: 12px; border: 2px solid var(--encre); background: var(--carte); color: var(--encre); font-weight: 700; }

/* Les deux modes : téléphone (gros boutons) ou ordinateur (QR code + dépôt de fichiers). Sans JS,
   les deux boutons du téléphone restent visibles. */
.pour-ordi { display: none; }
.mode-ordi .pour-tel { display: none; }
.mode-ordi .pour-ordi { display: block; }
.changer-mode { margin: 0 0 6px; font-size: 14px; }
.changer-mode .lien { font-weight: 500; color: var(--doux); }

.ordi { margin-bottom: 12px; }
.qr-bloc { display: flex; gap: 22px; align-items: center; padding: 4px 0 18px; }
.qr-image { flex: none; min-width: 188px; min-height: 188px; display: grid; place-items: center; border-radius: 10px; background: #fff;
  padding: 4px; border: 1px solid var(--bord); }
.qr-image img { display: block; width: 178px; height: 178px; }
/* Le QR à jeton est dimensionné par depot.js (pixels entiers par module), ses bords restent nets. */
.qr-image svg { display: block; shape-rendering: crispEdges; }
.qr-texte p { margin: 0 0 8px; color: var(--doux); }
/* Mode ordinateur choisi sur un petit écran (tablette, lien « Afficher le QR code ») : en colonne. */
@media (max-width: 559px) { .qr-bloc { flex-direction: column; align-items: flex-start; } }
.tel-etat { display: inline-block; margin-top: 4px !important; padding: 6px 12px; border-radius: 999px; background: var(--attention-fond); color: var(--attention) !important;
  font-weight: 600; font-size: 14px; }
.tel-etat.vu { background: rgba(47, 125, 79, .12); color: var(--ok) !important; }
.depose { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; padding: 18px 20px;
  border: 2px dashed var(--bord); border-radius: 14px; transition: border-color .15s, background-color .15s; }
.depose p { margin: 0; color: var(--doux); }
.depose b { color: var(--encre); }
.glisse .depose { border-color: var(--or); background: rgba(154, 90, 31, .08); }

/* Envoi interrompu d'un autre passage (navigateur partagé) : la question passe avant les boutons, sans
   rien montrer de ses photos. */
.reprise { margin: 0 0 16px; padding: 12px 14px; border-radius: 12px; background: var(--attention-fond); color: var(--attention); }
.reprise p { margin: 0 0 10px; }
.reprise-boutons { display: flex; flex-wrap: wrap; gap: 8px; }
.reprise-boutons .moyen { flex: 1 1 220px; }
/* Pendant la question, pas de QR : le code de secours (sans jeton) ouvrirait un envoi à part, dont les
   photos ne s'afficheraient pas ici. Le QR de l'envoi choisi vient après la réponse. */
.attente-reprise .qr-bloc { display: none; }

.alerte, .astuce { margin: 10px 0; padding: 10px 12px; border-radius: 10px; font-weight: 600; background: var(--attention-fond); color: var(--attention); }
.astuce { font-weight: 500; font-size: 15px; }

/* ---- Les vignettes --------------------------------------------------------------------------- */
.photos { margin: 14px 0 18px; }
.compte { margin: 0 0 8px; font-weight: 700; }
.vignettes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); gap: 8px; }
@media (min-width: 900px) { .vignettes { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); } }
.vg { position: relative; border-radius: 10px; overflow: hidden; background: var(--bord); border: 1px solid var(--bord); }
.vg-image { aspect-ratio: 1 / 1; display: grid; place-items: center; }
.vg-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.etat-prepa .vg-image { background: linear-gradient(100deg, var(--bord) 30%, var(--fond) 50%, var(--bord) 70%) 0 0 / 300% 100%;
  animation: lueur 1.4s linear infinite; }
@keyframes lueur { to { background-position: -300% 0; } }
.vg-etat { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 4px; font: 600 12px/1.2 var(--sans); color: #fff;
  background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.72)); overflow-wrap: anywhere; }
.etat-prepa .vg-etat { color: var(--encre); background: none; }
.vg-barre { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(0, 0, 0, .25); }
.vg-barre > span { display: block; height: 100%; background: #e0b070; transform-origin: 0 50%; transform: scaleX(0); transition: transform .2s; }
.etat-ok .vg-barre > span { background: #7fcf9a; }
.etat-ok .vg-barre, .etat-prepa .vg-barre, .etat-refusee .vg-barre { display: none; }
/* Refusée : texte ET contour, l'état ne repose jamais sur la seule couleur. */
.etat-refusee { border: 2px solid var(--ko); }
.etat-refusee .vg-image img { opacity: .4; }
/* Rouge foncé fixe : en thème sombre, --ko est clair et le texte blanc ne se lisait plus. */
.etat-refusee .vg-etat { background: #a8322a; color: #fff; padding-top: 4px; }
.etat-retrait { opacity: .5; }
.vg-x { position: absolute; top: 4px; right: 4px; width: 34px; height: 34px; border-radius: 50%; border: 0; padding: 0;
  background: rgba(20, 14, 9, .72); color: #fff; font: 700 22px/34px var(--sans); text-align: center; }
/* Une zone de toucher plus grande que la croix visible. */
.vg-x::before { content: ""; position: absolute; inset: -6px; }
.vg-x:disabled { opacity: .4; cursor: default; }

/* ---- Le formulaire --------------------------------------------------------------------------- */
.formulaire { margin-top: 6px; }
.etiquette { display: block; margin: 14px 0 6px; font-weight: 600; }
.formulaire > .etiquette:first-child { margin-top: 0; }
.facultatif { font-weight: 400; color: var(--doux); }
/* 16 px au moins : en dessous, iOS zoome sur le champ. */
input[type=email], input[type=text], textarea { width: 100%; min-height: 52px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--bord);
  background: var(--fond); color: var(--encre); font: 17px/1.4 var(--sans); }
textarea { min-height: 88px; resize: vertical; }
input[aria-invalid=true] { border: 2px solid var(--ko); }
.deux { display: grid; gap: 4px 16px; }
.deux input { max-width: 160px; }
@media (min-width: 560px) { .deux { grid-template-columns: 170px 1fr; align-items: end; } .deux .aide { margin-bottom: 4px; } }
.aide { margin: 4px 0 0; font-size: 14px; color: var(--doux); }
.erreur { margin: 6px 0 0; color: var(--ko); font-weight: 600; font-size: 15px; }
.erreur::before { content: "⚠ "; }
.suggestion { margin: 6px 0 0; font-size: 15px; }
.compteur { margin: 4px 0 0; font-size: 13px; color: var(--doux); text-align: right; }
.rgpd { margin: 14px 0 0; font-size: 13px; line-height: 1.45; color: var(--doux); }
.rgpd a, .legal a, .pied a { color: var(--or); }
.case { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 0; padding: 12px; border: 1px solid var(--bord); border-radius: 12px; font-size: 15px; }
.case input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--encre); }
.case label { cursor: pointer; }
.envoyer { width: 100%; min-height: 56px; margin-top: 16px; border: 0; border-radius: 14px; background: var(--encre); color: var(--fond);
  font-weight: 700; font-size: 17px; }
.envoyer[aria-busy=true] { opacity: .8; cursor: progress; }
.envoi-etat { margin: 10px 0 0; font-size: 15px; color: var(--doux); }
.bientot { display: none; margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--attention-fond); color: var(--attention); font-weight: 600; }
.ferme .bientot { display: block; }
.ferme .envoyer { opacity: .55; }
/* Page fermée, jeton d'un QR en cours d'examen par le serveur (depot.js, verifierJetonFerme) : pas de
   « ouvre très bientôt » qui passerait sous les yeux de l'associé dont le jeton sera accepté. */
.ferme.verif-jeton .bientot { display: none; }
.petit { margin: 14px 0 0; font-size: 14px; color: var(--doux); }
/* Une mention légale vide se voit : elle doit être remplie avant l'ouverture au public. */
.a-completer { font-style: italic; background: var(--attention-fond); color: var(--attention); padding: 0 4px; border-radius: 4px; }

/* ---- Fin d'envoi, lien expiré ---------------------------------------------------------------- */
.fin { text-align: center; padding: 10px 0 4px; }
.fin:focus { outline: none; }
.fin p { margin: 0 auto 12px; max-width: 520px; }
.fin .gros { margin-top: 8px; padding-left: 22px; padding-right: 22px; }
.fin-icone { width: 64px; height: 64px; margin: 4px auto 12px !important; border-radius: 50%; display: grid; place-items: center;
  background: var(--ok); color: #fff; font: 700 34px/1 var(--sans); }

/* ---- Bandeau hors ligne ---------------------------------------------------------------------- */
.hors-ligne { position: fixed; z-index: 30; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); margin: 0 auto; max-width: 560px;
  padding: 12px 14px; border-radius: 12px; background: #2a1f16; color: #f6ecdc; font-weight: 600; box-shadow: 0 6px 20px rgba(0, 0, 0, .3); }

/* ---- Comment ça marche, mentions --------------------------------------------------------------- */
.etapes { padding: 4px 4px 0; }
.etapes ol { margin: 0; padding: 0; list-style: none; counter-reset: etape; display: grid; gap: 12px; }
.etapes li { counter-increment: etape; position: relative; padding-left: 46px; color: var(--doux); min-height: 34px; }
.etapes li::before { content: counter(etape); position: absolute; left: 0; top: -2px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: #2a1f16; color: #e0b070; font: 700 16px/1 var(--serif); }
.etapes b { color: var(--encre); }

.legal { padding: 0; }
.legal summary { cursor: pointer; padding: 18px 20px; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.legal summary::-webkit-details-marker { display: none; }
.legal summary::after { content: "+"; font: 700 24px/1 var(--sans); color: var(--doux); }
.legal[open] summary::after { content: "–"; }
.legal summary h2 { margin: 0; font-size: 20px; }
.legal > :not(summary) { margin-left: 20px; margin-right: 20px; }
.legal > :last-child { margin-bottom: 20px; }
.legal h3 { margin-top: 18px; font-size: 16px; font-family: var(--sans); }
.legal p, .legal ul { margin-top: 0; margin-bottom: 8px; font-size: 14px; color: var(--doux); }
.legal ul { padding-left: 20px; }

.pied { max-width: 760px; margin: 0 auto; padding: 18px 16px calc(28px + env(safe-area-inset-bottom)); font-size: 13px; color: var(--doux); text-align: center; }
.pied p { margin: 0 0 8px; }

