/* Le site d'Apptrack : les jetons de theme.css et les composants partagés (verre, bloc, pastille, champ,
   bouton-reglage), rien en dur ici. */

:root {
  --t-site: 1120px;
  --z-voile: 40;
  --z-barre: 30;
  --z-alerte: 50;

  /* barre du haut */
  --t-barre: 56px;
  --t-onglet: 40px;
  /* la marge intérieure de la barre : les onglets et le bouton de droite y sont concentriques */
  --e-barre: calc((var(--t-barre) - var(--t-onglet)) / 2);
  --t-numero: 34px;
  --t-logo-ia: 32px;
  --t-image-logo-ia: 17px;
  --recouvre-logo: -9px;
  --t-texte-centre: 560px;
  --t-copier: 84px;
  --f-code: 500 12.5px/1.5 var(--police-mono);
  --t-colonne: 280px;
  --t-case-etroite: 140px;
  --t-lecteur: 340px;
  --t-mesure: 112px;
  /* l'en-tête d'une section : sa tuile, la largeur et le corps de la phrase qui dit ce qu'elle apporte */
  --t-tuile-section: 60px;
  --t-but-section: 680px;
  /* la tuile d'icône d'une carte (un lanceur, une partie de rapport) */
  --t-tuile-carte: 44px;
  /* la synthèse d'un rapport, en tête du document */
  --f-synthese: 500 19px/1.45 var(--police);
  --f-but-section: 400 15px/1.45 var(--police);
  /* le tableau de bord du groupe : le compte, cinq chiffres, trois coûts (treg, IA, total), l'activité, le bouton */
  --colonnes-groupe: minmax(var(--t-case-etroite), 1fr) repeat(5, var(--t-chiffre-groupe)) repeat(3, var(--t-dollars-groupe)) var(--t-activite-groupe) var(--t-action-groupe);
  /* les dépenses : la période, demandes et analysées, puis requêtes et coût treg, appels et coût IA, le total */
  --colonnes-depenses: minmax(var(--t-case-etroite), 1fr) repeat(3, var(--t-chiffre-groupe)) var(--t-dollars-groupe) var(--t-chiffre-groupe) repeat(2, var(--t-dollars-groupe));
  --t-chiffre-groupe: 64px;
  --t-dollars-groupe: 70px;
  --t-activite-groupe: 104px;
  --t-action-groupe: 64px;

  /* haut de la recherche : le mur de vignettes, le titre, la boîte */
  --t-mur: 680px;
  --h-mur: 470px;
  --duree-fouille: 1.8s;
  --opacite-fouille: 0.45;
  --t-point-fouille: 8px;
  --t-pas-fouille: 22px;
  --filet-epais: 2px;
  --colonnes-mosaique: 16;
  --lignes-mosaique: 18;
  --chevauchement: 170px;
  --t-boite: 820px;
  --t-boite-code: 560px;
  --t-sous-heros: 600px;
  --t-ligne-boite: 38px;
  --t-nombre-filtres: 18px;
  --f-heros-etroit: 700 42px/1.05 var(--police);
  --f-champ-heros: 400 17px/1.45 var(--police);
  /* le vert de l'accent (da.css), en fond doux, en filet, en texte sur fond sombre, en lueur sur le mur */
  --accent-doux: color-mix(in srgb, var(--accent) 16%, transparent);
  --accent-bord: color-mix(in srgb, var(--accent) 50%, transparent);
  --accent-clair: color-mix(in srgb, var(--accent) 60%, var(--texte));
  --t-bouton-chercher: 48px;
  --t-icone-chercher: 18px;
  --t-touche: 26px;
  --f-bouton-chercher: 600 15.5px/1 var(--police);
  --leve: -2px;
  --lueur-accent: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 20%, transparent), transparent);
  --voile-titre: radial-gradient(closest-side, var(--fond), transparent);
}

/* le clip de la racine garde celui du body pour lui : sans lui, un décor qui déborde élargirait la page sur mobile */
html { background: var(--fond); overflow-x: clip; }
/* un fond plat, comme Cash App OS : ni trame ni lueur */
body {
  margin: 0;
  min-height: 100vh;
  background: var(--fond);
  color: var(--texte);
  font: var(--f-corps);
  isolation: isolate;
  position: relative;
  overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.site { width: min(100% - 2 * var(--e-xxl), var(--t-site)); margin: 0 auto; padding-bottom: var(--e-page); }

/* barre du haut des pages ouvertes sans session (la landing a la sienne, accueil.js) : collée en haut de page, une
   capsule grise unie bordée d'un filet ; la marque à gauche, « Dashboard » ou « Se connecter » à droite */
.haut { position: sticky; top: 0; z-index: var(--z-barre); padding-top: var(--e-xl); }
.barre {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--e-xxl);
  height: var(--t-barre);
  padding: 0 var(--e-barre);
  background: var(--carte);
  box-shadow: inset 0 0 0 var(--filet) var(--blanc-bord);
}
.marque { display: inline-flex; white-space: nowrap; align-items: center; gap: var(--e-l); justify-self: start; padding: 0 var(--e-m) 0 var(--e-xxl); font: var(--f-marque); letter-spacing: var(--i-marque); }
/* les logos des IA qu'on peut brancher, en ronds qui se chevauchent */
.logos-ia { display: flex; }
.logo-ia { display: grid; place-items: center; width: var(--t-logo-ia); height: var(--t-logo-ia); border: var(--filet) solid var(--blanc-bord); border-radius: var(--r-capsule); background: var(--carte); }
.logo-ia + .logo-ia { margin-left: var(--recouvre-logo); }
.logo-ia img { width: var(--t-image-logo-ia); height: var(--t-image-logo-ia); }
.haut .droite { display: flex; align-items: center; justify-content: flex-end; gap: var(--e-m); }
.haut .bouton-reglage { height: var(--t-onglet); padding: 0 var(--e-xxl); border-radius: var(--r-capsule); }

/* ouverture d'une page */
.ouverture { display: flex; flex-direction: column; gap: var(--e-xl); padding: var(--e-page) 0 var(--e-xxl); }
.titre {
  margin: 0;
  font: var(--f-titre);
  letter-spacing: var(--i-titre);
}
.ouverture.serree { padding: 0; }
.sous-titre { margin: 0; color: var(--secondaire); overflow-wrap: anywhere; }
.surtitre { margin: 0; }

/* haut de la recherche : le mur de vignettes, le titre qui le chevauche, la boîte */
.heros-recherche { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
/* le mur de vignettes (mur.js) : une colonne par élément, une sur deux remontée d'une demi-tuile (un pourcentage de marge
   se lit sur la largeur de la colonne), qui s'efface vers le bas sous le titre. Immobile : rien à recomposer */
.mur {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: var(--e-s);
  width: min(100%, var(--t-mur));
  height: var(--h-mur);
  overflow: hidden;
  mask: linear-gradient(to bottom, var(--noir) 45%, transparent 97%);
  user-select: none;
}
.mur-colonne { display: flex; flex-direction: column; gap: var(--e-s); transition: opacity var(--duree-entree) var(--ressort-entree); }
.mur-colonne:nth-child(even) { margin-top: calc(-100% * 8 / 9); }
/* une case de la mosaïque (mur.js caseMosaique) : la tuile du mur */
.mur .tuile {
  background: url(/v1/mosaic) no-repeat, var(--blanc-bloc);
  background-position: calc(var(--col) * 100% / (var(--colonnes-mosaique) - 1)) calc(var(--rang) * 100% / (var(--lignes-mosaique) - 1)), 0 0;
  background-size: calc(var(--colonnes-mosaique) * 100%) calc(var(--lignes-mosaique) * 100%), auto;
  flex: none;
  aspect-ratio: 9 / 16;
  border-radius: var(--r-avatar);
  box-shadow: inset 0 0 0 var(--filet) var(--blanc-bord);
  -webkit-user-drag: none;
  transition: transform var(--duree-survol) var(--ressort-survol), box-shadow var(--duree-survol) var(--ressort-survol);
}
.mur .tuile[href]:hover { transform: translateY(var(--leve)); box-shadow: inset 0 0 0 var(--filet-epais) var(--accent-clair) }
/* pendant une recherche ou une demande (`fouille`) : les tuiles pâlissent et une lueur verte respire dessus, un seul calque
   dont seule l'opacité bouge */
.mur::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--lueur-accent);
  opacity: 0;
  transition: opacity var(--duree-entree) var(--ressort-entree);
  pointer-events: none;
}
.mur.fouille::before { opacity: 1; animation: souffle var(--duree-fouille) ease-in-out infinite alternate; }
.mur.fouille .mur-colonne { opacity: var(--opacite-fouille); }
@keyframes souffle { from { opacity: var(--opacite-fouille); } }
.statut-fouille { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--e-m); margin: var(--e-xl) 0 0; color: var(--texte); font: var(--f-petit); }
.statut-fouille.erreur { color: var(--danger); }
.statut-fouille a { color: var(--accent-clair); }
.point-fouille { width: var(--t-point-fouille); aspect-ratio: 1; border-radius: var(--r-capsule); background: var(--accent); animation: pulsation var(--duree-fouille) ease-in-out infinite alternate; }
/* pendant une recherche ou une demande, l'explication prend toute la largeur : un titre, une phrase, les étapes */
.titre-fouille { display: flex; flex-basis: 100%; align-items: center; justify-content: center; gap: var(--e-m); margin: 0; font: var(--f-corps-gras); }
.statut-fouille > .note { flex-basis: 100%; text-align: center; }
.etapes-fouille { display: grid; flex-basis: 100%; justify-content: center; gap: var(--e-m); margin: var(--e-s) 0 0; padding: 0; list-style: none; counter-reset: etape; text-align: left; }
.etapes-fouille li { display: grid; grid-template-columns: var(--t-pas-fouille) auto; align-items: center; column-gap: var(--e-m); color: var(--tertiaire); counter-increment: etape; }
.etapes-fouille li::before {
  content: counter(etape);
  display: grid;
  place-items: center;
  width: var(--t-pas-fouille);
  aspect-ratio: 1;
  border-radius: var(--r-capsule);
  box-shadow: inset 0 0 0 var(--filet) var(--blanc-bord);
  font: var(--f-mini-gras);
}
.etapes-fouille li.faite { color: var(--secondaire); }
.etapes-fouille li.faite::before { content: "✓"; }
.etapes-fouille li.en-cours { color: var(--texte); }
.etapes-fouille li.en-cours::before { background: var(--accent-doux); box-shadow: inset 0 0 0 var(--filet) var(--accent-bord); color: var(--accent-clair); }
.etapes-fouille .detail { grid-column: 2; color: var(--tertiaire); font: var(--f-mini); overflow-wrap: anywhere; }
.etapes-fouille .en-cours .detail { color: var(--accent-clair); }
/* la boîte et ce qui lance une recherche restent figés tant que ça cherche */
.boite.occupee { opacity: var(--en-pause); }
[data-lance]:disabled { opacity: var(--inactif); cursor: default; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .mur.fouille::before, .point-fouille { animation: none; }
}

.heros-texte { position: relative; display: flex; flex-direction: column; align-items: center; gap: var(--e-xxl); margin-top: calc(-1 * var(--chevauchement)); }
.heros-texte::before { content: ""; position: absolute; inset: calc(-1 * var(--e-page)) calc(-2 * var(--e-page)); z-index: -1; background: var(--voile-titre); }
.titre-heros { display: flex; flex-direction: column; margin: 0; font: var(--f-heros); letter-spacing: var(--i-heros); }
.titre-heros span:first-child { color: var(--texte); }
.titre-heros .pale { color: var(--tertiaire); }

.boite { --rayon: var(--r-panneau); display: flex; flex-direction: column; gap: var(--e-xl); width: min(100%, var(--t-boite)); margin-top: var(--e-page); padding: var(--e-xxl); text-align: left; }
.boite textarea {
  min-height: calc(2lh + 2 * var(--e-s));
  padding: var(--e-s);
  resize: none;
  background: none;
  border: 0;
  outline: none;
  color: var(--texte);
  font: var(--f-champ-heros);
}
.boite textarea::placeholder { color: var(--tertiaire); }
/* une seule rangée : les capsules à gauche, le bouton à droite, tout à la même hauteur */
.boite-bas { display: flex; align-items: center; justify-content: space-between; gap: var(--e-xl); padding-top: var(--e-xl); border-top: var(--filet) solid var(--blanc-bord); }
.puces-filtres { display: flex; flex-wrap: wrap; align-items: center; gap: var(--e-m); }
.filtres-plus { padding-top: var(--e-xl); border-top: var(--filet) solid var(--blanc-bord); }
.contenu-boite { display: flex; flex-direction: column; gap: var(--e-xl); }
.boite .contenu-boite > .erreur { margin: 0; }
.boite .nom-business { padding: var(--e-s); background: none; border: 0; outline: none; color: var(--texte); font: var(--f-titre); letter-spacing: var(--i-titre); }
.boite .nom-business::placeholder { color: var(--tertiaire); }
/* la boîte d'un business, à la place de la phrase de Chercher : « Trouve [20] vidéos virales de plus pour Roleo » */
.phrase-business { margin: 0; padding: var(--e-s); color: var(--secondaire); font: var(--f-champ-heros); }
.phrase-business strong { color: var(--texte); font-weight: inherit; }
.phrase-business .puce-filtre { margin: 0 var(--e-xs); vertical-align: middle; color: var(--texte); }
/* l'analyse : la phrase et le bouton sur une ligne, ses filtres dessous, sur toute la largeur */
.ligne-analyse { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--e-m) var(--e-xl); }
.ligne-analyse .puces-filtres { grid-column: 1 / -1; grid-row: 2; padding: 0 var(--e-s); }
.ligne-analyse .bouton-chercher { grid-column: 2; grid-row: 1; }
/* le haut des vidéos d'un business : le compteur et sa note à gauche, les filtres de la banque à droite */
.entete-business { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--e-xl); }
.entete-business > div:first-child { display: flex; flex-direction: column; gap: var(--e-s); min-width: 0; }
.entete-business .note { margin: 0; }
.tete-business { display: flex; flex-direction: column; gap: var(--e-m); }
.tete-business .filtres-plus { justify-content: flex-end; padding-top: 0; border-top: 0; }
.corps-section { display: contents; }
.plus-videos { display: flex; justify-content: center; }
.filtres-plus[hidden] { display: none; }
.puce-filtre {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--e-m);
  height: var(--t-ligne-boite);
  border-radius: var(--r-capsule);
  background: var(--releve);
  box-shadow: inset 0 0 0 var(--filet) var(--blanc-bord);
  color: var(--secondaire);
  font: var(--f-ligne);
  white-space: nowrap;
}
.puce-filtre:hover { background: var(--gris-actif); color: var(--texte); }
.puce-filtre select {
  max-width: 100%;
  field-sizing: content;
  height: 100%;
  padding: 0 calc(var(--e-l) + var(--e-xl) + var(--e-s)) 0 var(--e-xl);
  appearance: none;
  background: none;
  border: 0;
  outline: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.puce-filtre select option { background: var(--carte); color: var(--texte); }
.puce-filtre .icone { position: absolute; right: var(--e-l); width: var(--e-xl); height: var(--e-xl); transform: rotate(90deg); pointer-events: none; }
.puce-filtre.choix, .bouton-filtres { padding: 0 var(--e-xl); }
.bouton-filtres .icone, .puce-filtre.choix .icone { position: static; width: var(--t-icone); height: var(--t-icone); transform: none; }
.bouton-filtres .nombre { display: grid; place-items: center; min-width: var(--t-nombre-filtres); height: var(--t-nombre-filtres); padding: 0 var(--e-s); border-radius: var(--r-capsule); background: var(--accent); color: var(--vert-pale); font: var(--f-mini); }
.bouton-filtres .nombre:empty { display: none; }
.puce-filtre.actif, .puce-filtre[aria-pressed="true"], .puce-filtre[aria-selected="true"], .bouton-filtres[aria-expanded="true"] { background: var(--accent-doux); box-shadow: inset 0 0 0 var(--filet) var(--accent-bord); color: var(--texte); }
.puce-filtre:focus-within, .puce-filtre:focus-visible { box-shadow: inset 0 0 0 var(--filet) var(--accent-bord); outline: none; }

/* LE bouton de la page : une pilule verte pleine, plus haute que les capsules, Entrée rappelée à droite */
.bouton-chercher {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: var(--e-l);
  height: var(--t-bouton-chercher);
  padding: 0 var(--e-xl) 0 var(--e-page);
  border-radius: var(--r-capsule);
  background: var(--accent);
  color: var(--vert-pale);
  font: var(--f-bouton-chercher);
  cursor: pointer;
  transition: transform var(--duree-survol) var(--ressort-survol), filter var(--duree-survol) var(--ressort-survol);
}
.bouton-chercher .icone { width: var(--t-icone-chercher); height: var(--t-icone-chercher); }
.bouton-chercher kbd { display: grid; place-items: center; min-width: var(--t-touche); height: var(--t-touche); margin-left: var(--e-s); border-radius: var(--r-capsule); background: var(--blanc-actif); font: var(--f-ligne); }
.bouton-chercher:hover { filter: var(--eclat-survol); }
.bouton-chercher:active { transform: scale(var(--appui)); }
.bouton-chercher:disabled { opacity: .4; pointer-events: none; }
.aide { max-width: var(--t-boite); margin: var(--e-xl) 0 0; color: var(--tertiaire); font: var(--f-petit); }

.titre-section { margin: 0; color: var(--texte); font: var(--f-titre); letter-spacing: var(--i-titre); }
.entete-resultats { display: flex; align-items: baseline; gap: var(--e-xl); }
.entete-resultats .note { flex: 1; }
/* chercher sur internet sous une recherche dans la banque : au haut des résultats si des mots y manquent, sinon à leur pied */
.internet { display: flex; flex-direction: column; gap: var(--e-m); }
.internet.pied { padding-top: var(--e-xl); border-top: var(--filet) solid var(--blanc-bord); }
.internet a { color: var(--accent-clair); }
.heros-recherche .boite { scroll-margin-top: calc(var(--t-barre) + var(--e-xl) * 2); }

/* grilles : les blocs, et les vidéos en cases de la Veille (composants.css .case-video) */
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--t-colonne)), 1fr)); gap: var(--e-xl); }
.grille-videos { padding: 0; }
.grille .large { grid-column: 1 / -1; }
.ligne-saisie { display: flex; flex-wrap: wrap; align-items: center; gap: var(--e-m); }
.ligne-saisie .champ { flex: 1; min-width: min(100%, var(--t-champ-reglage)); }
.ligne-saisie .hook { flex: 1; }
.champ-prompt { height: auto; padding: var(--e-m) var(--e-xl); resize: vertical; color: var(--texte); }
.remplissage, .etape-cle { display: flex; flex-direction: column; gap: var(--e-s); padding-top: var(--e-xl); border-top: var(--filet) solid var(--blanc-bord); }
.titre-etape { margin: 0; color: var(--texte); font: var(--f-h2); }
.etape-cle .ligne-saisie { margin-top: var(--e-s); }
.tete-cle { display: flex; align-items: center; justify-content: space-between; gap: var(--e-m); }
.liens-cle { display: flex; flex-wrap: wrap; gap: var(--e-xl); }
.lien-cle { color: var(--accent-clair); font: var(--f-mini-gras); }
.lien-cle:hover { text-decoration: underline; }
.cle-branchee { flex: 1; margin: 0; color: var(--succes); font: var(--f-corps-gras); }
.titre-demandes { padding-top: var(--e-xl); border-top: var(--filet) solid var(--blanc-bord); }
/* les blocs des pages hors de /app (Compte, Claude, vidéo) : des cartes de module */
.grille > .bloc, .page-video .bloc { --rayon: var(--r-carte); }
/* le groupe : le code en grand, à copier, puis les membres, un par ligne */
.code-groupe { flex: 1; margin: 0; font: var(--f-grand); font-family: var(--police-mono); user-select: all; }
.membre { display: flex; align-items: center; justify-content: space-between; gap: var(--e-m); padding-top: var(--e-m); border-top: var(--filet) solid var(--blanc-bord); }
.membre .note { flex: 1; }
/* le groupe et les dépenses : des en-têtes gris, des lignes séparées d'un filet, des chiffres blancs */
.table-groupe .rang { grid-template-columns: var(--colonnes-groupe); min-height: var(--t-ligne-video); padding-block: var(--e-m); }
.table-depenses .rang { grid-template-columns: var(--colonnes-depenses); min-height: var(--t-ligne-video); padding-block: var(--e-m); }
.table-groupe .rang, .table-depenses .rang { border-radius: 0; color: var(--texte); }
.table-groupe .rang.tete, .table-depenses .rang.tete { color: var(--tertiaire); font: var(--f-surtitre); }
.tableau.table-groupe .rang:not(.tete), .tableau.table-depenses .rang:not(.tete) { background: none; border-top: var(--filet) solid var(--blanc-bord); }
.tableau.table-groupe .rang.a-virer { background: var(--blanc-actif); }
.table-groupe .cellule.fort, .table-depenses .cellule.fort { font: var(--f-corps-gras); }
.compte-groupe { display: flex; flex-direction: column; gap: var(--e-xs); }
.compte-groupe .nom { display: inline-flex; align-items: center; gap: var(--e-m); }
.table-groupe .cellule.action { overflow: visible; }
.confirmer { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: var(--e-m); padding-top: var(--e-m); }
.confirmer .note { flex: 1; min-width: min(100%, var(--t-colonne)); color: var(--secondaire); white-space: normal; }
.titre-demandes + .remplissage { padding-top: 0; border-top: 0; }
.case-video .legende { overflow-wrap: anywhere; }
/* la vignette d'une vidéo (banque.js vignette), sur fond noir */
.miniature { background: var(--noir); }
/* l'étoile d'une case, en haut à droite de sa vignette : au survol, ou toujours si elle est posée ou sur écran tactile */
.case-favori { position: relative; min-width: 0; }
.etoile-carte {
  position: absolute;
  top: var(--e-s);
  right: var(--e-s);
  display: grid;
  place-items: center;
  width: var(--t-bouton-reglage);
  height: var(--t-bouton-reglage);
  border-radius: var(--r-capsule);
  background: var(--voile);
  color: var(--texte);
  opacity: 0;
  transition: opacity var(--duree-survol) var(--ressort-survol), transform var(--duree-survol) var(--ressort-survol);
}
.case-favori:hover .etoile-carte, .etoile-carte:focus-visible, .etoile-carte[aria-pressed="true"] { opacity: 1; }
.etoile-carte:active { transform: scale(var(--appui)); }
@media (hover: none) { .etoile-carte { opacity: 1; } }
.bouton-reglage.favori, .bouton-reglage.avec-icone { display: inline-flex; align-items: center; gap: var(--e-s); }
/* un lien en bouton (Dashboard, Ouvrir le dashboard) : son texte centré comme celui d'un bouton */
a.bouton-reglage { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.etoile-carte[aria-pressed="true"] .icone, .favori[aria-pressed="true"] .icone, .puce-filtre[data-nom="saved_only"][aria-pressed="true"] .icone { fill: currentColor; }
/* une action qui a échoué loin de tout champ (banque.js signaler) */
.alerte-bas {
  position: fixed;
  left: 50%;
  bottom: var(--e-xxl);
  z-index: var(--z-alerte);
  max-width: calc(100% - var(--e-xxl) * 2);
  margin: 0;
  padding: var(--e-m) var(--e-xl);
  border: var(--filet) solid var(--blanc-bord);
  border-radius: var(--r-capsule);
  background: var(--releve);
  color: var(--danger);
  font: var(--f-petit);
  transform: translateX(-50%);
}
.compte-case { overflow: hidden; color: var(--tertiaire); font: var(--f-mini); text-overflow: ellipsis; white-space: nowrap; }
.hook { margin: 0; font: var(--f-corps-gras); overflow-wrap: anywhere; }

/* accueil : niches et hooks */
.section { display: flex; flex-direction: column; gap: var(--e-xl); padding-top: var(--e-page); }
.section .titre-section { padding-top: var(--e-xxl); }
.puces { display: flex; flex-wrap: wrap; gap: var(--e-m); }
.puce { display: inline-flex; align-items: center; height: var(--t-bouton-reglage); padding: 0 var(--e-xl); border-radius: var(--r-capsule); background: var(--releve); box-shadow: inset 0 0 0 var(--filet) var(--blanc-bord); color: var(--secondaire); font: var(--f-ligne); }
.puce .n { margin-left: var(--e-s); color: var(--tertiaire); }

/* page d'une vidéo, sur écran étroit ou ouverte dans un nouvel onglet */
.page-video { display: grid; grid-template-columns: var(--t-lecteur) minmax(0, 1fr); gap: var(--e-page); padding-top: var(--e-xxl); align-items: start; }
.lecteur { width: 100%; aspect-ratio: 9 / 16; border: 0; border-radius: var(--r-carte); background: var(--carte); }
.sans-lecteur { --rayon: var(--r-carte); display: grid; place-items: center; aspect-ratio: 9 / 16; color: var(--secondaire); }
.colonne { display: flex; flex-direction: column; gap: var(--e-xxl); min-width: 0; }
.mesures { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--t-mesure), 1fr)); gap: var(--e-m); }
/* un chiffre sous son libellé, en carte sur le fond, en relief dans un bloc */
.mesure { display: flex; flex-direction: column; gap: var(--e-xs); padding: var(--e-xl); border-radius: var(--r-bloc); background: var(--carte); box-shadow: inset 0 0 0 var(--filet) var(--blanc-bord); }
.bloc .mesure { background: var(--releve); }
.mesure .v { color: var(--texte); font: var(--f-grand); letter-spacing: var(--i-kpi); font-variant-numeric: tabular-nums; }
.mesure .l { color: var(--tertiaire); font: var(--f-surtitre); }
.bloc dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--e-m) var(--e-xxl); margin: 0; }
.bloc dt { color: var(--tertiaire); font: var(--f-label); }
.bloc dd { margin: 0; overflow-wrap: anywhere; }
.structure { display: flex; flex-direction: column; gap: var(--e-m); margin: 0; padding: 0; list-style: none; }
.structure li { display: grid; grid-template-columns: var(--t-etape-nom) minmax(0, 1fr); gap: var(--e-xl); }
.structure .nom { color: var(--tertiaire); font: var(--f-label); }
.structure .part { color: var(--tertiaire); font: var(--f-mini); }
.actions { display: flex; flex-wrap: wrap; gap: var(--e-m); }
.actions .bouton-reglage { display: inline-flex; align-items: center; justify-content: center; gap: var(--e-m); }
.bouton-reglage .icone { width: var(--t-icone); height: var(--t-icone); }

/* fiche en fenêtre (fiche.js) : le reste vient de composants.css ; la base du voile est dans app.css, que le site ne charge pas */
.voile { position: fixed; inset: 0; z-index: var(--z-voile); display: flex; justify-content: center; background: var(--voile); }
html:has(.voile) { overflow: hidden; }
.colonne-video .lecteur { position: absolute; inset: 0; height: 100%; aspect-ratio: auto; border-radius: 0; background: none; }
.tete-fiche .bouton-reglage { flex: none; }
/* la fiche en carte, ses sections en relief bordé ; ses pastilles (app, genre, niche, hook, format) grises bordées */
.carte-survol, .fenetre-fiche { background: var(--carte); }
.hook-fiche, .kpis-fiche .viralite, .tuiles-fiche .tuile, .corps-fiche .section-analyse { border-radius: var(--r-bloc); background: var(--releve); box-shadow: inset 0 0 0 var(--filet) var(--blanc-bord); }
.corps-fiche .section-analyse { padding: var(--e-xl); }
.logo-fiche, .fermer-fiche, .etiquettes .pastille, .analyse .pastilles .pastille, .tete-fiche .pastille { background: var(--releve); box-shadow: inset 0 0 0 var(--filet) var(--blanc-bord); }
.fermer-fiche:hover { background: var(--gris-actif); }
/* le hook de la vidéo, à copier ou à garder dans l'Atelier */
.hook-fiche { display: flex; flex-direction: column; gap: var(--e-m); padding: var(--e-xl); }
.hook-fiche-texte { margin: 0; font: var(--f-grand); overflow-wrap: anywhere; user-select: text; }
.hook-fiche .actions, .analyse > .actions { align-items: center; }


/* page Claude : trois étapes numérotées, la configuration de chaque outil, les outils du MCP */
.ouverture.centree { align-items: center; text-align: center; }
.ouverture.centree .sous-titre { max-width: var(--t-texte-centre); }
.etroite { width: 100%; max-width: var(--t-boite); margin-inline: auto; }
.marches { display: flex; flex-direction: column; gap: var(--e-xl); padding: 0; list-style: none; }
.marches > .marche { --rayon: var(--r-carte); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--e-xxl); padding: var(--e-page); }
.numero { display: grid; place-items: center; width: var(--t-numero); height: var(--t-numero); border-radius: var(--r-capsule); background: var(--accent); color: var(--vert-pale); font: var(--f-corps-gras); }
.titre-marche { margin: 0; font: var(--f-grand); }
.consignes { display: flex; flex-direction: column; gap: var(--e-m); margin: 0; padding-left: var(--e-xl); }
.colonne.serree { gap: var(--e-s); }
/* un bloc de code à copier, en relief bordé, son bouton en haut à droite */
.bloc-code { position: relative; }
.bloc-code .code { margin: 0; padding: var(--e-xl) var(--t-copier) var(--e-xl) var(--e-xl); border-radius: var(--r-bloc); background: var(--releve); box-shadow: inset 0 0 0 var(--filet) var(--blanc-bord); font: var(--f-code); white-space: pre-wrap; word-break: break-all; user-select: all; }
.bloc-code .copier { position: absolute; top: var(--e-m); right: var(--e-m); }
.demandes { display: flex; flex-direction: column; gap: var(--e-m); }
.demande { display: flex; align-items: center; justify-content: space-between; gap: var(--e-xl); padding: var(--e-m) var(--e-m) var(--e-m) var(--e-xl); border-radius: var(--r-bloc); background: var(--releve); box-shadow: inset 0 0 0 var(--filet) var(--blanc-bord); color: var(--secondaire); }
.fait { display: flex; align-items: flex-start; gap: var(--e-m); margin: 0; color: var(--succes); }
.fait .icone { flex: none; width: var(--t-icone); height: var(--t-icone); }
.outil { display: flex; flex-direction: column; gap: var(--e-m); }
.tete-outil { display: flex; align-items: center; justify-content: space-between; gap: var(--e-m); }
.tete-outil code { font: var(--f-code); color: var(--texte); }
.note.centree { padding-top: var(--e-page); text-align: center; }

/* porte d'entrée : le haut de l'accueil, la boîte sur une ligne (le code, ou le nom et le mot de passe) */
.porte { display: contents; }
.sous-heros { max-width: var(--t-sous-heros); margin: 0; color: var(--secondaire); }
.boite-code { flex-direction: row; align-items: center; width: min(100%, var(--t-boite-code)); padding: var(--e-l) var(--e-l) var(--e-l) var(--e-xxl); }
.boite-code input { flex: 1; min-width: 0; padding: 0; background: none; border: 0; outline: none; color: var(--texte); font: var(--f-champ-heros); }
.boite-code input::placeholder { color: var(--tertiaire); }
.boite-code.deux { gap: var(--e-xl); width: min(100%, var(--t-boite)); }
.boite-code.deux input + input { padding-left: var(--e-xl); border-left: var(--filet) solid var(--blanc-bord-fort); }
.champ-groupe { width: min(100%, var(--t-boite-code)); margin-top: var(--e-xl); text-align: center; color: var(--texte); }
.liens-porte { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--e-xl); }
.heros-recherche .erreur { margin-top: var(--e-xl); }

.note { margin: 0; color: var(--tertiaire); font: var(--f-mini); }
.erreur { margin: 0; color: var(--danger); }
.erreur:empty { display: none; }

@media (max-width: 760px) {
  :root {
    --t-mur: 380px;
    --h-mur: 280px;
    --chevauchement: 110px;
    --t-logo-ia: 28px;
    --t-image-logo-ia: 15px;
    --recouvre-logo: -8px;
  }
  .grille-videos { --t-case: var(--t-case-etroite); }
  .page-video { grid-template-columns: minmax(0, 1fr); }
  .lecteur, .sans-lecteur { max-width: var(--t-lecteur); margin: 0 auto; }
  .barre { grid-template-columns: auto 1fr; gap: var(--e-s); }
  .barre > span:empty { display: none; }
  .marque { padding-right: 0; }
  .titre-heros { font: var(--f-heros-etroit); letter-spacing: var(--i-titre); }
  .boite-bas, .boite-code { flex-direction: column; align-items: stretch; }
  .ligne-analyse { grid-template-columns: minmax(0, 1fr); }
  .ligne-analyse .puces-filtres, .ligne-analyse .bouton-chercher { grid-column: auto; grid-row: auto; }
  .tete-business .filtres-plus { justify-content: flex-start; }
  .boite-code { padding: var(--e-xxl); }
  .boite-code.deux input + input { padding: var(--e-xl) 0 0; border-left: 0; border-top: var(--filet) solid var(--blanc-bord-fort); }
  .bouton-chercher { width: 100%; }
  .marches > .marche { grid-template-columns: minmax(0, 1fr); gap: var(--e-xl); padding: var(--e-xxl); }
  .structure li { grid-template-columns: minmax(0, 1fr); gap: var(--e-xs); }
  /* le tableau du groupe et les dépenses : une carte par ligne, le nom (et le bouton) en haut, les chiffres titrés dessous */
  .table-groupe .rang.tete, .table-depenses .rang.tete { display: none; }
  .table-groupe .rang, .table-depenses .rang { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: var(--e-m); }
  .table-groupe .compte-groupe { grid-column: 1 / 4; grid-row: 1; }
  .table-depenses .compte-groupe { grid-column: 1 / -1; }
  .table-groupe .cellule.action { grid-column: 4; grid-row: 1; }
  .table-groupe .cellule, .table-depenses .cellule { text-align: left; white-space: normal; }
  .table-groupe .cellule.action { text-align: right; }
  .table-groupe .cellule[data-l]::before, .table-depenses .cellule[data-l]::before { content: attr(data-l); display: block; color: var(--tertiaire); font: var(--f-mini); }
}
