/* Studio Villecourt · interface de prod.arthurvillecourt.com
   Règle : uniquement les variables de brand/tokens.css (copie de Zalidan Media/Studio/brand), jamais de valeur
   hexadécimale ici. Coins carrés, pas d'ombre, pas de dégradé. */

@font-face {
  font-family: Archivo; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%;
  src: url(/static/fonts/archivo-latin-standard-normal.woff2) format('woff2-variations'), url(/static/fonts/archivo-latin-standard-normal.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-display: swap; font-weight: 100 900; font-stretch: 62% 125%;
  src: url(/static/fonts/archivo-latin-ext-standard-normal.woff2) format('woff2-variations'), url(/static/fonts/archivo-latin-ext-standard-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face { font-family: "DM Mono"; font-style: normal; font-display: swap; font-weight: 400; src: url(/static/fonts/dm-mono-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+2212; }
@font-face { font-family: "DM Mono"; font-style: normal; font-display: swap; font-weight: 500; src: url(/static/fonts/dm-mono-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+2212; }
@font-face { font-family: "DM Mono"; font-style: normal; font-display: swap; font-weight: 400; src: url(/static/fonts/dm-mono-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+1E00-1E9F; }
@font-face { font-family: "DM Mono"; font-style: normal; font-display: swap; font-weight: 500; src: url(/static/fonts/dm-mono-latin-ext-500-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+1E00-1E9F; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-bottom: 160px; } /* rien ne se cache sous la barre d'action */
body {
  margin: 0; min-height: 100vh; background: var(--surface-page); color: var(--text-body);
  font-family: var(--type-body-family); font-size: var(--type-body-size); line-height: var(--type-body-line);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; } /* sinon un display: grid/flex d'un composant l'emporte sur l'attribut */
a { color: var(--text-link); text-underline-offset: 3px; }
:focus-visible { outline: var(--border-normal) solid var(--ui-focus-ring); outline-offset: 2px; }
.muted { color: var(--text-muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { vertical-align: -3px; flex: none; }
strong { font-weight: 700; }

/* En-tête : bandeau encre + ligne orange (signature de la marque) */
.band { background: var(--header-band); color: var(--header-band-text); }
.band-in { max-width: var(--layout-breakpoint-desktop); margin: 0 auto; padding: 0 var(--layout-gutter-mobile); min-height: 64px; display: flex; align-items: center; gap: var(--space-3); }
.brand { display: inline-flex; align-items: center; min-height: var(--target-min); }
.brand-icon { display: block; width: 40px; height: 40px; }
.brand-logo { display: none; height: auto; }
.screen { color: var(--header-band-text); text-transform: var(--type-label-case); letter-spacing: var(--type-label-tracking); }
.logout { margin-left: auto; }
.link-btn { background: none; border: 0; color: var(--header-band-text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: var(--target-min); padding: 0 var(--space-2); font: inherit; }
.now-line { height: var(--border-maintenant); background: var(--header-now-line); }
@media (min-width: 768px) {
  .brand-icon { display: none; }
  .brand-logo { display: block; width: 240px; }
  .band-in { min-height: 88px; }
}

main { max-width: var(--layout-breakpoint-desktop); margin: 0 auto; padding: var(--space-6) var(--layout-gutter-mobile) 140px; }
main > section > * + * { margin-top: var(--space-4); }
.narrow { max-width: 480px; }
.stack { display: flex; flex-direction: column; gap: var(--space-2); }
.thumb-zone { margin-top: var(--space-6); }

/* Champs */
input[type=email], textarea {
  width: 100%; min-height: var(--field-height); font: inherit; font-size: var(--field-font-size); color: var(--text-body);
  background: var(--surface-raised); border: var(--border-normal) solid var(--ui-border-field); border-radius: var(--radius-0);
  padding: var(--space-3);
}
textarea { resize: vertical; min-height: 96px; line-height: var(--type-body-line); }

/* Boutons : coins carrés, 48 px, un seul principal par écran */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: var(--button-min-height);
  padding: 0 var(--space-5); border: var(--button-border) solid transparent; border-radius: var(--button-radius);
  text-decoration: none; cursor: pointer; white-space: nowrap; transition: background var(--duration-rapide) var(--easing-sortie);
}
.btn-primary { background: var(--action-primary); color: var(--action-primary-text); border-color: var(--action-primary); }
.btn-cue { background: var(--action-cue); color: var(--action-cue-text); border-color: var(--action-cue); }
.btn-secondary { background: transparent; color: var(--text-body); border-color: var(--ui-rule-strong); }
.btn-ghost { background: transparent; color: var(--text-body); border-color: var(--ui-border-field); min-height: var(--target-min); padding: 0 var(--space-3); }
.thumb-zone .btn, .narrow form .btn { width: 100%; }
@media (min-width: 768px) { .thumb-zone .btn, .narrow form .btn { width: auto; } }

.notice { background: var(--surface-raised); border: var(--border-fin) solid var(--decor-hairline); padding: var(--space-4); display: grid; gap: var(--space-2); }
.error { color: var(--text-error); display: flex; gap: var(--space-2); align-items: flex-start; }
.ok { color: var(--text-success); }

/* États : toujours écrits ; « À relire » = bloc orange, « Validé » = bloc encre, sinon contour gris */
.chip { display: inline-flex; align-items: center; min-height: 28px; padding: 0 var(--space-2); border: var(--border-normal) solid var(--ui-border-field); color: var(--text-body); white-space: nowrap; }
.chip-relire { background: var(--status-cue); color: var(--status-cue-text); border-color: var(--status-cue); }
.chip-valide { background: var(--status-on-air); color: var(--status-on-air-text); border-color: var(--status-on-air); }

/* Conducteur */
.rundown { list-style: none; margin: var(--space-6) 0 0; padding: 0; border-top: var(--border-normal) solid var(--ui-rule-strong); }
.row { background: var(--surface-raised); border-bottom: var(--border-fin) solid var(--decor-hairline); border-left: var(--border-maintenant) solid transparent; }
.row-now { border-left-color: var(--decor-now); }
.row-link { display: grid; grid-template-columns: auto 1fr; gap: var(--space-1) var(--space-3); align-items: center; padding: var(--space-3) var(--space-4) var(--space-3) var(--space-3); color: inherit; text-decoration: none; min-height: 72px; }
.row-link:hover .row-title { text-decoration: underline; text-underline-offset: 3px; }
.row-num { color: var(--text-muted); grid-row: span 2; align-self: start; padding-top: 3px; }
.row-main { display: grid; gap: var(--space-1); min-width: 0; }
.row-title { overflow-wrap: anywhere; }
.row .chip { grid-column: 2; justify-self: start; }
@media (min-width: 768px) {
  .row-link { grid-template-columns: 48px 1fr auto; }
  .row-num { grid-row: auto; padding-top: 0; }
  .row .chip { grid-column: auto; }
}

/* Revue */
.crumbs a { color: var(--text-link); }
.review-title { overflow-wrap: anywhere; }
.review-meta { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3); align-items: center; }
.versions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.ver { display: inline-flex; align-items: center; justify-content: center; min-width: var(--target-min); min-height: var(--target-min); border: var(--border-normal) solid var(--ui-border-field); color: var(--text-body); text-decoration: none; }
.ver.is-current { background: var(--action-primary); color: var(--action-primary-text); border-color: var(--action-primary); }
#flash:empty { display: none; }
#flash { padding: var(--space-3) var(--space-4); background: var(--surface-raised); border: var(--border-fin) solid var(--decor-hairline); }

.player { background: var(--header-band); margin-left: calc(-1 * var(--layout-gutter-mobile)); margin-right: calc(-1 * var(--layout-gutter-mobile)); }
.player video { display: block; width: 100%; max-height: 70vh; aspect-ratio: 16 / 9; background: var(--header-band); }
@media (min-width: 768px) { .player { margin-left: 0; margin-right: 0; } }

.deck { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin-top: var(--space-3) !important; }
.tc { font-size: 20px; }
.deck-btns { margin-left: auto; display: inline-flex; gap: var(--space-2); }

.timeline { position: relative; height: 44px; background: var(--surface-raised); border: var(--border-fin) solid var(--decor-hairline); cursor: pointer; touch-action: none; margin-top: var(--space-2) !important; }
.playhead { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--ui-rule-strong); left: 0; pointer-events: none; }
.mk { position: absolute; top: 8px; bottom: 8px; min-width: 4px; background: var(--text-muted); border: 0; padding: 0; cursor: pointer; }
.mk-open { background: var(--decor-now); }
.mk-sent { background: var(--action-primary); }

.mark-row { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.mark-row .btn { flex: 1 1 auto; }
@media (min-width: 768px) { .mark-row .btn { flex: 0 0 auto; } }
@media (hover: none) { .kbd-hint { display: none; } }

.composer { background: var(--surface-raised); border: var(--border-normal) solid var(--ui-rule-strong); padding: var(--space-4); display: grid; gap: var(--space-3); }
.composer-btns { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: flex-end; }
.composer-btns .btn-primary { flex: 1 1 100%; }
@media (min-width: 768px) { .composer-btns .btn-primary { flex: 0 0 auto; } }

.list-title { margin-top: var(--space-8) !important; display: flex; gap: var(--space-2); align-items: baseline; }
.comments { list-style: none; margin: var(--space-3) 0 0; padding: 0; border-top: var(--border-normal) solid var(--ui-rule-strong); }
.cm { background: var(--surface-raised); border-bottom: var(--border-fin) solid var(--decor-hairline); border-left: var(--border-maintenant) solid transparent; padding: var(--space-3) var(--space-4) var(--space-3) var(--space-3); display: grid; gap: var(--space-2); }
.cm-open { border-left-color: var(--decor-now); }
.cm-resolved .cm-body { color: var(--text-muted); }
.cm-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3); }
.cm-tc { background: none; border: var(--border-normal) solid var(--ui-rule-strong); color: var(--text-body); min-height: var(--target-min); padding: 0 var(--space-3); cursor: pointer; }
.cm-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.cm-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.cm-actions button { background: none; border: 0; color: var(--text-link); text-decoration: underline; text-underline-offset: 3px; min-height: var(--target-min); padding: 0 var(--space-1); cursor: pointer; font: inherit; }
.cm textarea { min-height: 72px; }

/* Barre d'action en bas, dans la zone du pouce */
.cue-bar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface-raised); border-top: var(--border-normal) solid var(--ui-rule-strong); padding: var(--space-3) var(--layout-gutter-mobile) calc(var(--space-3) + env(safe-area-inset-bottom)); }
.cue-bar form, .cue-bar > p { max-width: var(--layout-breakpoint-desktop); margin: 0 auto; display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.cue-bar .btn { flex: 1 1 100%; }
@media (min-width: 768px) { .cue-bar .btn { flex: 0 0 auto; margin-left: auto; } }
.cue-bar:not(:has(form:not([hidden]), > p)) { display: none; }
body.composing .cue-bar { display: none; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
