@font-face { font-family: "Sans"; src: url("/assets/fonts/sans.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: light;
  --screen: #FFFFFF;
  --paper: #F4F4F4;
  --ink: #111111;
  --muted: #6B6B6B;
  --line: #111111;
  --hair: #DCDCDC;
  --media: #E9E9E9;
  --red: #E30613;
  --danger: #C00010;
  --font: "Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gutter: clamp(20px, 3.2vw, 48px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--screen);
  color: var(--ink);
  font: 400 1rem/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

.wrap { width: 100%; max-width: 1600px; margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 14px; z-index: 10; }
.skip:focus { left: 8px; }

/* Emplacement du futur logo : carre en pointilles, a remplacer par une image */
.logo-slot { display: inline-block; flex: none; width: 28px; height: 28px; border: 1px dashed var(--ink); }
.logo-slot--lg { width: 56px; height: 56px; }

/* En-tete */
.site-header { border-bottom: 1px solid var(--hair); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; font-size: 1.125rem; letter-spacing: 0.02em; text-transform: uppercase; text-decoration: none; }
.nav { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; font-size: 0.9375rem; font-weight: 500; }
.nav a { text-decoration: none; }
.nav a:hover, .link-btn:hover { color: var(--red); }
.balance { font-weight: 500; font-variant-numeric: tabular-nums; border: 1px solid var(--ink); padding: 6px 12px; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-weight: 500; color: inherit; cursor: pointer; }

/* Bouton principal */
.btn {
  display: block; width: 100%;
  background: var(--ink); color: #fff;
  border: 2px solid var(--ink); border-radius: 0;
  padding: 16px 20px; font: 500 1rem/1.2 var(--font); text-align: left;
  text-decoration: none; cursor: pointer;
}
.btn::after { content: " →"; float: right; }
.btn:hover { background: var(--red); border-color: var(--red); }
.btn:disabled, .btn[aria-disabled="true"] { background: transparent; color: var(--muted); border-color: var(--hair); cursor: not-allowed; }
.btn:disabled::after { content: ""; }

/* Titres */
h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -0.04em; text-wrap: balance; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); line-height: 1; margin-bottom: 24px; }

/* Catalogue */
.catalog { padding: clamp(32px, 5vw, 72px) 0 clamp(56px, 8vw, 120px); }
.catalog-head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 24px; padding-bottom: 8px; margin-bottom: 24px; }
.catalog h1 { font-size: clamp(3rem, 9vw, 8rem); line-height: 0.88; letter-spacing: -0.055em; font-weight: 500; }
.catalog-meta { text-align: right; font-size: 0.875rem; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.lede { max-width: 40ch; margin: 0 0 40px; font-size: 1.125rem; line-height: 1.4; font-weight: 400; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 40px 20px; }

.frame { display: block; text-decoration: none; min-width: 0; }
.frame-media { aspect-ratio: 4 / 5; background: var(--media); overflow: hidden; }
.frame-media video, .frame-media img { width: 100%; height: 100%; object-fit: cover; }
.frame-empty { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: 0.875rem; font-weight: 500; }
.frame-cap { display: grid; gap: 6px; padding: 10px 0 0; margin-top: 4px; }
.frame-row { display: grid; grid-template-columns: 36px 1fr auto; align-items: baseline; gap: 0; }
.idx { font-size: 0.8125rem; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.frame-title { font-weight: 500; letter-spacing: -0.01em; }
.frame:hover .frame-title { color: var(--red); }
.frame-desc { margin: 0 0 0 36px; color: var(--muted); font-size: 0.875rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cost { font-size: 0.8125rem; font-weight: 400; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Page template */
.back { display: inline-block; margin: 24px 0 0; font-size: 0.9375rem; font-weight: 500; text-decoration: none; }
.back:hover { color: var(--red); }
.template-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr); gap: clamp(32px, 6vw, 96px); align-items: start; padding: 24px 0 clamp(56px, 8vw, 120px); }
.stage { aspect-ratio: 4 / 5; max-height: 78vh; width: 100%; background: var(--media); overflow: hidden; }
.stage video { width: 100%; height: 100%; object-fit: cover; }
.info h1 { font-size: clamp(2.5rem, 5.5vw, 4.5rem); line-height: 0.92; letter-spacing: -0.045em; margin: 0 0 20px; }
.info-desc { margin: 0 0 24px; max-width: 42ch; font-size: 1.125rem; line-height: 1.4; }
.meta { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 0 32px; padding: 0; list-style: none; }
.meta li { padding: 0; font-weight: 500; font-variant-numeric: tabular-nums; }
.panel { display: grid; gap: 16px; }
.dropzone {
  position: relative; display: grid; place-items: center; gap: 10px; min-height: 160px; padding: 20px;
  border: 1px dashed var(--ink); text-align: center; cursor: pointer; font-weight: 500;
}
.dropzone:hover { background: var(--paper); }
.dropzone:focus-within { outline: 3px solid var(--red); outline-offset: 3px; }
.dropzone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone img { max-height: 180px; }
.hint { margin: 0; color: var(--muted); font-size: 0.875rem; }
.error { margin: 0; color: var(--danger); font-weight: 500; font-size: 0.9375rem; }

/* Messages */
.notice { border-left: 4px solid var(--red); background: var(--paper); padding: 14px 18px; margin: 0 0 24px; }
.notice strong { display: block; }
.empty { border: 1px solid var(--hair); padding: 32px 24px; color: var(--muted); }
.empty strong { display: block; color: var(--ink); margin-bottom: 4px; }
.section { padding: clamp(32px, 5vw, 56px) 0; }

/* Formulaires */
.form-card { max-width: 420px; margin: clamp(32px, 6vw, 80px) auto; padding: 0 var(--gutter); }
.form-logo { display: flex; margin-bottom: 32px; }
.tabs { display: flex; gap: 24px; margin: 0 0 28px; border-bottom: 1px solid var(--hair); }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 0 0 10px; font: 500 1rem/1 var(--font); color: var(--muted); cursor: pointer; }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--red); }
.field { display: grid; gap: 6px; margin-bottom: 20px; }
.field label { font-weight: 500; font-size: 0.875rem; }
.field input { font: inherit; padding: 12px 14px; border: 1px solid var(--ink); border-radius: 0; background: var(--screen); }

/* Tableau de bord */
.dash-top { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; padding: 48px 0 28px; }
.credits-big { font-weight: 500; font-size: clamp(3.5rem, 10vw, 7rem); line-height: 0.88; letter-spacing: -0.05em; }
.credits-label { font-size: 0.875rem; font-weight: 500; color: var(--muted); display: block; margin-bottom: 14px; }
.list { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: 1fr auto auto; gap: 24px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--hair); }
.row-title { font-weight: 500; }
.row-date { color: var(--muted); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.status { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; font-size: 0.9375rem; }
.status::before { content: ""; width: 10px; height: 10px; background: var(--muted); }
.status[data-s="processing"]::before { background: var(--red); animation: pulse 1.4s ease-in-out infinite; }
.status[data-s="completed"]::before { background: var(--ink); }
.status[data-s="failed"]::before { background: transparent; border: 2px solid var(--danger); }
@keyframes pulse { 50% { opacity: 0.25; } }

.site-footer { border-top: 1px solid var(--hair); padding: 20px 0 32px; color: var(--muted); font-size: 0.875rem; }
.site-footer .wrap { display: flex; align-items: center; gap: 12px; }
.site-footer .logo-slot { width: 20px; height: 20px; border-width: 1.5px; }

@media (max-width: 860px) {
  .template-grid { grid-template-columns: 1fr; }
  .stage { max-height: 70vh; }
  .row { grid-template-columns: 1fr auto; }
  .row-date { grid-column: 1 / -1; }
  .catalog-head { grid-template-columns: 1fr; }
  .catalog-meta { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .status[data-s="processing"]::before { animation: none; }
}

/* Videos terminees dans le tableau de bord */
.row-media { grid-column: 1 / -1; margin: 4px 0 0; display: grid; gap: 8px; justify-items: start; }
.row-media video { width: min(100%, 360px); background: var(--media); }
.row-link { font-size: 0.9375rem; font-weight: 500; }
.row-link:hover { color: var(--red); }
.btn:disabled:hover { background: transparent; border-color: var(--hair); }

/* Plans */
.page-title { font-size: clamp(2.5rem, 6vw, 5rem); line-height: 0.92; letter-spacing: -0.05em; }
.controls { display: flex; flex-wrap: wrap; gap: 16px 32px; margin: 0 0 32px; }
.seg { display: inline-flex; gap: 20px; }
.seg-btn { background: none; border: 0; border-bottom: 2px solid transparent; padding: 0 0 6px; font: 500 1rem/1 var(--font); color: var(--muted); cursor: pointer; }
.seg-btn[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--red); }
.plans { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 40px 24px; }
.plan { display: grid; align-content: start; gap: 6px; }
.plan h3 { font-size: 1.125rem; letter-spacing: -0.01em; }
.price { margin: 8px 0 0; font-weight: 500; font-size: clamp(2.25rem, 4vw, 3.25rem); line-height: 1; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; }
.per { font-size: 1rem; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.plan-line { margin: 0; color: var(--muted); font-size: 0.875rem; }
.plan-credits { margin: 12px 0 0; font-weight: 500; }
.plan .btn { margin-top: 16px; }
.terms { margin: 48px 0 0; max-width: 62ch; color: var(--muted); font-size: 0.875rem; }
.terms p { margin: 0 0 8px; }
.lots { list-style: none; margin: 0; padding: 0; font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.lots li { display: flex; justify-content: space-between; gap: 24px; padding: 6px 0; }
.lots .muted { color: var(--muted); }
.plan-note { margin: 6px 0 0; color: var(--muted); font-size: 0.9375rem; }
.section > .hint { margin: 0 0 24px; }

.upgrade-go { display: inline-block; width: auto; margin-right: 20px; }

.footer-links { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-left: auto; }
.footer-links a { color: inherit; }
.footer-links a:hover { color: var(--red); }
.site-footer .wrap { flex-wrap: wrap; }
.prose { max-width: 760px; }
.prose h2 { font-size: 1.25rem; margin: 32px 0 8px; }
.prose p, .prose li { line-height: 1.6; }
.prose ul { padding-left: 20px; }
.prose a { text-decoration: underline; }
.todo { background: #FFF3B0; padding: 0 4px; }
.prose .page-title { margin: 0 0 20px; }

/* Page des mentions legales : volontairement discrete (petit texte gris, un seul bloc). Le contraste reste lisible. */
.prose .fine p { font-size: 0.78125rem; line-height: 1.5; color: var(--muted); margin: 0; }
.prose .fine a { text-decoration: none; }
