/* Blog Ben Idriss Traoré — noir, or et crème, inspiré des couleurs de la SCOOP-CA Burkina Mine */
:root {
  --ink: #16140f;
  --ink-2: #2a261d;
  --paper: #faf6ec;
  --card: #ffffff;
  --gold: #e6ac17;
  --gold-dark: #b9850a;
  --muted: #6d6658;
  --line: #e7dfcc;
  --ok: #2f7d4a;
  --err: #b3362b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(22, 20, 15, .06), 0 8px 24px rgba(22, 20, 15, .07);
  --sans: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: var(--sans); /* tout le site est en Montserrat */
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .5em; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; font-weight: 700; color: var(--gold); margin: 0 0 1rem; }
.lead { font-size: 1.15rem; font-weight: 300; color: inherit; opacity: .85; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .8rem 1.4rem; border-radius: 999px; font: 700 .9rem var(--sans); text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform .15s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: #f2bd2f; }
.btn-ghost { border-color: rgba(255,255,255,.35); color: #fff; }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-ghost-dark { border-color: var(--line); color: var(--ink); background: #fff; }
.btn-ghost-dark:hover { border-color: var(--ink); }
.btn-block { width: 100%; }

/* En-tête */
.site-header { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 20; border-bottom: 3px solid var(--gold); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: inherit; }
.brand-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: var(--gold); color: var(--ink); font-weight: 800; font-size: .85rem; letter-spacing: .04em; flex: none; }
.brand-mark.big { width: 64px; height: 64px; font-size: 1.1rem; margin: 0 auto 1rem; }
.brand-text { font-weight: 800; font-size: 1.05rem; line-height: 1.2; display: flex; flex-direction: column; }
.brand-text small { font-weight: 500; font-size: .72rem; opacity: .65; }
.nav { display: flex; align-items: center; gap: 1.5rem; }
.nav a { text-decoration: none; font-weight: 600; font-size: .9rem; opacity: .8; padding: .3rem 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a.is-active { opacity: 1; border-color: var(--gold); }
.nav-search input { background: var(--ink-2); border: 1px solid #3c362a; color: #fff; border-radius: 999px; padding: .5rem 1rem; font: 500 .85rem var(--sans); width: 170px; }
.nav-search input:focus { outline: 2px solid var(--gold); border-color: transparent; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; }

/* Hero */
.hero { background: var(--ink); color: #fff; overflow: hidden; position: relative; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 80% at 85% 30%, rgba(230,172,23,.22), transparent 70%); }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; padding-top: 4rem; padding-bottom: 4rem; }
.hero h1 { font-size: clamp(2rem, 4.2vw, 3.3rem); font-weight: 800; }
.hero .lead { max-width: 560px; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; }
.hero-portrait { margin: 0; justify-self: center; position: relative; }
.hero-portrait::after { content: ""; position: absolute; inset: 18px -18px -18px 18px; border: 3px solid var(--gold); border-radius: 22px; z-index: 0; }
.hero-portrait img { position: relative; z-index: 1; border-radius: 22px; width: 100%; max-width: 400px; aspect-ratio: 4/5; object-fit: cover; object-position: top; }

/* Article à la une */
.featured { margin-top: -2rem; position: relative; z-index: 2; }
.hero + .featured { margin-top: -2.5rem; }
.featured-card { display: grid; grid-template-columns: 1.1fr 1fr; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); text-decoration: none; }
.featured-img { min-height: 320px; background: var(--line); }
.featured-img img { width: 100%; height: 100%; object-fit: cover; }
.featured-body { padding: 2.25rem; display: flex; flex-direction: column; justify-content: center; }
.featured-body h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.featured-body p { color: var(--muted); }
.read-more { font-weight: 700; color: var(--gold-dark); margin-top: .5rem; }
.featured-card:hover h2 { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 4px; }

/* Sections et grille */
.section { padding-top: 3.5rem; padding-bottom: 3.5rem; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; }
.section-title { font-size: 1.6rem; font-weight: 800; margin: 0 0 1.25rem; position: relative; padding-left: 1rem; }
.section-head .section-title { margin: 0; }
.section-title::before { content: ""; position: absolute; left: 0; top: .2em; bottom: .2em; width: 5px; border-radius: 3px; background: var(--gold); }
.chips, .filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.filters { margin: 1.5rem 0 1rem; }
.chip { text-decoration: none; font-size: .82rem; font-weight: 600; padding: .4rem .9rem; border-radius: 999px; background: #fff; border: 1px solid var(--line); }
.chip span { opacity: .55; margin-left: .2rem; }
.chip:hover { border-color: var(--ink); }
.chip.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .2s; }
.card:hover { transform: translateY(-3px); }
.card-link { text-decoration: none; display: flex; flex-direction: column; height: 100%; }
.card-img { position: relative; aspect-ratio: 16/10; background: var(--line); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img .tag { position: absolute; left: 12px; top: 12px; }
.card-body { padding: 1.25rem 1.4rem 1.5rem; }
.card-body h3 { font-size: 1.12rem; font-weight: 700; }
.card-body p:last-child { color: var(--muted); font-size: .93rem; margin: 0; }
.tag { display: inline-block; background: var(--gold); color: var(--ink); font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: .25rem .6rem; border-radius: 6px; text-decoration: none; margin-right: .5rem; }
.meta { font-size: .8rem; color: var(--muted); margin: 0 0 .6rem; font-weight: 500; }
.empty { background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); padding: 2rem; text-align: center; color: var(--muted); }
.pagination { display: flex; justify-content: center; align-items: center; gap: 1.5rem; margin-top: 2.5rem; font-weight: 600; font-size: .9rem; }
.pagination a { text-decoration: none; color: var(--gold-dark); }

/* Bandeau suivre */
.follow { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 2.25rem 2.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 3.5rem; }
.follow h2 { margin-bottom: .25rem; }
.follow p { margin: 0; opacity: .75; }

/* Article */
.post-head { padding-top: 3rem; }
.post-head h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 800; }
.post-head .lead { font-family: var(--serif); font-weight: 300; color: var(--muted); opacity: 1; }
.byline { display: flex; align-items: center; gap: .75rem; margin: 1.5rem 0 2rem; font-size: .9rem; }
.byline img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; object-position: top; border: 2px solid var(--gold); }
.post-cover { margin: 0 auto 2.5rem; max-width: 1000px; }
.post-cover img { width: 100%; max-height: 560px; object-fit: cover; border-radius: var(--radius); }
.post-body { font-family: var(--serif); font-size: 1.06rem; font-weight: 400; line-height: 1.8; }
.post-body h2 { font-family: var(--sans); font-size: 1.45rem; font-weight: 800; margin-top: 2.2rem; }
.post-body h3 { font-family: var(--sans); font-size: 1.15rem; font-weight: 700; margin-top: 1.8rem; }
.post-body p { margin: 0 0 1.3rem; }
.post-body ul, .post-body ol { margin: 0 0 1.3rem; padding-left: 1.4rem; }
.post-body li { margin-bottom: .35rem; }
.post-body li::marker { color: var(--gold-dark); }
.post-body blockquote { margin: 2rem 0; padding: .5rem 0 .5rem 1.5rem; border-left: 4px solid var(--gold); font-size: 1.2rem; font-weight: 300; font-style: italic; }
.post-body figure { margin: 2rem 0; }
.post-body figure img { border-radius: 12px; width: 100%; }
.post-body figcaption { font-family: var(--sans); font-size: .82rem; color: var(--muted); margin-top: .5rem; text-align: center; }
.post-body a { color: var(--gold-dark); text-underline-offset: 3px; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding-top: 1.5rem; margin-top: 1rem; border-top: 1px solid var(--line); font-size: .88rem; font-weight: 600; }
.share a, .share button { text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .45rem 1rem; font: 600 .85rem var(--sans); cursor: pointer; color: var(--ink); }
.share a:hover, .share button:hover { border-color: var(--gold); }
.preview-bar { background: var(--gold); color: var(--ink); text-align: center; padding: .6rem 1rem; font-weight: 600; font-size: .9rem; }

/* À propos */
.about { background: #fff; border-bottom: 1px solid var(--line); }
.about-inner { display: grid; grid-template-columns: .8fr 1.2fr; gap: 3.5rem; padding-top: 4rem; padding-bottom: 4rem; align-items: start; }
.about-photo { margin: 0; position: sticky; top: 100px; }
.about-photo img { border-radius: 20px; width: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: top; box-shadow: 14px 14px 0 var(--gold); }
.about-text h1 { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; }
.about-text .lead { color: var(--muted); opacity: 1; margin-bottom: 1.5rem; }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; transition: opacity .2s; }
.gallery a:hover img { opacity: .85; }

/* Pied de page */
.site-footer { background: var(--ink); color: #fff; padding-top: 3rem; margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; padding-bottom: 2rem; }
.footer-name { font-weight: 800; font-size: 1.2rem; margin: 0 0 .25rem; }
.site-footer .muted { color: rgba(255,255,255,.55); }
.footer-title { font-weight: 700; color: var(--gold); text-transform: uppercase; font-size: .75rem; letter-spacing: .12em; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: .4rem; }
.footer-links a { text-decoration: none; opacity: .8; font-size: .92rem; }
.footer-links a:hover { opacity: 1; color: var(--gold); }
.footer-bottom { border-top: 1px solid #2f2a20; padding-top: 1.25rem; padding-bottom: 1.5rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .82rem; opacity: .8; }
.footer-bottom a { text-decoration: none; }

/* ---------- Administration ---------- */
body.admin { background: #f4f1ea; }
.admin-bar { background: var(--ink); color: #fff; border-bottom: 3px solid var(--gold); }
.admin-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; flex-wrap: wrap; padding-top: .5rem; padding-bottom: .5rem; }
.admin-nav { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; font-size: .88rem; font-weight: 600; }
.admin-nav a { text-decoration: none; opacity: .75; }
.admin-nav a:hover, .admin-nav a.is-active { opacity: 1; color: var(--gold); }
.admin-nav form { margin: 0; }
.admin-nav button { background: none; border: 1px solid #4a4335; color: #fff; border-radius: 999px; padding: .35rem .9rem; font: 600 .82rem var(--sans); cursor: pointer; }
.admin-main { padding-top: 2rem; padding-bottom: 4rem; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.admin-head h1 { margin: 0; font-size: 1.7rem; font-weight: 800; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1rem; }
.stat { background: #fff; border-radius: 12px; padding: 1.1rem 1.25rem; text-decoration: none; box-shadow: var(--shadow); }
.stat strong { display: block; font-size: 1.8rem; font-weight: 800; }
.stat span { font-size: .8rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.table { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.row { display: grid; grid-template-columns: 84px 1fr auto; gap: 1rem; align-items: center; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row-img { width: 84px; height: 56px; border-radius: 8px; overflow: hidden; background: var(--line); }
.row-img img { width: 100%; height: 100%; object-fit: cover; }
.row-title { font-weight: 700; text-decoration: none; display: block; margin-bottom: .2rem; }
.row-title:hover { color: var(--gold-dark); }
.row .meta { margin: 0; }
.row-actions { display: flex; gap: .9rem; align-items: center; font-size: .85rem; font-weight: 600; }
.row-actions a { text-decoration: none; color: var(--gold-dark); }
.row-actions form { margin: 0; }
.link-danger { background: none; border: 0; color: var(--err); font: 600 .85rem var(--sans); cursor: pointer; padding: 0; }
.badge { display: inline-block; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: .15rem .5rem; border-radius: 5px; margin-right: .35rem; }
.badge-pub { background: #dcefe2; color: var(--ok); }
.badge-sched { background: #fff1c9; color: #8a6500; }
.badge-draft { background: #ece8df; color: var(--muted); }
.alert { padding: .9rem 1.1rem; border-radius: 10px; margin-bottom: 1rem; font-size: .92rem; font-weight: 500; }
.alert-ok { background: #dcefe2; color: #1f5a34; }
.alert-error { background: #f8dcd8; color: #84261e; }
.alert-info { background: #fff1c9; color: #6e5100; }
.form label { display: block; font-weight: 700; font-size: .88rem; margin-bottom: 1.1rem; }
.form input[type=text], .form input[type=url], .form input[type=email], .form input[type=password], .form input[type=datetime-local], .form textarea {
  display: block; width: 100%; margin-top: .4rem; padding: .7rem .85rem; border: 1px solid #d9d0bb; border-radius: 9px; background: #fff; font: 500 .95rem var(--sans); color: var(--ink);
}
.form textarea { resize: vertical; line-height: 1.55; }
.form input:focus, .form textarea:focus { outline: 2px solid var(--gold); border-color: transparent; }
.form input[type=file] { display: block; margin-top: .4rem; font: 500 .85rem var(--sans); max-width: 100%; }
.input-title { font-size: 1.3rem !important; font-weight: 700 !important; }
#content { font-family: var(--serif); font-size: 1.05rem; margin-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; }
.hint { font-weight: 500; color: var(--muted); font-size: .8rem; }
.hint code { background: #ece8df; padding: 0 .3rem; border-radius: 4px; }
.toolbar { display: flex; flex-wrap: wrap; gap: .3rem; background: #ece8df; border: 1px solid #d9d0bb; border-bottom: 0; border-radius: 9px 9px 0 0; padding: .4rem; margin-top: .4rem; }
.toolbar button { background: #fff; border: 1px solid #d9d0bb; border-radius: 6px; padding: .3rem .65rem; font: 600 .8rem var(--sans); cursor: pointer; }
.toolbar button:hover { border-color: var(--ink); }
.editor { display: grid; grid-template-columns: 1fr 300px; gap: 1.75rem; align-items: start; }
.editor-side { position: sticky; top: 1rem; display: grid; gap: 1rem; }
.panel { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; margin-bottom: 1.25rem; }
.editor-side .panel { margin: 0; }
.panel-title { font-weight: 800; text-transform: uppercase; font-size: .75rem; letter-spacing: .1em; color: var(--gold-dark); margin: 0 0 .9rem; }
.form .radio { display: flex; align-items: center; gap: .5rem; font-weight: 600; margin-bottom: .6rem; }
.schedule-input { margin: -.2rem 0 .8rem !important; }
.cover-preview { width: 100%; max-width: 280px; aspect-ratio: 16/10; object-fit: cover; border-radius: 8px; margin: .5rem 0; }
.photo-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.login-box { max-width: 400px; margin: 4rem auto; background: #fff; padding: 2.5rem 2rem; border-radius: var(--radius); box-shadow: var(--shadow); text-align: center; }
.login-box .form { text-align: left; margin-top: 1.5rem; }
.login-box .btn { width: 100%; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; padding-top: 3rem; }
  .hero-portrait img { max-width: 300px; }
  .featured-card { grid-template-columns: 1fr; }
  .featured-img { min-height: 220px; aspect-ratio: 16/9; }
  .about-inner { grid-template-columns: 1fr; gap: 2rem; }
  .about-photo { position: static; max-width: 360px; }
  .editor { grid-template-columns: 1fr; }
  .editor-side { position: static; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--ink); flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 20px 1.25rem; border-bottom: 3px solid var(--gold); }
  .nav.is-open { display: flex; }
  .nav a { padding: .8rem 0; border-bottom: 1px solid #2f2a20; }
  .nav-search { margin-top: 1rem; }
  .nav-search input { width: 100%; }
  .brand-text small { display: none; }
  .grid { grid-template-columns: 1fr; }
  .featured-body { padding: 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .follow { padding: 1.75rem; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .row { grid-template-columns: 64px 1fr; }
  .row-img { width: 64px; height: 48px; }
  .row-actions { grid-column: 1 / -1; }
  .photo-fields { grid-template-columns: 1fr; }
  .post-body { font-size: 1rem; }
}
