/* ═══════════════════════════════════════════════════════════
   DESIGN ÉDITORIAL — encre, crème et or (aux couleurs du logo)
   Se charge après Bootstrap : on surcharge ses variables.
═══════════════════════════════════════════════════════════ */
:root {
  --ink: #14181f;
  --ink-2: #2b323d;
  --muted: #667085;
  --line: #e7e2d6;
  --paper: #ffffff;
  --cream: #f7f4ec;
  --gold: #c9a227;
  --gold-deep: #8a6a0a;
  --radius: 10px;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;

  --bs-body-font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--paper);
  --bs-border-color: var(--line);
  --bs-dark-rgb: 20, 24, 31;
  --bs-link-color-rgb: 20, 24, 31;
  --bs-link-hover-color-rgb: 138, 106, 10;
}

body { line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 2px;
}
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 2000;
  background: var(--ink); color: #fff; padding: .6rem 1rem;
}
.skip-link:focus { left: 0; color: #fff; }

/* ── Boutons et composants Bootstrap harmonisés ── */
.btn-dark {
  --bs-btn-bg: var(--ink); --bs-btn-border-color: var(--ink);
  --bs-btn-hover-bg: var(--ink-2); --bs-btn-hover-border-color: var(--ink-2);
  --bs-btn-active-bg: #000; --bs-btn-active-border-color: #000;
  --bs-btn-disabled-bg: var(--ink); --bs-btn-disabled-border-color: var(--ink);
}
.btn-outline-dark {
  --bs-btn-color: var(--ink); --bs-btn-border-color: var(--ink);
  --bs-btn-hover-bg: var(--ink); --bs-btn-hover-border-color: var(--ink);
  --bs-btn-active-bg: var(--ink); --bs-btn-active-border-color: var(--ink);
}
.btn-warning {
  --bs-btn-color: var(--ink); --bs-btn-bg: var(--gold); --bs-btn-border-color: var(--gold);
  --bs-btn-hover-color: var(--ink); --bs-btn-hover-bg: #b8921f; --bs-btn-hover-border-color: #b8921f;
  --bs-btn-active-color: var(--ink); --bs-btn-active-bg: #a8841a; --bs-btn-active-border-color: #a8841a;
}
.card { border-color: var(--line); border-radius: var(--radius); }
.card-header.bg-dark { background-color: var(--ink) !important; }
.table-dark { --bs-table-bg: var(--ink); }
.form-control:focus { border-color: var(--gold-deep); box-shadow: 0 0 0 .2rem rgba(201, 162, 39, .25); }

/* ── En-tête ── */
.site-header { background: var(--paper); border-top: 3px solid var(--ink); }
.header-main {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: .75rem 1.25rem; padding-top: .9rem; padding-bottom: .9rem;
}
.brand { display: flex; align-items: center; gap: .7rem; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand img { width: 44px; height: 44px; border-radius: 50%; display: block; }
.brand-name {
  display: block; font-family: var(--serif); font-weight: 700;
  font-size: 1.35rem; line-height: 1.1; letter-spacing: -.01em;
}
.brand-tag {
  display: block; font-size: .68rem; color: var(--muted);
  letter-spacing: .06em; text-transform: uppercase;
}
.site-search { position: relative; flex: 1 1 260px; max-width: 420px; margin-left: auto; }
.site-search input {
  width: 100%; border: 1px solid var(--line); border-radius: 999px;
  background: var(--cream); padding: .55rem 2.8rem .55rem 1.1rem; font-size: .95rem;
}
.site-search button {
  position: absolute; right: .3rem; top: 50%; transform: translateY(-50%);
  border: 0; background: none; padding: .4rem .7rem; color: var(--ink-2);
}
.btn-account {
  border: 1px solid var(--line); border-radius: 999px; background: #fff;
  color: var(--ink); font-weight: 600; font-size: .9rem; padding: .45rem .95rem;
}
.btn-account:hover, .btn-account:focus { border-color: var(--ink); color: var(--ink); }

.cat-nav { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper); }
.cat-list {
  display: flex; gap: .15rem; margin: 0; padding: 0; list-style: none;
  overflow-x: auto; scrollbar-width: none;
}
.cat-list::-webkit-scrollbar { display: none; }
.cat-list a {
  display: block; padding: .8rem .95rem; white-space: nowrap;
  font-size: .9rem; font-weight: 600; color: var(--ink-2);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.cat-list a:hover { color: var(--gold-deep); }
.cat-list a.active { color: var(--ink); border-bottom-color: var(--gold); }

@media (max-width: 767.98px) {
  .site-search { order: 3; flex: 1 1 100%; max-width: none; margin-left: 0; }
  .header-account { margin-left: auto; }
}

/* ── Mise en page ── */
.page-wrap { padding-top: 2rem; padding-bottom: 1rem; }
.page-band { background: var(--cream); border-bottom: 1px solid var(--line); padding: 2rem 0 1.5rem; }
.band-title { font-family: var(--serif); font-weight: 700; font-size: clamp(1.8rem, 4vw, 2.5rem); margin: 0 0 .25rem; }
.empty-state { text-align: center; padding: 4rem 1rem; color: var(--ink-2); }
.empty-state h1, .empty-state h2 { font-family: var(--serif); font-size: 1.6rem; }

/* ── Vignettes ── */
.media-box {
  display: block; position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: var(--radius); background: var(--cream);
}
.thumb-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.post-card:hover .thumb-img, .hero-card:hover .thumb-img, .stack-item:hover .thumb-img { transform: scale(1.03); }
.thumb-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--cream); }
.thumb-fallback img { width: 56px; height: 56px; border-radius: 50%; }

/* ── Textes éditoriaux ── */
.eyebrow {
  display: inline-block; margin-bottom: .3rem; color: var(--gold-deep);
  font-size: .72rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
}
.eyebrow:hover { color: var(--ink); }
.post-meta { margin: 0; font-size: .8rem; color: var(--muted); }
.post-card { height: 100%; }
.post-card-body { padding: .85rem .1rem 0; }
.post-card-title { font-family: var(--serif); font-size: 1.15rem; line-height: 1.3; font-weight: 700; margin: .1rem 0 .4rem; }
.post-card-title a:hover, .hero-title a:hover, .stack-title a:hover { color: var(--gold-deep); }
.post-card-excerpt { font-size: .9rem; color: var(--ink-2); margin: 0 0 .5rem; }

/* ── À la une ── */
.hero-body { padding-top: 1rem; }
.hero-title { font-family: var(--serif); font-weight: 700; font-size: clamp(1.7rem, 3.4vw, 2.4rem); line-height: 1.15; letter-spacing: -.015em; margin: .1rem 0 .6rem; }
.hero-excerpt { font-size: 1.02rem; color: var(--ink-2); margin-bottom: .6rem; }
.stack { display: flex; flex-direction: column; gap: 1.1rem; }
.stack-item { display: grid; grid-template-columns: 120px 1fr; gap: .9rem; align-items: start; padding-bottom: 1.1rem; border-bottom: 1px solid var(--line); }
.stack-item:last-child { border-bottom: 0; padding-bottom: 0; }
.stack-item .media-box { aspect-ratio: 3 / 2; }
.stack-title { font-family: var(--serif); font-size: 1rem; line-height: 1.3; font-weight: 700; margin: 0 0 .25rem; }

/* ── Sections et barre latérale ── */
.block { margin-bottom: 2.75rem; }
.block-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid var(--ink); padding-bottom: .5rem; margin-bottom: 1.25rem; }
.block-head h2, .block-title { font-family: var(--serif); font-size: 1.4rem; font-weight: 700; margin: 0; }
.block-head a { font-size: .85rem; font-weight: 600; color: var(--gold-deep); }
.sidebar { position: sticky; top: 1rem; display: flex; flex-direction: column; gap: 1.75rem; }
.widget-title { font-size: .78rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; border-bottom: 2px solid var(--ink); padding-bottom: .5rem; margin: 0 0 1rem; }
.popular-list { list-style: none; margin: 0; padding: 0; }
.popular-list li { display: flex; gap: .85rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.popular-list li:last-child { border-bottom: 0; }
.popular-rank { font-family: var(--serif); font-size: 1.5rem; line-height: 1; font-weight: 700; color: var(--gold); min-width: 1.4rem; }
.popular-list a { font-family: var(--serif); font-weight: 700; line-height: 1.3; display: block; margin-bottom: .15rem; }
.popular-list a:hover { color: var(--gold-deep); }
.cat-widget { list-style: none; margin: 0; padding: 0; }
.cat-widget li { display: flex; justify-content: space-between; padding: .55rem 0; border-bottom: 1px solid var(--line); font-weight: 600; }
.cat-widget li span { color: var(--muted); font-weight: 400; }
.cat-widget a:hover { color: var(--gold-deep); }

/* ── Newsletter ── */
.newsletter-card { background: var(--cream); border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: var(--radius); padding: 1.25rem; }
.newsletter-card .widget-title { border: 0; padding: 0; margin-bottom: .4rem; }
.newsletter-msg { min-height: 1.2rem; margin: .5rem 0 0; font-size: .85rem; }
.newsletter-msg.ok { color: #1e6b3a; }
.newsletter-msg.warn { color: #9a5b00; }

/* ── Article ── */
.article-head { margin-bottom: 1.25rem; }
.article-title { font-family: var(--serif); font-weight: 700; font-size: clamp(1.9rem, 4vw, 2.7rem); line-height: 1.15; letter-spacing: -.015em; margin: .1rem 0 .8rem; }
.article-meta { color: var(--muted); font-size: .9rem; margin: 0; }
.article-meta a { color: var(--ink); font-weight: 600; }
.article-meta a:hover { color: var(--gold-deep); }
.article-figure { margin: 0 0 1.5rem; }
.article-body { font-family: var(--serif); font-size: 1.12rem; line-height: 1.8; color: #1d222b; margin-bottom: 1.5rem; }
.article-body h2, .article-body h3, .article-body h4 { font-family: var(--bs-body-font-family); font-weight: 700; margin: 2rem 0 .8rem; color: var(--ink); }
.article-body p { margin-bottom: 1.25rem; }
.article-body a { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
.article-body img { max-width: 100%; height: auto; border-radius: var(--radius); margin: 1rem 0; }
.article-body blockquote { border-left: 3px solid var(--gold); padding: .2rem 0 .2rem 1.2rem; color: var(--ink-2); font-style: italic; margin: 1.6rem 0; }
.article-body table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; }
.article-body th { background: var(--ink); color: #fff; }

.share { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: 1rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; }
.share-label { font-size: .78rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; margin-right: .25rem; }
.share-btn { display: inline-flex; align-items: center; gap: .4rem; padding: .42rem .85rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font-size: .85rem; font-weight: 600; cursor: pointer; }
.share-btn:hover { border-color: var(--ink); color: var(--ink); }
.share-btn[hidden] { display: none; }

.author-box { display: flex; align-items: center; gap: 1rem; background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 1.75rem; }
.author-avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--ink); color: var(--gold); display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 1.4rem; font-weight: 700; flex-shrink: 0; }
.author-box .author-avatar { width: 52px; height: 52px; font-size: 1.4rem; }
.author-name { margin: 0; font-weight: 700; }
.author-box a { font-size: .85rem; color: var(--gold-deep); font-weight: 600; }

.prev-next { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 2.25rem; }
.prev-next a { display: block; border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; }
.prev-next a:hover { border-color: var(--ink); }
.prev-next small { display: block; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
.prev-next span { font-family: var(--serif); font-weight: 700; line-height: 1.3; }
.comments { margin-bottom: 1rem; }
.comment { border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1.1rem; margin-bottom: .9rem; }

/* ── Pagination ── */
.pager { display: flex; justify-content: center; align-items: center; gap: 1rem; margin: 2.5rem 0 1rem; font-size: .9rem; }
.pager a, .pager .disabled { border: 1px solid var(--ink); border-radius: 999px; padding: .4rem 1rem; font-weight: 600; }
.pager a:hover { background: var(--ink); color: #fff; }
.pager .disabled { border-color: var(--line); color: var(--muted); }
.pager-info { color: var(--muted); }

/* ── Pied de page ── */
.site-footer { background: var(--cream); border-top: 3px solid var(--ink); margin-top: 4rem; padding: 3rem 0 1.25rem; color: var(--ink-2); }
.footer-brand { font-family: var(--serif); font-size: 1.45rem; font-weight: 700; color: var(--ink); margin-bottom: .5rem; }
.footer-desc { font-size: .92rem; color: var(--ink-2); }
.footer-title { font-size: .78rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--ink); margin-bottom: .9rem; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: .5rem; }
.footer-links a { color: var(--ink-2); font-size: .92rem; }
.footer-links a:hover { color: var(--gold-deep); }
.social-icons { display: flex; gap: .45rem; margin-top: 1rem; }
.social-icons a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; }
.social-icons a:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 2rem; padding-top: 1rem; font-size: .85rem; color: var(--muted); }

/* ── Publicités Adsterra ── */
.ad-slot { text-align: center; margin: 16px auto; max-width: 100%; overflow: hidden; }

/* ── Pages existantes (guides, tableau de bord, profil auteur) ── */
.btn-guide { display: inline-block; padding: 12px 20px; background: var(--ink); color: #fff; border-radius: 6px; font-weight: 700; transition: .2s; }
.btn-guide:hover { background: var(--ink-2); color: #fff; }
.capture-card { border: none; }
.capture-card .form-control, .capture-card input[type="email"] { padding: 12px 16px; border: 2px solid var(--line); border-radius: 8px; font-size: 15px; width: 100%; }
.capture-card input[type="email"]:focus { border-color: var(--gold-deep); outline: none; box-shadow: none; }
.dashboard-table th { background: var(--ink); color: #fff; font-weight: 600; white-space: nowrap; }
.dashboard-table td { vertical-align: middle; }
.dashboard-table tr:hover { background: var(--cream); }

@media (max-width: 991.98px) {
  .sidebar { position: static; }
}
@media (max-width: 575.98px) {
  .stack-item { grid-template-columns: 100px 1fr; }
  .prev-next { grid-template-columns: 1fr; }
  .share-btn span { display: none; }
  .share-btn[data-copy] span, .share-btn[data-native] span { display: inline; }
}