/* btscene.eu - main stylesheet */
/* on garde le tout dans un seul fichier, plus simple a maintenir */

@font-face {
  font-family: 'Playfair Display';
  src: url('/fonts/playfair-latin.woff2') format('woff2');
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: 'Playfair Display';
  src: url('/fonts/playfair-latin-ext.woff2') format('woff2');
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-024F, U+1E00-1EFF;
}

:root {
  --bg: #fafaf7;
  --ink: #1c1c1c;
  --ink-2: #666;
  --ink-3: #999;
  --accent: #7c2128;
  --accent-dark: #5c161c;
  --border: #e5e2dd;
  --max-w: 1180px;
  --content-w: 720px;
}

/* reset */
* { box-sizing: border-box; }
html, body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, blockquote, pre {
  margin: 0;
  padding: 0;
}
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* base */
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* typo titres */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}
h1 { font-size: 38px; line-height: 1.15; }
h2 { font-size: 28px; }
h3 { font-size: 22px; }
h4 { font-size: 18px; }
p { margin-bottom: 1.1em; }
p:last-child { margin-bottom: 0; }

a.body-link, .prose a {
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
a.body-link:hover, .prose a:hover { border-bottom-color: var(--accent); }

/* layout */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.container--narrow {
  max-width: var(--content-w);
}

/* header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  height: 64px;
  display: flex;
  align-items: center;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.site-logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.site-logo span { color: var(--accent); }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav__list {
  display: flex;
  align-items: center;
  gap: 22px;
}
.site-nav__link {
  font-size: 14px;
  color: var(--ink-2);
  padding: 6px 0;
  transition: color 200ms ease;
}
.site-nav__link:hover, .site-nav__link.is-active { color: var(--ink); }

.site-nav__search {
  margin-left: 18px;
  width: 32px; height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--ink-2);
  /* TODO: brancher la recherche */
}
.site-nav__search:hover { color: var(--ink); border-color: var(--ink-3); }

/* burger menu - mobile only */
.site-nav__toggle, .site-nav__check { display: none; }

/* hero home */
.hero {
  padding: 48px 0 64px;
  border-bottom: 1px solid var(--border);
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
}
.hero__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #eee;
}
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__body { padding-right: 16px; }
.hero__tag { margin-bottom: 14px; }
.hero__title {
  font-size: 44px;
  line-height: 1.1;
  margin-bottom: 16px;
}
.hero__title a { color: inherit; }
.hero__title a:hover { color: var(--accent); }
.hero__excerpt {
  font-size: 17px;
  color: var(--ink-2);
  margin-bottom: 18px;
  max-width: 36em;
}
.hero__meta { font-size: 13px; color: var(--ink-3); }

/* tag categorie */
.cat-tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 8px;
  border: 1px solid var(--accent);
  color: var(--accent);
  line-height: 1.6;
}
.cat-tag:hover { background: var(--accent); color: #fff; }

/* grille cards */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px 28px;
  padding: 56px 0;
}
.grid--secondary {
  grid-template-columns: repeat(3, 1fr);
  padding: 32px 0 64px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-top: 1px solid var(--border);
  padding-top: 32px;
  margin-top: 16px;
}
.section-heading h2 {
  font-size: 20px;
  letter-spacing: 0.02em;
}
.section-heading a {
  font-size: 13px;
  color: var(--ink-2);
}
.section-heading a:hover { color: var(--accent); }

/* card */
.card {
  display: flex;
  flex-direction: column;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px -10px rgba(0,0,0,0.15);
}
.card__media {
  aspect-ratio: 16 / 9;
  background: #eee;
  margin-bottom: 14px;
  overflow: hidden;
}
.card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}
.card:hover .card__media img { transform: scale(1.02); }
.card__tag { margin-bottom: 10px; }
.card__title {
  font-size: 18px;
  line-height: 1.3;
  margin-bottom: 6px;
  font-weight: 700;
}
.card__title a { color: var(--ink); }
.card__title a:hover { color: var(--accent); }
.card__excerpt {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.5;
  margin-bottom: 10px;
}
.card__meta {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: auto;
  padding-top: 8px;
}

/* small variant (secondary grid) */
.card--small .card__title { font-size: 16px; }
.card--small .card__excerpt { display: none; }

/* article page */
.article {
  padding: 48px 0 64px;
}
.article__head {
  max-width: var(--content-w);
  margin: 0 auto 28px;
  padding: 0 24px;
}
.article__tag { margin-bottom: 16px; }
.article__title {
  font-size: 42px;
  line-height: 1.1;
  margin-bottom: 18px;
  /* TODO: revoir la taille au-dessus de 1280px */
}
.article__meta {
  font-size: 13px;
  color: var(--ink-2);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.article__meta a { color: var(--ink); border-bottom: 1px solid transparent; }
.article__meta a:hover { border-bottom-color: var(--ink); }
.article__meta .sep { color: var(--ink-3); }

.article__cover {
  margin: 0 auto 36px;
  max-width: 1100px;
}
.article__cover figure { margin: 0; }
.article__cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.article__cover figcaption {
  font-size: 12px;
  color: var(--ink-3);
  padding: 8px 24px 0;
  text-align: right;
}

.prose {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 24px;
}
.prose h2 {
  margin-top: 1.8em;
  margin-bottom: 0.5em;
  font-size: 28px;
}
.prose h3 {
  margin-top: 1.4em;
  margin-bottom: 0.4em;
  font-size: 22px;
}
.prose p, .prose ul, .prose ol, .prose blockquote, .prose figure {
  margin-bottom: 1.2em;
}
.prose ul, .prose ol {
  padding-left: 1.4em;
}
.prose ul li { list-style: disc; margin-bottom: 0.4em; }
.prose ol li { list-style: decimal; margin-bottom: 0.4em; }
.prose blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 18px;
  color: var(--ink-2);
  font-style: italic;
}
.prose img, .prose figure { max-width: 100%; }
.prose figure img { width: 100%; }
.prose figure figcaption {
  font-size: 12px;
  color: var(--ink-3);
  padding-top: 6px;
}

/* drop cap (optionnel via .has-dropcap sur .prose) */
.prose.has-dropcap > p:first-of-type::first-letter {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 48px;
  float: left;
  line-height: 0.9;
  padding: 6px 10px 0 0;
  color: var(--accent);
}

/* fin article : auteur + suggestions */
.article__author {
  max-width: var(--content-w);
  margin: 48px auto 0;
  padding: 24px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.article__author img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}
.article__author h4 {
  font-size: 16px;
  margin-bottom: 4px;
}
.article__author p {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.5;
  margin: 0;
}

.related {
  padding: 56px 0 32px;
}
.related h3 {
  font-size: 18px;
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}

/* page statique simple */
.page {
  padding: 48px 0 80px;
}
.page__title {
  font-size: 36px;
  margin-bottom: 28px;
  max-width: var(--content-w);
  margin-left: auto;
  margin-right: auto;
}

/* footer */
.site-footer {
  background: #f3f0ea;
  border-top: 1px solid var(--border);
  margin-top: 64px;
  padding: 48px 0 24px;
  color: var(--ink-2);
  font-size: 14px;
}
.site-footer__cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.site-footer__cols h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink);
  margin-bottom: 14px;
}
.site-footer__cols ul li { margin-bottom: 8px; }
.site-footer__cols a:hover { color: var(--accent); }
.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--ink-3);
}
.site-footer__bottom a { color: var(--ink-2); }
.site-footer__bottom a:hover { color: var(--accent); }

/* 404 */
.not-found {
  text-align: center;
  padding: 96px 24px;
  max-width: 640px;
  margin: 0 auto;
}
.not-found__code {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 900;
  font-size: 128px;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 16px;
}
.not-found h1 {
  font-size: 28px;
  margin-bottom: 14px;
}
.not-found p { color: var(--ink-2); margin-bottom: 22px; }

/* boutons (rarement utilises mais on les a) */
.btn {
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff !important;
  font-size: 14px;
  transition: background 200ms ease, color 200ms ease;
}
.btn:hover { background: var(--bg); color: var(--ink) !important; }

.btn--ghost {
  background: transparent;
  color: var(--ink) !important;
}
.btn--ghost:hover { background: var(--ink); color: #fff !important; }

/* form */
.form-row { margin-bottom: 16px; }
.form-row label {
  display: block;
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.form-row input,
.form-row textarea {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--ink);
}

/* legacy classes - a virer un jour (depuis v1) */
.legacy-banner {
  background: #fff8e1;
  border: 1px solid #f0e1a0;
  padding: 12px 16px;
  margin: 20px 0;
  font-size: 14px;
  color: #6a5500;
}
.sidebar-newsletter {
  background: #fff;
  border: 1px solid var(--border);
  padding: 24px;
  text-align: center;
}
.btn-secondary--old {
  display: inline-block;
  padding: 8px 14px;
  border: 1px dashed var(--ink-3);
  color: var(--ink-2);
  font-size: 13px;
}

/* responsive */
@media (max-width: 900px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .hero__title { font-size: 32px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 28px 20px; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
  h3 { font-size: 18px; }
  .container { padding: 0 18px; }

  /* burger menu CSS-only */
  .site-nav__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    cursor: pointer;
    color: var(--ink);
  }
  .site-nav__list {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 14px 18px;
    gap: 8px;
  }
  .site-nav__check:checked ~ .site-nav__list { display: flex; }
  .site-nav__search { margin-left: 8px; }

  .hero { padding: 32px 0 40px; }
  .hero__title { font-size: 28px; }
  .grid, .grid--secondary { grid-template-columns: 1fr; gap: 28px; padding: 32px 0; }
  .article { padding: 32px 0 48px; }
  .article__title { font-size: 28px; }
  .article__author { flex-direction: column; }
  .site-footer__cols { grid-template-columns: 1fr; gap: 24px; }
  .site-footer__bottom { flex-direction: column; gap: 8px; }
  .not-found__code { font-size: 96px; }
}

/* utility tweaks */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}
