/* DCT Étudiant — Soma Medical Magazine v2 */
@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap");

:root {
  --teal: #0D9488;
  --teal-d: #0A84FF;
  --teal-soft: #E6F7F5;
  --crimson: #B91C1C;
  --mint: #14D4C4;
  --navy: #0B1F2A;
  --navy-2: #122940;
  --ink: #0B1F2A;
  --muted: #475569;
  --line: #E6E2D8;
  --bg: #FAF9F6;
  --card: #FFFFFF;
  --r: 14px;
  --r-sm: 10px;
  --shadow-sm: 0 1px 3px rgba(11,31,42,.05), 0 1px 2px rgba(11,31,42,.03);
  --shadow-md: 0 10px 28px rgba(11,31,42,.08), 0 2px 6px rgba(11,31,42,.04);
  --shadow: var(--shadow-sm);
  --serif: Fraunces, "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.65;
  font-size: 16px;
  overflow-x: clip;
  max-width: 100%;
}
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; text-underline-offset: 3px; }
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 6px;
  box-shadow: 0 0 0 4px rgba(10,132,255,.22);
}

h1, h2, h3, .hero h1, .feat h2, .quizcard h2, .prose h1, .prose h2, .dct-brand, .dct-ft-brand {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -.018em;
  line-height: 1.16;
  font-optical-sizing: auto;
}
h1 { font-size: clamp(30px, 4.4vw, 48px); }
h2 { font-size: clamp(22px, 3vw, 32px); }
h3 { font-size: clamp(18px, 2vw, 22px); line-height: 1.28; }

.wrap, .dct-wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap, .dct-wrap { padding: 0 16px; } }

/* ----- En-tête unifié (.dct-hd) ----- */
.dct-hd {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, .96);
  -webkit-backdrop-filter: saturate(1.2) blur(12px);
  backdrop-filter: saturate(1.2) blur(12px);
  border-bottom: 1px solid #E6E2D8;
}
.dct-hd-in {
  max-width: 1320px;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 72px;
}
.dct-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.dct-brand img { width: 42px; height: 42px; border-radius: 11px; object-fit: cover; border: 1.5px solid rgba(10,132,255,.22); box-shadow: 0 3px 10px rgba(10,132,255,.16); }
.dct-brand > span { min-width: 0; }
.dct-brand small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: 1.3px;
  color: var(--teal);
  font-weight: 700;
  text-transform: uppercase;
}
.dct-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex: 1 1 auto;
  min-width: 0;
}
.dct-nav a {
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color .15s, background .15s;
}
.dct-nav a:hover {
  color: var(--teal);
  background: var(--teal-soft);
}
.dct-nav a[aria-current="page"] {
  color: var(--teal-d);
  background: var(--teal-soft);
  font-weight: 600;
}
.dct-act {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}
.dct-bell {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  text-decoration: none;
  font-size: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
  transition: border-color .15s;
}
.dct-bell:hover { border-color: var(--teal); }
.dct-cta {
  flex-shrink: 0;
  background: linear-gradient(135deg, #0A84FF, #0D9488);
  color: #FFFFFF !important;
  font-weight: 600;
  font-size: 13.5px;
  padding: 9px 16px;
  border-radius: 9px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(10,132,255,.22);
  transition: background .15s, box-shadow .15s, transform .12s;
}
.dct-cta:hover {
  background: linear-gradient(135deg, #0066CC, #0B7C88);
  box-shadow: 0 4px 14px rgba(10,132,255,.28);
}
.dct-doctors-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  background: #0F172A;
  color: #F8FAFC !important;
  border: 1px solid #D97706;
  font-weight: 700;
  font-size: 12.5px;
  padding: 7px 13px;
  border-radius: 10px;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .16);
  transition: background .15s, border-color .15s, box-shadow .15s, transform .12s;
}
.dct-doctors-btn:hover {
  background: #1E293B;
  border-color: #F59E0B;
  box-shadow: 0 4px 12px rgba(217, 119, 6, .22);
  transform: translateY(-1px);
}
.dct-doctors-btn .dct-doc-ico {
  font-size: 13.5px;
  line-height: 1;
}
.dct-m { display: none; }
.dct-burger {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--card);
  padding: 0;
  margin: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}
.dct-burger i { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; }

/* ----- Menu déroulant "Outils & Docs" ----- */
.dct-drop { position: relative; display: flex; align-items: center; }
.dct-drop-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  cursor: pointer;
  transition: color .15s, background .15s;
}
.dct-drop-btn:hover,
.dct-drop.open .dct-drop-btn {
  color: var(--teal);
  background: var(--teal-soft);
}
.dct-drop.has-current .dct-drop-btn {
  color: var(--teal-d);
  background: var(--teal-soft);
  font-weight: 600;
}
.dct-caret {
  display: inline-block;
  font-size: 11px;
  line-height: 1;
  transition: transform .18s ease;
}
.dct-drop.open .dct-caret { transform: rotate(180deg); }
.dct-drop-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 224px;
  max-width: calc(100vw - 32px);
  padding: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 75;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.dct-drop-menu::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}
.dct-drop-menu a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}
.dct-drop-menu a:hover {
  color: var(--teal);
  background: var(--teal-soft);
}
.dct-drop-menu a[aria-current="page"] {
  color: var(--teal-d);
  background: var(--teal-soft);
  font-weight: 600;
}
.dct-di { width: 18px; text-align: center; flex-shrink: 0; font-size: 14px; }

@media (min-width: 1221px) {
  .dct-drop:hover .dct-drop-menu,
  .dct-drop:focus-within .dct-drop-menu,
  .dct-drop.open .dct-drop-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }
  .dct-drop:hover .dct-caret,
  .dct-drop:focus-within .dct-caret { transform: rotate(180deg); }
}
@media (max-width: 1380px) and (min-width: 1221px) {
  .dct-hd-in { gap: 10px; }
  .dct-brand small { font-size: 8.5px; letter-spacing: .8px; }
  .dct-nav { gap: 2px; }
  .dct-nav a, .dct-drop-btn { padding: 6px 8px; font-size: 13px; }
  .dct-hd .dct-cta { padding: 8px 13px; font-size: 13px; }
  .dct-hd .dct-doctors-btn { padding: 6px 10px; font-size: 12px; }
}

@media (max-width: 1220px) {
  .dct-m { display: block; }
  .dct-burger { display: inline-flex; }
  .dct-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--card);
    padding: 12px 20px 18px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    gap: 4px;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    overflow-x: hidden;
  }
  .dct-hd.open .dct-nav { display: flex; }
  .dct-nav a { padding: 11px 12px; font-size: 15px; }
  .dct-drop { display: block; width: 100%; }
  .dct-drop-btn {
    width: 100%;
    justify-content: space-between;
    padding: 11px 12px;
    font-size: 15px;
    text-align: left;
  }
  .dct-drop-menu {
    position: static;
    display: none;
    min-width: 0;
    max-width: 100%;
    margin: 2px 0 6px 12px;
    padding: 2px 0 2px 8px;
    background: transparent;
    border: 0;
    border-left: 2px solid var(--line);
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
  }
  .dct-drop-menu::before { display: none; }
  .dct-drop.open .dct-drop-menu { display: flex; }
  .dct-drop-menu a { padding: 9px 12px; font-size: 14.5px; }
}
@media (max-width: 560px) {
  .dct-bell { display: none; }
  .dct-brand small { display: none; }
  .dct-brand { font-size: 16.5px; }
  .dct-brand img { width: 36px; height: 36px; border-radius: 9px; }
  .dct-cta { padding: 8px 12px; font-size: 13px; }
  .dct-doctors-btn { padding: 6px 10px; font-size: 12px; gap: 4px; }
  .dct-hd-in { gap: 10px; height: 62px; }
  .dct-nav { top: 62px; max-height: calc(100vh - 62px); }
}

/* ----- Bandeau Outils Directs (.soma-qstrip) ----- */
.soma-qstrip {
  background: #F3F1EB;
  border-bottom: 1px solid #E6E2D8;
  padding: 8px 0;
  position: relative;
  z-index: 50;
}
.soma-qstrip-in {
  max-width: 1320px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.soma-qstrip-lbl {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
  margin-right: 4px;
}
.soma-qpill,
.soma-qstrip a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 99px;
  background: #FFFFFF;
  border: 1px solid #DCE2E8;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
  transition: border-color .15s, color .15s, background .15s, box-shadow .15s;
}
.soma-qpill:hover,
.soma-qstrip a:hover {
  border-color: #0A84FF;
  color: #0A84FF;
  background: #F0F7FF;
  box-shadow: 0 2px 6px rgba(10,132,255,.10);
}
.soma-qpill[aria-current="page"],
.soma-qstrip a[aria-current="page"] {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal);
}
@media (max-width: 900px) {
  .soma-qstrip-in {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-left: 16px;
    padding-right: 16px;
  }
  .soma-qstrip-in::-webkit-scrollbar { display: none; }
}

/* Fallback for older header.top pages */
header.top {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
header.top .brand { color: var(--ink); font-family: var(--serif); }
header.top .brand small { color: var(--teal); }
header.top nav.top a { color: var(--muted); font-weight: 500; }
header.top nav.top a:hover { color: var(--teal); }

/* ----- Boutons & surfaces partagés ----- */
.btn, button.primary, body .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #0A84FF, #0D9488);
  color: #FFFFFF;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14.5px;
  padding: 11px 20px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(10,132,255,.20);
  transition: background .15s, border-color .15s, transform .12s, box-shadow .15s;
}
.btn:hover, button.primary:hover {
  background: linear-gradient(135deg, #0066CC, #0B7C88);
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(10,132,255,.28);
}
.btn.ghost, body .btn.ghost {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn.ghost:hover {
  border-color: var(--teal);
  color: var(--teal-d);
  background: var(--teal-soft);
  box-shadow: none;
}

.badge, .chip, .pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: #F3F1EB;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  line-height: 1.3;
}
.card, .feat, .note, .cat, .art, .prose, .mode, .q, .end, .flash {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
}
.cat:hover, .art:hover, .mode:hover, .feat:hover {
  border-color: rgba(10,132,255,.42);
  box-shadow: var(--shadow-md);
}
.feat h2, .art h3, .cat b { color: var(--ink); }
.feat .more, .feat .tag, .art .tag { color: var(--teal); }
h2.sec {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin: 0 0 18px;
}
section { padding: clamp(40px, 6vw, 72px) 0; }

/* Hero générique pour pages secondaires */
body .hero {
  background: linear-gradient(180deg, #F3F1EB 0%, var(--bg) 100%);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding: clamp(36px, 6vw, 64px) 0 clamp(40px, 6vw, 72px);
}
body .hero h1 {
  font-size: clamp(28px, 4.2vw, 44px);
  line-height: 1.12;
  color: var(--ink);
  max-width: 820px;
  margin: 0 0 12px;
}
body .hero p {
  color: var(--muted);
  font-size: clamp(15px, 1.5vw, 17.5px);
  line-height: 1.6;
  max-width: 680px;
  margin: 0;
}

/* Formulaires */
input, select, textarea {
  font-family: inherit;
  background: var(--card);
  color: var(--ink);
  border: 1px solid #D5D0C5;
  border-radius: var(--r-sm);
  padding: 11px 14px;
  font-size: 14.5px;
  max-width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  border-color: #0A84FF;
  outline: none;
  box-shadow: 0 0 0 3px rgba(10,132,255,.16);
}
label { color: var(--muted); font-weight: 600; font-size: 13px; }

/* ----- Pied de page (.dct-ft) ----- */
.dct-ft {
  background: var(--navy);
  color: #B9C8D2;
  margin-top: clamp(48px, 7vw, 84px);
  padding: 52px 0 0;
  font-size: 14px;
}
.dct-ft-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.dct-ft h4 {
  color: #fff;
  font-size: 11.5px;
  margin: 0 0 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 700;
}
.dct-ft a { display: block; color: #D5E1E8; text-decoration: none; padding: 4px 0; font-size: 13.5px; }
.dct-ft a:hover { color: var(--mint); text-decoration: underline; text-underline-offset: 3px; }
.dct-ft p { margin: 0 0 10px; line-height: 1.65; max-width: 360px; font-size: 13.5px; }
.dct-ft-brand { display: block; color: #fff; font-size: 21px; font-weight: 600; margin-bottom: 10px; }
.dct-ft-line { border-top: 1px solid rgba(255,255,255,.12); margin-top: 38px; }
.dct-ft-bottom { padding: 18px 24px; font-size: 12.5px; color: #8FA4B2; }
@media (max-width: 820px) { .dct-ft-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .dct-ft-grid { grid-template-columns: 1fr; gap: 22px; } }

/* ----- Sous-barre des espaces admin et médecin ----- */
.dct-sub { background: var(--card); border-bottom: 1px solid var(--line); }
.dct-sub .dct-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 50px;
  max-width: 1180px;
  overflow-x: auto;
  scrollbar-width: none;
}
.dct-sub .dct-wrap::-webkit-scrollbar { display: none; }
.dct-sub-title {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-right: 14px;
  white-space: nowrap;
}
.dct-tabs { display: flex; gap: 4px; align-items: center; }
.dct-tabs a {
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}
.dct-tabs a:hover { background: var(--teal-soft); color: var(--teal-d); }
.dct-tabs a.on { background: var(--navy); color: #fff; }

/* ----- Grilles & cartes ----- */
.grid, .cards, .mods { justify-content: center; }
.grid > * { min-width: 0; }
body .mods { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }

/* ----- Publications (SEO) ----- */
.post-page figure img {
  max-height: 420px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  border-radius: 14px;
}
.prose blockquote { background: #FFF8E6; border-left-color: #D49B1A; }
.prose li, .prose p, .prose a, .src, .src a { overflow-wrap: anywhere; }

/* ----- Étudier par QCM : modes, questions, réponses ----- */
body .modes { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
body .modes > * { width: 240px; max-width: 100%; }
body .mode { display: flex; flex-direction: column; align-items: flex-start; border-radius: 16px; padding: 20px; box-shadow: var(--shadow-sm); }
body .mode .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--teal-soft); color: var(--teal); display: grid; place-items: center; font-size: 22px; margin-bottom: 6px; }
body .mode.on { background: var(--teal-soft); border-color: var(--teal); }
body .mode b { font-size: 16px; }
body .segment { height: 8px; border-radius: 99px; }
body .segment > i { border-radius: 99px; }
body .q { max-width: 760px; margin: 0 auto; border-radius: 18px; padding: 28px; box-shadow: var(--shadow-sm); }
body .q .stem { font-size: 19px; line-height: 1.5; font-weight: 600; letter-spacing: -.01em; }
body .opt { padding: 15px 18px; border-radius: 12px; font-size: 15.5px; margin-bottom: 10px; background: var(--card); align-items: center; transition: border-color .15s, background .15s; }
body .opt .k { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 8px; font-size: 13px; background: #F3F1EB; border-color: transparent; }
body .exp { border-top-color: var(--line); }
body .end, body .flash { border-radius: 18px; box-shadow: var(--shadow-sm); max-width: 760px; margin: 0 auto; }
body .topbar, body .segment { max-width: 760px; margin-left: auto; margin-right: auto; }
body [style*="rgb(255, 253, 243)"] { max-width: 760px; margin-left: auto !important; margin-right: auto !important; }

/* ----- Communauté ----- */
.av { flex-shrink: 0; aspect-ratio: 1 / 1; }
body .post .img { width: auto; max-width: 100%; max-height: 380px; height: auto; object-fit: contain; display: block; margin: 0 auto; }

/* ----- Responsive mobile (<= 768px & 390px) ----- */
@media (max-width: 768px) {
  .wrap, .dct-wrap { padding: 0 16px; }
  section { padding: 32px 0; }
  body .hero { padding: 28px 0 32px; }
  body .mods { grid-template-columns: 1fr; }
  body .modes > * { width: 100%; }
  body .q { padding: 20px 16px; border-radius: 16px; }
  body .q .stem { font-size: 17px; }
  body .opt { padding: 13px 14px; font-size: 15px; }
  .btn, button.primary, body .btn { padding: 10px 16px; font-size: 14px; }
  table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  pre, code { max-width: 100%; overflow-x: auto; }
}
@media (max-width: 390px) {
  .wrap, .dct-wrap { padding: 0 12px; }
  .dct-hd-in { gap: 8px; height: 60px; }
  .dct-nav { top: 60px; max-height: calc(100vh - 60px); padding: 10px 14px 16px; }
  .dct-brand { font-size: 15.5px; gap: 8px; }
  .dct-brand img { width: 34px; height: 34px; }
  .dct-cta { padding: 7px 10px; font-size: 12.5px; }
  .dct-doctors-btn { padding: 5px 8px; font-size: 11.5px; }
  .dct-doctors-btn .dct-doc-ico { display: none; }
  .soma-qstrip-in { padding-left: 12px; padding-right: 12px; }
  .soma-qpill, .soma-qstrip a { padding: 4px 10px; font-size: 12px; }
  body .q { padding: 16px 12px; }
  body .opt { padding: 11px 12px; font-size: 14.5px; }
  h1 { font-size: clamp(24px, 7vw, 32px); }
}

/* ----- Mode sombre ----- */
html.dark {
  color-scheme: dark;
  --teal: #2BD9B4;
  --teal-d: #38BDF8;
  --teal-soft: #112A3E;
  --crimson: #F87171;
  --mint: #2BD9B4;
  --navy: #060E18;
  --bg: #08121E;
  --card: #0F1E2E;
  --ink: #EDF4FA;
  --muted: #9AB0C4;
  --line: #1E344A;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.32);
  --shadow-md: 0 10px 28px rgba(0,0,0,.42);
}
html.dark body { background: var(--bg); color: var(--ink); }
html.dark a:not([class]) { color: var(--mint); }
html.dark .dct-hd, html.dark header.top { background: rgba(8,18,30,.94); border-bottom-color: var(--line); }
html.dark .soma-qstrip { background: #0B1726; border-bottom-color: var(--line); }
html.dark .soma-qstrip-lbl { color: var(--muted); }
html.dark .soma-qpill, html.dark .soma-qstrip a { background: var(--card); border-color: var(--line); color: var(--ink); }
html.dark .soma-qpill:hover, html.dark .soma-qstrip a:hover { border-color: var(--teal-d); color: var(--teal-d); background: #13283D; }
html.dark .soma-qpill[aria-current="page"], html.dark .soma-qstrip a[aria-current="page"] { border-color: var(--teal); background: var(--teal-soft); color: var(--mint); }
html.dark .dct-brand, html.dark header.top .brand { color: #fff; }
html.dark .dct-brand img { border-color: rgba(43,217,180,.32); box-shadow: 0 3px 12px rgba(0,0,0,.35); }
html.dark .dct-brand small { color: var(--mint); }
html.dark .dct-nav a, html.dark .dct-drop-btn, html.dark header.top nav.top a { color: #C2D0D9; }
html.dark .dct-nav a:hover, html.dark .dct-drop-btn:hover, html.dark .dct-drop.open .dct-drop-btn { background: var(--teal-soft); color: var(--mint); }
html.dark .dct-nav a[aria-current="page"], html.dark .dct-drop.has-current .dct-drop-btn { background: var(--teal-soft); color: var(--mint); }
html.dark .dct-drop-menu { background: var(--card); border-color: var(--line); box-shadow: var(--shadow-md); }
html.dark .dct-drop-menu a { color: #C2D0D9; }
html.dark .dct-drop-menu a:hover, html.dark .dct-drop-menu a[aria-current="page"] { background: var(--teal-soft); color: var(--mint); }
@media (max-width: 1220px) { html.dark .dct-drop-menu { background: transparent; border-left-color: var(--line); box-shadow: none; } }
html.dark .dct-bell, html.dark .dct-burger { background: var(--card); border-color: var(--line); color: #fff; }
html.dark .dct-burger i { background: #fff; }
@media (max-width: 1220px) { html.dark .dct-nav { background: var(--card); border-bottom-color: var(--line); } }
html.dark .dct-sub { background: var(--navy); border-bottom-color: var(--line); }
html.dark .dct-tabs a { color: #C2D0D9; }
html.dark .dct-tabs a:hover { background: var(--teal-soft); color: #fff; }
html.dark .dct-tabs a.on { background: linear-gradient(135deg, #0A84FF, #0D9488); color: #fff; }
html.dark .dct-ft { background: #050C14; }
html.dark body .hero { background: linear-gradient(180deg, #0D2034 0%, var(--bg) 100%); border-bottom-color: var(--line); color: var(--ink); }
html.dark body .hero h1 { color: var(--ink); }
html.dark body .hero p { color: var(--muted); }
html.dark .card, html.dark .feat, html.dark .note, html.dark .post, html.dark .prose, html.dark .legal,
html.dark .cat, html.dark .art, html.dark .set, html.dark .q, html.dark .end, html.dark .scene,
html.dark .mod, html.dark .kpi, html.dark .stat, html.dark .tool, html.dark .toc, html.dark .toc a,
html.dark .proto, html.dark .item, html.dark .guest, html.dark .pill, html.dark .mode, html.dark .flash,
html.dark article, html.dark .panel, html.dark .box, html.dark .tile, html.dark .vote button,
html.dark button.ghost, html.dark .btn.ghost, html.dark .opt, html.dark body .opt,
html.dark .tabs button.on, html.dark .dct-m {
  background: var(--card);
  border-color: var(--line);
  color: var(--ink);
}
html.dark .mode.on, html.dark body .mode.on, html.dark tr.me { background: var(--teal-soft); border-color: var(--teal); }
html.dark .opt:hover, html.dark .vote button:hover, html.dark .toc a:hover { background: #16293D; }
html.dark .opt.right, html.dark .opt.ok, html.dark .opt.correct { background: #12362D; border-color: var(--teal); }
html.dark .opt.wrong { background: #3A1D20; border-color: #C0392B; }
html.dark .opt .k, html.dark body .opt .k, html.dark body .mode .ic, html.dark .ic, html.dark .proto .ic,
html.dark .spec, html.dark .tools button, html.dark .tabs button, html.dark .gate .who,
html.dark .msg-row.theirs .bubble, html.dark .guest .ghost, html.dark .guest .demo, html.dark .fb, html.dark .av {
  background: #16293D;
  color: var(--ink);
  border-color: var(--line);
}
html.dark .tabs button.on { background: linear-gradient(135deg, #0A84FF, #0D9488); color: #fff; }
html.dark .exp .pr, html.dark .out { background: #0D1D2C; border-color: var(--line); color: var(--ink); }
html.dark .out.warn { background: #2D1E1D; border-color: #5A3328; }
html.dark .prose blockquote, html.dark .take, html.dark .disc, html.dark .warn, html.dark .note.warn, html.dark .state {
  background: #282516;
  border-color: #594E22;
  color: #F0E6C0;
}
html.dark .prose .alert, html.dark .take.bad, html.dark .msg.err, html.dark .pill.off, html.dark .pill.ban, html.dark button.no {
  background: #3A1D20;
  color: #F5B5AB;
  border-color: #7A3027;
}
html.dark .msg.ok { background: #12362D; color: #9FE8D5; }
html.dark .prose .inline-cta { background: #0D1D2C; border-color: var(--line); }
html.dark .chip, html.dark .badge { background: #16293D; color: var(--ink); }
html.dark input, html.dark select, html.dark textarea { background: #0A1624; color: var(--ink); border-color: var(--line); }
html.dark input::placeholder, html.dark textarea::placeholder { color: #6C808E; }
html.dark table { color: var(--ink); }
html.dark th, html.dark td, html.dark table.lb td, html.dark hr { border-color: var(--line); }
html.dark .dct-cta { background: linear-gradient(135deg, #0A84FF, #0D9488); color: #FFFFFF !important; }
html.dark .dct-cta:hover { background: linear-gradient(135deg, #1E90FF, #14B8A6); }
html.dark .dct-doctors-btn {
  background: #132238;
  color: #F8FAFC !important;
  border-color: #F59E0B;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
}
html.dark .dct-doctors-btn:hover {
  background: #1B3150;
  border-color: #FBBF24;
}
html.dark .btn, html.dark button.primary { background: linear-gradient(135deg, #0A84FF, #0D9488); border-color: transparent; color: #FFFFFF; }
html.dark .btn:hover, html.dark button.primary:hover { background: linear-gradient(135deg, #1E90FF, #14B8A6); border-color: transparent; }
html.dark .feat .more, html.dark .feat .tag, html.dark .art .tag, html.dark h2.sec { color: var(--mint); }
html:not(.dark) .ct-teal { color: #0066CC !important; }
html:not(.dark) .ct-grey { color: #4A6075 !important; }

/* Soma Beta Bug Report (bottom-left, Soma Medical Magazine v2) */
.soma-beta-btn {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 9990;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 15px;
  border-radius: 999px;
  background: #0B1F2A;
  color: #FFFFFF;
  border: 1.5px solid #F59E0B;
  box-shadow: 0 8px 24px rgba(11, 31, 42, .24);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}
.soma-beta-btn:hover {
  transform: translateY(-2px);
  background: #122940;
  border-color: #FBBF24;
  box-shadow: 0 12px 28px rgba(11, 31, 42, .32);
}
.soma-beta-short { display: none; }
@media (max-width: 480px) {
  .soma-beta-btn {
    left: 12px;
    bottom: 18px;
    padding: 8px 12px;
    font-size: 12.5px;
  }
  .soma-beta-full { display: none; }
  .soma-beta-short { display: inline; }
}

.soma-beta-backdrop[hidden] { display: none; }
.soma-beta-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9991;
  background: rgba(11, 31, 42, .52);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.soma-beta-modal {
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: #FFFFFF;
  color: #0B1F2A;
  border: 1px solid #E6E2D8;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(11, 31, 42, .24);
  padding: 22px;
  font-family: var(--sans);
}

.soma-beta-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #E6E2D8;
}
.soma-beta-hd-txt {
  display: flex;
  align-items: center;
  gap: 8px;
}
.soma-beta-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  background: #E6F7F5;
  color: #0D9488;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
}
.soma-beta-hd h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  color: #0B1F2A;
}
.soma-beta-close {
  background: transparent;
  border: 0;
  color: #475569;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}
.soma-beta-close:hover {
  background: #FAF9F6;
  color: #0B1F2A;
}

.soma-beta-form {
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.soma-beta-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.soma-beta-field label {
  font-size: 13px;
  font-weight: 600;
  color: #0B1F2A;
}
.soma-beta-req { color: #B91C1C; }
.soma-beta-field input,
.soma-beta-field select,
.soma-beta-field textarea {
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid #E6E2D8;
  background: #FAF9F6;
  color: #0B1F2A;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.soma-beta-field input:focus,
.soma-beta-field select:focus,
.soma-beta-field textarea:focus {
  outline: none;
  border-color: #0D9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, .16);
  background: #FFFFFF;
}

.soma-beta-page {
  font-size: 12px;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 6px;
}
.soma-beta-page code {
  padding: 2px 7px;
  border-radius: 6px;
  background: #FAF9F6;
  border: 1px solid #E6E2D8;
  color: #0B1F2A;
  font-size: 12px;
  word-break: break-all;
}

.soma-beta-status[hidden] { display: none; }
.soma-beta-status {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.4;
}
.soma-beta-status.ok {
  background: #E6F7F5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}
.soma-beta-status.err {
  background: #FEF2F2;
  color: #B91C1C;
  border: 1px solid #FECACA;
}

.soma-beta-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}
.soma-beta-cancel {
  padding: 9px 15px;
  border-radius: 10px;
  border: 1px solid #E6E2D8;
  background: #FAF9F6;
  color: #0B1F2A;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.soma-beta-cancel:hover { background: #F1EFE8; }
.soma-beta-submit {
  padding: 9px 18px;
  border-radius: 10px;
  border: 0;
  background: linear-gradient(135deg, #0A84FF, #0D9488);
  color: #FFFFFF;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s ease, transform .15s ease;
}
.soma-beta-submit:hover:not(:disabled) { opacity: .94; transform: translateY(-1px); }
.soma-beta-submit:disabled { opacity: .6; cursor: not-allowed; }

/* Dark mode */
html.dark .soma-beta-btn {
  background: #B91C1C;
  color: #FFFFFF;
  border-color: #FBBF24;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .42);
}
html.dark .soma-beta-btn:hover {
  background: #991B1B;
  border-color: #FDE68A;
}
html.dark .soma-beta-modal {
  background: #0F2032;
  color: #F1F5F9;
  border-color: #23384E;
}
html.dark .soma-beta-hd { border-bottom-color: #23384E; }
html.dark .soma-beta-hd h2 { color: #F8FAFC; }
html.dark .soma-beta-badge { background: #12362D; color: #5EEAD4; }
html.dark .soma-beta-close { color: #94A3B8; }
html.dark .soma-beta-close:hover { background: #16293D; color: #F8FAFC; }
html.dark .soma-beta-field label { color: #E2E8F0; }
html.dark .soma-beta-field input,
html.dark .soma-beta-field select,
html.dark .soma-beta-field textarea {
  background: #0A1624;
  color: #F1F5F9;
  border-color: #23384E;
}
html.dark .soma-beta-field input:focus,
html.dark .soma-beta-field select:focus,
html.dark .soma-beta-field textarea:focus {
  background: #0D1D2C;
  border-color: #14D4C4;
}
html.dark .soma-beta-page { color: #94A3B8; }
html.dark .soma-beta-page code {
  background: #0A1624;
  border-color: #23384E;
  color: #E2E8F0;
}
html.dark .soma-beta-status.ok {
  background: #12362D;
  color: #9FE8D5;
  border-color: #1E5A4B;
}
html.dark .soma-beta-status.err {
  background: #3A1D20;
  color: #F5B5AB;
  border-color: #7A3027;
}
html.dark .soma-beta-cancel {
  background: #16293D;
  border-color: #23384E;
  color: #E2E8F0;
}
html.dark .soma-beta-cancel:hover { background: #1D354E; }

