/* ==========================================================
   Feuille de style principale — aucune police ni ressource externe (RGPD)
   Couleurs : modifiez les variables ci-dessous
   ========================================================== */
:root {
  --brand: #0f3557;
  --brand-2: #1d5c8f;
  --accent: #d9a21b;
  --danger: #b42318;
  --success: #067647;
  --warning: #b54708;
  --ink: #18212b;
  --muted: #5b6876;
  --line: #dde3ea;
  --bg: #f6f8fa;
  --card: #ffffff;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16,24,40,.06), 0 4px 16px rgba(16,24,40,.06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 16px; }
img { max-width: 100%; height: auto; }
a { color: var(--brand-2); }
a:hover { color: var(--brand); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .6em; color: var(--brand); }
h1 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: 8px 12px; z-index: 99; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- En-tête ---------- */
.site-header { background: var(--brand); color: #fff; position: relative; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 16px; }
.main-nav { justify-content: flex-end; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand-mark { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 10px; background: var(--accent); color: var(--brand); font-weight: 800; letter-spacing: .02em; }
.brand-logo { height: 46px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.15rem; }
.brand-text small { opacity: .8; font-size: .8rem; }
.nav-cb { position: absolute; opacity: 0; pointer-events: none; }
.nav-burger { display: none; cursor: pointer; padding: 10px; }
.nav-burger span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; }
.nav-cb:focus-visible + .nav-burger { outline: 3px solid var(--accent); }
.main-nav { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.main-nav a { color: #e8eef5; text-decoration: none; padding: 8px 12px; border-radius: calc(var(--radius) * .8); font-weight: 500; }
.main-nav a:hover, .main-nav a[aria-current] { background: rgba(255,255,255,.12); color: #fff; }
.main-nav a[aria-current] { box-shadow: inset 0 -3px 0 var(--accent); }
.main-nav .nav-account { border: 1px solid rgba(255,255,255,.35); margin-left: 6px; }
@media (max-width: 900px) {
  .nav-burger { display: block; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 72px; background: var(--brand); flex-direction: column; align-items: stretch; padding: 8px 16px 16px; }
  .nav-cb:checked ~ .main-nav { display: flex; }
}

/* ---------- Pied de page ---------- */
.site-info { background: #0b2741; color: #c9d5e2; margin-top: 64px; padding: 40px 0 32px; font-size: .95rem; }
.site-info a { color: #e8eef5; }
.site-info ul { list-style: none; padding: 0; margin: .5em 0 0; }
.site-info li { margin: .3em 0; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; }
.site-footer-bar { background: #0b2741; color: #c9d5e2; font-size: .85rem; border-top: 1px solid rgba(255,255,255,.12); }
.footer-bar-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px 18px; flex-wrap: wrap; overflow: hidden; padding: 4px 0; }
.footer-bar-inner nav { display: flex; gap: 14px; flex-wrap: wrap; }
@media (max-width: 700px) { .footer-bar-inner { justify-content: center; text-align: center; font-size: .78rem; } }
/* ---------- Sections ---------- */
.hero { background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%); color: #fff; padding: 64px 0 72px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%; background: rgba(255,255,255,.06); }
.hero h1 { color: #fff; max-width: 760px; }
.hero .prose { color: #e3ebf4; max-width: 720px; font-size: 1.1rem; }
.hero .prose a { color: #fff; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.page-head { padding: 40px 0 8px; }
.page-head p.lead { color: var(--muted); font-size: 1.1rem; max-width: 720px; }
.section { padding: 40px 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.subnav { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 24px; border-bottom: 1px solid var(--line); }
.subnav a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.subnav a[aria-current] { color: var(--brand); border-color: var(--accent); }

/* ---------- Cartes & grilles ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.card h3 { margin-bottom: .4em; }
.card-link { text-decoration: none; color: inherit; display: block; transition: transform .15s, box-shadow .15s; }
.card-link:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(16,24,40,.12); color: inherit; }
.post-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.post-card .cover { aspect-ratio: 16/9; background: linear-gradient(135deg, #e3eaf2, #cfdbe7); object-fit: cover; width: 100%; display: block; }
.post-card .body { padding: 18px 20px 22px; }
.meta { color: var(--muted); font-size: .88rem; }
.badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: #e8eef5; color: var(--brand); text-transform: uppercase; letter-spacing: .03em; }
.badge-accent { background: #fbf0d3; color: #7a5600; }
.badge-success { background: #dcfae6; color: var(--success); }
.badge-danger { background: #fee4e2; color: var(--danger); }
.badge-muted { background: #eef0f3; color: var(--muted); }
.empty { color: var(--muted); padding: 24px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); background: #fff; }

/* Événements */
.event-row { display: flex; gap: 18px; align-items: flex-start; }
.date-chip { flex: 0 0 64px; text-align: center; background: var(--brand); color: #fff; border-radius: 10px; padding: 8px 4px; line-height: 1.1; }
.date-chip b { display: block; font-size: 1.6rem; }
.date-chip small { text-transform: uppercase; font-size: .72rem; letter-spacing: .05em; }

/* Comité */
.person { text-align: center; }
.person img, .person .avatar { width: 132px; height: 132px; border-radius: 50%; object-fit: cover; margin: 0 auto 14px; display: grid; place-items: center; background: #e3eaf2; color: var(--brand); font-size: 2.2rem; font-weight: 800; }
.person .role { color: var(--accent); font-weight: 700; font-size: .9rem; text-transform: uppercase; letter-spacing: .04em; color: #8a6200; }

/* Liens */
.link-card { display: flex; gap: 16px; align-items: center; }
.link-card img { width: 96px; height: 72px; object-fit: contain; background: #f2f5f8; border-radius: calc(var(--radius) * .8); flex: 0 0 96px; }
.link-card .url { font-size: .82rem; color: var(--muted); word-break: break-all; }

/* ---------- Contenu riche ---------- */
.prose { max-width: 760px; }
.prose img { border-radius: calc(var(--radius) * .8); margin: 8px 0; }
.prose blockquote { margin: 1em 0; padding: .4em 1em; border-left: 4px solid var(--accent); background: #fffaf0; }
.prose pre { background: #0f1720; color: #e6edf3; padding: 14px; border-radius: calc(var(--radius) * .8); overflow: auto; }
.prose code { font-family: var(--mono); font-size: .9em; background: #eef2f6; padding: 1px 5px; border-radius: 4px; }
.prose pre code { background: none; padding: 0; }
.prose table { border-collapse: collapse; width: 100%; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.prose th { background: #f1f4f8; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.callout { padding: 14px 18px; border-radius: calc(var(--radius) * .8); margin: 1em 0; border: 1px solid; }
.callout > :last-child { margin-bottom: 0; }
.callout-info { background: #eef4fb; border-color: #c4d7ee; }
.callout-warning { background: #fff6e6; border-color: #f4d39b; }
.callout-success { background: #ecfdf3; border-color: #abefc6; }
.table-wrap { overflow-x: auto; }

/* ---------- Formulaires ---------- */
form { margin: 0; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .95rem; }
.req { color: var(--danger); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=time], input[type=url], input[type=tel], input[type=search], input[type=month], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #c7d0da; border-radius: calc(var(--radius) * .8); font: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { border-color: var(--brand-2); outline: 3px solid rgba(29,92,143,.18); outline-offset: 0; }
textarea { resize: vertical; }
textarea.mono { font-family: var(--mono); font-size: .92rem; line-height: 1.5; }
.help { display: block; color: var(--muted); font-size: .85rem; margin-top: 4px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; flex-wrap: wrap; }
.check input { margin-top: 4px; width: 18px; height: 18px; flex: 0 0 auto; }
.check label { font-weight: 400; flex: 1; }
.check .help { flex-basis: 100%; margin-left: 28px; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 16px; }
.form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px 6px; margin: 0 0 18px; background: #fff; }
legend { font-weight: 700; color: var(--brand); padding: 0 6px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; border-radius: calc(var(--radius) * .8); border: 1px solid transparent; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; background: var(--brand); color: #fff; line-height: 1.2; }
.btn:hover { background: #0a2741; color: #fff; }
.btn-accent { background: var(--accent); color: #2b1f00; }
.btn-accent:hover { background: #c08d0f; color: #1d1500; }
.btn-ghost { background: #fff; color: var(--brand); border-color: #c7d0da; }
.btn-ghost:hover { background: #f1f4f8; color: var(--brand); }
.btn-light { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.4); }
.btn-light:hover { background: rgba(255,255,255,.24); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #8f1c13; }
.btn-sm { padding: 6px 12px; font-size: .88rem; }
.linklike { background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }
.inline-delete { display: inline-flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.confirm { font-size: .88rem; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }

.alert { padding: 12px 16px; border-radius: calc(var(--radius) * .8); margin: 16px 0; border: 1px solid; }
.alert-success { background: #ecfdf3; border-color: #abefc6; color: #05603a; }
.alert-error { background: #fef3f2; border-color: #fecdca; color: #912018; }
.alert-warning { background: #fffaeb; border-color: #fedf89; color: #93370d; }
.alert-info { background: #eff8ff; border-color: #b2ddff; color: #175cd3; }

/* Éditeur */
.editor .md-help { margin: -6px 0 10px; font-size: .9rem; }
.editor .md-help summary { cursor: pointer; color: var(--brand-2); }
.md-help-grid { display: grid; grid-template-columns: minmax(160px, auto) 1fr; gap: 6px 16px; padding: 12px; background: #f6f8fa; border-radius: calc(var(--radius) * .8); margin-top: 8px; }
.md-help-grid code { font-family: var(--mono); font-size: .85rem; }
.preview { margin-top: 14px; border: 2px dashed #c4d7ee; border-radius: var(--radius); padding: 18px; background: #fff; }
.preview-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; color: var(--brand-2); margin-bottom: 8px; }

/* Calendrier (HTML/CSS pur) */
.cal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.cal-head h2 { margin: 0; }
.cal { width: 100%; border-collapse: collapse; table-layout: fixed; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.cal th { background: var(--brand); color: #fff; font-weight: 600; padding: 8px 4px; font-size: .85rem; }
.cal td { border: 1px solid var(--line); vertical-align: top; height: 104px; padding: 4px 6px; font-size: .82rem; }
.cal td.other { background: #f7f9fb; color: #a0aab5; }
.cal td.today { background: #fffaeb; }
.cal .day-num { font-weight: 700; display: block; margin-bottom: 2px; }
.cal .ev { display: block; background: #e8eef5; color: var(--brand); border-radius: 4px; padding: 2px 5px; margin: 2px 0; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid var(--brand-2); }
.cal .ev.v-members { background: #fbf0d3; border-color: var(--accent); color: #6b4c00; }
.cal .ev.v-roles { background: #fde8e7; border-color: var(--danger); color: #7a1a12; }
@media (max-width: 700px) { .cal td { height: 64px; font-size: .7rem; padding: 2px; } .cal .ev { font-size: .65rem; } }

/* Votes */
.poll-option { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: calc(var(--radius) * .8); margin-bottom: 8px; background: #fff; }
.poll-option input { width: 18px; height: 18px; }
.bar { height: 10px; background: #e8eef5; border-radius: 99px; overflow: hidden; margin-top: 6px; }
.bar > span { display: block; height: 100%; background: var(--brand-2); }
.result-row { margin-bottom: 14px; }

/* Tableaux de données */
table.data { width: 100%; border-collapse: collapse; background: #fff; font-size: .93rem; }
table.data th, table.data td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.data th { background: #f1f4f8; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); position: sticky; top: 0; }
table.data tr:hover td { background: #fafbfd; }
table.data td.num, table.data th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.data tfoot td { font-weight: 700; background: #f1f4f8; border-top: 2px solid #c7d0da; }
.pos { color: var(--success); }
.neg { color: var(--danger); }
.pagination { display: flex; gap: 14px; align-items: center; justify-content: center; margin: 20px 0; }

/* Divers */
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.mt { margin-top: 20px; }
.mb0 { margin-bottom: 0; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.stack > * + * { margin-top: 14px; }
.error-page { text-align: center; padding: 80px 0; }
.error-page .code { font-size: 5rem; font-weight: 800; color: var(--line); line-height: 1; }
.auth-box { max-width: 460px; margin: 48px auto; }
.secret { font-family: var(--mono); font-size: 1.15rem; letter-spacing: .12em; background: #f1f4f8; padding: 10px 14px; border-radius: calc(var(--radius) * .8); word-break: break-all; }
.doc-list { list-style: none; padding: 0; margin: 0; }
.doc-list li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }

@media print {
  .site-header, .site-footer-bar, .site-info, .no-print, .admin-side, .admin-top, .subnav, .btn, form.filters { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .card { box-shadow: none; border: 0; padding: 0; }
  table.data th { position: static; }
  a { color: inherit; text-decoration: none; }
}

/* utilitaires (aucun style en ligne n'est autorisé par la CSP) */
hr.divider { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.cover-full { border-radius: var(--radius); max-height: 460px; width: 100%; object-fit: cover; margin-bottom: 24px; }
.search-form { margin-bottom: 20px; }
.search-form input { max-width: 360px; }
.mb-l { margin-bottom: 20px; }
.section.tight { padding-top: 8px; }
progress.bar { width: 100%; height: 10px; appearance: none; -webkit-appearance: none; border: 0; border-radius: 99px; background: #e8eef5; overflow: hidden; display: block; margin-top: 6px; }
progress.bar::-webkit-progress-bar { background: #e8eef5; border-radius: 99px; }
progress.bar::-webkit-progress-value { background: var(--brand-2); border-radius: 99px; }
progress.bar::-moz-progress-bar { background: var(--brand-2); border-radius: 99px; }
.result-row > div:first-child { display: flex; justify-content: space-between; gap: 10px; }
