/* =========================================================
   Rythmo Studio — design system
   Fond studio sombre + accent phosphore (moniteur) + ambre (rec)
   ========================================================= */

:root {
  --bg: #0a0a0c;
  /* fond studio, identique à l'app */
  --panel: #16161c;
  --panel-raised: #1d1d24;
  --line: #29292f;
  --text: #f0f0f4;
  --text-dim: #8a8a95;
  --accent: #e8c84a;
  /* jaune Rythmo Studio */
  --accent-dim: #8a7a3a;
  --rec: #e8904a;
  /* ambre secondaire de l'app */
  --rec-dim: #7a5230;

  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  --radius: 3px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

::selection {
  background: var(--accent);
  color: #0e0f13;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.container {
  width: 100%;
  /* Même largeur que le hero (voir .hero-inner, qui redéfinissait ces deux
     valeurs en double avant) : tous les blocs de la page s'alignent sur les
     mêmes bords, au lieu que le hero soit plus large et tout le reste plus
     centré/resserré en dessous. */
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 56px;
}

/* -----------------------------------------------------------
   Page rail — accent line running the full height of the page
----------------------------------------------------------- */
.page-rail {
  /* Masquée pour le moment (voir la demande) — display:none plutôt que
     supprimée du HTML/CSS, pour pouvoir la remettre facilement. */
  display: none;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 28px;
  width: 1px;
  background: var(--accent-dim);
  z-index: 1;
  pointer-events: none;
}

@media (max-width: 720px) {
  .page-rail {
    display: none;
  }
}

/* -----------------------------------------------------------
   Header / nav
----------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14, 15, 19, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.logo-img {
  height: 50px;
  width: auto;
  display: block;
}

.logo .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rec);
  display: inline-block;
  box-shadow: 0 0 8px 1px var(--rec);
  animation: blink 2.4s ease-in-out infinite;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.25;
  }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.03em;
  color: var(--text-dim);
  border-radius: var(--radius);
  transition: color 0.15s ease, background 0.15s ease;
}

/* Photo de profil affichée à droite de "Mon compte" une fois connecté (voir
   syncNavWithSession dans app.js) — masquée par défaut (attribut hidden),
   affichée seulement si l'utilisateur a choisi une photo (account.html). */
.nav-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
}

/* La règle globale "img { display: block; }" (voir plus haut) est une
   déclaration AUTEUR : elle l'emporte sur le display:none par défaut du
   navigateur pour [hidden] (une origine UA, toujours perdante face à
   l'auteur, quelle que soit la spécificité) — sans ce correctif, un
   <img hidden> réapparaît quand même en display:block. */
.nav-avatar[hidden] {
  display: none;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--panel-raised);
}

.nav-links a.active {
  color: var(--accent);
}

.nav-cta {
  font-family: var(--font-mono);
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.nav-cta:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.nav-cta-primary {
  background: var(--accent);
  color: #0a0a0c;
  font-weight: 500;
  border-color: var(--accent);
}

.nav-cta-primary:hover {
  background: #f0d876;
  border-color: #f0d876;
  color: #0a0a0c;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  width: 40px;
  height: 40px;
  font-size: 18px;
  cursor: pointer;
}

/* -----------------------------------------------------------
   Rythmo band — signature element (bandeau défilant)
----------------------------------------------------------- */
.rythmo-band {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  height: 34px;
  display: flex;
  align-items: center;
}

.rythmo-band .track {
  display: flex;
  gap: 60px;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--accent-dim);
  animation: scroll-left 26s linear infinite;
  padding-left: 100%;
}

.rythmo-band .track span {
  color: var(--text-dim);
}

.rythmo-band .track span.mark {
  color: var(--accent);
}

@keyframes scroll-left {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .rythmo-band .track {
    animation: none;
    padding-left: 20px;
  }

  .logo .dot {
    animation: none;
  }

  .hero-visual {
    animation: none;
    opacity: 0.92;
    transform: translateY(-46%) scale(1);
  }
}

/* -----------------------------------------------------------
   Hero
----------------------------------------------------------- */
.hero {
  position: relative;
  padding: 100px 0 110px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--accent);
}

/* Même largeur/centrage que .container (1500px, centré) au lieu de couvrir
   toute la largeur de la fenêtre (inset:0 sur .hero) : sans ça, .hero-visual
   (right:-4% ci-dessous) s'ancrait au bord droit de l'ÉCRAN, pas du bloc de
   contenu — sur un écran très large/dézoomé, l'image partait très loin du
   texte au lieu de rester à côté comme les autres blocs de la page. */
.hero-decor {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 1500px;
  margin: 0 auto;
  z-index: 0;
  pointer-events: none;
}

/* Vignettage renforcé côté texte (gauche) : le fondu circulaire de
   .hero-visual seul laissait l'image trop présente sous le texte — ce
   dégradé additionnel l'assombrit davantage à gauche pour la lisibilité. */
.hero-decor::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--bg) 0%, rgba(10, 10, 12, 0.88) 30%, transparent 64%);
}

.hero-visual {
  position: absolute;
  top: 50%;
  right: -4%;
  width: min(70%, 990px);
  max-width: none;
  transform: translateY(-46%) scale(0.97);
  border-radius: 18px;
  opacity: 0;
  filter: brightness(0.8);
  /* Fondu circulaire sur les 4 bords : l'image se dissout dans le fond
     sombre du site plutôt que de montrer une bordure de capture d'écran. */
  -webkit-mask-image: radial-gradient(ellipse 68% 62% at 50% 50%, #000 52%, transparent 100%);
  mask-image: radial-gradient(ellipse 68% 62% at 50% 50%, #000 52%, transparent 100%);
  animation: heroVisualIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
}

@keyframes heroVisualIn {
  from {
    opacity: 0;
    transform: translateY(-42%) scale(0.94);
  }

  to {
    opacity: 0.92;
    transform: translateY(-46%) scale(1);
  }
}

/* Le hero ignore le plafond de largeur de .container (1180px, centré avec
   de grandes marges vides sur les écrans larges) : son contenu doit longer
   les bords réels de la fenêtre, pas rester centré dans une boîte étroite. */
.hero-inner {
  /* max-width/padding identiques à .container maintenant (voir sa règle) —
     plus besoin de les redéfinir ici. */
  position: relative;
  z-index: 1;
}

.hero-rail {
  max-width: 640px;
  padding-left: 26px;
}

.hero-kicker {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

h1.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  font-size: clamp(52px, 9vw, 108px);
  line-height: 0.92;
  letter-spacing: 0.01em;
  margin: 0 0 30px;
}

.hero-role {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 28px;
}

.hero-role-line {
  width: 26px;
  height: 1px;
  background: var(--line);
  flex: none;
}

.hero-role .accent {
  color: var(--accent);
}

.hero-lede {
  font-size: 18px;
  color: var(--text-dim);
  max-width: 52ch;
  margin: 0 0 40px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-hero {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 15px 26px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-hero:active {
  transform: translateY(1px);
}

.btn-hero-primary {
  background: var(--accent);
  color: #0e0f13;
  border-color: var(--accent);
}

.btn-hero-primary:hover {
  background: #f0d876;
  border-color: #f0d876;
}

.btn-hero-outline {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--line);
  color: var(--text);
}

.btn-hero-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(232, 200, 74, 0.05);
}

/* -----------------------------------------------------------
   Buttons
----------------------------------------------------------- */
button {
  background: none;
  border: none;
  color: inherit;
  font: inherit;
}

.btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.03em;
  padding: 13px 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: var(--panel-raised);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: #0e0f13;
  font-weight: 600;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: #f0d876;
  border-color: #f0d876;
  color: #0e0f13;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--line);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(232, 200, 74, 0.05);
}

.btn-rec {
  background: #f0d876;
  color: #1a0d05;
  font-weight: 600;
}

.btn-rec:hover {
  background: #e9db62;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* -----------------------------------------------------------
   Sections / cards
----------------------------------------------------------- */
section {
  padding: 84px 0;
}

section.tight {
  padding: 56px 0;
}

/* CTA de fin de page : même DA que le hero (boutons .btn-hero, "\"/"/"),
   mais centrée plutôt qu'alignée à gauche comme .section-head par défaut. */
.tight .section-head {
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 28px;
}

.tight .hero-actions {
  justify-content: center;
}

.cta-lede {
  margin: 14px 0 0;
  max-width: 46ch;
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-dim);
}

section+section {
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 44px;
}

h2.section-title {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 500;
  margin: 0;
}

.section-note {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
  max-width: 34ch;
  text-align: right;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.card {
  background: var(--panel);
  padding: 32px 28px;
}

.card .idx {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 18px;
  display: block;
}

.card h3 {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 19px;
  font-weight: 500;
  margin: 0 0 12px;
  letter-spacing: 0.01em;
}

.card p {
  color: var(--text-dim);
  font-size: 14.5px;
  margin: 0;
}

/* -----------------------------------------------------------
   Workflow — 2 colonnes : titre à gauche, liste numérotée à droite, puis un
   emplacement vidéo pleine largeur en dessous (remplace l'ancienne section
   "features-scroll" à défilement épinglé). Fond clair délibéré (contraste
   avec le reste du site sombre), calqué sur la référence fournie.
----------------------------------------------------------- */
.workflow {
  background: #fff;
  color: #15161a;
}

.workflow-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  /* centré (pas "start") : le titre, court, doit se recentrer verticalement
     par rapport à la liste à droite, plus haute avec ses 5 lignes. */
  align-items: center;
  margin-bottom: 56px;
}

/* Titre incrusté EN BLANC sur l'image (coin haut-gauche), au lieu d'être
   au-dessus en texte noir — dégradé sombre sur le haut de l'image (même
   principe que .solution-card plus haut) pour qu'il reste lisible quelle
   que soit la photo utilisée. */
.workflow-illustration-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(10, 10, 12, 0.12);
}

.workflow-illustration-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  /* Voile centré (titre maintenant au milieu, pas juste en haut) — plus
     sombre au centre, se dissipe vers les bords pour laisser voir la photo. */
  background: radial-gradient(ellipse at center, rgba(10, 10, 12, 0.62) 0%, rgba(10, 10, 12, 0.34) 55%, rgba(10, 10, 12, 0.12) 100%);
  pointer-events: none;
}

.workflow-illustration {
  display: block;
  width: 100%;
}

.workflow-head .section-title {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 28px;
  text-align: center;
  /* Essai : polices inversées avec .workflow-item p ci-dessous (Oswald ici,
     Roboto là-bas, au lieu de l'inverse) — voir la règle par défaut de
     h2.section-title (déjà en Oswald) dont hérite majuscule/graisse ; ceci
     n'ajoute que la couleur blanche. */
  color: #fff;
}

.workflow-list-wrap {
  position: relative;
}

.workflow-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Tête de lecture jaune (voir initWorkflowPlayhead dans home.js) : sa
   position "left" est recalculée à chaque scroll — 0 (bord gauche, au
   niveau des 01/02/03…) quand le bloc blanc vient d'apparaître en bas de
   l'écran, 100% (bord droit, dégagé du texte) quand il arrive au niveau du
   header. Même couleur/lueur que la tête de lecture de l'appli. */
.workflow-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: var(--accent);
  box-shadow: 0 0 10px 1px rgba(232, 200, 74, 0.55);
  pointer-events: none;
}

.workflow-item {
  display: flex;
  align-items: baseline;
  gap: 22px;
  padding: 14px 0;
  border-top: 1px solid rgba(10, 10, 12, 0.12);
}

.workflow-item:first-child {
  border-top: none;
}

.workflow-item-mark {
  flex: none;
  width: 34px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-dim);
}

.workflow-item p {
  margin: 0;
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: clamp(14px, 1.8vw, 18px);
  line-height: 1.35;
  color: #15161a;
  white-space: nowrap;
}

/* Emplacement réservé pour une vidéo de démo — pas de source pour l'instant,
   juste le cadre + un bouton lecture en CSS (pas d'image). */
.workflow-video {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  background: linear-gradient(135deg, #1d1e24, #0a0a0c);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(10, 10, 12, 0.16);
}

.workflow-video-play {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.workflow-video-play::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 56%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 12px 0 12px 20px;
  border-color: transparent transparent transparent #fff;
}

@media (max-width: 720px) {
  .workflow-inner {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 32px;
  }
}

/* -----------------------------------------------------------
   Solutions — bloc à 3 colonnes juste sous le hero (Bande Rythmo /
   Édition Audio / Sous-titrage). Grille sans align-items explicite
   (stretch par défaut) : les 3 cartes gardent la même hauteur sur une
   même ligne quelle que soit la longueur de leur texte ; à l'intérieur,
   .solution-card en colonne garde titre/texte ancrés en haut et pousse
   "En savoir plus" tout en bas via margin-top:auto.
----------------------------------------------------------- */
.solutions-head {
  max-width: 1000px;
  margin: 0 auto 48px;
  text-align: center;
}

/* Revenu à l'Oswald majuscule par défaut de h2.section-title — seul le
   nowrap reste utile ici (titre plus long que les autres, sur une ligne). */
.solutions-head .section-title {
  white-space: nowrap;
}

.solutions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

/* Capture d'écran du logiciel en fond de chaque bloc — dégradé sombre
   superposé (dans le même background-image, pas un ::before à part) pour
   que le titre/texte restent lisibles quelle que soit la luminosité de
   l'image en dessous. */
.solution-card {
  display: flex;
  flex-direction: column;
  text-align: center;
  padding: 32px 22px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 320px;
  /* Animation "en cascade" à l'entrée dans l'écran (voir initSolutionsReveal
     dans home.js, IntersectionObserver) : chaque carte apparaît l'une après
     l'autre grâce au transition-delay décalé ci-dessous, pas toutes en même
     temps. */
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.solution-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.solution-card:nth-child(1) { transition-delay: 0s; }
.solution-card:nth-child(2) { transition-delay: 0.14s; }
.solution-card:nth-child(3) { transition-delay: 0.28s; }

/* Noir plein derrière titre + paragraphe, transition remontée un peu plus
   tôt (48-62% au lieu de 58-72%) pour révéler l'image un peu plus tôt. */
.solution-card:nth-child(1) {
  background-image: linear-gradient(180deg, rgba(10, 10, 12, 1) 0%, rgba(10, 10, 12, 1) 48%, rgba(10, 10, 12, 0.55) 62%, rgba(10, 10, 12, 0.55) 100%), url('../visuel/solution-bande-rythmo.png');
}

.solution-card:nth-child(2) {
  background-image: linear-gradient(180deg, rgba(10, 10, 12, 1) 0%, rgba(10, 10, 12, 1) 48%, rgba(10, 10, 12, 0.55) 62%, rgba(10, 10, 12, 0.55) 100%), url('../visuel/solution-edition-audio.png');
}

.solution-card:nth-child(3) {
  background-image: linear-gradient(180deg, rgba(10, 10, 12, 1) 0%, rgba(10, 10, 12, 1) 48%, rgba(10, 10, 12, 0.55) 62%, rgba(10, 10, 12, 0.55) 100%), url('../visuel/solution-sous-titrage.png');
}

.solution-card h3 {
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 20px;
  font-weight: 500;
  margin: 0 0 14px;
  letter-spacing: 0.01em;
}

.solution-card p {
  color: #c8c8d0;
  font-size: 14.5px;
  margin: 0 0 22px;
}

.card-more {
  margin-top: auto;
  align-self: center;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
  transition: opacity 0.15s ease;
}

.card-more:hover {
  opacity: 0.7;
}

@media (max-width: 820px) {
  .solutions-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

/* -----------------------------------------------------------
   Why — remplace l'ancienne section "story-scroll" (défilement épinglé) :
   texte en haut à gauche, puis image (l'accordéon à droite change l'image
   au clic, voir initWhyAccordion() dans home.js). Fond sombre, comme le
   reste du site (hero/solutions) — .workflow juste au-dessus reste clair.
   Grille en 2 LIGNES : .why-text seul sur la ligne 1 (colonne gauche
   uniquement) puis .why-image + .why-right sur la ligne 2, pour que
   l'accordéon démarre au niveau de l'image, pas du texte au-dessus.
----------------------------------------------------------- */
.why {
  background: var(--bg);
  color: var(--text);
  border-top: 1px solid var(--line);
}

.why-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  column-gap: 64px;
  row-gap: 28px;
}

.why-text {
  /* Occupe toute la largeur de la grille (au lieu de la seule colonne 1)
     pour pouvoir être centré au milieu de la page via margin:auto,
     plutôt que collé à gauche au-dessus de l'image. */
  grid-column: 1 / -1;
  grid-row: 1;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* Pas de class="section-title" sur ce h2 (voir le HTML) : il n'hérite pas
   de la règle h2.section-title, donc l'Oswald/majuscules sont redéfinis
   explicitement ici plutôt qu'hérités. */
.why-text h2 {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: 500;
  /* Même taille que .solutions-head .section-title (elle hérite de
     h2.section-title, clamp(26px, 3.4vw, 38px), sans le redéfinir). */
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.25;
  margin: 0 0 20px;
  color: var(--text);
  white-space: nowrap;
}

.why-text p {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-dim);
  margin: 0 0 16px;
}

.why-text .why-lead {
  font-weight: 600;
  color: var(--text);
}

.why-image {
  grid-column: 1;
  grid-row: 2;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.why-image img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Cachée à gauche pendant le changement de source (voir initWhyAccordion
   dans home.js) : retirer cette classe juste après le swap la fait revenir
   en glissant de la gauche vers la droite en même temps qu'elle réapparaît. */
.why-image img.is-swapping {
  opacity: 0;
  transform: translateX(-40px);
}

.why-right {
  grid-column: 2;
  grid-row: 2;
}

.why-accordion {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Cartes claires (pas var(--panel-raised), trop proche du fond sombre de la
   section pour bien ressortir) — texte foncé à l'intérieur en conséquence. */
/* Essai : fermé = blanc + texte foncé ; ouvert = jaune + texte foncé aussi
   (même couleur de texte dans les deux états ici, donc pas d'override
   .is-active nécessaire pour le texte/l'icône, contrairement à la version
   gris foncé + texte blanc essayée avant). */
.why-acc-item {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  transition: background 0.2s ease;
}

.why-acc-item.is-active {
  background: var(--accent);
}

/* Le lien mono/gris (var(--accent-dim)) devient illisible sur le fond jaune
   une fois l'entrée ouverte — repasse en texte foncé, comme le reste du
   panneau, dans ce seul cas. */
.why-acc-item.is-active .why-acc-link {
  color: #15161a;
}

.why-acc-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  background: none;
  border: none;
  /* Essai : même police que les boutons/le menu (var(--font-mono),
     voir .btn/.nav-links a), au lieu de var(--font-body). */
  font-family: var(--font-mono);
  font-size: 14.5px;
  font-weight: 500;
  color: #15161a;
  text-align: left;
  cursor: pointer;
}

.why-acc-icon {
  flex: none;
  position: relative;
  width: 16px;
  height: 16px;
}

.why-acc-icon::before,
.why-acc-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: #15161a;
  transform: translate(-50%, -50%);
}

.why-acc-icon::before {
  width: 12px;
  height: 2px;
}

.why-acc-icon::after {
  width: 2px;
  height: 12px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.why-acc-item.is-active .why-acc-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
  opacity: 0;
}

/* Grille à une ligne 0fr→1fr : technique standard d'accordéon CSS pur
   (hauteur animable sans connaître la hauteur réelle du contenu). Le
   contenu doit être dans UN SEUL enfant direct (.why-acc-panel-inner) avec
   overflow:hidden, sinon seul le premier enfant serait animé. */
.why-acc-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease;
}

.why-acc-panel-inner {
  overflow: hidden;
}

.why-acc-item.is-active .why-acc-panel {
  grid-template-rows: 1fr;
}

.why-acc-panel p {
  margin: 0 0 10px;
  padding: 0 22px;
  font-size: 14px;
  line-height: 1.6;
  color: #4a4a52;
}

.why-acc-link {
  display: block;
  margin: 0 22px 18px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: black;
  text-decoration: underline;
}

@media (max-width: 860px) {
  .why-inner {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 28px;
  }

  /* Un seul empilement vertical (texte → image → accordéon) : sans ça,
     grid-column:2 sur .why-right chercherait une 2e colonne inexistante. */
  .why-text,
  .why-image,
  .why-right {
    grid-column: 1;
    grid-row: auto;
  }
}

/* -----------------------------------------------------------
   Footer
----------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-row .fine {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

/* -----------------------------------------------------------
   Auth / dashboard shared
----------------------------------------------------------- */
.auth-wrap {
  min-height: calc(100vh - 68px - 34px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 34px;
}

.auth-card h1 {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 26px;
  font-weight: 500;
  margin: 0 0 8px;
}

.auth-card .sub {
  color: var(--text-dim);
  font-size: 14px;
  margin: 0 0 30px;
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.field input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 12px 14px;
  transition: border-color 0.15s ease;
}

.field input:focus {
  border-color: var(--accent);
  outline: none;
}

.auth-error {
  display: none;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--rec);
  background: rgba(255, 122, 69, 0.08);
  border: 1px solid var(--rec-dim);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 18px;
}

.auth-error.show {
  display: block;
}

/* Message de succès (ex : lien de réinitialisation envoyé) — même forme que .auth-error, ton vert */
.auth-error.success {
  color: #4ab478;
  background: rgba(74, 180, 120, 0.08);
  border-color: rgba(74, 180, 120, 0.4);
}

.auth-switch {
  margin-top: 22px;
  text-align: center;
  font-size: 13.5px;
  color: var(--text-dim);
}

.auth-switch a {
  color: var(--accent);
}

/* Dashboard */
.dash-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  margin: 26px 0;
  background: #18181e;
  border: 1px solid #24262e;
  border-radius: 6px;
}

.dash-top .who {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #8e9aa8;
}

.dash-top .who strong {
  color: #ffb800;
}

.dash-actions {
  display: flex;
  gap: 10px;
}

.projects-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin: 40px 0 24px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.project-card {
  background: #1d1e24;
  border: 1px solid #24262e;
  border-radius: 6px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.15s ease;
}

.project-card:hover {
  border-color: #3a3d47;
}

.project-card .top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.project-card h3 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 16px;
  font-weight: 500;
  color: #e2e8f0;
  margin: 0;
}

.status-pill {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 20px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.status-pill.en-cours {
  background: rgba(74, 232, 160, 0.12);
  border-color: rgba(74, 232, 160, 0.3);
  color: #4ae8a0;
}

.status-pill.pause {
  background: rgba(240, 160, 48, 0.14);
  border-color: rgba(240, 160, 48, 0.32);
  color: #f0a030;
}

.status-pill.termine {
  background: rgba(142, 154, 168, 0.14);
  border-color: rgba(142, 154, 168, 0.3);
  color: #8e9aa8;
}

.project-card .meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #8e9aa8;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-line.card-video-badge {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Sections de dossiers (#projects-grid, voir dashboard.html/auth.js) — chaque
   dossier est affiché comme un bloc visuel distinct (en-tête + sa propre grille
   de projets), au même titre que les panneaux de l'appli (studio/renderer),
   plutôt qu'un simple filtre par étiquette. */
.folder-section {
  margin-bottom: 30px;
}

.folder-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  margin-bottom: 14px;
  background: #18181e;
  border: 1px solid #24262e;
  border-left: 3px solid #ffb800;
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.folder-section.collapsed .folder-section-header {
  margin-bottom: 0;
}

.folder-section-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.folder-section.unfiled .folder-section-header {
  border-left-color: #24262e;
}

.folder-chevron {
  flex-shrink: 0;
  color: #8e9aa8;
  font-size: 11px;
  transition: transform 0.15s ease;
}

.folder-section.collapsed .folder-chevron {
  transform: rotate(-90deg);
}

.folder-section.collapsed .projects-grid,
.folder-section.collapsed .folder-section-empty {
  display: none;
}

/* Cible de dépôt (glisser-déposer une carte projet dans un autre dossier) —
   voir buildProjectCard/buildFolderSection dans auth.js. */
.folder-section.drop-over .folder-section-header {
  border-color: #ffb800;
  background: rgba(232, 200, 74, 0.1);
}

.project-card.dragging {
  opacity: 0.4;
}

.folder-section-name {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 14px;
  font-weight: 500;
  color: #e2e8f0;
  min-width: 0;
}

.folder-section-name .folder-icon {
  flex-shrink: 0;
  font-size: 14px;
}

.folder-section-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #8e9aa8;
  white-space: nowrap;
}

.folder-section-del {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 4px;
  border: 1px solid transparent;
  background: transparent;
  color: #8e9aa8;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.folder-section-del:hover {
  color: var(--rec);
  border-color: var(--rec-dim);
  background: rgba(255, 122, 69, 0.08);
}

.folder-section-empty {
  padding: 18px 16px;
  border: 1px dashed #24262e;
  border-radius: 6px;
  color: #8e9aa8;
  font-size: 13px;
}

.project-card .row-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.project-card .row-actions .app-btn {
  flex: 1;
  padding: 9px 10px;
  font-size: 12px;
  white-space: nowrap;   /* « Ouvrir » / « Paramètres » toujours sur une seule ligne */
}

/* Boutons « Ouvrir » (carte projet) et « + Nouveau projet » : même DA que « ▶ Studio Rythmo » du header (.nav-cta-primary) */
.app-btn.app-btn-open {
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  color: #0a0a0c;
  font-family: var(--font-mono);
  font-weight: 500;
}
.app-btn.app-btn-open:hover {
  background: #f0d876;
  border-color: #f0d876;
  color: #0a0a0c;
}

.project-card .row-actions .app-btn-x {
  flex: 0 0 auto;
  width: 34px;
  padding: 0;
  font-size: 13px;
}

.btn-icon img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;
}

.btn-danger {
  border: 1px solid var(--rec-dim);
  color: var(--rec);
  background: transparent;
}

.btn-danger:hover {
  border-color: var(--rec);
  background: rgba(255, 122, 69, 0.08);
}

.empty-state {
  text-align: center;
  padding: 70px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--text-dim);
}

.empty-state p {
  margin: 10px 0 22px;
  font-size: 14px;
}

/* Modal (nouveau projet) */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 13, 0.72);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.show {
  display: flex;
}

.modal {
  width: 100%;
  max-width: 420px;
  background: var(--panel-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
}

.modal h2 {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 20px;
  font-weight: 500;
  margin: 0 0 20px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.modal-actions .btn {
  flex: 1;
}

/* Fenêtre « Métadonnées du projet » du dashboard — reprend le style des fenêtres du studio
   (studio/renderer/style.css : .modal, .modal-header, .prm-section, .prm-row, .prop-input, .btn) */
.modal.app-modal {
  max-width: 560px;
  padding: 0;
  background: #18181e;
  border: 1px solid #ffb800;
  border-radius: 10px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  font-family: var(--font-body);
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 40px);
  overflow: hidden;
}
.app-modal form { display: flex; flex-direction: column; min-height: 0; }
.app-modal-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid #24262e;
}
.app-modal-title { font-size: 16px; font-weight: 600; }
.app-modal-close {
  margin-left: auto; flex-shrink: 0;
  width: 32px; height: 32px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: #24262e; border: 1px solid #24262e; border-radius: 4px;
  color: #8e9aa8; font-size: 18px; line-height: 1; cursor: pointer;
}
.app-modal-close:hover { color: #e2e8f0; }
.app-modal-body { padding: 20px; overflow-y: auto; min-height: 0; }
.app-section {
  font-size: 13px; font-weight: 600; color: #ffb800;
  margin: 20px 0 12px; padding-bottom: 6px;
  border-bottom: 1px solid #24262e;
}
.app-section:first-child { margin-top: 0; }
.app-row {
  display: flex; align-items: center; gap: 14px;
  min-height: 30px; margin-bottom: 8px; padding-left: 12px;
}
.app-row label { flex: 0 0 220px; min-width: 0; font-size: 13px; color: #e2e8f0; }
.app-unit { font-size: 12px; color: #8e9aa8; }
.app-input {
  width: 230px;
  background: #1d1e24; border: 1px solid #24262e; border-radius: 4px;
  color: #e2e8f0; font-family: var(--font-body); font-size: 12px;
  padding: 5px 6px; outline: none; transition: border-color 0.15s;
}
.app-input:focus { border-color: #ffb800; }
.app-input-sm { width: 84px; text-align: center; }
.app-input-md { width: 130px; text-align: center; }
.app-modal-footer {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 16px 20px;
  border-top: 1px solid #24262e;
}
.app-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 16px; border-radius: 3px;
  font-family: var(--font-body); font-size: 13px; cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}
.app-btn-ghost { background: #18181e; border: 1px solid #24262e; color: #ffb800; }
.app-btn-ghost:hover { border-color: #8e9aa8; }
.app-btn-primary { background: rgba(232, 200, 74, 0.15); border: 1px solid #ffb800; color: #ffb800; font-weight: 500; }
.app-btn-primary:hover { background: rgba(232, 200, 74, 0.25); }
.app-btn-danger { background: #18181e; border: 1px solid #24262e; color: #e84a4a; }
.app-btn-danger:hover { border-color: #e84a4a; background: rgba(232, 74, 74, 0.1); }
.app-btn-gear { font-size: 13px; line-height: 1; opacity: 0.85; }
.app-btn:hover .app-btn-gear { opacity: 1; }
@media (max-width: 560px) {
  .app-row { flex-wrap: wrap; gap: 6px; padding-left: 0; }
  .app-row label { flex-basis: 100%; }
  .app-input { width: 100%; }
}

/* Rythmo Studio embed page */
.studio-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 0;
  gap: 16px;
  flex-wrap: wrap;
}

.studio-frame-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  height: 70vh;
  min-height: 480px;
}

.studio-frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* -----------------------------------------------------------
   Fonctionnalités (fonctionnalites.html) — une section par outil
   (Bande Rythmo / Édition Audio / Sous-titrage), chacune avec un titre +
   paragraphe d'intro puis 5 blocs texte/image en alternance gauche-droite.
----------------------------------------------------------- */
.features-hero {
  padding: 104px 0 40px;
  text-align: center;
}

.features-hero h1 {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 500;
  margin: 0;
}

.features-hero-lede {
  margin: 16px auto 0;
  max-width: 62ch;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-dim);
}

.feature-section {
  padding: 72px 0;
}

.feature-section-head {
  display: block;
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}

.feature-section-head p {
  margin: 14px auto 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-dim);
}

.feature-rows {
  display: flex;
  flex-direction: column;
  gap: 96px;
}

.feature-row {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  grid-template-areas: "text media";
  gap: 56px;
  align-items: center;
}

.feature-row-reverse {
  grid-template-columns: 1fr 2.2fr;
  grid-template-areas: "media text";
}

.feature-row-text {
  grid-area: text;
}

.feature-row-text h3 {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 0.01em;
  margin: 0 0 12px;
}

.feature-row-text p {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-dim);
  margin: 0;
}

.feature-row-media {
  grid-area: media;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.feature-row-media img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* -----------------------------------------------------------
   Responsive
----------------------------------------------------------- */
@media (max-width: 860px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-note {
    text-align: left;
  }

  .feature-row,
  .feature-row-reverse {
    grid-template-columns: 1fr;
    grid-template-areas:
      "media"
      "text";
    gap: 24px;
  }

  .feature-rows {
    gap: 48px;
  }
}

@media (max-width: 720px) {
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    padding: 10px 20px 18px;
    gap: 2px;
  }

  .hero {
    padding: 56px 0 48px;
  }

  .hero-decor {
    display: none;
  }

  .hero-rail {
    padding-left: 18px;
  }

  .footer-row {
    flex-direction: column;
    align-items: flex-start;
  }
}