/* ==========================================================================
   DIPLOMAS.CD — site public. Mobile d'abord, fluide, thème clair/sombre.
   ========================================================================== */
:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-2: #f1f4f9;
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #64748b;
  --border: #e2e8f0;
  --primary: #1e3a8a;
  --primary-2: #2546b8;
  --primary-soft: #e8eefc;
  --accent: #f59e0b;
  --accent-ink: #451a03;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 6px 24px -8px rgba(15, 23, 42, .16);
  --shadow-lg: 0 22px 50px -18px rgba(15, 23, 42, .28);
  --radius: 16px;
  --radius-sm: 10px;
  --blue: #2563eb; --blue-soft: #dbeafe;
  --amber: #d97706; --amber-soft: #fef3c7;
  --emerald: #059669; --emerald-soft: #d1fae5;
  --violet: #7c3aed; --violet-soft: #ede9fe;
  --rose: #e11d48; --rose-soft: #ffe4e6;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --header-h: 72px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1120; --surface: #111a2e; --surface-2: #17223a; --text: #e6ebf5; --text-2: #b4bfd3; --text-3: #8a97ad;
    --border: #23314d; --primary: #93b4ff; --primary-2: #b6cbff; --primary-soft: #1a2747;
    --blue-soft: #172a4d; --amber-soft: #3a2a0c; --emerald-soft: #0f3029; --violet-soft: #2a1f4a; --rose-soft: #3d1522;
    --blue: #7aa7ff; --amber: #fbbf24; --emerald: #34d399; --violet: #b39bff; --rose: #fb7192;
    --shadow: 0 6px 24px -8px rgba(0, 0, 0, .5); --shadow-lg: 0 22px 50px -18px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1120; --surface: #111a2e; --surface-2: #17223a; --text: #e6ebf5; --text-2: #b4bfd3; --text-3: #8a97ad;
  --border: #23314d; --primary: #93b4ff; --primary-2: #b6cbff; --primary-soft: #1a2747;
  --blue-soft: #172a4d; --amber-soft: #3a2a0c; --emerald-soft: #0f3029; --violet-soft: #2a1f4a; --rose-soft: #3d1522;
  --blue: #7aa7ff; --amber: #fbbf24; --emerald: #34d399; --violet: #b39bff; --rose: #fb7192;
  --shadow: 0 6px 24px -8px rgba(0, 0, 0, .5); --shadow-lg: 0 22px 50px -18px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: clamp(15px, .95rem + .1vw, 17px); line-height: 1.6; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.015em; }
p { margin: 0 0 1em; }
.icon { flex-shrink: 0; vertical-align: middle; }
.sr-only, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -60px; background: var(--primary); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 12px; color: #fff; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 32px); }
.container--narrow { max-width: 860px; }
.section { padding-block: clamp(32px, 5vw, 64px); }
.section__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section__head h2 { font-size: clamp(1.3rem, 1rem + 1.2vw, 1.75rem); margin: 0; display: flex; align-items: center; gap: 10px; }
.link-more { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); font-weight: 600; font-size: .92rem; white-space: nowrap; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; text-transform: uppercase; font-size: .75rem; font-weight: 700; letter-spacing: .08em; color: var(--text-3); margin: 0 0 8px; }

/* Boutons, puces, badges ------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent;
  border-radius: 999px; padding: 11px 20px; font-weight: 600; cursor: pointer; transition: transform .15s, background .2s, box-shadow .2s;
  white-space: nowrap; font-size: .95rem; line-height: 1.2;
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--primary); color: #fff; }
:root[data-theme="dark"] .btn--primary { color: #0b1120; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn--primary { color: #0b1120; } }
.btn--primary:hover { background: var(--primary-2); color: #fff; box-shadow: var(--shadow); }
.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { filter: brightness(1.07); color: var(--accent-ink); }
.btn--ghost { border-color: var(--border); background: var(--surface); }
.btn--light { background: rgba(255,255,255,.15); color: #fff; border-color: rgba(255,255,255,.3); white-space: normal; word-break: break-all; }
.btn--light:hover { background: rgba(255,255,255,.25); color: #fff; }
.btn--lg { padding: 14px 26px; font-size: 1rem; }
.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); cursor: pointer; transition: background .2s, border-color .2s;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--primary); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); font-size: .86rem; font-weight: 500; transition: all .2s; white-space: nowrap;
}
.chip:hover, .chip.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
:root[data-theme="dark"] .chip.is-active, :root[data-theme="dark"] .chip:hover { color: #0b1120; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips--center { justify-content: center; }
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: .74rem;
  font-weight: 700; letter-spacing: .02em; text-transform: uppercase;
}
.badge--blue, .chip--blue { background: var(--blue-soft); color: var(--blue); }
.badge--amber, .chip--amber { background: var(--amber-soft); color: var(--amber); }
.badge--emerald, .chip--emerald { background: var(--emerald-soft); color: var(--emerald); }
.badge--violet, .chip--violet { background: var(--violet-soft); color: var(--violet); }
.badge--rose, .chip--rose { background: var(--rose-soft); color: var(--rose); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot--blue { background: var(--blue); } .dot--amber { background: var(--amber); } .dot--emerald { background: var(--emerald); }
.dot--violet { background: var(--violet); } .dot--rose { background: var(--rose); }

/* Barre admin + en-tête --------------------------------------------------- */
.adminbar { background: #0f172a; color: #cbd5e1; font-size: .8rem; }
.adminbar__in { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 34px; flex-wrap: wrap; }
.adminbar a { color: #fbbf24; display: inline-flex; align-items: center; gap: 5px; }
.adminbar__links { display: flex; gap: 16px; flex-wrap: wrap; }
.header {
  position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border); transition: box-shadow .25s;
}
.header.is-scrolled { box-shadow: var(--shadow); }
.header__in { display: flex; align-items: center; gap: 20px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand__logo { width: 40px; height: 40px; border-radius: 10px; object-fit: contain; }
.brand__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.brand__text strong { font-size: 1.1rem; font-weight: 800; letter-spacing: -.02em; }
.brand__text small { color: var(--text-3); font-size: .74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.nav { display: none; gap: 2px; margin-left: auto; }
.nav a { padding: 8px 12px; border-radius: 10px; font-weight: 500; font-size: .93rem; color: var(--text-2); position: relative; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.is-active { color: var(--primary); font-weight: 600; }
.nav a.is-active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--accent); }
.header__actions { display: flex; gap: 8px; margin-left: auto; }
.only-dark { display: none; }
:root[data-theme="dark"] .only-dark { display: inline; } :root[data-theme="dark"] .only-light { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .only-dark { display: inline; } :root:not([data-theme="light"]) .only-light { display: none; } }
@media (min-width: 1080px) {
  .nav { display: flex; }
  .header__actions { margin-left: 8px; }
  .burger { display: none; }
}
@media (max-width: 520px) { .brand__text small { display: none; } }

.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: linear-gradient(90deg, var(--accent), var(--primary)); z-index: 60; transition: width .1s linear; }

/* Tiroir mobile ----------------------------------------------------------- */
.drawer { position: fixed; inset: 0; z-index: 70; background: rgba(2, 6, 23, .5); backdrop-filter: blur(3px); }
.drawer[hidden] { display: none; }
.drawer__panel {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(88vw, 360px); background: var(--surface); padding: 20px;
  overflow-y: auto; display: flex; flex-direction: column; gap: 4px; animation: slideIn .25s ease-out; box-shadow: var(--shadow-lg);
}
@keyframes slideIn { from { transform: translateX(100%); } to { transform: none; } }
.drawer__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.drawer__panel > a { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; font-weight: 500; }
.drawer__panel > a:hover { background: var(--surface-2); }
.drawer__sub { padding-block: 8px !important; color: var(--text-2); font-size: .92rem; }
.drawer__label { margin: 16px 12px 4px; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); font-weight: 700; }
.drawer__search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 12px; padding: 0 12px; margin-bottom: 8px; background: var(--surface-2); }
.drawer__search input { border: 0; background: none; padding: 12px 0; width: 100%; outline: none; }

/* Recherche plein écran -------------------------------------------------- */
.search-overlay { position: fixed; inset: 0; z-index: 80; background: rgba(2, 6, 23, .6); backdrop-filter: blur(6px); display: grid; place-items: start center; padding: 12vh 16px 16px; }
.search-overlay[hidden] { display: none; }
.search-overlay__box { width: min(720px, 100%); background: var(--surface); border-radius: 20px; padding: 18px; box-shadow: var(--shadow-lg); animation: pop .2s ease-out; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.search-overlay form { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--border); padding: 4px 4px 16px; }
.search-overlay input { flex: 1; border: 0; background: none; font-size: 1.15rem; outline: none; min-width: 0; }
.search-overlay__hints { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 16px; }

/* Notifications ----------------------------------------------------------- */
.toasts { position: fixed; z-index: 90; right: 16px; bottom: 16px; left: 16px; display: grid; gap: 10px; justify-items: end; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-lg); border-left: 4px solid var(--primary); max-width: 460px; animation: pop .25s; }
.toast--success { border-left-color: var(--emerald); } .toast--error { border-left-color: var(--rose); } .toast--warning { border-left-color: var(--amber); }
.toast.is-hiding { opacity: 0; transform: translateY(8px); transition: .3s; }

/* Hero -------------------------------------------------------------------- */
.hero { padding-block: clamp(20px, 4vw, 44px); background: radial-gradient(1200px 400px at 10% -10%, var(--primary-soft), transparent 70%); }
.hero__grid { display: grid; gap: 24px; }
@media (min-width: 960px) { .hero__grid { grid-template-columns: 1.7fr 1fr; align-items: stretch; } }
.hero__lead { position: relative; border-radius: calc(var(--radius) + 6px); overflow: hidden; background: #0f172a; min-height: clamp(380px, 50vw, 520px); display: flex; box-shadow: var(--shadow-lg); isolation: isolate; }
.hero__media { position: absolute; inset: 0; z-index: -1; }
.hero__media img, .hero__media .ph { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.hero__lead:hover .hero__media img { transform: scale(1.04); }
.hero__media .ph { place-content: start end; padding: 28px; }
.hero__media .ph > * { opacity: .35; }
.hero__media .ph span { display: none; }
.hero__lead::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(2,6,23,.05) 20%, rgba(2,6,23,.88) 100%); }
.hero__body { margin-top: auto; padding: clamp(20px, 4vw, 40px); color: #fff; display: grid; gap: 14px; justify-items: start; }
.hero__title { font-family: var(--serif); font-size: clamp(1.6rem, 1rem + 2.6vw, 2.75rem); margin: 0; }
.hero__title a:hover { color: #fde68a; }
.hero__excerpt { color: rgba(255,255,255,.85); margin: 0; max-width: 62ch; }
.hero__body .card__foot { color: rgba(255,255,255,.75); }
.hero__body .card__cat { color: #fde68a; }
.hero__side { display: grid; gap: 12px; align-content: start; background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) + 6px); padding: 20px; }
.mini { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; padding: 10px; margin: 0 -10px; border-radius: 14px; transition: background .2s; }
.mini:hover { background: var(--surface-2); color: inherit; }
.mini__media { aspect-ratio: 1; border-radius: 12px; overflow: hidden; }
.mini__media img, .mini__media .ph { width: 100%; height: 100%; object-fit: cover; }
.mini__media .ph span { display: none; }
.mini h3 { font-size: .98rem; margin: 6px 0 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini time { font-size: .8rem; color: var(--text-3); }

/* Bandeau des rubriques -------------------------------------------------- */
.types-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 12px; margin-top: 24px; }
.type-tile { display: flex; gap: 12px; align-items: center; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: transform .2s, box-shadow .2s, border-color .2s; }
.type-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: inherit; }
.type-tile strong { display: block; font-size: .95rem; }
.type-tile small { color: var(--text-3); font-size: .78rem; line-height: 1.35; display: block; }
.type-tile__icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0; }
.type-tile--blue .type-tile__icon { background: var(--blue-soft); color: var(--blue); } .type-tile--blue:hover { border-color: var(--blue); }
.type-tile--amber .type-tile__icon { background: var(--amber-soft); color: var(--amber); } .type-tile--amber:hover { border-color: var(--amber); }
.type-tile--emerald .type-tile__icon { background: var(--emerald-soft); color: var(--emerald); } .type-tile--emerald:hover { border-color: var(--emerald); }
.type-tile--violet .type-tile__icon { background: var(--violet-soft); color: var(--violet); } .type-tile--violet:hover { border-color: var(--violet); }
.type-tile--rose .type-tile__icon { background: var(--rose-soft); color: var(--rose); } .type-tile--rose:hover { border-color: var(--rose); }

/* Cartes ------------------------------------------------------------------ */
.grid { display: grid; gap: clamp(16px, 2.4vw, 28px); grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform .25s, box-shadow .25s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.card__media img, .card__media .ph { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.card:hover .card__media img { transform: scale(1.05); }
.card__body { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px 20px; flex: 1; }
.card__meta { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.card__cat { font-size: .8rem; font-weight: 600; color: var(--primary); }
.card__title { font-size: 1.12rem; margin: 0; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card__title a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size .3s; }
.card__title a:hover { background-size: 100% 1.5px; }
.card__excerpt { color: var(--text-2); font-size: .93rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card__foot { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--text-3); font-size: .82rem; }
.card__foot > * { display: inline-flex; align-items: center; gap: 5px; }
.card__file { color: var(--emerald); font-weight: 700; }
.card--row { flex-direction: row; }
.card--row .card__media { width: 38%; aspect-ratio: auto; min-height: 150px; flex-shrink: 0; }
.card--row .card__title { font-size: 1rem; -webkit-line-clamp: 3; }
.card--row .card__excerpt { -webkit-line-clamp: 2; font-size: .88rem; }
.card--row .card__body { padding: 14px 16px; gap: 8px; }
@media (max-width: 420px) { .card--row .card__excerpt { display: none; } .card--row .card__media { width: 34%; } }

/* Visuels de substitution (sans image) ----------------------------------- */
.ph { display: grid; place-content: center; justify-items: center; gap: 10px; color: rgba(255,255,255,.95); position: relative; overflow: hidden; font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }
.ph::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 80% 10%, rgba(255,255,255,.25), transparent 45%), radial-gradient(circle at 0% 100%, rgba(0,0,0,.25), transparent 55%); }
.ph > * { position: relative; }
.ph--blue { background: linear-gradient(135deg, #1e3a8a, #3b82f6); }
.ph--amber { background: linear-gradient(135deg, #b45309, #f59e0b); }
.ph--emerald { background: linear-gradient(135deg, #065f46, #10b981); }
.ph--violet { background: linear-gradient(135deg, #4c1d95, #8b5cf6); }
.ph--rose { background: linear-gradient(135deg, #9f1239, #f43f5e); }

/* Accueil : colonnes ------------------------------------------------------ */
.layout-split { display: grid; gap: 32px; }
@media (min-width: 1024px) { .layout-split { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } .sidebar { position: sticky; top: calc(var(--header-h) + 20px); } }
.type-section + .type-section { margin-top: 48px; }
.sidebar { display: grid; gap: 20px; }
.widget { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.widget__title { font-size: 1.05rem; display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.widget--press { background: linear-gradient(135deg, #1e3a8a, #312e81); color: #fff; border: 0; }
.widget--press p { color: rgba(255,255,255,.82); font-size: .92rem; }
.ranked { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ranked a { display: flex; gap: 14px; padding: 10px 8px; margin: 0 -8px; border-radius: 12px; align-items: flex-start; }
.ranked a:hover { background: var(--surface-2); color: inherit; }
.ranked__n { font-family: var(--serif); font-size: 1.6rem; line-height: 1; color: var(--accent); min-width: 22px; }
.ranked strong { display: block; font-size: .93rem; line-height: 1.35; }
.ranked small { color: var(--text-3); font-size: .78rem; }

/* En-têtes de pages ------------------------------------------------------- */
.page-head { padding: clamp(28px, 5vw, 56px) 0 clamp(24px, 4vw, 40px); background: linear-gradient(180deg, var(--primary-soft), transparent); border-bottom: 1px solid var(--border); }
.page-head h1 { font-family: var(--serif); font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.8rem); margin-bottom: 8px; }
.page-head p { color: var(--text-2); max-width: 70ch; margin: 0; }
.page-head__row { display: flex; gap: 18px; align-items: flex-start; }
.page-head__icon { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); flex-shrink: 0; color: var(--primary); }
.page-head--blue .page-head__icon { color: var(--blue); } .page-head--amber .page-head__icon { color: var(--amber); }
.page-head--emerald .page-head__icon { color: var(--emerald); } .page-head--violet .page-head__icon { color: var(--violet); }
.page-head--rose .page-head__icon { color: var(--rose); }
@media (max-width: 560px) { .page-head__icon { width: 48px; height: 48px; } }
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 20px 2px 2px; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); mask-image: linear-gradient(90deg, #000 92%, transparent); }
.filters::-webkit-scrollbar { display: none; }
.chip--rss { color: var(--amber); }
.result-count { color: var(--text-3); font-size: .9rem; margin-bottom: 18px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 16px; font-size: .84rem; color: var(--text-3); }
.crumbs li:not(:last-child)::after { content: "›"; margin-left: 6px; }
.crumbs a:hover { color: var(--primary); }
.crumbs span { color: var(--text-2); }

/* Pagination -------------------------------------------------------------- */
.pager { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 40px; flex-wrap: wrap; }
.pager__pages { display: flex; gap: 6px; }
.pager__pages a, .pager__pages span { display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 8px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; }
.pager__pages .is-current { background: var(--primary); color: #fff; border-color: var(--primary); }
.pager__pages .pager__gap { border: 0; background: none; }
.pager__btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; }
@media (max-width: 520px) { .pager__btn span { display: none; } }

/* Article ----------------------------------------------------------------- */
.preview-banner { background: var(--amber-soft); color: var(--amber); padding: 12px 0; font-size: .92rem; border-bottom: 1px solid var(--border); }
.preview-banner a { text-decoration: underline; margin-left: 8px; font-weight: 600; }
.article__head { padding: clamp(24px, 5vw, 56px) 0 clamp(16px, 3vw, 28px); }
.article__title { font-family: var(--serif); font-size: clamp(1.9rem, 1.2rem + 3vw, 3.2rem); margin: 16px 0; line-height: 1.12; }
.article__lead { font-size: clamp(1.05rem, 1rem + .4vw, 1.3rem); color: var(--text-2); line-height: 1.55; }
.article__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; color: var(--text-3); font-size: .88rem; padding-top: 18px; border-top: 1px solid var(--border); margin-top: 22px; }
.article__meta > span { display: inline-flex; align-items: center; gap: 6px; }
.author-chip { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.author-chip strong { display: block; font-size: .92rem; } .author-chip small { display: block; color: var(--text-3); font-size: .78rem; }
.avatar { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), #6366f1); color: #fff; font-weight: 700; font-size: .85rem; flex-shrink: 0; }
.avatar--lg { width: 56px; height: 56px; font-size: 1.1rem; }
.article__cover { margin: 0 auto 8px; max-width: 1100px; }
.article__cover img { width: 100%; border-radius: calc(var(--radius) + 4px); aspect-ratio: 16 / 8; object-fit: cover; box-shadow: var(--shadow-lg); }
.article__cover figcaption { font-size: .82rem; color: var(--text-3); text-align: center; margin-top: 10px; }
.article__layout { display: grid; gap: 24px; padding-block: clamp(20px, 4vw, 40px); max-width: 980px; }
@media (min-width: 900px) {
  .article__layout { grid-template-columns: 64px minmax(0, 1fr); gap: 40px; }
  .article__aside { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; }
  .share { flex-direction: column; }
  .share__label { writing-mode: vertical-rl; transform: rotate(180deg); margin-bottom: 6px; }
}
.share { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.share__label { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); font-weight: 700; }
.share a, .share button { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); cursor: pointer; transition: all .2s; }
.share a:hover, .share button:hover { background: var(--primary); color: #fff; border-color: var(--primary); transform: translateY(-2px); }
.share button.is-copied { background: var(--emerald); color: #fff; border-color: var(--emerald); }
.article__main { min-width: 0; }
.toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 28px; }
.toc summary { cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: 8px; list-style: none; }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 6px; font-size: .93rem; }
.toc a { color: var(--text-2); } .toc a:hover, .toc a.is-active { color: var(--primary); }
.toc a.is-active { font-weight: 600; }
.toc__l3 { margin-left: 16px; list-style: circle; }
.dateline { font-size: .95rem; color: var(--text-2); }

.prose { font-size: clamp(1.02rem, .98rem + .2vw, 1.12rem); line-height: 1.8; color: var(--text); overflow-wrap: break-word; }
.prose > * + * { margin-top: 1.1em; }
.prose p { margin: 0; }
.prose h2 { font-family: var(--serif); font-size: clamp(1.4rem, 1.1rem + 1vw, 1.85rem); margin: 1.8em 0 .5em; }
.prose h3 { font-size: clamp(1.15rem, 1rem + .5vw, 1.35rem); margin: 1.5em 0 .4em; }
.prose a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--accent); font-weight: 700; }
.prose ol li[data-list="bullet"] { list-style-type: disc; }
.prose .ql-ui { display: none; }
.prose blockquote { margin: 1.6em 0; padding: 18px 24px; border-left: 4px solid var(--accent); background: var(--surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-family: var(--serif); font-size: 1.15em; color: var(--text-2); }
.prose img { border-radius: var(--radius-sm); margin-inline: auto; }
.prose figure { margin: 1.6em 0; } .prose figcaption { text-align: center; font-size: .85rem; color: var(--text-3); margin-top: 8px; }
.prose pre, .prose .ql-code-block-container { background: #0f172a; color: #e2e8f0; padding: 16px 20px; border-radius: var(--radius-sm); overflow-x: auto; font-size: .88rem; line-height: 1.6; }
.prose code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; font-size: .9em; }
.prose pre code { background: none; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; font-size: .93rem; }
.prose th, .prose td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; }
.prose th { background: var(--surface-2); }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--radius-sm); }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }
.prose .ql-align-center { text-align: center; } .prose .ql-align-right { text-align: right; } .prose .ql-align-justify { text-align: justify; }

.download { display: flex; align-items: center; gap: 16px; padding: 18px; margin: 32px 0; border-radius: var(--radius); border: 2px dashed var(--emerald); background: var(--emerald-soft); flex-wrap: wrap; }
.download:hover { color: inherit; border-style: solid; }
.download__icon { position: relative; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; background: var(--surface); color: var(--emerald); }
.download__icon b { position: absolute; bottom: -6px; right: -8px; background: var(--emerald); color: #fff; font-size: .62rem; padding: 2px 6px; border-radius: 6px; }
.download__text { flex: 1; min-width: 180px; } .download__text strong { display: block; word-break: break-word; } .download__text small { color: var(--text-3); }
.press-box { margin-top: 36px; padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.press-box__end { text-align: center; font-weight: 700; letter-spacing: .3em; color: var(--text-3); }
.press-box h2 { font-size: 1.1rem; } .press-box h3 { font-size: 1rem; margin-top: 18px; }
.press-box p { color: var(--text-2); font-size: .94rem; }
.tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--text-3); }
.author-box { display: flex; gap: 16px; padding: 22px; margin-top: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.author-box small { display: block; color: var(--text-3); font-size: .82rem; } .author-box p { margin: 8px 0 0; color: var(--text-2); font-size: .93rem; }
.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 32px; }
.prevnext a { padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); display: grid; gap: 4px; transition: border-color .2s, transform .2s; }
.prevnext a:hover { border-color: var(--primary); transform: translateY(-2px); }
.prevnext small { color: var(--text-3); display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.prevnext strong { font-size: .95rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prevnext .is-next { text-align: right; justify-items: end; }
@media (max-width: 560px) { .prevnext { grid-template-columns: 1fr; } .prevnext .is-next { text-align: left; justify-items: start; } }
.related { border-top: 1px solid var(--border); }

/* Recherche, contact, erreurs -------------------------------------------- */
.search-big { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 8px 8px 8px 16px; box-shadow: var(--shadow); margin-top: 16px; flex-wrap: wrap; }
.search-big input { flex: 1; min-width: 160px; border: 0; background: none; outline: none; padding: 10px 0; font-size: 1.05rem; }
.search-big select { border: 1px solid var(--border); background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
@media (max-width: 560px) { .search-big select, .search-big .btn { flex: 1; } }
.empty { text-align: center; padding: 60px 20px; color: var(--text-3); display: grid; justify-items: center; gap: 12px; }
.contact { display: grid; gap: 28px; }
@media (min-width: 900px) { .contact { grid-template-columns: 340px 1fr; align-items: start; } }
.contact__info { display: grid; gap: 12px; }
.info-card { display: flex; gap: 14px; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--primary); }
.info-card strong { color: var(--text); } .info-card p { color: var(--text-2); margin: 2px 0 0; word-break: break-word; }
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px); padding: clamp(20px, 4vw, 32px); display: grid; gap: 16px; box-shadow: var(--shadow); }
.form-card label { display: grid; gap: 6px; font-weight: 600; font-size: .9rem; }
.form-card input, .form-card textarea { width: 100%; border: 1px solid var(--border); background: var(--surface-2); border-radius: 12px; padding: 12px 14px; font-weight: 400; transition: border-color .2s, box-shadow .2s; }
.form-card input:focus, .form-card textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.form-row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.form-card .btn { justify-self: start; }
.error-page { text-align: center; padding-block: clamp(60px, 10vw, 120px); display: grid; justify-items: center; gap: 12px; max-width: 640px; }
.error-page__code { font-family: var(--serif); font-size: clamp(5rem, 3rem + 10vw, 9rem); line-height: 1; margin: 0; background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-page .search-big { width: 100%; margin: 12px 0; }

/* Pied de page ------------------------------------------------------------ */
.footer { margin-top: clamp(40px, 6vw, 80px); background: #0b1430; color: #b9c3d9; padding-bottom: 24px; }
.footer a:hover { color: #fde68a; }
.newsletter { display: grid; gap: 20px; align-items: center; transform: translateY(-50%); margin-bottom: -20px; padding: clamp(22px, 4vw, 36px); border-radius: calc(var(--radius) + 8px); background: linear-gradient(120deg, #1e3a8a, #4338ca 60%, #7c3aed); color: #fff; box-shadow: var(--shadow-lg); }
@media (min-width: 860px) { .newsletter { grid-template-columns: 1fr 1.1fr; } }
@media (max-width: 859px) { .newsletter { transform: translateY(-36px); margin-bottom: 0; } }
.newsletter h2 { font-family: var(--serif); font-size: clamp(1.4rem, 1rem + 1.4vw, 2rem); margin-bottom: 4px; }
.newsletter p { margin: 0; color: rgba(255,255,255,.85); }
.newsletter__form { display: flex; gap: 8px; background: rgba(255,255,255,.12); padding: 6px; border-radius: 999px; border: 1px solid rgba(255,255,255,.2); }
.newsletter__form input[type=email] { flex: 1; min-width: 0; background: none; border: 0; padding: 10px 16px; color: #fff; outline: none; }
.newsletter__form input::placeholder { color: rgba(255,255,255,.65); }
@media (max-width: 460px) { .newsletter__form { flex-direction: column; border-radius: 18px; } .newsletter__form .btn { width: 100%; } }
.footer__grid { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); padding: 24px 0 36px; }
.footer__about { grid-column: span 1; }
@media (min-width: 900px) { .footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; } }
.footer h3 { color: #fff; font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.footer nav a { display: block; padding: 4px 0; font-size: .93rem; }
.footer p { font-size: .92rem; }
.brand--footer { color: #fff; margin-bottom: 14px; } .brand--footer strong { font-size: 1.15rem; }
.footer__line { display: flex; gap: 8px; align-items: flex-start; word-break: break-word; }
.footer__line .icon { margin-top: 3px; color: #fbbf24; }
.socials { display: flex; flex-wrap: wrap; gap: 8px; }
.socials a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.08); }
.socials a:hover { background: #fbbf24; color: #0b1430; }
.footer__bottom { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px; font-size: .84rem; }

.to-top { position: fixed; right: 16px; bottom: 16px; z-index: 30; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--primary); color: #fff; box-shadow: var(--shadow-lg); cursor: pointer; display: grid; place-items: center; opacity: 0; transform: translateY(20px); pointer-events: none; transition: .3s; }
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }

/* Apparition au défilement ----------------------------------------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Impression -------------------------------------------------------------- */
@media print {
  .header, .footer, .adminbar, .article__aside, .related, .to-top, .toc, .prevnext, .progress, .preview-banner { display: none !important; }
  body { background: #fff; color: #000; }
  .article__layout { display: block; }
  .prose a::after { content: " (" attr(href) ")"; font-size: .8em; }
}
