/* ═══════════════════════════════════════════════════════════
   Thème C — Magazine (inspiré de tommasoventurini.it)
   + couleur « marqueur » du thème Studio
   Newsreader (serif) + Inter · flux de cartes filtrable, colonne latérale
   ═══════════════════════════════════════════════════════════ */
:root {
  --ink: #141519;
  --ink-2: #3d4048;
  --paper: #fcfcfa;
  --paper-2: #f3f3ef;
  --mark: #ffd9a3;          /* surligneur abricot */
  --mark-hover: #ffc97a;
  --mark-soft: #fff1dc;
  --accent: #b8452e;        /* terracotta (boutons, libellés) */
  --indigo: #4f46e5;        /* étiquette Publication */
  --indigo-soft: #eef0ff;
  --muted: #6b6e76;
  --border: #e3e2dc;
  --serif: 'Newsreader', 'EB Garamond', Georgia, serif;
  --sans: 'Inter', 'DM Sans', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { background: var(--paper); color: var(--ink); font-family: var(--serif); font-size: 1rem; line-height: 1.55; min-height: 100vh; -webkit-font-smoothing: antialiased; }
p { margin-bottom: .75rem; }
p:last-child { margin-bottom: 0; }
[hidden] { display: none !important; }

/* Liens : surlignés au marqueur */
a { color: var(--ink); text-decoration: none; border: none; background: linear-gradient(transparent 55%, var(--mark) 55%); padding: 0 .1em; margin: 0 -.1em; border-radius: 2px; transition: background-color .15s; }
a:hover { background: var(--mark-hover); }

/* ── Barre de langue ── */
.lang-bar { display: none; }
.lang-btn { font-family: var(--sans); font-size: .72rem; font-weight: 700; letter-spacing: .08em; padding: .25rem .5rem; color: var(--muted); border-radius: 3px; background: var(--paper); margin: 0; }
.lang-btn.active, .lang-btn:hover { color: var(--ink); background: var(--mark); }

/* ── Page ── */
.page { max-width: 1480px; margin: 0 auto; padding: 0 1.5rem 3rem; }

/* ── Navigation de filtres ── */
.mag-nav {
  position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; flex-wrap: wrap; gap: .25rem; padding: .6rem 1.5rem; margin: 0 -1.5rem 1.5rem;
}
.mag-nav a { font-family: var(--serif); font-size: 1.3rem; color: var(--ink); padding: .1rem .55rem; border-radius: 3px; white-space: nowrap; background: none; margin: 0; }
.mag-nav a:hover { background: var(--mark-soft); }
.mag-nav a.active { background: var(--mark); font-style: italic; }
.mag-lang { margin-left: auto; display: inline-flex; align-items: center; gap: .3rem; font-family: var(--sans); font-size: .82rem; }
.mag-lang a { font-family: var(--sans); font-size: .82rem; font-weight: 600; padding: .3rem .7rem; border: 1px solid var(--border); border-radius: 999px; color: var(--ink-2); font-style: normal; }
.mag-lang a.active { background: var(--ink); border-color: var(--ink); color: #fff; font-style: normal; }
.mag-lang a:hover { background: var(--mark); border-color: var(--mark); color: var(--ink); }

/* ── Mise en page ── */
.mag-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 2.75rem; align-items: start; }

/* Flux de cartes : colonnes remplies ligne par ligne (JS) ; repli CSS sans JS */
.mag-feed { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: flex-start; }
.mag-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 1.25rem; }
.mag-feed > .card { flex: 1 1 260px; }

.card {
  display: block; padding: 1rem 1rem 1.1rem; margin: 0;
  border: 1px solid var(--border); border-radius: 4px; background: #fff; transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: 0 10px 26px -16px rgba(0,0,0,.3); transform: translateY(-1px); }
.card-kicker { font-family: var(--sans); font-size: .66rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .35rem; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .35rem; }
/* Pastilles de catégorie : même forme pour toutes, teintes douces */
.chip { display: inline-block; padding: .12rem .5rem; border-radius: 3px; font-size: .64rem; letter-spacing: .08em; }
.chip-agenda { background: #e4f3d6; color: #2f6b1e; }
.chip-book   { background: #f1ede6; color: #6b5a45; }
.chip-pub    { background: #ece8fb; color: #5a3fb5; }
.chip-presse { background: #1d4ed8; color: #fff; }
.chip-bluesky { background: #e4f0ff; color: #1465c8; }
.card-date { font-family: var(--serif); font-style: italic; font-size: .92rem; color: var(--muted); margin-bottom: .35rem; }
.card-title { font-family: var(--serif); font-weight: 600; font-size: 1.12rem; line-height: 1.3; letter-spacing: -.005em; margin-bottom: .45rem; }
.card-title a { background: none; padding: 0; margin: 0; }
.card-title a:hover { background: var(--mark); }
.card-title em { font-style: italic; font-weight: 500; }
.card-meta { font-family: var(--sans); font-size: .8rem; color: var(--muted); line-height: 1.45; }
.card-cover { width: 100%; height: auto; display: block; margin: .35rem 0 .75rem; border: 1px solid var(--border); background: var(--paper-2); }
.card-book .card-title { font-style: italic; font-weight: 500; }
.card-book > a { background: none; padding: 0; margin: 0; display: block; }


/* Images dans les cartes : vignette Bluesky (recadrée), affiche d'événement (proportions conservées) */
.card-img-link { display: block; background: none; padding: 0; margin: 0; }
.card-thumb { aspect-ratio: 16 / 10; object-fit: cover; margin: .6rem 0 0; border-radius: 3px; }
.card-poster { margin: .7rem 0 0; border-radius: 3px; max-height: 420px; object-fit: contain; object-position: left top; }

/* ── Colonne latérale (complète, sans défilement interne) ── */
.mag-side { min-width: 0; }
.side-photo { width: 100%; height: auto; display: block; margin-bottom: 1rem; border-radius: 4px; }
.mag-side h1 { font-family: var(--serif); font-size: 2.2rem; font-weight: 600; line-height: 1.05; letter-spacing: -.01em; margin-bottom: .3rem; }
.mag-side h1 em { font-style: italic; font-weight: 400; background: linear-gradient(transparent 55%, var(--mark) 55%); padding: 0 .1em; }
.mag-side .kicker { font-family: var(--sans); font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .6rem; }
.mag-side .header-details { font-family: var(--sans); font-size: .84rem; color: var(--ink-2); line-height: 1.6; margin-bottom: .7rem; }
.mag-side .ids { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 1.1rem; }
.id-badge { font-family: var(--sans); font-size: .72rem; font-weight: 700; padding: .2rem .5rem; border-radius: 3px; color: var(--ink); background: var(--mark); margin: 0; }
.id-badge:hover { background: var(--mark-hover); }

/* Formulaire d'abonnement, bien visible */
.side-form { background: linear-gradient(135deg, #fff3e0 0%, #ffe3bd 100%); color: var(--ink); padding: 1.15rem 1.2rem 1.25rem; border-radius: 8px; margin-bottom: 1.5rem; border: 1px solid #f3d2a0; }
.side-form-title { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; margin-bottom: .25rem; }
.side-form .nl-intro { font-family: var(--sans); font-size: .82rem; color: var(--ink-2); margin-bottom: .75rem; }
.side-form .fields { display: flex; gap: .45rem; }
.side-form input[type="email"] { flex: 1; min-width: 0; padding: .6rem .7rem; border: 1px solid #ecc994; border-radius: 5px; font-family: var(--sans); font-size: .9rem; background: #fff; color: var(--ink); outline: none; -webkit-appearance: none; }
.side-form input[type="email"]::placeholder { color: var(--muted); }
.side-form input[type="email"]:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(184,69,46,.15); }
.side-form input[type="submit"] { padding: .6rem 1rem; border: none; border-radius: 5px; background: var(--accent); color: #fff; font-family: var(--sans); font-size: .82rem; font-weight: 700; cursor: pointer; transition: background .15s; }
.side-form input[type="submit"]:hover { background: #963621; }
.side-form .hidden-list { display: none; }

.side-title { font-family: var(--sans); font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .6rem; padding-top: .25rem; border-top: 1px solid var(--border); padding-top: 1rem; }
.side-bio { font-size: .97rem; line-height: 1.6; color: var(--ink-2); margin-bottom: 1rem; }
.side-bio p { margin-bottom: .7rem; }
.side-scholar { font-family: var(--sans); font-size: .8rem; color: var(--muted); margin-bottom: .75rem; }
.side-scholar strong { color: var(--ink); }
.side-links { font-family: var(--sans); font-size: .82rem; display: flex; flex-direction: column; gap: .35rem; }
.side-links a { align-self: flex-start; }

/* ── Pied de page ── */
footer { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; font-family: var(--sans); font-size: .8rem; color: var(--muted); }
footer a { background: none; color: var(--muted); }
footer a:hover { background: var(--mark); color: var(--ink); }

/* ── Responsive ── */
@media (max-width: 1000px) {
  .mag-layout { grid-template-columns: 1fr; }
  .mag-side { order: -1; display: grid; grid-template-columns: 180px 1fr; gap: 0 1.5rem; align-items: start; }
  .side-photo { grid-row: 1 / span 5; margin: 0; }
  .side-form, .side-title, .side-bio, .side-scholar, .side-links { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .mag-side { grid-template-columns: 1fr; }
  .side-photo { grid-row: auto; max-width: 220px; }
  .mag-nav { padding-right: 1.5rem; }
  .mag-nav a { font-size: 1.05rem; padding: .1rem .45rem; }
  .mag-lang { margin-left: 0; width: 100%; padding-top: .35rem; }
}
