/* GeoGab — référentiel partagé par la carte, les pages légales, la console et
   le portail. Passe du 10 novembre 2026 : langage visuel iOS (typographie du
   système, gris neutres, matériaux translucides, thème sombre sur option). */
:root {
  /* Marque */
  --gg-brand: #173f35;
  --gg-brand-hover: #0e3028;
  --gg-accent: #176b56;
  --gg-tint: #0b7558;
  --gg-tint-soft: #e6f2ee;
  --gg-on-tint: #ffffff;
  --gg-terracotta: #c46a43;
  --gg-sand: #e5c18d;

  /* Texte et surfaces */
  --gg-ink: #1d1d1f;
  --gg-muted: #636366;
  --gg-faint: #aeaeb2;
  --gg-canvas: #f2f2f7;
  --gg-paper: #ffffff;
  --gg-border: #e3e3e8;
  --gg-control-border: #86868b;
  --gg-separator: #3c3c4329;
  --gg-fill: #7676801f;
  --gg-fill-strong: #76768033;
  --gg-soft: #edf4ef;

  /* États */
  --gg-danger: #d70015;
  --gg-danger-soft: #fdecec;
  --gg-success: #225c42;
  --gg-focus: #0071e3;

  /* Matériaux translucides (cartes flottantes, barres, menus) */
  --gg-material: #ffffffc7;
  --gg-material-thick: #fafafce6;
  --gg-material-border: #ffffff99;
  --gg-material-filter: saturate(180%) blur(22px);
  --gg-scrim: #00000059;

  /* Typographie : San Francisco sur les appareils Apple, Inter ailleurs. */
  --gg-font:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  --gg-editorial: var(--gg-font);
  --gg-mono:
    ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  /* Formes, espacements, profondeur, mouvement */
  --gg-radius-sm: 10px;
  --gg-radius-md: 14px;
  --gg-radius-lg: 20px;
  --gg-radius-xl: 28px;
  --gg-space-1: 4px;
  --gg-space-2: 8px;
  --gg-space-3: 12px;
  --gg-space-4: 16px;
  --gg-space-5: 20px;
  --gg-space-6: 24px;
  --gg-space-7: 32px;
  --gg-space-8: 40px;
  --gg-shadow: 0 1px 2px #0000000a, 0 4px 14px #00000014;
  --gg-shadow-raised: 0 2px 6px #0000000f, 0 14px 44px #00000029;
  --gg-motion: 180ms;
  --gg-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --gg-ease-sheet: cubic-bezier(0.32, 0.72, 0, 1);
}

/* Thème sombre : uniquement pour les pages qui l’activent avec la classe
   gg-adaptive sur <html> (carte publique et pages légales). */
:root.gg-adaptive {
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root.gg-adaptive {
    --gg-brand: #a8e6cc;
    --gg-brand-hover: #c3f0dd;
    --gg-accent: #5fd6a9;
    --gg-tint: #5fd6a9;
    --gg-tint-soft: #5fd6a926;
    --gg-ink: #f5f5f7;
    --gg-muted: #a1a1a6;
    --gg-faint: #636366;
    --gg-canvas: #000000;
    --gg-paper: #1c1c1e;
    --gg-border: #38383a;
    --gg-control-border: #8e8e93;
    --gg-separator: #54545899;
    --gg-fill: #7676803d;
    --gg-fill-strong: #76768052;
    --gg-soft: #5fd6a91f;
    --gg-danger: #ff6961;
    --gg-danger-soft: #ff453a2e;
    --gg-success: #5fd6a9;
    --gg-focus: #4da3ff;
    --gg-material: #1e1e20c7;
    --gg-material-thick: #252527eb;
    --gg-material-border: #ffffff1f;
    --gg-scrim: #00000080;
    --gg-shadow: 0 1px 2px #0000003d, 0 4px 14px #00000052;
    --gg-shadow-raised: 0 2px 6px #00000052, 0 14px 44px #00000080;
  }
}

@media (prefers-contrast: more) {
  :root {
    --gg-muted: #3a3a3c;
    --gg-border: #636366;
    --gg-control-border: #1d1d1f;
    --gg-separator: #3c3c4399;
  }
}
@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root.gg-adaptive {
    --gg-muted: #d1d1d6;
    --gg-border: #aeaeb2;
    --gg-control-border: #f5f5f7;
    --gg-separator: #ebebf599;
  }
}
