/*
Theme Name: Cornavin
Description: Thème custom Geneva Station / Gare Cornavin — v3 « Swiss Poster / Bento » : canvas clair professionnel, palette bleue (alignée gvaairport), grille bento, typographie monumentale.
Version: 3.0.0
Author: Swiss Limo Group
Text Domain: cornavin
*/

@font-face {
  font-family: 'Archivo';
  src: url('fonts/archivo-var.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Plex Mono';
  src: url('fonts/plex-mono-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}

:root {
  --v3-blue: #1863DC;
  --v3-blue-dark: #124BB0;
  --v3-navy: #0F1E3D;
  --v3-board: #0B1730;
  --v3-board-line: #1E3055;
  --v3-ink: #212121;
  --v3-slate: #64748B;
  --v3-line: #E2E8F0;
  --v3-line-strong: #CBD5E1;
  --v3-bg: #F8FAFC;
  --v3-paper: #FFFFFF;
  --v3-green: #059669;
  --v3-red: #DC2626;
  --v3-warn: #B45309;
  --v3-radius: 14px;
  --v3-display: 'Archivo', -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --v3-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --v3-mono: 'Plex Mono', ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --v3-max: 1140px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--v3-font);
  font-size: 17px;
  line-height: 1.7;
  color: var(--v3-ink);
  background: var(--v3-bg);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--v3-blue); text-underline-offset: 3px; }
a:hover { color: var(--v3-navy); }

h1, h2, h3 {
  font-family: var(--v3-display);
  line-height: 1.08;
  color: var(--v3-navy);
  font-weight: 800;
  letter-spacing: -0.025em;
}
h1 { font-size: clamp(2.2rem, 6vw, 4rem); margin: 0 0 .5em; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin: 2em 0 .55em; }
h3 { font-size: 1.2rem; margin: 1.5em 0 .45em; font-weight: 700; }

.cstn-kicker {
  font-family: var(--v3-mono);
  font-size: .72rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  color: var(--v3-blue); margin: 0 0 12px;
}

/* ═══════════ Header ═══════════ */
.cstn-header {
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--v3-line);
  position: sticky; top: 0; z-index: 50;
  transition: box-shadow .25s;
}
.cstn-header.is-scrolled { box-shadow: 0 8px 28px -20px rgba(15,30,61,.45); }
.cstn-header-in {
  max-width: var(--v3-max); margin: 0 auto; padding: 11px 22px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.cstn-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.cstn-brand-mark { width: 36px; height: 36px; flex: none; display: block; transition: transform .25s; }
.cstn-brand-mark svg { width: 36px; height: 36px; display: block; }
.cstn-brand:hover .cstn-brand-mark { transform: rotateX(28deg); }
.cstn-brand-name { font-family: var(--v3-display); font-weight: 800; font-size: 1.06rem; color: var(--v3-navy); line-height: 1.05; letter-spacing: -0.01em; text-transform: uppercase; }
.cstn-brand-tag { display: block; font-family: var(--v3-mono); font-size: .55rem; font-weight: 600; color: var(--v3-slate); letter-spacing: .18em; text-transform: uppercase; margin-top: 2px; }
.cstn-nav { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cstn-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; flex-wrap: wrap; }
.cstn-nav li a {
  display: block; padding: 8px 12px; font-size: .93rem; font-weight: 550;
  color: var(--v3-ink); text-decoration: none; border-radius: 8px; position: relative;
}
.cstn-nav li a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 5px; height: 2px;
  background: var(--v3-blue); transform: scaleX(0); transform-origin: left; transition: transform .22s;
}
.cstn-nav li a:hover::after, .cstn-nav li.current-menu-item > a::after, .cstn-nav li.current_page_item > a::after { transform: scaleX(1); }
.cstn-nav li a:hover { color: var(--v3-navy); }
.cstn-header-cta {
  display: inline-block; background: var(--v3-blue); color: #fff !important;
  font-size: .9rem; font-weight: 700; padding: 10px 18px; border-radius: 10px;
  text-decoration: none; white-space: nowrap; font-family: var(--v3-display);
  transition: background .2s, transform .15s;
}
.cstn-header-cta:hover { background: var(--v3-navy); transform: translateY(-1px); }

/* ═══════════ Layout ═══════════ */
.cstn-main { max-width: var(--v3-max); margin: 0 auto; padding: 44px 22px 70px; }
.cstn-main > .cstn-content > *:first-child:not(.cstn-hero) { margin-top: 0; }
.cstn-content > p, .cstn-content > ul, .cstn-content > ol, .cstn-content > h2, .cstn-content > h3 { max-width: 720px; }
.cstn-content > ul li { margin: .35em 0; }

/* ═══════════ Bandeau titre pages intérieures (clair, filets) ═══════════ */
.cstn-page-head {
  width: 100vw; margin: -44px 0 44px calc(50% - 50vw);
  padding: clamp(36px, 5vw, 64px) 22px clamp(26px, 3.5vw, 40px);
  background: var(--v3-paper);
  border-bottom: 2px solid var(--v3-navy);
  position: relative; overflow: hidden;
}
.cstn-page-head::after {
  content: attr(data-ghost); position: absolute; right: -10px; bottom: -20px;
  font-family: var(--v3-display); font-weight: 900; font-size: clamp(4rem, 11vw, 8rem);
  letter-spacing: -0.03em; color: transparent; -webkit-text-stroke: 1px rgba(24,99,220,.10);
  pointer-events: none; white-space: nowrap; text-transform: uppercase;
}
.cstn-page-head-in { max-width: var(--v3-max); margin: 0 auto; }
.cstn-page-head h1 { margin: 0; max-width: 860px; text-transform: uppercase; }

/* ═══════════ Hero accueil : poster typographique clair ═══════════ */
.cstn-hero {
  width: 100vw; margin: -44px 0 0 calc(50% - 50vw);
  padding: clamp(40px, 6vw, 78px) 22px 8px;
  background: var(--v3-paper);
  position: relative; overflow: hidden;
}
.cstn-hero::before {
  content: "CORNAVIN"; position: absolute; right: -24px; top: 0;
  font-family: var(--v3-display); font-weight: 900; font-size: clamp(5rem, 15vw, 12rem);
  letter-spacing: -0.02em; color: transparent; -webkit-text-stroke: 1.2px rgba(24,99,220,.08);
  pointer-events: none; white-space: nowrap;
}
.cstn-hero > * { max-width: var(--v3-max); margin-left: auto !important; margin-right: auto !important; position: relative; }
.cstn-hero .cstn-kicker { display: flex; align-items: center; gap: 9px; }
.cstn-hero .cstn-kicker::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--v3-green);
  box-shadow: 0 0 0 0 rgba(5,150,105,.5); animation: cstnPulse 2s infinite; flex: none;
}
@keyframes cstnPulse { 70% { box-shadow: 0 0 0 9px rgba(5,150,105,0); } 100% { box-shadow: 0 0 0 0 rgba(5,150,105,0); } }
.cstn-hero h1 { margin-top: 6px; max-width: 900px; text-transform: uppercase; }
.cstn-hero h1 .cstn-accent { color: var(--v3-blue); }
.cstn-hero > p { color: var(--v3-slate); max-width: 620px; font-size: 1.08rem; margin-top: 0; }

/* ═══════════ Grille bento ═══════════ */
.cstn-bento {
  width: 100vw; margin: 0 0 0 calc(50% - 50vw);
  background: var(--v3-paper); border-bottom: 2px solid var(--v3-navy);
  padding: 26px 22px clamp(34px, 5vw, 54px);
}
.cstn-bento-in {
  max-width: var(--v3-max); margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.cstn-tile {
  border-radius: var(--v3-radius); padding: 20px; position: relative; overflow: hidden;
  text-decoration: none; display: flex; flex-direction: column; min-height: 150px;
  transition: transform .22s, box-shadow .25s;
}
a.cstn-tile:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -24px rgba(15,30,61,.4); }
.cstn-tile-label {
  font-family: var(--v3-mono); font-size: .66rem; font-weight: 600; letter-spacing: .18em;
  text-transform: uppercase; margin: 0 0 10px;
}
.cstn-tile strong { font-family: var(--v3-display); font-weight: 700; font-size: 1.15rem; line-height: 1.25; letter-spacing: -0.015em; display: block; }
.cstn-tile p { margin: 6px 0 0; font-size: .9rem; line-height: 1.55; }
.cstn-tile .cstn-tile-go { margin-top: auto; padding-top: 14px; font-family: var(--v3-display); font-weight: 700; font-size: .92rem; }

.cstn-tile--board { grid-column: span 2; grid-row: span 2; background: var(--v3-board); padding: 18px; }
.cstn-tile--board .cstn-tile-label { color: #7E8CA0; display: flex; align-items: center; gap: 8px; }
.cstn-tile--board .cstn-tile-label::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--v3-green);
  box-shadow: 0 0 0 0 rgba(5,150,105,.5); animation: cstnPulse 2s infinite;
}

.cstn-tile--cta { grid-column: span 2; grid-row: span 2; background: var(--v3-blue); color: #fff; }
.cstn-tile--cta .cstn-tile-label { color: #BFDBFE; }
.cstn-tile--cta strong { color: #fff; font-size: clamp(1.3rem, 2.4vw, 1.7rem); }
.cstn-tile--cta p { color: #DBEAFE; max-width: 400px; }
.cstn-tile--cta .cstn-tile-btns { margin-top: auto; padding-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
.cstn-ticks { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.cstn-ticks li { font-size: .95rem; color: #DBEAFE; padding-left: 26px; position: relative; line-height: 1.45; }
.cstn-ticks li::before {
  content: "✓"; position: absolute; left: 0; top: 0; width: 18px; height: 18px;
  background: rgba(255,255,255,.18); border-radius: 50%; color: #fff; font-weight: 700;
  font-size: .7rem; display: flex; align-items: center; justify-content: center;
}
.cstn-tile--cta .cstn-btn-solid {
  background: #fff; color: var(--v3-blue); font-family: var(--v3-display); font-weight: 700;
  padding: 11px 20px; border-radius: 10px; text-decoration: none; font-size: .95rem;
  transition: transform .15s;
}
.cstn-tile--cta .cstn-btn-solid:hover { transform: translateY(-2px); }
.cstn-tile--cta .cstn-btn-ghost {
  color: #fff; border: 1.5px solid rgba(255,255,255,.45); font-family: var(--v3-display); font-weight: 600;
  padding: 11px 20px; border-radius: 10px; text-decoration: none; font-size: .95rem;
}
.cstn-tile--cta .cstn-btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }

.cstn-tile--light { background: var(--v3-bg); border: 1.5px solid var(--v3-line-strong); color: var(--v3-ink); }
.cstn-tile--light .cstn-tile-label { color: var(--v3-slate); }
.cstn-tile--light strong { color: var(--v3-navy); font-size: 1.02rem; }
.cstn-tile--light p { color: var(--v3-slate); font-size: .85rem; }
.cstn-tile--light .cstn-tile-go { color: var(--v3-blue); }
.cstn-tile--navy { background: var(--v3-navy); color: #fff; }
.cstn-tile--navy .cstn-tile-label { color: #93B4E8; }
.cstn-tile--navy strong { color: #fff; font-size: 1.02rem; }
.cstn-tile--navy .cstn-tile-go { color: #BFDBFE; }
.cstn-badge-ok { color: var(--v3-green); font-weight: 700; }
.cstn-badge-warn { color: var(--v3-warn); font-weight: 700; }

/* Jauge d'affluence */
.cstn-gauge { display: flex; gap: 3px; margin-top: 10px; }
.cstn-gauge span { height: 6px; flex: 1; border-radius: 3px; background: var(--v3-line); }
.cstn-gauge span.g1 { background: var(--v3-green); }
.cstn-gauge span.g2 { background: #F59E0B; }
.cstn-gauge span.g3 { background: var(--v3-red); }

/* ═══════════ Board live (dans tuile ou pleine page) ═══════════ */
.cornavin-live { margin: 0; }
.cstn-content > .cornavin-live, .cstn-content .wp-block-shortcode .cornavin-live { margin: 1.4em 0; }

/* ═══════════ Bloc CTA transfert (pages intérieures) ═══════════ */
.cornavin-cta {
  background: var(--v3-blue); border-radius: 18px; position: relative;
  padding: clamp(26px, 4vw, 44px) clamp(22px, 4vw, 46px);
  margin: 52px 0; color: #fff; max-width: none !important;
}
.cornavin-cta h2 { color: #fff; margin-top: 0; font-size: clamp(1.4rem, 3vw, 1.8rem); }
.cornavin-cta p { color: #DBEAFE; max-width: 580px; font-size: 1.02rem; }
.cornavin-cta .wp-block-buttons { gap: 12px; margin-top: 20px; }
.cornavin-cta .wp-block-button__link {
  font-family: var(--v3-display); background: #fff; color: var(--v3-blue);
  border-radius: 10px; padding: 13px 24px; font-weight: 700; font-size: 1rem;
  text-decoration: none; border: none; transition: transform .15s;
}
.cornavin-cta .wp-block-button__link:hover { transform: translateY(-2px); }
.cornavin-cta .is-style-outline .wp-block-button__link {
  background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.45); font-weight: 600;
}
.cornavin-cta .is-style-outline .wp-block-button__link:hover { border-color: #fff; background: rgba(255,255,255,.08); }

/* ═══════════ Boutons génériques ═══════════ */
.wp-block-button__link { background: var(--v3-blue); color: #fff; border-radius: 10px; font-weight: 600; }

/* ═══════════ Tables contenu (jamais le board live) ═══════════ */
.cstn-content table:not(.cornavin-table) { border-collapse: collapse; width: 100%; font-size: .95rem; background: var(--v3-paper); }
.cstn-content table:not(.cornavin-table) th, .cstn-content table:not(.cornavin-table) td { border: 1px solid var(--v3-line-strong); padding: 10px 14px; text-align: left; }
.cstn-content table:not(.cornavin-table) th { background: var(--v3-navy); color: #fff; font-family: var(--v3-display); font-weight: 700; border-color: var(--v3-navy); }

/* ═══════════ Photo éditoriale ═══════════ */
.cstn-photo { margin: 30px 0; max-width: none !important; }
.cstn-photo img { border-radius: var(--v3-radius); width: 100%; display: block; }

/* ═══════════ Footer ═══════════ */
.cstn-footer { background: var(--v3-navy); color: #A9B8D4; margin-top: 70px; overflow: hidden; }
.cstn-footer-brandline {
  max-width: var(--v3-max); margin: 0 auto; padding: 36px 22px 0;
  font-family: var(--v3-display); font-weight: 900; font-size: clamp(2.4rem, 7vw, 4.8rem);
  letter-spacing: -0.03em; line-height: 1; color: transparent;
  -webkit-text-stroke: 1.2px rgba(120,160,230,.28); white-space: nowrap; text-transform: uppercase;
}
.cstn-footer-in {
  max-width: var(--v3-max); margin: 0 auto; padding: 30px 22px 24px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px;
}
.cstn-footer h4 { color: #fff; font-family: var(--v3-display); font-size: .98rem; margin: 0 0 12px; font-weight: 700; }
.cstn-footer ul { list-style: none; margin: 0; padding: 0; }
.cstn-footer li { margin: 7px 0; }
.cstn-footer a { color: #A9B8D4; text-decoration: none; font-size: .93rem; border-bottom: 1px solid transparent; transition: color .15s, border-color .15s; }
.cstn-footer a:hover { color: #fff; border-bottom-color: var(--v3-blue); }
.cstn-footer-note { font-size: .86rem; color: #7E8FB0; line-height: 1.6; }
.cornavin-legal { border-top: 1px solid rgba(255,255,255,.12) !important; color: #7E8FB0 !important; background: var(--v3-navy); margin-top: 0 !important; opacity: 1 !important; font-family: var(--v3-mono); font-size: .68rem !important; letter-spacing: .08em; text-transform: uppercase; }

/* ═══════════ Sticky CTA mobile ═══════════ */
.cstn-sticky-cta {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: rgba(255,255,255,.96); backdrop-filter: blur(8px);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  text-align: center; border-top: 1px solid var(--v3-line);
}
.cstn-sticky-cta a {
  display: block; background: var(--v3-blue); color: #fff;
  font-family: var(--v3-display); font-weight: 700; padding: 13px; border-radius: 11px; text-decoration: none; font-size: 1.02rem;
}

/* ═══════════ Reveal au scroll ═══════════ */
.cstn-reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.cstn-reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .cstn-reveal { opacity: 1; transform: none; transition: none; }
  .cstn-hero .cstn-kicker::before, .cstn-tile--board .cstn-tile-label::before { animation: none; }
}

/* ═══════════ Responsive ═══════════ */
@media (max-width: 980px) {
  .cstn-bento-in { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .cstn-sticky-cta { display: block; }
  body { padding-bottom: 76px; }
  .cstn-nav ul { display: none; }
  .cstn-nav .cstn-header-cta { display: none; }
  .cstn-menu-toggle { display: inline-flex !important; }
  .cstn-nav.is-open ul {
    display: flex; flex-direction: column; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--v3-paper); border-bottom: 1px solid var(--v3-line); padding: 8px 14px 14px;
  }
  .cstn-header-in { position: relative; }
  .cstn-bento-in { grid-template-columns: 1fr; }
  .cstn-tile--board, .cstn-tile--cta { grid-column: span 1; grid-row: auto; }
  .cstn-footer-brandline { white-space: normal; }
}
.cstn-menu-toggle {
  display: none; margin-left: auto; background: none; border: 1px solid var(--v3-line-strong);
  border-radius: 9px; padding: 8px 12px; font-size: 1rem; cursor: pointer; color: var(--v3-navy);
  align-items: center; gap: 6px; font-family: var(--v3-display); font-weight: 600;
}

::selection { background: var(--v3-blue); color: #fff; }
