/* ==========================================================================

   Cityscootlab — Global Styles (light theme only)
   - WCAG 2.2 AA focused
   - Lightweight, GPU-friendly animations
   - Core Web Vitals: min layout shift, fast paint
   - Single file, no external fonts

   ========================================================================== */


/* Root tokens */
:root{
  --bg: #ffffff;
  --bg-soft: #f6f8fb;
  --bg-hero: #f7fbff;
  --surface: #ffffff;
  --border: #e5e8ee;
  --shadow: 0 1px 2px rgba(9, 13, 30, .06), 0 8px 24px rgba(9, 13, 30, .07);

  --text: #0b1220;
  --muted: #5a6372;
  --muted-2: #8a93a3;

  --primary: #2563eb;           /* blue-600 */
  --primary-600: #2563eb;
  --primary-700: #1e4fd6;
  --primary-50: #eef4ff;

  --success: #16a34a;
  --warning: #b45309;

  --cta: var(--primary);
  --cta-contrast: #ffffff;

  --radius: 16px;
  --radius-sm: 12px;
  --radius-lg: 24px;

  --container: 1120px;
  --container-narrow: 860px;

  --focus: 3px solid #111827;   /* very visible */
  --ring: 0 0 0 3px rgba(37, 99, 235, .35);

  --header-h: 64px;
}


/* Reset-ish */
*,
*::before,
*::after { box-sizing: border-box; }

html{
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
}

body{
  margin: 0;
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,Helvetica,Arial,"Apple Color Emoji","Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}

/* -------------------------------------------------------------------------- */
/* Utilities                                                                  */
/* -------------------------------------------------------------------------- */

.container{
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 16px;
}

.container-narrow{
  max-width: var(--container-narrow);
  margin-inline: auto;
  padding-inline: 16px;
}

.flow > * + *{ margin-top: 1rem; }

.nowrap{ white-space: nowrap; }

.skip-link{
  position: absolute;
  left: -9999px;
  top: 8px;
  background: #111827;
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 10000;
}
.skip-link:focus{ left: 8px; outline: none; box-shadow: var(--ring); }

.sr-only{
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.muted{ color: var(--muted); }
.fine{ font-size: .875rem; color: var(--muted); }
.muted .fine, .fine.muted { color: var(--muted-2); }
.linklike{ background:none;border:none;padding:0;margin:0;color:var(--primary);text-decoration:underline;cursor:pointer;font:inherit; }

/* -------------------------------------------------------------------------- */
/* Headings / text                                                            */
/* -------------------------------------------------------------------------- */

h1,h2,h3,h4{ line-height: 1.25; }
h1{ font-size: clamp(2rem, 2.6vw + 1rem, 2.75rem); margin: .25rem 0 .5rem; }
h2{ font-size: clamp(1.5rem, 1.4vw + 1rem, 2rem); margin: 0 0 .5rem; }
h3{ font-size: clamp(1.125rem, .6vw + 1rem, 1.35rem); margin: .25rem 0 .25rem; }
h4{ font-size: 1.05rem; margin: .25rem 0 .25rem; }

.lead{ font-size: clamp(1.05rem, .6vw + 1rem, 1.25rem); color: var(--muted); }

.eyebrow{
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
  font-size: .8rem;
  color: var(--primary-700);
}

.mark{
  background: linear-gradient(90deg, #c7d2fe 0%, #e0f2fe 100%);
  border-radius: 8px;
  padding: .1rem .35rem;
}

/* -------------------------------------------------------------------------- */
/* Buttons                                                                    */
/* -------------------------------------------------------------------------- */

.btn{
  --pad-y: .65rem;
  --pad-x: 1rem;
  appearance: none;
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem;
  padding: var(--pad-y) var(--pad-x);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.1;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background-color .2s ease, border-color .2s ease;
  will-change: transform;
}
.btn:focus-visible{ outline: var(--focus); outline-offset: 2px; }

.btn-cta{
  background: var(--cta);
  color: var(--cta-contrast);
  box-shadow: 0 6px 16px rgba(37, 99, 235, .25);
}
.btn-cta:hover{ background: var(--primary-700); transform: translateY(-1px); }
.btn-cta:active{ transform: translateY(0); }

.btn-ghost{
  background: transparent;
  color: var(--primary-700);
  border: 1px solid var(--primary-600);
}
.btn-ghost:hover{ background: var(--primary-50); }

.chip{
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: .4rem .8rem;
  font-weight: 600;
  cursor: pointer;
}
.chip:focus-visible{ outline: var(--focus); }

/* Badges */
.badge{
  display: inline-block;
  padding: .35rem .6rem;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  font-weight: 600;
  font-size: .8rem;
}

/* -------------------------------------------------------------------------- */
/* Header / Nav                                                               */
/* -------------------------------------------------------------------------- */

.site-header{
  position: sticky; top: 0; z-index: 999;
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--border);
}
.header-grid{
  display: grid; grid-template-columns: auto 1fr;
  align-items: center; gap: 12px;
  min-height: var(--header-h);
}
.brand img{ display:block; height:auto; }

.nav-toggle{
  justify-self: end;
  width: 40px; height: 40px;
  border-radius: 10px; border: 1px solid var(--border);
  background: #fff; display: inline-flex; align-items: center; justify-content: center;
}
.nav-toggle:focus-visible{ outline: var(--focus); }
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after{
  content:""; display:block; width: 20px; height: 2px; background: #111827;
  border-radius: 2px; position: relative;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle-bar::before{ position: absolute; transform: translateY(-6px); }
.nav-toggle-bar::after{ position: absolute; transform: translateY(6px); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar{ background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before{ transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after{ transform: rotate(-45deg); }

.site-nav{
  grid-column: 1 / -1;
  display: none;
  padding-bottom: 12px;
}
.site-nav ul{
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 8px;
  align-items: flex-start;
}
.site-nav a{ color: var(--text); text-decoration: none; font-weight: 600; }
.site-nav a:hover{ color: var(--primary-700); }
.site-nav .sep{ width: 1px; height: 1px; }

.lang-switcher{ position: relative; }

/* SIMPLE FR/EN button (no dropdown) */
.lang-btn{
  display:inline-flex;
  align-items:center;
  padding:.45rem .9rem;
  border:1px solid rgba(15,23,42,.12);
  background:rgba(255,255,255,.94);
  border-radius:12px;
  font-weight:600;
  color:var(--text);
  line-height:1.1;
  cursor:pointer;
  box-shadow:0 1px 2px rgba(15,23,42,.08);
  transition:background-color .2s ease,border-color .2s ease,box-shadow .2s ease;
}
/* pas de caret, pas de dropdown */
.lang-btn::after{ content: none; }

/* désactive totalement le menu s'il est encore dans le HTML */
.lang-menu{ display:none !important; }

.lang-btn:focus-visible{ outline: var(--focus); }

@media (min-width: 980px){
  .nav-toggle{ display: none; }
  .site-nav{ grid-column: 2 / -1; display: block; padding-bottom: 0; }
  .site-nav ul{ flex-direction: row; gap: 20px; align-items: center; justify-content: flex-end; }
  .site-nav .sep{ width: 1px; height: 20px; background: var(--border); }
}

/* -------------------------------------------------------------------------- */
/* Hero                                                                       */
/* -------------------------------------------------------------------------- */

.hero{
  background: radial-gradient(1200px 600px at 10% -20%, #e0f2fe 0%, rgba(224,242,254,0) 60%),
              radial-gradient(1000px 500px at 90% -10%, #e9d5ff 0%, rgba(233,213,255,0) 60%),
              var(--bg-hero);
  border-bottom: 1px solid var(--border);
  overflow: clip;
}
@keyframes gentleGradient{
  0%{ background-position: 0 0, 100% 0, 0 0; }
  50%{ background-position: 10% -2%, 90% -3%, 0 0; }
  100%{ background-position: 0 0, 100% 0, 0 0; }
}
.hero{ animation: gentleGradient 18s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce){
  .hero{ animation: none; }
}

.hero-grid{
  display: grid; gap: 24px; align-items: center;
  grid-template-columns: 1fr;
  padding-block: 40px;
}
.hero-copy .hero-cta{ display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.hero-badges{ display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

@media (min-width: 980px){
  .hero-grid{ grid-template-columns: 1.05fr .95fr; padding-block: 56px; }
}

/* Lite YouTube (no iframe until click) */
.lite-yt{
  position: relative; display: block; border-radius: var(--radius); overflow: hidden;
  background: #000; box-shadow: var(--shadow);
}
.lite-yt img{ width: 100%; height: auto; display: block; aspect-ratio: 16/9; object-fit: cover; }
.lite-yt-play{
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 3rem; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.5);
  background: linear-gradient(180deg, rgba(0,0,0,.14), rgba(0,0,0,.45));
}
.lite-yt:focus-visible{ outline: var(--focus); }

/* -------------------------------------------------------------------------- */
/* Trust marquee                                                               */
/* -------------------------------------------------------------------------- */

.trust{ background: #fff; border-bottom: 1px solid var(--border); }
.trust-marquee{ overflow:hidden; mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent); }
.trust .track{
  display:inline-block; white-space:nowrap; padding-block: 10px; color: var(--muted);
  animation: marquee 22s linear infinite;
}
.trust .track span{ margin-right: 28px; }
@keyframes marquee{
  0%{ transform: translateX(0); }
  100%{ transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce){ .trust .track{ animation: none; } }

/* -------------------------------------------------------------------------- */
/* Sections                                                                    */
/* -------------------------------------------------------------------------- */

.why, .sale, .tops, .compare, .accessories, .video-focus, .faq, .final-cta,
.page-hero, .note, .article, .related{
  padding-block: 40px;
}
.page-hero.light{ background: var(--bg-soft); border-bottom: 1px solid var(--border); }

/* Cards & grids */
.cards{
  display: grid; gap: 16px;
}
.cards.two{ grid-template-columns: repeat(1, 1fr); }
.cards.three{ grid-template-columns: repeat(1, 1fr); }
.cards.four{ grid-template-columns: repeat(1, 1fr); }

@media (min-width:700px){
  .cards.two{ grid-template-columns: repeat(2, 1fr); }
  .cards.three{ grid-template-columns: repeat(3, 1fr); }
}
@media (min-width:980px){
  .cards.four{ grid-template-columns: repeat(4, 1fr); }
}

.card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

.product{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px;
  display: grid; gap: 8px;
}
.product img{ width: 100%; height: auto; border-radius: 12px; display:block; }
.product .desc{ color: var(--muted); margin: 0; }
.product .price{ font-weight: 700; color: var(--text); margin: 4px 0 8px; }
.product .actions{ display:flex; gap: 8px; flex-wrap: wrap; }

/* Sale banner */
.sale-banner{ margin-top: 18px; }
.sale-banner img{ width: 100%; height: auto; border-radius: var(--radius); display:block; }

/* Top mini cards */
.product-mini{ text-align: left; }
.product-mini p{ color: var(--muted); margin: .25rem 0 .5rem; }

/* Comparison table */
.table-wrap{ overflow:auto; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.spec-table{
  width: 100%; border-collapse: collapse; min-width: 720px;
}
.spec-table th,
.spec-table td{
  padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: left;
}
.spec-table thead th{
  position: sticky; top: 0; background: #f9fbff; z-index: 1; font-weight: 800;
}
.table-note{ color: var(--muted); font-size: .9rem; margin: .5rem 0 0; }

/* Video focus */
.video-box{ border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }

/* FAQ */
.faq details{
  border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: #fff; margin-top: 10px;
}
.faq summary{ cursor: pointer; font-weight: 700; }
.faq p{ margin: .5rem 0 0; color: var(--muted); }

/* Final CTA */
.final-cta{ background: var(--primary-50); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.final-grid{ display: grid; gap: 12px; align-items: center; grid-template-columns: 1fr; }
.final-grid .cta-actions{ display:flex; gap: 10px; flex-wrap: wrap; }
@media (min-width: 820px){
  .final-grid{ grid-template-columns: 1fr auto; }
}

/* Page/article */
.article-head{ margin-bottom: 12px; }
.article .article-cta{ display:flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.article-end{ margin-top: 24px; }

/* Blog list */
.post-card{
  display: grid; grid-template-columns: 1fr; gap: 10px;
  border: 1px solid var(--border); border-radius: var(--radius); background: #fff; overflow: hidden; box-shadow: var(--shadow);
}
.post-card .post-media img{ display:block; width:100%; height:auto; aspect-ratio: 16/9; object-fit: cover; }
.post-body{ padding: 12px; }
.post-title{ margin: 0 0 .25rem; }
.post-meta{ color: var(--muted-2); font-size: .9rem; margin: 0 0 .4rem; }
.post-excerpt{ color: var(--muted); margin: 0 0 .6rem; }

@media (min-width: 720px){
  .post-card{ grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); }
  .post-card .post-media{ order: 2; }
}

/* Page hero simple */
.page-hero .lead{ max-width: 60ch; }

/* Note blocks */
.note{
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.note .bullets{ margin: .5rem 0 0; padding-left: 1.1rem; }

/* Lists */
.bullets{ padding-left: 1.2rem; }
.bullets li{ margin: .25rem 0; }

/* Definition list-ish */
ul.dl{ list-style: none; padding: 0; margin: .5rem 0 0; }
ul.dl li{ padding: .4rem 0; border-bottom: 1px dashed var(--border); }
ul.dl li:last-child{ border-bottom: 0; }

/* -------------------------------------------------------------------------- */
/* Footer                                                                     */
/* -------------------------------------------------------------------------- */

.site-footer{
  border-top: 1px solid var(--border);
  background: #fff;
}
.footer-grid{
  display: grid; gap: 16px;
  grid-template-columns: 1fr;
  padding-block: 24px;
}
.foot-nav{ display:flex; gap: 16px; flex-wrap: wrap; }
.foot-nav a{ color: var(--text); text-decoration: none; }
.foot-nav a:hover{ color: var(--primary-700); }

.foot-fine{ color: var(--muted); margin: 6px 0 0; }

@media (min-width: 860px){
  .footer-grid{ grid-template-columns: 1fr auto 1.1fr; align-items: center; }
}

/* -------------------------------------------------------------------------- */
/* Consent banner                                                             */
/* -------------------------------------------------------------------------- */

.consent{
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
  background: rgba(255,255,255,.98);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 24px rgba(0,0,0,.06);
}
.consent[hidden]{ display: none !important; }
.consent-box{
  display: grid; gap: 10px; align-items: center;
  grid-template-columns: 1fr; padding-block: 12px;
}
.consent-actions{ display: flex; gap: 8px; justify-content: flex-start; }
@media (min-width: 820px){
  .consent-box{ grid-template-columns: 1fr auto; }
}

/* -------------------------------------------------------------------------- */
/* Tables of contents                                                         */
/* -------------------------------------------------------------------------- */

.toc{
  border: 1px solid var(--border);
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  margin-bottom: 12px;
}
.toc ol{ margin: 0; padding-left: 1.1rem; }
.toc a{ color: var(--primary-700); text-decoration: none; }
.toc a:hover{ text-decoration: underline; }

/* -------------------------------------------------------------------------- */
/* Accessibility & Interactions                                               */
/* -------------------------------------------------------------------------- */

a{ color: var(--primary-700); }
a:hover{ color: #153aa5; }
a:focus-visible{ outline: var(--focus); outline-offset: 2px; }

button:focus-visible,
[role="button"]:focus-visible,
[tabindex]:focus-visible{ outline: var(--focus); outline-offset: 2px; }

/* Visible focus for inputs */
input, select, textarea{
  font: inherit;
  padding: .6rem .7rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
}
input:focus-visible, select:focus-visible, textarea:focus-visible{
  outline: var(--focus);
}

/* -------------------------------------------------------------------------- */
/* Responsive Nav behavior (opened via JS toggling aria-expanded)             */
/* -------------------------------------------------------------------------- */

.site-header [aria-controls="site-nav"][aria-expanded="true"] ~ nav#site-nav{ display: block; }

/* -------------------------------------------------------------------------- */
/* Blog search chips / controls                                               */
/* -------------------------------------------------------------------------- */

.blog-controls{
  display: grid; gap: 10px; align-items: center;
  grid-template-columns: 1fr; margin-top: 10px;
}
.search-form{ display: flex; gap: 8px; }
.search-form input[type="search"]{ flex: 1; min-width: 0; }
.chips{ display: flex; gap: 8px; flex-wrap: wrap; }

/* -------------------------------------------------------------------------- */
/* Language & year helpers                                                    */
/* -------------------------------------------------------------------------- */

[data-year]::after{
  content: attr(data-year);
}

/* JS may set current year; if not, fallback via CSS variable */
:root{ --year-fallback: "2025"; }
[data-year]::after{
  content: var(--year-fallback);
}

/* -------------------------------------------------------------------------- */
/* Print                                                                      */
/* -------------------------------------------------------------------------- */

@media print{
  .site-header, .site-footer, .consent, .trust, .final-cta, .video-focus .lite-yt-play{ display: none !important; }
  a{ color: #000; text-decoration: underline; }
  body{ background: #fff; }
}

/* -------------------------------------------------------------------------- */
/* Parallax-lite background helper (optional use)                             */
/* -------------------------------------------------------------------------- */

.parallax-lite{
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
}
@media (prefers-reduced-motion: reduce){
  .parallax-lite{ background-attachment: scroll; }
}

/* -------------------------------------------------------------------------- */
/* ARIA current link cue                                                      */
/* -------------------------------------------------------------------------- */
[aria-current="page"]{
  position: relative;
}
[aria-current="page"]::after{
  content: "";
  position: absolute; left: 0; right: 0; bottom: -6px; height: 3px;
  background: var(--primary-600);
  border-radius: 2px;
}

/* -------------------------------------------------------------------------- */
/* Shadow and elevation helpers                                               */
/* -------------------------------------------------------------------------- */
.shadow{ box-shadow: var(--shadow); }
.round{ border-radius: var(--radius); }

/* -------------------------------------------------------------------------- */
/* Page-specific small tweaks                                                 */
/* -------------------------------------------------------------------------- */

/* Legal / Privacy typography */
.legal.container{ max-width: var(--container-narrow); }
.legal h2{ margin-top: 1.25rem; }
.legal p, .legal li{ color: var(--text); }

/* Compare note*/
.compare .table-note{ margin-top: 10px; }

/* Blog related links */
.related .related-list{ padding-left: 1.1rem; }

/* -------------------------------------------------------------------------- */
/* Safety: prefers-reduced-motion                                             */
/* -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important; }
}

/* Lite YouTube — aspect ratio & poster cover */
.lite-yt {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16/9;          /* ratio fluide */
  background: #000;            /* aucune "barre" grise/blanche */
  border-radius: 16px;
  overflow: hidden;
}

.lite-yt iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.lite-yt .lite-yt-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;           /* pas de bandes, recadrage propre */
  transition: opacity .2s ease;
}

.lite-yt.is-playing .lite-yt-poster {
  opacity: 0;
  pointer-events: none;
}

.lite-yt .lite-yt-play {
  position:absolute; left:50%; top:50%; transform:translate(-50%,-50%);
  padding:.9rem 1.2rem; border-radius:999px; background:#fff; box-shadow:0 8px 24px rgba(0,0,0,.2);
}

/* -------------------------------------------------------------------------- */
/* End                                                                        */
/* -------------------------------------------------------------------------- */

.lang-btn:hover{
  border-color:rgba(37,99,235,.35);
  background:#f4f7ff;
  box-shadow:0 4px 10px rgba(37,99,235,.12);
}
