/* Radar — feuille de style unique */

:root {
  --fond: #f5f7f8;
  --surface: #ffffff;
  --surface-2: #eef2f3;
  --texte: #16202a;
  --texte-2: #5b6b78;
  --bord: #dbe2e6;
  --accent: #0f766e;
  --accent-fort: #0b5d57;
  --accent-doux: #e0f2ef;
  --sur-accent: #ffffff;
  --danger: #b42318;
  --danger-doux: #fdecea;
  --ok: #067647;
  --ok-doux: #e6f4ec;
  --info-doux: #eaf1fb;
  --info: #1d4f91;
  --attention: #b54708;
  --ombre: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --rayon: 12px;
  --yt: #d92d20; --li: #0a66c2; --tt: #111111; --ig: #c13584;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fond: #0e1417; --surface: #151d21; --surface-2: #1c262b; --texte: #e6edf0; --texte-2: #93a3ad;
    --bord: #2a363c; --accent: #2dd4bf; --accent-fort: #5eead4; --accent-doux: #12332f; --sur-accent: #04231f;
    --danger: #f97066; --danger-doux: #3a1714; --ok: #47cd89; --ok-doux: #113123; --info-doux: #13243a; --info: #84adff;
    --attention: #fdb022; --ombre: none; --tt: #e6edf0;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --fond: #0e1417; --surface: #151d21; --surface-2: #1c262b; --texte: #e6edf0; --texte-2: #93a3ad;
  --bord: #2a363c; --accent: #2dd4bf; --accent-fort: #5eead4; --accent-doux: #12332f; --sur-accent: #04231f;
  --danger: #f97066; --danger-doux: #3a1714; --ok: #47cd89; --ok-doux: #113123; --info-doux: #13243a; --info: #84adff;
  --attention: #fdb022; --ombre: none; --tt: #e6edf0;
  color-scheme: dark;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--fond);
  color: var(--texte);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--accent); }
a:hover { color: var(--accent-fort); }
h1 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 .75rem; }
h2 { font-size: 1.1rem; margin: 0 0 .75rem; }

/* ---- En-tête ---- */
.entete { background: var(--surface); border-bottom: 1px solid var(--bord); }
.entete-interieur {
  max-width: 1080px; margin: 0 auto; padding: .6rem 16px;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.logo {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 700; font-size: 1.15rem; color: var(--texte); text-decoration: none;
}
.menu { display: flex; align-items: center; gap: .25rem; flex: 1; flex-wrap: wrap; }
.menu a, .lien-bouton {
  padding: .45rem .7rem; border-radius: 8px; color: var(--texte-2); text-decoration: none;
  font: inherit; background: none; border: 0; cursor: pointer;
}
.menu a:hover, .lien-bouton:hover { background: var(--surface-2); color: var(--texte); }
.menu a[aria-current="page"] { background: var(--accent-doux); color: var(--accent-fort); font-weight: 600; }
.menu form { margin: 0; }
.menu-separateur { flex: 1; }
.lien-admin::before { content: "⚙ "; }
.menu-bouton { display: none; margin-left: auto; }

@media (max-width: 760px) {
  .menu-bouton {
    display: inline-block; padding: .4rem .8rem; border: 1px solid var(--bord); border-radius: 8px;
    background: var(--surface); color: var(--texte); font: inherit;
  }
  .menu { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; }
  .menu.ouvert { display: flex; }
  .menu-separateur { display: none; }
  .menu .lien-bouton { width: 100%; text-align: left; }
}

.bandeau-incarnation {
  background: #fef0c7; color: #7a2e0e; padding: .5rem 16px;
  display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap; text-align: center;
}
.bandeau-incarnation form { margin: 0; }

/* ---- Page ---- */
.page { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 1.5rem 16px 3rem; }
.pied { text-align: center; color: var(--texte-2); font-size: .85rem; padding: 1.5rem 16px; }
.pied a { color: inherit; }
.intro { color: var(--texte-2); margin: -.25rem 0 1.25rem; max-width: 46rem; }
.fil { margin: 0 0 .5rem; font-size: .9rem; }
.fil a { text-decoration: none; }
.titre-page { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem; }
.titre-page h1 { margin: 0; }
.discret, .aide { color: var(--texte-2); font-size: .88rem; }
.aide { display: block; margin-top: .25rem; font-weight: normal; }
.compteur {
  display: inline-block; font-size: .8rem; font-weight: 600; padding: .1rem .5rem; border-radius: 99px;
  background: var(--surface-2); color: var(--texte-2); vertical-align: middle;
}

/* ---- Cartes ---- */
.carte {
  background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon);
  box-shadow: var(--ombre); padding: 1.25rem; margin-bottom: 1.25rem;
}
.carte-etroite { max-width: 30rem; margin-left: auto; margin-right: auto; }
.carte-titre { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.carte-attente { border-style: dashed; box-shadow: none; background: transparent; color: var(--texte-2); }
.carte-attente h2 { color: var(--texte); }
.grille-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 1.25rem; }
.grille-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 0 1.25rem; }
.lien-discret { font-size: .9rem; text-decoration: none; }
.vide { text-align: center; color: var(--texte-2); }
.zone-danger { border-color: color-mix(in srgb, var(--danger) 35%, var(--bord)); }

/* ---- Vitrine ---- */
.vitrine { text-align: center; max-width: 36rem; margin: 3rem auto; }
.vitrine h1 { font-size: 2.4rem; margin-top: .75rem; }
.accroche { font-size: 1.15rem; color: var(--texte-2); margin-bottom: 1.75rem; }

/* ---- Étapes ---- */
.etapes { list-style: none; margin: 0; padding: 0; counter-reset: etape; }
.etapes li { position: relative; padding: .6rem 0 .6rem 2.6rem; counter-increment: etape; }
.etapes li + li { border-top: 1px solid var(--bord); }
.etapes li::before {
  content: counter(etape); position: absolute; left: 0; top: .6rem;
  width: 1.8rem; height: 1.8rem; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: .9rem; background: var(--surface-2); color: var(--texte-2);
}
.etapes li.faite::before { content: "✓"; background: var(--ok-doux); color: var(--ok); }
.etapes li.faite a { color: var(--texte-2); text-decoration: line-through; }
.etapes a { font-weight: 600; }

/* ---- Réseaux ---- */
.pastille {
  display: inline-block; font-size: .78rem; font-weight: 600; padding: .12rem .55rem; border-radius: 99px;
  color: #fff; white-space: nowrap; line-height: 1.5;
}
.pastille-youtube { background: var(--yt); }
.pastille-linkedin { background: var(--li); }
.pastille-tiktok { background: var(--tt); color: var(--fond); }
.pastille-instagram { background: var(--ig); }
.pastilles { display: inline-flex; gap: .3rem; flex-wrap: wrap; }

.liste-comptes, .liste-concurrents { list-style: none; margin: 0; padding: 0; }
.liste-comptes li { display: flex; align-items: center; gap: .6rem; padding: .4rem 0; min-width: 0; }
.liste-comptes .pastille { width: 5.6rem; text-align: center; }
.liste-comptes a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.liste-concurrents li {
  display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap;
  padding: .55rem 0;
}
.liste-concurrents li + li { border-top: 1px solid var(--bord); }
.liste-concurrents a { font-weight: 600; text-decoration: none; }

/* ---- Formulaires ---- */
.formulaire { display: flex; flex-direction: column; gap: 1rem; }
.champ { display: flex; flex-direction: column; gap: .3rem; }
.champ-libelle { font-weight: 600; font-size: .92rem; }
input[type="text"], input[type="email"], input[type="password"], textarea {
  width: 100%; padding: .6rem .75rem; border: 1px solid var(--bord); border-radius: 8px;
  background: var(--surface); color: var(--texte); font: inherit;
}
textarea { resize: vertical; min-height: 4.5rem; }
input:focus, textarea:focus, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}
.groupe { border: 1px solid var(--bord); border-radius: 10px; padding: 1rem; margin: 0; display: flex; flex-direction: column; gap: .8rem; }
.groupe legend { font-weight: 700; padding: 0 .4rem; }
.groupe > .aide { margin-top: -.4rem; }
.reseaux-champs { display: grid; gap: .75rem; }
.champ-reseau { display: grid; grid-template-columns: 6.5rem 1fr; align-items: center; gap: .75rem; }
.champ-reseau .pastille { width: 100%; text-align: center; }
@media (max-width: 520px) { .champ-reseau { grid-template-columns: 1fr; gap: .3rem; } .champ-reseau .pastille { width: auto; } }
.choix { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .45rem; }
.choix legend { font-weight: 600; margin-bottom: .45rem; padding: 0; }
.choix label, .case { display: flex; gap: .55rem; align-items: baseline; cursor: pointer; }
.bloc-strategie + .bloc-strategie { margin-top: 1rem; }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-top: .5rem; }
.actions form { margin: 0; }

/* ---- Boutons ---- */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .55rem 1rem; border-radius: 8px; border: 1px solid var(--bord);
  background: var(--surface); color: var(--texte); font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.bouton:hover { background: var(--surface-2); color: var(--texte); }
.bouton.plein { background: var(--accent); border-color: var(--accent); color: var(--sur-accent); }
.bouton.plein:hover { background: var(--accent-fort); border-color: var(--accent-fort); }
.bouton.danger { color: var(--danger); }
.bouton.danger:hover { background: var(--danger-doux); }
.bouton.petit { padding: .3rem .65rem; font-size: .85rem; }

/* ---- Messages ---- */
.message { padding: .75rem 1rem; border-radius: 10px; margin-bottom: 1rem; border: 1px solid transparent; }
.message ul { margin: 0; padding-left: 1.2rem; }
.message-ok { background: var(--ok-doux); color: var(--ok); }
.message-info { background: var(--info-doux); color: var(--info); }
.message-erreur { background: var(--danger-doux); color: var(--danger); }

/* ---- Tableau admin ---- */
.tableau-conteneur { padding: 0; overflow-x: auto; }
.tableau { width: 100%; border-collapse: collapse; }
.tableau th, .tableau td { padding: .75rem 1rem; text-align: left; vertical-align: top; }
.tableau th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--texte-2); border-bottom: 1px solid var(--bord); }
.tableau tr + tr td { border-top: 1px solid var(--bord); }
.tableau td a { text-decoration: none; }
.cellule-actions { white-space: nowrap; text-align: right; }
.cellule-actions form { display: inline; margin: 0; }
@media (max-width: 760px) {
  .tableau thead { display: none; }
  .tableau, .tableau tbody, .tableau tr, .tableau td { display: block; }
  .tableau tr { padding: .5rem 0; }
  .tableau tr + tr { border-top: 1px solid var(--bord); }
  .tableau td { padding: .25rem 1rem; border: 0 !important; }
  .cellule-actions { text-align: left; }
}
.etiquette {
  font-size: .72rem; font-weight: 700; text-transform: uppercase; padding: .05rem .4rem; border-radius: 4px;
  background: var(--accent-doux); color: var(--accent-fort); margin-left: .3rem;
}
.statut { font-size: .85rem; font-weight: 600; }
.statut-actif { color: var(--ok); }
.statut-attente { color: var(--attention); }
.statut-expiree, .statut-desactive { color: var(--danger); }

.fiche { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.25rem; margin: 0 0 1rem; }
.fiche dt { color: var(--texte-2); }
.fiche dd { margin: 0; }

.lien-copie { display: flex; gap: .5rem; margin: 1rem 0 .5rem; }
.lien-copie input { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; }

/* ---- Classement YouTube ---- */
.explication { margin: -.25rem 0 1rem; max-width: 48rem; }
.classement { list-style: none; margin: 0; padding: 0; }
.classement li { display: flex; gap: 1rem; padding: .85rem 0; align-items: flex-start; }
.classement li + li { border-top: 1px solid var(--bord); }
.vignette { position: relative; flex: 0 0 160px; border-radius: 8px; overflow: hidden; background: var(--surface-2); line-height: 0; }
.vignette img { width: 160px; height: 90px; object-fit: cover; display: block; }
.duree {
  position: absolute; right: 4px; bottom: 4px; background: rgba(0, 0, 0, .8); color: #fff;
  font-size: .72rem; line-height: 1; padding: .2rem .3rem; border-radius: 4px;
}
.classement-texte { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.classement-titre { font-weight: 600; color: var(--texte); text-decoration: none; }
.classement-titre:hover { color: var(--accent); }
.chiffres { display: flex; gap: .4rem .9rem; flex-wrap: wrap; align-items: baseline; font-size: .9rem; }
.score {
  font-size: 1rem; color: var(--accent-fort); background: var(--accent-doux);
  padding: .05rem .5rem; border-radius: 6px;
}
.sponsorise .score { color: var(--texte-2); background: var(--surface-2); }
.alerte-sponso { font-size: .85rem; color: var(--attention); }
.etat-collecte { display: flex; flex-direction: column; gap: .15rem; margin: 1rem 0 0; padding-top: .75rem; border-top: 1px dashed var(--bord); }
.texte-erreur { color: var(--danger); }
@media (max-width: 520px) {
  .classement li { flex-direction: column; }
  .vignette, .vignette img { width: 100%; height: auto; flex-basis: auto; aspect-ratio: 16 / 9; }
}

/* ---- Extension ---- */
.liste-jetons { list-style: none; margin: 0 0 1rem; padding: 0; }
.liste-jetons li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .6rem 0; }
.liste-jetons li + li { border-top: 1px solid var(--bord); }
.liste-jetons form { margin: 0; }
code { font-family: ui-monospace, Consolas, monospace; font-size: .85em; background: var(--surface-2); padding: .05rem .35rem; border-radius: 4px; }
.formulaire-ligne { display: flex; gap: .5rem; flex-wrap: wrap; }
.formulaire-ligne input { flex: 1 1 14rem; width: auto; }

/* ---- Classement sans vignette (LinkedIn, Instagram, TikTok) ---- */
.score-bloc { flex: 0 0 4.5rem; display: flex; justify-content: center; padding-top: .1rem; }
.score-bloc .score { font-size: 1.15rem; }

/* ---- Analyse Claude ---- */
h3 { font-size: 1rem; margin: 1.25rem 0 .6rem; }
.synthese { font-size: 1.02rem; max-width: 52rem; }
.idees { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.idee { border: 1px solid var(--bord); border-radius: 10px; padding: .85rem 1rem; background: var(--surface-2); }
.idee-entete { display: flex; gap: .6rem; align-items: center; margin-bottom: .35rem; }
.idee-accroche { font-weight: 700; font-size: 1.05rem; margin: .2rem 0 .5rem; }
.idee p { margin: .35rem 0; }
.idee summary { cursor: pointer; color: var(--accent); font-weight: 600; margin-top: .3rem; }
.idee-plan { white-space: normal; }
.mecaniques { margin: .2rem 0 .9rem; padding-left: 1.2rem; }
.mecaniques li { margin: .15rem 0; }
.note-claude { font-size: .9rem; background: var(--accent-doux); color: var(--texte); padding: .4rem .6rem; border-radius: 6px; margin-top: .2rem; }
