/* Lettres à Elise — "la lueur dans la boîte" */
:root {
  --box:#16130f; --wood:#2c2018; --wood-edge:#5a3f2c; --brass:#b08d4f;
  --glow:#c7ecff; --glow-dim:#6f93a4; --paper:#f2ede2; --ink:#241f1a; --dim:#9a8b7b;
  --r:14px;
}
* { box-sizing:border-box; }
html,body { height:100%; }
body {
  margin:0; background:var(--box); color:#e9e2d6;
  font:400 15px/1.55 "Bricolage Grotesque", system-ui, sans-serif;
  -webkit-font-smoothing:antialiased;
}
a { color:var(--glow); }
h1,h2,h3 { font-weight:700; letter-spacing:-.01em; margin:0; }

.wordmark {
  font-family:"Silkscreen", monospace; font-size:13px; letter-spacing:.14em;
  color:var(--glow-dim); text-transform:uppercase;
}

/* ---------- boutons ---------- */
.btn {
  appearance:none; border:0; cursor:pointer; width:100%;
  font:700 15px/1 "Bricolage Grotesque", sans-serif; letter-spacing:.005em;
  padding:14px 18px; border-radius:12px; color:#0c1417;
  background:var(--glow); box-shadow:0 0 0 1px rgba(199,236,255,.35), 0 8px 24px -12px rgba(199,236,255,.5);
  transition:filter .15s ease, transform .05s ease;
}
.btn:hover { filter:brightness(1.06); }
.btn:active { transform:translateY(1px); }
.btn:disabled { opacity:.4; cursor:not-allowed; filter:none; }
.btn.ghost {
  background:transparent; color:#e9e2d6; box-shadow:inset 0 0 0 1px var(--wood-edge);
}
.btn.ghost:hover { box-shadow:inset 0 0 0 1px var(--brass); filter:none; }

:focus-visible { outline:2px solid var(--brass); outline-offset:2px; border-radius:6px; }

.msg { font-size:13px; color:var(--dim); min-height:1.3em; margin-top:10px; }
.msg.ok { color:var(--glow); }
.msg.err { color:#ff9d8a; }

/* ---------- page connexion ---------- */
.login {
  min-height:100%; display:grid; grid-template-rows:1fr auto 1fr; justify-items:center;
  padding:28px 20px; gap:8px; overflow:hidden;
}
.login .wordmark { align-self:end; }
.fan { position:relative; width:min(92vw,420px); height:300px; align-self:center; }
.polaroid {
  position:absolute; left:50%; top:50%; width:190px;
  background:#fbf8f1; padding:10px 10px 34px; border-radius:3px;
  box-shadow:0 18px 40px -14px rgba(0,0,0,.7), 0 2px 6px rgba(0,0,0,.4);
  transform:translate(-50%,-50%) rotate(var(--rot,0deg)) translateY(var(--in,14px));
  opacity:0; animation:settle .7s cubic-bezier(.2,.8,.2,1) forwards; animation-delay:var(--d,0s);
}
.polaroid img { display:block; width:100%; height:150px; object-fit:cover; background:#ddd; }
.polaroid.hero { width:230px; z-index:5; }
.polaroid.hero img { height:184px; }
@keyframes settle { to { opacity:1; --in:0px; } }
@media (prefers-reduced-motion:reduce) {
  .polaroid { animation:none; opacity:1; --in:0px; }
}
.gate { width:min(92vw,340px); align-self:start; margin-top:6px; }
.gate h1 { font-size:19px; margin-bottom:12px; }
.slot { display:flex; gap:8px; }
.slot input {
  flex:1; background:#0f0d0a; border:1px solid var(--wood-edge); color:#e9e2d6;
  border-radius:12px; padding:13px 14px; font:400 15px "Bricolage Grotesque",sans-serif;
}
.slot input::placeholder { color:#6b5f52; }
.slot .btn { width:auto; padding:13px 20px; }

/* ---------- app ---------- */
.app { max-width:460px; margin:0 auto; padding:26px 18px 60px; }
.app > header { display:flex; align-items:baseline; justify-content:space-between; margin-bottom:18px; }
.app > header h1 { font-size:18px; }

/* explainer */
.explain { text-align:left; margin:4px 0 22px; }
.explain p { color:var(--dim); font-size:13.5px; max-width:44ch; margin:12px 0 0; }
.lovebox { width:208px; aspect-ratio:1; height:auto; display:block; border-radius:14px; background:#0f0d0a; }

/* onglets */
.tabs { display:flex; gap:22px; border-bottom:1px solid var(--wood-edge); margin-bottom:20px; }
.tab {
  appearance:none; background:0; border:0; cursor:pointer; padding:10px 2px 12px;
  font:600 15px "Bricolage Grotesque",sans-serif; color:var(--dim);
  border-bottom:2px solid transparent; margin-bottom:-1px; transition:color .15s;
}
.tab[aria-selected="true"] { color:var(--glow); border-bottom-color:var(--glow); }
.tab:hover { color:#e9e2d6; }
.panel[hidden] { display:none; }

/* message */
.note {
  width:100%; min-height:120px; resize:vertical; border-radius:var(--r);
  background:var(--paper); color:var(--ink); border:0; padding:16px;
  font:400 16px/1.5 "Bricolage Grotesque",sans-serif;
  box-shadow:0 1px 0 rgba(255,255,255,.4) inset, 0 12px 30px -16px rgba(0,0,0,.6);
}
.note::placeholder { color:#9a9084; }
.field { margin-top:14px; }
.field label { display:block; font-size:12.5px; color:var(--dim); margin-bottom:6px; }
.field input {
  width:100%; background:#0f0d0a; border:1px solid var(--wood-edge); color:#e9e2d6;
  border-radius:10px; padding:11px 13px; font:400 15px "Bricolage Grotesque",sans-serif;
}
.app .btn { margin-top:18px; }

/* photo */
.shots { display:grid; gap:10px; }
.frame {
  background:#fbf8f1; padding:10px 10px 28px; border-radius:3px; margin-top:16px;
  box-shadow:0 16px 36px -16px rgba(0,0,0,.6);
}
.frame canvas, .frame video {
  display:block; width:100%; aspect-ratio:2/1; background:#0b0f11; border-radius:2px;
  image-rendering:pixelated;
}
.frame video { image-rendering:auto; object-fit:cover; }
.frame figcaption { font-family:"Silkscreen",monospace; font-size:9px; color:#9a9084; margin-top:8px; letter-spacing:.08em; }
.hidefile { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.hide { display:none !important; }
