:root {
  --fond: #f5f4ef;
  --surface: #ffffff;
  --surface-2: #efede6;
  --encre: #121212;
  --encre-2: #4b4943;
  --encre-3: #8b877d;
  --trait: #e3e0d7;
  --accent: #d1342b;
  --accent-doux: #fbe8e6;
  --vert: #2e7d4f;
  --ombre: 0 1px 2px rgb(20 18 12 / .04), 0 6px 24px rgb(20 18 12 / .06);
  --ombre-forte: 0 2px 6px rgb(20 18 12 / .06), 0 18px 48px rgb(20 18 12 / .14);
  --serif: 'Newsreader', Georgia, serif;
  --sans: 'Inter', system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fond: #0f0f0e; --surface: #181816; --surface-2: #22211f; --encre: #f3f2ed; --encre-2: #b7b4aa; --encre-3: #7e7b72;
    --trait: #2a2926; --accent: #f0645a; --accent-doux: #3b1d1a; --vert: #5cc48a;
    --ombre: 0 1px 2px rgb(0 0 0 / .5); --ombre-forte: 0 18px 48px rgb(0 0 0 / .6); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --fond: #0f0f0e; --surface: #181816; --surface-2: #22211f; --encre: #f3f2ed; --encre-2: #b7b4aa; --encre-3: #7e7b72;
  --trait: #2a2926; --accent: #f0645a; --accent-doux: #3b1d1a; --vert: #5cc48a;
  --ombre: 0 1px 2px rgb(0 0 0 / .5); --ombre-forte: 0 18px 48px rgb(0 0 0 / .6); color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--fond); color: var(--encre); font: 15px/1.5 var(--sans); }
a { color: inherit; }
h1, h2, h3 { margin: 0; }
small, .note { color: var(--encre-3); font-size: 12.5px; font-weight: 400; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- En-tête ---------- */
.entete {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 18px;
  padding: 10px 20px; height: 62px; background: color-mix(in srgb, var(--fond) 90%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--trait);
}
.marque { font: 600 23px var(--serif); text-decoration: none; letter-spacing: -.01em; width: 222px; flex: none; }
.entete .direct { margin-left: auto; }
.marque span { color: var(--accent); }
/* Barre du haut */
input[type=search]::-webkit-search-cancel-button { display: none; }
.loupe { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--encre-3); pointer-events: none; }
.dock kbd { position: absolute; top: 50%; transform: translateY(-50%); font: 500 11px var(--sans); color: var(--encre-3); border: 1px solid var(--trait); border-radius: 5px; padding: 1px 6px; pointer-events: none; }
.effacer {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%;
  border: 0; background: var(--trait); color: var(--encre-2); font-size: 11px; cursor: pointer; display: grid; place-items: center;
}
.effacer:hover { color: var(--encre); }

/* Panneau de suggestions de la barre flottante */
.suggestions {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 40; padding: 6px; max-height: min(460px, 70vh); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--trait); border-top: 0; border-radius: 0 0 14px 14px;
  box-shadow: 0 18px 40px rgb(0 0 0 / .16);
}
.suggestions .groupe { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--encre-3); padding: 10px 10px 4px; display: flex; justify-content: space-between; }
.suggestions .groupe button { border: 0; background: none; color: var(--encre-3); font: inherit; font-size: 11px; text-transform: none; letter-spacing: 0; cursor: pointer; text-decoration: underline; }
.option {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: 9px;
  color: var(--encre); font-size: 14.5px; text-align: left; cursor: pointer;
}
.option .ico { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; flex: none; font-size: 13px; background: var(--fond); color: var(--encre-2); }
.option .ico.accent { background: var(--accent-doux); color: var(--accent); }
.option .texte { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.option .texte small { margin-left: 6px; }
.option .indice { font-size: 11.5px; color: var(--encre-3); flex: none; }
.option[aria-selected="true"], .option:hover { background: color-mix(in srgb, var(--encre) 7%, transparent); }
.option[aria-selected="true"] .indice::after { content: ' ↵'; }
.option mark { background: none; color: inherit; font-weight: 600; }

/* Barre flottante en bas, verre dépoli */
.dock {
  position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); z-index: 25; transform: translateX(-50%);
  width: min(560px, calc(100vw - 32px)); height: 56px; border-radius: 28px;
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid color-mix(in srgb, var(--encre) 10%, transparent);
  box-shadow: 0 12px 40px rgb(0 0 0 / .16), 0 2px 8px rgb(0 0 0 / .06), inset 0 1px 0 rgb(255 255 255 / .35);
  transition: width .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s, transform .3s, opacity .3s;
}
.dock:focus-within { width: min(680px, calc(100vw - 32px)); box-shadow: 0 18px 60px rgb(0 0 0 / .24), 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent), inset 0 1px 0 rgb(255 255 255 / .35); }
.dock.cache { transform: translate(-50%, 140%); opacity: 0; pointer-events: none; }
.dock .loupe { left: 20px; width: 19px; height: 19px; color: var(--encre-2); }
.dock input {
  width: 100%; height: 100%; padding: 0 104px 0 50px; border: 0; background: none; color: var(--encre);
  font: 500 16px var(--sans); border-radius: inherit;
}
.dock input:focus { outline: none; }
.dock input::placeholder { color: var(--encre-2); }
.dock kbd { right: 62px; background: color-mix(in srgb, var(--surface) 60%, transparent); }
.dock:focus-within kbd, .dock:has(input:not(:placeholder-shown)) kbd { display: none; }
.envoyer {
  position: absolute; right: 8px; top: 8px; width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--accent); color: #fff; display: grid; place-items: center; transition: transform .15s, opacity .2s, background .2s;
}
.envoyer svg { width: 18px; height: 18px; }
.envoyer:disabled { background: color-mix(in srgb, var(--encre) 14%, transparent); color: var(--encre-3); cursor: default; }
.envoyer:not(:disabled):hover { transform: scale(1.06); }
.dock .suggestions {
  top: auto; bottom: calc(100% + 10px); border: 1px solid color-mix(in srgb, var(--encre) 10%, transparent); border-radius: 18px;
  /* Un flou dans un élément déjà flouté ne voit pas la page : le panneau reste donc presque opaque. */
  background: var(--surface);
  box-shadow: 0 18px 50px rgb(0 0 0 / .2); animation: monte-panneau .18s ease-out;
}
@keyframes monte-panneau { from { opacity: 0; transform: translateY(6px); } }

.direct { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--encre-3); margin-left: auto; }
.direct i { width: 8px; height: 8px; border-radius: 50%; background: var(--encre-3); }
.direct.actif { color: var(--accent); }
.direct.actif i { background: var(--accent); animation: pouls 1.6s infinite; }
@keyframes pouls { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.icone { background: none; border: 0; color: var(--encre); font-size: 20px; cursor: pointer; padding: 4px 6px; border-radius: 6px; line-height: 1; }
.icone:hover { background: var(--surface); }
.menu { display: none; }

/* ---------- Boutons ---------- */
.bouton {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--encre); background: var(--encre); color: var(--fond);
  font: 500 14px var(--sans); padding: 8px 16px; border-radius: 20px; cursor: pointer; white-space: nowrap; text-decoration: none;
}
.bouton:hover { opacity: .88; }
.bouton.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.bouton.discret { background: transparent; color: var(--encre); border-color: var(--trait); }
.bouton.discret:hover { border-color: var(--encre-3); opacity: 1; }
.bouton.petit { padding: 4px 11px; font-size: 13px; }
.bouton.danger { background: transparent; color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.bouton:disabled { opacity: .45; cursor: default; }
.lien { background: none; border: 0; padding: 0; color: var(--encre-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 13.5px; }

/* ---------- Disposition ---------- */
.mise-en-page { display: grid; grid-template-columns: 250px minmax(0, 1fr); max-width: 1320px; margin: 0 auto; }
.cote { padding: 18px 14px; border-right: 1px solid var(--trait); position: sticky; top: 62px; height: calc(100vh - 62px); overflow-y: auto; }
.titre-section { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 22px 0 6px; padding: 0 8px; }
.titre-section h2 { font: 600 11.5px var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--encre-2); }
.plus-sujet { font-size: 20px; padding: 0 7px; color: var(--encre-2); }
.liste { display: flex; flex-direction: column; gap: 1px; }
.liste button {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; border: 0; background: none;
  color: var(--encre); font-size: 14.5px; padding: 7px 8px; border-radius: 8px; cursor: pointer;
}
.liste button:hover { background: var(--surface); }
.liste button.actif { background: var(--surface); box-shadow: var(--ombre); font-weight: 600; }
.pictogramme { color: var(--accent); font-size: 12px; width: 14px; text-align: center; }
.liste .nom { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pastille { background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; border-radius: 10px; padding: 0 7px; line-height: 18px; }
.compte { color: var(--encre-3); font-size: 12px; }
.vide-liste { color: var(--encre-3); font-size: 13.5px; padding: 4px 8px; margin: 0; }
.vide-liste .lien { font-size: 13.5px; }
.mention { margin: 28px 8px 0; font-size: 11.5px; color: var(--encre-3); line-height: 1.5; }

.contenu { padding: 26px 32px 130px; min-width: 0; }

/* ---------- Accueil ---------- */
.bienvenue { background: var(--surface); border: 1px solid var(--trait); border-radius: 16px; padding: 26px 28px; box-shadow: var(--ombre); margin-bottom: 30px; }
.bienvenue h1 { font: 600 28px/1.2 var(--serif); margin-bottom: 6px; }
.bienvenue p { margin: 0 0 16px; color: var(--encre-2); max-width: 640px; }
.etapes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 18px 0 20px; }
.etape { font-size: 13.5px; color: var(--encre-2); }
.etape strong { display: block; color: var(--encre); font-size: 14px; margin-bottom: 2px; }
.etape b { color: var(--accent); font-family: var(--serif); font-size: 20px; margin-right: 4px; }
.puces { display: flex; flex-wrap: wrap; gap: 8px; }
.puce { border: 1px solid var(--trait); background: var(--fond); color: var(--encre); border-radius: 18px; padding: 6px 13px; font-size: 13.5px; cursor: pointer; }
.puce:hover { border-color: var(--encre-3); }

/* ---------- En-tête de page ---------- */
.page-entete { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 4px; }
.page-entete h1 { font: 600 32px/1.15 var(--serif); letter-spacing: -.01em; }
.surtitre { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-bottom: 4px; }
.page-entete .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sous-titre { color: var(--encre-3); font-size: 13.5px; margin: 6px 0 0; }

/* ---------- Outils ---------- */
.barre-outils { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 0 4px; }
select {
  font: inherit; font-size: 13.5px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--trait); background: var(--surface); color: var(--encre);
}
/* Pastilles de réseaux */
.filtres { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 0 4px; }
.filtre {
  border: 1px solid var(--trait); background: var(--surface); color: var(--encre); border-radius: 18px;
  padding: 5px 13px; font-size: 13.5px; cursor: pointer; transition: border-color .15s, background .15s;
}
.filtre:hover:not(:disabled) { border-color: var(--encre-3); }
.filtre.actif { background: var(--encre); border-color: var(--encre); color: var(--fond); }
.filtre.actif small { color: color-mix(in srgb, var(--fond) 70%, transparent); }
.filtre small { margin-left: 4px; }
.filtre:disabled { opacity: .4; cursor: not-allowed; text-decoration: line-through; text-decoration-thickness: 1px; }
.sur-reseau { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 10px 8px 46px; font-size: 12.5px; color: var(--encre-3); }
.sur-reseau button { border: 1px solid var(--trait); background: var(--fond); color: var(--encre); border-radius: 14px; padding: 2px 10px; font-size: 12.5px; cursor: pointer; }
.sur-reseau button:hover { border-color: var(--encre-3); }
.segments { display: inline-flex; border: 1px solid var(--trait); border-radius: 18px; overflow: hidden; }
.segments button { white-space: nowrap; border: 0; background: none; color: var(--encre-2); font-size: 13px; padding: 5px 12px; cursor: pointer; }
.segments button.actif { background: var(--encre); color: var(--fond); }

/* ---------- Listes d'articles ---------- */
.articles { list-style: none; margin: 0; padding: 0; }
.article { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--trait); }
.article:has(> img) { grid-template-columns: minmax(0, 1fr) auto; }
.article.frais { animation: arrivee 2.4s ease-out; }
@keyframes arrivee { from { background: var(--accent-doux); } to { background: transparent; } }
.meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--encre-3); margin-bottom: 3px; flex-wrap: wrap; }
.meta .source { font-weight: 600; color: var(--encre-2); }
.article h3 { font: 600 19px/1.28 var(--serif); margin-bottom: 4px; }
.article h3 a { text-decoration: none; }
.article h3 a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.article p { margin: 0; color: var(--encre-2); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article img { width: 120px; height: 80px; object-fit: cover; border-radius: 8px; background: var(--trait); }
.etiquette { font-size: 11px; font-weight: 600; color: var(--accent); background: var(--accent-doux); padding: 1px 7px; border-radius: 10px; }
.reseau { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 1px 6px; border-radius: 4px; background: var(--trait); color: var(--encre-2); }
.nouveaux {
  position: sticky; top: 76px; z-index: 5; display: block; margin: 8px auto; border: 0; border-radius: 20px;
  background: var(--accent); color: #fff; font: 600 13px var(--sans); padding: 7px 16px; cursor: pointer; box-shadow: var(--ombre);
}
.suite { display: flex; justify-content: center; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

/* ---------- États ---------- */
.vide { padding: 44px 16px; text-align: center; color: var(--encre-2); }
.vide strong { display: block; font: 600 19px var(--serif); color: var(--encre); margin-bottom: 4px; }
.vide p { margin: 0 auto 14px; max-width: 460px; font-size: 14px; }
.chargement { display: flex; align-items: center; gap: 12px; padding: 26px 0; color: var(--encre-2); font-size: 14px; }
.roue { width: 18px; height: 18px; border: 2px solid var(--trait); border-top-color: var(--accent); border-radius: 50%; animation: tour 0.9s linear infinite; flex: none; }
@keyframes tour { to { transform: rotate(360deg); } }
.squelette { height: 74px; border-bottom: 1px solid var(--trait); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--trait) 60%, transparent), transparent) 0 0 / 200% 100%; animation: brille 1.3s infinite; }
@keyframes brille { to { background-position: -200% 0; } }
.encart { background: var(--surface); border: 1px solid var(--trait); border-radius: 12px; padding: 14px 16px; font-size: 13.5px; color: var(--encre-2); margin: 12px 0; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.encart > span { flex: 1; min-width: 220px; }
.etats-sources { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--encre-3); }
.etats-sources b { color: var(--encre); font-weight: 600; margin-left: 2px; font-variant-numeric: tabular-nums; }
.etats-sources .sans { opacity: .7; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(max(20px, env(safe-area-inset-bottom)) + 70px); transform: translateX(-50%); z-index: 30; background: var(--encre); color: var(--fond);
  padding: 11px 18px; border-radius: 12px; font-size: 14px; box-shadow: 0 10px 30px rgb(0 0 0 / .25); max-width: calc(100vw - 32px);
  animation: monte .25s ease-out;
}
@keyframes monte { from { transform: translate(-50%, 12px); opacity: 0; } }

/* ---------- Fenêtre ---------- */
dialog { border: 1px solid var(--trait); border-radius: 16px; padding: 0; width: min(540px, calc(100vw - 32px)); background: var(--surface); color: var(--encre); box-shadow: 0 20px 60px rgb(0 0 0 / .25); }
dialog::backdrop { background: rgb(0 0 0 / .35); }
dialog form { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
dialog h2 { font: 600 23px var(--serif); }
dialog label, dialog legend { display: flex; flex-direction: column; gap: 5px; font-weight: 500; font-size: 13.5px; }
dialog input:not([type=checkbox]) {
  font: inherit; font-weight: 400; padding: 9px 11px; border: 1px solid var(--trait); border-radius: 9px; background: var(--fond); color: var(--encre);
}
dialog details { display: flex; flex-direction: column; gap: 14px; }
dialog details[open] { padding-bottom: 2px; }
dialog details > *:not(summary) { margin-top: 14px; }
dialog summary { cursor: pointer; color: var(--encre-2); font-size: 13.5px; }
dialog fieldset { border: 0; padding: 0; margin: 0; }
dialog legend { flex-direction: row; gap: 8px; margin-bottom: 6px; }
.cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 10px; max-height: 150px; overflow-y: auto; padding: 8px; border: 1px solid var(--trait); border-radius: 9px; }
.cases label, .interrupteur { flex-direction: row !important; align-items: center; gap: 7px !important; font-weight: 400 !important; font-size: 13.5px; }
.pied { display: flex; gap: 8px; align-items: center; }
.pied span { flex: 1; }
.erreur { color: var(--accent); margin: 0; font-size: 13.5px; }

/* ---------- Petits écrans ---------- */
@media (max-width: 860px) {
  .entete { gap: 10px; padding: 8px 14px; height: 58px; }
  .menu { display: block; }
  .marque { width: auto; font-size: 20px; }
  .direct span { display: none; }
  .dock { width: calc(100vw - 24px); }
  .dock:focus-within { width: calc(100vw - 16px); }
  .dock .raccourci { display: none; }
  .dock input { padding-right: 60px; }
  .mise-en-page { grid-template-columns: minmax(0, 1fr); }
  .cote { display: none; position: fixed; inset: 58px 0 0 0; z-index: 20; height: auto; background: var(--fond); border: 0; padding: 12px 16px; }
  .cote.ouvert { display: block; }
  .contenu { padding: 18px 16px 120px; }
  .page-entete h1 { font-size: 26px; }
  .bienvenue { padding: 20px 18px; }
  .bienvenue h1 { font-size: 23px; }
  .etapes { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .article:has(> img) { grid-template-columns: minmax(0, 1fr) 84px; gap: 12px; }
  .article img { width: 84px; height: 64px; }
  .article h3 { font-size: 17px; }
}
@media (max-width: 480px) {
  .marque span { display: none; }
  .marque::after { content: 'P'; color: var(--accent); }
}

/* =====================================================================
   Refonte visuelle
   ===================================================================== */
body { font-feature-settings: 'cv11', 'ss01'; -webkit-font-smoothing: antialiased; }
.icone-svg { width: 16px; height: 16px; flex: none; }
.bouton .icone-svg { width: 15px; height: 15px; }
body:has(dialog[open]) .dock { transform: translate(-50%, 140%); opacity: 0; pointer-events: none; }

/* En-tête de sujet */
.page-entete { align-items: flex-end; margin-bottom: 22px; }
.page-entete h1 { font: 600 clamp(32px, 4.2vw, 46px)/1.05 var(--serif); letter-spacing: -.02em; }
.surtitre { display: inline-flex; align-items: center; gap: 6px; }
.surtitre::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.sous-titre { font-size: 14px; }

/* Cartes-sources (remplacent les onglets) */
.cartes-sources { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 8px; }
.carte-source {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; cursor: pointer;
  padding: 14px 16px 15px; border-radius: 16px; border: 1px solid var(--trait); background: var(--surface); color: var(--encre);
  box-shadow: var(--ombre); transition: transform .15s, box-shadow .2s, background .2s, border-color .2s;
}
.carte-source:hover { transform: translateY(-1px); box-shadow: var(--ombre-forte); }
.carte-source-tete { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--encre-2); }
.carte-source-chiffre { font: 600 30px/1.15 var(--serif); font-variant-numeric: tabular-nums; margin-top: 6px; }
.carte-source-detail { font-size: 12.5px; color: var(--encre-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.carte-source.actif { background: var(--encre); border-color: var(--encre); color: var(--fond); }
.carte-source.actif .carte-source-tete, .carte-source.actif .carte-source-detail { color: color-mix(in srgb, var(--fond) 72%, transparent); }

/* Journaux : premier article à la une */
.articles.avec-une > .article:first-child { grid-template-columns: minmax(0, 1fr); padding: 6px 0 22px; }
.articles.avec-une > .article:first-child:has(> img) { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: center; }
.articles.avec-une > .article:first-child img { width: 100%; height: auto; aspect-ratio: 3 / 2; border-radius: 14px; order: -1; }
.articles.avec-une > .article:first-child h3 { font-size: 27px; line-height: 1.15; letter-spacing: -.01em; }
.articles.avec-une > .article:first-child p { -webkit-line-clamp: 4; font-size: 15px; }
.article img { border-radius: 10px; }

/* Pastilles de réseaux */
.filtre { display: inline-flex; align-items: center; gap: 7px; }
.filtre::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--encre-3); }
.filtre[data-reseau=""]::before { display: none; }
.filtre[data-reseau="tiktok"]::before { background: linear-gradient(135deg, #25f4ee 50%, #fe2c55 50%); }
.filtre[data-reseau="instagram"]::before { background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af); }
.filtre[data-reseau="youtube"]::before { background: #e00; }
.filtre[data-reseau="reddit"]::before { background: #ff4500; }
.filtre[data-reseau="x"]::before { background: var(--encre); }
.filtre[data-reseau="hackernews"]::before { background: #f60; }

/* Résumé chiffré */
.resume-posts {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin: 16px 0 18px; padding: 18px 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--trait); box-shadow: var(--ombre);
}
.chiffres-cles { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; }
.chiffres-cles > div { display: flex; flex-direction: column; line-height: 1.15; }
.chiffres-cles span { font-size: 12px; color: var(--encre-3); margin-top: 3px; }
.chiffres-cles strong { font-family: var(--serif); font-weight: 600; }
.chiffres-cles strong { font-size: 26px; font-variant-numeric: tabular-nums; }
.chiffres-cles .top { flex-direction: row; align-items: center; gap: 10px; padding-left: 22px; border-left: 1px solid var(--trait); }
.chiffres-cles .top div { display: flex; flex-direction: column; }
.chiffres-cles .top strong { font: 600 15px/1.4 var(--sans); }

/* Badges réseaux */
.badge-reseau { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; color: #fff; background: #6b6b6b; }
.r-tiktok.badge-reseau { background: #111; box-shadow: inset 2px 0 0 #25f4ee, inset -2px 0 0 #fe2c55; }
.r-instagram.badge-reseau { background: linear-gradient(45deg, #f58529, #dd2a7b 50%, #8134af); }
.r-youtube.badge-reseau { background: #e00; }
.r-reddit.badge-reseau { background: #ff4500; }
.r-x.badge-reseau { background: #000; }
.r-hackernews.badge-reseau { background: #f60; }
.r-bluesky.badge-reseau { background: #0085ff; }
.r-linkedin.badge-reseau { background: #0a66c2; }

/* Avatars */
.avatar { width: 26px; height: 26px; border-radius: 50%; flex: none; object-fit: cover; display: inline-grid; place-items: center; color: #fff; font: 600 12px var(--sans); background: var(--surface-2); }
.avatar.petit { width: 30px; height: 30px; font-size: 12.5px; }
.avatar.grand { width: 44px; height: 44px; font-size: 18px; }
.chiffres-cles .top .avatar { width: 36px; height: 36px; }

/* Grille mosaïque */
.grille-media { list-style: none; margin: 0; padding: 0; columns: 3 250px; column-gap: 16px; }
.carte-media {
  break-inside: avoid; margin: 0 0 16px; border-radius: 18px; overflow: hidden; cursor: pointer;
  background: var(--surface); border: 1px solid var(--trait); box-shadow: var(--ombre);
  transition: transform .2s cubic-bezier(.2, .8, .2, 1), box-shadow .2s;
}
.carte-media:hover { transform: translateY(-3px); box-shadow: var(--ombre-forte); }
.carte-media:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.media { position: relative; background: var(--surface-2); overflow: hidden; }
.media.vertical { aspect-ratio: 4 / 5; }
.media.paysage { aspect-ratio: 16 / 9; }
.media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s cubic-bezier(.2, .8, .2, 1); }
.carte-media:hover .media img { transform: scale(1.035); }
.media.sans-image img { display: none; }
.media.sans-image { background: linear-gradient(160deg, var(--surface-2), color-mix(in srgb, var(--accent) 18%, var(--surface-2))); }
.media img { opacity: 0; animation: apparait .4s ease-out forwards; }
@keyframes apparait { to { opacity: 1; } }
.media::after { content: ''; position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(transparent, rgb(0 0 0 / .55)); pointer-events: none; }
.media .badge-reseau { position: absolute; top: 10px; left: 10px; z-index: 1; }
.lecture-rond {
  position: absolute; inset: 0; margin: auto; z-index: 1; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; background: rgb(255 255 255 / .18); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgb(255 255 255 / .35); opacity: 0; transform: scale(.9); transition: opacity .2s, transform .2s;
}
.lecture-rond .icone-svg { width: 20px; height: 20px; margin-left: 2px; }
.carte-media:hover .lecture-rond { opacity: 1; transform: scale(1); }
.vues-incrustees { position: absolute; left: 12px; bottom: 10px; z-index: 1; display: flex; align-items: center; gap: 5px; color: #fff; font: 600 13px var(--sans); text-shadow: 0 1px 4px rgb(0 0 0 / .5); font-variant-numeric: tabular-nums; }
.media.citation { padding: 46px 18px 22px; background: var(--surface-2); }
.media.citation::after { display: none; }
.media.citation p { margin: 0; font: 600 19px/1.3 var(--serif); color: var(--encre); display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.media.citation p { padding-left: 12px; border-left: 3px solid var(--accent); }
.carte-media-corps { padding: 12px 14px 14px; }
.auteur-ligne { display: flex; align-items: center; gap: 8px; min-width: 0; }
.auteur-ligne .auteur { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auteur-ligne time { margin-left: auto; flex: none; font-size: 12px; }
.carte-media-titre { margin: 8px 0 0; font: 500 15.5px/1.35 var(--serif); color: var(--encre); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.stats { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; font-size: 12.5px; color: var(--encre-3); font-variant-numeric: tabular-nums; }
.stats span { display: inline-flex; align-items: center; gap: 4px; }
.stats .icone-svg { width: 14px; height: 14px; }

/* Fiche détaillée */
dialog.fiche {
  margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(520px, 100vw); max-width: 100vw;
  border: 0; border-left: 1px solid var(--trait); border-radius: 0; padding: 0; display: none; flex-direction: column;
  background: var(--surface); box-shadow: var(--ombre-forte);
}
dialog.fiche[open] { display: flex; animation: glisse .28s cubic-bezier(.2, .8, .2, 1); }
dialog.fiche::backdrop { background: rgb(0 0 0 / .32); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
@keyframes glisse { from { transform: translateX(40px); opacity: 0; } }
.fiche-tete { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--trait); }
.fiche-qui { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.fiche-qui strong { font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fermer { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); }
.fiche-defile { flex: 1; overflow-y: auto; padding: 18px 20px 24px; }
.fiche .lecteur { margin: 0 auto 18px; border-radius: 14px; overflow: hidden; background: #000; }
.fiche .lecteur iframe { display: block; width: 100%; height: 100%; border: 0; }
.fiche .lecteur.paysage { aspect-ratio: 16 / 9; width: 100%; }
.fiche .lecteur.vertical { width: min(340px, 100%); height: 600px; }
.fiche .lecteur.vertical.r-instagram { height: 660px; background: var(--surface); }
.affiche { position: relative; display: block; margin: 0 auto 18px; padding: 0; border: 0; border-radius: 14px; overflow: hidden; cursor: pointer; background: #000; }
.affiche.vertical { width: min(340px, 100%); aspect-ratio: 9 / 14; }
.affiche.paysage { width: 100%; aspect-ratio: 16 / 9; }
.affiche img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s, filter .3s; }
.affiche:hover img { transform: scale(1.03); filter: brightness(.85); }
.lecture-rond.visible { opacity: 1; transform: scale(1); width: 64px; height: 64px; }
.lecture-rond.visible .icone-svg { width: 26px; height: 26px; }
.fiche-image { width: 100%; border-radius: 14px; margin-bottom: 18px; }
.fiche-titre { font: 600 23px/1.25 var(--serif); letter-spacing: -.01em; margin: 0 0 10px; }
.fiche-texte { margin: 0 0 12px; color: var(--encre-2); white-space: pre-line; font-size: 15px; line-height: 1.6; }
.hashtags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 14px; }
.hashtags span { font-size: 12.5px; color: var(--encre-2); background: var(--surface-2); border-radius: 12px; padding: 2px 9px; }
.fiche-chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin: 8px 0 22px; }
.fiche-chiffres div { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 14px; background: var(--surface-2); }
.fiche-chiffres .icone-svg { color: var(--encre-3); }
.fiche-chiffres strong { font: 600 21px var(--serif); font-variant-numeric: tabular-nums; }
.fiche-chiffres span { font-size: 12px; color: var(--encre-3); }
.fiche-section { font: 600 11.5px var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--encre-2); margin: 6px 0 12px; }
.reactions { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 14px; border: 0; }
.reactions li { display: flex; gap: 10px; align-items: flex-start; }
.reaction-auteur { font-size: 13px; font-weight: 600; }
.reactions p { margin: 2px 0 3px; font-size: 14.5px; line-height: 1.5; color: var(--encre); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.reaction-aime { display: inline-flex; align-items: center; gap: 4px; }
.reaction-aime .icone-svg { width: 13px; height: 13px; }
.citations { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.citations li { font: 400 16px/1.5 var(--serif); font-style: italic; padding-left: 14px; border-left: 3px solid var(--accent); color: var(--encre); }
.fiche-pied { display: flex; gap: 10px; padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--trait); background: var(--surface); }
.fiche-pied .bouton { flex: 1; justify-content: center; padding: 11px 16px; }

@media (max-width: 860px) {
  .cartes-sources { grid-template-columns: repeat(3, minmax(150px, 1fr)); overflow-x: auto; scrollbar-width: none; margin: 0 -16px 8px; padding: 2px 16px 6px; }
  .carte-source { padding: 12px 13px; border-radius: 14px; }
  .carte-source-chiffre { font-size: 24px; }
  .articles.avec-une > .article:first-child:has(> img) { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .articles.avec-une > .article:first-child h3 { font-size: 22px; }
  .grille-media { columns: 2 150px; column-gap: 10px; }
  .carte-media { margin-bottom: 10px; border-radius: 14px; }
  .carte-media-titre { font-size: 14px; }
  .carte-media-corps { padding: 10px 11px 12px; }
  .stats { gap: 10px; font-size: 12px; }
  .chiffres-cles { gap: 16px; }
  .chiffres-cles .top { padding-left: 0; border-left: 0; }
  dialog.fiche { margin: auto 0 0; width: 100vw; height: 92dvh; border-left: 0; border-radius: 20px 20px 0 0; }
  @keyframes glisse { from { transform: translateY(60px); opacity: 0; } }
  .fiche .lecteur.vertical { height: 70dvh; }
}

/* Retirer un sujet suivi */
.ligne-sujet { position: relative; }
.ligne-sujet > button[data-sujet] { padding-right: 34px; }
.liste .retirer {
  padding: 0; gap: 0;
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 7px;
  display: grid; place-items: center; border: 0; background: none; color: var(--encre-3); cursor: pointer;
  opacity: 0; transition: opacity .15s, background .15s, color .15s;
}
.liste .retirer .icone-svg { width: 14px; height: 14px; }
.ligne-sujet:hover .retirer, .retirer:focus-visible { opacity: 1; }
.liste .retirer:hover { background: var(--accent-doux); color: var(--accent); }
.ligne-sujet:hover .pastille { visibility: hidden; }
@media (hover: none) { .retirer { opacity: .7; } .ligne-sujet .pastille { margin-right: 4px; } }
.toast { display: flex; align-items: center; gap: 14px; }
.toast-action { border: 0; background: none; color: var(--accent); font: 600 14px var(--sans); cursor: pointer; padding: 2px 0; }
:root .toast-action { color: color-mix(in srgb, var(--accent) 70%, #fff); }

/* Accueil : « Chercher sur » */
.explorer {
  display: flex; align-items: center; justify-content: space-between; gap: 14px 24px; flex-wrap: wrap;
  margin: 0 0 30px; padding: 18px 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--trait); box-shadow: var(--ombre);
}
.explorer-texte { display: flex; flex-direction: column; gap: 2px; }
.explorer-texte strong { font: 600 21px/1.2 var(--serif); letter-spacing: -.01em; }
.explorer-texte span { font-size: 13px; color: var(--encre-3); }
.explorer-puces { display: flex; flex-wrap: wrap; gap: 8px; }
.puce-portee {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 20px; cursor: pointer;
  border: 1px solid var(--trait); background: var(--fond); color: var(--encre); font: 500 14px var(--sans);
  transition: transform .15s, border-color .15s, box-shadow .2s;
}
.puce-portee:hover:not(:disabled) { transform: translateY(-1px); border-color: var(--encre-3); box-shadow: var(--ombre); }
.puce-portee:disabled { opacity: .4; cursor: not-allowed; }
.puce-portee .icone-svg { width: 15px; height: 15px; color: var(--encre-2); }
[data-couleur]::before { content: ''; width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--encre-3); }
[data-couleur="tiktok"]::before { background: linear-gradient(135deg, #25f4ee 50%, #fe2c55 50%); }
[data-couleur="instagram"]::before { background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af); }
[data-couleur="youtube"]::before { background: #e00; }
[data-couleur="reddit"]::before { background: #ff4500; }
[data-couleur="x"]::before { background: var(--encre); }
[data-couleur="hackernews"]::before { background: #f60; }
[data-couleur="web"]::before, [data-couleur=""]::before { display: none; }

/* Portée affichée dans la barre flottante */
.portee {
  position: absolute; left: 46px; top: 50%; transform: translateY(-50%); z-index: 1;
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; border-radius: 16px;
  background: var(--encre); color: var(--fond); font: 600 13px var(--sans); white-space: nowrap;
}
.portee::before { width: 8px; height: 8px; }
.portee button { width: 20px; height: 20px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: rgb(255 255 255 / .18); color: inherit; }
.portee button .icone-svg { width: 11px; height: 11px; }
@media (max-width: 860px) {
  .explorer { padding: 16px; margin-bottom: 22px; }
  .explorer-puces { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 4px; width: calc(100% + 32px); }
  .puce-portee { flex: none; }
  .portee { left: 42px; }
}

/* Pays et langue */
.origine { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; line-height: 1; }
.origine b { font: 700 9.5px var(--sans); letter-spacing: .04em; color: var(--encre-2); border: 1px solid var(--trait); border-radius: 4px; padding: 2px 4px; }
.groupe-outils { display: flex; gap: 8px; flex-wrap: wrap; }
.page-entete .actions .segments { background: var(--surface); }
@media (max-width: 860px) {
  .page-entete .actions { width: 100%; }
  .page-entete .actions select { flex: 1; min-width: 0; }
}
.choix-zone { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.choix-zone label { flex-direction: row !important; align-items: center; gap: 6px !important; font-weight: 400 !important; }

/* ---------- Barre de filtres (zone, langues, traduction) ---------- */
.barre-filtres { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 18px 0 22px; }
.puce-filtre { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border: 1px solid var(--trait); border-radius: 9px;
  background: var(--surface); color: var(--encre-2); font: 500 13px/1 var(--sans); cursor: pointer; white-space: nowrap; list-style: none; user-select: none;
  transition: border-color .15s, background .15s, color .15s; }
.puce-filtre::-webkit-details-marker { display: none; }
.puce-filtre:hover { border-color: var(--encre-3); color: var(--encre); }
.puce-filtre .icone-svg { width: 15px; height: 15px; color: var(--encre-3); }
.puce-filtre .cle { color: var(--encre-3); }
.puce-filtre b { color: var(--encre); font-weight: 600; }
.puce-filtre b.codes { font: 600 11.5px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .03em; }
.puce-filtre.actif { border-color: var(--encre); }
.puce-filtre .chevron { width: 12px; height: 12px; color: var(--encre-3); transition: transform .15s; }
.filtre-menu[open] > .puce-filtre { border-color: var(--encre-3); background: var(--surface-2); }
.filtre-menu[open] > .puce-filtre .chevron { transform: rotate(180deg); }
.puce-filtre:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bascule .case { width: 15px; height: 15px; border-radius: 4px; border: 1.5px solid var(--encre-3); display: grid; place-items: center; }
.bascule.actif .case { background: var(--encre); border-color: var(--encre); color: var(--fond); }
.bascule .coche { width: 11px; height: 11px; }
.effacer-filtres { border: 0; background: none; color: var(--encre-3); font-size: 12.5px; cursor: pointer; padding: 0 6px; text-decoration: underline; text-decoration-color: var(--trait); text-underline-offset: 3px; }
.effacer-filtres:hover { color: var(--encre); }

/* Menus déroulants des filtres */
.filtre-menu { position: relative; }
.filtre-menu .menu-filtre { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; min-width: 250px; padding: 6px; border: 1px solid var(--trait); border-radius: 12px;
  background: var(--surface); box-shadow: var(--ombre-forte); animation: menu-entre .12s ease-out; }
@keyframes menu-entre { from { opacity: 0; transform: translateY(-4px); } }
.filtre-menu .menu-large { min-width: 320px; max-width: min(420px, calc(100vw - 32px)); }
.menu-filtre > button { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: none; color: var(--encre); text-align: left; cursor: pointer; }
.menu-filtre > button:hover, .menu-filtre > button:focus-visible { background: var(--surface-2); outline: none; }
.menu-texte { display: grid; gap: 3px; }
.menu-texte strong { font-size: 13.5px; font-weight: 600; }
.menu-texte small { font-size: 12px; }
.menu-filtre .coche { width: 15px; height: 15px; color: var(--encre); flex: none; }
.menu-titre { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--encre-3); padding: 8px 10px 6px; }
.termes-liste { list-style: none; margin: 0; padding: 0 4px 4px; }
.termes-liste li { display: flex; align-items: center; gap: 10px; padding: 7px 6px; font-size: 13.5px; color: var(--encre-2); border-radius: 6px; }
.termes-liste li.original { color: var(--encre); font-weight: 600; }
.termes-liste li small { margin-left: auto; font-weight: 400; }
.code-langue { font: 600 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; color: var(--encre-3); border: 1px solid var(--trait); border-radius: 4px; padding: 3px 4px; min-width: 24px; text-align: center; text-decoration: none; cursor: help; }
.code-vide { width: 24px; height: 1px; background: var(--trait); }
.menu-pied { display: flex; gap: 16px; padding: 8px 10px 6px; border-top: 1px solid var(--trait); margin-top: 2px; }
.lien-discret { border: 0; background: none; padding: 0; font-size: 12.5px; color: var(--encre-3); cursor: pointer; text-decoration: underline; text-decoration-color: var(--trait); text-underline-offset: 3px; }
.lien-discret:hover { color: var(--encre); text-decoration-color: currentColor; }
.boutons-vide { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* Filtre de zone en tête des suggestions de recherche */
.filtres-saisie { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 10px 10px; border-bottom: 1px solid var(--trait); margin-bottom: 4px; }
.filtres-saisie-titre { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--encre-3); margin-right: 4px; }
.filtres-saisie-titre .icone-svg { width: 14px; height: 14px; }
.filtres-saisie button { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 11px; border: 1px solid var(--trait); border-radius: 8px; background: none; color: var(--encre-2); font: 500 12.5px/1 var(--sans); cursor: pointer; }
.filtres-saisie button:hover { border-color: var(--encre-3); color: var(--encre); }
.filtres-saisie button.actif { background: var(--encre); border-color: var(--encre); color: var(--fond); }
.filtres-saisie button .coche { width: 12px; height: 12px; }
.filtres-saisie-note { margin-left: auto; font-size: 12px; color: var(--encre-3); }
@media (max-width: 560px) {
  .filtres-saisie-note { width: 100%; margin: 2px 0 0; }
  /* Une seule ligne de filtres qu'on fait glisser ; les menus s'ouvrent en panneau du bas. */
  .barre-filtres { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 14px -16px 18px; padding: 2px 16px; }
  .barre-filtres::-webkit-scrollbar { display: none; }
  .puce-filtre { flex: none; }
  .filtre-menu[open]::before { content: ''; position: fixed; inset: 0; z-index: 90; background: rgb(0 0 0 / .35); }
  .filtre-menu .menu-filtre { position: fixed; z-index: 100; left: 10px; right: 10px; top: auto; bottom: 10px; min-width: 0; max-width: none;
    padding: 10px 8px calc(10px + env(safe-area-inset-bottom)); border-radius: 16px; animation: feuille-monte .18s ease-out; }
  @keyframes feuille-monte { from { transform: translateY(16px); opacity: 0; } }
}

/* Mention « Traduit de l'anglais » sur une carte */
.traduit { border: 0; background: none; padding: 0; font-size: 12px; color: var(--encre-3); cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.traduit:hover { color: var(--encre); }

/* ---------- Attente des réseaux : grand panneau animé ---------- */
.attente-reseaux { display: grid; grid-template-columns: 168px 1fr; gap: 28px; align-items: center; margin: 16px 0 18px; padding: 26px 28px;
  border: 1px solid var(--trait); border-radius: 18px; position: relative; overflow: hidden;
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--accent) 9%, var(--surface)) 0%, var(--surface) 55%); animation: monte-panneau .3s ease-out; }
.radar { position: relative; width: 168px; height: 168px; border-radius: 50%; background: color-mix(in srgb, var(--encre) 4%, transparent); }
.radar .anneau { position: absolute; border-radius: 50%; border: 1px solid var(--trait); }
.radar .a1 { inset: 26px; }
.radar .a2 { inset: 54px; }
.radar .balayage { position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, color-mix(in srgb, var(--accent) 38%, transparent) 50deg, transparent 52deg);
  animation: tour 2.6s linear infinite; }
.radar .centre { position: absolute; inset: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--trait); color: var(--accent); box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 40%, transparent); animation: pouls 2s ease-out infinite; }
.radar .centre .icone-svg { width: 20px; height: 20px; }
.radar .point { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform: rotate(var(--angle)) translateY(-70px); }
.radar .point::before { width: 12px !important; height: 12px !important; position: absolute; left: -6px; top: -6px; box-shadow: 0 0 0 3px var(--surface); animation: clignote 2.6s ease-in-out var(--delai) infinite; }
@keyframes clignote { 0%, 100% { opacity: .35; transform: scale(.8); } 45% { opacity: 1; transform: scale(1.15); } }
.attente-corps { min-width: 0; display: grid; gap: 10px; }
.attente-titre { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.attente-titre strong { font: 600 22px/1.2 var(--serif); }
.chrono { font: 500 13px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--encre-3); font-variant-numeric: tabular-nums; }
.phase { margin: 0; font-size: 14px; color: var(--encre-2); }
.phase.change { animation: fondu .4s ease-out; }
@keyframes fondu { from { opacity: 0; transform: translateY(3px); } }
.progression { height: 4px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.progression i { display: block; height: 100%; width: 0; border-radius: inherit; transition: width 1s linear;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 50%, #ffb36b), var(--accent)); background-size: 200% 100%; animation: brille 1.8s linear infinite; }
.reseaux-lus { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; padding: 0; }
.reseaux-lus li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 20px; border: 1px solid var(--trait); font-size: 12.5px; color: var(--encre-2); background: var(--surface); }
.reseaux-lus li::before { animation: clignote 2.6s ease-in-out var(--delai) infinite; }
.attente-note { margin: 2px 0 0; font-size: 12.5px; color: var(--encre-3); }

/* Cartes fantômes en dessous, qui « respirent » */
.squelettes-media { pointer-events: none; }
.carte-fantome { break-inside: avoid; margin-bottom: 16px; border-radius: 16px; border: 1px solid var(--trait);
  background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%) 0 0 / 200% 100%;
  animation: brille 1.6s linear var(--delai) infinite; opacity: .8; }
@media (max-width: 860px) {
  .attente-reseaux { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 22px 18px; gap: 18px; }
  .attente-corps { width: 100%; }
  .attente-titre { justify-content: center; flex-wrap: wrap; }
  .attente-titre strong { font-size: 20px; }
  .reseaux-lus { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .radar .balayage, .radar .centre, .radar .point::before, .reseaux-lus li::before, .progression i, .carte-fantome { animation: none; }
}

/* ---------- Comptes : chargement, connexion, menu ---------- */
body.chargement-page > *:not(script) { visibility: hidden; }
body.non-connecte > .entete, body.non-connecte > .mise-en-page, body.non-connecte > .dock { display: none; }
.ecran-connexion { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); background: var(--fond); }
.presentation-connexion { padding: 64px clamp(32px, 6vw, 88px); display: flex; flex-direction: column; justify-content: center; gap: 22px;
  background: radial-gradient(120% 90% at 0% 100%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%), var(--surface); border-right: 1px solid var(--trait); }
.marque-grande { font: 600 44px/1 var(--serif); letter-spacing: -.02em; margin: 0; }
.marque-grande span { color: var(--accent); }
.accroche { font: 500 24px/1.35 var(--serif); margin: 0; max-width: 520px; color: var(--encre); }
.atouts { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 12px; }
.atouts li { position: relative; padding-left: 18px; color: var(--encre-2); font-size: 15px; }
.atouts li::before { content: ''; position: absolute; left: 0; top: .6em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.atouts b { color: var(--encre); font-weight: 600; }
.carte-connexion { align-self: center; justify-self: center; width: min(400px, calc(100vw - 40px)); padding: 40px 0; display: grid; gap: 14px; }
.carte-connexion h1 { font: 600 32px/1.15 var(--serif); margin: 0; }
.carte-connexion .aide { margin: 0; color: var(--encre-2); font-size: 15px; line-height: 1.5; }
.carte-connexion form { display: grid; gap: 14px; margin-top: 8px; }
.carte-connexion label, .fenetre-simple label { display: grid; gap: 6px; font-weight: 500; font-size: 13.5px; }
.carte-connexion label small { font-weight: 400; }
.carte-connexion input, .fenetre-simple input { font: inherit; font-size: 15px; padding: 12px 14px; border: 1px solid var(--trait); border-radius: 11px; background: var(--surface); color: var(--encre); }
.carte-connexion input:focus, .fenetre-simple input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
.bouton.large { width: 100%; justify-content: center; text-align: center; padding: 13px 18px; font-size: 15px; border-radius: 11px; }
.surtitre-connexion { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.mention-connexion { margin: 6px 0 0; font-size: 13px; color: var(--encre-3); line-height: 1.5; }
.encart-connexion { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--accent-doux); color: var(--encre); font-size: 13.5px; }
.enveloppe { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; background: var(--accent-doux); color: var(--accent); animation: monte-panneau .4s ease-out; }
@media (max-width: 860px) {
  .ecran-connexion { grid-template-columns: 1fr; align-content: start; }
  .presentation-connexion { padding: 32px 20px 26px; border-right: 0; border-bottom: 1px solid var(--trait); gap: 14px; }
  .marque-grande { font-size: 32px; }
  .accroche { font-size: 18px; }
  .atouts { display: none; }
  .carte-connexion { padding: 28px 0 40px; }
  .carte-connexion h1 { font-size: 27px; }
}

/* Bouton et menu du compte, en haut à droite */
.compte { position: relative; margin-left: 4px; }
.avatar-compte { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--trait); background: var(--surface-2); color: var(--encre); font: 600 12.5px/1 var(--sans); cursor: pointer; letter-spacing: .02em; }
.avatar-compte:hover, .avatar-compte[aria-expanded="true"] { border-color: var(--encre-3); }
.menu-compte { position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; width: 268px; padding: 6px; border: 1px solid var(--trait); border-radius: 14px; background: var(--surface); box-shadow: var(--ombre-forte); animation: menu-entre .12s ease-out; }
.menu-compte-tete { display: grid; gap: 2px; padding: 10px 10px 12px; border-bottom: 1px solid var(--trait); }
.menu-compte-tete strong { font-size: 14px; }
.menu-compte-tete small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-compte-quota { display: grid; grid-template-columns: 1fr auto; gap: 6px 8px; align-items: center; padding: 12px 10px; border-bottom: 1px solid var(--trait); margin-bottom: 4px; font-size: 12.5px; color: var(--encre-3); }
.menu-compte-quota b { color: var(--encre); font-variant-numeric: tabular-nums; }
.menu-compte-quota .jauge { grid-column: 1 / -1; height: 4px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.menu-compte-quota .jauge i { display: block; height: 100%; background: var(--encre); border-radius: inherit; }
.menu-compte button { display: block; width: 100%; text-align: left; padding: 9px 10px; border: 0; border-radius: 8px; background: none; color: var(--encre); font-size: 13.5px; cursor: pointer; }
.menu-compte button:hover, .menu-compte button:focus-visible { background: var(--surface-2); outline: none; }

/* Fenêtre « Inviter quelqu'un » */
.fenetre-simple form { gap: 14px; }
.fenetre-simple .aide { margin: -4px 0 0; color: var(--encre-2); font-size: 14px; }
.lien-invitation { display: flex; gap: 8px; }
.lien-invitation input { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.fenetre-simple .boutons { display: flex; justify-content: flex-end; gap: 8px; }

/* Tableau des comptes (administration) */
.tableau-comptes { margin-top: 18px; border: 1px solid var(--trait); border-radius: 14px; overflow-x: auto; background: var(--surface); }
.tableau-comptes table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tableau-comptes th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--encre-3); padding: 12px 14px; border-bottom: 1px solid var(--trait); white-space: nowrap; }
.tableau-comptes td { padding: 12px 14px; border-bottom: 1px solid var(--trait); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tableau-comptes tr:last-child td { border-bottom: 0; }
.tableau-comptes td small { display: block; margin-top: 2px; }
