/* ==========================================================================
   Mosaïk — « le labo photo »
   Blanc de labo et noir process ; filets noirs d'épaisseur fixe ; l'orange
   du dateur est le seul geste coloré (l'action, l'heure d'arrivée) ; la
   barre de calibration CMJN est le seul objet multicolore, et c'est le logo.
   ========================================================================== */

/* Polices servies par le site (licence SIL OFL, voir /fonts/LICENSE.txt) : plus rapide, et rien n'est envoyé à un tiers. */
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 400 900; font-stretch: 100% 125%; font-display: swap; src: url("/fonts/archivo-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 400 900; font-stretch: 100% 125%; font-display: swap; src: url("/fonts/archivo-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Spline Sans Mono"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("/fonts/spline-sans-mono-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Spline Sans Mono"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("/fonts/spline-sans-mono-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --ground: #f3f4f6;          /* blanc de labo, froid */
  --paper: #ffffff;           /* papier de tirage */
  --lab: #e4e6ea;             /* gris de la table lumineuse */
  --ink: #0f1114;             /* noir process */
  --ink-2: #4a4f58;           /* texte secondaire */
  --line: rgba(15, 17, 20, .13);
  --line-strong: rgba(15, 17, 20, .5);
  --bar: #0f1114;             /* bandeaux noirs (galerie, lien secret) */
  --bar-ink: #f3f4f6;
  --bar-2: #a9aeb7;
  --accent: #ff5b14;          /* orange dateur : l'action */
  --accent-hover: #e94c06;
  --accent-ink: #0f1114;
  --accent-text: #c23d00;     /* orange lisible en texte sur blanc */
  --stamp: #ff7a2a;           /* chiffres du dateur sur les tirages */
  --c: #00a0dc; --m: #e4007c; --y: #ffd200; --k: #0f1114;
  --ok: #1f7a4d;
  --danger: #c4161c;
  --rule: 2px solid var(--ink);
  --hair: 1px solid var(--line-strong);
  --shadow: 0 1px 2px rgba(15, 17, 20, .12), 0 6px 16px rgba(15, 17, 20, .08);
  --shadow-lg: 0 2px 4px rgba(15, 17, 20, .14), 0 18px 40px rgba(15, 17, 20, .18);
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Spline Sans Mono", ui-monospace, "Cascadia Mono", Menlo, monospace;
  --gutter: 16px;
  --maxw: 1240px;
  color-scheme: light;
}

/* La chambre noire : même labo, lumière éteinte. */
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0d0e10;
    --paper: #16181b;
    --lab: #1c1f23;
    --ink: #eceef1;
    --ink-2: #a5abb4;
    --line: rgba(236, 238, 241, .13);
    --line-strong: rgba(236, 238, 241, .45);
    --bar: #050607;
    --bar-ink: #eceef1;
    --bar-2: #a5abb4;
    --accent-hover: #ff7a3d;
    --accent-text: #ff7a3d;
    --k: #2a2e34;
    --ok: #4cc38a;
    --danger: #ff6b6b;
    --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 6px 16px rgba(0, 0, 0, .4);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .5), 0 18px 40px rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}

@media (min-width: 720px) { :root { --gutter: 32px; } }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--line-strong) transparent; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 1rem/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
::selection { background: var(--accent); color: var(--accent-ink); }
main { flex: 1; }
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1.5px; }
button, input, textarea, select { font: inherit; color: inherit; }
input, textarea { caret-color: var(--accent); }
h1, h2, h3 { font-weight: 800; line-height: 1.02; letter-spacing: -.025em; margin: 0; text-wrap: balance; }
h1, h2 { font-stretch: 110%; }
p { margin: 0; }
strong { font-weight: 700; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--ink-2); }
.small { font-size: .85rem; }
.hint { font-size: .86rem; color: var(--ink-2); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.tnum, .mono { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }

/* ---------- barre de calibration (le logo) ---------- */
.cal { display: inline-flex; flex: none; }
.cal i { display: block; width: 9px; height: 20px; }
.cal i:nth-child(1) { background: var(--c); }
.cal i:nth-child(2) { background: var(--m); }
.cal i:nth-child(3) { background: var(--y); }
.cal i:nth-child(4) { background: #0f1114; }
@media (prefers-color-scheme: dark) { .cal i:nth-child(4) { background: #f3f4f6; } }
.cal-strip { display: grid; grid-template-columns: repeat(4, 1fr); height: 8px; }
.cal-strip i { display: block; }
.cal-strip i:nth-child(1) { background: var(--c); }
.cal-strip i:nth-child(2) { background: var(--m); }
.cal-strip i:nth-child(3) { background: var(--y); }
.cal-strip i:nth-child(4) { background: #0f1114; }
@media (prefers-color-scheme: dark) { .cal-strip i:nth-child(4) { background: #f3f4f6; } }

.brand {
  display: inline-flex; align-items: center; gap: 12px; min-height: 44px;
  font-weight: 900; font-stretch: 125%; font-size: 1.45rem; letter-spacing: .01em; line-height: 1;
  text-transform: uppercase; text-decoration: none;
}

/* ---------- bandeau de labo ---------- */
.topbar { border-bottom: var(--rule); background: var(--ground); }
.topbar .wrap { display: flex; align-items: center; gap: 12px 28px; min-height: 68px; }
.topbar .mention { font-size: .84rem; font-weight: 600; color: var(--ink-2); }
.topbar nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav-link { font-weight: 600; font-size: .95rem; text-decoration: none; padding: 10px 12px; }
.nav-link:hover { text-decoration: underline; }
@media (max-width: 879px) { .topbar .mention, .topbar .nav-link.wide-only { display: none; } }
.topbar .wrap > .btn { margin-left: auto; }
@media (max-width: 420px) { .brand { font-size: 1.2rem; gap: 9px; } .topbar .wrap > .btn { padding: 0 14px; font-size: .9rem; } }

/* ---------- boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 0;
  border: 1.5px solid var(--line-strong); background: var(--paper); color: var(--ink);
  font-weight: 700; font-size: .96rem; text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s, transform .12s, color .15s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 750; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ink { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.btn-ink:hover { background: color-mix(in srgb, var(--ink) 82%, var(--ground)); border-color: transparent; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--line); border-color: transparent; }
.btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.btn-danger:hover { border-color: var(--danger); }
.btn-lg { min-height: 58px; padding: 0 28px; font-size: 1.06rem; }
.btn-icon { width: 48px; padding: 0; }
.btn[disabled] { opacity: .55; pointer-events: none; }

/* ---------- formulaires ---------- */
.field { display: grid; gap: 7px; }
.field label, fieldset.field legend { font-weight: 700; font-size: .92rem; }
.input {
  width: 100%; min-height: 52px; padding: 12px 16px;
  border: var(--rule); border-radius: 0;
  background: var(--paper); font-size: 1rem; transition: box-shadow .15s;
}
.input::placeholder { color: color-mix(in srgb, var(--ink-2) 80%, transparent); }
textarea.input { min-height: 92px; resize: vertical; }
.input:focus { outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent); }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.field legend { padding: 0; margin-bottom: 8px; }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; }
.switch input { appearance: none; width: 52px; height: 30px; border-radius: 0; background: var(--line-strong); position: relative; flex: none; cursor: pointer; transition: background .2s; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; background: #fff; transition: transform .2s cubic-bezier(.2, .8, .2, 1); }
.switch input:checked { background: var(--ink); }
.switch input:checked::after { transform: translateX(22px); background: var(--accent); }

.inline-form { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-form .input { flex: 1 1 200px; min-width: 0; }

.options { border-top: var(--hair); }
.options summary { cursor: pointer; padding: 14px 0; font-weight: 700; font-size: .92rem; list-style: none; display: flex; align-items: center; gap: 10px; }
.options summary::-webkit-details-marker { display: none; }
.options summary::before { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .2s; }
.options[open] summary::before { transform: rotate(45deg); }
.options-body { display: grid; gap: 16px; padding: 0 0 6px; }

/* Le contenant de base : un feuillet imprimé, angles vifs. */
.card { background: var(--paper); border: 1.5px solid var(--ink); padding: 22px; }
@media (min-width: 720px) { .card { padding: 28px; } }
.notice { display: flex; gap: 10px; align-items: center; padding: 12px 16px; background: var(--paper); border: var(--hair); font-size: .92rem; margin-top: 14px; }
.notice svg { width: 18px; height: 18px; flex: none; color: var(--ink-2); }

/* ==========================================================================
   Accueil
   ========================================================================== */

/* La commande : deux colonnes séparées par un filet, la pochette sur la table lumineuse. */
.hero { border-bottom: var(--rule); }
.hero-grid { display: grid; }
.hero-copy { padding: 40px 0 44px; display: flex; flex-direction: column; min-width: 0; }
.hero h1 { font-size: clamp(2.35rem, 4.7vw, 4.4rem); font-weight: 850; font-stretch: 112%; line-height: .95; letter-spacing: -.04em; }
.hero h1 .dev { font-stretch: 125%; font-weight: 900; }
.hero .lead { margin-top: 22px; font-size: clamp(1.05rem, 1.35vw, 1.2rem); color: var(--ink-2); max-width: 34em; }
.occasions { margin-top: 12px; font-size: .92rem; color: var(--ink-2); font-weight: 600; }
@media (min-width: 1000px) {
  .hero-grid { grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr); min-height: min(860px, calc(100dvh - 70px)); }
  .hero-copy { padding: 56px 48px 48px 0; border-right: var(--rule); }
}

/* Le bon de commande : un vrai formulaire de labo. */
.order { margin-top: 34px; background: var(--paper); border: var(--rule); }
.order-head { display: flex; justify-content: space-between; gap: 12px; padding: 9px 16px; border-bottom: var(--rule); font-family: var(--mono); font-size: .76rem; font-weight: 600; letter-spacing: .03em; font-variant-numeric: tabular-nums; }
.order-head > span:last-child, .order-no { color: var(--ink-2); }
.order-no { margin-left: 10px; }
.order form { display: grid; }
.order .main-row { display: grid; }
.order .main-row .field { padding: 14px 16px 16px; gap: 4px; }
.order .main-row label { font-size: .8rem; }
.order .main-row .input { border: 0; padding: 4px 0; min-height: 44px; font-size: clamp(1.25rem, 2vw, 1.55rem); font-weight: 650; background: transparent; }
.order .main-row .input:focus { box-shadow: none; }
.order .main-row .field:focus-within { box-shadow: inset 0 -4px 0 var(--accent); }
.order .main-row .btn { min-height: 62px; border: 0; border-top: var(--rule); font-size: 1.1rem; }
@media (min-width: 560px) {
  .order .main-row { grid-template-columns: 1fr auto; }
  .order .main-row .btn { border-top: 0; border-left: var(--rule); min-height: 100%; padding: 0 30px; }
}
.order .services { list-style: none; margin: 0; padding: 10px 16px; display: flex; flex-wrap: wrap; gap: 6px 22px; border-top: var(--rule); font-size: .88rem; font-weight: 600; }
.order .services li { display: inline-flex; align-items: center; gap: 8px; }
.order .services li::before { content: ""; width: 13px; height: 13px; border: 1.5px solid var(--ink); background: linear-gradient(45deg, transparent 44%, var(--ink) 44% 56%, transparent 56%), linear-gradient(-45deg, transparent 44%, var(--ink) 44% 56%, transparent 56%); flex: none; }
.order .options { margin: 0 16px; }
.order .options-body { padding-bottom: 16px; }
.order .fineprint { font-size: .84rem; color: var(--ink-2); padding: 0 16px 14px; }

/* La table lumineuse : la pochette ouverte, les tirages qui en sortent, la galerie sur le téléphone. */
.hero-lab { position: relative; background: var(--lab); min-height: 560px; overflow: hidden; margin: 0 calc(var(--gutter) * -1); border-top: var(--rule); }
@media (min-width: 1000px) { .hero-lab { margin: 0 calc((100vw - min(100vw, var(--maxw))) / -2 - var(--gutter)) 0 0; border-top: 0; min-height: 0; } }
.hero-lab .demo-note { position: absolute; left: 16px; top: 12px; font-size: .74rem; font-weight: 600; color: var(--ink-2); z-index: 5; }

/* La pochette : grande, posée en bas de la table et qui en déborde ; les tirages sortent de sa bouche. */
.pochette { position: absolute; left: 5%; width: 60%; top: 45%; bottom: -60px; transform: rotate(-2deg); z-index: 2; }
/* Le rabat ouvert, derrière les tirages. */
.pochette::before { content: ""; position: absolute; left: 0; right: 0; bottom: calc(100% - 2px); height: 36%; background: #fbfbfc; clip-path: polygon(0 100%, 50% 0, 100% 100%); z-index: 0; }
@media (prefers-color-scheme: dark) { .pochette::before { background: #c9ccd2; } }
.envelope {
  position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column;
  background: #fff; color: #0f1114; border: 2px solid #0f1114;
  box-shadow: 0 2px 3px rgba(15, 17, 20, .16), 0 24px 50px rgba(15, 17, 20, .22);
}
/* La bouche de la pochette : l'ombre de l'intérieur, sous le bord. */
.envelope::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 14px; background: linear-gradient(rgba(15, 17, 20, .22), transparent); pointer-events: none; }
.env-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 2px solid #0f1114; }
.env-head .brand { font-size: 1.15rem; }
.env-head .cal i { height: 16px; width: 7px; }
.env-head .cal i:nth-child(4) { background: #0f1114; }
.env-head .env-kind { margin-left: auto; font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-align: right; line-height: 1.25; }
.env-body { display: grid; grid-template-columns: 1fr auto; gap: 14px; padding: 16px; align-items: end; }
.env-label { display: grid; gap: 6px; min-width: 0; }
.env-label small { font-size: .7rem; font-weight: 700; letter-spacing: .05em; color: #4a4f58; }
.env-label .pc-name { font-weight: 850; font-stretch: 108%; font-size: clamp(1.25rem, 2.1vw, 1.8rem); line-height: 1; letter-spacing: -.02em; overflow-wrap: anywhere; border-bottom: 2px dotted #0f1114; padding-bottom: 8px; min-height: 1.6em; }
.envelope.typing .pc-name { color: #c23d00; }
.env-label .env-meta { font-family: var(--mono); font-size: .72rem; color: #4a4f58; font-variant-numeric: tabular-nums; }
.env-qr { width: 104px; padding: 6px; border: 2px solid #0f1114; background: #fff; }
.env-qr img { width: 100%; height: auto; aspect-ratio: 1; }
.env-lines { list-style: none; margin: 0; padding: 8px 16px 0; display: grid; gap: 18px; }
.env-lines li { display: flex; align-items: baseline; gap: 10px; font-size: .74rem; font-weight: 700; color: #4a4f58; }
.env-lines i { flex: 1; border-bottom: 1.5px dashed rgba(15, 17, 20, .35); }

/* Un tirage : bord blanc, l'heure en chiffres de dateur. Il dépasse de la pochette. */
.print {
  position: absolute; margin: 0; background: #fff; padding: 9px 9px 30px; z-index: 1; bottom: calc(100% + 4px);
  box-shadow: 0 2px 3px rgba(15, 17, 20, .18), 0 14px 30px rgba(15, 17, 20, .18);
}
.print img { width: 100%; height: 100%; object-fit: cover; }
.print .ph { position: relative; overflow: hidden; }
.print figcaption { position: absolute; left: 10px; bottom: 7px; font-size: .78rem; font-weight: 650; color: #0f1114; }
.print-a { left: 2%; width: 50%; transform: rotate(-6deg); transform-origin: 50% 100%; }
.print-a .ph { aspect-ratio: 3 / 2; }
.print-b { left: 57%; width: 38%; transform: rotate(5deg); transform-origin: 50% 100%; }
.print-b .ph { aspect-ratio: 4 / 5; }
.stamp, .stamp-inline {
  font-family: var(--mono); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .02em; color: var(--stamp);
  text-shadow: 0 0 2px rgba(0, 0, 0, .95), 0 0 6px rgba(0, 0, 0, .7), 0 1px 1px rgba(0, 0, 0, .9);
}
.print .ph .stamp { position: absolute; right: 12px; bottom: 6px; font-size: .9rem; }

/* Le téléphone : la vraie galerie, telle qu'un invité la voit, dans un boîtier fin. */
.phone {
  position: absolute; right: 4%; top: 7%; width: min(270px, 31%); z-index: 3;
  background: #15171a; border-radius: 40px; padding: 2.8%;
  box-shadow: 0 0 0 1px #2c3036, inset 0 0 0 1px rgba(255, 255, 255, .07), 0 2px 4px rgba(15, 17, 20, .3), 0 30px 60px rgba(15, 17, 20, .32);
}
.phone::before { content: ""; position: absolute; right: -3px; top: 22%; width: 3px; height: 12%; background: #2c3036; border-radius: 0 2px 2px 0; }
.phone-screen {
  container-type: inline-size; position: relative; overflow: hidden; display: flex; flex-direction: column;
  aspect-ratio: 9 / 19.5; border-radius: 32px; background: #0f1114; color: #0f1114;
}
.ph-top { background: #0f1114; color: #f3f4f6; padding: 0 5cqw 4.5cqw; }
.ph-status { display: flex; justify-content: space-between; align-items: center; height: 11cqw; padding: 0 2cqw; font-size: 4cqw; font-weight: 700; font-variant-numeric: tabular-nums; }
.ph-sys { display: inline-flex; align-items: center; gap: 1.6cqw; }
.ph-sys .sig { width: 4.6cqw; height: 3cqw; background: linear-gradient(90deg, #f3f4f6 0 20%, transparent 20% 27%, #f3f4f6 27% 47%, transparent 47% 54%, #f3f4f6 54% 74%, transparent 74% 81%, #f3f4f6 81%); clip-path: polygon(0 100%, 100% 0, 100% 100%); }
.ph-sys .bat { width: 6.4cqw; height: 3.2cqw; border: .5cqw solid #f3f4f6; border-radius: 1cqw; position: relative; }
.ph-sys .bat::after { content: ""; position: absolute; inset: .5cqw; right: 1.6cqw; background: #f3f4f6; border-radius: .3cqw; }
.ph-head { display: flex; align-items: center; gap: 3cqw; margin-top: 1.5cqw; min-width: 0; }
.ph-head .cal i { width: 2.2cqw; height: 5.6cqw; }
.ph-head .cal i:nth-child(4) { background: #f3f4f6; }
.ph-head > div { min-width: 0; }
.ph-head strong { display: block; font-weight: 850; font-stretch: 108%; font-size: 6.2cqw; line-height: 1.05; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-head > div span { display: block; font-size: 3.5cqw; color: #a9aeb7; margin-top: 1cqw; font-variant-numeric: tabular-nums; }
.ph-body { flex: 1; min-height: 0; background: #f3f4f6; padding: 3.2cqw 3cqw 0; overflow: hidden; }
.ph-chips { display: flex; gap: 1.6cqw; margin-bottom: 3cqw; }
.ph-chips span { flex: none; font-size: 3.4cqw; font-weight: 650; line-height: 1; padding: 2.2cqw 3cqw; border: 1px solid rgba(15, 17, 20, .35); color: #4a4f58; }
.ph-chips .on { background: #0f1114; border-color: #0f1114; color: #f3f4f6; }
.ph-grid { display: grid; gap: 1.2cqw; }
.ph-row { display: flex; gap: 1.2cqw; }
.ph-row.r1 { aspect-ratio: 1.6; }
.ph-row.r2 { aspect-ratio: 2.2; }
.ph-row.r3 { aspect-ratio: 2.3; }
.ph-row.r4 { aspect-ratio: 3.05; }
.ph-row .t { position: relative; overflow: hidden; background: #c9ccd2; min-width: 0; }
.ph-row .w15 { flex: 1.5; } .ph-row .w067 { flex: .67; } .ph-row .w075 { flex: .75; }
.ph-row .t.latest { outline: 2px solid #ff5b14; outline-offset: -2px; }
.ph-row img { width: 100%; height: 100%; object-fit: cover; }
.ph-row .stamp { position: absolute; right: 1.8cqw; bottom: 1.2cqw; font-size: 3cqw; }
.phone-fab {
  position: absolute; left: 50%; bottom: 8cqw; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 2cqw;
  background: #ff5b14; color: #0f1114; font-weight: 750; font-size: 4cqw; padding: 3.6cqw 5.2cqw; white-space: nowrap;
  box-shadow: 0 2px 4px rgba(15, 17, 20, .2), 0 10px 22px rgba(15, 17, 20, .3);
}
.phone-fab svg { width: 4.8cqw; height: 4.8cqw; }
.ph-home { position: absolute; left: 50%; bottom: 2.4cqw; width: 34cqw; height: 1.4cqw; transform: translateX(-50%); border-radius: 99px; background: rgba(15, 17, 20, .75); }

/* Une photo vient d'arriver dans la galerie du téléphone : elle se développe. */
.ph-row .t.developing img { animation: develop 2.6s cubic-bezier(.3, .7, .2, 1) both; animation-delay: .5s; }

@media (max-width: 999px) {
  .hero-lab { min-height: 0; height: min(680px, 96vw); }
  .pochette { left: 4%; width: 58%; top: 44%; }
  .phone { right: 4%; top: 6%; width: 32%; }
}
@media (max-width: 560px) {
  .hero-lab { height: 132vw; }
  .pochette { left: 3%; width: 60%; top: 50%; }
  .env-head { padding: 10px 12px; }
  .env-head .brand { font-size: .95rem; }
  .env-head .env-kind { display: none; }
  .env-body { grid-template-columns: 1fr; padding: 12px; gap: 10px; }
  .env-qr { width: 64px; padding: 4px; }
  .env-lines { display: none; }
  .phone { width: 35%; right: 3%; top: 5%; border-radius: 24px; }
  .phone-screen { border-radius: 19px; }
  .print { padding: 6px 6px 22px; }
  .print figcaption { font-size: .66rem; left: 7px; bottom: 4px; }
  .print .ph .stamp { font-size: .74rem; right: 6px; bottom: 4px; }
  .print-a { width: 58%; left: 0; }
  .print-b { width: 40%; left: 60%; }
}

/* Sections : empilées nettes, séparées par de vrais vides. */
.sec { padding: 88px 0; }
.sec h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); max-width: 18ch; }
.sec .sec-lead { margin-top: 18px; color: var(--ink-2); font-size: 1.08rem; max-width: 46em; }
@media (max-width: 719px) { .sec { padding: 64px 0; } }

/* La planche-contact : deux bandes de pellicule, quelques vues cochées au crayon gras. */
.contact { margin-top: 44px; background: #0f1114; color: #eceef1; padding: 30px 0; }
@media (prefers-color-scheme: dark) { .contact { background: #050607; border-block: 1px solid var(--line); } }
.contact-sheet { display: grid; gap: 22px; }
.strip {
  list-style: none; margin: 0; padding: 24px 0; display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 10px;
  position: relative; overflow-x: auto; scrollbar-width: none;
}
.strip::-webkit-scrollbar { display: none; }
.strip:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.strip::before, .strip::after {
  content: ""; position: absolute; left: 0; right: 0; height: 9px; min-width: 640px;
  background: repeating-linear-gradient(90deg, transparent 0 12px, #3a3f47 12px 22px);
}
.strip::before { top: 6px; }
.strip::after { bottom: 6px; }
.frame { position: relative; margin: 0; padding: 0; }
.frame img { width: 100%; aspect-ratio: 3 / 2; height: auto; object-fit: cover; }
.frame .edge { position: absolute; left: 2px; top: -21px; font-family: var(--mono); font-size: .68rem; color: #8d939c; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.frame .pick { position: absolute; inset: -12px -10px; width: calc(100% + 20px); height: calc(100% + 24px); pointer-events: none; overflow: visible; }
.frame .pick path { fill: none; stroke: #f3f4f6; stroke-width: 3.2; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.moments { list-style: none; margin: 40px 0 0; padding: 0; border-top: var(--rule); }
.moments li { display: grid; gap: 4px 32px; padding: 24px 0; border-bottom: var(--hair); align-items: baseline; }
@media (min-width: 820px) { .moments li { grid-template-columns: 180px minmax(0, 1fr) minmax(0, 1.3fr); } }
.moments .when { font-weight: 850; font-stretch: 115%; font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -.03em; line-height: 1; }
.moments h3 { font-size: clamp(1.15rem, 1.8vw, 1.4rem); }
.moments p { color: var(--ink-2); max-width: 52ch; }

/* Le tarif : tout est inclus, le total reste à zéro. */
.tarif .wrap { display: grid; gap: 36px; }
@media (min-width: 960px) { .tarif .wrap { grid-template-columns: minmax(0, .85fr) minmax(0, 1.25fr); gap: 64px; align-items: start; } .tarif .intro { position: sticky; top: 32px; } }
.tarif .intro ul { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 10px; }
.tarif .intro li { display: flex; gap: 10px; align-items: baseline; font-weight: 600; }
.tarif .intro li::before { content: ""; width: 10px; height: 10px; background: var(--ink); flex: none; transform: translateY(-1px); }
.pricelist { width: 100%; border-collapse: collapse; background: var(--paper); border: var(--rule); }
.pricelist caption { caption-side: top; text-align: left; padding: 10px 16px; border: var(--rule); border-bottom: 0; font-family: var(--mono); font-size: .76rem; font-weight: 600; letter-spacing: .03em; display: table-caption; }
.pricelist th, .pricelist td { padding: 16px; text-align: left; vertical-align: baseline; border-top: var(--hair); }
.pricelist tbody tr:first-child > * { border-top: 0; }
.pricelist th { font-weight: 400; }
.pricelist th strong { display: block; font-size: 1.06rem; }
.pricelist th span { display: block; color: var(--ink-2); font-size: .92rem; margin-top: 2px; }
.pricelist td { font-family: var(--mono); font-weight: 600; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pricelist tfoot th, .pricelist tfoot td { border-top: var(--rule); font-size: 1.25rem; font-weight: 800; padding: 18px 16px; }
.pricelist tfoot th { font-stretch: 110%; }
.pricelist tfoot td { color: var(--accent-text); }

/* Questions. */
.faq .wrap { display: grid; gap: 10px; }
@media (min-width: 900px) { .faq .wrap { grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: 64px; align-items: start; } .faq h2 { position: sticky; top: 32px; } }
.faq-list { border-top: var(--rule); }
.faq-item { border-bottom: var(--hair); }
.faq-item summary { cursor: pointer; padding: 20px 40px 20px 0; font-weight: 700; font-size: 1.08rem; list-style: none; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 14px; height: 2px; background: var(--ink); box-shadow: none; transition: transform .25s; }
.faq-item summary::before { content: ""; position: absolute; right: 14px; top: calc(50% - 6px); width: 2px; height: 14px; background: var(--ink); transition: transform .25s; }
.faq-item[open] summary::before { transform: scaleY(0); }
.faq-item p { padding: 0 0 22px; color: var(--ink-2); max-width: 62ch; }

/* La dernière ligne de la pochette : on revient au bon de commande. */
.closing { background: var(--bar); color: var(--bar-ink); padding: 72px 0; }
.closing .wrap { display: grid; gap: 26px; align-items: end; }
@media (min-width: 860px) { .closing .wrap { grid-template-columns: 1fr auto; } }
.closing h2 { font-size: clamp(2rem, 4.6vw, 3.6rem); max-width: 16ch; }
.closing p { color: var(--bar-2); margin-top: 14px; max-width: 40em; }

.my-galleries { padding: 0 0 80px; }
.my-galleries h2 { font-size: 1.7rem; margin-bottom: 16px; }
.gal-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
@media (min-width: 760px) { .gal-list { grid-template-columns: repeat(2, 1fr); } }
.gal-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: var(--paper); border: 1.5px solid var(--ink); }
.gal-list > li { min-width: 0; }
.gal-list .info { min-width: 0; flex: 1; }
.gal-list .name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gal-list .role { font-size: .82rem; color: var(--ink-2); }
.gal-list .actions { display: flex; gap: 6px; flex: none; }
.gal-list .btn { min-height: 44px; padding: 0 14px; font-size: .9rem; }

.footer { margin-top: auto; border-top: var(--rule); }
.footer .wrap { padding-top: 22px; padding-bottom: 30px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; color: var(--ink-2); font-size: .88rem; }
.footer .brand { font-size: 1rem; color: var(--ink); }
.footer .cal i { height: 14px; width: 6px; }
.footer .end { margin-left: auto; }

/* ==========================================================================
   Galerie (invités)
   ========================================================================== */
.g-header { position: sticky; top: 0; z-index: 20; background: var(--bar); color: var(--bar-ink); }
.g-header .wrap { display: flex; align-items: center; gap: 14px; min-height: 70px; padding-top: 8px; padding-bottom: 8px; }
.g-header .home-mark { flex: none; display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 4px; text-decoration: none; }
.g-header .home-mark .cal i:nth-child(4) { background: #f3f4f6; }
.g-header .titles { flex: 1; min-width: 0; }
.g-header h1 { font-size: clamp(1.2rem, 2.4vw, 1.6rem); font-weight: 850; font-stretch: 108%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-header .count { font-size: .84rem; line-height: 1.35; color: var(--bar-2); font-variant-numeric: tabular-nums; margin-top: 2px; }
.g-header .tools { display: flex; gap: 4px; flex: none; }
.g-header .btn { background: transparent; color: var(--bar-ink); border-color: rgba(243, 244, 246, .35); }
.g-header .btn:hover { background: rgba(243, 244, 246, .12); border-color: var(--bar-ink); }
.g-header .btn-ghost { border-color: transparent; }
@media (max-width: 599px) {
  .g-header .btn .label { display: none; } .g-header .btn:not(.btn-icon) { width: 44px; padding: 0; }
  .g-header .wrap { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 12px; row-gap: 2px; padding-top: 10px; padding-bottom: 10px; }
  .g-header .titles { display: contents; }
  .g-header .home-mark { grid-row: 1; align-self: center; }
  .g-header h1 { grid-row: 1; grid-column: 2; white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.05; align-self: center; }
  .g-header .tools { grid-row: 1; grid-column: 3; align-self: center; }
  .g-header .count { grid-row: 2; grid-column: 1 / -1; }
}

.g-intro { padding: 20px 0 4px; }
.g-intro p { max-width: 60ch; color: var(--ink-2); font-size: 1.02rem; }

/* Rangs justifiés : chaque photo garde sa vraie forme, les rangs remplissent la largeur. */
.grid { --row: 128px; display: flex; flex-wrap: wrap; gap: 4px; padding: 18px 0 28px; }
.grid::after { content: ""; flex-grow: 100000; }
@media (min-width: 560px) { .grid { --row: 190px; gap: 8px; } }
@media (min-width: 1000px) { .grid { --row: 240px; gap: 10px; } }
.tile {
  position: relative; overflow: hidden; background: var(--lab); border: 0; padding: 0; cursor: pointer; border-radius: 0;
  height: var(--row); flex-grow: calc(var(--r, 1) * 100); flex-basis: calc(var(--r, 1) * var(--row)); min-width: 0; max-width: 100%;
}
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2, .8, .2, 1), opacity .4s; opacity: 0; }
.tile img.loaded { opacity: 1; }
@media (hover: hover) { .tile:hover img { transform: scale(1.035); } }
/* Chaque tirage porte son heure d'arrivée, comme le dos dateur d'un appareil. */
.tile .stamp { position: absolute; right: 7px; bottom: 5px; font-size: .74rem; pointer-events: none; }
@media (min-width: 560px) { .tile .stamp { font-size: .82rem; right: 9px; bottom: 7px; } }
.selecting .tile .stamp { display: none; }
/* Repère « maintenant » : la dernière photo arrivée. */
.tile.is-latest { outline: 3px solid var(--accent); outline-offset: -3px; }
.tile .check { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border: 2px solid #fff; background: rgba(0, 0, 0, .3); display: none; place-items: center; color: #fff; }
.tile .check svg { width: 16px; height: 16px; opacity: 0; }
.selecting .tile .check { display: grid; }
.tile.selected .check { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tile.selected .check svg { opacity: 1; }
.tile.selected img { transform: scale(.9); }
.tile-open { position: absolute; inset: 0; z-index: 1; border: 0; padding: 0; background: none; cursor: pointer; }
.tile .del { position: absolute; z-index: 2; top: 0; right: 0; width: 44px; height: 44px; border: 0; background: rgba(15, 17, 20, .78); color: #fff; display: grid; place-items: center; cursor: pointer; }
.tile .del svg { width: 16px; height: 16px; }
.tile .del:hover { background: var(--danger); }
/* Une photo arrive : elle se développe, du gris voilé à l'image. */
.tile.is-new img.loaded { animation: develop 2.2s cubic-bezier(.3, .7, .2, 1); }
.tile.is-new { animation: settle .5s cubic-bezier(.2, .8, .2, 1); }
@keyframes develop { from { filter: grayscale(1) contrast(.35) brightness(1.55); } 60% { filter: grayscale(.4) contrast(.85) brightness(1.1); } to { filter: none; } }
@keyframes settle { from { transform: translateY(-10px); opacity: 0; } to { transform: none; opacity: 1; } }

.tile-ph { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; color: var(--ink-2); font-size: .78rem; font-weight: 650; text-align: center; padding: 6px; }
.tile-ph svg { width: 34px; height: 34px; }
.tile-ph .spin { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin 1s linear infinite; }
.badge-video { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 46px; height: 46px; border-radius: 50%; background: rgba(15, 17, 20, .55); color: #fff; display: grid; place-items: center; pointer-events: none; }
.badge-video svg { width: 16px; height: 16px; margin-left: 2px; }
.badge-likes { position: absolute; left: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; background: rgba(15, 17, 20, .7); color: #fff; font-family: var(--mono); font-size: .72rem; font-weight: 600; pointer-events: none; font-variant-numeric: tabular-nums; }
.badge-likes svg { width: 11px; height: 11px; }
.badge-pending { position: absolute; left: 6px; top: 6px; padding: 3px 8px; background: #0f1114; color: #fff; font-family: var(--mono); font-size: .68rem; font-weight: 600; letter-spacing: .03em; pointer-events: none; }
.tile.is-pending img { filter: grayscale(.7) brightness(.85); }
.tile .approve { position: absolute; z-index: 2; bottom: 0; right: 0; width: 44px; height: 44px; border: 0; background: var(--ok); color: #fff; display: grid; place-items: center; cursor: pointer; }
.tile .approve svg { width: 16px; height: 16px; }
.pending-card .badge-likes, .admin .tile .stamp { display: none; }

.empty { text-align: center; padding: 56px 16px 160px; display: grid; justify-items: center; gap: 14px; }
.empty .empty-print { width: 150px; background: var(--paper); padding: 8px 8px 26px; box-shadow: var(--shadow); transform: rotate(-3deg); margin-bottom: 10px; }
.empty .empty-print span { display: block; aspect-ratio: 4 / 5; background: var(--lab); position: relative; }
.empty .empty-print .stamp { position: absolute; right: 8px; bottom: 6px; font-size: .8rem; }
.empty h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
.empty p { color: var(--ink-2); max-width: 28em; }

/* Filtres : les options non choisies restent visibles, le choix s'inverse. */
.filters { display: flex; gap: 6px; overflow-x: auto; padding: 16px var(--gutter) 2px 0; margin-right: calc(var(--gutter) * -1); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.filters::-webkit-scrollbar { display: none; }
.chip-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 0; border: 1.5px solid var(--line-strong); background: transparent; color: var(--ink-2); font-weight: 650; font-size: .9rem; cursor: pointer; transition: all .15s; }
.chip-btn:hover { border-color: var(--ink); color: var(--ink); }
.chip-btn svg { width: 13px; height: 13px; }
.chip-btn.active { background: var(--ink); color: var(--ground); border-color: var(--ink); }
@media (max-width: 599px) { .chip-btn { padding: 0 10px; font-size: .84rem; gap: 5px; } }
.chip-sep { flex: none; width: 1.5px; background: var(--line-strong); margin: 6px 4px; }

.expiry-note { text-align: center; color: var(--ink-2); font-size: .84rem; margin: 0 0 6px; }

.fab {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  z-index: 30; box-shadow: 0 2px 4px rgba(15, 17, 20, .2), 0 14px 30px rgba(15, 17, 20, .3);
}
.fab:active { transform: translateX(-50%) translateY(1px); }

.selbar {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  z-index: 31; display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 18px;
  background: var(--bar); color: var(--bar-ink); box-shadow: var(--shadow-lg); border: 1px solid rgba(243, 244, 246, .14);
  width: max-content; max-width: calc(100vw - 32px);
}
.selbar .btn { min-height: 42px; }
.selbar .btn-ghost { color: var(--bar-ink); }
.selbar .btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.selbar strong { font-weight: 700; margin-right: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }

.uploads {
  position: fixed; right: 16px; left: 16px; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 32;
  background: var(--paper); border: 1.5px solid var(--ink); box-shadow: var(--shadow-lg);
  padding: 14px 16px; max-width: 440px; margin: 0 auto;
}
.uploads .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 700; font-size: .96rem; }
.uploads .row .muted { font-family: var(--mono); font-size: .82rem; font-variant-numeric: tabular-nums; }
.bar { height: 6px; background: var(--line); overflow: hidden; margin-top: 10px; }
.bar > span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .25s; }
.uploads .errors { margin-top: 8px; font-size: .84rem; color: var(--danger); }
.up-note { margin-top: 8px; font-size: .86rem; color: var(--ink-2); }

/* Écran du code d'accès : un feuillet du labo. */
.lock { display: grid; place-items: center; padding: 40px 0 90px; }
.lock-card { max-width: 420px; width: 100%; text-align: center; display: grid; padding: 0; overflow: hidden; }
.lock-card .lock-body { display: grid; gap: 12px; justify-items: center; padding: 28px 26px 30px; width: 100%; }
.lock-card .ico { width: 56px; height: 56px; background: var(--ink); color: var(--ground); display: grid; place-items: center; }
.lock-card .ico svg { width: 26px; height: 26px; }
.lock-card h2 { font-size: 1.9rem; }
.lock-form { display: grid; gap: 12px; width: 100%; margin-top: 8px; }
.pin-input { text-align: center; font-family: var(--mono); font-size: 1.6rem; letter-spacing: .4em; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- dialogues ---------- */
dialog {
  border: 1.5px solid var(--ink); padding: 0; background: var(--paper); color: var(--ink);
  border-radius: 0; box-shadow: var(--shadow-lg); width: min(460px, calc(100vw - 32px)); max-height: calc(100dvh - 32px);
}
dialog::backdrop { background: rgba(8, 9, 10, .62); }
dialog[open] { animation: dlg .3s cubic-bezier(.2, .8, .2, 1); }
@keyframes dlg { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.dlg-body { padding: 28px; display: grid; gap: 16px; }
.dlg-body h2 { font-size: 1.7rem; }
.dlg-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.dlg-actions-split { justify-content: space-between; }
.dlg-actions-split .btn { flex: 1; }
.dlg-close { position: absolute; top: 12px; right: 12px; }
.save-dlg .bar { margin-top: 0; }
.save-dlg .btn-lg { width: 100%; }
@media (max-width: 559px) {
  dialog.sheet { margin: auto auto 0; width: 100%; max-width: 100%; border-width: 1.5px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  dialog.sheet[open] { animation: sheet .3s cubic-bezier(.2, .8, .2, 1); }
}
@keyframes sheet { from { transform: translateY(100%); } to { transform: none; } }
.admin-grid > *, .stack > *, .qr-card > *, .qr-inner > *, .dlg-body > * { min-width: 0; }

.qr-box { background: #fff; padding: 12px; border: 2px solid #0f1114; width: min(260px, 70vw); margin: 0 auto; }
.qr-box img { width: 100%; height: auto; aspect-ratio: 1; }
.linkbox { display: flex; gap: 8px; align-items: center; padding: 6px 6px 6px 14px; border: var(--hair); background: var(--ground); }
.linkbox code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .84rem; font-family: var(--mono); }
.linkbox .btn { min-height: 44px; padding: 0 14px; font-size: .88rem; }

/* ---------- visionneuse ---------- */
.lightbox { position: fixed; inset: 0; z-index: 50; background: #08090a; color: #fff; display: flex; flex-direction: column; touch-action: none; }
.lightbox .lb-top, .lightbox .lb-bottom { display: flex; align-items: center; gap: 8px; padding: 10px 12px; z-index: 2; }
.lightbox .lb-top { padding-top: calc(10px + env(safe-area-inset-top)); }
.lightbox .lb-bottom { padding-bottom: calc(14px + env(safe-area-inset-bottom)); justify-content: center; }
.lightbox .lb-meta { flex: 1; min-width: 0; font-size: .9rem; color: rgba(255, 255, 255, .75); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lightbox .lb-meta strong { color: #fff; font-family: var(--mono); font-weight: 600; font-variant-numeric: tabular-nums; }
.lightbox .btn { background: rgba(255, 255, 255, .1); border-color: transparent; color: #fff; }
.lightbox .btn:hover { background: rgba(255, 255, 255, .2); }
.lightbox .btn-primary { background: var(--accent); color: var(--accent-ink); }
.lightbox .btn-primary:hover { background: var(--accent-hover); }
/* Le média remplit la scène et object-fit garde toute la photo visible. */
.lb-stage { flex: 1; min-height: 0; position: relative; overflow: hidden; display: grid; place-items: center; }
.lb-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; transition: transform .25s ease, opacity .25s; }
.lb-stage img.dragging { transition: none; }
.lb-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 54px; height: 54px; border: 0; background: rgba(255, 255, 255, .12); color: #fff; display: none; place-items: center; cursor: pointer; }
.lb-nav:hover { background: rgba(255, 255, 255, .25); }
.lb-nav svg { width: 24px; height: 24px; }
.lb-prev { left: 18px; } .lb-next { right: 18px; }
@media (hover: hover) and (min-width: 720px) { .lb-nav { display: grid; } }
.lb-spinner { position: absolute; width: 36px; height: 36px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .2); border-top-color: #fff; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.lb-like.liked, .lb-like.liked svg { color: var(--accent); }
.lb-burst { position: absolute; left: 50%; top: 50%; width: 96px; height: 96px; margin: -48px 0 0 -48px; color: #fff; pointer-events: none; filter: drop-shadow(0 4px 18px rgba(0, 0, 0, .5)); }
.lb-burst svg { width: 100%; height: 100%; }
.lb-burst.go { animation: burst .7s ease forwards; }
@keyframes burst { 0% { transform: scale(.2); opacity: 0; } 25% { transform: scale(1.15); opacity: 1; } 60% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.1); opacity: 0; } }

/* ---------- toast ---------- */
.toast {
  position: fixed; top: calc(16px + env(safe-area-inset-top)); left: 50%; transform: translate(-50%, -20px); opacity: 0;
  z-index: 60; background: var(--bar); color: var(--bar-ink); padding: 12px 18px; border: 1px solid rgba(243, 244, 246, .14);
  font-weight: 650; font-size: .94rem; box-shadow: var(--shadow-lg); transition: opacity .25s, transform .25s cubic-bezier(.2, .8, .2, 1);
  pointer-events: none; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); border-color: transparent; color: #fff; }

/* ==========================================================================
   Administration
   ========================================================================== */
.admin { padding-top: 36px; padding-bottom: 80px; }
.admin-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin: 0 0 28px; padding-bottom: 22px; border-bottom: var(--rule); }
.admin-head h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
.admin-head p { color: var(--ink-2); margin-top: 8px; }
.admin-grid { display: grid; gap: 20px; }
@media (min-width: 920px) { .admin-grid { grid-template-columns: 380px 1fr; align-items: start; } }
.stack { display: grid; gap: 20px; }
.qr-card { text-align: center; display: grid; gap: 18px; padding: 0; overflow: hidden; }
.qr-card .qr-inner { display: grid; gap: 18px; padding: 10px 22px 22px; }
.qr-card .qr-box { width: min(280px, 100%); }
.qr-card .btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.qr-card .btns .btn { padding: 0 10px; }
.qr-card .btns .btn.wide { grid-column: 1 / -1; }
.section-title { font-size: 1.3rem; font-stretch: 105%; margin-bottom: 14px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-title small { font-family: var(--mono); font-size: .8rem; font-stretch: 100%; color: var(--ink-2); font-weight: 600; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.settings-form { display: grid; gap: 18px; }
.secret { background: var(--bar); color: var(--bar-ink); border-color: var(--bar); }
.secret .section-title { color: var(--bar-ink); }
.secret p, .secret .hint { color: var(--bar-2); font-size: .92rem; }
.secret strong { color: var(--bar-ink); }
.secret .muted { color: var(--bar-2); }
.secret .linkbox { margin-top: 12px; background: rgba(255, 255, 255, .06); border-color: rgba(243, 244, 246, .2); color: var(--bar-ink); }
.secret .btn { background: #f3f4f6; color: #0f1114; border-color: transparent; }
.secret .btn-primary { background: var(--accent); color: var(--accent-ink); }
.secret .input { background: #16181b; color: #eceef1; border-color: rgba(243, 244, 246, .45); }
.email-form { display: grid; gap: 8px; margin-top: 18px; padding-top: 18px; border-top: 1px solid rgba(243, 244, 246, .2); }
.email-form label { font-weight: 700; font-size: .92rem; }
.success-banner { display: flex; gap: 14px; align-items: center; padding: 16px 18px; background: var(--paper); border: 1.5px solid var(--ink); border-left-width: 1.5px; margin-bottom: 24px; }
.success-banner svg { width: 28px; height: 28px; color: var(--ok); flex: none; }
.admin .grid { --row: 104px; padding: 0; gap: 6px; }
@media (min-width: 560px) { .admin .grid { --row: 120px; } }
.danger-zone { border-color: var(--danger); }
.danger-zone p { font-size: .92rem; margin: 4px 0 14px; }
.expiry-line { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; }
.expiry-line svg { width: 20px; height: 20px; flex: none; color: var(--ink-2); margin-top: 2px; }

.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { position: relative; }
.swatch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.swatch-dot { display: block; width: 44px; height: 44px; background: var(--c); cursor: pointer; box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--line-strong); transition: box-shadow .15s; }
.swatch input:checked + .swatch-dot { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--ink); }
.swatch input:focus-visible + .swatch-dot { outline: 3px solid var(--accent); outline-offset: 5px; }
.segmented { display: inline-flex; border: 1.5px solid var(--ink); flex-wrap: wrap; }
.segmented label { position: relative; }
.segmented label + label { border-left: 1.5px solid var(--ink); }
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented span { display: block; padding: 10px 16px; font-weight: 650; font-size: .9rem; cursor: pointer; color: var(--ink-2); }
.segmented input:checked + span { background: var(--ink); color: var(--ground); }
.segmented input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: -3px; }

/* ---------- affiche (aperçu + impression) ---------- */
.poster-editor { display: grid; gap: 22px; }
@media (min-width: 1100px) { .poster-editor { grid-template-columns: 1fr 240px; align-items: start; } }
.poster-preview { position: relative; overflow: hidden; border: var(--hair); background: #fff; max-width: 320px; width: 100%; margin: 0 auto; box-shadow: var(--shadow); }
.poster {
  --poster-accent: #ff5b14; --scale: .4;
  position: absolute; left: 0; top: 0; width: 794px; height: 1123px; transform: scale(var(--scale)); transform-origin: 0 0;
  background: #fff; color: #0f1114; display: grid; font-family: var(--font);
}
.poster[data-format="cards"] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.poster-sheet { display: flex; flex-direction: column; align-items: stretch; text-align: center; overflow: hidden; min-width: 0; }
.poster .p-head { display: flex; align-items: center; gap: 14px; padding: 26px 40px; border-bottom: 4px solid #0f1114; flex: none; }
.poster .p-cal { display: inline-flex; }
.poster .p-cal i { display: block; width: 14px; height: 30px; }
.poster .p-cal i:nth-child(1) { background: #00a0dc; } .poster .p-cal i:nth-child(2) { background: #e4007c; } .poster .p-cal i:nth-child(3) { background: #ffd200; } .poster .p-cal i:nth-child(4) { background: #0f1114; }
.poster .p-brand { font-weight: 900; font-stretch: 125%; font-size: 30px; letter-spacing: .01em; }
.poster .p-kind { margin-left: auto; font-family: var(--mono); font-size: 15px; font-weight: 600; }
.poster-sheet .p-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; padding: 30px 60px 40px; }
.poster .p-title { font-weight: 850; font-stretch: 110%; font-size: 66px; line-height: .98; letter-spacing: -.03em; max-width: 680px; overflow-wrap: anywhere; }
.poster .p-qr { width: 380px; height: 380px; padding: 16px; border: 5px solid var(--poster-accent); }
.poster .p-sub { font-weight: 600; font-size: 28px; line-height: 1.3; max-width: 560px; }
.poster .p-pin { font-weight: 700; font-size: 24px; }
.poster .p-pin span { display: inline-block; width: 160px; border-bottom: 3px dotted #0f1114; }
.poster .p-url { font: 600 16px var(--mono); color: #4a4f58; overflow-wrap: anywhere; }
.poster .p-band { height: 40px; background: var(--poster-accent); flex: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.poster[data-format="cards"] .poster-sheet { outline: 1px dashed #b4b9c1; }
.poster[data-format="cards"] .p-head { padding: 14px 20px; gap: 8px; border-bottom-width: 3px; }
.poster[data-format="cards"] .p-cal i { width: 8px; height: 18px; }
.poster[data-format="cards"] .p-brand { font-size: 17px; }
.poster[data-format="cards"] .p-kind { font-size: 9px; }
.poster[data-format="cards"] .p-main { gap: 12px; padding: 12px 26px 18px; }
.poster[data-format="cards"] .p-title { font-size: 30px; }
.poster[data-format="cards"] .p-qr { width: 200px; height: 200px; padding: 8px; border-width: 3px; }
.poster[data-format="cards"] .p-sub { font-size: 15px; }
.poster[data-format="cards"] .p-pin { font-size: 14px; }
.poster[data-format="cards"] .p-pin span { width: 90px; }
.poster[data-format="cards"] .p-url { font-size: 10px; }
.poster[data-format="cards"] .p-band { height: 18px; }

@media print {
  @page { size: A4; margin: 0; }
  html, body { background: #fff !important; }
  body * { visibility: hidden; }
  #poster, #poster * { visibility: visible; }
  .poster-preview { position: static; overflow: visible; border: 0; box-shadow: none; }
  #poster { position: fixed; left: 0; top: 0; transform: none; width: 210mm; height: 297mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .toast, dialog, .lightbox { display: none !important; }
}

/* ---------- mes galeries ---------- */
.account { padding-top: 36px; padding-bottom: 80px; display: grid; gap: 28px; align-content: start; }
.account h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); padding-bottom: 22px; border-bottom: var(--rule); }
.account .section-title { display: block; }
.account-card { display: grid; gap: 14px; max-width: 640px; }
.gal-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
@media (min-width: 760px) { .gal-cards { grid-template-columns: repeat(2, 1fr); } }
.gal-card { display: flex; flex-direction: column; justify-content: space-between; gap: 16px; }
.gal-card h3 { font-size: 1.35rem; margin-bottom: 4px; }
.gal-card .actions { display: flex; gap: 8px; }

/* ==========================================================================
   Diaporama : la chambre noire, projetée
   ========================================================================== */
.ss-body { background: #08090a; color: #fff; overflow: hidden; }
.ss-brand { position: fixed; left: 28px; top: 24px; z-index: 4; display: inline-flex; align-items: center; gap: 12px; color: #fff; transition: opacity .3s; }
.ss-brand .brand { font-size: 1.15rem; }
.ss-brand .cal i:nth-child(4) { background: #f3f4f6; }
.ss-brand #ss-count { font-family: var(--mono); font-size: .9rem; color: rgba(255, 255, 255, .7); font-variant-numeric: tabular-nums; }
.ss-stage { position: fixed; inset: 0; }
.ss-layer { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity 1.1s ease; }
.ss-layer.on { opacity: 1; }
.ss-layer img, .ss-layer video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.ss-layer.on img { animation: kenburns var(--dur, 9s) ease-out forwards; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.05); } }
.ss-caption { position: fixed; left: 28px; bottom: 28px; z-index: 4; display: inline-flex; align-items: baseline; gap: 14px; padding: 10px 18px; background: rgba(8, 9, 10, .72); font-weight: 700; font-size: clamp(1rem, 1.6vw, 1.4rem); }
.ss-caption .stamp-inline { font-size: .9em; }
.ss-qr { position: fixed; right: 28px; bottom: 28px; z-index: 4; display: flex; align-items: center; gap: 16px; padding: 0 20px 0 0; background: #fff; color: #0f1114; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); overflow: hidden; }
.ss-qr::before { content: ""; align-self: stretch; width: 10px; background: linear-gradient(#00a0dc 0 25%, #e4007c 25% 50%, #ffd200 50% 75%, #0f1114 75%); }
.ss-qr img { width: clamp(90px, 10vw, 150px); height: auto; aspect-ratio: 1; margin: 12px 0; }
.ss-qr strong { display: block; font-weight: 850; font-stretch: 108%; font-size: clamp(1.1rem, 1.7vw, 1.5rem); }
.ss-qr span { display: block; color: #4a4f58; font-size: .9rem; max-width: 14em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-empty, .ss-lock { position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; gap: 20px; padding: 24px; }
.ss-empty img { width: min(38vh, 70vw); height: auto; aspect-ratio: 1; background: #fff; padding: 16px; }
.ss-empty h1 { font-size: clamp(2.2rem, 5.5vw, 4rem); }
.ss-empty p, .ss-lock p { color: rgba(255, 255, 255, .78); font-size: 1.15rem; max-width: 30em; }
.ss-lock .input { background: #16181b; border-color: rgba(255, 255, 255, .45); color: #fff; }
.ss-controls { position: fixed; top: 18px; right: 18px; z-index: 5; display: flex; gap: 6px; align-items: center; transition: opacity .3s; }
.ss-controls .btn { background: rgba(8, 9, 10, .72); border-color: transparent; color: #fff; }
.ss-controls .btn:hover { background: rgba(255, 255, 255, .2); }
.ss-speed select { min-height: 48px; padding: 0 12px; background: rgba(8, 9, 10, .72); color: #fff; border: 0; border-radius: 0; font-family: var(--mono); font-weight: 600; }
.ss-speed option { color: #000; }
.idle .ss-controls, .idle .ss-brand { opacity: 0; pointer-events: none; }
.idle { cursor: none; }
@media (max-width: 640px) {
  .ss-qr { right: 12px; bottom: 12px; padding-right: 8px; }
  .ss-qr div { display: none; }
  .ss-caption { left: 12px; bottom: 12px; }
  .ss-brand { left: 14px; top: 18px; }
  .ss-brand #ss-count { display: none; }
}

/* ---------- 404 : la pellicule voilée ---------- */
.notfound { display: grid; justify-items: center; align-content: start; text-align: center; padding: 64px 16px 96px; gap: 18px; }
.nf-print { width: 220px; background: var(--paper); padding: 12px 12px 40px; box-shadow: var(--shadow-lg); transform: rotate(-3deg); margin-bottom: 18px; position: relative; }
.nf-print span:first-child { display: block; aspect-ratio: 4 / 5; background: var(--lab); }
.nf-print .stamp { position: absolute; right: 22px; bottom: 54px; font-size: 1.05rem; }
.notfound h1 { font-size: clamp(2.2rem, 6vw, 4rem); max-width: 16ch; }
.notfound p { color: var(--ink-2); max-width: 30em; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tile.is-new, .tile.is-new img.loaded, .ph-row .t.developing img, .ss-layer.on img, dialog[open], dialog.sheet[open], .lb-burst.go { animation: none; }
  .tile img, .tile:hover img, .btn, .toast, .switch input::after, .faq-item summary::before { transition-duration: .01ms; }
  .tile:hover img { transform: none; }
  .ss-layer { transition: opacity .3s linear; }
}

/* ---------- galerie d'exemple ---------- */
.demo-link { display: inline-block; margin-top: 18px; padding: 10px 0; font-weight: 700; text-decoration: underline; text-underline-offset: .25em; }
.demo-link::after { content: "\a0\2192"; display: inline-block; text-decoration: none; }
.try-demo { margin-top: 28px; }
.demo-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-top: 20px; padding: 16px 18px; background: var(--paper); border: 1.5px solid var(--ink); }
.demo-banner p { max-width: 52ch; }
.demo-banner strong { font-weight: 800; }

/* ---------- envois : relancer ce qui n'est pas passé ---------- */
.up-actions { display: flex; gap: 8px; margin-top: 12px; }
.up-actions .btn { min-height: 44px; }

/* ---------- espace organisateur : pour bien démarrer ---------- */
.first-steps { margin-bottom: 20px; }
.first-steps .steps { list-style: none; margin: 0; padding: 0; counter-reset: step; border-top: var(--rule); }
.first-steps .steps li { counter-increment: step; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 14px; padding: 16px 0; border-bottom: var(--hair); align-items: start; }
.first-steps .steps li::before { content: counter(step); grid-row: span 3; width: 36px; height: 36px; display: grid; place-items: center; background: var(--ink); color: var(--ground); font-family: var(--mono); font-weight: 600; }
.first-steps .steps strong { font-size: 1.05rem; }
.first-steps .steps span { color: var(--ink-2); }
.first-steps .steps .btn { justify-self: start; margin-top: 6px; }
@media (min-width: 900px) {
  .first-steps .steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; border-bottom: 0; }
  .first-steps .steps li { border-bottom: 0; }
}

/* ---------- page Confidentialité ---------- */
.legal { padding-top: 40px; padding-bottom: 88px; max-width: 820px; }
.legal h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); padding-bottom: 22px; border-bottom: var(--rule); }
.legal-lead { margin-top: 22px; font-size: 1.15rem; color: var(--ink-2); max-width: 46em; }
.legal section { padding: 28px 0; border-bottom: var(--hair); }
.legal h2 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); margin-bottom: 12px; }
.legal p, .legal li { max-width: 68ch; }
.legal p + p { margin-top: 10px; }
.legal ul { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; }
.legal ul + p { margin-top: 14px; }
.footer a { color: inherit; }
.g-legal { text-align: center; font-size: .84rem; color: var(--ink-2); margin: 0 0 calc(150px + env(safe-area-inset-bottom)); }
