/* ==========================================================
   Gazette plein écran — mise en page "journal"
   Route : /gazette/:numCours/:instanceId/:turn
   ========================================================== */

body.gz-body {
  background: #e8e4dc;
  color: #1a1a1a;
  font-family: 'Georgia', 'Times New Roman', serif;
}

.gz-page {
  min-height: 100vh;
  padding: 24px 16px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gz-page-loading,
.gz-page-error {
  font-size: 20px;
  margin-top: 30vh;
  color: #555;
  text-align: center;
}
.gz-page-error i { color: #c0392b; margin-right: 8px; }

/* ── Barre d'outils (non imprimée) ─────────────────── */
.gz-toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 16px;
  background: #fff;
  border: 1px solid #d4ccbf;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  width: min(960px, 100%);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
}
.gz-toolbar-turn {
  font-weight: 600;
  font-size: 14px;
  color: #333;
  min-width: 120px;
  text-align: center;
}
.gz-toolbar-spacer { flex: 1; }
.gz-toolbar .btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ── Feuille de journal ────────────────────────────── */
.gz-sheet {
  width: min(960px, 100%);
  background: #fbf8f1;
  color: #1a1a1a;
  padding: 48px 56px 56px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.12);
  border: 1px solid #d4ccbf;
  border-radius: 3px;
  position: relative;
}
.gz-sheet::before,
.gz-sheet::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 6px;
  background: repeating-linear-gradient(90deg, transparent 0 6px, rgba(0,0,0,0.04) 6px 8px);
  pointer-events: none;
}
.gz-sheet::before { top: 0; }
.gz-sheet::after  { bottom: 0; }

/* ── Ours / bandeau-titre ──────────────────────────── */
.gz-masthead {
  text-align: center;
  padding-bottom: 12px;
  margin-bottom: 28px;
}
.gz-masthead-rule {
  height: 4px;
  background: #1a1a1a;
  margin: 6px 0;
}
.gz-masthead-rule-thick { height: 6px; }
.gz-masthead-rule-thin  { height: 1px; background: #555; }
.gz-masthead-title {
  font-family: 'Georgia', 'Playfair Display', 'Times New Roman', serif;
  font-size: 56px;
  font-weight: 900;
  margin: 8px 0 4px;
  letter-spacing: -1px;
  font-variant: small-caps;
  line-height: 1;
}
.gz-masthead-tagline {
  font-style: italic;
  font-size: 14px;
  color: #555;
  margin-bottom: 10px;
}
.gz-masthead-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #333;
  padding: 6px 0;
}
.gz-masthead-edition {
  font-weight: 700;
  color: #8b0000;
}

/* ── Articles ──────────────────────────────────────── */
.gz-article { margin-bottom: 32px; break-inside: avoid; }
.gz-article-rubrique {
  display: inline-block;
  font-size: 10px;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #8b0000;
  background: none;
  border-top: 2px solid #8b0000;
  border-bottom: 1px solid #8b0000;
  padding: 3px 0;
  margin-bottom: 8px;
}
.gz-article-title {
  font-family: 'Georgia', 'Playfair Display', 'Times New Roman', serif;
  color: #111;
  line-height: 1.15;
  margin: 0 0 12px;
}
.gz-article-lead .gz-article-title {
  font-size: 38px;
  font-weight: 900;
  letter-spacing: -0.5px;
}
.gz-article:not(.gz-article-lead) .gz-article-title {
  font-size: 20px;
  font-weight: 700;
}

/* Contenu éditeur TipTap */
.gz-article-content { font-family: 'Georgia', 'Times New Roman', serif; }
.gz-prose { outline: none; }
.gz-prose p {
  font-size: 15px;
  line-height: 1.7;
  margin: 0 0 10px;
  text-align: justify;
  hyphens: auto;
}
.gz-prose-lead p { font-size: 17px; line-height: 1.75; }
.gz-prose-lead p:first-child::first-letter {
  float: left;
  font-family: 'Georgia', 'Playfair Display', serif;
  font-size: 64px;
  line-height: 0.85;
  font-weight: 900;
  padding: 4px 10px 0 0;
  color: #1a1a1a;
}
.gz-prose h1, .gz-prose h2, .gz-prose h3 {
  font-family: 'Georgia', serif;
  font-weight: 700;
  margin: 14px 0 8px;
}
.gz-prose blockquote {
  border-left: 3px solid #8b0000;
  margin: 12px 0;
  padding: 2px 14px;
  color: #333;
  font-style: italic;
}
.gz-prose ul, .gz-prose ol { padding-left: 22px; }

/* Article en une : séparateur bas */
.gz-article-lead {
  border-bottom: 3px double #1a1a1a;
  padding-bottom: 24px;
}

/* Colonnes pour les articles secondaires */
.gz-columns {
  column-count: 2;
  column-gap: 32px;
  column-rule: 1px solid #c9c2b4;
}
@media (max-width: 720px) {
  .gz-columns { column-count: 1; }
  .gz-sheet { padding: 28px 20px; }
  .gz-masthead-title { font-size: 36px; }
  .gz-article-lead .gz-article-title { font-size: 28px; }
}

.gz-notice {
  text-align: center;
  font-size: 18px;
  color: #666;
  padding: 60px 20px;
  font-style: italic;
}

/* Bandeau "Brouillon — Aperçu prof" en haut de la page gazette */
.gz-preview-banner {
  position: relative;
  margin: 0 0 24px;
  padding: 14px 18px 14px 22px;
  background: repeating-linear-gradient(-45deg, #fef3c7 0 12px, #fde68a 12px 24px);
  border: 2px dashed #b45309;
  border-radius: 6px;
  color: #7c2d12;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
}
.gz-preview-banner-stamp {
  display: inline-block;
  padding: 4px 10px;
  margin-bottom: 8px;
  background: rgba(180, 83, 9, 0.92);
  color: #fff7ed;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-radius: 3px;
  transform: rotate(-1.5deg);
  box-shadow: 1px 1px 0 rgba(0,0,0,0.15);
}
.gz-preview-banner-stamp i { margin-right: 6px; }
.gz-preview-banner-body {
  font-size: 13px;
  line-height: 1.5;
  color: #7c2d12;
}
.gz-notice i { margin-right: 8px; color: #8b0000; }

.gz-sheet-footer {
  margin-top: 28px;
  padding-top: 10px;
  border-top: 1px solid #c9c2b4;
  text-align: center;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #777;
}

/* ── Impression ────────────────────────────────────── */
@media print {
  body.gz-body { background: #fff; }
  .gz-toolbar { display: none; }
  .gz-page { padding: 0; }
  .gz-sheet { box-shadow: none; border: none; padding: 20mm; background: #fff; }
  .gz-sheet::before, .gz-sheet::after { display: none; }
  .gz-article { page-break-inside: avoid; }
}
