/* Lessgo Admin — le branding de Lessgo : crème, encre nuit, corail pour l'action, relief doux sans bordures. */
@font-face { font-family: "Gabarito"; src: url("/fonts/Gabarito-latin.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url("/fonts/PlusJakartaSans-latin.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

:root {
  --creme: #fff6ec; --peche: #ffe7d6; --carte: #ffffff;
  --encre: #2b1055; --encre-2: #5b4a78; --encre-3: #8e82a3;
  --corail: #ff5a36; --corail-d: #e2431f; --soleil: #ffc93c; --lagon: #0f9c8f;
  --trait: #f1e7dd; --grille: #f3ece5;
  /* séries (validées daltonisme, sur blanc) : corail · lagon · violet · ocre · rose */
  --s1: #e2431f; --s2: #0f9c8f; --s3: #5b3fd1; --s4: #c98500; --s5: #c2457f;
  --bon: #0ca30c; --alerte: #d03b3b;
  --ombre: 0 1px 2px rgba(43,16,85,.04), 0 10px 30px -12px rgba(43,16,85,.14);
  --rayon: 24px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--creme); color: var(--encre); font-family: "Jakarta", system-ui, sans-serif; font-size: 15px; line-height: 1.45;
  font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; }
h1, h2, h3, .titre { font-family: "Gabarito", sans-serif; letter-spacing: -0.02em; }

/* ---------- la barre du haut ---------- */
.barre { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--creme) 88%, transparent); backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px); padding: 14px max(24px, env(safe-area-inset-left)); display: flex; align-items: center; gap: 28px; }
.marque { text-decoration: none; display: flex; align-items: center; gap: 10px; font-family: "Gabarito"; font-weight: 900; font-size: 22px; letter-spacing: -0.03em; flex: 0 0 auto; }
.marque img { width: 34px; height: 34px; border-radius: 10px; box-shadow: 0 4px 12px -4px rgba(226,67,31,.6); }
.marque small { font-family: "Jakarta"; font-weight: 700; font-size: 12px; color: var(--encre-3); letter-spacing: .06em; text-transform: uppercase; margin-left: 2px; }
.onglets { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.onglets::-webkit-scrollbar { display: none; }
.onglets a { text-decoration: none; padding: 9px 16px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--encre-2); white-space: nowrap; }
.onglets a:hover { background: var(--peche); color: var(--encre); }
.onglets a.on { background: var(--encre); color: #fff; }
.moi { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; margin-left: auto; }
.fraicheur { font-size: 12px; color: var(--encre-3); font-weight: 600; white-space: nowrap; }
.fraicheur i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--lagon); margin-right: 6px; vertical-align: 1px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--encre); color: #fff; font-family: "Gabarito"; font-weight: 800; display: grid; place-items: center; }
.menu { position: absolute; right: 24px; top: 62px; background: var(--carte); border-radius: 18px; box-shadow: var(--ombre); padding: 8px; min-width: 200px; }
.menu p { padding: 8px 12px; font-size: 13px; color: var(--encre-3); }
.menu button { width: 100%; text-align: left; padding: 10px 12px; border-radius: 12px; font-weight: 700; }
.menu button:hover { background: var(--peche); }

/* ---------- la page ---------- */
main { max-width: 1240px; margin: 0 auto; padding: 12px max(24px, env(safe-area-inset-left)) 80px; }
.entete { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 18px 0 22px; flex-wrap: wrap; }
.entete h1 { font-size: 34px; font-weight: 900; line-height: 1.05; }
.entete p { color: var(--encre-2); margin-top: 6px; }
.grille { display: grid; gap: 18px; grid-template-columns: repeat(12, 1fr); }
.c12 { grid-column: span 12; } .c8 { grid-column: span 8; } .c7 { grid-column: span 7; } .c6 { grid-column: span 6; }
.c5 { grid-column: span 5; } .c4 { grid-column: span 4; } .c3 { grid-column: span 3; }
.carte { background: var(--carte); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 22px; min-width: 0; }
.carte h2 { font-size: 18px; font-weight: 800; }
.carte .sous { font-size: 13px; color: var(--encre-3); margin-top: 2px; }
.carte-tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }

/* ---------- l'objectif (la seule grande figure de la page) ---------- */
.objectif { background: var(--carte); color: var(--encre); border-radius: 28px; padding: 30px 32px; position: relative; overflow: hidden; box-shadow: var(--ombre); }
.objectif::after { content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,201,60,.35), rgba(255,90,54,.12) 45%, rgba(255,90,54,0) 70%); pointer-events: none; }
.objectif .etiquette { font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--corail-d); }
.objectif .chiffre { font-family: "Gabarito"; font-weight: 900; font-size: 76px; line-height: 1; letter-spacing: -0.04em; margin-top: 10px; }
.objectif .chiffre span { color: var(--encre-3); font-size: 40px; }
.objectif .phrase { margin-top: 8px; color: var(--encre-2); max-width: 560px; }
.jauge { margin-top: 22px; height: 12px; border-radius: 999px; background: var(--peche); overflow: hidden; }
.jauge b { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--corail), var(--soleil)); }
.objectif .pied { display: flex; gap: 28px; margin-top: 16px; flex-wrap: wrap; font-size: 14px; color: var(--encre-3); font-weight: 600; }
.objectif .pied strong { color: var(--encre); font-family: "Gabarito"; font-size: 20px; display: block; }

/* ---------- les tuiles ---------- */
.tuile .libelle { font-size: 13px; font-weight: 700; color: var(--encre-2); }
.tuile .valeur { font-family: "Gabarito"; font-weight: 900; font-size: 40px; line-height: 1.05; letter-spacing: -0.03em; margin-top: 8px; }
.tuile .valeur small { font-size: 18px; color: var(--encre-3); font-weight: 800; margin-left: 4px; }
.tuile .delta { margin-top: 6px; font-size: 13px; font-weight: 700; color: var(--encre-3); }
.delta .haut { color: var(--bon); } .delta .bas { color: var(--alerte); }

/* ---------- graphiques ---------- */
.graphe { width: 100%; display: block; overflow: visible; }
.graphe text { font-family: "Jakarta"; font-size: 11px; fill: var(--encre-3); font-weight: 600; }
.graphe .grille-l { stroke: var(--grille); stroke-width: 1; }
.graphe .cible { fill: transparent; cursor: crosshair; }
.graphe .barre-d { transition: opacity .15s; }
.graphe:hover .barre-d { opacity: .55; } .graphe .barre-d.survol { opacity: 1; }
#bulle { position: fixed; z-index: 50; pointer-events: none; background: var(--encre); color: #fff; padding: 9px 12px; border-radius: 12px;
  font-size: 13px; font-weight: 600; box-shadow: 0 10px 30px -8px rgba(43,16,85,.5); white-space: nowrap; transform: translate(-50%, calc(-100% - 12px)); }
#bulle b { font-family: "Gabarito"; font-size: 16px; }
#bulle small { display: block; color: rgba(255,255,255,.65); font-size: 12px; }

/* barres horizontales (classements) */
.classement { display: grid; gap: 10px; }
.classement .ligne { display: grid; grid-template-columns: minmax(90px, 160px) 1fr 44px; align-items: center; gap: 12px; font-size: 14px; }
.classement .nom { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.classement .piste { height: 14px; border-radius: 0 6px 6px 0; }
.classement .piste b { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--s1); min-width: 3px; }
.classement .n { text-align: right; font-weight: 800; font-family: "Gabarito"; }

/* entonnoir */
.entonnoir { display: grid; gap: 12px; }
.etape { display: grid; grid-template-columns: 200px 1fr 90px; gap: 14px; align-items: center; }
.etape .nom { font-weight: 700; font-size: 14px; }
.etape .nom small { display: block; color: var(--encre-3); font-weight: 600; font-size: 12px; }
.etape .piste { height: 30px; background: var(--grille); border-radius: 0 8px 8px 0; overflow: hidden; }
.etape .piste b { display: block; height: 100%; border-radius: 0 6px 6px 0; }
.etape .val { font-family: "Gabarito"; font-weight: 900; font-size: 20px; text-align: right; }
.etape .val small { display: block; font-family: "Jakarta"; font-size: 12px; color: var(--encre-3); font-weight: 700; }

/* répartition (une barre empilée) */
.repartition { display: flex; height: 16px; gap: 2px; border-radius: 999px; overflow: hidden; margin: 6px 0 14px; }
.repartition b { display: block; height: 100%; }
.legende { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--encre-2); font-weight: 600; }
.legende i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ---------- les listes ---------- */
.outils { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.recherche { background: var(--carte); border: 0; border-radius: 999px; padding: 11px 18px; min-width: 240px; box-shadow: var(--ombre); outline: none; }
.recherche:focus { box-shadow: 0 0 0 3px var(--peche), var(--ombre); }
select.filtre { background: var(--carte); border: 0; border-radius: 999px; padding: 11px 16px; box-shadow: var(--ombre); font-weight: 700; outline: none; }
.puces { display: flex; gap: 6px; background: var(--carte); border-radius: 999px; padding: 4px; box-shadow: var(--ombre); }
.puces button { padding: 7px 14px; border-radius: 999px; font-weight: 700; font-size: 13px; color: var(--encre-2); }
.puces button.on { background: var(--encre); color: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--encre-3); font-weight: 700; padding: 0 10px 10px; white-space: nowrap; }
td { padding: 12px 10px; border-top: 1px solid var(--trait); vertical-align: middle; }
tr:hover td { background: #fffaf4; }
td.num, th.num { text-align: right; }
.defile { overflow-x: auto; margin: 0 -10px; padding: 0 10px; }
.membre { display: flex; align-items: center; gap: 10px; min-width: 160px; }
.membre .pastille { width: 34px; height: 34px; border-radius: 50%; background: var(--peche); color: var(--corail-d); font-family: "Gabarito"; font-weight: 900; display: grid; place-items: center; flex: 0 0 auto; }
.membre b { display: block; font-weight: 800; }
.membre small { color: var(--encre-3); font-size: 12px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--peche); color: var(--encre); white-space: nowrap; }
.badge.lagon { background: #ddf4f1; color: #0b6f66; } .badge.gris { background: #f2eef6; color: var(--encre-2); } .badge.or { background: #fff2cc; color: #8a5a00; }
.points { display: inline-flex; gap: 4px; }
.points i { width: 10px; height: 10px; border-radius: 50%; background: var(--grille); }
.points i.oui { background: var(--lagon); } .points i.non { background: #f3c9bd; }
.interrupteur { width: 40px; height: 24px; border-radius: 999px; background: #e9e1d8; position: relative; transition: background .2s; flex: 0 0 auto; }
.interrupteur::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.interrupteur.on { background: var(--encre); } .interrupteur.on::after { transform: translateX(16px); }
.vide { text-align: center; padding: 34px 10px; color: var(--encre-3); }
.vide b { display: block; color: var(--encre); font-family: "Gabarito"; font-size: 18px; margin-bottom: 4px; }

/* ---------- angles ---------- */
.angle { display: grid; grid-template-columns: 28px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--trait); }
.angle:first-child { border-top: 0; }
.angle .rang { font-family: "Gabarito"; font-weight: 900; font-size: 20px; color: var(--encre-3); }
.angle .rang.premier { color: var(--corail-d); }
.angle b { font-weight: 800; } .angle small { display: block; color: var(--encre-3); font-size: 12px; }
.angle .score { text-align: right; font-family: "Gabarito"; font-weight: 900; font-size: 22px; }
.angle .score small { font-family: "Jakarta"; font-weight: 700; }
.note { font-size: 13px; color: var(--encre-2); background: var(--peche); border-radius: 16px; padding: 12px 14px; }

/* ---------- budget & plan ---------- */
.bandeau { display: flex; justify-content: space-between; align-items: center; gap: 12px; text-decoration: none; padding: 16px 22px; font-weight: 600; color: var(--encre-2); flex-wrap: wrap; }
.bandeau b { font-family: "Gabarito"; font-size: 20px; color: var(--encre); }
.bandeau:hover { box-shadow: 0 0 0 3px var(--peche), var(--ombre); }
.frise { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 1fr); gap: 0; overflow-x: auto; padding-bottom: 6px; }
.jalon { position: relative; padding: 30px 16px 4px 0; }
.jalon::before { content: ""; position: absolute; left: 0; right: 0; top: 9px; height: 3px; background: var(--grille); }
.jalon.fait::before { background: var(--corail); }
.jalon i { position: absolute; left: 0; top: 2px; width: 17px; height: 17px; border-radius: 50%; background: #fff; border: 3px solid var(--grille); }
.jalon.fait i { background: var(--corail); border-color: var(--corail); }
.jalon.cible i { border-color: var(--soleil); background: var(--soleil); box-shadow: 0 0 0 5px rgba(255,201,60,.3); }
.jalon .date { display: block; font-size: 12px; font-weight: 800; color: var(--encre-3); text-transform: uppercase; letter-spacing: .05em; }
.jalon b { display: block; margin-top: 4px; font-weight: 800; line-height: 1.25; }
.jalon small { display: block; margin-top: 4px; color: var(--encre-2); font-size: 13px; line-height: 1.35; }
.etapes { display: grid; gap: 12px; }
.etape-plan { display: grid; grid-template-columns: 44px 1fr; gap: 14px; padding: 16px; border-radius: 20px; background: var(--creme); }
.etape-plan.en-cours { background: #fff; box-shadow: 0 0 0 3px var(--peche); }
.etape-plan.fait { opacity: .7; }
.etape-plan p { color: var(--encre-2); font-size: 14px; margin-top: 2px; }
.num-etape { width: 44px; height: 44px; border-radius: 14px; background: #fff; display: grid; place-items: center; font-family: "Gabarito"; font-weight: 900; font-size: 20px; color: var(--encre-3); box-shadow: var(--ombre); }
.etape-plan.en-cours .num-etape { background: var(--corail-d); color: #fff; }
.etape-plan.fait .num-etape { background: var(--lagon); color: #fff; }
.condition { margin-top: 8px; font-size: 14px; font-weight: 700; } .condition span { color: var(--encre-3); font-weight: 600; }
.mini-jauge { margin-top: 10px; height: 8px; border-radius: 999px; background: var(--peche); overflow: hidden; max-width: 420px; }
.mini-jauge b { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--corail), var(--soleil)); }

/* ---------- boutons, formulaires ---------- */
.bouton { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 999px; font-weight: 800;
  background: var(--corail-d); color: #fff; box-shadow: 0 10px 22px -10px rgba(226,67,31,.7); }
.bouton:hover { background: #cd3a17; }
.bouton.second { background: var(--carte); color: var(--encre); box-shadow: var(--ombre); }
.bouton:disabled { opacity: .5; cursor: default; }
label.champ { display: grid; gap: 6px; font-size: 13px; font-weight: 700; color: var(--encre-2); }
label.champ input, label.champ select, label.champ textarea { background: var(--creme); border: 0; border-radius: 14px; padding: 12px 14px; font-weight: 600; color: var(--encre); outline: none; width: 100%; }
label.champ input:focus, label.champ select:focus, label.champ textarea:focus { box-shadow: 0 0 0 3px var(--peche); background: #fff; }
.erreur { color: var(--alerte); font-weight: 700; font-size: 14px; }

/* la fenêtre (saisie d'une publication) */
.voile { position: fixed; inset: 0; background: rgba(43,16,85,.35); z-index: 40; display: grid; place-items: center; padding: 16px; animation: apparait .15s ease-out; }
.fenetre { background: var(--carte); border-radius: 28px; padding: 26px; width: min(720px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 30px 80px -20px rgba(43,16,85,.5); }
.fenetre h2 { font-size: 22px; font-weight: 900; margin-bottom: 4px; }
.champs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0; }
.champs .large { grid-column: span 4; } .champs .moitie { grid-column: span 2; }
.actions { display: flex; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
@keyframes apparait { from { opacity: 0; } }

/* ---------- connexion ---------- */
.accueil { min-height: 100vh; display: grid; place-items: center; padding: 24px; background:
  radial-gradient(60% 50% at 80% 10%, rgba(255,90,54,.18), transparent 70%), radial-gradient(50% 40% at 10% 90%, rgba(255,201,60,.25), transparent 70%), var(--creme); }
.accueil .carte { width: min(420px, 100%); padding: 34px; }
.accueil img { width: 64px; height: 64px; border-radius: 18px; box-shadow: 0 12px 26px -10px rgba(226,67,31,.7); }
.accueil h1 { font-size: 30px; font-weight: 900; margin-top: 18px; }
.accueil p { color: var(--encre-2); margin: 6px 0 22px; }
.accueil form { display: grid; gap: 14px; }

/* ---------- téléphone ---------- */
@media (max-width: 980px) {
  .c8, .c7, .c6, .c5, .c4 { grid-column: span 12; } .c3 { grid-column: span 6; }
}
@media (max-width: 720px) {
  .barre { flex-wrap: wrap; gap: 10px 16px; padding: 12px 16px; }
  .onglets { order: 3; flex-basis: 100%; }
  .fraicheur { display: none; }
  main { padding: 6px 16px 60px; }
  .entete h1 { font-size: 28px; }
  .objectif { padding: 24px; } .objectif .chiffre { font-size: 60px; }
  .tuile .valeur { font-size: 32px; }
  .carte { padding: 18px; }
  .etape { grid-template-columns: 96px 1fr 64px; gap: 10px; }
  .champs { grid-template-columns: repeat(2, 1fr); } .champs .large { grid-column: span 2; } .champs .moitie { grid-column: span 2; }
  .recherche { min-width: 0; flex: 1; }
  .menu { right: 16px; }
}
@media (max-width: 420px) { .c3 { grid-column: span 12; } }
