/* ============================================
   PROGRAMME MUNICIPAL - SAINT-RÉMY-DE-PROVENCE
   Site web interactif — Design system adapté du print
   ============================================ */

/* --- Proxima Nova (charte graphique RN) --- */
@font-face {
  font-family: 'Proxima Nova';
  src: url('../fonts/Proxima Nova Black/Proxima Nova Black.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Proxima Nova';
  src: url('../fonts/Proxima Nova Light/Proxima Nova Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/* --- CSS Custom Properties --- */
:root {
  --rn-navy: #1B4677;
  --rn-navy-dark: #081236;
  --rn-blue: #1488cd;
  --rn-blue-medium: #2B5EA7;
  --rn-blue-light: #4A8CC7;
  --rn-blue-pale: #E8F1F8;
  --rn-red: #df254f;
  --rn-red-dark: #b80d34;
  --rn-white: #FFFFFF;

  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --gray-900: #0F172A;

  --font-heading: 'Proxima Nova', 'Montserrat', 'Segoe UI', sans-serif;
  --font-body: 'Proxima Nova', 'Source Sans 3', 'Segoe UI', sans-serif;
  --font-accent: 'Playfair Display', Georgia, serif;

  --page-padding: 2.5rem;
  --section-gap: 1.25rem;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 10px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1.4rem;
  line-height: 1.55;
  color: var(--gray-800);
  background: var(--rn-navy-dark);
  overflow: hidden;
}

/* ==========================================
   BOOK LAYOUT — DESKTOP
   ========================================== */

.book-container {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 1rem 3rem 1rem; /* top for nav, bottom for dots */
}

.book {
  position: relative;
  width: 90vw;
  max-width: 1400px;
  height: 100%;
  max-height: 100%;
  display: flex;
  perspective: 2000px;
  transition: transform 0.2s ease;
}

/* Spread (double page) */
.book-spread {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  gap: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.book-spread.active {
  opacity: 1;
  pointer-events: auto;
}

/* Book page (each side of the spread) */
.book-page {
  flex: 1 1 50%;
  max-width: 50%;
  background: var(--rn-white);
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: var(--gray-300) transparent;
}

.book-page::-webkit-scrollbar {
  width: 4px;
}

.book-page::-webkit-scrollbar-track {
  background: transparent;
}

.book-page::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 2px;
}

/* Left page */
.book-page.left {
  border-radius: 4px 0 0 4px;
  box-shadow:
    inset -20px 0 30px -15px rgba(0,0,0,0.12),
    -4px 0 15px rgba(0,0,0,0.15);
}

/* Right page */
.book-page.right {
  border-radius: 0 4px 4px 0;
  box-shadow:
    inset 20px 0 30px -15px rgba(0,0,0,0.12),
    4px 0 15px rgba(0,0,0,0.15);
}

/* Center spine */
.book::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 6px;
  transform: translateX(-50%);
  background: linear-gradient(to right,
    rgba(0,0,0,0.15),
    rgba(0,0,0,0.25),
    rgba(0,0,0,0.15));
  z-index: 10;
  pointer-events: none;
}

/* Page inner container */
.page-inner {
  padding: var(--page-padding);
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

/* ==========================================
   TOP NAVIGATION
   ========================================== */

.book-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(8, 18, 54, 0.95);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--rn-red);
  padding: 0.6rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.nav-item {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  border: none;
  background: none;
}

.nav-item:hover {
  color: white;
  background: rgba(255,255,255,0.1);
}

.nav-item.active {
  color: white;
  background: var(--rn-red);
}

.nav-item i {
  margin-right: 0.4rem;
  font-size: 1rem;
}

/* Spread arrows */
.spread-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(8, 18, 54, 0.8);
  color: white;
  border: 2px solid rgba(255,255,255,0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  transition: all 0.25s ease;
}

.spread-arrow:hover {
  background: var(--rn-red);
  border-color: var(--rn-red);
  transform: translateY(-50%) scale(1.1);
}

.spread-arrow.left {
  left: 1rem;
}

.spread-arrow.right {
  right: 1rem;
}

.spread-arrow.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Spread dots */
.spread-dots {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.8rem;
  z-index: 50;
}

.spread-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
}

.spread-dot.active {
  background: var(--rn-red);
  transform: scale(1.3);
}

.spread-dot:hover {
  background: rgba(255,255,255,0.6);
}

/* Zoom controls */
.zoom-controls {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(8, 18, 54, 0.85);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 10px;
  padding: 3px;
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.zoom-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(255,255,255,0.8);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.zoom-btn:hover {
  background: rgba(255,255,255,0.15);
  color: white;
}

.zoom-btn:active {
  background: var(--rn-red);
  transform: scale(0.92);
}

.zoom-btn.zoom-label {
  width: auto;
  padding: 0 0.6rem;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
}

.zoom-btn.zoom-label:hover {
  color: white;
}

/* ==========================================
   PAGE CONTENT COMPONENTS
   ========================================== */

/* Page Header Bar */
.page-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 2px solid var(--rn-navy);
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.page-header-bar .page-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--rn-navy);
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-header-bar .page-title img {
  height: 18px;
  width: 18px;
}

.page-header-bar .page-number {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--rn-red);
  background: var(--rn-blue-pale);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

/* Section Title */
.section-title-block {
  position: relative;
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.9rem;
  color: var(--rn-navy);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.15;
}

.section-title .accent {
  color: var(--rn-red);
}

.section-subtitle {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--gray-500);
  margin-top: 0.25rem;
}

/* Constat Box */
.constat-box {
  background: linear-gradient(135deg, var(--rn-navy) 0%, var(--rn-blue) 100%);
  color: var(--rn-white);
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
}

.constat-box::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
  transform: translate(20px, -20px);
}

.constat-box .constat-label {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--rn-red);
  margin-bottom: 0.4rem;
}

.constat-box p {
  font-size: 1.08rem;
  line-height: 1.45;
  opacity: 0.95;
}

.constat-box strong {
  color: var(--rn-white);
  font-weight: 700;
}

/* Stat Cards */
.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.75rem 0 1rem 0;
}

.stat-card {
  flex: 1;
  min-width: 0;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 0.625rem;
  padding: 0.75rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--rn-red);
}

.stat-card.navy::after { background: var(--rn-navy); }
.stat-card.blue::after { background: var(--rn-blue-medium); }

.stat-card .stat-number {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 2.2rem;
  color: var(--rn-navy);
  line-height: 1;
}

.stat-card .stat-label {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.25rem;
  line-height: 1.2;
}

/* Interactive stat cards */
.stat-card[data-stat] {
  cursor: pointer;
}

.stat-card[data-stat]:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(27, 70, 119, 0.2);
  outline: 2px solid var(--rn-blue);
}

.stat-card[data-stat]:focus-visible {
  outline: 2px solid var(--rn-red);
  outline-offset: 2px;
}

/* Interactive inline stat spans */
.stat-inline {
  cursor: pointer;
  border-bottom: 1.5px dashed var(--rn-blue-medium);
  transition: background 0.2s ease, border-color 0.2s ease;
  border-radius: 2px;
  padding: 0 2px;
}

.stat-inline:hover {
  background: var(--rn-blue-pale);
  border-bottom-color: var(--rn-red);
}

.stat-inline:focus-visible {
  outline: 2px solid var(--rn-red);
  outline-offset: 1px;
}

/* Inline stats inside dark containers (constat-box, info-banner) */
.constat-box .stat-inline,
.info-banner .stat-inline {
  border-bottom-color: rgba(255,255,255,0.5);
}

.constat-box .stat-inline:hover,
.info-banner .stat-inline:hover {
  background: rgba(255,255,255,0.15);
  border-bottom-color: var(--rn-red);
}

/* Stat tooltip */
.stat-tooltip {
  position: fixed;
  z-index: 1000;
  background: var(--rn-navy-dark);
  color: white;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  max-width: 320px;
  font-size: 1.2rem;
  line-height: 1.5;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.stat-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.stat-tooltip .tooltip-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--rn-red);
  margin-bottom: 0.4rem;
}

.stat-tooltip .tooltip-desc {
  margin-bottom: 0.6rem;
  opacity: 0.9;
}

.stat-tooltip .tooltip-source {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--rn-blue-light);
  text-decoration: none;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  background: rgba(255,255,255,0.08);
  transition: background 0.2s;
}

.stat-tooltip .tooltip-source:hover {
  background: rgba(255,255,255,0.15);
  text-decoration: underline;
}

.stat-tooltip .tooltip-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  font-size: 1.4rem;
  padding: 0.2rem;
  line-height: 1;
}

.stat-tooltip .tooltip-close:hover {
  color: white;
}

/* Section Header */
.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.section-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--rn-red) 0%, var(--rn-red-dark) 100%);
  color: var(--rn-white);
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.section-icon.blue {
  background: linear-gradient(135deg, var(--rn-blue-medium) 0%, var(--rn-navy) 100%);
}

/* Sub-section Title */
.subsection-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--rn-blue-medium);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 0.75rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1.5px solid var(--rn-blue-pale);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.subsection-title i {
  font-size: 1rem;
  color: var(--rn-blue-medium);
}

/* Icon Bullet */
.icon-bullet {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  margin-bottom: 0.4rem;
}

.icon-bullet i {
  color: var(--rn-blue-medium);
  font-size: 0.85rem;
  margin-top: 4px;
  flex-shrink: 0;
  width: 16px;
  text-align: center;
}

.icon-bullet p {
  font-size: 1.08rem;
  line-height: 1.4;
}

.icon-bullet strong {
  color: var(--rn-navy);
}

/* Divider */
.divider {
  width: 100%;
  height: 1px;
  background: var(--gray-200);
  margin: 0.75rem 0;
}

.divider.thick {
  height: 2px;
  background: linear-gradient(to right, var(--rn-navy), var(--rn-blue-medium), transparent);
}

/* Cover Page */
.cover-page {
  background: linear-gradient(180deg, #081236 0%, #1B4677 50%, #1488cd 100%);
  color: var(--rn-white);
}

.cover-page .page-inner {
  padding: 0;
  justify-content: flex-end;
}

.cover-page .cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

/* Cover needs explicit height since image is absolute */
.cover-page {
  min-height: 400px;
}

/* Mobile nav hidden by default */
.mobile-nav {
  display: none;
}

/* Edito Page */
.edito-hero {
  background: linear-gradient(135deg, var(--rn-navy) 0%, var(--rn-blue) 100%);
  color: var(--rn-white);
  padding: 1.5rem;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  text-align: center;
}

.edito-hero h1 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 2.4rem;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.edito-hero h1 .dot {
  color: var(--rn-red);
}

.edito-hero .baseline {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 1.2rem;
  opacity: 0.85;
}

.edito-text {
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--gray-700);
  margin-bottom: 0.6rem;
}

.edito-text .dropcap {
  float: left;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 3.5rem;
  line-height: 0.85;
  color: var(--rn-navy);
  margin-right: 0.5rem;
  margin-top: 2px;
}

.edito-signature {
  text-align: right;
  margin-top: 0.75rem;
}

.edito-signature .name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--rn-navy);
}

.edito-signature .role {
  font-size: 0.95rem;
  color: var(--gray-500);
}

/* Content area flex grow */
.content-area {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Photo Banner */
.photo-banner {
  width: 100%;
  height: 7rem;
  border-radius: 0.625rem;
  overflow: hidden;
  margin: 0.5rem 0;
  position: relative;
}

.photo-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.photo-banner.short { height: 5rem; }

.photo-banner .photo-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(to top, rgba(13,33,73,0.85), transparent);
  color: white;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Sommaire grid */
.sommaire-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.625rem;
  margin: 0.75rem 0;
}

.sommaire-card {
  background: linear-gradient(135deg, var(--rn-navy) 0%, var(--rn-blue) 100%);
  border-radius: 0.75rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
}

.sommaire-card .card-icon {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.sommaire-card .card-num {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--rn-red);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.sommaire-card .card-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
}

.sommaire-card .card-desc {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-top: 0.25rem;
  line-height: 1.3;
}

/* Engagement Table */
.engagement-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 1.02rem;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid var(--gray-200);
}

.engagement-table thead th {
  background: var(--rn-navy);
  color: var(--rn-white);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.625rem 0.75rem;
  text-align: left;
}

.engagement-table tbody td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}

.engagement-table tbody tr:nth-child(even) {
  background: var(--gray-50);
}

.engagement-table tbody tr:last-child td {
  border-bottom: none;
}

.engagement-table .row-number {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--rn-red);
  font-size: 1.1rem;
  text-align: center;
  width: 25px;
}

.engagement-table .row-engagement {
  font-weight: 600;
  color: var(--rn-navy);
}

.engagement-table .row-indicator {
  font-size: 0.9rem;
  color: var(--gray-600);
}

/* Info Banner */
.info-banner {
  background: linear-gradient(135deg, var(--rn-navy) 0%, var(--rn-blue) 100%);
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.5rem 0;
}

.info-banner i {
  font-size: 1.4rem;
  opacity: 0.8;
}

.info-banner p {
  font-size: 1rem;
  line-height: 1.35;
}

.info-banner strong { color: white; }

/* Quote Block */
.quote-block {
  background: var(--gray-50);
  border-left: 3px solid var(--rn-red);
  padding: 0.75rem 1rem;
  margin: 0.75rem 0;
  border-radius: 0 0.5rem 0.5rem 0;
}

.quote-block p {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--gray-700);
  line-height: 1.4;
}

/* Dual logo row */
.dual-logo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.dual-logo-row img {
  height: 48px;
  width: auto;
}

.dual-logo-row .logo-separator {
  width: 1px;
  height: 36px;
  background: var(--gray-300);
}

/* Source tag */
.source-tag {
  font-size: 0.75rem;
  color: var(--gray-400);
  font-style: italic;
  margin-top: 0.25rem;
}

/* Footer Bar */
.page-footer {
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.page-footer .footer-text {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.page-footer .footer-stripe {
  display: flex;
  height: 3px;
  width: 40px;
  border-radius: 2px;
  overflow: hidden;
}

.page-footer .footer-stripe span:nth-child(1) { background: #002395; flex: 1; }
.page-footer .footer-stripe span:nth-child(2) { background: #FFFFFF; flex: 1; }
.page-footer .footer-stripe span:nth-child(3) { background: #ED2939; flex: 1; }

/* Utility classes */
.flex-grow { flex: 1; }
.mt-auto { margin-top: auto; }
.text-center { text-align: center; }

/* ==========================================
   MOBILE LAYOUT — VERTICAL SCROLL
   ========================================== */

@media (max-width: 900px) {
  body {
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--gray-100);
  }

  .book-nav {
    position: sticky;
    top: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    gap: 0.2rem;
    padding: 0.8rem 1rem;
    padding-top: calc(0.8rem + env(safe-area-inset-top, 0px));
    scrollbar-width: none;
  }

  .book-nav::-webkit-scrollbar { display: none; }

  .nav-item {
    font-size: 0.95rem;
    padding: 0.4rem 0.8rem;
    flex-shrink: 0;
  }

  .book-container {
    position: static;
    display: block;
    padding: 0;
  }

  .book {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    perspective: none;
    padding-bottom: 60px; /* Space for fixed mobile nav */
  }

  .book::after { display: none; }

  .book-spread {
    position: static;
    display: flex;
    flex-direction: column;
    opacity: 1;
    pointer-events: auto;
  }

  .book-page {
    flex: 1 1 100%;
    max-width: 100%;
    overflow: visible;
    border-radius: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 2px;
    scroll-margin-top: 3.5rem;
  }

  .book-page.left,
  .book-page.right {
    border-radius: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  }

  .cover-page {
    min-height: 60vh;
  }

  .spread-arrow,
  .spread-dots,
  .zoom-controls {
    display: none;
  }

  /* Mobile bottom nav */
  .mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(8, 18, 54, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top: 2px solid var(--rn-red);
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .mobile-nav-btn {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1.2rem;
    cursor: pointer;
    transition: background 0.2s;
  }

  .mobile-nav-btn:hover { background: var(--rn-red); }
  .mobile-nav-btn:disabled { opacity: 0.3; pointer-events: none; }

  .mobile-nav-label {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: rgba(255,255,255,0.7);
    text-align: center;
  }

  .page-inner {
    padding: 1.5rem;
  }

  .section-title { font-size: 1.6rem; }
  .edito-hero h1 { font-size: 2rem; }
  .stat-card .stat-number { font-size: 1.8rem; }

  .sommaire-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .sommaire-card {
    flex-direction: row;
    gap: 1rem;
    padding: 1rem;
    text-align: left;
  }

  .sommaire-card .card-icon { margin-bottom: 0; }
}

/* ==========================================
   ANIMATIONS
   ========================================== */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.book-spread.active .page-inner {
  animation: fadeInUp 0.4s ease both;
}

/* Smooth section transitions for mobile */
@media (max-width: 900px) {
  .book-page {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .book-page.animate-in {
    opacity: 0;
    transform: translateY(10px);
  }

  .book-page.animate-in.visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Print: hide interactive elements */
@media print {
  .book-nav, .spread-arrow, .spread-dots, .mobile-nav, .stat-tooltip, .zoom-controls { display: none; }
  body { overflow: visible; background: white; }
  .book-container { position: static; }
  .book { display: block; height: auto; }
  .book::after { display: none; }
  .book-spread { position: static; display: block; opacity: 1; pointer-events: auto; }
  .book-page { overflow: visible; box-shadow: none; page-break-after: always; }
}
