/* Pages clients — style « Studio sombre » (voir maquette/studio-sombre.html).
   Mode sombre uniquement : noir, gris foncé, texte blanc, rouge pour les actions. */

:root {
  color-scheme: dark;
  --fond: #0f0f0f;
  --surface: #1b1b1b;          /* panneaux et cartes */
  --surface-2: #262626;        /* champs, boutons secondaires */
  --survol: #303030;
  --texte: #f1f1f1;
  --texte-2: #aaaaaa;
  --texte-3: #7a7a7a;
  --bordure: #383838;
  --rouge: #ff3b3b;
  --rouge-fonce: #e02424;
  --rouge-doux: rgba(255, 59, 59, 0.14);
  --lien: #3ea6ff;             /* liens texte et focus clavier */
  --vert: #2ba640;
  --orange: #f2a33a;
  --accent: var(--rouge);
  --accent-doux: var(--rouge-doux);
  --degrade: linear-gradient(var(--rouge), var(--rouge));  /* aplat rouge (anciens dégradés) */
  --ombre: 0 12px 30px rgba(0, 0, 0, 0.45);
  --rayon: 12px;
  /* Couleurs des graphiques (paire rouge / bleu lisible pour les daltoniens) */
  --serie-1: #ff3b3b;
  --serie-2: #3ea6ff;
  --titres: "Roboto", "Segoe UI", system-ui, -apple-system, sans-serif;
  --texte-police: "Roboto", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Roboto Mono", ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--texte);
  font-family: var(--texte-police);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background: var(--fond);
}
h1, h2, h3 { margin: 0; line-height: 1.25; font-family: var(--titres); font-weight: 500; }
button { font: inherit; color: inherit; }
a { color: inherit; }
img { max-width: 100%; display: block; }

.verre {
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
}
/* Ancien texte en dégradé : blanc pour les chiffres, rouge dans les titres */
.texte-degrade { color: var(--texte); }
h1 .texte-degrade { color: var(--rouge); }

/* ---------- En-tête ---------- */
/* Barre du haut sur toute la largeur, comme dans la maquette */
.entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 56px;
  margin: 0 0 1.25rem;
  padding: .5rem 1.25rem;
  border-bottom: 1px solid var(--bordure);
}
.marque { display: flex; align-items: center; gap: .6rem; font-family: var(--titres); font-weight: 500; font-size: 1.05rem; }
.marque-logo {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--rouge);
  color: #fff;
  font-weight: 700;
  font-size: .62rem;      /* « CGG » : 3 lettres dans un petit carré */
  letter-spacing: .02em;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .3rem .75rem;
  border-radius: 999px;
  background: var(--rouge-doux);
  color: #ff8a8a;
  font-size: .8rem;
  font-weight: 500;
}

.page { max-width: 1120px; margin: 0 auto; padding: 0 1rem 4rem; }

/* ---------- Écran de sécurité / messages ---------- */
.centre {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 80px);
  padding: 1rem;
}
.carte-centre {
  width: 100%;
  max-width: 460px;
  padding: 2rem 1.75rem;
  text-align: center;
  box-shadow: var(--ombre);
}
.icone {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 1.1rem;
  border-radius: 12px;
  background: var(--rouge-doux);
  color: var(--rouge);
}
.carte-centre h1 { font-size: 1.5rem; margin-bottom: 1.5rem; }
.carte-centre .explication { margin: -.75rem 0 0; color: var(--texte-2); }
.regles { list-style: none; margin: 0 0 1.75rem; padding: 0; text-align: left; counter-reset: regle; }
.regles li {
  position: relative;
  padding: .8rem 0 .8rem 2.6rem;
  border-top: 1px solid var(--bordure);
  color: var(--texte-2);
  font-size: .95rem;
}
.regles li strong { display: block; color: var(--texte); }
.regles li::before {
  counter-increment: regle;
  content: counter(regle);
  position: absolute;
  left: 0;
  top: .85rem;
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--texte);
  font-size: .85rem;
  font-weight: 700;
}
/* Écran de sécurité (maquette : carte alignée à gauche, règles numérotées 01-03) */
.carte-securite { max-width: 440px; padding: 2rem; text-align: left; box-shadow: none; }
.carte-securite .icone { width: 48px; height: 48px; margin: 0 0 1.1rem; }
.carte-securite h1 { margin: 0; font-size: 1.4rem; }
.carte-securite .sous-titre { margin: .35rem 0 1.25rem; color: var(--texte-2); }
.carte-securite .regles { margin: 0 0 1.5rem; }
.carte-securite .regles li { display: flex; gap: .85rem; padding: .8rem 0; font-size: .9rem; }
.carte-securite .regles li::before { content: none; }
.carte-securite .regles li strong { font-weight: 500; }
.carte-securite .numero { flex: none; padding-top: .15rem; color: var(--texte-3); font-family: var(--mono); font-size: .75rem; }

.bouton {
  width: 100%;
  min-height: 44px;
  padding: .7rem 1.2rem;
  border: 0;
  border-radius: 999px;
  background: var(--rouge);
  color: #fff;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
}
.bouton:hover { background: var(--rouge-fonce); }
.bouton:disabled { opacity: .6; cursor: wait; }
.bouton:focus-visible { outline: 2px solid var(--lien); outline-offset: 3px; }
.erreur-bouton { margin: .9rem 0 0; color: #ff8a8a; font-size: .9rem; }

.chargement {
  width: 34px;
  height: 34px;
  border: 3px solid var(--surface-2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: tourne .8s linear infinite;
}
@keyframes tourne { to { transform: rotate(360deg); } }

/* ---------- Titres ---------- */
.intro { padding: .5rem 0 1.25rem; }
.intro .petit { margin: .35rem 0 0; color: var(--texte-2); font-size: .95rem; }
.intro h1 { font-size: clamp(1.5rem, 3.5vw, 2rem); font-weight: 500; }
.section { margin-top: 2.75rem; }
.section-titre { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.section-titre h2 { font-size: 1.4rem; }
.section-titre span { color: var(--texte-3); font-size: .85rem; }

/* ---------- Tuiles ---------- */
.tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .75rem; }
.tuile { padding: 1.1rem 1.2rem; }
.tuile .libelle { display: block; color: var(--texte-2); font-size: .85rem; font-weight: 700; }
.tuile .valeur { display: block; margin-top: .2rem; font-family: var(--titres); font-size: 1.9rem; font-weight: 500; font-variant-numeric: tabular-nums; }

/* ---------- Images (bannières, logos, miniatures) ---------- */
.image-fond { background: linear-gradient(135deg, #3a1414, #262626); background-size: cover; background-position: center; }
.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--rouge);
  color: #fff;
  font-family: var(--titres);
  font-weight: 700;
  font-size: 1.15rem;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.grand { width: 96px; height: 96px; font-size: 2rem; border: 4px solid var(--fond); }

/* ---------- Carrousel ---------- */
.piste-carrousel {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: .5rem;
  scrollbar-width: none;
}
.piste-carrousel::-webkit-scrollbar { display: none; }
/* 4 slides visibles sur ordinateur, 2 sur tablette, 1 sur téléphone */
.diapo {
  position: relative;
  flex: 0 0 calc((100% - 3rem) / 4);
  height: 210px;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: var(--rayon);
  scroll-snap-align: start;
  color: #fff;
  text-align: left;
  cursor: pointer;
}
.diapo:hover { outline: 1px solid #666; }
.diapo .voile {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  padding: 1.25rem;
  background: linear-gradient(to top, rgba(0,0,0,.75), rgba(0,0,0,0) 65%);
}
.diapo h3 { font-size: 1.05rem; font-weight: 500; }
.diapo p { margin: .1rem 0 0; color: #ddd; font-size: .82rem; }
.diapo .voile { gap: .75rem; padding: 1rem; background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,0) 70%); }
.diapo .avatar { width: 44px; height: 44px; font-size: 1rem; border: 2px solid rgba(255,255,255,.85); }
@media (max-width: 900px) {
  .diapo { flex-basis: calc((100% - 1rem) / 2); }
}
@media (max-width: 560px) {
  .diapo { flex-basis: 85%; height: 170px; }
}


/* ---------- Filtres du portfolio ---------- */
.filtres {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.75rem;
  padding: .75rem;
}
.filtres select, .filtres input {
  padding: .55rem .75rem;
  font: inherit;
  font-size: .9rem;
  color: var(--texte);
  background: var(--fond);
  border: 1px solid var(--bordure);
  border-radius: 8px;
}
.filtres select:focus, .filtres input:focus { outline: 2px solid var(--lien); outline-offset: 1px; }
.filtre-recherche { flex: 1 1 220px; min-width: 0; }
.filtres-resume {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  margin: .75rem 0 1rem;
  color: var(--texte-3);
  font-size: .88rem;
}
.lien-bouton {
  padding: 0;
  border: 0;
  background: none;
  color: var(--lien);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}
.lien-bouton:hover { text-decoration: underline; }
.lien-bouton:focus-visible { outline: 2px solid var(--lien); outline-offset: 2px; }
.aucun-resultat { margin: 1rem 0; color: var(--texte-2); text-align: center; }
.diapo:focus-visible, .carte-chaine:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.points { display: flex; justify-content: center; gap: .4rem; margin-top: .75rem; }
.points button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--texte-3);
  opacity: .4;
  cursor: pointer;
  transition: width .25s, opacity .25s;
}
.points button[aria-current="true"] { width: 22px; opacity: 1; background: var(--texte); }

/* ---------- Cartes de chaînes ---------- */
.grille-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.carte-chaine {
  overflow: hidden;
  padding: 0;
  text-align: left;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.carte-chaine:hover { border-color: #555; }
.carte-chaine .banniere { height: 84px; }

/* Sélection de chaînes (bouton « + / ✓ » sur la bannière) */
.carte-enveloppe { position: relative; display: grid; }
.carte-enveloppe .carte-chaine { width: 100%; height: 100%; }
.carte-enveloppe.selectionnee .carte-chaine { border-color: var(--rouge); box-shadow: 0 0 0 1px var(--rouge); }
/* Case à cocher en haut à gauche de la bannière */
.case-selection {
  position: absolute;
  top: .6rem;
  left: .6rem;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(0, 0, 0, .55);
  cursor: pointer;
}
.case-selection input { width: 18px; height: 18px; margin: 0; accent-color: var(--rouge); cursor: pointer; }
.case-selection:has(input:focus-visible) { outline: 2px solid var(--lien); outline-offset: 2px; }

.resume-selection {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1rem;
  margin-top: 1.75rem;
  scroll-margin-top: 1rem;
  color: var(--texte-2);
  font-weight: 600;
}
.resume-selection:not([hidden]) + .tuiles-portfolio { margin-top: .75rem; }

#ecran-portfolio { padding-bottom: 6rem; }   /* la barre ne cache pas les dernières cartes */
.barre-selection {
  position: fixed;
  left: 50%;
  bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  display: flex;
  align-items: center;
  gap: .75rem;
  max-width: calc(100% - 2rem);
  padding: .5rem .5rem .5rem 1.1rem;
  transform: translateX(-50%);
  border: 1px solid var(--bordure);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--texte);
  font-weight: 500;
  white-space: nowrap;
  box-shadow: var(--ombre);
}
.barre-selection-bouton {
  padding: .6rem 1.1rem;
  border: 0;
  border-radius: 999px;
  background: var(--rouge);
  color: #fff;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}
.barre-selection-bouton:hover { background: var(--rouge-fonce); }
.barre-selection-fermer {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--texte);
  font: inherit;
  cursor: pointer;
}
.barre-selection-bouton:focus-visible, .barre-selection-fermer:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.carte-chaine .corps { padding: 0 1rem 1rem; }
.carte-chaine .avatar { margin-top: -26px; border: 3px solid var(--surface); }
.carte-chaine h3 { margin-top: .5rem; font-size: 1.05rem; }
.chiffres-carte {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .5rem;
  margin-top: .85rem;
  padding-top: .85rem;
  border-top: 1px solid var(--bordure);
}
.chiffres-carte b { display: block; color: var(--texte); font-size: 1rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.chiffres-carte small { color: var(--texte-3); font-size: .75rem; }
.pied-carte { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: .7rem; color: var(--texte-2); font-size: .8rem; }
.places-ouvertes { color: var(--vert); font-weight: 500; }
.texte-pale { color: var(--texte-3); }

/* ---------- Portfolio : période, chiffres, graphiques en cercle ---------- */
.ligne-periode { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; margin: 1.75rem 0 .75rem; }
.portee { margin: 0; font-weight: 500; }
.choix-periode { display: flex; gap: .4rem; }
.choix-periode button { height: 32px; padding: 0 .8rem; border: 0; border-radius: 8px; background: var(--surface-2); color: var(--texte); font: inherit; font-size: .85rem; cursor: pointer; }
.choix-periode button:hover { background: var(--survol); }
.choix-periode button[aria-pressed="true"] { background: var(--texte); color: var(--fond); font-weight: 500; }
.choix-periode button:focus-visible { outline: 2px solid var(--lien); outline-offset: 2px; }
.resume-selection + .kpis, .ligne-periode + .resume-selection { margin-top: 0; }
.resume-selection { margin: 0 0 .75rem; padding: .6rem .9rem; border-radius: 10px; background: var(--rouge-doux); }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); border: 1px solid var(--bordure); border-radius: var(--rayon); background: var(--surface); overflow: hidden; }
.kpi { padding: 1rem 1.15rem; border-right: 1px solid var(--bordure); }
.kpi:last-child { border-right: 0; }
.kpi .libelle { display: flex; align-items: center; gap: .6rem; color: var(--texte); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.pastille-icone { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 9px; background: var(--rouge-doux); color: var(--rouge); }
.pastille-icone svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.kpi .valeur { margin-top: .6rem; font-size: 1.75rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.kpi .note { margin-top: .1rem; color: var(--texte-3); font-size: .78rem; }

/* Courbe d'évolution (assets/courbe.js) */
.bloc-courbe { margin-top: 1rem; }
.tete-courbe { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: .75rem; }
.reglages-courbe { display: flex; flex-wrap: wrap; gap: .5rem; }
.courbe { position: relative; margin-top: .5rem; }
.courbe-svg { display: block; width: 100%; height: auto; }
.courbe-texte { fill: #8a8a8a; font-size: 11px; font-family: var(--titres); }
.courbe-vide { margin: 0; padding: 2.5rem 1rem; color: var(--texte-3); text-align: center; font-size: .9rem; }
/* Bulle au survol : date + total, puis les chaînes qui ont fait ce chiffre */
.courbe-bulle { position: absolute; z-index: 2; display: grid; gap: .2rem; min-width: 190px; padding: .5rem .7rem; border-radius: 8px; background: var(--texte); color: var(--fond); font-size: .8rem; pointer-events: none; box-shadow: 0 8px 24px rgba(0, 0, 0, .45); }
.courbe-bulle-tete { font-weight: 700; white-space: nowrap; }
.courbe-bulle-ligne { display: flex; justify-content: space-between; gap: 1rem; white-space: nowrap; }
.courbe-bulle-ligne b { font-weight: 500; font-variant-numeric: tabular-nums; }
.courbe-bulle-autres { color: #555; font-size: .75rem; }

.deux-graphes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; margin-top: 1rem; }
.bloc-graphe { padding: 1rem 1.15rem 1.25rem; }
.bloc-graphe h2 { font-size: 1rem; }
.sous-titre-graphe { margin: .15rem 0 .5rem; color: var(--texte-3); font-size: .8rem; }
.anneau { display: block; width: 210px; height: 210px; max-width: 100%; margin: 0 auto; overflow: visible; }
.anneau circle { cursor: pointer; outline: none; transition: stroke-width .15s; }
.anneau .centre-1 { fill: var(--texte); font-size: 22px; font-weight: 500; font-family: var(--titres); }
.anneau .centre-2 { fill: var(--texte-3); font-size: 11px; font-family: var(--titres); }
@media (max-width: 560px) {
  .kpi { border-right: 0; border-bottom: 1px solid var(--bordure); }
  .kpi:last-child { border-bottom: 0; }
}

/* ---------- Fiche chaîne ---------- */
.retour {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin: .5rem 0 1rem;
  padding: .4rem .2rem;
  border: 0;
  background: none;
  color: var(--texte-2);
  font-weight: 600;
  cursor: pointer;
}
.retour:hover { color: var(--texte); }
.fiche-banniere { height: clamp(110px, 17vw, 190px); border-radius: var(--rayon); }
.fiche-identite { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem 1.25rem; padding: 0 1rem; }
.fiche-identite .avatar { margin-top: -48px; }
.fiche-identite .textes { flex: 1 1 260px; padding-top: .75rem; min-width: 0; }
.fiche-identite h1 { font-size: clamp(1.5rem, 4vw, 2rem); }
.fiche-actions { display: flex; flex-wrap: wrap; gap: .5rem; }

/* Boutons de l'en-tête de la fiche */
.bouton-contour, .bouton-rouge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 1.1rem;
  border-radius: 999px;
  font: inherit;
  font-size: .9rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.bouton-contour { border: 1px solid var(--bordure); background: transparent; color: var(--texte); }
.bouton-contour:hover { background: var(--surface-2); }
.bouton-rouge { border: 0; background: var(--rouge); color: #fff; }
.bouton-rouge:hover { background: var(--rouge-fonce); }
.bouton-contour:focus-visible, .bouton-rouge:focus-visible { outline: 2px solid var(--lien); outline-offset: 2px; }

/* Onglets de la fiche : Overview / Content / Audience / Rates & slots */
.onglets { display: flex; gap: .25rem; margin-top: 1.5rem; border-bottom: 1px solid var(--bordure); overflow-x: auto; scrollbar-width: none; scroll-margin-top: 1rem; }
.onglets::-webkit-scrollbar { display: none; }
.onglets button { height: 48px; padding: 0 1rem; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--texte-2); font: inherit; font-weight: 500; white-space: nowrap; cursor: pointer; }
.onglets button:hover { color: var(--texte); }
.onglets button[aria-selected="true"] { color: var(--texte); border-bottom-color: var(--texte); }
.onglets button:focus-visible { outline: 2px solid var(--lien); outline-offset: -2px; }
.panneau-onglet { padding-top: 1.25rem; }
.sous-titre-onglet { margin: 0 0 .9rem; color: var(--texte-3); font-size: .85rem; }
.fiche-colonnes { margin-top: 1rem; }
.tableau-fiche { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tableau-fiche td { padding: .6rem 0; border-top: 1px solid var(--bordure); }
.tableau-fiche tr:first-child td { border-top: 0; }
.tableau-fiche td:first-child { color: var(--texte-2); padding-right: 1rem; }
.tableau-fiche td:last-child { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
.meta { color: var(--texte-2); }
.fiche-description { max-width: 70ch; margin: 0; color: var(--texte-2); white-space: pre-line; font-size: .9rem; }
.lien-youtube { display: inline-block; margin-top: .4rem; color: var(--lien); font-weight: 500; font-size: .9rem; text-decoration: none; }
.lien-youtube:hover { text-decoration: underline; }

/* Étiquette « Finance · Retirement planning » */
.etiquette-niche {
  display: inline-block;
  margin: .3rem 0 .15rem;
  padding: .1rem .6rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--texte-2);
  font-size: .78rem;
  font-weight: 500;
}

/* Vidéos */
.grille-videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.video { text-decoration: none; }
.video .miniature { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 14px; }
.video .miniature img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.video:hover .miniature img { transform: scale(1.03); }
.video .duree {
  position: absolute;
  right: .4rem;
  bottom: .4rem;
  padding: .05rem .35rem;
  border-radius: 4px;
  background: rgba(0,0,0,.78);
  color: #fff;
  font-size: .75rem;
  font-weight: 600;
}
.video h3 {
  display: -webkit-box;
  margin-top: .55rem;
  overflow: hidden;
  font-size: .95rem;
  font-weight: 600;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.video .meta { margin-top: .15rem; color: var(--texte-3); font-size: .82rem; }

/* Tarifs et créneaux (texte libre saisi par l'agence) */
.grille-offre { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.bloc { padding: 1.2rem; }
.bloc h3 { margin-bottom: .75rem; font-size: 1rem; }
.texte-libre { margin: 0; color: var(--texte-2); white-space: pre-line; }

/* Bouton flottant « Rates & open slots » (fiche chaîne) */
#ecran-fiche { padding-bottom: 6rem; }   /* le bouton ne cache pas la fin de la page */
.bouton-flottant {
  position: fixed;
  right: calc(1.25rem + env(safe-area-inset-right, 0px));
  bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  padding: .85rem 1.3rem;
  border: 0;
  border-radius: 999px;
  background: var(--rouge);
  color: #fff;
  font-family: var(--titres);
  font-weight: 500;
  cursor: pointer;
  box-shadow: var(--ombre);
}
.bouton-flottant:hover { background: var(--rouge-fonce); }
.bouton-flottant:focus-visible { outline: 2px solid var(--lien); outline-offset: 3px; }

.fond-panneau { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .6); }
.panneau-offre {
  position: fixed;
  right: calc(1.25rem + env(safe-area-inset-right, 0px));
  bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  width: min(420px, calc(100% - 2.5rem));
  max-height: min(70vh, 560px);
  overflow-y: auto;
  padding: 1.25rem 1.4rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
}
.panneau-tete { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: .5rem; }
.panneau-tete h2 { font-size: 1.2rem; }
.panneau-offre h3 { margin: 1rem 0 .35rem; font-size: .95rem; }
.panneau-fermer {
  flex: none;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--texte);
  cursor: pointer;
}
.panneau-fermer:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Tarifs et créneaux */
.liste-tarifs { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.liste-tarifs li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: .6rem 0;
  border-top: 1px solid var(--bordure);
}
.liste-tarifs li:first-child { border-top: 0; padding-top: 0; }
.tarif-nom { display: grid; font-weight: 600; }
.tarif-nom small { color: var(--texte-3); font-size: .8rem; font-weight: 400; }
.tarif-prix { font-family: var(--titres); font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tarif-note { margin: .5rem 0 0; color: var(--texte-3); font-size: .78rem; }
.liste-creneaux { display: flex; flex-wrap: wrap; gap: .45rem; }
.creneau {
  padding: .4rem .75rem;
  border: 1px solid var(--bordure);
  border-radius: 8px;
  color: var(--texte);
  font-size: .88rem;
}
.creneau b { color: var(--vert); font-weight: 500; }
.texte-vide { margin: 0; color: var(--texte-3); font-style: italic; }

/* Audience (YouTube Analytics) */
.grille-audience { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.barres { display: grid; gap: .6rem; }
.barre-ligne {
  display: grid;
  grid-template-columns: 6.5rem 1fr 3.2rem;
  align-items: center;
  gap: .6rem;
  font-size: .88rem;
}
.barre-ligne .nom { overflow: hidden; color: var(--texte-2); white-space: nowrap; text-overflow: ellipsis; }
.barre-ligne .valeur { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.barre-piste { position: relative; height: 10px; }
.barre-remplie {
  position: absolute;
  inset: 0 auto 0 0;
  min-width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--serie-1);
}
.barre-ligne:hover .barre-remplie { filter: brightness(1.12); }
.partage { display: flex; gap: 2px; height: 14px; margin-bottom: .9rem; }
.partage span:first-child { background: var(--serie-1); border-radius: 4px 0 0 4px; }
.partage span:last-child { background: var(--serie-2); border-radius: 0 4px 4px 0; }
.partage span:hover { filter: brightness(1.12); }
.legende { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; font-size: .88rem; }
.legende-item { display: flex; align-items: center; gap: .45rem; color: var(--texte-2); }
.legende-item b { color: var(--texte); font-variant-numeric: tabular-nums; }
.pastille { flex: none; width: 10px; height: 10px; border-radius: 3px; }
.infobulle {
  position: fixed;
  z-index: 100;
  padding: .45rem .65rem;
  border-radius: 8px;
  background: var(--texte);
  color: var(--fond);
  font-size: .82rem;
  white-space: nowrap;
  pointer-events: none;
}

/* Bandeau de l'aperçu (admin) */
.bandeau-apercu {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: .45rem 1rem;
  background: var(--rouge);
  color: #fff;
  font-family: var(--titres);
  font-weight: 500;
  text-align: center;
  letter-spacing: .04em;
}

/* Page d'autorisation (connect.html) : logo de la chaîne ⟷ logo de l'agence */
.carte-connect h1, .carte-connect .sous-titre { text-align: center; }
.connect-tete { display: flex; align-items: center; justify-content: center; gap: .9rem; margin-bottom: 1.25rem; }
.connect-logo { width: 56px; height: 56px; margin: 0; border: 0; font-size: 1.3rem; }
.connect-agence { width: 56px; height: 56px; border-radius: 50%; font-size: .95rem; }
.connect-fleche { color: var(--texte-3); font-size: 1.25rem; }
.bouton-google { display: flex; align-items: center; justify-content: center; gap: .6rem; background: #fff; color: #1f1f1f; }
.bouton-google:hover { background: #e8e8e8; }
.note-connect { margin: .85rem 0 0; color: var(--texte-3); font-size: .8rem; text-align: center; }
.icone-ok { background: rgba(43, 166, 64, .15); color: var(--vert); }
.icone-attention { background: rgba(242, 163, 58, .15); color: var(--orange); }

@media (max-width: 560px) {
  .badge .long { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .piste-carrousel { scroll-behavior: auto; }
  .carte-chaine, .video .miniature img { transition: none; }
  .chargement { animation-duration: 2s; }
}
