/* ═══════════════════════════════════════════════
   Terres Communes — Forum des Cercles
   Palette : vert forêt, bleu nuit, terre cuite
═══════════════════════════════════════════════ */

:root {
  --vert:       #2d6a4f;
  --vert-clair: #52b788;
  --bleu:       #1d3557;
  --bleu-clair: #2e6185;  /* sombre → 6:1 sur blanc (WCAG AA) */
  --terre:      #e76f51;
  --sable:      #f4e9d8;
  --blanc:      #fafaf8;
  --gris:       #6b7280;
  --gris-clair: #e5e7eb;
  --texte:      #1a1a2e;
  --radius:     8px;
  --shadow:     0 2px 8px rgba(0,0,0,.08);
  --shadow-md:  0 4px 16px rgba(0,0,0,.12);
  --card-bg:    white;
  --bg-sec:     #f8fafc;
  --bg-code:    #f1f5f9;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  background: var(--blanc);
  color: var(--texte);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Typographie ── */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.3; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
p  { margin-bottom: .8rem; }
a  { color: var(--vert); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Header ── */
header {
  background: var(--bleu);
  color: white;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  text-decoration: none;
}
.brand:hover { text-decoration: none; opacity: .9; }
.brand-sub { font-size: .75rem; font-weight: 400; opacity: .7; display: block; }

nav { display: flex; align-items: center; gap: 1rem; }
nav a, .lien-manifeste { color: rgba(255,255,255,.85); font-family: sans-serif; font-size: .9rem; }
nav a:hover, .lien-manifeste:hover { color: white; text-decoration: none; }

.btn { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem 1.2rem; border-radius: var(--radius); border: none; cursor: pointer; font-size: .9rem; font-family: sans-serif; transition: opacity .15s, transform .1s; }
.btn:hover { opacity: .9; transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-primary   { background: var(--vert); color: white; }
.btn-secondary { background: var(--gris-clair); color: var(--texte); }
.btn-outline   { background: transparent; border: 1.5px solid currentColor; }
.btn-sm  { padding: .3rem .8rem; font-size: .8rem; }
.btn-danger { background: #e74c3c; color: white; }

/* ── Layout principal ── */
.layout { display: flex; flex: 1; max-width: 1280px; margin: 0 auto; width: 100%; padding: 2rem 1.5rem; gap: 0; }
.sidebar { flex: 0 0 260px; max-width: 260px; min-width: 0; overflow: hidden; }
.main { flex: 1; min-width: 0; }

/* ── Sidebar Cercles ── */
.cercles-nav { background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.cercles-nav-header { padding: 1rem 1.25rem; background: var(--sable); font-family: sans-serif; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--gris); }
.cercle-item { display: flex; align-items: flex-start; gap: .75rem; padding: .9rem 1.25rem; border-bottom: 1px solid var(--gris-clair); cursor: pointer; transition: background .12s; text-decoration: none; color: inherit; }
.cercle-item:last-child { border-bottom: none; }
.cercle-item:hover { background: var(--sable); text-decoration: none; }
.cercle-item.active { background: var(--sable); border-left: 3px solid var(--vert); }
.cercle-icone { font-size: 1.2rem; margin-top: .1rem; }
.cercle-nom { font-weight: 600; font-size: .9rem; line-height: 1.3; }
.cercle-stats { font-size: .75rem; color: var(--gris); font-family: sans-serif; margin-top: .1rem; }

/* ── Cartes Cercles (vue accueil) ── */
.cercles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.25rem; }
.cercle-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  border-top: 4px solid var(--vert);
  cursor: pointer;
  transition: box-shadow .15s, transform .15s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.cercle-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); text-decoration: none; }
.cercle-card-header { display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; }
.cercle-card-icone { font-size: 1.75rem; }
.cercle-card-nom { font-size: 1.1rem; font-weight: 700; }
.cercle-card-desc { font-size: .9rem; color: #444; line-height: 1.5; margin-bottom: 1rem; }
.cercle-card-footer { display: flex; gap: 1rem; font-size: .8rem; color: var(--gris); font-family: sans-serif; }

/* ── Sous-thèmes ── */
.sous-themes-nav { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.25rem; align-items: center; }
.st-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .85rem; border-radius: 100px; border: 1.5px solid var(--gris-clair); background: var(--card-bg); cursor: pointer; font-size: .85rem; font-family: sans-serif; transition: all .12s; text-decoration: none; color: var(--texte); }
.st-chip:hover { border-color: var(--vert); color: var(--vert); text-decoration: none; }
.st-chip.actif { background: var(--vert); border-color: var(--vert); color: white; font-weight: 700; }
.st-chip.tous { border-style: dashed; }
.st-chip-count { font-size: .75rem; opacity: .75; }
.st-chip-new { border-color: var(--vert); color: var(--vert); }
.st-chip-new:hover { background: var(--vert); color: white; }

/* ── Barre de recherche dans un fil ── */
.recherche-barre { background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); padding: .75rem 1rem; margin-bottom: 1rem; display: flex; gap: .6rem; align-items: center; }
.recherche-barre input { flex: 1; border: 1.5px solid var(--gris-clair); border-radius: var(--radius); padding: .45rem .8rem; font-family: sans-serif; font-size: .9rem; transition: border-color .12s; }
.recherche-barre input:focus { outline: none; border-color: var(--bleu-clair); }
.recherche-resultats { background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 1rem; }
.recherche-resultats-header { padding: .6rem 1.25rem; background: var(--sable); font-family: sans-serif; font-size: .8rem; color: var(--gris); display: flex; align-items: center; justify-content: space-between; }
.resultat-item { padding: .9rem 1.25rem; border-bottom: 1px solid var(--gris-clair); cursor: pointer; transition: background .1s; }
.resultat-item:last-child { border-bottom: none; }
.resultat-item:hover { background: var(--sable); }
.resultat-auteur { font-size: .8rem; font-family: sans-serif; color: var(--gris); margin-bottom: .3rem; }
.resultat-extrait { font-size: .9rem; line-height: 1.5; }
.surbrillance { background: #fef08a; border-radius: 2px; padding: 0 .1rem; font-weight: 700; }

/* ── Compteurs et favori dans les fils ── */
.fil-compteurs { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; margin-left: auto; padding-left: .75rem; }
.fil-compteur { display: inline-flex; align-items: center; gap: .3rem; font-size: .85rem; color: var(--gris); font-family: sans-serif; white-space: nowrap; }
.fil-compteur svg { flex-shrink: 0; }
.btn-star { background: none; border: none; cursor: pointer; font-size: 1.15rem; line-height: 1; padding: .15rem .3rem; border-radius: var(--radius); color: var(--gris-clair); transition: color .12s, transform .1s; }
.btn-star:hover { color: #f59e0b; transform: scale(1.2); }
.btn-star.actif { color: #f59e0b; }
.btn-pin { background: none; border: none; cursor: pointer; font-size: 1.05rem; line-height: 1; padding: .15rem .3rem; border-radius: var(--radius); opacity: .3; transition: opacity .12s, transform .1s; }
.btn-pin:hover { opacity: .75; transform: scale(1.15); }
.btn-pin.actif { opacity: 1; }

/* ── Fils de discussion ── */
.fils-list { display: flex; flex-direction: column; gap: .75rem; }
.fil-item {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  cursor: pointer;
  transition: box-shadow .12s;
  text-decoration: none;
  color: inherit;
}
.fil-item:hover { box-shadow: var(--shadow-md); text-decoration: none; }
.fil-item.epingle { border-left: 3px solid var(--terre); }
.fil-meta { display: flex; flex-wrap: wrap; gap: .4rem .8rem; font-size: .8rem; color: var(--gris); font-family: sans-serif; margin-top: .25rem; }
.fil-titre { font-weight: 600; font-size: 1rem; margin-bottom: .2rem; }
.fil-icon { font-size: 1.5rem; margin-top: .1rem; color: var(--gris-clair); }
.fil-icon.epingle { color: var(--terre); }
.badge { display: inline-block; padding: .15rem .5rem; border-radius: 100px; font-size: .7rem; font-weight: 700; font-family: sans-serif; }
.badge-vert  { background: #d1fae5; color: #065f46; }
.badge-bleu  { background: #dbeafe; color: #1e3a8a; }

/* ── Vue fil / messages ── */
.fil-header { background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; margin-bottom: 1.5rem; }
.fil-cercle-breadcrumb { font-family: sans-serif; font-size: .8rem; color: var(--gris); margin-bottom: .5rem; }
.fil-cercle-breadcrumb a { color: var(--vert); }

.message-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.message-card.reponse { margin-left: 2.5rem; border-left: 3px solid var(--gris-clair); }
.message-auteur { display: flex; align-items: center; gap: .6rem; margin-bottom: .75rem; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--vert); color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem; font-family: sans-serif; flex-shrink: 0; }
.auteur-nom { font-weight: 700; font-size: .9rem; font-family: sans-serif; }
.auteur-loc { font-size: .75rem; color: var(--gris); font-family: sans-serif; }
.message-date { font-size: .75rem; color: var(--gris); font-family: sans-serif; margin-left: auto; }
.message-contenu { font-size: .95rem; line-height: 1.7; white-space: pre-wrap; }
.message-actions { display: flex; align-items: center; gap: .75rem; margin-top: 1rem; padding-top: .75rem; border-top: 1px solid var(--gris-clair); flex-wrap: wrap; }
.reaction-btn { display: flex; align-items: center; gap: .3rem; padding: .25rem .6rem; border-radius: 100px; border: 1.5px solid var(--gris-clair); background: var(--card-bg); cursor: pointer; font-size: .8rem; font-family: sans-serif; transition: all .12s; }
.reaction-btn:hover { border-color: var(--vert); color: var(--vert); }
.reaction-btn.actif { border-color: var(--vert); background: #d1fae5; color: var(--vert); }
.reaction-count { font-weight: 700; }

/* ── Formulaire nouveau message ── */
.form-card { background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; margin-top: 1.5rem; }
.form-card h3 { margin-bottom: 1rem; }
.badge-niveau { display: inline-block; font-size: .72rem; font-weight: 700; font-family: sans-serif; padding: .15rem .55rem; border-radius: 1rem; letter-spacing: .02em; }
.badge-niveau--lg { font-size: .85rem; padding: .25rem .75rem; }
.stats-utilisateur { display: flex; gap: 1.5rem; flex-wrap: wrap; padding: .75rem 0 1.25rem; border-bottom: 1px solid var(--gris-clair); margin-bottom: 1.25rem; }
.stat-item { display: flex; flex-direction: column; align-items: center; min-width: 80px; }
.stat-valeur { font-size: 1.1rem; font-weight: 700; color: var(--vert-fonce); font-family: sans-serif; }
.stat-label { font-size: .75rem; color: var(--gris); font-family: sans-serif; margin-top: .1rem; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: .85rem; font-weight: 700; font-family: sans-serif; margin-bottom: .35rem; }
.form-control { width: 100%; padding: .6rem .8rem; border: 1.5px solid var(--gris-clair); border-radius: var(--radius); font-family: inherit; font-size: .95rem; color: var(--texte); transition: border-color .12s; }
.form-control:focus { outline: none; border-color: var(--vert); }
textarea.form-control { resize: vertical; min-height: 120px; }
.form-actions { display: flex; gap: .75rem; justify-content: flex-end; }
.pwd-wrapper { position: relative; }
.pwd-wrapper .form-control { padding-right: 5.5rem; box-sizing: border-box; }
.pwd-toggle { position: absolute; right: .6rem; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--vert); font-size: .78rem; font-family: sans-serif; font-weight: 600; cursor: pointer; padding: .2rem .4rem; border-radius: 3px; white-space: nowrap; }
.pwd-toggle:hover { background: #eaf3ee; }

/* ── Éditeur Markdown (toolbar + prévisualisation) ── */
.md-wrap { display: flex; flex-direction: column; position: relative; }
.md-toolbar { display: flex; align-items: center; gap: .2rem; padding: .35rem .5rem; background: var(--bg-sec); border: 1.5px solid var(--gris-clair); border-bottom: none; border-radius: var(--radius) var(--radius) 0 0; flex-wrap: wrap; }
.md-btn { background: none; border: 1px solid transparent; border-radius: 4px; cursor: pointer; font-size: .78rem; padding: .2rem .45rem; color: var(--texte); line-height: 1.4; font-family: inherit; transition: background .1s; white-space: nowrap; }
.md-btn:hover { background: #e2e8f0; }
.md-sep { width: 1px; height: 1.1rem; background: var(--gris-clair); margin: 0 .15rem; flex-shrink: 0; }
.md-textarea { border-radius: 0 0 var(--radius) var(--radius) !important; border-top: none !important; }
.md-preview-area { border: 1.5px solid var(--gris-clair); border-top: none; border-radius: 0 0 var(--radius) var(--radius); padding: .75rem 1rem; min-height: 80px; background: var(--card-bg); }
.btn-signaler { background: none; border: none; cursor: pointer; color: var(--gris); font-size: .72rem; font-family: sans-serif; padding: .2rem .45rem; border-radius: .25rem; transition: color .15s, background .15s; }
.btn-signaler:hover { color: #e74c3c; background: #fdf2f2; }
.mention-dropdown { position: fixed; background: var(--card-bg); border: 1.5px solid var(--bleu-clair); border-radius: var(--radius); box-shadow: var(--shadow); z-index: 1000; max-height: 200px; overflow-y: auto; }
.mention-item { padding: .4rem .8rem; cursor: pointer; font-size: .875rem; font-family: sans-serif; color: var(--texte); }
.mention-item:hover { background: #eff6ff; color: var(--bleu-clair); }
.mention { background: #dbeafe; color: #1d4ed8; border-radius: 3px; padding: .05em .3em; font-weight: 600; font-size: .9em; }

/* ── Rendu Markdown dans les messages (.prose) ── */
.prose { line-height: 1.65; }
.prose > * + * { margin-top: .6rem; }
.prose h1, .prose h2, .prose h3 { font-weight: 700; margin: 1rem 0 .35rem; }
.prose h1 { font-size: 1.3rem; }
.prose h2 { font-size: 1.1rem; }
.prose h3 { font-size: 1rem; }
.prose ul, .prose ol { padding-left: 1.5rem; }
.prose li { margin: .2rem 0; }
.prose code { background: var(--bg-code); border-radius: 3px; padding: .1em .35em; font-size: .875em; font-family: 'Courier New', monospace; }
.prose pre { background: var(--bg-code); border-radius: var(--radius); padding: .75rem 1rem; overflow-x: auto; margin: .5rem 0; }
.prose pre code { background: none; padding: 0; }
.prose blockquote { border-left: 3px solid var(--bleu-clair); padding: .25rem .75rem; color: var(--gris); margin: .5rem 0; }
.prose a { color: var(--bleu-clair); text-decoration: underline; }
.prose strong { font-weight: 700; }
.prose em { font-style: italic; }
.prose hr { border: none; border-top: 1px solid var(--gris-clair); margin: 1rem 0; }
.prose table { border-collapse: collapse; font-size: .9rem; }
.prose th, .prose td { border: 1px solid var(--gris-clair); padding: .3rem .6rem; }
.prose th { background: var(--bg-sec); font-weight: 600; }
.prose > *:first-child { margin-top: 0; }
.prose > *:last-child { margin-bottom: 0; }

/* ── Modal ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; z-index: 200; padding: 1rem; }
.modal { background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow-md); width: 100%; max-width: 480px; padding: 2rem; }
.modal h2 { margin-bottom: 1.5rem; }
.modal-tabs { display: flex; gap: 0; margin-bottom: 1.5rem; border-bottom: 2px solid var(--gris-clair); }
.modal-tab { padding: .5rem 1.25rem; background: none; border: none; cursor: pointer; font-size: .9rem; font-family: sans-serif; color: var(--gris); border-bottom: 2px solid transparent; margin-bottom: -2px; transition: color .12s; }
.modal-tab.active { color: var(--vert); border-bottom-color: var(--vert); font-weight: 700; }

/* ── Toast ── */
.toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; display: flex; flex-direction: column; gap: .5rem; z-index: 300; }
.toast { padding: .75rem 1.25rem; border-radius: var(--radius); color: white; font-family: sans-serif; font-size: .9rem; box-shadow: var(--shadow-md); animation: slide-in .2s ease; max-width: 340px; }
.toast-success { background: var(--vert); }
.toast-error   { background: #e74c3c; }
.toast-info    { background: var(--bleu-clair); }
@keyframes slide-in { from { transform: translateX(100%); opacity: 0; } to { transform: none; opacity: 1; } }

/* ── Page héro ── */
.hero { text-align: center; padding: 4rem 2rem 3rem; max-width: 760px; margin: 0 auto; }
.hero h1 { font-size: 2.5rem; color: var(--bleu); margin-bottom: 1rem; }
.hero p { font-size: 1.1rem; color: #444; margin-bottom: 2rem; }
.hero-quote { font-style: italic; border-left: 3px solid var(--vert); padding: .75rem 1.25rem; margin: 1.5rem auto; max-width: 600px; color: #555; text-align: left; background: var(--sable); border-radius: 0 var(--radius) var(--radius) 0; }

/* ── État vide ── */
.empty-state { text-align: center; padding: 4rem 2rem; color: var(--gris); }
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h3 { color: var(--texte); margin-bottom: .5rem; }

/* ── Filtre et pagination (page Cercle) ── */
.filtre-barre { display: flex; gap: .6rem; align-items: center; margin-bottom: 1rem; background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); padding: .65rem 1rem; }
.filtre-input { flex: 1; min-width: 0; border: 1.5px solid var(--gris-clair); border-radius: var(--radius); padding: .45rem .8rem; font-family: sans-serif; font-size: .9rem; transition: border-color .12s; }
.filtre-input:focus { outline: none; border-color: var(--bleu-clair); }
.filtre-select { border: 1.5px solid var(--gris-clair); border-radius: var(--radius); padding: .45rem .75rem; font-family: sans-serif; font-size: .85rem; background: var(--card-bg); color: var(--texte); cursor: pointer; transition: border-color .12s; }
.filtre-select:focus { outline: none; border-color: var(--bleu-clair); }
.pagination-barre { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1.25rem; }

/* ── Loading ── */
.loading { display: flex; align-items: center; justify-content: center; padding: 3rem; }
.spinner { width: 36px; height: 36px; border: 3px solid var(--gris-clair); border-top-color: var(--vert); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Canaux privés — sidebar ── */
.canaux-nav { background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-top: 1rem; }
.canaux-nav-header { padding: .75rem 1.25rem; background: var(--sable); font-family: sans-serif; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--gris); display: flex; align-items: center; justify-content: space-between; }
.canal-item { display: flex; align-items: center; gap: .6rem; padding: .75rem 1.25rem; border-bottom: 1px solid var(--gris-clair); cursor: pointer; transition: background .12s; text-decoration: none; color: inherit; }
.canal-item:last-child { border-bottom: none; }
.canal-item:hover { background: var(--sable); text-decoration: none; }
.canal-item.active { background: var(--sable); border-left: 3px solid var(--bleu-clair); }
.canal-nom { font-size: .875rem; font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.canal-apercu { font-size: .75rem; color: var(--gris); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge-non-lus { background: #b91c1c; color: white; border-radius: 100px; font-size: .7rem; font-weight: 700; padding: .1rem .45rem; font-family: sans-serif; flex-shrink: 0; } /* #b91c1c → 6.25:1 avec blanc */

/* ── Vue canal (messagerie) ── */
.canal-layout { display: flex; flex-direction: column; height: calc(100vh - 120px); max-width: 820px; margin: 0 auto; }
.canal-entete { background: var(--card-bg); border-radius: var(--radius) var(--radius) 0 0; box-shadow: var(--shadow); padding: 1rem 1.5rem; display: flex; align-items: center; gap: 1rem; flex-shrink: 0; }
.canal-entete h2 { font-size: 1.1rem; flex: 1; }
.canal-membres-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.membre-chip { display: flex; align-items: center; gap: .3rem; background: var(--gris-clair); border-radius: 100px; padding: .2rem .6rem; font-size: .75rem; font-family: sans-serif; }
.membre-chip .avatar { width: 22px; height: 22px; font-size: .6rem; }

.messages-prives { flex: 1; overflow-y: auto; padding: 1rem 1.5rem; display: flex; flex-direction: column; gap: .6rem; background: var(--blanc); border-left: 1px solid var(--gris-clair); border-right: 1px solid var(--gris-clair); }
.msg-prive { display: flex; gap: .75rem; align-items: flex-start; }
.msg-prive.moi { flex-direction: row-reverse; }
.msg-prive-bulle { max-width: 72%; padding: .6rem .9rem; border-radius: 12px; font-size: .9rem; line-height: 1.5; word-break: break-word; }
.msg-prive:not(.moi) .msg-prive-bulle { background: var(--card-bg); border: 1px solid var(--gris-clair); border-radius: 0 12px 12px 12px; }
.msg-prive.moi       .msg-prive-bulle { background: var(--vert); color: white; border-radius: 12px 0 12px 12px; }
.msg-prive-meta { font-size: .7rem; color: var(--gris); font-family: sans-serif; margin-top: .2rem; }
.msg-prive.moi .msg-prive-meta { text-align: right; }
.msg-date-separateur { text-align: center; font-size: .75rem; color: var(--gris); font-family: sans-serif; margin: .5rem 0; }

.canal-saisie { background: var(--card-bg); border-radius: 0 0 var(--radius) var(--radius); border-top: 1px solid var(--gris-clair); box-shadow: var(--shadow); padding: .75rem 1rem; display: flex; gap: .75rem; align-items: flex-end; flex-shrink: 0; }
.canal-saisie textarea { flex: 1; border: 1.5px solid var(--gris-clair); border-radius: var(--radius); padding: .5rem .75rem; font-family: inherit; font-size: .9rem; resize: none; min-height: 42px; max-height: 140px; transition: border-color .12s; }
.canal-saisie textarea:focus { outline: none; border-color: var(--bleu-clair); }

/* ── Poignée collapse sidebar (resize handle) ── */
.sidebar-handle {
  width: 20px;
  flex-shrink: 0;
  margin: 0 6px;
  cursor: col-resize;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background .15s;
  z-index: 10;
}
.sidebar-handle::after {
  content: '⋮';
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gris);
  opacity: 0;
  transition: color .15s, opacity .15s;
  pointer-events: none;
  user-select: none;
}
.sidebar-handle:hover { background: var(--gris-clair); }
.sidebar-handle:hover::after { opacity: 1; color: var(--bleu); }

/* Collapsed : bouton expand clairement visible */
body.sidebar-collapsed .sidebar-handle { background: var(--gris-clair); }
body.sidebar-collapsed .sidebar-handle::after {
  content: '▸';
  font-size: 1.2rem;
  color: var(--bleu);
  opacity: 1;
}
body.sidebar-collapsed .sidebar-handle:hover { background: var(--bleu); }
body.sidebar-collapsed .sidebar-handle:hover::after { color: white; }

/* ── Overlay mobile ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 64px; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.45);
  z-index: 198;
  cursor: pointer;
}

/* ── Desktop : collapse sidebar ── */
@media (min-width: 769px) {
  .sidebar { transition: max-width .22s ease, opacity .18s ease; }
  body.sidebar-collapsed .sidebar {
    max-width: 0;
    opacity: 0;
    pointer-events: none;
  }
}

/* ── Bottom navigation (mobile) ── */
.bottom-nav { display: none; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .layout { padding: 1rem 1rem 5rem; }
  .cercles-grid { grid-template-columns: 1fr; }
  header { padding: 0 1rem; }
  .hero h1 { font-size: 1.8rem; }

  /* Masquer nav header sur mobile — remplacé par la bottom nav */
  #nav-auth { display: none !important; }
  .sidebar-handle { display: none; }
  .toast-container { bottom: 4.5rem; }

  /* Sidebar : drawer latéral fixe (au-dessus de la bottom nav) */
  .sidebar {
    position: fixed;
    top: 64px; left: 0; bottom: 56px;
    width: 280px;
    z-index: 199;
    overflow-y: auto;
    background: var(--blanc);
    padding: 1rem;
    transform: translateX(-100%);
    transition: transform .25s ease;
  }
  body.sidebar-open .sidebar {
    transform: translateX(0);
    box-shadow: var(--shadow-md);
  }
  body.sidebar-open .sidebar-overlay { display: block; }
  .sidebar-overlay { bottom: 56px; }

  /* ── Bottom nav ── */
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 56px;
    background: var(--bleu);
    z-index: 200;
    box-shadow: 0 -2px 8px rgba(0,0,0,.18);
    justify-content: space-around;
    align-items: stretch;
  }
  .bnav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: none;
    border: none;
    color: rgba(255,255,255,.6);
    cursor: pointer;
    font-family: sans-serif;
    text-decoration: none;
    transition: color .15s, background .15s;
    padding: 0;
    border-radius: 0;
  }
  .bnav-item:hover, .bnav-item.active {
    color: white;
    background: rgba(255,255,255,.1);
    text-decoration: none;
  }
  .bnav-icon { font-size: 1.25rem; line-height: 1; }
  .bnav-label { font-size: .58rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
}

/* ══════════════════════════════════════════════════
   THÈME SOMBRE — VS Code Dark+
   Ratios WCAG AA garantis sur tous les fonds sombres
══════════════════════════════════════════════════ */

[data-theme="dark"] {
  /* ── Backgrounds (VS Code Dark+) ── */
  --blanc:      #1e1e1e;    /* fond principal — éditeur VS Code */
  --sable:      #252526;    /* fond sidebar / zones secondaires */
  --card-bg:    #2d2d30;    /* fond cartes et panneaux */
  --bg-sec:     #252526;    /* fond barres d'outils */
  --bg-code:    #1e1e1e;    /* fond blocs de code */
  --gris-clair: #3e3e42;    /* bordures et séparateurs */

  /* ── Texte (ratios vérifiés sur #1e1e1e) ── */
  --texte:      #cccccc;    /* 12.6:1 — texte principal VS Code exact */
  --gris:       #a0a0a0;    /*  6.5:1 — texte secondaire */

  /* ── Couleurs d'action (VS Code) ── */
  --vert:       #0e639c;    /* btn-primary, chips actifs, avatars — VS Code button.background */
  --vert-clair: #4fc1ff;    /*  8.1:1 sur #1e1e1e — liens, survols, actifs */

  /* ── Ombres ── */
  --shadow:     0 2px 8px rgba(0,0,0,.55);
  --shadow-md:  0 4px 20px rgba(0,0,0,.75);
}

/* ── Liens et navigation ── */
[data-theme="dark"] a                  { color: var(--vert-clair); }
[data-theme="dark"] .brand             { color: white; }
[data-theme="dark"] a.brand:hover      { color: rgba(255,255,255,.9); }
[data-theme="dark"] a.site-footer-brand        { color: white; }
[data-theme="dark"] a.site-footer-brand:hover  { color: rgba(255,255,255,.9); }
[data-theme="dark"] .site-footer-nav a         { color: rgba(255,255,255,.85); }
[data-theme="dark"] nav a              { color: rgba(255,255,255,.85); }
/* force le rendu texte des emojis (ex: ⚡) pour qu'ils héritent de color — les deux thèmes */
.cercle-icone,
.cercle-page-icone,
.cercle-table-icone,
.cercle-card-icone                     { font-variant-emoji: text; }
[data-theme="dark"] .cercle-icone      { color: var(--vert-clair); }
[data-theme="dark"] .cercle-card-icone { color: var(--vert-clair); }
[data-theme="dark"] .cercle-page-icone { color: var(--texte); }
.cercle-table-icone                    { color: var(--vert); }
[data-theme="dark"] .cercle-table-icone { color: var(--vert-clair); }

/* ── Couleurs inline générées par JS ── */
[data-theme="dark"] #app h1                  { color: var(--texte) !important; }
[data-theme="dark"] #app a[style*="color"]   { color: var(--vert-clair) !important; }
[data-theme="dark"] #app p[style*="color:#555"],
[data-theme="dark"] #app p[style*="color: #555"] { color: var(--gris) !important; }

/* ── Accent bleu VS Code ── */
[data-theme="dark"] .st-chip:hover          { border-color: var(--vert-clair); color: var(--vert-clair); }
[data-theme="dark"] .st-chip-new            { border-color: var(--vert-clair); color: var(--vert-clair); }
[data-theme="dark"] .modal-tab.active       { color: var(--vert-clair); border-bottom-color: var(--vert-clair); }
[data-theme="dark"] .reaction-btn           { background: #3c3c3c; color: #cccccc; border-color: #6e6e6e; }
[data-theme="dark"] .reaction-btn:hover     { background: #3c3c3c; border-color: var(--vert-clair); color: var(--vert-clair); }
[data-theme="dark"] .fil-cercle-breadcrumb a { color: var(--vert-clair); }

/* ── Formulaires ── */
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background:   #3c3c3c;
  color:        var(--texte);
  border-color: var(--gris-clair);
  color-scheme: dark;
}
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder { color: var(--gris); }

[data-theme="dark"] .pwd-toggle       { color: var(--vert-clair); }
[data-theme="dark"] .pwd-toggle:hover { background: rgba(79,193,255,.12); }

/* ── Toolbar Markdown ── */
[data-theme="dark"] .md-btn       { color: var(--texte); }
[data-theme="dark"] .md-btn:hover { background: var(--gris-clair); }

/* ── Badges ── */
[data-theme="dark"] .badge-vert    { background: rgba(14,99,156,.30); color: #4fc1ff; }
[data-theme="dark"] .badge-bleu    { background: rgba(30,58,138,.35); color: #93c5fd; }
[data-theme="dark"] .badge-non-lus { background: #b91c1c; }

/* ── Mentions @username ── */
[data-theme="dark"] .mention              { background: rgba(37,99,235,.28); color: #93c5fd; }
[data-theme="dark"] .mention-item:hover   { background: #264f78; color: #9cdcfe; }
[data-theme="dark"] .mention-dropdown     { border-color: var(--gris-clair); }

/* ── Réaction active ── */
[data-theme="dark"] .reaction-btn.actif {
  background:   rgba(79,193,255,.14);
  color:        var(--vert-clair);
  border-color: var(--vert-clair);
}

/* ── Signalement ── */
[data-theme="dark"] .btn-signaler:hover { color: #f87171; background: rgba(239,68,68,.1); }

/* ── Textes hardcodés non adaptés au sombre ── */
[data-theme="dark"] .cercle-card            { border-top-color: var(--vert-clair); }
[data-theme="dark"] .cercle-card-desc       { color: var(--gris); }
[data-theme="dark"] .hero p                 { color: var(--texte); }
[data-theme="dark"] .hero-quote             { color: var(--texte); background: var(--sable); }

/* ── Surlignage de recherche ── */
[data-theme="dark"] .surbrillance   { background: #854d0e; color: #fef08a; }
[data-theme="dark"] .modal-overlay  { background: rgba(0,0,0,.78); }

/* ── Inline backgrounds générés par JS (app.js) ── */
[data-theme="dark"] #app [style*="background:white"],
[data-theme="dark"] #app [style*="background: white"] { background: var(--card-bg) !important; }
[data-theme="dark"] #app table[style*="background:white"],
[data-theme="dark"] #app thead tr[style*="background:var(--sable)"] { background: var(--sable) !important; }

/* ══════════════════════════════════════════════════
   POLICE OPEN DYSLEXIC
══════════════════════════════════════════════════ */

@font-face {
  font-family: 'OpenDyslexic';
  src: url('https://cdn.jsdelivr.net/npm/opendyslexic/OpenDyslexic-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

[data-font="dyslexic"] body,
[data-font="dyslexic"] p,
[data-font="dyslexic"] span:not(.bnav-icon):not(.cercle-icone):not(.badge):not(.empty-icon),
[data-font="dyslexic"] div,
[data-font="dyslexic"] a,
[data-font="dyslexic"] button,
[data-font="dyslexic"] label,
[data-font="dyslexic"] input,
[data-font="dyslexic"] textarea,
[data-font="dyslexic"] select,
[data-font="dyslexic"] th,
[data-font="dyslexic"] td,
[data-font="dyslexic"] li,
[data-font="dyslexic"] h1,
[data-font="dyslexic"] h2,
[data-font="dyslexic"] h3,
[data-font="dyslexic"] h4 {
  font-family: 'OpenDyslexic', sans-serif;
  letter-spacing: .03em;
  word-spacing: .15em;
  line-height: 1.9;
}

/* ══════════════════════════════════════════════════
   ACCESSIBILITÉ — SKIP LINK & FOCUS
══════════════════════════════════════════════════ */

.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 9999;
  background: var(--vert);
  color: white;
  padding: .75rem 1.5rem;
  font-family: sans-serif;
  font-size: .9rem;
  font-weight: 700;
  border-radius: 0 0 var(--radius) 0;
  text-decoration: none;
  transition: top .1s;
}
.skip-link:focus { top: 0; }

:focus-visible {
  outline: 3px solid var(--vert-clair);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ══════════════════════════════════════════════════
   PANEL D'ACCESSIBILITÉ
══════════════════════════════════════════════════ */

.a11y-toggle {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 190;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bleu);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.a11y-toggle:hover { background: var(--bleu-clair); }

.a11y-panel {
  position: fixed;
  right: 1.25rem;
  bottom: 5rem;
  z-index: 190;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gris-clair);
  padding: 1rem;
  width: 266px;
  font-family: sans-serif;
  color: var(--texte);
}

.a11y-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .75rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--gris-clair);
}

.a11y-panel-title { font-weight: 700; font-size: .9rem; }

.a11y-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gris);
  font-size: 1.1rem;
  padding: .2rem .4rem;
  border-radius: 4px;
  line-height: 1;
  transition: color .12s, background .12s;
}
.a11y-close:hover { color: var(--texte); background: var(--gris-clair); }

.a11y-group { margin-bottom: .75rem; }
.a11y-group:last-child { margin-bottom: 0; }

.a11y-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gris);
  margin-bottom: .4rem;
}

.a11y-theme-btns { display: flex; gap: .3rem; }

.a11y-btn {
  flex: 1;
  background: var(--gris-clair);
  color: var(--texte);
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: .35rem .45rem;
  font-size: .78rem;
  cursor: pointer;
  font-family: sans-serif;
  transition: background .12s;
  white-space: nowrap;
  text-align: center;
}
.a11y-btn:hover { background: var(--bleu-clair); color: white; }
.a11y-btn--active { background: var(--vert) !important; color: white !important; }

.a11y-btn-full {
  flex: none;
  width: 100%;
  text-align: left;
  padding: .45rem .75rem;
  font-size: .82rem;
}

@media (max-width: 768px) {
  .a11y-toggle { bottom: 4.5rem; }
  .a11y-panel  { bottom: 8.5rem; right: .75rem; }
}

/* ── Overlay maintenance ─────────────────────────────────────────────── */
#maintenance-overlay {
  position: fixed;
  inset: 0;
  background: var(--blanc);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}
.maintenance-box h2 {
  font-size: 1.6rem;
  color: var(--texte);
  margin-bottom: .75rem;
}
.maintenance-box > p {
  font-family: sans-serif;
  color: var(--gris);
  line-height: 1.75;
  max-width: 360px;
  margin: 0 auto 1.5rem;
}

/* ── Landing hero (visible avant JS — contenu SEO indexable) ─────────── */
.landing-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 3rem 1.5rem;
}
.landing-hero-inner {
  max-width: 680px;
  text-align: center;
}
.landing-hero-eyebrow {
  font-size: .75rem;
  font-family: sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--vert);
  margin-bottom: 1.25rem;
}
.landing-hero h1 {
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  line-height: 1.3;
  color: var(--texte);
  margin-bottom: 1.5rem;
}
.landing-hero p {
  font-family: sans-serif;
  font-size: .95rem;
  line-height: 1.75;
  color: var(--gris);
  margin-bottom: .9rem;
}
.landing-hero-baseline {
  margin-top: 1.5rem;
  color: var(--texte) !important;
  font-size: 1rem !important;
}
[data-theme="dark"] .landing-hero-eyebrow { color: var(--vert-clair); }

/* ── Page Manifeste (route SPA /manifeste) ───────────────────────────── */
.manifeste-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}
.manifeste-hero {
  text-align: center;
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--gris-clair);
  margin-bottom: 2.5rem;
}
.manifeste-eyebrow {
  font-size: .75rem;
  font-family: sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--vert);
  margin-bottom: 1rem;
}
[data-theme="dark"] .manifeste-eyebrow { color: var(--vert-clair); }
.manifeste-hero h1 {
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  line-height: 1.25;
  color: var(--texte);
  margin-bottom: 1rem;
}
.manifeste-intro {
  font-family: sans-serif;
  font-size: .95rem;
  line-height: 1.75;
  color: var(--gris);
  max-width: 560px;
  margin: 0 auto;
}
.manifeste-propositions {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.manifeste-proposition {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.75rem;
  border-left: 4px solid var(--prop-couleur, var(--vert));
}
.manifeste-prop-top {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .9rem;
  flex-wrap: wrap;
}
.manifeste-prop-icone {
  font-size: 1.1rem;
  color: var(--prop-couleur, var(--vert));
  font-variant-emoji: text;
}
.manifeste-prop-cercle {
  font-size: .72rem;
  font-family: sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--prop-couleur, var(--vert));
}
[data-theme="dark"] .manifeste-prop-icone,
[data-theme="dark"] .manifeste-prop-cercle { color: var(--vert-clair); }
.manifeste-prop-votes {
  margin-left: auto;
  font-size: .75rem;
  font-family: sans-serif;
  color: var(--gris);
  background: var(--gris-clair);
  padding: .18rem .5rem;
  border-radius: 999px;
  white-space: nowrap;
}
.manifeste-proposition h2 {
  font-size: 1.1rem;
  line-height: 1.4;
  color: var(--texte);
  margin-bottom: .65rem;
}
.manifeste-prop-extrait {
  font-family: sans-serif;
  font-size: .88rem;
  line-height: 1.7;
  color: var(--gris);
  margin-bottom: .75rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.manifeste-prop-meta {
  display: flex;
  align-items: center;
  gap: .25rem;
  font-family: sans-serif;
  font-size: .78rem;
  color: var(--gris);
  margin-bottom: .85rem;
}
.manifeste-prop-lien {
  display: inline-block;
  font-size: .8rem;
  font-family: sans-serif;
  color: var(--vert);
  font-weight: 600;
  text-decoration: none;
}
.manifeste-prop-lien:hover { text-decoration: underline; }
[data-theme="dark"] .manifeste-prop-lien { color: var(--vert-clair); }
.manifeste-cta {
  text-align: center;
  padding: 2.5rem 0 1rem;
  border-top: 1px solid var(--gris-clair);
  margin-top: 2.5rem;
}
.manifeste-cta h2 {
  font-size: 1.2rem;
  color: var(--texte);
  margin-bottom: .75rem;
}
.manifeste-cta p {
  font-family: sans-serif;
  font-size: .9rem;
  color: var(--gris);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.7;
}
@media (max-width: 600px) {
  .manifeste-proposition { padding: 1.1rem; }
  .manifeste-wrap        { padding: 1rem 1rem 3rem; }
}

/* ── Pages statiques (/a-propos, /faq, /reglement, /rgpd) ── */
.page-statique {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}
.page-statique-hero {
  text-align: center;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--gris-clair);
}
.page-statique-hero h1 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  line-height: 1.25;
  margin-bottom: .75rem;
}
.page-statique-hero p {
  color: var(--gris);
  font-family: sans-serif;
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}
.page-statique-corps h2 {
  font-size: 1.1rem;
  color: var(--vert);
  border-left: 3px solid var(--vert);
  padding-left: .75rem;
  margin: 2rem 0 .75rem;
}
[data-theme="dark"] .page-statique-corps h2 {
  color: var(--vert-clair);
  border-color: var(--vert-clair);
}
.page-statique-corps p,
.page-statique-corps ul,
.page-statique-corps ol {
  font-family: sans-serif;
  font-size: .95rem;
  line-height: 1.7;
  margin-bottom: .75rem;
}
.page-statique-corps ul,
.page-statique-corps ol { padding-left: 1.5rem; }
.page-statique-corps li { margin-bottom: .3rem; }
.page-statique-retour {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gris-clair);
  text-align: center;
}
@media (max-width: 600px) {
  .page-statique { padding: 2rem 1rem 3rem; }
}

/* ── Menu institutionnel (bottom-nav mobile) ── */
@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.menu-institutionnel {
  display: flex;
  flex-direction: column;
  position: fixed;
  bottom: 56px;
  left: 0; right: 0;
  background: var(--bleu);
  z-index: 201;
  padding: .5rem 0;
  box-shadow: 0 -4px 16px rgba(0,0,0,.3);
  border-top: 1px solid rgba(255,255,255,.12);
  animation: slideUp .18s ease;
}
.menu-inst-titre {
  padding: .5rem 1.5rem .25rem;
  font-family: sans-serif;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgba(255,255,255,.5);
}
.menu-inst-lien {
  display: block;
  padding: .75rem 1.5rem;
  color: rgba(255,255,255,.85);
  font-family: sans-serif;
  font-size: .95rem;
  text-decoration: none;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.menu-inst-lien:last-child { border-bottom: none; }
.menu-inst-lien:hover { background: rgba(255,255,255,.08); color: white; text-decoration: none; }

/* ── Footer site ── */
.site-footer {
  background: var(--bleu);
  color: white;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  box-shadow: var(--shadow-md);
  border-top: 1px solid rgba(255,255,255,.12);
}
.site-footer-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  text-decoration: none;
  flex-shrink: 0;
}
.site-footer-brand:hover { opacity: .9; text-decoration: none; }
.site-footer-brand-sub {
  font-size: .75rem;
  font-weight: 400;
  opacity: .7;
  display: block;
}
.site-footer-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.site-footer-nav a {
  color: rgba(255,255,255,.85);
  font-family: sans-serif;
  font-size: .9rem;
  text-decoration: none;
}
.site-footer-nav a:hover { color: white; text-decoration: none; }
@media (max-width: 700px) {
  .site-footer {
    height: auto;
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.5rem;
    gap: .75rem;
    padding-bottom: calc(1rem + 56px);
  }
  .site-footer-nav { gap: 1rem; flex-wrap: wrap; }
}
