/* Extrait de telecharger.css (page « Télécharger l'application Waze ») : jetons, base, header, drawer,
   hero (.waze-hero, .glue-headline), bouton noir (.closing__btn), footer et règles responsive associées.
   Règles reprises telles quelles ; seul « body.telecharger-page » devient « body.waze-page ».
   Non repris : panneaux empilés, phrase d'ouverture, badges des stores, logo du hero. */

/* ==========================================================================
   WAZE-SHARED.CSS — Socle partagé
   Palette et composition inspirées du site officiel Waze (Google Glue).
   ========================================================================== */

:root {
  --wz-blue: #33ccff;
  --wz-blue-dark: #0099cc;
  --wz-yellow: #fff59d;
  --wz-sky: #bdebff;
  --wz-rose: #ffcccc;
  --wz-dark: #121316;
  --wz-nav-surface: #1e1e24;
  --wz-white: #ffffff;
  --wz-text: #202124;
  --wz-text-muted: #5f6368;
  --wz-border-light: rgba(255, 255, 255, 0.12);
  --nav-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body.waze-page {
  font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--wz-text);
  background-color: var(--wz-white);
  min-width: 320px;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

body.waze-page img,
body.waze-page svg { max-width: 100%; }

body.waze-page a:focus-visible,
body.waze-page button:focus-visible {
  outline: 3px solid #005fcc;
  outline-offset: 4px;
}

/* ============================================================
   NAVIGATION GLOBALE — STICKY DARK
   ============================================================ */
.global-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--wz-dark);
  border-bottom: 1px solid var(--wz-border-light);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.global-nav__container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 24px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.global-nav__logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.global-nav__logo-img { height: 36px; width: auto; display: block; }

.global-nav__menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}

.global-nav__item { position: relative; }

.global-nav__link {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 9px 14px;
  border-radius: 9999px;
  transition: background-color 0.2s, color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.global-nav__link:hover {
  color: var(--wz-white);
  background-color: rgba(255, 255, 255, 0.1);
}

.global-nav__link--active {
  font-weight: 700;
  color: var(--wz-blue);
  background-color: rgba(51, 204, 255, 0.16);
}

.global-nav__dropdown-arrow {
  width: 14px;
  height: 14px;
  fill: currentColor;
  transition: transform 0.25s var(--ease);
}

.global-nav__item:hover .global-nav__dropdown-arrow,
.global-nav__item:focus-within .global-nav__dropdown-arrow {
  transform: rotate(180deg);
}

/* ---- Menu déroulant ---- */
.global-nav__dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 308px;
  background: var(--wz-nav-surface);
  border: 1px solid var(--wz-border-light);
  border-radius: 18px;
  padding: 10px;
  list-style: none;
  margin: 0;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(0.985);
  transform-origin: 24px 0;
  transition: opacity 0.22s, visibility 0.22s, transform 0.3s var(--ease);
  z-index: 200;
}

/* Pont invisible : évite que le menu se ferme entre le lien et la carte */
.global-nav__dropdown-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 12px;
}

.global-nav__item:hover .global-nav__dropdown-menu,
.global-nav__item:focus-within .global-nav__dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.global-nav__dropdown-label {
  padding: 8px 12px 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
}

.global-nav__dropdown-label:not(:first-child) {
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.global-nav__dropdown-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 11px;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background-color 0.18s, color 0.18s, transform 0.25s var(--ease);
}

.global-nav__dropdown-item a:hover,
.global-nav__dropdown-item a:focus-visible {
  background-color: rgba(255, 255, 255, 0.07);
  color: var(--wz-blue);
  transform: translateX(3px);
}

.global-nav__dropdown-text { display: flex; flex-direction: column; line-height: 1.25; }

.global-nav__dropdown-sub {
  font-size: 0.74rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.46);
}

/* Entrée en cascade des lignes à l'ouverture */
.global-nav__dropdown-item {
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.3s var(--ease), transform 0.35s var(--ease);
}

.global-nav__item:hover .global-nav__dropdown-item,
.global-nav__item:focus-within .global-nav__dropdown-item {
  opacity: 1;
  transform: none;
}



.global-nav__item:hover .global-nav__dropdown-item,
.global-nav__item:focus-within .global-nav__dropdown-item {
  transition-delay: calc(var(--i, 0) * 0.035s);
}

/* Blason / logo de territoire (petit format) */
.emblem {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.emblem[hidden] { display: none; }

.emblem img {
  display: block;
  width: auto;
  height: auto;
  max-width: 24px;
  max-height: 24px;
  object-fit: contain;
}

.emblem--sm,
.emblem--sm img { max-width: 18px; max-height: 18px; }
.emblem--sm { width: 18px; height: 18px; }

.global-nav__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.global-nav__cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--wz-blue);
  color: #000;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 10px 22px;
  border-radius: 9999px;
  text-decoration: none;
  transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

.global-nav__cta-btn:hover {
  background-color: #66d9ff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(51, 204, 255, 0.35);
}

.global-nav__hamburger {
  display: none;
  background: transparent;
  border: none;
  color: var(--wz-white);
  padding: 8px;
  cursor: pointer;
  border-radius: 8px;
  transition: background-color 0.2s;
  line-height: 0;
}

.global-nav__hamburger:hover { background-color: rgba(255, 255, 255, 0.1); }
.global-nav__hamburger svg { width: 26px; height: 26px; fill: currentColor; display: block; }

/* ============================================================
   DRAWER MOBILE
   ============================================================ */
.global-nav__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
  z-index: 1900;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.global-nav--drawer-open .global-nav__overlay { opacity: 1; visibility: visible; }

.global-nav__drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 100%;
  max-width: 360px;
  background: var(--wz-dark);
  color: var(--wz-white);
  z-index: 2000;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.35s var(--ease), visibility 0.35s;
  overflow-y: auto;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

.global-nav--drawer-open .global-nav__drawer { transform: translateX(0); visibility: visible; }

.global-nav__drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--wz-border-light);
  flex-shrink: 0;
}

.global-nav__drawer-logo { height: 32px; width: auto; }

.global-nav__close-btn {
  background: transparent;
  border: none;
  color: var(--wz-white);
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s;
  line-height: 0;
}

.global-nav__close-btn:hover { background-color: rgba(255, 255, 255, 0.1); }
.global-nav__close-btn svg { width: 22px; height: 22px; fill: currentColor; }

.global-nav__accordion-list { list-style: none; padding: 10px 0; margin: 0; flex: 1; }
.global-nav__accordion-item { border-bottom: 1px solid rgba(255, 255, 255, 0.06); }

.global-nav__accordion-link {
  display: block;
  padding: 15px 22px;
  color: var(--wz-white);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: background-color 0.2s, color 0.2s;
}

.global-nav__accordion-link:hover,
.global-nav__accordion-link--active {
  background-color: rgba(255, 255, 255, 0.06);
  color: var(--wz-blue);
}

.global-nav__accordion-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 22px;
  background: transparent;
  border: none;
  color: var(--wz-white);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s;
}

.global-nav__accordion-btn:hover { background-color: rgba(255, 255, 255, 0.06); }

.global-nav__accordion-panel {
  display: none;
  padding: 0 0 10px;
  background: rgba(255, 255, 255, 0.025);
}

.global-nav__accordion-panel a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 28px 11px 34px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
  line-height: 1.45;
  text-decoration: none;
}

.global-nav__accordion-panel a:hover { color: var(--wz-blue); }

.global-nav__accordion-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
  transition: transform 0.2s ease;
}

.global-nav__accordion-btn[aria-expanded="true"] .global-nav__accordion-icon { transform: rotate(180deg); }

.global-nav__drawer-footer { padding: 18px 22px 26px; flex-shrink: 0; }

/* ============================================================
   HERO — BLEU WAZE #33CCFF, COINS BAS ARRONDIS (extrait de la référence)
   ============================================================ */
.waze-hero {
  position: relative;
  z-index: 2;
  background: var(--wz-blue);
  min-height: min(720px, calc(100svh - var(--nav-h)));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(52px, 7vw, 88px) 24px clamp(60px, 8vw, 96px);
  text-align: center;
  overflow: clip;
  border-radius: 0 0 80px 80px;
}

.glue-headline {
  font-family: 'Google Sans', sans-serif;
  max-width: 790px;
  margin: 0 0 clamp(30px, 3.8vw, 44px);
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.16;
  font-weight: 500;
  letter-spacing: -0.035em;
  text-wrap: balance;
  color: #000;
}

@keyframes wz-rise {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}

.js .glue-headline { animation: wz-rise 0.95s var(--ease) 0.14s both; }

/* Bouton noir (.closing__btn de la référence) */
.closing__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 16px 38px;
  border-radius: 9999px;
  background: #111;
  color: #fff;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.2s, transform 0.25s var(--ease), box-shadow 0.25s;
}

.closing__btn:hover {
  background: var(--wz-blue);
  color: #000;
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(51, 204, 255, 0.35);
}

/* ============================================================
   FOOTER — ARTWORK WAZE (lettres officielles) ANIMÉ AU SCROLL
   ============================================================ */
.waze-footer {
  background-color: var(--wz-dark);
  color: var(--wz-white);
  padding: 80px 24px 40px;
  overflow: hidden;
}

.waze-artwork-stage {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto 72px;
  overflow: hidden;
}

.waze-artwork { width: 100%; height: auto; display: block; overflow: hidden; }

.waze-artwork__letter {
  fill: rgba(255, 255, 255, 0.08);
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

.footer-container { max-width: 1360px; margin: 0 auto; }

.footer-top {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 52px;
  margin-bottom: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(4, 1fr);
  gap: 36px;
  align-items: start;
}

.footer__brand-col { display: flex; flex-direction: column; gap: 18px; }
.footer__brand-header { display: flex; align-items: center; gap: 14px; }
.footer__brand-icon { width: 52px; height: 52px; flex-shrink: 0; border-radius: 14px; }
.footer__brand-id { display: flex; flex-direction: column; line-height: 1.25; }
.footer__brand-name { font-weight: 700; font-size: 1.3rem; color: var(--wz-white); }
.footer__brand-role { font-size: 0.85rem; color: rgba(255, 255, 255, 0.55); }
.footer__brand-desc { color: rgba(255, 255, 255, 0.68); font-size: 0.95rem; line-height: 1.65; margin: 0; max-width: 34em; }

.footer__brand-link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: var(--wz-white);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.footer__brand-link:hover { background: var(--wz-blue); border-color: var(--wz-blue); color: #000; }

.footer__column-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 20px;
}

.footer__list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }

.footer__list-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.93rem;
  line-height: 1.5;
  transition: color 0.2s, transform 0.2s;
}

.footer__list-link:hover { color: var(--wz-blue); transform: translateX(4px); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.83rem;
}

.footer-bottom p { margin: 0; }
.footer-legal-links { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.footer-legal-link { color: rgba(255, 255, 255, 0.5); text-decoration: none; font-size: 0.83rem; line-height: 1.5; transition: color 0.2s; }
.footer-legal-link:hover { color: rgba(255, 255, 255, 0.9); text-decoration: underline; }

/* ============================================================
   RESPONSIVE (extrait : header, drawer, hero, footer)
   ============================================================ */
@media (max-width: 991px) {
  .global-nav__container { gap: 14px; }
  .global-nav__link { padding-inline: 9px; font-size: 0.84rem; }
  .global-nav__cta-btn { padding-inline: 15px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 26px; }
  .footer__brand-col { grid-column: 1 / -1; }
}

@media (max-width: 767px) {
  :root { --nav-h: 64px; }
  html { scroll-padding-top: 68px; }

  .global-nav__menu, .global-nav__actions { display: none; }
  .global-nav__hamburger { display: flex; }
  .global-nav__container { padding: 0 16px; }

  .waze-hero {
    min-height: 0;
    padding: 56px 22px 64px;
    border-radius: 0 0 40px 40px;
  }

  .glue-headline {
    font-size: clamp(1.75rem, 7vw, 2.25rem);
    line-height: 1.2;
    margin-bottom: 30px;
    letter-spacing: -0.025em;
  }

  .waze-footer { padding: 52px 20px 28px; }
  .waze-artwork-stage { margin-bottom: 44px; }
  .footer-top { padding-bottom: 34px; margin-bottom: 28px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .footer__brand-col { grid-column: auto; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 14px; }
  .footer-legal-links { gap: 10px 16px; }
}

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