/* Postmètre : couleurs, polices et formes des maquettes (violet, orange, encre, fond lavande). */
:root {
  --fond: #F4F2FF;
  --carte: #FFFFFF;
  --encre: #1A1446;
  --doux: #5B5480;
  --doux2: #4A4470;
  --trait: #EEEBFB;
  --trait2: #E4E0FA;
  --violet: #5B3DF5;
  --violet-fonce: #4B2FE0;
  --lavande: #E9E5FF;
  --lavande-clair: #EEEBFF;
  --orange: #FF8A3D;
  --orange-pale: #FFD9BD;
  --orange-texte: #A8430A;
  --vert-pale: #D6F6E8;
  --vert-texte: #0B5A41;
  --rouge: #C0262D;
  font: 15px/1.5 Manrope, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--encre);
  background: var(--fond);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 32px 32px 72px; display: flex; flex-direction: column; gap: 24px; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--violet-fonce); }
a:hover { color: var(--encre); }
.d { font-family: 'Bricolage Grotesque', system-ui, sans-serif; font-optical-sizing: auto; letter-spacing: -0.02em; }
[hidden] { display: none !important; }

/* ---------- barre du haut ---------- */
.barre { background: var(--carte); border-bottom: 1px solid var(--trait2); position: sticky; top: 0; z-index: 5; }
.barre-dedans {
  max-width: 1200px; margin: 0 auto; padding: 12px 32px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--encre); }
.logo span { font-size: 21px; font-weight: 800; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--fond); border-radius: 999px; }
.nav button {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px;
  background: none; color: var(--doux2); font-weight: 600; font-size: 14px; cursor: pointer;
}
.nav button:hover { background: var(--lavande); color: var(--encre); }
.nav button.actif { background: var(--encre); color: #FFFFFF; }
.badge:empty { display: none; }
.badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px; background: var(--orange); color: var(--encre); font-size: 12px; font-weight: 800;
}

.filtres {
  width: 100%; max-width: 1200px; margin: 0 auto; padding: 20px 32px 0;
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px;
}
.fl { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--doux); }
#nouveau { margin-left: auto; }

/* ---------- champs et boutons ---------- */
select, input, textarea {
  border: 2px solid var(--trait2); border-radius: 12px; padding: 0 12px; min-height: 40px; background: #FFFFFF; color: var(--encre);
}
textarea { padding: 8px 12px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--violet); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
button {
  border: 2px solid var(--trait2); background: #FFFFFF; border-radius: 999px; padding: 4px 14px; min-height: 36px;
  cursor: pointer; font-weight: 700;
}
button:hover { border-color: var(--encre); }
button:disabled { opacity: 0.5; cursor: wait; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 800; min-height: 48px;
  padding: 0 22px; border-radius: 999px; cursor: pointer; border: 2px solid var(--encre); background: #FFFFFF; color: var(--encre);
}
.btn.p, button.principal { background: var(--encre); border-color: var(--encre); color: #FFFFFF; }
.btn.p:hover, button.principal:hover { background: var(--violet-fonce); border-color: var(--violet-fonce); }
.btn.petit { min-height: 34px; padding: 0 14px; font-size: 13px; }
button.danger, .btn.danger { color: var(--rouge); border-color: #F3C5C8; }
.btn.danger:hover, button.danger:hover { border-color: var(--rouge); }
button.lien { border: 0; padding: 0; min-height: 0; background: none; text-align: left; color: var(--violet-fonce); font-weight: 700; border-radius: 0; }
button.lien:hover { text-decoration: underline; color: var(--encre); }
.btn.fichier { position: relative; overflow: hidden; }
.btn.fichier input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.piege { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- textes ---------- */
h1 { margin: 0; font-size: 48px; line-height: 1; font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: 22px; margin: 0; display: flex; align-items: center; gap: 10px; font-weight: 800; }
h3 { font-size: 16px; margin: 8px 0 0; font-weight: 800; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.compte { color: var(--doux); font-weight: 600; font-size: 0.75em; }
.vide { color: var(--doux); padding: 40px 0; text-align: center; font-size: 16px; }
.aide { color: var(--doux); font-size: 13px; line-height: 1.55; margin: 0; }
.meta { color: var(--doux); font-size: 13px; font-weight: 500; }
.discret { color: var(--doux); font-size: 12px; }
.sous { margin: 6px 0 0; color: var(--doux); }
.tete { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }

/* ---------- grands bandeaux (hero) ---------- */
.hero { border-radius: 32px; padding: 36px 40px; display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: flex-end; justify-content: space-between; }
.hero.violet { background: var(--violet); color: #FFFFFF; }
.hero.orange { background: var(--orange); color: var(--encre); }
.hero-texte { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.hero p { margin: 0; }
.fort { font-weight: 700; font-size: 16px; }
.doux-clair { color: var(--lavande-clair); max-width: 60ch; font-size: 15px; }
.enorme { font-size: clamp(40px, 7vw, 72px); line-height: 0.95; letter-spacing: -0.04em; }
.geant { font-size: clamp(72px, 12vw, 136px); line-height: 0.85; font-weight: 800; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.reste { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.chiffre { font-size: clamp(56px, 9vw, 112px); line-height: 0.85; font-weight: 800; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.accueil-public { align-items: center; }

/* ---------- réseaux ---------- */
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex: 0 0 auto; }
.dot.r-TikTok { background: var(--encre); }
.dot.r-Instagram { background: #D62976; }
.dot.r-Facebook { background: #1877F2; }
.dot.r-YouTube { background: #FF0000; }
.reseau { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.reseau.r-TikTok { background: var(--encre); color: #FFFFFF; }
.reseau.r-Instagram { background: #FFE1EC; color: #8A1D50; }
.reseau.r-Facebook { background: #DCE8FD; color: #1450A8; }
.reseau.r-YouTube { background: #FFE0DE; color: #A3171A; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--fond); font-size: 12px; font-weight: 600; color: #3B3563; white-space: nowrap; }

.moment { font-weight: 800; font-variant-numeric: tabular-nums; }
.statut { font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.s-a-faire.statut { background: var(--orange-pale); color: #7A2F05; }
.s-manque.statut { background: var(--trait); color: var(--doux2); }
.s-prevu.statut { color: var(--doux); }
.s-libre.statut { background: var(--lavande); color: var(--violet-fonce); }
tr.s-manque td, tr.s-prevu td { color: var(--doux); }

/* ---------- À relever ---------- */
.groupe { display: flex; flex-direction: column; gap: 12px; }
.titre-reseau { font-size: 28px; }
.carte { background: var(--carte); border-radius: 28px; padding: 24px 28px; display: flex; flex-direction: column; gap: 18px; }
.entete { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; }
.pile { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ttl { font-size: 17px; font-weight: 800; color: var(--encre); }
.echeance { display: flex; align-items: center; gap: 12px; }
.reste-court { font-size: 14px; font-weight: 800; color: var(--orange-texte); }
.when { display: inline-flex; align-items: center; justify-content: center; min-width: 72px; height: 44px; padding: 0 14px; border-radius: 14px; background: var(--encre); color: #FFFFFF; font-size: 22px; font-weight: 800; }
form.releve .champs { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
form.releve label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 700; color: var(--doux); flex: 1 1 104px; min-width: 0; }
form.releve input {
  font-family: 'Bricolage Grotesque', system-ui, sans-serif; font-variant-numeric: tabular-nums; font-size: 20px; font-weight: 700;
  min-height: 52px; border-radius: 14px; background: #F9F8FF; width: 100%; text-align: right;
}
form.releve input:focus { background: #FFFFFF; }
form.releve input[type='datetime-local'] { font-size: 15px; text-align: left; }
form.releve label:has(input[type='datetime-local']) { flex: 0 0 210px; }
form.releve label.large { flex: 3 1 220px; }
form.releve label.large input { font-family: inherit; font-size: 15px; font-weight: 500; text-align: left; }
.actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.actions .aide { margin-right: auto; }
.ensuite { background: var(--lavande); border-radius: 28px; padding: 24px 28px; display: flex; flex-direction: column; gap: 12px; }
.ensuite h2 { font-size: 16px; }
ul.bientot { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }

/* ---------- Posts ---------- */
.liste { background: var(--carte); border-radius: 28px; overflow: hidden; padding: 6px 0; }
.post + .post { border-top: 1px solid var(--trait); }
.post .ligne {
  display: grid; grid-template-columns: 120px minmax(200px, 1fr) 190px minmax(0, 520px); gap: 14px; align-items: center;
  width: 100%; border: 0; border-radius: 0; padding: 14px 24px; background: none; text-align: left; font-weight: 500;
}
.post .ligne:hover, .post.ouvert .ligne { background: #F9F8FF; }
.post .quand { color: var(--doux); font-size: 13px; font-variant-numeric: tabular-nums; }
.post .titre { font-weight: 800; }
.pubs { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.pub { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; }
.pastille {
  display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%;
  font-size: 10px; font-weight: 800; background: var(--trait); color: var(--doux);
}
.pastille.s-fait { background: #0B9A6D; color: #FFFFFF; }
.pastille.s-a-faire { background: var(--orange); color: var(--encre); }
.pastille.s-manque { background: var(--trait); color: #B5B0CF; text-decoration: line-through; }
.pastille.s-prevu { background: #FFFFFF; border: 2px dashed #C9BFFF; }

.fiche { padding: 8px 24px 24px; background: #F9F8FF; display: flex; flex-direction: column; gap: 8px; }
.fiche form.infos { border-bottom: 1px solid var(--trait2); padding-bottom: 16px; }
.grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.fiche label, dialog label, .panneau label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 700; color: var(--doux); margin-top: 10px; }
.publication { margin-top: 18px; background: var(--carte); border-radius: 20px; padding: 18px 20px; }
span.outils { display: inline-flex; gap: 6px; margin-left: auto; }
.outils { white-space: nowrap; }
.outils button { padding: 2px 12px; min-height: 30px; font-size: 12px; }
.publication form.releve { background: #FFFFFF; border: 2px solid var(--violet); border-radius: 20px; padding: 16px; margin-top: 10px; }
.ajout-reseau { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* ---------- tableaux ---------- */
.defile { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; background: var(--carte); font-size: 14px; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--trait); text-align: left; vertical-align: middle; }
th { font-size: 12px; color: var(--doux); font-weight: 800; white-space: nowrap; border-bottom: 2px solid var(--trait); }
td.n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
td.notes { color: var(--doux); max-width: 260px; }
table.comparer { border-radius: 28px; overflow: hidden; }
table.comparer td { white-space: nowrap; }
table.comparer td:nth-child(3) { white-space: normal; min-width: 220px; }

/* ---------- dialogue, message ---------- */
dialog { border: 0; border-radius: 28px; padding: 28px 32px; width: min(600px, 95vw); box-shadow: 0 20px 60px #1A144640; color: var(--encre); }
dialog::backdrop { background: #1A144666; }
dialog h2 { margin: 0 0 8px; font-size: 26px; }
fieldset { border: 2px solid var(--trait2); border-radius: 16px; margin: 12px 0 0; padding: 10px 14px; }
legend { font-size: 12px; font-weight: 700; color: var(--doux); padding: 0 6px; }
.cases { display: flex; flex-wrap: wrap; gap: 16px; }
label.case { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; margin: 0; color: var(--encre); font-size: 14px; font-weight: 600; }
label.case input { min-height: 0; }
#message {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 30;
  background: var(--encre); color: #FFFFFF; padding: 12px 20px; border-radius: 999px; font-weight: 700; transition: 0.2s;
}
#message.visible { opacity: 1; transform: translate(-50%, 0); }
#message.erreur { background: var(--rouge); }

/* ---------- tableau de bord ---------- */
.tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.tuile { border-radius: 24px; padding: 24px 26px; display: flex; flex-direction: column; gap: 8px; background: var(--carte); }
.tuile:nth-child(6n + 1) { background: #FFE1EC; }
.tuile:nth-child(6n + 2) { background: var(--vert-pale); }
.tuile:nth-child(6n + 3) { background: #FFE8D6; }
.tuile:nth-child(6n + 4) { background: var(--lavande); }
.t-label { font-size: 15px; font-weight: 700; }
.t-valeur { font-family: 'Bricolage Grotesque', system-ui, sans-serif; font-size: 56px; line-height: 0.95; font-weight: 800; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.t-detail { font-size: 14px; line-height: 1.45; color: var(--doux2); }
.meilleur { margin: 0; font-size: 15px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: var(--carte); border-radius: 20px; padding: 16px 22px; }
.graphe { background: var(--carte); border-radius: 28px; padding: 26px 28px; display: flex; flex-direction: column; gap: 6px; }
.graphe header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
.graphe h2 { font-family: 'Bricolage Grotesque', system-ui, sans-serif; font-size: 24px; letter-spacing: -0.02em; }
.graphe .aide { margin: 4px 0 10px; }
.reglages { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 6px; }
.reglages label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--doux); }
.svg { max-width: 100%; height: auto; display: block; overflow: visible; }
.svg text { font: 600 12px Manrope, system-ui, sans-serif; fill: var(--doux); }
.svg text.etiquette { fill: var(--encre); font-weight: 800; }
.svg text.nom { fill: var(--encre); font-weight: 700; }
.svg text.titre-bloc { fill: var(--encre); font-weight: 800; font-size: 14px; }
.svg tspan.discret { fill: var(--doux); font-weight: 500; }
.courbe .zone { fill: none; stroke: transparent; stroke-width: 12; }
.courbe .trait { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; opacity: 0.7; }
.courbe:hover .trait { stroke-width: 4; opacity: 1; }
.legende { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.legende .pl { width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px; }
.petits { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px 28px; }
.petit-titre { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; }
#bulle {
  position: fixed; left: 0; top: 0; z-index: 20; pointer-events: none; opacity: 0; transition: opacity 0.1s;
  max-width: 320px; padding: 8px 12px; border-radius: 12px; background: var(--encre); color: #FFFFFF;
  font-size: 13px; font-weight: 600; white-space: pre-line;
}

/* ---------- connexion et compte ---------- */
.deux { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.panneau { background: var(--carte); border-radius: 28px; padding: 26px 28px; display: flex; flex-direction: column; gap: 10px; }
.panneau .btn { margin-top: 10px; align-self: flex-start; }
.danger-zone { border: 2px solid #F3C5C8; }
.apps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.apps li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 0; border-bottom: 1px solid var(--trait); }
.nom-app { font-weight: 800; margin-right: auto; }
.en-ligne { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.en-ligne input { flex: 1 1 200px; }
.en-ligne .btn { margin-top: 0; }

/* ---------- pied de page et pages de texte ---------- */
.pied {
  max-width: 1200px; width: 100%; margin: 0 auto; padding: 24px 32px 40px;
  display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 13px; color: var(--doux);
}
.pied span { margin-left: auto; }
.texte { max-width: 760px; background: var(--carte); border-radius: 28px; padding: 36px 40px; line-height: 1.65; }
.texte h1 { font-size: 40px; margin-bottom: 8px; }
.texte h2 { font-size: 20px; margin-top: 28px; }
.texte p, .texte li { color: #3B3563; }

@media (max-width: 800px) {
  main, .filtres, .barre-dedans, .pied { padding-left: 16px; padding-right: 16px; }
  .post .ligne { grid-template-columns: 1fr; gap: 4px; }
  .hero { padding: 28px 24px; border-radius: 24px; }
  .reste { align-items: flex-start; text-align: left; }
  #nouveau { margin-left: 0; }
  .texte { padding: 24px; }
}
.cle { font-family: ui-monospace, monospace; font-size: 13px; width: 100%; }
