/* ============================================
   FASO ATLAS BTP — Feuille de style presse
   Typographie, filets, sobriété
   ============================================ */

:root {
  --ink: #111111;
  --ink-soft: #333333;
  --paper: #ffffff;
  --paper-soft: #fafafa;
  --muted: #5a5a5a;
  --muted-soft: #888888;
  --line: #d8d8d8;
  --line-soft: #ececec;
  --accent: #8b0000;
  --accent-soft: #b3241a;
  --shell: 1100px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
a { color: inherit; }

.shell { max-width: var(--shell); width: 100%; margin: 0 auto; padding: 0 28px; }

/* ─── Header masthead ─── */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 50; }
.site-header .shell { display: flex; justify-content: space-between; align-items: center; padding: 18px 28px; }
.masthead {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 24px;
  text-decoration: none;
  color: var(--ink);
  line-height: 1;
}
.masthead em { font-style: italic; font-weight: 400; color: var(--muted); }
.masthead .section-tag {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  vertical-align: middle;
  margin-left: 6px;
}

.primary-nav { display: flex; gap: 26px; }
.primary-nav a {
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.primary-nav a:hover, .primary-nav a.active { color: var(--accent); border-bottom-color: var(--accent); }

@media (max-width: 720px) {
  .site-header .shell { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px 20px; }
  .primary-nav { gap: 18px; overflow-x: auto; width: 100%; padding-bottom: 4px; }
  .primary-nav a { font-size: 11px; letter-spacing: 0.1em; white-space: nowrap; }
  .masthead { font-size: 20px; }
}

/* ─── Page head (section title + rule) ─── */
.page-head { padding: 56px 0 24px; border-bottom: 1px solid var(--line); margin-bottom: 40px; }
.page-head .eyebrow {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.18em; color: var(--accent); margin-bottom: 14px;
  display: inline-flex; align-items: center; gap: 14px;
}
.page-head .eyebrow::before {
  content: ''; display: inline-block; width: 28px; height: 1px; background: var(--accent);
}
.page-head h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 400;
  font-size: clamp(32px, 4.5vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin-bottom: 12px;
  max-width: 20ch;
}
.page-head .subtitle {
  font-size: 16px;
  color: var(--ink-soft);
  max-width: 65ch;
  line-height: 1.55;
}

@media (max-width: 720px) {
  .page-head { padding: 36px 0 18px; margin-bottom: 28px; }
}

/* ─── Boutons ─── */
.btn {
  display: inline-block;
  padding: 11px 22px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ─── Formulaires ─── */
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 6px;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 10px 0;
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  outline: none;
  border-radius: 0;
  transition: border-color 0.15s;
}
.field input:focus,
.field textarea:focus,
.field select:focus { border-bottom-color: var(--ink); }
.field textarea { min-height: 90px; resize: vertical; }
.field .help { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.field .req { color: var(--accent); font-weight: 500; }

/* ─── Liste d'articles (presse) ─── */
.story-list { padding-bottom: 60px; }
.story {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--line-soft);
  align-items: start;
}
.story:first-child { border-top: none; padding-top: 0; }
.story-media { overflow: hidden; aspect-ratio: 3 / 2; background: var(--paper-soft); }
.story-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.story-section {
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--accent); margin-bottom: 8px; display: inline-block;
}
.story h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 400;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.story h2 a { color: var(--ink); text-decoration: none; }
.story h2 a:hover { color: var(--accent); }
.story .dek {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: 10px;
}
.story .byline {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.story .byline .dot { margin: 0 8px; color: var(--line); }

@media (max-width: 640px) {
  .story { grid-template-columns: 1fr; gap: 14px; }
  .story-media { aspect-ratio: 16 / 9; }
  .story h2 { font-size: 20px; }
}

/* ─── Cartes directory / annuaire ─── */
.directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
}
.entry {
  padding: 28px 24px 28px 0;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.entry:nth-child(3n) { border-right: none; }
.entry-category {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.18em; color: var(--muted);
}
.entry h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.entry .verified-mark {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #0d6b2f;
  border: 1px solid #0d6b2f;
  padding: 1px 6px;
  margin-left: 6px;
  vertical-align: middle;
}
.entry .meta { font-size: 13px; color: var(--muted); line-height: 1.5; }
.entry .meta strong { color: var(--ink); font-weight: 500; }
.entry .desc {
  font-size: 14px; color: var(--ink-soft); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.entry .contacts {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  font-size: 13px;
  line-height: 1.7;
}
.entry .contacts a { color: var(--ink); text-decoration: none; display: block; }
.entry .contacts a:hover { color: var(--accent); }
.entry .contacts .label {
  display: inline-block;
  min-width: 78px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 500;
}

@media (max-width: 860px) {
  .directory-grid { grid-template-columns: 1fr 1fr; }
  .entry:nth-child(3n) { border-right: 1px solid var(--line-soft); }
  .entry:nth-child(2n) { border-right: none; }
}
@media (max-width: 560px) {
  .directory-grid { grid-template-columns: 1fr; }
  .entry { border-right: none; padding: 24px 0; }
}

/* ─── Filtres (presse) ─── */
.filter-bar {
  display: flex;
  gap: 24px;
  padding: 18px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 36px;
  flex-wrap: wrap;
  align-items: center;
}
.filter-bar label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-right: 6px;
}
.filter-bar select,
.filter-bar input {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  padding: 4px 0;
  border-bottom: 1px solid var(--line);
  outline: none;
  min-width: 140px;
}
.filter-bar select:focus, .filter-bar input:focus { border-bottom-color: var(--ink); }
.filter-bar .search-input { flex: 1; min-width: 220px; }
.filter-bar .count {
  margin-left: auto;
  font-size: 13px;
  color: var(--muted);
}
.filter-bar .count strong { color: var(--ink); font-weight: 600; }

/* ─── Pagination ─── */
.pagination {
  display: flex; justify-content: space-between; align-items: center;
  padding: 40px 0 0;
  border-top: 1px solid var(--line);
  margin-top: 40px;
}
.pagination .p-btn {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px 0;
  font-family: inherit;
}
.pagination .p-btn:hover { color: var(--accent); }
.pagination .p-btn:disabled { color: var(--muted-soft); cursor: default; }
.pagination .p-btn::before { content: '\2190'; margin-right: 10px; }
.pagination .p-btn.next::before { content: ''; }
.pagination .p-btn.next::after { content: '\2192'; margin-left: 10px; }
.pagination .page-info {
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ─── Empty / Loading ─── */
.empty, .loading {
  padding: 80px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  font-style: italic;
}

/* ─── Messages (inline status) ─── */
.msg {
  font-size: 14px;
  padding: 14px 16px;
  border-left: 2px solid var(--line);
  margin: 16px 0;
  background: var(--paper-soft);
}
.msg.ok { border-left-color: #0d6b2f; color: #0d6b2f; }
.msg.err { border-left-color: var(--accent); color: var(--accent); }
.msg.warn { border-left-color: #a66a00; color: #a66a00; }

/* ─── Footer ─── */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 32px 0;
  font-size: 12px;
  color: var(--muted);
}
.site-footer .shell {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px;
}
.site-footer nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 22px;
}
.site-footer nav a:first-child { margin-left: 0; }
.site-footer nav a:hover { color: var(--ink); }

@media (max-width: 600px) {
  .site-footer .shell { flex-direction: column; gap: 10px; }
  .site-footer nav a { margin-left: 0; margin-right: 18px; }
}

/* ─── CTA sobre (encarts) ─── */
.inline-cta {
  padding: 28px 32px;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  margin: 48px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.inline-cta h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.inline-cta p { font-size: 14px; color: var(--ink-soft); }
