/* =====================================================================
   LE MONDE TECH — style.css
   Design : rouge & blanc, éditorial tech
   ===================================================================== */

/* ---------- Variables ---------- */
:root {
  --red:        #e11d2e;
  --red-dark:   #b31421;
  --red-soft:   #fdecef;
  --ink:        #0f1115;
  --ink-2:      #2a2f3a;
  --muted:      #6b7280;
  --muted-2:    #9aa1ad;
  --line:       #e6e8ec;
  --line-2:     #f1f2f5;
  --bg:         #ffffff;
  --bg-2:       #f7f8fa;
  --bg-3:       #eef0f4;
  --card:       #ffffff;
  --shadow-sm:  0 1px 2px rgba(15,17,21,.06);
  --shadow:     0 2px 10px rgba(15,17,21,.07);
  --shadow-lg:  0 14px 40px rgba(15,17,21,.13);
  --radius:     10px;
  --radius-lg:  16px;
  --maxw:       1280px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
}

html[data-theme="dark"] {
  --ink:        #f3f4f6;
  --ink-2:      #d7dae0;
  --muted:      #9aa1ad;
  --muted-2:    #717885;
  --line:       #262a33;
  --line-2:     #1c2027;
  --bg:         #0c0e12;
  --bg-2:       #12151b;
  --bg-3:       #191d25;
  --card:       #12151b;
  --red-soft:   #2a1116;
  --shadow-sm:  0 1px 2px rgba(0,0,0,.4);
  --shadow:     0 2px 12px rgba(0,0,0,.45);
  --shadow-lg:  0 14px 44px rgba(0,0,0,.6);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.18; letter-spacing: -.02em; font-weight: 800; }
p { margin: 0 0 1em; }
::selection { background: var(--red); color: #fff; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Barre de progression ---------- */
.progress-bar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: var(--red); z-index: 200; transition: width .1s linear;
}

/* =====================================================================
   EN-TÊTE
   ===================================================================== */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--bg); border-bottom: 1px solid var(--line); }

/* Bandeau technique */
.topbar { background: var(--ink); color: #fff; font-size: 12px; }
html[data-theme="dark"] .topbar { background: #000; border-bottom: 1px solid var(--line); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; height: 34px; gap: 12px; }
.topbar__date { text-transform: capitalize; color: #b9bfca; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__right { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.topbar__live { color: #fff; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; font-size: 11px; }
.topbar__sep { color: #4b5563; }
.topbar__link { color: #b9bfca; transition: color .15s; }
.topbar__link:hover { color: #fff; }
.live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--red);
  box-shadow: 0 0 0 0 rgba(225,29,46,.7); animation: pulse 2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(225,29,46,.65); }
  70%  { box-shadow: 0 0 0 7px rgba(225,29,46,0); }
  100% { box-shadow: 0 0 0 0 rgba(225,29,46,0); }
}

/* Masthead */
.masthead { padding: 18px 0 16px; }
.masthead__inner { display: flex; align-items: center; gap: 14px; }

.brand { display: flex; align-items: center; gap: 16px; margin-right: auto; min-width: 0; }

/* Logo image (noir en clair / blanc en sombre) */
.brand__logo {
  height: 78px; width: auto; flex: none;
  display: block;
}
.brand__logo--dark { display: none; }
html[data-theme="dark"] .brand__logo--light { display: none; }
html[data-theme="dark"] .brand__logo--dark  { display: block; }

/* La baseline reste dans le DOM (utilisée par app.js) mais n'est plus affichée
   à côté du logo : le logo porte déjà l'identité. */
.brand__baseline--inline { display: none; }

.brand__text { display: flex; flex-direction: column; }
.brand__name {
  font-size: 25px; font-weight: 900; letter-spacing: -.045em; line-height: 1;
  color: var(--ink);
}
.brand__name span { color: var(--red); }
.brand__baseline {
  font-size: 11.5px; color: var(--muted); margin-top: 4px;
  letter-spacing: .01em; font-weight: 500;
}

.icon-btn {
  display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 10px;
  color: var(--ink-2); background: var(--bg-2);
  border: 1px solid var(--line);
  transition: all .16s;
  flex: none;
}
.icon-btn:hover { background: var(--red); border-color: var(--red); color: #fff; }
.icon-btn--menu { display: none; }
.icon-moon { display: none; }
html[data-theme="dark"] .icon-sun { display: none; }
html[data-theme="dark"] .icon-moon { display: block; }

/* Navigation */
.nav { border-top: 1px solid var(--line); background: var(--bg); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nav__list { display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.nav__list::-webkit-scrollbar { display: none; }
.nav__list--right { flex: none; }
.nav__link {
  display: inline-block; padding: 13px 13px 12px;
  font-size: 13.5px; font-weight: 700; color: var(--ink-2);
  letter-spacing: -.01em; white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: color .15s, border-color .15s;
}
.nav__link:hover { color: var(--red); }
.nav__link.is-active { color: var(--red); border-bottom-color: var(--red); }
.nav__count {
  display: inline-block; min-width: 17px; padding: 0 5px;
  font-size: 10.5px; font-weight: 800; line-height: 17px; text-align: center;
  background: var(--bg-3); color: var(--muted); border-radius: 9px;
}
.nav__link.is-active .nav__count { background: var(--red); color: #fff; }

/* Fil d'actu */
.ticker { background: var(--red); color: #fff; overflow: hidden; }
.ticker__inner { display: flex; align-items: center; gap: 0; height: 38px; }
.ticker__label {
  flex: none; font-size: 11px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase;
  background: rgba(0,0,0,.22); padding: 4px 10px; border-radius: 4px; margin-right: 14px;
}
.ticker__viewport { overflow: hidden; flex: 1; }
.ticker__track { display: inline-flex; gap: 44px; white-space: nowrap; animation: scroll-x 60s linear infinite; }
.ticker__track:hover { animation-play-state: paused; }
.ticker__item { font-size: 13.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.ticker__item::before { content: "◆"; font-size: 8px; opacity: .75; }
@keyframes scroll-x { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* =====================================================================
   FILTRES / TITRES DE SECTION
   ===================================================================== */
/* Barre d'outils sous la navigation (nombre de resultats + tri) */
.toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 15px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.toolbar__left, .toolbar__right { display: flex; align-items: center; gap: 14px; }
.result-count { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.sort { display: flex; align-items: center; gap: 7px; }
.sort__label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.sort__select {
  font: inherit; font-size: 12.5px; font-weight: 700;
  padding: 6px 9px; border-radius: 7px;
  background: var(--bg-2); color: var(--ink);
  border: 1px solid var(--line); cursor: pointer;
}

.section-head { padding: 26px 0 4px; }
.section-head__title { font-size: clamp(26px, 4vw, 38px); }
.section-head__title::before {
  content: ""; display: inline-block; width: 5px; height: .82em;
  background: var(--red); border-radius: 2px; margin-right: 13px; vertical-align: -.06em;
}
.section-head__sub { color: var(--muted); font-size: 14.5px; margin: 8px 0 0 18px; }

/* =====================================================================
   LAYOUT
   ===================================================================== */
.layout { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 44px; padding: 24px 0 60px; }
.layout__main { min-width: 0; }
.layout__aside { display: flex; flex-direction: column; gap: 26px; }

/* =====================================================================
   ARTICLE À LA UNE
   ===================================================================== */
.hero {
  position: relative; display: grid; grid-template-columns: 1.15fr 1fr;
  border-radius: var(--radius-lg); overflow: hidden;
  background: var(--bg-2); border: 1px solid var(--line);
  margin-bottom: 34px; cursor: pointer;
  transition: box-shadow .22s, transform .22s;
}
.hero:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.hero__media { position: relative; overflow: hidden; min-height: 300px; background: var(--bg-3); }
.hero__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.hero:hover .hero__media img { transform: scale(1.04); }
.hero__body { padding: 30px 32px; display: flex; flex-direction: column; justify-content: center; }
.hero__flag {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase;
  color: var(--red); margin-bottom: 14px;
}
.hero__flag::before { content: ""; width: 22px; height: 3px; background: var(--red); border-radius: 2px; }
.hero__title {
  font-size: clamp(23px, 2.5vw, 32px); margin-bottom: 14px;
  letter-spacing: -.032em;
}
.hero:hover .hero__title { color: var(--red); }
.hero__title { transition: color .16s; }
.hero__chapo { color: var(--muted); font-size: 15px; margin-bottom: 20px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero__meta { display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: var(--muted); font-weight: 600; }

/* =====================================================================
   GRILLE D'ARTICLES
   ===================================================================== */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 26px; }
.grid--3 { grid-template-columns: repeat(3, minmax(0,1fr)); }

.card {
  display: flex; flex-direction: column;
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line);
  transition: box-shadow .2s, transform .2s, border-color .2s;
  cursor: pointer;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: transparent; }
.card__media { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--bg-3); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s; }
.card:hover .card__media img { transform: scale(1.055); }
.card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.card__cat {
  align-self: flex-start;
  font-size: 10.5px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase;
  color: var(--red); margin-bottom: 9px;
  background: var(--red-soft); padding: 3px 8px; border-radius: 4px;
}
.card__title {
  font-size: 17.5px; margin-bottom: 9px; letter-spacing: -.022em;
  transition: color .15s;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card:hover .card__title { color: var(--red); }
.card__chapo {
  font-size: 13.5px; color: var(--muted); line-height: 1.55; margin-bottom: 14px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__foot {
  margin-top: auto; display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; color: var(--muted-2); font-weight: 600;
  padding-top: 12px; border-top: 1px solid var(--line-2);
}
.card__foot .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }

/* Badge NOUVEAU */
.badge-new {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: var(--red); color: #fff;
  font-size: 10px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 4px;
  box-shadow: 0 2px 8px rgba(225,29,46,.4);
}

/* Bouton sauvegarde */
.bookmark-btn {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 32px; height: 32px; border-radius: 8px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.94); color: var(--ink-2);
  box-shadow: var(--shadow-sm);
  transition: all .15s; opacity: 0;
}
.card:hover .bookmark-btn, .bookmark-btn.is-saved { opacity: 1; }
.bookmark-btn:hover { background: var(--red); color: #fff; }
.bookmark-btn.is-saved { background: var(--red); color: #fff; opacity: 1; }

/* =====================================================================
   ÉTAT VIDE / BOUTONS
   ===================================================================== */
.empty { text-align: center; padding: 70px 20px; }
.empty__icon { font-size: 46px; color: var(--muted-2); margin-bottom: 10px; }
.empty h3 { font-size: 20px; margin-bottom: 6px; }
.empty p { color: var(--muted); font-size: 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 8px;
  font-size: 14px; font-weight: 700; letter-spacing: -.01em;
  transition: all .16s; border: 1px solid transparent;
}
.btn--red { background: var(--red); color: #fff; }
.btn--red:hover { background: var(--red-dark); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink-2); }
.btn--ghost:hover { border-color: var(--red); color: var(--red); }
.btn--sm { padding: 7px 13px; font-size: 12.5px; }
.btn--load {
  background: var(--bg-2); border: 1px solid var(--line); color: var(--ink);
  padding: 13px 34px; font-size: 14px;
}
.btn--load:hover { border-color: var(--red); color: var(--red); background: var(--bg); }

.loadmore { display: flex; justify-content: center; padding: 40px 0 10px; }

/* =====================================================================
   COLONNE LATÉRALE / WIDGETS
   ===================================================================== */
.widget {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
}
.widget__title {
  font-size: 12px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink); margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 2px solid var(--red);
  display: inline-block;
}
.widget__text { font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }
.widget__legal { font-size: 11px; color: var(--muted-2); margin: 10px 0 0; }

.widget--newsletter { background: var(--ink); border-color: var(--ink); }
html[data-theme="dark"] .widget--newsletter { background: #000; border-color: var(--line); }
.widget--newsletter .widget__title { color: #fff; border-bottom-color: var(--red); }
.widget--newsletter .widget__text { color: #b9bfca; }
.widget--newsletter .widget__legal { color: #6b7280; }

.newsletter { display: flex; flex-direction: column; gap: 9px; }
.newsletter__input {
  width: 100%; padding: 11px 13px; border-radius: 8px;
  border: 1px solid #333a45; background: #1a1e26; color: #fff;
  font: inherit; font-size: 13.5px;
}
.newsletter__input::placeholder { color: #6b7280; }
.newsletter__input:focus { outline: 2px solid var(--red); outline-offset: -1px; border-color: var(--red); }
.newsletter__btn { width: 100%; }

/* Classement */
.ranking { counter-reset: rank; display: flex; flex-direction: column; gap: 2px; }
.ranking li { counter-increment: rank; }
.ranking a {
  display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line);
  transition: color .15s;
}
.ranking li:last-child a { border-bottom: none; padding-bottom: 0; }
.ranking a::before {
  content: counter(rank, decimal-leading-zero);
  flex: none; font-size: 19px; font-weight: 900; color: var(--red);
  line-height: 1.1; letter-spacing: -.04em; opacity: .85;
}
.ranking__txt { font-size: 13.5px; font-weight: 700; line-height: 1.4; letter-spacing: -.015em; }
.ranking a:hover .ranking__txt { color: var(--red); }

/* Carte Instagram */
.insta-card { display: flex; gap: 13px; align-items: flex-start; }
.insta-card__ico {
  flex: none; width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center; font-size: 21px;
  background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888);
  color: #fff;
}
.insta-card strong { display: block; font-size: 13.5px; margin-bottom: 3px; }
.insta-card p { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; line-height: 1.5; }

/* Nuage de tags */
.tagcloud { display: flex; flex-wrap: wrap; gap: 7px; }
.tagcloud .tag {
  font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 99px;
  background: var(--bg); border: 1px solid var(--line); color: var(--muted);
  transition: all .15s;
}
.tagcloud .tag:hover { border-color: var(--red); color: var(--red); background: var(--red-soft); }

/* =====================================================================
   ARTICLE (vue détail)
   ===================================================================== */
.view[hidden] { display: none; }

.breadcrumb { display: flex; align-items: center; gap: 8px; padding: 22px 0 0; font-size: 12.5px; color: var(--muted); font-weight: 600; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--red); }
.breadcrumb .sep { color: var(--muted-2); }

.post { max-width: 780px; margin: 0 auto; padding: 26px 0 0; }
.post__cat {
  display: inline-block; font-size: 11px; font-weight: 900; letter-spacing: .1em;
  text-transform: uppercase; color: #fff; background: var(--red);
  padding: 5px 11px; border-radius: 4px; margin-bottom: 16px;
}
.post__title { font-size: clamp(28px, 4.4vw, 46px); letter-spacing: -.035em; margin-bottom: 18px; }
.post__chapo {
  font-size: 18px; line-height: 1.55; color: var(--ink-2); font-weight: 500;
  padding-left: 18px; border-left: 4px solid var(--red); margin-bottom: 26px;
}
.post__meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted); font-weight: 600;
  padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}
.post__meta .author { color: var(--ink); font-weight: 700; }
.post__figure { margin: 0 0 30px; }
.post__figure img { width: 100%; border-radius: var(--radius); }
.post__figure figcaption { font-size: 11.5px; color: var(--muted-2); margin-top: 9px; font-style: italic; }

.post__content { font-size: 17px; line-height: 1.75; color: var(--ink-2); }
.post__content > p:first-of-type::first-letter { }
.post__content .lead { font-size: 19px; line-height: 1.65; color: var(--ink); font-weight: 500; }
.post__content h2 {
  font-size: 25px; color: var(--ink); margin: 38px 0 14px; letter-spacing: -.028em;
  padding-top: 8px;
}
.post__content h2::before {
  content: ""; display: block; width: 40px; height: 4px; background: var(--red);
  border-radius: 2px; margin-bottom: 13px;
}
.post__content h3 { font-size: 19px; color: var(--ink); margin: 26px 0 10px; }
.post__content strong { color: var(--ink); font-weight: 700; }
.post__content ul { margin: 0 0 20px; padding-left: 0; }
.post__content ul li {
  position: relative; padding-left: 24px; margin-bottom: 9px;
}
.post__content ul li::before {
  content: ""; position: absolute; left: 4px; top: .62em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--red);
}
.post__content blockquote {
  margin: 28px 0; padding: 20px 24px;
  background: var(--bg-2); border-left: 4px solid var(--red);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 18px; font-style: italic; color: var(--ink); line-height: 1.6;
}
.post__content blockquote cite {
  display: block; margin-top: 10px; font-size: 12.5px; font-style: normal;
  font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--red);
}


/* --- Bloc VERDICT (format FLASH TEST) ------------------------------ */
.verdict {
  margin: 1.9rem 0;
  border: 2px solid #111;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.verdict__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: #111;
  color: #fff;
}
.verdict__label {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.verdict__note {
  font-size: 1.9rem;
  font-weight: 900;
  line-height: 1;
  color: #ff3b4a;
  white-space: nowrap;
}
.verdict__note small {
  font-size: 0.9rem;
  font-weight: 700;
  color: #9a9aa5;
}
.verdict__body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.verdict__col {
  padding: 1.1rem 1.25rem 1.25rem;
}
.verdict__col + .verdict__col {
  border-left: 1px solid #ececec;
}
.verdict__col h4 {
  margin: 0 0 0.6rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.verdict__col--pour h4 { color: #0f8a3d; }
.verdict__col--contre h4 { color: #e11d2e; }
.verdict__col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.verdict__col li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: 0.45rem;
  font-size: 0.93rem;
  line-height: 1.4;
}
.verdict__col li::before {
  position: absolute;
  left: 0;
  font-weight: 900;
}
.verdict__col--pour li::before { content: "+"; color: #0f8a3d; }
.verdict__col--contre li::before { content: "−"; color: #e11d2e; }

html[data-theme="dark"] .verdict { border-color: #3a3a44; background: #14141a; }
html[data-theme="dark"] .verdict__col + .verdict__col { border-left-color: #2d2d33; }

@media (max-width: 620px) {
  .verdict__body { grid-template-columns: 1fr; }
  .verdict__col + .verdict__col {
    border-left: 0;
    border-top: 1px solid #ececec;
  }
  html[data-theme="dark"] .verdict__col + .verdict__col { border-top-color: #2d2d33; }
}

/* --- Tableaux dans le corps d'article ------------------------------- */
.post__content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.75rem 0;
  font-size: 0.95rem;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  overflow: hidden;
}
.post__content thead {
  background: #fafafa;
}
.post__content th {
  text-align: left;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #111;
  padding: 0.85rem 1rem;
  border-bottom: 2px solid #e11d2e;
}
.post__content td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #ececec;
  vertical-align: top;
  line-height: 1.45;
}
.post__content tbody tr:last-child td {
  border-bottom: 0;
}
.post__content tbody tr:nth-child(even) {
  background: #fcfcfc;
}
.post__content td:last-child,
.post__content th:last-child {
  text-align: right;
  white-space: nowrap;
}
html[data-theme="dark"] .post__content table {
  border-color: #2d2d33;
}
html[data-theme="dark"] .post__content thead {
  background: #1b1b20;
}
html[data-theme="dark"] .post__content th {
  color: #f2f2f2;
}
html[data-theme="dark"] .post__content td {
  border-bottom-color: #26262c;
}
html[data-theme="dark"] .post__content tbody tr:nth-child(even) {
  background: #16161a;
}

/* Sur mobile : le tableau devient une liste lisible */
@media (max-width: 620px) {
  .post__content table,
  .post__content thead,
  .post__content tbody,
  .post__content th,
  .post__content td,
  .post__content tr {
    display: block;
  }
  .post__content thead {
    display: none;
  }
  .post__content tr {
    border-bottom: 1px solid #ececec;
    padding: 0.7rem 0;
  }
  .post__content tbody tr:last-child {
    border-bottom: 0;
  }
  .post__content td {
    border: 0;
    padding: 0.15rem 1rem;
    text-align: left;
  }
  .post__content td:first-child {
    font-weight: 700;
  }
  .post__content td:last-child {
    text-align: left;
    white-space: normal;
    color: #e11d2e;
  }
  html[data-theme="dark"] .post__content td:last-child {
    color: #ff5a67;
  }
}

.post__content pre {
  background: var(--ink); color: #e6e8ec; padding: 16px 18px; border-radius: var(--radius);
  overflow-x: auto; font-size: 13.5px; line-height: 1.6; margin: 0 0 22px;
}
html[data-theme="dark"] .post__content pre { background: #000; border: 1px solid var(--line); }
.post__content code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.post__content p code, .post__content li code {
  background: var(--bg-3); padding: 2px 6px; border-radius: 4px; font-size: .9em;
}

.post__sources {
  margin-top: 40px; padding: 20px 22px; border-radius: var(--radius);
  background: var(--bg-2); border: 1px solid var(--line);
}
.post__sources h3 { font-size: 12px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; margin-bottom: 12px; }
.post__sources ul { display: flex; flex-wrap: wrap; gap: 8px; }
.post__sources a {
  font-size: 12.5px; font-weight: 700; padding: 6px 12px; border-radius: 99px;
  background: var(--bg); border: 1px solid var(--line); color: var(--ink-2);
  transition: all .15s; display: inline-block;
}
.post__sources a:hover { border-color: var(--red); color: var(--red); }

.post__share { display: flex; align-items: center; gap: 10px; margin-top: 26px; flex-wrap: wrap; }
.post__share span { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.share-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px;
  border-radius: 50%; background: var(--bg-2); border: 1px solid var(--line);
  color: var(--ink-2); transition: all .15s;
}
.share-btn:hover { background: var(--red); border-color: var(--red); color: #fff; }

.post__tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 22px; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 780px; margin: 50px auto 0; }
.post-nav__item {
  padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--bg-2); transition: all .16s;
}
.post-nav__item:hover { border-color: var(--red); }
.post-nav__item--next { text-align: right; }
.post-nav__dir { font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--red); display: block; margin-bottom: 6px; }
.post-nav__title { font-size: 14.5px; font-weight: 700; line-height: 1.35; letter-spacing: -.015em; }

.related { padding: 56px 0 20px; }
.related__title { font-size: 22px; margin-bottom: 24px; }
.related__title::before {
  content: ""; display: inline-block; width: 5px; height: .82em;
  background: var(--red); border-radius: 2px; margin-right: 12px; vertical-align: -.06em;
}

/* =====================================================================
   RECHERCHE
   ===================================================================== */
.search-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(10,12,16,.62); backdrop-filter: blur(5px);
  display: flex; justify-content: center; align-items: flex-start;
  padding: 80px 20px 20px;
  animation: fade .16s ease-out;
}
.search-overlay[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.search-overlay__box {
  width: 100%; max-width: 660px; background: var(--bg);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden;
  animation: rise .2s ease-out;
}
@keyframes rise { from { transform: translateY(-14px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.search-overlay__field {
  display: flex; align-items: center; gap: 12px; padding: 16px 20px;
  border-bottom: 1px solid var(--line); color: var(--muted);
}
.search-overlay__field input {
  flex: 1; border: none; background: none; font: inherit; font-size: 16px;
  color: var(--ink); outline: none;
}
.search-overlay__close {
  font-size: 11px; font-weight: 800; color: var(--muted);
  padding: 4px 8px; border-radius: 5px; background: var(--bg-2);
  border: 1px solid var(--line);
}
.search-overlay__results { max-height: 56vh; overflow-y: auto; padding: 8px; }
.sr-item {
  display: flex; gap: 13px; padding: 11px 12px; border-radius: 9px;
  transition: background .13s; align-items: center;
}
.sr-item:hover { background: var(--bg-2); }
.sr-item__thumb { width: 62px; height: 42px; border-radius: 6px; object-fit: cover; flex: none; background: var(--bg-3); }
.sr-item__cat { font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--red); }
.sr-item__title { font-size: 13.5px; font-weight: 700; line-height: 1.35; letter-spacing: -.015em; }
.sr-empty { padding: 30px 20px; text-align: center; color: var(--muted); font-size: 14px; }

/* =====================================================================
   PIED DE PAGE
   ===================================================================== */
.site-footer { background: var(--ink); color: #b9bfca; margin-top: 40px; }
html[data-theme="dark"] .site-footer { background: #05070a; border-top: 1px solid var(--line); }
.footer__inner {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 36px;
  padding: 52px 20px 40px;
}
.brand--footer { margin-bottom: 14px; }
.brand__logo--footer { height: 68px; filter: none; }
.footer__text { font-size: 13px; line-height: 1.65; color: #8b93a1; }
.footer__text--sm { font-size: 12.5px; }
.footer__heading {
  font-size: 11.5px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase;
  color: #fff; margin-bottom: 15px;
}
.footer__links { display: flex; flex-direction: column; gap: 9px; }
.footer__links a { font-size: 13px; color: #8b93a1; transition: color .15s; }
.footer__links a:hover { color: var(--red); }
.footer__social { margin-top: 14px; }
.footer__sociallink {
  font-size: 12.5px; font-weight: 800; color: #fff;
  border-bottom: 2px solid var(--red); padding-bottom: 2px;
}
.footer__bottom { border-top: 1px solid rgba(255,255,255,.09); }
.footer__bottom-inner {
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 18px 20px; font-size: 12px; color: #6b7280;
}

/* Retour en haut */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--red); color: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 22px rgba(225,29,46,.42);
  transition: transform .18s, opacity .18s;
}
.to-top:hover { transform: translateY(-3px); }
.to-top[hidden] { display: none; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1080px) {
  .layout { grid-template-columns: 1fr; gap: 40px; }
  .layout__aside { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .hero { grid-template-columns: 1fr; }
  .hero__media { min-height: 240px; aspect-ratio: 16/9; }
  .footer__inner { grid-template-columns: 1fr 1fr; gap: 30px; }
}

@media (max-width: 820px) {
  .nav__inner { padding: 0; }
  .nav__list { display: none; }
  .nav__list--right { display: none; }
  .nav.is-open .nav__list {
    display: flex; flex-direction: column; align-items: stretch;
    padding: 8px 20px 14px; gap: 0;
  }
  .nav.is-open .nav__list--right { display: flex; }
  .nav.is-open .nav__link { padding: 12px 0; border-bottom: 1px solid var(--line-2); }
  .nav.is-open .nav__link.is-active { border-bottom-color: var(--red); }
  .icon-btn--menu { display: grid; }
  .grid, .grid--3 { grid-template-columns: 1fr; }
  .layout__aside { grid-template-columns: 1fr; }
  .post-nav { grid-template-columns: 1fr; }
  .post__content { font-size: 16.5px; }
  .toolbar__right { width: 100%; justify-content: space-between; }
  .brand__baseline { display: none; }
  .brand__baseline--inline { display: none; }
  .brand__logo { height: 46px; }
  .search-overlay { padding: 20px 12px; align-items: flex-start; }
}

@media (max-width: 560px) {
  .topbar__link, .topbar__sep { display: none; }
  .footer__inner { grid-template-columns: 1fr; }
  .hero__body { padding: 22px 20px; }
  .card__title { font-size: 16.5px; }
  .post__title { font-size: 27px; }
  .post__chapo { font-size: 16px; }
  .container { padding: 0 16px; }
}

/* Impression */
@media print {
  .site-header, .site-footer, .to-top, .post__share, .related, .progress-bar, .search-overlay { display: none !important; }
  body { background: #fff; color: #000; }
}

/* Accessibilité : focus visible */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--red); outline-offset: 2px; border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
