/* ==========================================================================
   AXAVIAS — Site vitrine fonctionnalités
   Palette reprise de 002-Web_AXAVIAS/assets/css/variables.css
   ========================================================================== */

:root {
  --ax-primary: #0a84ff;
  --ax-secondary: #5e5ce6;
  --ax-accent: #10b981;
  --ax-warm: #ff6b35;
  --ax-danger: #ef4444;
  --ax-gradient-brand: linear-gradient(90deg, #803cdb, #9c6be6 25%, #6776e6 50%, #2f5fd8 75%, #4bb0f4);

  --bg: #f6f8ff;
  --bg-alt: #eef3ff;
  --surface: #ffffff;
  --surface-2: #f3f6fc;
  --text: #0c0c0d;
  --text-2: #4a5568;
  --muted: #6b7280;
  --border: rgba(10, 132, 255, .14);
  --grid: rgba(10, 132, 255, .08);
  --road: #dfe6f3;
  --shadow: 0 10px 40px rgba(16, 24, 64, .08);
  --shadow-hover: 0 14px 48px rgba(10, 132, 255, .16);

  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius: 14px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --header-h: 68px;
  --gutter: 16px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0c0d;
    --bg-alt: #121216;
    --surface: #1a1a1f;
    --surface-2: #222229;
    --text: #f5f5f7;
    --text-2: #c7c7cc;
    --muted: #a1a1a6;
    --border: rgba(255, 255, 255, .09);
    --grid: rgba(255, 255, 255, .05);
    --road: #2c2c34;
    --shadow: 0 10px 40px rgba(0, 0, 0, .4);
    --shadow-hover: 0 14px 48px rgba(10, 132, 255, .22);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 750; }
h3 { font-size: 1.12rem; font-weight: 650; }
p { margin: 0 0 1em; }
a { color: var(--ax-primary); }
:focus-visible { outline: 3px solid var(--ax-primary); outline-offset: 3px; border-radius: 6px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 8px; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.container.narrow { max-width: 820px; }
@media (min-width: 768px) { :root { --gutter: 28px; } }

.grad { background: var(--ax-gradient-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--muted); }
.eyebrow {
  display: inline-block;
  font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ax-primary);
  margin-bottom: .9rem;
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 1px solid transparent;
  font-weight: 650; font-size: .98rem; text-decoration: none;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: .9rem; }
.btn-primary { background: var(--ax-primary); color: #fff; box-shadow: 0 8px 24px rgba(10, 132, 255, .3); }
.btn-primary:hover { box-shadow: 0 12px 30px rgba(10, 132, 255, .4); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-light { background: #fff; color: #1d2b6b; }
.btn-outline-light { color: #fff; border-color: rgba(255, 255, 255, .5); }
.btn-outline-light:hover { background: rgba(255, 255, 255, .1); }

/* ---------- Pastilles ---------- */
.pill {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: .76rem; font-weight: 700; white-space: nowrap;
}
.pill-green { background: rgba(16, 185, 129, .14); color: #0c9a6b; }
.pill-blue { background: rgba(10, 132, 255, .14); color: var(--ax-primary); }
.pill-red { background: rgba(239, 68, 68, .14); color: #d93636; }
@media (prefers-color-scheme: dark) {
  .pill-green { color: #34d399; }
  .pill-red { color: #f87171; }
}

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: .06em; }
.brand-sm { font-size: .9rem; }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a:not(.btn) {
  color: var(--text-2); text-decoration: none; font-weight: 550; font-size: .95rem;
  padding: 8px 12px; border-radius: 10px;
}
.site-nav a:not(.btn):hover { color: var(--text); background: var(--surface-2); }
.site-nav .btn { margin-left: 8px; }

.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 12px;
    background: var(--surface); border: 1px solid var(--border); cursor: pointer;
  }
  .nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
    display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--text);
    transition: transform .25s var(--ease), background .2s;
  }
  .nav-toggle-bar { position: relative; }
  .nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bar::before { top: -6px; }
  .nav-toggle-bar::after { top: 6px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-6px) rotate(-45deg); }

  .site-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 12px var(--gutter) 20px;
    background: var(--bg); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a:not(.btn) { padding: 12px; font-size: 1rem; }
  .site-nav .btn { margin: 8px 0 0; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px);
  background:
    radial-gradient(600px 400px at 10% 0%, rgba(128, 60, 219, .12), transparent 70%),
    radial-gradient(700px 500px at 95% 20%, rgba(10, 132, 255, .14), transparent 70%);
}
.hero-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.05fr 1fr; } }
.lead { font-size: clamp(1.05rem, 1.8vw, 1.2rem); color: var(--text-2); max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 24px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 0; margin: 0; list-style: none; color: var(--text-2); font-size: .93rem; }
.hero-points li { display: flex; align-items: center; gap: 8px; }
.hero-points li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ax-accent); flex: none; }

.hero-visual { position: relative; }
.map-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.map-toolbar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.map-toolbar .dot { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.map-toolbar .dot:nth-child(2) { background: #febc2e; }
.map-toolbar .dot:nth-child(3) { background: #28c840; }
.map-title { margin-left: 10px; font-size: .82rem; color: var(--muted); font-weight: 600; }
.map-svg { width: 100%; height: auto; background: var(--surface-2); }
.map-grid { stroke: var(--grid); stroke-width: 1; }
.map-road { fill: none; stroke: var(--road); stroke-width: 14; stroke-linecap: round; }
.map-road.thin { stroke-width: 8; }
.map-zone { fill: rgba(16, 185, 129, .12); stroke: var(--ax-accent); stroke-width: 2; stroke-dasharray: 6 5; }
.map-zone-label { fill: var(--ax-accent); font: 700 12px var(--font); }
.map-route { fill: none; stroke: var(--ax-primary); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 9s linear infinite; }
.map-stop { fill: var(--surface); stroke: var(--ax-warm); stroke-width: 3; }
.map-vehicle-halo { fill: rgba(10, 132, 255, .2); animation: pulse 1.8s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.map-vehicle-dot { fill: var(--ax-primary); stroke: #fff; stroke-width: 3; }
@keyframes draw { 0% { stroke-dashoffset: 600; } 85%, 100% { stroke-dashoffset: 0; } }
@keyframes pulse { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }

.float-card {
  position: absolute;
  display: grid; gap: 2px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: .88rem;
  min-width: 170px;
}
.float-card .pill { justify-self: start; margin-bottom: 4px; }
.float-top { top: 64px; left: 16px; }
.float-bottom { right: 16px; bottom: 16px; }
@media (max-width: 520px) {
  .float-card { position: static; margin: 10px 12px 0; min-width: 0; }
  .float-bottom { margin-bottom: 12px; }
}

/* ---------- Bandeau ---------- */
.strip { border-block: 1px solid var(--border); background: var(--surface); }
.strip-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--border); }
.strip-grid > div { display: grid; gap: 2px; padding: 22px 16px; background: var(--surface); }
.strip-grid strong { font-size: 1.02rem; }
.strip-grid span { color: var(--muted); font-size: .9rem; }
@media (min-width: 860px) { .strip-grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-lead { color: var(--text-2); font-size: 1.08rem; }
.note { margin-top: 24px; color: var(--muted); font-size: .95rem; }

.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) {
  .split { grid-template-columns: 1.1fr .9fr; gap: 72px; }
  .split-reverse > :first-child { order: 2; }
}

.check-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.check-list li { position: relative; padding-left: 32px; color: var(--text-2); }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: .2em;
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(10, 132, 255, .12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.5 2.5L14 7.5' fill='none' stroke='%230a84ff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat;
}
.check-list strong { color: var(--text); }

/* ---------- Panneaux maquettes ---------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 24px;
}
.panel-title { font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 16px; }
.kv { margin: 0; display: grid; }
.kv > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid var(--border); }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; text-align: right; }

.timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.timeline li { display: grid; grid-template-columns: 52px 20px 1fr; align-items: center; gap: 10px; padding: 10px 0; position: relative; color: var(--text-2); font-size: .95rem; }
.tl-time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .88rem; }
.tl-dot { width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--ax-primary); background: var(--surface); justify-self: center; position: relative; z-index: 1; }
.tl-dot.start { background: var(--ax-primary); }
.tl-dot.end { background: var(--ax-accent); border-color: var(--ax-accent); }
.tl-dot.warn { border-color: var(--ax-warm); }
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 71px; top: 50%; height: 100%; width: 2px; background: var(--border); }

.command-panel { display: grid; gap: 18px; }
.command-panel .panel-title { margin-bottom: 0; }
.cmd-row { display: flex; justify-content: space-between; align-items: center; font-weight: 650; }
.cmd-buttons { display: grid; gap: 10px; }
.cmd { display: block; padding: 12px 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-2); font-weight: 600; font-size: .95rem; }
.cmd-danger { background: rgba(239, 68, 68, .1); border-color: rgba(239, 68, 68, .3); color: #d93636; }
.cmd-status { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--ax-accent); font-weight: 600; font-size: .92rem; }
.tick { width: 18px; height: 18px; border-radius: 50%; background: var(--ax-accent); position: relative; flex: none; }
.tick::after { content: ""; position: absolute; left: 6px; top: 3px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* ---------- Cartes ---------- */
.cards { display: grid; gap: 18px; }
@media (min-width: 680px) { .cards-2, .cards-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cards-3 { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.card p { color: var(--text-2); margin: 0; }
.card-lg { padding: 28px; }
.icon {
  width: 44px; height: 44px; border-radius: 12px; margin-bottom: 16px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(10, 132, 255, .14), rgba(94, 92, 230, .14));
}
.icon svg { width: 22px; height: 22px; fill: none; stroke: var(--ax-primary); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.feature-row { display: grid; gap: 18px; margin-top: 18px; }
@media (min-width: 680px) { .feature-row { grid-template-columns: 1fr 1fr; } }
.feature-row > div {
  display: grid; gap: 4px; padding: 22px 24px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(10, 132, 255, .08), rgba(128, 60, 219, .08));
  border: 1px solid var(--border);
}
.feature-row span { color: var(--text-2); }

/* ---------- Alertes ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.tab {
  min-height: 40px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  font: 600 .92rem var(--font);
  transition: background .2s, color .2s;
}
.tab[aria-pressed="true"] { background: var(--ax-primary); border-color: var(--ax-primary); color: #fff; }

.alert-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
@media (min-width: 600px) { .alert-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .alert-grid { grid-template-columns: repeat(3, 1fr); } }
.alert {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; border-left: 4px solid var(--ax-primary);
}
.alert[data-cat="securite"] { border-left-color: var(--ax-danger); }
.alert[data-cat="conduite"] { border-left-color: var(--ax-warm); }
.alert[data-cat="activite"] { border-left-color: var(--ax-accent); }
.alert[hidden] { display: none; }
.alert h3 { margin: 4px 0 4px; font-size: 1.02rem; }
.alert p { margin: 0; color: var(--text-2); font-size: .94rem; }
.alert-tag { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.channels { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 28px; }
.channels-label { font-weight: 650; margin-right: 6px; }
.chip { padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: .9rem; color: var(--text-2); }

/* ---------- Boîtier (section sombre) ---------- */
.section-dark {
  background:
    radial-gradient(700px 400px at 0% 0%, rgba(128, 60, 219, .35), transparent 70%),
    radial-gradient(700px 500px at 100% 100%, rgba(10, 132, 255, .3), transparent 70%),
    #0d0f1a;
  color: #f5f5f7;
}
.section-dark .eyebrow { color: #7cc2ff; }
.section-dark .section-lead { color: #c7c9d6; }
.spec-grid { display: grid; gap: 14px; }
@media (min-width: 600px) { .spec-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .spec-grid { grid-template-columns: repeat(5, 1fr); } }
.spec {
  display: grid; gap: 6px; align-content: start;
  padding: 20px; border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .1);
}
.spec strong { font-size: 1rem; }
.spec span { color: #b8bbc9; font-size: .9rem; line-height: 1.5; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; }
.faq details {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0 20px;
}
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 0; font-weight: 650;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; font-weight: 400; color: var(--ax-primary); transition: transform .25s var(--ease); flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--text-2); padding-bottom: 18px; margin: 0; }

/* ---------- Contact ---------- */
.contact { padding-top: 0; }
.section-alt + .contact { padding-top: clamp(64px, 9vw, 112px); }
.contact-card {
  display: grid; gap: 28px; align-items: center;
  padding: clamp(28px, 5vw, 56px);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #2f5fd8, #6776e6 50%, #803cdb);
  color: #fff;
  box-shadow: 0 20px 60px rgba(47, 95, 216, .3);
}
.contact-card h2 { margin-bottom: .4em; }
.contact-card p { color: rgba(255, 255, 255, .85); margin: 0; font-size: 1.08rem; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 900px) {
  .contact-card { grid-template-columns: 1.4fr 1fr; }
  .contact-actions { justify-content: flex-end; }
}

/* ---------- Pied de page ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0; background: var(--bg); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-nav a { color: var(--text-2); text-decoration: none; font-size: .92rem; }
.footer-nav a:hover { color: var(--ax-primary); }
.copyright { margin: 0; color: var(--muted); font-size: .88rem; }

/* ---------- Apparition au défilement ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .map-route { stroke-dashoffset: 0; }
  .js .reveal { opacity: 1; transform: none; }
}
