/* Ludél'IA Social — styles (DA Ludél'IA v1, registre « room Parent », façon Instagram) */
:root {
  --bleu-nuit: #0B1559;
  --bleu-profond: #163A94;
  --cyan-ia: #00D5FF;
  --azur: #0094FF;
  --azur-fonce: #0074DB;
  --jaune: #FFD21F;
  --orange: #FF6B0A;
  --creme: #FFFBF5;
  --perle: #F8FAFF;
  --blanc: #FFFFFF;
  --texte: #0B1559;
  --texte-doux: #4A5578;
  --bordure: #D9DFEA;
  --fond: #EEF6FF;
  --fond-parent: #F4F6FB;
  --succes: #1F9D55;
  --succes-fonce: #008641;
  --erreur: #D83926;
  --violet: #8B3FD1;

  --st-a_suivre: #B9C9E6;
  --st-a_contacter: #8E97B3;
  --st-contactee: #0094FF;
  --st-a_repondu: #FFD21F;
  --st-en_cours_inscription: #8B3FD1;
  --st-partenaire: #1F9D55;
  --st-pas_interessee: #E4604F;
  --st-archivee: #C3C9D8;

  --r-s: 8px; --r-m: 16px; --r-l: 24px; --r-xl: 32px;
  --ombre: 0 8px 24px rgba(11, 21, 89, .10);
  --ombre-forte: 0 18px 48px rgba(11, 21, 89, .22);
  --soulignement: linear-gradient(90deg, #FFD21F, #FF6B0A);
  --f-titre: "Baloo 2", "Nunito", system-ui, sans-serif;
  --f-ui: "Nunito", system-ui, sans-serif;
  --barre: 68px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--f-ui);
  font-size: 16px;
  line-height: 1.5;
  color: var(--texte);
  background: var(--fond);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--azur-fonce); }
:focus-visible { outline: 3px solid var(--azur-fonce); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
svg.i.s { width: 18px; height: 18px; }
svg.i.l { width: 28px; height: 28px; }
.muted { color: var(--texte-doux); }
.petit { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--texte-doux); }
.mini { font-size: 12px; line-height: 16px; font-weight: 800; letter-spacing: .02em; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: var(--r-m);
  border: 1.5px solid var(--bleu-nuit); background: var(--blanc); color: var(--bleu-nuit);
  font-weight: 800; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { background: var(--perle); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.primaire { background: var(--bleu-nuit); color: var(--blanc); }
.btn.primaire:hover { background: var(--bleu-profond); }
.btn.jaune { background: var(--jaune); border-color: var(--bleu-nuit); color: var(--bleu-nuit); box-shadow: 0 4px 0 var(--bleu-nuit); }
.btn.jaune:hover { background: #FFDA45; }
.btn.jaune:active { box-shadow: 0 1px 0 var(--bleu-nuit); transform: translateY(3px); }
.btn.fantome { border-color: transparent; background: transparent; }
.btn.fantome:hover { background: rgba(11, 21, 89, .06); }
.btn.danger { border-color: var(--erreur); color: var(--erreur); }
.btn.petit { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 12px; }
.btn.grand { min-height: 56px; padding: 0 26px; font-size: 18px; border-radius: 18px; }
.btn.rond { width: 44px; padding: 0; border-radius: 999px; }
.btn.bloc { width: 100%; }
.btn.ok { background: var(--succes); border-color: var(--succes); color: var(--blanc); }

/* ---------- Champs ---------- */
.champ { display: flex; flex-direction: column; gap: 6px; }
.champ > span { font-size: 14px; font-weight: 700; color: var(--texte-doux); }
.input, .champ input, .champ select, .champ textarea {
  width: 100%; min-height: 44px; padding: 10px 14px; border: 1.5px solid var(--bordure);
  border-radius: 12px; background: var(--blanc); outline: none; transition: border-color .15s;
}
.champ textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.input:focus, .champ input:focus, .champ select:focus, .champ textarea:focus { border-color: var(--azur-fonce); box-shadow: 0 0 0 3px rgba(0, 116, 219, .15); }
.grille-champs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.grille-champs .large { grid-column: 1 / -1; }

/* ---------- Connexion ---------- */
.connexion {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: linear-gradient(180deg, rgba(238, 246, 255, .55), rgba(238, 246, 255, .92)), url("assets/futuria.webp") center/cover no-repeat;
}
.carte-connexion {
  width: min(420px, 100%); background: rgba(255, 255, 255, .96); border-radius: var(--r-xl);
  padding: 36px 32px 30px; box-shadow: var(--ombre-forte); text-align: center;
}
.carte-connexion img.logo { width: 190px; height: auto; display: block; margin: -4px auto 6px; }
.marque-social { font-family: var(--f-titre); font-weight: 800; font-size: 22px; line-height: 1; letter-spacing: .02em; display: inline-block; position: relative; padding-bottom: 6px; }
.marque-social::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; border-radius: 4px; background: var(--soulignement); }
.carte-connexion p.accroche { margin: 14px 0 22px; color: var(--texte-doux); font-weight: 600; }
.carte-connexion form { display: grid; gap: 14px; text-align: left; }
.erreur-form { color: var(--erreur); font-weight: 700; font-size: 14px; min-height: 20px; }

/* ---------- Barre du haut ---------- */
.barre {
  position: sticky; top: 0; z-index: 30; height: var(--barre);
  background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--bordure);
}
.barre-int { max-width: 1240px; margin: 0 auto; height: 100%; padding: 0 24px; display: flex; align-items: center; gap: 20px; }
.barre .marque { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; flex: none; }
.barre .marque img { height: 52px; width: auto; }
.barre .marque .marque-social { font-size: 20px; }
.nav { display: flex; gap: 4px; margin: 0 auto; }
.nav button {
  display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border-radius: 12px;
  border: 0; background: transparent; cursor: pointer; font-weight: 800; color: var(--texte-doux); position: relative;
}
.nav button:hover { background: var(--fond-parent); color: var(--bleu-nuit); }
.nav button.actif { color: var(--bleu-nuit); }
.nav button.actif::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -12px; height: 4px; border-radius: 4px; background: var(--soulignement); }
.nav .badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--jaune); color: var(--bleu-nuit); font-size: 12px; font-weight: 800; display: inline-grid; place-items: center; }
.barre-droite { display: flex; align-items: center; gap: 10px; flex: none; }
.flamme-chip { display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 12px 0 8px; border-radius: 999px; background: var(--creme); border: 1.5px solid #FFE3B8; font-weight: 800; }
.flamme-chip.eteinte { filter: grayscale(1); opacity: .6; }
.avatar-moi { width: 42px; height: 42px; border-radius: 999px; border: 0; cursor: pointer; background: var(--bleu-nuit); color: var(--blanc); font-weight: 800; font-family: var(--f-titre); font-size: 18px; box-shadow: 0 0 0 2px var(--blanc), 0 0 0 4px var(--jaune); }
.menu-flottant { position: absolute; right: 24px; top: calc(var(--barre) - 6px); background: var(--blanc); border-radius: var(--r-m); box-shadow: var(--ombre-forte); padding: 8px; min-width: 230px; z-index: 40; border: 1px solid var(--bordure); }
.menu-flottant .tete { padding: 10px 12px 12px; border-bottom: 1px solid var(--bordure); margin-bottom: 6px; }
.menu-flottant button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border: 0; background: none; border-radius: 10px; cursor: pointer; font-weight: 700; text-align: left; }
.menu-flottant button:hover { background: var(--fond-parent); }

/* ---------- Page ---------- */
.page { max-width: 1240px; margin: 0 auto; padding: 28px 24px 80px; }
.titre-page { font-family: var(--f-titre); font-weight: 800; font-size: 32px; line-height: 1.1; margin: 0; }
.entete-page { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.carte { background: var(--blanc); border-radius: var(--r-l); box-shadow: var(--ombre); }
.carte.pad { padding: 22px 24px; }
.carte h3, .titre-carte { font-family: var(--f-ui); font-size: 18px; font-weight: 800; margin: 0; line-height: 26px; }
.tete-carte { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px 8px; }
.tete-carte .compte { color: var(--texte-doux); font-weight: 700; }
.vide { padding: 22px; color: var(--texte-doux); font-weight: 600; text-align: center; }
.vide img { width: 96px; display: block; margin: 0 auto 8px; opacity: .95; }

.accueil { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.colonne { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; min-width: 0; }
.accueil > *, .heros > * { min-width: 0; }
.colonne-droite { position: sticky; top: calc(var(--barre) + 24px); display: grid; gap: 18px; }

/* ---------- Stories (vagues) ---------- */
.stories { display: flex; gap: 18px; overflow-x: auto; padding: 18px 22px 16px; scrollbar-width: thin; }
.story { flex: none; width: 84px; display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: none; cursor: pointer; padding: 0; }
.story .anneau { width: 76px; height: 76px; border-radius: 999px; padding: 3.5px; display: grid; place-items: center; transition: transform .15s; }
.story:hover .anneau { transform: scale(1.04); }
.story .rond { width: 100%; height: 100%; border-radius: 999px; background: var(--blanc); padding: 3px; }
.story .coeur { width: 100%; height: 100%; border-radius: 999px; display: grid; place-items: center; background: var(--bleu-nuit); color: var(--blanc); font-family: var(--f-titre); font-weight: 800; font-size: 20px; line-height: 1; }
.story .coeur small { display: block; font-size: 11px; font-family: var(--f-ui); font-weight: 800; opacity: .85; margin-top: 2px; }
.story.terminee .coeur { background: #9AA3BC; }
.story .nom { font-size: 13px; font-weight: 700; max-width: 84px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--texte); }
.story.nouvelle .anneau { border: 2px dashed var(--bleu-nuit); padding: 4px; }
.story.nouvelle .coeur { background: var(--fond); color: var(--bleu-nuit); }

/* ---------- Héros du jour ---------- */
.heros { padding: 26px 26px 24px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 28px; align-items: center; background: var(--blanc); position: relative; overflow: hidden; }
.heros::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--soulignement); }
.heros h2 { font-family: var(--f-titre); font-weight: 800; font-size: 30px; line-height: 1.1; margin: 0 0 4px; }
.jauges { display: grid; gap: 12px; margin-top: 16px; }
.jauge .lib { display: flex; justify-content: space-between; font-weight: 700; font-size: 14px; color: var(--texte-doux); margin-bottom: 6px; }
.jauge .lib b { color: var(--texte); }
.barre-prog { height: 12px; border-radius: 999px; background: var(--fond-parent); overflow: hidden; }
.barre-prog > i { display: block; height: 100%; border-radius: 999px; background: var(--soulignement); transition: width .5s ease; }
.barre-prog.bleue > i { background: linear-gradient(90deg, var(--azur), var(--bleu-profond)); }
.anneau-jour { width: 132px; height: 132px; border-radius: 999px; display: grid; place-items: center; }
.anneau-jour .int { width: 108px; height: 108px; border-radius: 999px; background: var(--blanc); display: grid; place-items: center; text-align: center; }
.anneau-jour b { font-family: var(--f-titre); font-size: 34px; line-height: 1; display: block; }
.anneau-jour span { font-size: 12px; font-weight: 800; color: var(--texte-doux); }
.actions-heros { grid-column: 1 / -1; display: flex; gap: 12px; flex-wrap: wrap; }
.alerte { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: #FFF4CC; border: 1.5px solid #F5D667; font-weight: 700; font-size: 14px; }
.alerte.info { background: #E5F3FF; border-color: #9FD1FF; }

/* ---------- Lignes APE ---------- */
.liste { list-style: none; margin: 0; padding: 6px 10px 12px; }
.ligne { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 16px; cursor: pointer; }
.ligne:hover { background: var(--fond-parent); }
.ligne .txt { min-width: 0; flex: 1; }
.ligne .t1 { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ligne .t2 { font-size: 14px; color: var(--texte-doux); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ligne .fin { display: flex; align-items: center; gap: 10px; flex: none; }

.av { --c: var(--st-a_contacter); width: 48px; height: 48px; border-radius: 999px; padding: 2.5px; background: var(--c); flex: none; }
.av > span { width: 100%; height: 100%; border-radius: 999px; background: var(--blanc); padding: 2px; display: block; }
.av > span > b { width: 100%; height: 100%; border-radius: 999px; display: grid; place-items: center; background: var(--fond); color: var(--bleu-nuit); font-family: var(--f-titre); font-weight: 800; font-size: 16px; letter-spacing: .02em; }
.av.l { width: 72px; height: 72px; padding: 3.5px; }
.av.l > span > b { font-size: 24px; }
.av.xl { width: 96px; height: 96px; padding: 4px; }
.av.xl > span { padding: 3px; }
.av.xl > span > b { font-size: 32px; }

.pill { --c: var(--st-a_contacter); display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; font-size: 13px; font-weight: 800; white-space: nowrap; background: color-mix(in srgb, var(--c) 16%, white); color: color-mix(in srgb, var(--c) 55%, var(--bleu-nuit)); }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--c); }
.pill.st-a_repondu { color: var(--bleu-nuit); background: #FFF3C2; }

.tag { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 8px; background: var(--fond-parent); color: var(--texte-doux); font-size: 12px; font-weight: 800; }

/* ---------- Fil d'activité ---------- */
.fil { list-style: none; margin: 0; padding: 4px 22px 18px; display: grid; gap: 12px; }
.fil li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; }
.fil .ico { width: 34px; height: 34px; border-radius: 999px; display: grid; place-items: center; background: var(--fond-parent); flex: none; }
.fil .quand { font-size: 13px; color: var(--texte-doux); font-weight: 600; }

/* ---------- Colonne droite ---------- */
.profil-mini { display: flex; align-items: center; gap: 14px; padding: 18px 20px; }
.profil-mini .nom { font-weight: 800; font-size: 17px; }
.chiffres { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; padding: 4px 12px 18px; }
.chiffres b { display: block; font-family: var(--f-titre); font-size: 26px; line-height: 1.1; }
.chiffres span { font-size: 12px; font-weight: 800; color: var(--texte-doux); }
.entonnoir { padding: 6px 20px 20px; display: grid; gap: 10px; }
.entonnoir .et { display: grid; grid-template-columns: 120px 1fr 36px; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; }
.entonnoir .et .barre-prog { height: 10px; }
.entonnoir .et b { text-align: right; }

/* ---------- Page APE ---------- */
.outils { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.recherche { position: relative; flex: 1 1 260px; max-width: 420px; }
.recherche svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--texte-doux); }
.recherche input { width: 100%; height: 46px; padding: 0 16px 0 44px; border-radius: 999px; border: 1.5px solid var(--bordure); background: var(--blanc); outline: none; }
.recherche input:focus { border-color: var(--azur-fonce); }
.select-pilule { height: 46px; border-radius: 999px; border: 1.5px solid var(--bordure); background: var(--blanc); padding: 0 36px 0 16px; font-weight: 700; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%230B1559' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; cursor: pointer; }
.puces { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.puce { height: 38px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--bordure); background: var(--blanc); font-weight: 800; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.puce .n { color: var(--texte-doux); font-weight: 700; }
.puce.actif { background: var(--bleu-nuit); border-color: var(--bleu-nuit); color: var(--blanc); }
.puce.actif .n { color: rgba(255, 255, 255, .75); }
.tableau-ape .ligne { padding: 12px 14px; }
.tableau-ape .col-statut { width: 190px; display: flex; justify-content: flex-start; }
.tableau-ape .col-date { width: 200px; text-align: right; font-size: 14px; font-weight: 700; color: var(--texte-doux); white-space: nowrap; }
.pagination { display: flex; justify-content: center; padding: 6px 0 16px; }

/* ---------- Tiroir (fiche APE) ---------- */
.voile { position: fixed; inset: 0; background: rgba(11, 21, 89, .35); z-index: 50; animation: fondu .15s ease; }
.tiroir { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100%); background: var(--blanc); z-index: 51; box-shadow: var(--ombre-forte); display: flex; flex-direction: column; animation: glisse .22s ease; }
.tiroir .haut { padding: 18px 20px 0; display: flex; justify-content: space-between; align-items: center; }
.tiroir .corps { padding: 6px 24px 30px; overflow-y: auto; flex: 1; }
.fiche-tete { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 4px 0 18px; }
.fiche-tete h2 { font-family: var(--f-titre); font-size: 26px; line-height: 1.15; margin: 4px 0 0; }
.fiche-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.section { border-top: 1px solid var(--bordure); padding: 18px 0; }
.section > h4 { margin: 0 0 12px; font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.timeline li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; font-size: 14px; }
.timeline .pt { width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center; background: var(--fond-parent); }
.code-suivi { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--fond-parent); font-size: 14px; font-weight: 700; word-break: break-all; }

/* ---------- Fenêtre ---------- */
.fenetre { position: fixed; z-index: 52; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(620px, calc(100% - 32px)); max-height: calc(100vh - 48px); overflow-y: auto; background: var(--blanc); border-radius: var(--r-l); box-shadow: var(--ombre-forte); animation: monte .2s ease; }
.fenetre.large { width: min(860px, calc(100% - 32px)); }
.fenetre .tete { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px 6px; }
.fenetre .tete h2 { font-family: var(--f-titre); font-weight: 800; font-size: 26px; margin: 0; line-height: 1.15; }
.fenetre .contenu { padding: 10px 24px 24px; display: grid; gap: 16px; }
.fenetre .pied { display: flex; justify-content: flex-end; gap: 10px; padding: 0 24px 24px; flex-wrap: wrap; }

/* ---------- Mode rafale (stories) ---------- */
.rafale { position: fixed; inset: 0; z-index: 60; background: radial-gradient(circle at 50% 30%, #1B2A7A, #050E2A 75%); display: grid; place-items: center; animation: fondu .2s ease; }
.rafale .fermer { position: absolute; top: 18px; right: 18px; color: var(--blanc); background: rgba(255, 255, 255, .12); border: 0; }
.rafale .fermer:hover { background: rgba(255, 255, 255, .22); }
.rafale .nav-fleche { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .14); color: var(--blanc); display: grid; place-items: center; cursor: pointer; }
.rafale .nav-fleche:hover { background: rgba(255, 255, 255, .26); }
.rafale .nav-fleche.g { left: max(16px, calc(50% - 360px)); }
.rafale .nav-fleche.d { right: max(16px, calc(50% - 360px)); }
.rafale .nav-fleche[disabled] { opacity: .25; cursor: default; }
.story-carte { width: min(540px, calc(100vw - 150px)); height: min(860px, calc(100vh - 40px)); background: var(--blanc); border-radius: 28px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); animation: monte .22s ease; }
.segments { display: flex; gap: 3px; padding: 12px 14px 0; }
.segments i { flex: 1; height: 4px; border-radius: 4px; background: var(--fond-parent); }
.segments i.fait { background: var(--bleu-nuit); }
.segments i.passe { background: #B8C0D6; }
.segments i.cours { background: var(--soulignement); }
.story-tete { display: flex; align-items: center; gap: 12px; padding: 12px 18px 10px; }
.story-tete .t1 { font-weight: 800; font-size: 17px; line-height: 1.2; }
.story-tete .t2 { font-size: 13px; color: var(--texte-doux); font-weight: 700; }
.story-corps { flex: 1; overflow-y: auto; padding: 4px 18px 12px; display: flex; flex-direction: column; gap: 14px; }
.story-champs { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; }
.story-champs .large { grid-column: 1 / -1; }
.story-champs input { width: 100%; height: 40px; padding: 0 12px; border-radius: 10px; border: 1.5px solid var(--bordure); background: var(--perle); font-weight: 700; outline: none; }
.story-champs input:focus { border-color: var(--azur-fonce); background: var(--blanc); }
.story-champs input::placeholder { font-weight: 600; color: #8E97B3; }
.canaux { display: flex; gap: 6px; background: var(--fond-parent); padding: 4px; border-radius: 14px; }
.canaux button { flex: 1; height: 38px; border: 0; border-radius: 11px; background: none; font-weight: 800; font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--texte-doux); }
.canaux button.actif { background: var(--blanc); color: var(--bleu-nuit); box-shadow: 0 2px 8px rgba(11, 21, 89, .12); }
.bulle-message { position: relative; flex: 1; display: flex; min-height: 220px; margin-top: 8px; }
.bulle-message textarea { width: 100%; flex: 1; min-height: 200px; border-radius: 18px; border: 1.5px solid var(--bordure); padding: 14px 16px; background: var(--perle); line-height: 1.5; resize: vertical; outline: none; font-size: 15px; }
.bulle-message textarea:focus { border-color: var(--azur-fonce); background: var(--blanc); }
.bulle-message .info-var { position: absolute; top: -10px; right: 14px; }
.objet { display: flex; gap: 8px; align-items: center; }
.objet input { flex: 1; height: 40px; border-radius: 10px; border: 1.5px solid var(--bordure); padding: 0 12px; font-weight: 700; background: var(--perle); }
.story-pied { padding: 12px 18px 18px; border-top: 1px solid var(--bordure); display: grid; gap: 10px; }
.story-pied .rang { display: flex; gap: 10px; }
.story-pied .rang > * { flex: 1; }
.raccourcis { text-align: center; font-size: 12px; color: var(--texte-doux); font-weight: 700; }
.raccourcis kbd { font-family: var(--f-ui); background: var(--fond-parent); border: 1px solid var(--bordure); border-bottom-width: 2px; border-radius: 6px; padding: 0 6px; font-size: 11px; }
.fin-rafale { flex: 1; display: grid; place-items: center; text-align: center; padding: 30px; gap: 8px; }
.fin-rafale h2 { font-family: var(--f-titre); font-size: 34px; margin: 0; line-height: 1.1; }
.gros-chiffre { font-family: var(--f-titre); font-weight: 800; font-size: 72px; line-height: 1; background: var(--soulignement); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Messages types ---------- */
.onglets { display: inline-flex; gap: 4px; background: var(--blanc); padding: 5px; border-radius: 16px; box-shadow: var(--ombre); margin-bottom: 22px; }
.onglets button { height: 42px; padding: 0 18px; border: 0; border-radius: 12px; background: none; font-weight: 800; cursor: pointer; display: flex; align-items: center; gap: 8px; color: var(--texte-doux); }
.onglets button.actif { background: var(--bleu-nuit); color: var(--blanc); }
.etape { margin-bottom: 28px; }
.etape > h3 { font-family: var(--f-titre); font-size: 22px; font-weight: 700; margin: 0 0 4px; }
.etape > p { margin: 0 0 14px; }
.variantes { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.carte-msg { display: flex; flex-direction: column; overflow: hidden; }
.carte-msg .entete { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; }
.lettre { width: 36px; height: 36px; border-radius: 999px; background: var(--bleu-nuit); color: var(--blanc); display: grid; place-items: center; font-family: var(--f-titre); font-weight: 800; font-size: 18px; flex: none; }
.carte-msg .apercu { margin: 0 16px; padding: 14px 16px; background: var(--fond); border-radius: 18px 18px 18px 6px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; max-height: 260px; overflow-y: auto; }
.carte-msg .apercu mark { background: #FFF1B8; color: inherit; border-radius: 4px; padding: 0 2px; }
.carte-msg .stats-msg { display: flex; gap: 16px; padding: 12px 16px 14px; font-size: 13px; font-weight: 700; color: var(--texte-doux); align-items: center; }
.carte-msg .stats-msg b { color: var(--texte); font-size: 15px; }
.carte-msg.inactive { opacity: .55; }
.carte-ajout { border: 2px dashed var(--bordure); background: transparent; box-shadow: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 200px; cursor: pointer; font-weight: 800; color: var(--texte-doux); border-radius: var(--r-l); }
.carte-ajout:hover { border-color: var(--bleu-nuit); color: var(--bleu-nuit); }
.vars { display: flex; flex-wrap: wrap; gap: 6px; }
.vars button { height: 30px; padding: 0 10px; border-radius: 8px; border: 1.5px solid var(--bordure); background: var(--perle); font-weight: 800; font-size: 13px; cursor: pointer; }
.vars button:hover { border-color: var(--azur-fonce); }

/* ---------- Vitrine ---------- */
.profil-page { max-width: 935px; margin-left: auto; margin-right: auto; display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; padding: 26px 28px; margin-bottom: 22px; }
.profil-page .av-page { width: 120px; height: 120px; border-radius: 999px; padding: 4px; background: var(--soulignement); }
.profil-page .av-page img { width: 100%; height: 100%; border-radius: 999px; object-fit: contain; background: var(--blanc); padding: 10px; border: 3px solid var(--blanc); }
.profil-page h2 { font-family: var(--f-titre); font-size: 28px; margin: 0; }
.grille-posts { max-width: 935px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.grille-posts > div { aspect-ratio: 1; background: var(--blanc); border-radius: 10px; display: grid; place-items: center; color: #B8C0D6; box-shadow: inset 0 0 0 1.5px var(--bordure); }

/* ---------- Stats ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.kpi { padding: 18px 20px; }
.kpi span { font-size: 13px; font-weight: 800; color: var(--texte-doux); }
.kpi b { display: block; font-family: var(--f-titre); font-size: 36px; line-height: 1.1; margin-top: 4px; }
.kpi small { font-weight: 700; color: var(--texte-doux); }

/* ---------- Réglages ---------- */
.equipe { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.equipe li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--fond-parent); }
.equipe .av { width: 40px; height: 40px; }

/* ---------- Toasts ---------- */
#toast-root { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; justify-items: center; }
.toast { background: var(--bleu-nuit); color: var(--blanc); padding: 12px 18px; border-radius: 14px; font-weight: 700; box-shadow: var(--ombre-forte); display: flex; align-items: center; gap: 10px; animation: monte .2s ease; }
.toast.erreur { background: var(--erreur); }
.toast.ok svg { color: #7CE3A4; }

.chargement { min-height: 70vh; display: grid; place-items: center; }
.loader { width: 44px; height: 44px; border-radius: 999px; border: 4px solid var(--bordure); border-top-color: var(--bleu-nuit); animation: tourne .8s linear infinite; }

@keyframes fondu { from { opacity: 0; } to { opacity: 1; } }
@keyframes glisse { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes monte { from { transform: translate(var(--tx, 0), calc(var(--ty, 0px) + 14px)); opacity: 0; } to { transform: translate(var(--tx, 0), var(--ty, 0)); opacity: 1; } }
.fenetre { --tx: -50%; --ty: -50%; }
@keyframes tourne { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Petits écrans ---------- */
@media (max-width: 1080px) {
  .accueil { grid-template-columns: 1fr; }
  .colonne-droite { position: static; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
  .nav button .lib { display: none; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .barre { backdrop-filter: none; background: var(--blanc); }
  .barre-int { padding: 0 14px; gap: 8px; justify-content: space-between; }
  .nav { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; z-index: 35; background: rgba(255,255,255,.97); border-top: 1px solid var(--bordure); justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .nav button { padding: 0 12px; height: 46px; }
  .nav button.actif::after { bottom: auto; top: -7px; }
  .nav .badge { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; font-size: 11px; }
  .page { padding-bottom: 110px; }
  .menu-flottant { right: 12px; }
  .actions-heros .btn { flex: 1 1 140px; }
  .page { padding: 18px 14px 80px; }
  .heros { grid-template-columns: 1fr; }
  .anneau-jour { display: none; }
  .tableau-ape .col-date, .tableau-ape .col-statut { display: none; }
  .story-carte { width: 100vw; height: 100vh; border-radius: 0; }
  .rafale .nav-fleche { display: none; }
  .grille-champs { grid-template-columns: 1fr; }
  .profil-page { grid-template-columns: 1fr; text-align: center; justify-items: center; }
}

/* ======================================================================= v2 */
/* Plan du jour */
.plan { list-style: none; margin: 0; padding: 4px 22px 16px; display: grid; gap: 10px; }
.plan li { display: flex; gap: 12px; align-items: flex-start; }
.plan .num { width: 30px; height: 30px; border-radius: 999px; background: var(--fond); color: var(--bleu-nuit); display: grid; place-items: center; font-family: var(--f-titre); font-weight: 800; flex: none; }
.plan li.fait .num { background: var(--succes); color: var(--blanc); }
.plan li.fait b { text-decoration: line-through; text-decoration-color: rgba(11, 21, 89, .35); }

/* Comptes d'envoi */
.comptes { list-style: none; margin: 0; padding: 4px 20px 18px; display: grid; gap: 12px; }
.comptes li { display: flex; align-items: center; gap: 12px; }
.type-compte { width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center; font-family: var(--f-titre); font-weight: 800; flex: none; background: var(--bleu-nuit); color: var(--blanc); }
.type-compte.pg { background: var(--jaune); color: var(--bleu-nuit); border-radius: 10px; }
.mini-jauge { width: 64px; height: 8px; border-radius: 999px; background: var(--fond-parent); overflow: hidden; flex: none; }
.mini-jauge i { display: block; height: 100%; background: var(--soulignement); border-radius: 999px; }
.table-comptes { display: grid; gap: 10px; }
.tc-ligne { display: grid; grid-template-columns: 36px minmax(0, 1fr) 150px 120px 80px; gap: 12px; align-items: end; padding: 12px; border-radius: 14px; background: var(--fond-parent); }
.tc-ligne .type-compte { align-self: center; }
.tc-nom input { width: 100%; height: 38px; border-radius: 10px; border: 1.5px solid var(--bordure); padding: 0 10px; font-weight: 800; background: var(--blanc); }
.tc-ligne .champ input { min-height: 38px; padding: 6px 10px; }
.tc-actif { display: flex; gap: 6px; align-items: center; font-weight: 700; padding-bottom: 8px; }

/* Fenêtre très large */
.fenetre.xl { width: min(1100px, calc(100% - 32px)); }

/* Éditeur de vague : une ligne par lien */
.lignes-vague { display: grid; gap: 10px; max-height: 52vh; overflow-y: auto; padding-right: 4px; }
.ligne-vague { border: 1.5px solid var(--bordure); border-radius: 16px; padding: 10px 12px; background: var(--perle); }
.ligne-vague.deja { border-color: #F5D667; background: #FFFBEA; }
.lv-tete { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.lv-num { width: 26px; height: 26px; border-radius: 999px; background: var(--bleu-nuit); color: var(--blanc); display: grid; place-items: center; font-size: 13px; font-weight: 800; flex: none; }
.lv-lien { flex: 1; min-width: 0; font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-tete select { height: 34px; border-radius: 10px; border: 1.5px solid var(--bordure); padding: 0 8px; font-weight: 700; background: var(--blanc); }
.lv-champs { display: grid; grid-template-columns: 1.6fr 1.4fr 1fr 70px 1.2fr; gap: 8px; }
.lv-champs input { height: 38px; border-radius: 10px; border: 1.5px solid var(--bordure); padding: 0 10px; font-weight: 600; background: var(--blanc); min-width: 0; }
.lv-champs input:focus, .lv-tete select:focus { border-color: var(--azur-fonce); outline: none; }
.lv-champs .lv-large { grid-column: 1 / -1; }

/* Rafale v2 */
.raf-reglages { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.raf-compte { display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 4px 0 10px; border-radius: 12px; background: var(--fond-parent); }
.raf-compte select { border: 0; background: transparent; font-weight: 800; height: 36px; max-width: 230px; }
.raf-variantes { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.raf-variantes button { position: relative; width: 34px; height: 34px; border-radius: 10px; border: 1.5px solid var(--bordure); background: var(--blanc); font-family: var(--f-titre); font-weight: 800; cursor: pointer; }
.raf-variantes button.actif { background: var(--bleu-nuit); border-color: var(--bleu-nuit); color: var(--blanc); }
.raf-variantes button i { position: absolute; top: -7px; right: -6px; font-style: normal; font-size: 12px; color: var(--orange); }
.pause { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: #E5F3FF; border: 1.5px solid #9FD1FF; font-weight: 700; font-size: 14px; }
.pause span { flex: 1; }
.bulle-message .info-var { max-width: calc(100% - 28px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Messages types v2 */
.sommaire { display: flex; gap: 8px; flex-wrap: wrap; margin: -6px 0 22px; }
.sommaire a { display: inline-flex; gap: 6px; align-items: center; height: 34px; padding: 0 12px; border-radius: 999px; background: var(--blanc); border: 1.5px solid var(--bordure); font-weight: 800; font-size: 14px; color: var(--bleu-nuit); text-decoration: none; }
.sommaire a span { color: var(--texte-doux); font-weight: 700; }
.sous-groupe { font-size: 16px; font-weight: 800; margin: 18px 0 10px; color: var(--texte-doux); }
.carte-ajout.petite { min-height: 0; height: 56px; flex-direction: row; width: 100%; margin-top: 14px; }
.etape { scroll-margin-top: calc(var(--barre) + 16px); }

/* Vitrine */
.compteurs { display: flex; gap: 18px; flex-wrap: wrap; font-weight: 700; color: var(--texte-doux); }
.compteurs b { color: var(--texte); font-family: var(--f-titre); font-size: 20px; margin-right: 4px; }
.grille-posts .tuile { position: relative; aspect-ratio: 4 / 5; border: 0; padding: 0; border-radius: 12px; overflow: hidden; cursor: pointer; background: var(--blanc); box-shadow: inset 0 0 0 1.5px var(--bordure); text-align: left; }
.tuile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tuile-vide { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; padding: 18px; text-align: center; background: linear-gradient(160deg, #EEF6FF, #FFF8E6); }
.tuile-vide b { font-family: var(--f-titre); font-size: 22px; text-transform: capitalize; }
.tuile-vide span { font-weight: 700; color: var(--texte-doux); font-size: 14px; }
.tuile-statut { position: absolute; top: 8px; left: 8px; height: 24px; padding: 0 8px; border-radius: 999px; background: rgba(255, 255, 255, .92); font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; gap: 5px; }
.tuile-statut::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--c); }
.tuile-type { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 8px; background: rgba(11, 21, 89, .75); color: var(--blanc); display: grid; place-items: center; }
.tuile-pied { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 10px 8px; background: linear-gradient(transparent, rgba(5, 14, 42, .78)); color: var(--blanc); display: grid; font-size: 12px; line-height: 1.3; }
.tuile-pied span { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tuile-anaia { position: absolute; bottom: 44px; right: 8px; height: 20px; padding: 0 6px; border-radius: 6px; background: var(--jaune); font-size: 10px; font-weight: 800; display: grid; place-items: center; }
.tuile:hover { box-shadow: inset 0 0 0 3px var(--azur-fonce); }
.post-grille { display: grid; grid-template-columns: 420px minmax(0, 1fr); gap: 22px; padding: 6px 24px 10px; }
.post-apercu { border: 1px solid var(--bordure); border-radius: 16px; overflow: hidden; align-self: start; background: var(--blanc); }
.fb-tete { display: flex; gap: 10px; align-items: center; padding: 12px; }
.fb-tete img { width: 40px; height: 40px; border-radius: 999px; background: var(--fond); object-fit: contain; }
.fb-texte { padding: 0 12px 12px; white-space: pre-wrap; font-size: 14px; line-height: 1.45; max-height: 260px; overflow-y: auto; }
.fb-medias { display: grid; gap: 2px; background: var(--fond-parent); }
.fb-medias.n2, .fb-medias.n4 { grid-template-columns: 1fr 1fr; }
.fb-medias.n3 { grid-template-columns: 1fr 1fr; }
.fb-medias.n3 img:first-child { grid-column: 1 / -1; }
.fb-medias img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; }
.fb-vide { aspect-ratio: 4 / 5; display: grid; place-items: center; align-content: center; gap: 8px; color: #8E97B3; font-weight: 700; }
.fb-com { padding: 10px 12px; font-size: 13px; border-top: 1px solid var(--bordure); background: var(--perle); }
.post-details { display: grid; gap: 12px; align-content: start; }
.visuels { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.visuels li { display: flex; gap: 12px; align-items: center; }
.vis-mini { width: 56px; height: 70px; border-radius: 10px; background: var(--fond-parent); overflow: hidden; display: grid; place-items: center; color: #B8C0D6; flex: none; }
.vis-mini img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 900px) {
  .post-grille { grid-template-columns: 1fr; }
  .lv-champs { grid-template-columns: 1fr 1fr; }
  .tc-ligne { grid-template-columns: 36px minmax(0, 1fr); }
  .raf-variantes { margin-left: 0; }
}

.fenetre .pied { position: sticky; bottom: 0; background: var(--blanc); padding-top: 14px; border-radius: 0 0 var(--r-l) var(--r-l); z-index: 2; }
.anneau-jour span { display: block; line-height: 1.25; margin-top: 2px; }

/* ---------------------------------------------------------------- v3 : plan, alertes, recherche, stats, méthode */
.colonne-droite { position: static; }
.carte.pad { padding: 18px 22px; }
.alertes { padding: 8px; display: grid; gap: 6px; }
.al { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; background: var(--fond-parent); }
.al-urgent { background: #FFE7E3; }
.al-attention { background: #FFF4CC; }
.al-info { background: #EEF6FF; }
.al-ico { width: 32px; height: 32px; border-radius: 999px; display: grid; place-items: center; background: var(--blanc); flex: none; }
.al-urgent .al-ico { color: var(--erreur); }
.al-txt { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; color: var(--texte-doux); }
.al-txt b { color: var(--bleu-nuit); font-size: 15px; display: block; }
.al-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.taches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.tache { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: var(--fond-parent); border: 1.5px solid transparent; }
.tache.ok { background: #E3F6EA; border-color: #9AD8B0; }
.tache-ico { width: 34px; height: 34px; border-radius: 999px; display: grid; place-items: center; background: var(--blanc); flex: none; }
.tache.ok .tache-ico { color: var(--succes); }
.tache-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.tache-txt b { font-size: 14px; }
.tache-txt span { font-size: 13px; font-weight: 700; color: var(--texte-doux); }
.mini-jauge.rouge i { background: var(--erreur); }
.rech-grille { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 22px; align-items: start; }
.rech-grille > div { display: grid; gap: 18px; position: sticky; top: calc(var(--barre) + 16px); }
.presuivi { border: 2px solid var(--jaune); }
.recents { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 4px; }
.recents li { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 12px; background: var(--fond-parent); font-weight: 700; font-size: 14px; }
.recents li span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.requetes { list-style: none; margin: 0; padding: 0 10px 12px; }
.rq { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 12px; }
.rq:hover { background: var(--fond-parent); }
.rq.courante { background: #FFF4CC; }
.rq.fait .rq-txt b { color: var(--texte-doux); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.rq-case { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--bordure); background: var(--blanc); display: grid; place-items: center; cursor: pointer; color: var(--succes); flex: none; padding: 0; }
.rq.fait .rq-case { border-color: var(--succes); background: #E3F6EA; }
.rq-txt { flex: 1; min-width: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 15px; }
.bookmarklet { cursor: grab; background: var(--jaune); border-color: var(--bleu-nuit); }
.stats-grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 22px; }
.stats-grille .large { grid-column: 1 / -1; }
.table-wrap { overflow-x: auto; padding: 0 12px 14px; }
.tableau { width: 100%; border-collapse: collapse; font-size: 14px; }
.tableau th { text-align: left; font-size: 12px; font-weight: 800; color: var(--texte-doux); text-transform: uppercase; letter-spacing: .03em; padding: 8px 10px; border-bottom: 1.5px solid var(--bordure); white-space: nowrap; }
.tableau td { padding: 8px 10px; border-bottom: 1px solid #EEF1F7; font-weight: 600; vertical-align: top; }
.tableau tr.courante td { background: #FFF4CC; }
.tableau tr.prevision td { color: var(--texte-doux); }
.tableau tr.sep td { background: var(--fond-parent); }
.tableau.saisie input { width: 90px; padding: 6px 8px; border: 1.5px solid var(--bordure); border-radius: 10px; }
.graph { width: 100%; height: auto; display: block; }
.legende { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; font-weight: 700; color: var(--texte-doux); margin-top: 6px; }
.legende i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; }
.kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.methode { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 22px; align-items: start; }
.methode-nav { display: grid; gap: 4px; position: sticky; top: calc(var(--barre) + 16px); }
.methode-nav button { text-align: left; border: 0; background: transparent; padding: 10px 14px; border-radius: 14px; font-weight: 800; color: var(--texte-doux); cursor: pointer; }
.methode-nav button.actif { background: var(--blanc); color: var(--bleu-nuit); box-shadow: var(--ombre); }
.methode-texte { padding: 24px 28px; }
.methode-texte h2 { font-family: var(--f-titre); font-size: 28px; margin: 0 0 8px; }
.methode-texte h3 { font-size: 17px; margin: 22px 0 8px; }
.methode-texte p, .methode-texte li { font-weight: 600; line-height: 1.6; }
.methode-texte .chapo { font-size: 17px; color: var(--bleu-nuit); }
.methode-texte .table-wrap { padding: 0; margin: 8px 0; }
.depot-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 12px; }
.depot { border: 2px solid var(--bordure); border-radius: 16px; padding: 8px; display: grid; gap: 6px; background: var(--blanc); }
.depot.ok { border-color: #9AD8B0; }
.depot img, .depot video { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 10px; background: var(--fond-parent); }
.depot select { width: 100%; font-size: 13px; padding: 6px; border-radius: 10px; border: 1.5px solid var(--bordure); }
.compte-bloc { border: 1.5px solid var(--bordure); border-radius: 18px; padding: 12px; margin-top: 12px; }
.compte-bloc .table-wrap { padding: 8px 0 0; }
.story-champs select { padding: 10px 12px; border: 1.5px solid var(--bordure); border-radius: 12px; background: var(--blanc); font-weight: 700; }
@media (max-width: 1080px) {
  .rech-grille { grid-template-columns: minmax(0, 1fr); }
  .rech-grille > div { position: static; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .stats-grille, .methode { grid-template-columns: minmax(0, 1fr); }
  .methode-nav { position: static; display: flex; overflow-x: auto; }
  .methode-nav button { white-space: nowrap; }
}
@media (max-width: 720px) {
  .taches { grid-template-columns: minmax(0, 1fr); }
  .methode-texte { padding: 18px; }
}
.pad { padding: 18px 22px; }
.rq .btn.vu { background: #E3F6EA; border-color: #9AD8B0; color: var(--succes-fonce); }

/* Recherches partielles : Pages / Groupes publics / Groupes privés avec état à faire · en cours · terminé */
.rq { flex-wrap: wrap; }
.rq-bloc { display: inline-flex; align-items: center; gap: 4px; }
.rq .btn.partiel { background: #FFF4CC; border-color: #E8C34A; color: #7A5B00; }
.rq-etat { width: 28px; height: 28px; min-width: 28px; padding: 0; display: inline-grid; place-items: center; border-radius: 50%; border: 2px solid var(--bordure); background: var(--blanc); color: var(--texte-doux); font-size: 15px; line-height: 1; cursor: pointer; }
.rq-etat.en_cours { border-color: #E8C34A; background: #FFF4CC; color: #7A5B00; }
.rq-etat.termine { border-color: var(--succes); background: #E3F6EA; color: var(--succes); }
.tag.partiel-tag { background: #FFF4CC; color: #7A5B00; }

/* Vue « en tant que » (lecture seule) et rendement des recherches */
.bandeau-vue { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; padding: 8px 16px; background: #FFF4CC; border-bottom: 2px solid #E8C34A; font-weight: 700; color: var(--bleu-nuit); }
.rendement { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }

/* Vitrine : publications de profils (Ophélie, Anaïs) et rappel de l'Accueil */
.pp-liste { max-width: 935px; margin: 0 auto; display: grid; gap: 12px; }
.pp-auj { box-shadow: inset 0 0 0 2px #FFD21F; }
.pp-texte { white-space: pre-wrap; line-height: 1.5; font-size: 14.5px; background: #F5F8FF; border-radius: 12px; padding: 12px 14px; }
.pp-rappel { border-left: 5px solid #FFD21F; }
.pp-rappel-ligne { display: flex; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--bordure); flex-wrap: wrap; }
.pp-rappel-ligne:first-of-type { border-top: 0; }

.pp-corps { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.pp-corps .pp-texte { flex: 1; min-width: 240px; }
.pp-img { width: 168px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 12px; box-shadow: inset 0 0 0 1.5px var(--bordure); }

/* Vitrine des profils : même présentation que la Page */
.av-initiale { display: grid; place-items: center; background: var(--soulignement); }
.profil-page .av-page.av-initiale span { width: 100%; height: 100%; border-radius: 999px; display: grid; place-items: center; background: var(--blanc); border: 3px solid var(--blanc); font-family: var(--f-titre); font-size: 52px; color: var(--azur-fonce); }
.fb-tete .av-initiale.av-mini { width: 40px; height: 40px; border-radius: 999px; padding: 2px; flex: none; }
.fb-tete .av-initiale.av-mini span { width: 100%; height: 100%; border-radius: 999px; display: grid; place-items: center; background: var(--blanc); font-family: var(--f-titre); font-size: 18px; color: var(--azur-fonce); }
.grille-posts .tuile-auj { box-shadow: inset 0 0 0 3px #FFD21F; }

/* ---- Kits demandés (formulaire « Kit APE personnalisé ») ---- */
.kits-liste { display: grid; gap: 14px; }
.kit { display: grid; gap: 12px; }
.kit-tete { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.kit-code { display: flex; gap: 4px; flex: none; }
.kit-chiffre { width: 28px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--bleu-nuit); border-radius: 8px; background: var(--blanc); font-family: "Baloo 2", system-ui, sans-serif; font-weight: 800; font-size: 20px; color: var(--bleu-nuit); }
.kit-titre { flex: 1; min-width: 200px; }
.kit-titre h3 { margin: 0 0 2px; font-size: 18px; line-height: 24px; }
.kit-etiquettes { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tag.jaune { background: var(--jaune); color: var(--bleu-nuit); }
.tag.alerte { background: #FFF4CC; color: #7A5B00; }
.kit-contacts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.kit-contacts li { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 12px; border-radius: 12px; background: var(--fond-parent); }
.kit-contact-nom { font-weight: 800; }
.kit-lien { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--bleu-profond, var(--bleu-nuit)); text-decoration: underline; word-break: break-all; }
.kit-infos { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.kit-suivi { display: grid; grid-template-columns: 200px 1fr auto; gap: 12px; align-items: end; }
.kit-suivi textarea { width: 100%; resize: vertical; font: inherit; padding: 10px 12px; border: 1.5px solid var(--bordure); border-radius: 12px; }
.kit-suivi select { min-height: 44px; border: 1.5px solid var(--bordure); border-radius: 12px; padding: 0 10px; font: inherit; font-weight: 700; background: var(--blanc); }
@media (max-width: 720px) { .kit-suivi { grid-template-columns: 1fr; } .kit-chiffre { width: 24px; height: 34px; font-size: 18px; } }
.kit-suivi textarea { min-height: 64px; height: 64px; }

/* Ressources */
.res-liste { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); margin-top: 6px; }
.ressource { display: flex; flex-direction: column; gap: 10px; justify-content: space-between; }
.ressource.absente { opacity: .72; border-style: dashed; }
.actions-res { display: flex; gap: 8px; flex-wrap: wrap; }
