/* ============================================================
   site.css — composants partagés des pages intérieures
   (Direction ÉCLATS verrouillée). Cartes translucides au-dessus
   de la trame de triangles, coupes diagonales, éclats d'angle,
   titres en italique Spectral, méta en mono.
   Charge APRÈS base.css et dir-eclats.css.
   ============================================================ */

/* ---------- liens de nav (rendus en <a>) ---------- */
.nav__tab { text-decoration: none; }
.nav__tab[aria-current="page"]:hover { color: var(--ink); }

/* ============================================================
   BANDEAU DE SOUTIEN — fin, en bas, non-intrusif
   ============================================================ */
.support {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  gap: 14px; flex-wrap: wrap; text-align: center;
  background: var(--ink); color: #efeae0;
  padding: 9px clamp(40px, 6vw, 64px);
  font-size: 13px;
}
.support__txt { color: rgba(239,234,224,.8); }
.support__cta { color: #fff; font-weight: 600; text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.5); white-space: nowrap; }
.support__cta:hover { border-color: #fff; }
.support__close {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  appearance: none; background: transparent; border: 0; color: rgba(239,234,224,.55);
  font-size: 18px; line-height: 1; cursor: pointer; padding: 4px 6px;
}
.support__close:hover { color: #fff; }
.support[hidden] { display: none; }

/* ============================================================
   EN-TÊTE DE PAGE (intro)
   ============================================================ */
.pagehead { margin-bottom: clamp(26px, 4vw, 44px); max-width: 920px; }
.pagehead h1 {
  font-family: var(--font-serif); font-style: italic; font-weight: 600;
  font-size: clamp(28px, 5.2vw, 52px); line-height: 1.04; letter-spacing: -.02em;
  margin: 0 0 16px; color: var(--ink);
}
.pagehead .lede {
  font-size: clamp(15px, 1.8vw, 19px); line-height: 1.5; color: var(--ink-soft);
  max-width: 70ch; margin: 0; border-left: 3px solid var(--accent); padding-left: 18px;
}
.pagehead .lede b { color: var(--ink); font-weight: 600; }

/* section heading, italic serif */
.shead { margin: clamp(32px,4vw,52px) 0 20px; }
.shead h2 {
  font-family: var(--font-serif); font-style: italic; font-weight: 600;
  font-size: clamp(22px, 3.2vw, 34px); letter-spacing: -.01em; color: var(--ink); margin: 0;
}
.shead p { font-size: 14.5px; color: var(--muted); margin: 8px 0 0; max-width: 64ch; }

/* ============================================================
   STATS
   ============================================================ */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 0 0 8px; }
.stat {
  background: rgba(250,248,243,.84); border: 1px solid var(--line-2);
  padding: 16px 18px; position: relative;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
}
.stat__num { font-family: var(--font-serif); font-weight: 700; font-size: clamp(22px, 3vw, 30px);
  color: var(--ink); line-height: 1.05; letter-spacing: -.01em; }
.stat__num .u { font-size: .54em; font-weight: 600; color: var(--muted); margin-left: 4px; font-family: var(--font-sans); }
.stat__label { font-size: 12.5px; color: var(--muted); margin-top: 5px; }

/* ============================================================
   RECHERCHE + FILTRES (réutilise .filters/.fchip de base.css)
   ============================================================ */
.toolbar { display: flex; flex-direction: column; gap: 14px; margin: 18px 0 26px; }
.search {
  width: 100%; max-width: 520px; font-family: var(--font-sans); font-size: 15px; color: var(--ink-soft);
  background: rgba(250,248,243,.9); border: 1px solid var(--line-2); padding: 11px 16px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
}
.search::placeholder { color: var(--faint); }
.search:focus { outline: none; border-color: var(--accent); }

/* ============================================================
   TIMELINE MÉDIAS
   ============================================================ */
.tl { position: relative; display: grid; gap: 16px; padding-left: 8px; }
.tl::before { content: ""; position: absolute; top: 6px; bottom: 6px; left: 0;
  width: 2px; background: repeating-linear-gradient(var(--line-strong) 0 10px, transparent 10px 20px); }
.tl__item {
  position: relative; margin-left: 26px;
  background: rgba(250,248,243,.86); border: 1px solid var(--line-2); border-left: 3px solid var(--ink);
  padding: 16px 20px 16px 22px;
  clip-path: polygon(0 0, 100% 12px, 100% 100%, 0 calc(100% - 12px));
  transition: transform .16s;
}
.tl__item:hover { transform: translateX(3px); }
.tl__item:nth-child(even) { border-left-color: var(--accent); }
/* node marker (triangle eclat) on the rail */
.tl__item::before {
  content: ""; position: absolute; left: -27px; top: 22px;
  width: 12px; height: 12px; background: var(--accent);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.tl__item:nth-child(even)::before { background: var(--ink); transform: rotate(180deg); }
.tl__meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 7px; }
.tl__date { font-family: var(--font-mono); font-size: 11.5px; color: var(--accent-deep); letter-spacing: .02em; white-space: nowrap; }
.tl__src  { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.tl__title { font-family: var(--font-serif); font-style: italic; font-weight: 600; font-size: 17px;
  line-height: 1.25; color: var(--ink); margin: 2px 0 6px; }
.tl__title.is-quote::before { content: "« "; } .tl__title.is-quote::after { content: " »"; }
.tl__ex { font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; margin: 0 0 8px; }
.tl__link { font-family: var(--font-mono); font-size: 12px; color: var(--accent-deep); text-decoration: none; border-bottom: 1px solid currentColor; }
.tl__link:hover { color: var(--ink); }

/* small inline tag (source type) */
.mtag { display: inline-block; font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em;
  text-transform: uppercase; padding: 3px 7px; border: 1px solid var(--line-strong); color: var(--ink-soft); margin-right: 6px; white-space: nowrap; vertical-align: 1px; }
.mtag--av { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.mtag--an { background: var(--accent-wash); color: var(--accent-deep); border-color: var(--accent); }

/* ============================================================
   AUDITIONS — intervenants notables + liste chronologique
   ============================================================ */
.spk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.spk {
  position: relative; background: rgba(250,248,243,.86); border: 1px solid var(--line-2);
  padding: 18px 20px; clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
  transition: transform .16s;
}
.spk:hover { transform: translateY(-2px); }
.spk__name { font-family: var(--font-serif); font-style: italic; font-weight: 600; font-size: 19px; color: var(--ink); margin: 0; }
.spk__role { font-size: 12.5px; color: var(--muted); margin: 3px 0 10px; }
.spk__note { font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; margin: 0; }
.spk__when { font-family: var(--font-mono); font-size: 11px; color: var(--accent-deep); position: absolute; top: 16px; right: 18px; }

.aud-list { display: grid; gap: 14px; }
.aud {
  position: relative; background: rgba(250,248,243,.84); border: 1px solid var(--line-2); border-left: 4px solid var(--ink);
  padding: 16px 20px; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
}
.aud__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.aud__date { font-family: var(--font-mono); font-size: 12px; color: var(--accent-deep); letter-spacing: .02em; }
.aud__tags { display: flex; gap: 6px; flex-wrap: wrap; }
.aud__people { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.aud__people li { font-size: 14px; color: var(--ink-soft); line-height: 1.45; padding-left: 14px; position: relative; }
.aud__people li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px;
  background: var(--accent); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.aud__people b { color: var(--ink); font-weight: 600; }

/* ============================================================
   LOCUTEURS — annuaire
   ============================================================ */
.loc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.loc {
  position: relative; background: rgba(250,248,243,.86); border: 1px solid var(--line-2);
  padding: 18px 20px; clip-path: polygon(0 14px, 14px 0, 100% 0, 100% 100%, 0 100%);
  transition: transform .16s;
}
.loc:hover { transform: translateY(-2px); }
.loc--feat { background: var(--ink); border-color: var(--ink); color: var(--paper);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%); }
.loc--feat .loc__name { color: #fff; }
.loc--feat .loc__role, .loc--feat .loc__themes { color: rgba(243,240,232,.7); }
.loc__name { font-family: var(--font-serif); font-style: italic; font-weight: 600; font-size: 18px; color: var(--ink); margin: 0; }
.loc__role { font-size: 12.5px; color: var(--muted); margin: 3px 0 12px; }
.loc__count { font-family: var(--font-mono); font-size: 11px; color: var(--accent-deep); }
.loc--feat .loc__count { color: #e8a99f; }
.loc__bar { height: 5px; background: var(--line); margin: 8px 0 10px; position: relative; overflow: hidden; }
.loc__bar i { position: absolute; inset: 0 auto 0 0; background: var(--accent); }
.loc--feat .loc__bar { background: rgba(255,255,255,.18); }
.loc__themes { font-size: 12px; color: var(--muted); }

/* ============================================================
   VIDÉOS
   ============================================================ */
.vid-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.vid { background: rgba(250,248,243,.9); border: 1px solid var(--line-2); transition: transform .16s; }
.vid:hover { transform: translateY(-3px); }
.vid__thumb {
  position: relative; aspect-ratio: 16/9; background: var(--ink);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 14px));
  display: grid; place-items: center; overflow: hidden;
}
.vid__thumb::after { content: ""; width: 0; height: 0; border-style: solid;
  border-width: 13px 0 13px 22px; border-color: transparent transparent transparent #f3f0e8; opacity: .92; }
.vid__dur { position: absolute; right: 10px; bottom: 20px; font-family: var(--font-mono); font-size: 11px;
  color: #fff; background: rgba(0,0,0,.55); padding: 2px 7px; }
.vid__body { padding: 14px 16px 18px; }
.vid__title { font-family: var(--font-serif); font-style: italic; font-weight: 600; font-size: 16.5px; line-height: 1.25; color: var(--ink); margin: 0 0 6px; }
.vid__meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }

/* ============================================================
   GLOSSAIRE — Les Maux du drame
   ============================================================ */
.gloss { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.term {
  position: relative; background: rgba(250,248,243,.88); border: 1px solid var(--line-2);
  padding: 16px 18px; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
}
.term__head { display: flex; align-items: center; gap: 9px; justify-content: space-between; margin-bottom: 9px; }
.term__name { display: flex; align-items: center; gap: 9px; font-family: var(--font-serif); font-style: italic;
  font-weight: 600; font-size: 18px; color: var(--ink); }
.term__dot { width: 9px; height: 9px; background: var(--accent); clip-path: polygon(50% 0, 100% 100%, 0 100%); flex: none; }
.term__def { font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; margin: 0; }
.term__lhy { font-size: 12.5px; color: var(--accent-deep); line-height: 1.5; margin: 12px 0 0;
  padding: 10px 12px; background: var(--accent-wash); border-left: 2px solid var(--accent); }
.term__lhy b { display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent-deep); margin-bottom: 4px; }

/* category tag */
.ctag { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .05em; text-transform: uppercase;
  padding: 3px 7px; border: 1px solid var(--line-strong); color: var(--muted); white-space: nowrap; }

.gloss-empty { font-size: 14px; color: var(--muted); font-style: italic; padding: 20px 0; }
.term.is-hidden { display: none; }

/* sources note */
.src-note { font-size: 12.5px; color: var(--muted); line-height: 1.55; margin-top: 28px;
  border-top: 1px dashed var(--line-2); padding-top: 16px; }
.src-note b { color: var(--accent-deep); }

/* ============================================================
   CHAT — Recherche & Q&R (Éclats)
   ============================================================ */
.chat { display: flex; flex-direction: column; min-height: clamp(520px, 72vh, 820px); position: relative; z-index: 1; }
.chat__bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--line-2); margin-bottom: 6px; }
.modes { display: flex; gap: 6px; }
.mode { appearance: none; cursor: pointer; font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft);
  background: rgba(250,248,243,.8); border: 1px solid var(--line-2); padding: 6px 13px; transition: all .14s;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%); }
.mode:hover { border-color: var(--line-strong); }
.mode[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chat__count { margin-left: auto; font-family: var(--font-mono); font-size: 11.5px; color: var(--faint); }

.chat__scroll { flex: 1; overflow-y: auto; padding: 18px 0 8px; }
.chat__empty { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 16px; padding: 40px 0; }
.chat__empty[hidden] { display: none; }
.spark { width: 54px; height: 54px; display: grid; place-items: center; color: #fff;
  background: var(--accent); clip-path: polygon(50% 0, 100% 78%, 18% 100%); }
.chat__empty h2 { font-family: var(--font-serif); font-style: italic; font-weight: 600; font-size: clamp(22px,3vw,32px);
  color: var(--ink); margin: 0; }
.chat__empty p { color: var(--muted); max-width: 48ch; margin: 0; }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 640px; }
.suggest .fchip { cursor: pointer; }

.thread { display: flex; flex-direction: column; gap: 22px; max-width: 820px; margin: 0 auto; width: 100%; }
.thread[hidden] { display: none; }
.msg { display: flex; gap: 12px; }
.msg__avatar { flex: none; width: 34px; height: 34px; display: grid; place-items: center; font-size: 12px; font-weight: 700;
  font-family: var(--font-mono); color: #fff; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 80%); }
.msg--user { flex-direction: row-reverse; }
.msg--user .msg__avatar { background: var(--ink); }
.msg--bot .msg__avatar { background: var(--accent); clip-path: polygon(0 0, 100% 20%, 100% 100%, 0 100%); }
.msg__body { max-width: 78%; }
.msg--user .bubble { background: var(--ink); color: var(--paper); padding: 12px 16px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 14px 100%, 0 calc(100% - 14px)); }
.msg--user .bubble strong { color: #fff; }
.msg--bot .bubble { background: rgba(250,248,243,.92); border: 1px solid var(--line-2); border-left: 3px solid var(--accent);
  padding: 16px 20px; position: relative; clip-path: polygon(0 0, 100% 14px, 100% 100%, 0 100%); }
.msg--bot .bubble::after { content: ""; position: absolute; top: 0; right: 0; width: 34px; height: 34px;
  background: var(--ink); clip-path: polygon(100% 0, 0 0, 100% 100%); opacity: .9; }
.bubble p { margin: 0 0 10px; line-height: 1.55; }
.bubble p:last-child { margin-bottom: 0; }
.bubble strong { color: var(--ink); }

.cites { display: grid; gap: 8px; margin-top: 14px; }
.cite { border-left: 2px solid var(--accent); background: var(--accent-wash); padding: 9px 13px; }
.cite__txt { font-size: 13.5px; color: var(--ink); line-height: 1.5; }
.cite__src { font-family: var(--font-mono); font-size: 11px; color: var(--accent-deep); margin-top: 5px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.cite__src .ts { color: var(--muted); }

.typing { display: inline-flex; gap: 4px; align-items: center; padding: 2px; }
.typing span { width: 7px; height: 7px; background: var(--line-strong); animation: blink 1.2s infinite both;
  clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.typing span:nth-child(2){animation-delay:.2s} .typing span:nth-child(3){animation-delay:.4s}
@keyframes blink { 0%,80%,100%{opacity:.25} 40%{opacity:1} }

.composer { border-top: 1px solid var(--line-2); padding: 16px 0 4px; margin-top: 8px; }
.composer__row { display: flex; gap: 12px; align-items: flex-end; max-width: 820px; margin: 0 auto; }
.composer textarea { flex: 1; resize: none; font-family: var(--font-sans); font-size: 15.5px; line-height: 1.5;
  color: var(--ink-soft); background: rgba(250,248,243,.92); border: 1px solid var(--line-2); padding: 12px 16px; max-height: 160px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%); }
.composer textarea:focus { outline: none; border-color: var(--accent); }
.composer textarea::placeholder { color: var(--faint); }
.send {
  appearance: none; cursor: pointer; font-family: var(--font-sans); font-size: 14px; font-weight: 600; color: #fff;
  background: var(--accent); border: 0; padding: 12px 22px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 10px 100%, 0 calc(100% - 10px)); transition: background .15s;
}
.send:hover { background: var(--accent-deep); }
.composer__hint { max-width: 820px; margin: 10px auto 0; font-family: var(--font-mono); font-size: 11.5px; color: var(--faint); }
.composer__hint b { color: var(--muted); }

/* ============================================================
   TABLEAU SYNTHÈSE MÉDIA + PICS + BOÎTES DE CLÔTURE
   ============================================================ */
.mtable-wrap { overflow-x: auto; border: 1px solid var(--line-2); background: rgba(250,248,243,.86); }
.mtable { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 560px; }
.mtable th { text-align: left; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); padding: 11px 14px; border-bottom: 2px solid var(--ink); white-space: nowrap; }
.mtable td { padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--ink-soft); vertical-align: top; }
.mtable tr:last-child td { border-bottom: 0; }
.mtable td:first-child { font-weight: 600; color: var(--ink); font-family: var(--font-serif); font-style: italic; }

.pics { counter-reset: pic; list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pics li { position: relative; counter-increment: pic; padding: 12px 16px 12px 48px;
  background: rgba(250,248,243,.86); border: 1px solid var(--line-2);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%); font-size: 13.5px; color: var(--ink-soft); }
.pics li::before { content: counter(pic); position: absolute; left: 0; top: 0; bottom: 0; width: 34px;
  display: grid; place-items: center; font-family: var(--font-serif); font-style: italic; font-weight: 700;
  font-size: 17px; color: #fff; background: var(--accent); }
.pics li b { color: var(--ink); }

.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.box { padding: 22px 24px; background: rgba(250,248,243,.88); border: 1px solid var(--line-2);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%); }
.box--dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.box h3 { font-family: var(--font-serif); font-style: italic; font-weight: 600; font-size: 19px; margin: 0 0 12px; color: var(--ink); }
.box--dark h3 { color: #fff; }
.box ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.box li { font-size: 13.5px; line-height: 1.5; padding-left: 16px; position: relative; color: var(--ink-soft); }
.box--dark li { color: rgba(243,240,232,.82); }
.box li::before { content: ""; position: absolute; left: 0; top: .6em; width: 7px; height: 7px;
  background: var(--accent); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.box--dark p { color: rgba(243,240,232,.82); font-size: 13.5px; line-height: 1.6; margin: 0; }

@media (max-width: 680px) {
  .duo { grid-template-columns: 1fr; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 760px) {
  .gloss { grid-template-columns: 1fr; }
  .msg__body { max-width: 88%; }
}
@media (max-width: 560px) {
  .chat__count { display: none; }
  .msg__body { max-width: 100%; }
  .support__close { position: static; transform: none; margin-left: 4px; }
  .tl__item { margin-left: 22px; }
}
