/* HUIS CLOS — base : polices, remise à zéro, typographie, scène */
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 400; font-display: swap; src: url("../assets/fonts/fraunces-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 400; font-display: swap; src: url("../assets/fonts/fraunces-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 500; font-display: swap; src: url("../assets/fonts/fraunces-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 500; font-display: swap; src: url("../assets/fonts/fraunces-latin-500-italic.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 600; font-display: swap; src: url("../assets/fonts/fraunces-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 600; font-display: swap; src: url("../assets/fonts/fraunces-latin-600-italic.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("../assets/fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("../assets/fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("../assets/fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("../assets/fonts/inter-latin-700-normal.woff2") format("woff2"); }

*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100%;
  background: #05080B;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
}
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: var(--amber); text-decoration-thickness: 1px; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(230, 183, 124, 0.35); }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Typographie éditoriale */
.t-display, .t-title, .t-h2, .t-h3 { font-family: var(--font-serif); font-weight: 500; line-height: var(--lh-tight); letter-spacing: -0.01em; color: var(--text); }
.t-display { font-size: var(--fs-display); }
.t-title { font-size: var(--fs-title); }
.t-h2 { font-size: var(--fs-h2); }
.t-h3 { font-size: var(--fs-h3); }
.t-body { font-size: var(--fs-body); color: var(--text); }
.t-lead { font-size: calc(var(--fs-body) * 1.06); color: var(--text-2); }
.t-meta { font-size: var(--fs-meta); color: var(--text-2); letter-spacing: 0.01em; }
.t-kicker { font-size: var(--fs-meta); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); }
.t-muted { color: var(--text-2); }
.t-soft { color: var(--text-3); }
.t-serif-i { font-family: var(--font-serif); font-style: italic; font-weight: 400; }
.t-center { text-align: center; }
.measure { max-width: 34em; }

/* Scène : plein écran (téléphone, tablette, application, site public) ; cadre téléphone et barre de développement
   seulement dans l'aperçu local sur grand écran (html.dev-preview, posée par js/app.js hors coquille, sur un hôte de
   développement). */
.stage {
  position: relative; width: 100%; height: 100dvh; min-height: 100svh;
  background: var(--ink); overflow: hidden; margin: 0 auto;
  isolation: isolate;
}
.devbar { display: none; }
@media (min-width: 720px) and (min-height: 600px) {
  .dev-preview body { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; gap: 12px; padding: 16px; }
  .dev-preview .stage { width: 390px; height: min(844px, calc(100vh - 88px)); border-radius: 44px; box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(243,238,229,.08), 0 0 0 10px #0E141B, 0 0 0 11px rgba(243,238,229,.06); }
  .dev-preview .stage[data-frame="tablet"] { width: 768px; height: min(1024px, calc(100vh - 88px)); border-radius: 28px; }
  .dev-preview .stage[data-frame="full"] { width: 100%; max-width: 1280px; height: calc(100vh - 88px); border-radius: 16px; }
  .dev-preview .devbar:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 13px; color: var(--text-2); }
  .devbar-tag { font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); font-size: 11px; }
  .devbar-actions { display: flex; gap: 6px; }
  .devbar-btn { min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text); font-size: 13px; }
  .devbar-btn:hover { background: var(--surface-2); }
}
.noscript { padding: 24px; text-align: center; }

.app { position: absolute; inset: 0; }
.overlays { position: absolute; inset: 0; pointer-events: none; z-index: 20; }
.overlays > * { pointer-events: auto; }
.trace { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 30; overflow: visible; }

/* Écran générique */
.screen {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  background: var(--ink); overflow: hidden;
  padding-top: var(--safe-top);
}
.screen-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
.screen-scroll::-webkit-scrollbar { width: 6px; }
.screen-scroll::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 3px; }
.pad { padding-left: var(--gutter); padding-right: var(--gutter); }
.pad-y { padding-top: var(--s5); padding-bottom: var(--s5); }
.stack > * + * { margin-top: var(--s4); }
.stack-lg > * + * { margin-top: var(--s5); }
.stack-sm > * + * { margin-top: var(--s2); }
.row { display: flex; align-items: center; gap: var(--s3); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.grow { flex: 1 1 auto; min-width: 0; }
.wrap { flex-wrap: wrap; }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* Transitions de vue (240–320 ms) */
.screen-enter { animation: screen-in var(--t-view) var(--ease-out) both; }
.screen-leave { animation: screen-out var(--t-view) var(--ease-in) both; pointer-events: none; }
.screen-enter-back { animation: screen-in-back var(--t-view) var(--ease-out) both; }
.screen-leave-back { animation: screen-out-back var(--t-view) var(--ease-in) both; pointer-events: none; }
@keyframes screen-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes screen-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(-16px); } }
@keyframes screen-in-back { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
@keyframes screen-out-back { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(16px); } }
.fade-in { animation: fade-in var(--t-view) var(--ease-out) both; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.rise-in { animation: rise-in var(--t-view) var(--ease-out) both; }
@keyframes rise-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
