/* =========================================================
   Smashub — design tokens repris du design system Stitch
   "Vitesse & Précision" (thème clair, logo bleu marine plein)
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
  /* Couleurs */
  --color-bg: #f4f7f9;
  --color-surface: #ffffff;
  --color-surface-alt: #eeeef0;
  --color-surface-high: #e8e8ea;
  --color-primary: #002b5b;
  --color-primary-deep: #001736;
  --color-on-primary: #ffffff;
  --color-lime: #c5ff41;
  --color-lime-strong: #b9f234;
  --color-on-lime: #263c00;
  --color-ink: #1a1c1e;
  --color-ink-soft: #43474f;
  --color-outline: #747780;
  --color-outline-variant: #c4c6d0;
  --color-error: #ba1a1a;

  /* Ombres — teinte marine très diffuse, comme documenté dans le design system */
  --shadow-card: 0 4px 12px rgba(0, 43, 91, 0.06);
  --shadow-lifted: 0 12px 32px rgba(0, 43, 91, 0.14);
  --shadow-glass: 0 8px 32px rgba(0, 23, 54, 0.16);

  /* Rayons */
  --radius-sm: 0.25rem;
  --radius: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  /* Espacements — grille 8pt */
  --space-base: 4px;
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 64px;
  --margin-mobile: 16px;
  --margin-desktop: 32px;

  /* Typo */
  --font-display: "Hanken Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-primary);
  margin: 0 0 var(--space-xs);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 { font-size: 40px; font-weight: 800; }
h2 { font-size: 30px; font-weight: 700; }
h3 { font-size: 20px; font-weight: 600; }
p  { margin: 0 0 var(--space-sm); color: var(--color-ink-soft); }

.eyebrow {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-ink-soft);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--margin-mobile);
}

section {
  padding: var(--space-xl) 0;
}

@media (min-width: 1024px) {
  .container { padding: 0 var(--margin-desktop); }
  h1 { font-size: 56px; }
  h2 { font-size: 36px; }
}

/* =========================================================
   Page "en construction"
   ========================================================= */

html:has(body.construction-page),
body.construction-page {
  height: 100%;
}

body.construction-page {
  display: flex;
  flex-direction: column;
}

.construction {
  position: relative;
  overflow: hidden;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-xl) var(--margin-mobile);
  background: var(--color-primary-deep);
}

.construction .bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Voile de contraste pour que le panneau en verre reste lisible quelle que soit la vidéo */
.construction::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 23, 54, 0.45), rgba(0, 23, 54, 0.6));
  z-index: 1;
}

.construction .container {
  position: relative;
  z-index: 2;
  max-width: 560px;
}

/* Panneau "Liquid Glass" façon Apple : verre dépoli, reflet, bordure translucide */
.glass-panel {
  position: relative;
  padding: var(--space-lg) var(--space-md);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-lifted);
  isolation: isolate;
}

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .glass-panel {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(30px) saturate(100%) brightness(1.1);
    -webkit-backdrop-filter: blur(30px) saturate(100%) brightness(1.1);
  }
}

.glass-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 45%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}

.construction-logo {
  height: 64px;
  margin: 0 auto var(--space-md);
}

.construction .eyebrow {
  display: block;
  margin-bottom: var(--space-sm);
}

.construction h1 {
  font-size: 20px;
  margin-bottom: var(--space-sm);
}

@media (min-width: 1024px) {
  .construction h1 { font-size: 28px; }
}

.construction a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  .construction .bg-video { display: none; }
}

/* =========================================================
   Header
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--margin-mobile);
  background: rgba(244, 247, 249, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .site-header {
    background: rgba(244, 247, 249, 0.55);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
  }
}

.site-header.is-scrolled {
  box-shadow: var(--shadow-card);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.brand img {
  height: 26px;
  width: auto;
}

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
  background: var(--color-primary-deep);
  color: rgba(255, 255, 255, 0.75);
  padding: var(--space-xl) 0 var(--space-md);
}

.site-footer a { color: rgba(255, 255, 255, 0.75); text-decoration: none; }
.site-footer a:hover { color: #fff; }

.footer-grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: 1fr;
  padding-bottom: var(--space-md);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: var(--space-sm);
}

@media (min-width: 700px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

.footer-grid nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

/* Footer simplifié (page en construction) : logo + liens légaux sur une ligne */
.footer-grid.footer-simple {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.footer-simple nav {
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: space-between;
  font-size: 13px;
}

/* =========================================================
   Pages légales (CGU / confidentialité)
   ========================================================= */

.legal-doc h2 {
  margin-top: var(--space-lg);
  font-size: 22px;
}

.legal-doc h3 {
  margin-top: var(--space-md);
  font-size: 17px;
}

.legal-doc p, .legal-doc li {
  color: var(--color-ink-soft);
}

.legal-doc ul {
  padding-left: 1.2em;
}

.legal-doc .updated {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--color-ink-soft);
  margin-bottom: var(--space-md);
}

/* Réduit les effets pour les utilisateurs qui le demandent */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .site-header { transition: none; }
}
