/* ══════════════════════════════════════════════════════════════════════════
   VisualCall — charte « Épure », pages de l'APPLICATION (Studio en premier).

   Pourquoi un fichier distinct de epure.css : les pages applicatives ont été
   écrites avec leurs propres noms de classes (.wrap = grille à deux colonnes,
   .card, .btn, .hint, .note…), en conflit avec ceux du site public. Cette
   feuille habille CES noms-là : migrer une page applicative revient à
   supprimer son bloc <style> et à lier ce fichier.

   ⚠️ Les jetons de couleur ci-dessous sont les MÊMES que dans epure.css :
   modifier une teinte impose de la changer aux deux endroits.

   Accessibilité : contrastes texte/fond ≥ 6,6:1, bordures de contrôles ≥ 3:1,
   zones cliquables ≥ 44 px, texte ≥ 15 px (14 px au plus bas pour les
   mentions), tailles en rem. Écrite « mobile d'abord ».
   ══════════════════════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'Manrope'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url('/fonts/manrope-latin-ext-wght-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: 'Manrope'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url('/fonts/manrope-latin-wght-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;
}

:root {
  color-scheme: light;
  --bg: #f0f1f4; --sf: #ffffff; --sf2: #f5f6f8; --line: #d6d9e1; --bd: #7d8498;
  --tx: #1c2030; --tx2: #4d5468;
  --pr: #3d4a80; --pr-hover: #323d6b; --tint: #e8eaf3; --ac: #8fd6dc;
  --ok-bg: #e3f1e8; --ok-tx: #14532d; --err-bg: #fbe9e7; --err-tx: #8a1c12;
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, 'Hiragino Sans', 'Noto Sans JP', 'Microsoft YaHei', 'PingFang SC', sans-serif;
  /* Anciens noms, encore lus par du code en ligne dans les pages */
  --blue: var(--pr); --blue-dark: var(--pr-hover); --ink: var(--tx); --green: #166534; --red: #991b1b;
  --muted: var(--tx2); --text: var(--tx); --surface: var(--sf); --surface2: var(--sf2); --panel: var(--sf); --border: var(--line);
  --accent: var(--pr); --accent2: var(--pr); --primary: var(--pr); --primary-dark: var(--pr-hover); --danger: var(--err-tx); --amber: #8a5a00;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--tx);
  font-family: var(--font); font-size: 1rem; line-height: 1.5;
  overflow-wrap: break-word; -webkit-font-smoothing: antialiased;
}
:lang(ja) { word-break: auto-phrase; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--pr); }
svg { flex-shrink: 0; }
:focus-visible { outline: 3px solid var(--tx); outline-offset: 2px; box-shadow: 0 0 0 7px var(--sf); }
.muted { color: var(--tx2); }
small { font-size: 0.875rem; }

/* ── Barre du haut ─────────────────────────────────────────────────────── */
/* Collante sur grand écran seulement : sur téléphone elle occupe trois lignes
   (logo, offre, navigation) et mangerait un cinquième de l'écran en restant fixe. */
header {
  position: relative; z-index: 100; background: var(--bg);
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.875rem;
  padding: 0.625rem max(1rem, env(safe-area-inset-right)) 0.625rem max(1rem, env(safe-area-inset-left));
}
header img { height: 1.625rem; width: auto; display: block; }
header > a { display: flex; align-items: center; min-height: 2.75rem; }
header .crumb { color: var(--tx2); font-size: 0.9375rem; font-weight: 600; }
#planMount { margin-left: auto; }
/* Sur téléphone : la navigation passe sur sa propre ligne et défile horizontalement
   (elle débordait de l'écran, la dernière entrée était coupée). */
header .nav {
  order: 10; flex: 1 0 100%; display: flex; align-items: center; gap: 0.25rem;
  margin: 0 -1rem; padding: 0 1rem 0.125rem; overflow-x: auto; scrollbar-width: none;
}
header .nav::-webkit-scrollbar { display: none; }
header .nav a {
  display: inline-flex; align-items: center; gap: 0.375rem; flex-shrink: 0;
  min-height: 2.75rem; padding: 0 1rem; border-radius: 999px;
  background: var(--sf); color: var(--tx);
  font-size: 0.9375rem; font-weight: 700; text-decoration: none; white-space: nowrap;
}
header .nav a:hover { background: var(--tint); }
header .nav a.active { background: var(--pr); color: #fff; }

/* Sélecteur de langue et pastille d'offre : balisage et styles injectés par
   js/i18n-app.js et js/tiers.js (partagés avec les pages pas encore migrées).
   Le préfixe « body » donne la priorité à ces règles sans toucher aux scripts. */
/* Le sélecteur de langue est un enfant direct de la barre, PAS de la navigation : celle-ci défile
   sur téléphone et rognait son menu (aucune langue n'était cliquable). Sur téléphone il se place
   en haut à droite, sur la ligne du logo ; la marge automatique le garde collé à droite même s'il
   passe à la ligne, pour que son menu (aligné à droite) reste dans l'écran. */
header > #langSelector { order: 5; margin-left: auto; }
header:has(> #langSelector) > #planMount { order: 6; margin-left: 0; }
body .lang-menu { max-width: calc(100vw - 2rem); }
/* Page dont la barre du haut est une <nav> qui défile (Traitement du son) : le sélecteur flotte
   en haut à droite, sur un fond opaque, et la barre lui réserve la place en fin de défilement. */
#langSelector.lang-float {
  position: absolute; top: 0.625rem; right: 0; z-index: 150;
  padding: 0 max(1rem, env(safe-area-inset-right)) 0 0.5rem; background: var(--bg);
}
#langSelector.lang-float .lang-menu { right: max(1rem, env(safe-area-inset-right)); }
nav:has(+ #langSelector.lang-float) { padding-right: 6rem; }
body .lang-flag { display: none; }
body .lang-trigger { min-height: 2.75rem; padding: 0 0.875rem; border: 0; border-radius: 999px; background: var(--sf); color: var(--tx); font-size: 0.9375rem; }
body .lang-trigger:hover, body #langSelector.open .lang-trigger { background: var(--tint); color: var(--tx); border: 0; }
body .lang-trigger-arrow { font-size: 0.75rem; opacity: 1; }
body .lang-menu { border: 1px solid var(--line); border-radius: 1rem; box-shadow: none; padding: 0.375rem; min-width: 11rem; }
body .lang-option { min-height: 2.75rem; padding: 0 0.75rem; border-radius: 0.75rem; font-size: 0.9375rem; font-weight: 600; color: var(--tx); }
body .lang-option:hover { background: var(--sf2); color: var(--tx); }
body .lang-option.active { background: var(--tint); color: var(--pr); font-weight: 800; }
body .lang-option-code { font-size: 0.875rem; color: var(--tx2); }
body .vc-plan { font-size: 0.9375rem; gap: 0.5rem; }
body .vc-plan .lbl { color: var(--tx2); font-weight: 600; }
body .vc-plan a.lbl { color: var(--pr); display: inline-flex; align-items: center; min-height: 2.75rem; text-decoration: underline; text-underline-offset: 0.2em; }
body .vc-plan select { min-height: 2.75rem; padding: 0 0.625rem; border: 1.5px solid var(--bd); border-radius: 0.75rem; background: var(--sf); font-size: 0.9375rem; }
body .vc-badge { background: var(--pr) !important; font-size: 0.875rem; padding: 0.3125rem 0.75rem; letter-spacing: 0.02em; }
body .vc-trial-chip { background: var(--tint); border: 0; color: var(--pr); font-size: 0.875rem; padding: 0.3125rem 0.75rem; }
body .vc-trial-chip a { color: var(--err-tx); text-decoration: underline; }
body .vc-lock-tag { background: var(--tint); color: var(--pr); font-size: 0.8125rem; padding: 0.25rem 0.625rem; }
body .vc-lock-catch:hover { background: rgba(61, 74, 128, 0.06); }
body .vc-modal { border-radius: 1.5rem; box-shadow: none; padding: 1.5rem; }
body .vc-modal h3 { color: var(--tx); font-weight: 800; }
body .vc-modal .lead, body .vc-modal li { color: var(--tx2); font-size: 1rem; }
body .vc-modal .lead b { color: var(--pr); }
body .vc-modal .acts button { min-height: 3rem; border-radius: 999px; font-size: 1rem; }
body .vc-btn-primary { background: var(--pr); }
body .vc-btn-ghost { background: var(--tint); color: var(--tx); }
body .vc-note { color: var(--tx2); font-size: 0.875rem; }

/* ── Mise en page ──────────────────────────────────────────────────────── */
.wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.75rem; max-width: 77.5rem; margin: 0.5rem auto 3rem; padding: 0 1rem; }
.wrap > div { min-width: 0; }
.card { background: var(--sf); border-radius: 1.25rem; padding: 1.25rem; margin-bottom: 0.75rem; }
.card h2 { font-size: 1.375rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 0.375rem; }
.card .hint { color: var(--tx2); font-size: 1rem; margin-bottom: 1rem; }

/* ── Formulaires ───────────────────────────────────────────────────────── */
label { display: block; margin: 1.125rem 0 0.4375rem; color: var(--tx); font-size: 0.9375rem; font-weight: 700; }
label span[data-i18n$="_note"], label .muted { font-weight: 500; color: var(--tx2); }
input[type=text], input[type=search], input[type=email], input[type=password], input[type=number], input[type=url], input[type=tel], input[type=date], input[type=time], textarea, select {
  width: 100%; min-height: 3rem; padding: 0.75rem 1rem;
  border: 1.5px solid var(--bd); border-radius: 0.875rem;
  background: var(--sf2); color: var(--tx); font-size: 1rem; line-height: 1.5;
}
input[type=text]:hover, textarea:hover, select:hover { border-color: var(--tx); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--pr); box-shadow: 0 0 0 3px var(--tint); }
input::placeholder, textarea::placeholder { color: var(--tx2); opacity: 1; }
textarea { resize: vertical; min-height: 7.5rem; }
input[type=checkbox] { width: 1.375rem !important; height: 1.375rem !important; accent-color: var(--pr) !important; flex-shrink: 0; }
input[type=range] { accent-color: var(--pr); min-height: 2.75rem; }
.row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.875rem; }
.charcount { text-align: right; font-size: 0.875rem; color: var(--tx2); margin-top: 0.25rem; }
kbd { background: var(--sf2); border: 1px solid var(--bd); border-radius: 0.375rem; padding: 0.0625rem 0.375rem; font-size: 0.875rem; font-family: inherit; }

/* ── Boutons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3rem; padding: 0.625rem 1.5rem;
  border: 2px solid transparent; border-radius: 999px;
  font-size: 1rem; font-weight: 800; line-height: 1.25; text-align: center; cursor: pointer;
}
.btn-primary { background: var(--pr); color: #fff; width: 100%; }
.btn-primary:hover { background: var(--pr-hover); }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-ghost { border-color: var(--bd); background: transparent; color: var(--tx); font-weight: 700; }
.btn-ghost:hover { background: var(--sf2); border-color: var(--tx); }
.btn-sm { min-height: 2.75rem; padding: 0.375rem 1.125rem; font-size: 0.9375rem; }
.btn-full { width: 100%; }

/* ── Sélecteur de voix ─────────────────────────────────────────────────── */
.vp-wrap { position: relative; }
.vp-trigger {
  display: flex; align-items: center; gap: 0.75rem; min-height: 3.75rem; padding: 0.5rem 0.75rem;
  border: 1.5px solid var(--bd); border-radius: 0.875rem; background: var(--sf2);
  cursor: pointer; user-select: none;
}
.vp-trigger:hover, .vp-trigger.open { border-color: var(--pr); }
.vp-icon, .vp-card .vc-icon {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden;
  width: 2.75rem; height: 2.75rem; border-radius: 0.75rem; background: var(--tint); color: var(--pr);
}
.vp-icon img, .vp-card .vc-icon img { width: 100%; height: 100%; object-fit: cover; }
.vp-info, .vp-card .vc-info { flex: 1; min-width: 0; }
.vp-name, .vp-card .vc-name { font-weight: 800; font-size: 1rem; }
.vp-name, .vp-desc, .vp-card .vc-desc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vp-desc, .vp-card .vc-desc { color: var(--tx2); font-size: 0.9375rem; }
.vp-play, .vp-card .vc-play {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 2.75rem; height: 2.75rem; border: 0; border-radius: 50%;
  background: var(--pr); color: #fff; cursor: pointer;
}
.vp-play:hover, .vp-card .vc-play:hover { background: var(--pr-hover); }
.vp-card .vc-play { background: var(--tint); color: var(--pr); }
.vp-card .vc-play:hover, .vp-card .vc-play.playing { background: var(--pr); color: #fff; }
.vp-arrow { color: var(--tx2); font-size: 0.875rem; }
.vp-trigger.open .vp-arrow { transform: rotate(180deg); }
.vp-panel { position: absolute; top: calc(100% + 0.375rem); left: 0; right: 0; z-index: 200; overflow: hidden; background: var(--sf); border: 1.5px solid var(--bd); border-radius: 1rem; }
.vp-search { border: 0 !important; border-bottom: 1px solid var(--line) !important; border-radius: 0 !important; background: var(--sf) !important; }
.vp-list { max-height: 20rem; overflow-y: auto; padding: 0.5rem; }
.vp-group { padding: 0.625rem 0.5rem 0.25rem; color: var(--tx2); font-size: 0.875rem; font-weight: 800; }
.vp-card { display: flex; align-items: center; gap: 0.75rem; min-height: 3.5rem; padding: 0.375rem 0.5rem; border: 2px solid transparent; border-radius: 0.875rem; cursor: pointer; }
.vp-card:hover { background: var(--sf2); }
.vp-card.selected { background: var(--tint); border-color: var(--pr); }
.vp-empty, .empty { color: var(--tx2); font-size: 1rem; text-align: center; padding: 1.25rem; }

/* ── Puces (tonalité, changement de voix), segments ────────────────────── */
.tone-chips, .commas-lib { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.375rem; }
.tone-chip {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 1rem;
  border: 0; border-radius: 999px; background: var(--bg); color: var(--tx);
  font-size: 0.9375rem; font-weight: 600; cursor: pointer;
}
.tone-chip:hover { background: var(--tint); }
.tone-chip.active { background: var(--pr); color: #fff; font-weight: 800; }
#voiceChipsToggle { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--pr) !important; font-size: 0.9375rem !important; font-weight: 700 !important; }
.comma-add { min-height: 2.75rem; padding: 0 1rem; border: 1.5px dashed var(--bd); border-radius: 999px; background: var(--sf); color: var(--pr); font-size: 0.9375rem; font-weight: 700; cursor: pointer; }
.comma-add:hover { background: var(--tint); }
.seg { display: flex; gap: 0.5rem; margin-top: 0.375rem; }
.seg label { flex: 1; margin: 0; }
.seg input { display: none; }
.seg span { display: flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: 0 0.75rem; border: 1.5px solid var(--bd); border-radius: 0.875rem; font-size: 0.9375rem; cursor: pointer; }
.seg input:checked + span { background: var(--pr); border-color: var(--pr); color: #fff; }
.speed-row { display: flex; align-items: center; gap: 0.75rem; }
.speed-row input[type=range] { flex: 1; min-width: 0; }
.speed-val { min-width: 2.75rem; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }

/* ── Génération ────────────────────────────────────────────────────────── */
.gen-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; margin-top: 1.25rem; }
.gen-row .btn-primary { flex: 1 1 14rem; }
.time-est { color: var(--tx2); font-size: 0.9375rem; }
.time-est.ready { color: var(--ok-tx); font-weight: 700; }
.gen-anim { display: none; text-align: center; padding: 1.125rem 0.5rem 0.375rem; }
.eq { display: inline-flex; align-items: flex-end; gap: 0.25rem; height: 1.875rem; }
.eq span { width: 0.3125rem; border-radius: 0.1875rem; background: var(--pr); animation: eq 1s ease-in-out infinite; }
.eq span:nth-child(2) { animation-delay: 0.15s; } .eq span:nth-child(3) { animation-delay: 0.3s; }
.eq span:nth-child(4) { animation-delay: 0.45s; } .eq span:nth-child(5) { animation-delay: 0.6s; }
.eq span:nth-child(6) { animation-delay: 0.75s; }
@keyframes eq { 0%, 100% { height: 0.4375rem; } 50% { height: 1.875rem; } }
.gen-msg { color: var(--tx); font-size: 1rem; font-weight: 600; margin-top: 0.625rem; }
audio { width: 100%; margin-top: 0.75rem; }
.waveform-wrap { display: none; margin-top: 0.75rem; border-radius: 0.875rem; overflow: hidden; background: var(--sf2); }
.waveform-wrap canvas { display: block; width: 100%; height: 4rem; }
.mix-panel { display: none; margin-top: 0.75rem; padding: 1rem; border-radius: 1rem; background: var(--bg); }
.mix-panel .mix-title { font-weight: 800; margin-bottom: 0.625rem; }
.mix-channels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.625rem; margin-bottom: 0.625rem; }
.mix-ch { text-align: center; }
.mix-ch .ch-label { color: var(--tx2); font-size: 0.875rem; font-weight: 600; }
.mix-ch input[type=range] { width: 100%; }
.mix-ch .ch-val { font-size: 0.875rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.mix-btn-row { display: flex; gap: 0.5rem; }
.note { margin-top: 0.75rem; padding: 0.875rem 1rem; border-radius: 1rem; background: var(--tint); color: var(--tx); font-size: 0.9375rem; line-height: 1.5; }
.draft-bar { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; margin-bottom: 0.625rem; padding: 0.5rem 0.5rem 0.5rem 1rem; border-radius: 1rem; background: var(--tint); font-size: 0.9375rem; }
.draft-bar button { min-height: 2.75rem; padding: 0 0.75rem; border: 0; background: transparent; color: var(--pr); font-weight: 700; text-decoration: underline; cursor: pointer; }

/* ── Médiathèque ───────────────────────────────────────────────────────── */
/* Le tableau devient une liste : sur téléphone, les actions passent sous le titre. */
.ann-table, .ann-table tbody { display: block; width: 100%; }
.ann-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.5rem 0.75rem; padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.ann-table tr:last-child { border-bottom: 0; }
.ann-table td { display: block; padding: 0; min-width: 0; }
.ann-table td:last-child { grid-column: 1 / -1; }
.ann-name { padding: 0.125rem 0.25rem; margin-left: -0.25rem; border-radius: 0.375rem; font-size: 1rem; font-weight: 800; cursor: text; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ann-name:hover { background: var(--sf2); }
.ann-name-input { width: 100%; min-height: 2.75rem !important; padding: 0.25rem 0.5rem !important; font-weight: 800; }
.ann-meta { color: var(--tx2); font-size: 0.875rem; margin-top: 0.125rem; }
.ann-play {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 2.75rem; height: 2.75rem; border: 0; border-radius: 50%;
  background: var(--pr); color: #fff; cursor: pointer;
}
.ann-play:hover { background: var(--pr-hover); }
.status-pill { display: inline-flex; align-items: center; gap: 0.375rem; min-height: 2rem; padding: 0.25rem 0.75rem; border-radius: 999px; font-size: 0.875rem; font-weight: 800; white-space: nowrap; }
.status-pill.ok { background: var(--ok-bg); color: var(--ok-tx); }
.status-pill.todo { background: var(--err-bg); color: var(--err-tx); min-height: 2.75rem; }
.td-actions { display: flex; flex-wrap: wrap; gap: 0.375rem; justify-content: flex-start; align-items: center; }
/* Icône seule ou icône + libellé : dimensions MINIMALES (une largeur fixe coupait les libellés) */
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem;
  min-width: 2.75rem; min-height: 2.75rem; padding: 0 0.75rem; border: 0; border-radius: 0.75rem;
  background: var(--bg); color: var(--tx); font-size: 0.9375rem; font-weight: 700; text-decoration: none; white-space: nowrap; cursor: pointer;
}
.icon-btn:hover { background: var(--tint); color: var(--pr); }
.icon-btn.danger:hover { background: var(--err-bg); color: var(--err-tx); }

/* ── Fenêtres, messages ────────────────────────────────────────────────── */
.cm-overlay { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(28, 32, 48, 0.62); overflow-y: auto; }
.cm-box { width: 26rem; max-width: 100%; padding: 1.5rem; border-radius: 1.5rem; background: var(--sf); text-align: center; }
.cm-box .ic { color: var(--err-tx); display: flex; justify-content: center; }
.cm-box h3 { font-size: 1.25rem; font-weight: 800; margin: 0.625rem 0 0.375rem; }
.cm-box p { color: var(--tx2); font-size: 1rem; line-height: 1.5; }
.cm-box .actions { display: flex; flex-wrap: wrap; gap: 0.625rem; margin-top: 1.25rem; }
.cm-box .actions button { flex: 1 1 8rem; min-height: 3rem; padding: 0 1rem; border: 0; border-radius: 999px; font-size: 1rem; font-weight: 800; cursor: pointer; }
.cm-cancel { background: var(--tint); color: var(--tx); }
.cm-cancel:hover { background: var(--line); }
.cm-confirm { background: var(--err-tx); color: #fff; }
.cm-confirm:hover { background: #6f150d; }
.toast { position: fixed; bottom: max(1.5rem, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 9999; max-width: calc(100vw - 2rem); padding: 0.75rem 1.25rem; border-radius: 999px; background: var(--tx); color: #fff; font-size: 1rem; font-weight: 600; text-align: center; opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.toast.show { opacity: 1; }

/* ── Mode acteur (enregistrement au micro) ─────────────────────────────── */
.rec-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 0.875rem; margin-top: 0.875rem; }
.rec-timer { min-width: 3.875rem; font-size: 1.125rem; font-weight: 800; font-variant-numeric: tabular-nums; }
#recBtn.rec-on { background: var(--err-tx); }
#recBtn.rec-on:hover { background: #6f150d; }
.rec-on .rec-dot { display: inline-block; width: 0.625rem; height: 0.625rem; border-radius: 50%; background: #fff; animation: recpulse 1s ease-in-out infinite; }
@keyframes recpulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.mic-test { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 0.875rem; }
#micTestBtn.testing { background: var(--pr); border-color: var(--pr); color: #fff; }
/* VU-mètre : barre pleine + repère de crête ; le diagnostic est écrit à côté (« Niveau correct »…) */
.mic-meter { position: relative; flex: 1; min-width: 9.375rem; height: 0.875rem; border-radius: 999px; background: var(--line); overflow: hidden; }
.mic-meter-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0%; border-radius: 999px; background: var(--pr); transition: width 0.05s linear; }
.mic-meter-peak { position: absolute; top: 0; bottom: 0; width: 2px; left: 0%; background: var(--tx); transition: left 0.08s linear; }
.mic-hint { min-width: 10.625rem; color: var(--tx2); font-size: 0.9375rem; font-weight: 600; }

/* ── Icônes ─────────────────────────────────────────────────────────────────
   Balisage : <i class=ic-NOM></i> (sans guillemets : sûr dans toutes les chaînes JavaScript).
   Le dessin est un masque coloré par currentColor : l'icône prend la couleur du texte.
   Un bouton réduit à une icône doit porter un title ou un aria-label. */
i[class^="ic-"] { display: inline-block; flex-shrink: 0; width: 1.125rem; height: 1.125rem; vertical-align: -0.2em; background: currentColor; -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
.ic-play { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='black'%3E%3Cpath d='M5 2.500l10.500 6.500L5 15.500z'/%3E%3C/svg%3E"); }
.ic-pause { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='black'%3E%3Cpath d='M4 3h3.500v12H4zM10.500 3H14v12h-3.500z'/%3E%3C/svg%3E"); }
.ic-stop { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='black'%3E%3Cpath d='M4.500 4.500h9v9h-9z'/%3E%3C/svg%3E"); }
.ic-dot { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='black'%3E%3Cpath d='M9 4a5 5 0 100 10A5 5 0 009 4z'/%3E%3C/svg%3E"); }
.ic-pencil { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.500 15.500l1-4 8.500-8.500 3 3-8.500 8.500z'/%3E%3C/svg%3E"); }
.ic-trash { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 5h12M7 5V3h4v2M5 5l.7 10.500h6.600L13 5'/%3E%3C/svg%3E"); }
.ic-sliders { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 5h8M14 5h2M2 13h2M8 13h8M10 5a2 2 0 104 0 2 2 0 10-4 0M4 13a2 2 0 104 0 2 2 0 10-4 0'/%3E%3C/svg%3E"); }
.ic-download { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 2v9M5 8l4 4 4-4M3 15.500h12'/%3E%3C/svg%3E"); }
.ic-upload { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 12V3M5 6l4-4 4 4M3 15.500h12'/%3E%3C/svg%3E"); }
.ic-swap { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h11l-3-3M15 12H4l3 3'/%3E%3C/svg%3E"); }
.ic-refresh { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 9a6 6 0 11-2-4.500M15 3v3.500h-3.500'/%3E%3C/svg%3E"); }
.ic-copy { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7.500 6h6a1.500 1.500 0 011.500 1.500v6a1.500 1.500 0 01-1.500 1.500h-6A1.500 1.500 0 016 13.500v-6A1.500 1.500 0 017.500 6zM3 12V4.500A1.500 1.500 0 014.500 3H12'/%3E%3C/svg%3E"); }
.ic-save { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3h9l3 3v9H3zM6 3v4h5V3M6 15v-5h6v5'/%3E%3C/svg%3E"); }
.ic-repeat { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8V7a2 2 0 012-2h9l-2.500-2.500M15 10v1a2 2 0 01-2 2H4l2.500 2.500'/%3E%3C/svg%3E"); }
.ic-warn { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 2l7.500 13.500h-15zM9 7.500v3.500M9 13.300v.2'/%3E%3C/svg%3E"); }
.ic-search { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8a5 5 0 1010 0 5 5 0 10-10 0M12 12l4 4'/%3E%3C/svg%3E"); }
.ic-speaker { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7h3l4-3.500v11L6 11H3zM13 6.500a3.500 3.500 0 010 5'/%3E%3C/svg%3E"); }
.ic-mic { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 1.500a3 3 0 013 3v4a3 3 0 01-6 0v-4a3 3 0 013-3zM3 8.500a6 6 0 0012 0M9 14.500V17'/%3E%3C/svg%3E"); }
.ic-star { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 1.800l2.200 4.600 5 .7-3.600 3.500.9 5L9 13.200l-4.500 2.400.9-5L1.800 7.100l5-.7z'/%3E%3C/svg%3E"); }
.ic-pin { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 16.500s5.500-5 5.500-9.200a5.500 5.500 0 10-11 0C3.500 11.500 9 16.500 9 16.500zM7 7.300a2 2 0 104 0 2 2 0 10-4 0'/%3E%3C/svg%3E"); }
.ic-site { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 16V5l6-3 6 3v11M7 16v-4h4v4M2 16h14'/%3E%3C/svg%3E"); }
.ic-calendar { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4.500h12v11H3zM3 8h12M6 2v4M12 2v4'/%3E%3C/svg%3E"); }
.ic-help { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1.800 9a7.200 7.200 0 1014.400 0 7.200 7.200 0 10-14.400 0M6.800 7a2.300 2.300 0 114 1.500c-.9.8-1.800 1.200-1.800 2.400M9 13.400v.2'/%3E%3C/svg%3E"); }
.ic-close { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4l10 10M14 4L4 14'/%3E%3C/svg%3E"); }
.ic-plus { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 3v12M3 9h12'/%3E%3C/svg%3E"); }
.ic-lock { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.500 8h9v8h-9zM6.500 8V5.500a2.500 2.500 0 015 0V8'/%3E%3C/svg%3E"); }
.ic-check { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9.500l3.500 3.500L15 5'/%3E%3C/svg%3E"); }
.ic-clock { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 9a7 7 0 1014 0A7 7 0 102 9M9 5v4l2.500 2'/%3E%3C/svg%3E"); }
.ic-link { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7.500 10.500a3 3 0 004.200 0l2.300-2.300a3 3 0 00-4.200-4.200l-.8.8M10.500 7.500a3 3 0 00-4.200 0L4 9.800A3 3 0 008.200 14l.8-.8'/%3E%3C/svg%3E"); }
.ic-skipstart { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 3v12M15 3L6.500 9l8.500 6z'/%3E%3C/svg%3E"); }
.ic-skipend { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3v12M3 3l8.500 6L3 15z'/%3E%3C/svg%3E"); }
.ic-cut { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.500 5a2 2 0 104 0 2 2 0 10-4 0M2.500 13a2 2 0 104 0 2 2 0 10-4 0M6.200 6.200L15 14M6.200 11.800L15 4'/%3E%3C/svg%3E"); }
.ic-undo { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h7a4 4 0 010 8H7M7 4L4 7l3 3'/%3E%3C/svg%3E"); }
.ic-music { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 14V4l8-1.500V12M3 14a2 2 0 104 0 2 2 0 10-4 0M11 12a2 2 0 104 0 2 2 0 10-4 0'/%3E%3C/svg%3E"); }
.ic-megaphone { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7v4h2l6 3.500v-11L5 7zM13.500 6.500a3.500 3.500 0 010 5'/%3E%3C/svg%3E"); }
.ic-list { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 5h9M6 9h9M6 13h9M3 5h.01M3 9h.01M3 13h.01'/%3E%3C/svg%3E"); }
.ic-device { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.500 2h5A1.500 1.500 0 0113 3.500v11a1.500 1.500 0 01-1.500 1.500h-5A1.500 1.500 0 015 14.500v-11A1.500 1.500 0 016.500 2zM8.500 13.500h1'/%3E%3C/svg%3E"); }
.ic-user { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 6a3 3 0 106 0 3 3 0 10-6 0M3.500 15.500a5.500 5.500 0 0111 0'/%3E%3C/svg%3E"); }
.ic-eye { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1.500 9s3-5 7.500-5 7.500 5 7.500 5-3 5-7.500 5S1.500 9 1.500 9zM7 9a2 2 0 104 0 2 2 0 10-4 0'/%3E%3C/svg%3E"); }
.ic-image { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3h12v12H3zM3 12l3.500-3.500L10 12l2-2 3 3M11 6.500h.01'/%3E%3C/svg%3E"); }

@media (prefers-reduced-motion: reduce) {
  .eq span, .rec-on .rec-dot { animation: none; }
  .eq span { height: 1.125rem; }
}

/* ══ À partir de 480 px ═════════════════════════════════════════════════ */
@media (min-width: 30rem) {
  .row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ══ À partir de 640 px ═════════════════════════════════════════════════ */
@media (min-width: 40rem) {
  header { padding-left: 1.5rem; padding-right: 1.5rem; }
  header .nav { margin: 0 -1.5rem; padding-left: 1.5rem; padding-right: 1.5rem; }
  .wrap { padding: 0 1.5rem; }
  .card { padding: 1.75rem; }
  /* Assez de place : titre, statut et actions sur une seule ligne */
  .ann-table tr { grid-template-columns: minmax(0, 1fr) auto auto; }
  .ann-table td:last-child { grid-column: auto; }
  .td-actions { justify-content: flex-end; flex-wrap: nowrap; }
}

/* ══ À partir de 960 px ═════════════════════════════════════════════════ */
@media (min-width: 60rem) {
  header { position: sticky; top: 0; flex-wrap: nowrap; }
  header .nav { order: 0; flex: 0 1 auto; margin: 0; padding: 0; overflow: visible; }
  #planMount { margin-left: auto; }
  /* Grand écran : ordre du balisage (offre, navigation, langue), comme avant */
  header > #langSelector { order: 0; margin-left: 0; }
  header:has(> #langSelector) > #planMount { order: 0; margin-left: auto; }
  .wrap { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; }
  /* Colonne étroite de la médiathèque : les actions repassent sous le titre */
  .ann-table tr { grid-template-columns: minmax(0, 1fr) auto; }
  .ann-table td:last-child { grid-column: 1 / -1; }
  .td-actions { justify-content: flex-start; }
}
