/* === Football & Cœur — Dr. Mghazli === */

:root {
  --navy-900: #0a1226;
  --navy-800: #0f1e3a;
  --navy-700: #1c2c52;
  --navy-100: #e8edf6;
  --ivory:    #faf7ef;
  --cream:    #f4ecdc;
  --paper:    #ffffff;
  --ink:      #1a1f2e;
  --muted:    #5a6275;
  --line:     #d9d2c1;
  --red:      #dc2626;
  --red-soft: #fee2e2;
  --amber:    #d97706;
  --amber-soft: #fef3c7;
  --gold:     #ca8a04;
  --gold-soft: #fdf6e3;
  --green:    #047857;
  --green-soft: #d1fae5;
  --cyan:     #0e7490;
  --cyan-soft: #cffafe;
  --shadow-sm: 0 1px 2px rgba(10, 18, 38, .08);
  --shadow-md: 0 4px 14px rgba(10, 18, 38, .10);
  --shadow-lg: 0 12px 32px rgba(10, 18, 38, .14);
  --radius:   14px;
  --radius-sm: 8px;
  --transition: 200ms cubic-bezier(.4,0,.2,1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  background:
    linear-gradient(135deg, var(--navy-900) 0%, #8b0000 80%, var(--red) 130%),
    radial-gradient(ellipse at top right, rgba(202, 138, 4, .25), transparent 50%);
  color: var(--cream);
  padding: 64px 24px 56px;
  text-align: center;
  border-bottom: 6px solid var(--red);
}
.hero-author {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .35);
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  z-index: 3;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  letter-spacing: .02em;
  text-align: left;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}
.hero-copy {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .35);
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  z-index: 3;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  letter-spacing: .02em;
  font-family: inherit;
  transition: background .15s, transform .1s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}
.hero-copy:hover { background: rgba(255, 255, 255, .28); transform: translateY(-1px); }
.hero-copy:active { transform: translateY(0); }
.hero-copy.copied { background: rgba(21, 128, 61, .85); border-color: rgba(255, 255, 255, .5); }
.hero-copy.failed { background: rgba(220, 38, 38, .7); border-color: rgba(255, 255, 255, .5); }
.hero-inner { max-width: 920px; margin: 0 auto; }
.kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--gold);
  margin: 0 0 14px;
  font-weight: 500;
}
.hero h1 {
  font-family: 'Cormorant Garamond', 'Times New Roman', serif;
  font-size: clamp(32px, 4.8vw, 52px);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 18px;
  color: var(--cream);
}
.hero .hl {
  color: var(--gold);
  font-style: italic;
  position: relative;
}
.hero .hl::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.subtitle {
  font-size: 17px;
  color: rgba(244, 236, 220, .82);
  max-width: 720px;
  margin: 0 auto 22px;
  font-weight: 300;
}
.badge-version {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 1px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(217, 119, 6, .18);
  border: 1px solid rgba(217, 119, 6, .45);
  color: var(--gold-soft);
  margin-top: 8px;
}

/* ===== INTRO STATS ===== */
.intro-stats {
  max-width: 1200px;
  margin: -28px auto 0;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  position: relative;
  z-index: 2;
}
.stat {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 22px 20px;
  text-align: center;
  box-shadow: var(--shadow-md);
  border-top: 3px solid var(--line);
  transition: transform var(--transition), box-shadow var(--transition);
}
.stat:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.stat-num {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 38px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

/* ===== MAIN ===== */
main {
  max-width: 1100px;
  margin: 48px auto;
  padding: 0 24px;
}

/* ===== ACCORDION ===== */
.acc {
  background: var(--paper);
  border-radius: var(--radius);
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.acc:hover { box-shadow: var(--shadow-md); }
.acc-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 26px;
  background: var(--paper);
  border: 0;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: 16px;
  color: var(--navy-800);
  font-weight: 600;
  transition: background var(--transition);
}
.acc-head:hover { background: var(--cream); }
.acc-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--red);
  flex-shrink: 0;
  width: 50px;
}
.acc-title {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  color: var(--navy-800);
  line-height: 1.35;
}
.acc-icon {
  font-size: 18px;
  color: var(--gold);
  transition: transform var(--transition);
  flex-shrink: 0;
}
.acc-head[aria-expanded="true"] .acc-icon { transform: rotate(180deg); }
.acc-body {
  padding: 0 26px 26px 92px;
  border-top: 1px solid var(--line);
  display: none;
}
.acc-head[aria-expanded="true"] + .acc-body { display: block; }

/* ===== TYPOGRAPHY ===== */
.acc-body h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--navy-800);
  margin: 28px 0 12px;
  border-left: 3px solid var(--red);
  padding-left: 12px;
}
.acc-body h4 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--navy-700);
  margin: 22px 0 10px;
}
.acc-body p {
  margin: 0 0 14px;
  color: var(--ink);
}
.acc-body strong { color: var(--navy-800); font-weight: 600; }
.acc-body em { color: var(--navy-700); font-style: italic; }

/* ===== CHECK LIST ===== */
.check-list {
  list-style: none;
  padding: 0;
  margin: 14px 0;
}
.check-list li {
  position: relative;
  padding: 8px 0 8px 28px;
  line-height: 1.55;
}
.check-list li::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.dot.red { background: var(--red); }
.dot.amber { background: var(--amber); }
.dot.gold { background: var(--gold); }
.dot.green { background: var(--green); }
.dot.cyan { background: var(--cyan); }

/* ===== BIG OL ===== */
.big-ol {
  counter-reset: bigol;
  list-style: none;
  padding: 0;
  margin: 18px 0;
}
.big-ol li {
  counter-increment: bigol;
  position: relative;
  padding: 14px 16px 14px 56px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--cream), var(--paper));
  border-left: 4px solid var(--red);
  border-radius: var(--radius-sm);
}
.big-ol li::before {
  content: counter(bigol);
  position: absolute;
  left: 14px;
  top: 14px;
  width: 32px;
  height: 32px;
  background: var(--navy-800);
  color: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px;
  font-weight: 700;
}

/* ===== PROTOCOL GRID ===== */
.protocol-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 20px 0;
}
.prot {
  text-align: center;
  padding: 18px 12px;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
  color: var(--cream);
  border-radius: var(--radius-sm);
  border-bottom: 3px solid var(--red);
}
.prot-num {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 6px;
}
.prot-lbl {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(244, 236, 220, .8);
}

/* ===== CHARTS ===== */
.chart-wrap {
  margin: 24px 0;
  padding: 20px;
  background: linear-gradient(135deg, var(--cream), var(--paper));
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.chart-wrap canvas {
  max-height: 360px !important;
  width: 100% !important;
}
.chart-cap {
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
  margin: 14px 0 0;
  font-style: italic;
}

/* ===== REF BOX ===== */
.ref-box {
  margin-top: 24px;
  padding: 18px 22px;
  background: linear-gradient(135deg, var(--navy-100), var(--cream));
  border-left: 4px solid var(--red);
  border-radius: var(--radius-sm);
}
.ref-box h4 {
  font-family: 'Cormorant Garamond', serif;
  margin: 0 0 12px;
  color: var(--navy-800);
  font-size: 18px;
}
.ref-box ol {
  margin: 0;
  padding-left: 18px;
  font-size: 13.5px;
  line-height: 1.55;
}
.ref-box ol li {
  margin-bottom: 8px;
  color: var(--ink);
}
.ref-box a {
  color: var(--cyan);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px dotted var(--cyan);
  transition: all var(--transition);
}
.ref-box a:hover {
  color: var(--navy-800);
  border-bottom-color: var(--gold);
  background: var(--gold-soft);
}

/* ===== QUOTE ===== */
.quote-box {
  margin: 24px 0;
  padding: 22px 26px;
  background: var(--navy-800);
  color: var(--cream);
  border-left: 4px solid var(--red);
  border-radius: var(--radius-sm);
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-style: italic;
  line-height: 1.55;
}
.quote-box p { margin: 0; }

/* ===== END SIGNATURE ===== */
.end-signature {
  margin-top: 28px;
  padding: 18px 22px;
  background: linear-gradient(135deg, var(--navy-100), var(--paper));
  border-radius: var(--radius);
  text-align: center;
  border: 1px solid var(--line);
}
.end-signature p { margin: 4px 0; font-size: 14px; color: var(--navy-800); }
.end-signature p:last-child { font-size: 12px; color: var(--muted); font-style: italic; }

/* ===== FOOTER ===== */
.site-footer {
  max-width: 1100px;
  margin: 32px auto 0;
  padding: 28px 24px;
  text-align: center;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
}
.site-footer p { margin: 4px 0; }

/* ===== RESPONSIVE ===== */
@media (max-width: 720px) {
  .hero { padding: 44px 18px 40px; }
  .hero h1 { font-size: 28px; }
  .subtitle { font-size: 15px; }
  .hero-author { font-size: 12px; padding: 5px 10px; top: 12px; left: 12px; }
  .hero-copy { font-size: 12px; padding: 5px 10px; top: 12px; right: 12px; }
  .intro-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: -18px; }
  .stat { padding: 16px 12px; }
  .stat-num { font-size: 28px; }
  .stat-label { font-size: 11.5px; }
  main { padding: 0 14px; margin: 28px auto; }
  .acc-head { padding: 16px 18px; gap: 10px; }
  .acc-num { font-size: 22px; width: 36px; }
  .acc-title { font-size: 15px; }
  .acc-body { padding: 0 18px 20px; border-top: none; }
  .acc-head[aria-expanded="true"] + .acc-body { padding-left: 18px; }
  .protocol-grid { grid-template-columns: repeat(2, 1fr); }
  .ref-box { padding: 14px 16px; }
  .ref-box ol { font-size: 12.5px; }
  .chart-wrap { padding: 12px; }
  .chart-wrap canvas { max-height: 280px !important; }
  .quote-box { font-size: 16px; padding: 16px 18px; }
}

/* ===== PRINT ===== */
@media print {
  .hero { background: var(--navy-800); }
  .acc-body { display: block !important; padding-left: 26px !important; }
  .acc-head .acc-icon { display: none; }
  .chart-wrap { page-break-inside: avoid; }
}