/* ==========================================================================
   Nova Onda : socle commun à toutes les pages
   --------------------------------------------------------------------------
   Contient uniquement ce qui est partagé : couleurs, polices, remise à zéro,
   pied de page et utilitaires. Chaque page ajoute ensuite sa propre feuille
   (home.css, adhesion.css, legal.css).

   Pour changer une couleur sur tout le site : modifier la variable ici,
   en version claire ET en version sombre.
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Polices, hébergées sur le site (aucun appel à Google : conforme RGPD)
   Fichiers réduits aux caractères latins, dans assets/fonts/ (licence OFL).
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Shippori Mincho";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/shippori-mincho-600.woff2") format("woff2");
}

@font-face {
  font-family: "Shippori Mincho";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/shippori-mincho-700.woff2") format("woff2");
}

@font-face {
  font-family: "Shippori Mincho";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/shippori-mincho-800.woff2") format("woff2");
}

@font-face {
  font-family: "Zen Kaku Gothic New";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/zen-kaku-gothic-new-400.woff2") format("woff2");
}

@font-face {
  font-family: "Zen Kaku Gothic New";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/zen-kaku-gothic-new-500.woff2") format("woff2");
}

@font-face {
  font-family: "Zen Kaku Gothic New";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/zen-kaku-gothic-new-700.woff2") format("woff2");
}

/* --------------------------------------------------------------------------
   1. Couleurs et polices (« design tokens »)
   Trois ambiances du Sud-Ouest : océan (bleu), dune (sable), pinède (vert).
   -------------------------------------------------------------------------- */
:root {
  /* Fonds */
  --paper: #dce8ef; /* océan pâle : fond principal */
  --pine-bg: #dfe9dd; /* pinède pâle : sections vertes */
  --wood-bg: #f0e3c8; /* sable : sections sable */
  --wash: #dce4ec; /* lavis bleu pâle */
  --card: #f8faf8; /* cartes et encadrés */

  /* Encres */
  --ink: #16243a; /* texte principal */
  --muted: #4d5867; /* texte secondaire */
  --rule: #cbd3da; /* filets et bordures fines */

  /* Couleurs d'accent */
  --indigo: #23468a; /* bleu de la vague : liens, boutons */
  --on-indigo: #f1f4f2; /* texte posé sur le bleu */
  --pine: #3d6a3f; /* vert pin */
  --wood: #7a4a2b; /* tronc de pin : cadres */
  --dune: #d8bc88; /* dune (dessin en bas des sections sable) */
  --sun: #e07a22; /* soleil : petites touches orange */
  --sun-ink: #9a4a0c; /* orange assez foncé pour du texte (contraste ≥ 4,9 sur tous les fonds clairs) */
  --plum: #6b3f8f; /* violet : galerie de vidéos Mobilité */
  --error: #b3261e; /* messages d'erreur */

  /* Motif de vagues japonaises (seigaiha) */
  --seigaiha: url("../img/textures/seigaiha.svg");

  /* Polices */
  --display:
    "Shippori Mincho", "Hiragino Mincho ProN", "Times New Roman", serif;
  --body:
    "Zen Kaku Gothic New", "Hiragino Sans", system-ui, -apple-system,
    "Segoe UI", sans-serif;
}

/* Mode sombre : appliqué automatiquement selon le réglage du téléphone/PC */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #0c1828;
    --pine-bg: #0e1f1a;
    --wood-bg: #1c1712;
    --wash: #1b2a47;
    --card: #13233a;
    --ink: #e6ecef;
    --muted: #9aa8ba;
    --rule: #2a3a55;
    --indigo: #8fb0ec;
    --on-indigo: #0c1828;
    --pine: #86b887;
    --wood: #c79468;
    --dune: #6e5636;
    --sun: #f0964a;
    --sun-ink: #f0a060;
    --plum: #c4a0e0;
    --error: #f28b82; /* rouge éclairci : lisible sur les cartes bleu nuit */
    --seigaiha: url("../img/textures/seigaiha-sombre.svg");
  }
}

/* --------------------------------------------------------------------------
   2. Remise à zéro minimale
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.15;
}

/* --------------------------------------------------------------------------
   3. Pied de page (identique sur toutes les pages)
   -------------------------------------------------------------------------- */
footer {
  background: var(--indigo);
  color: var(--on-indigo);
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 28px;
  font-size: 0.88rem;
}

footer a {
  display: inline-block;
  padding-block: 3px; /* zone cliquable d'au moins 24 px */
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  opacity: 0.8;
}

footer a:hover {
  opacity: 1;
}

footer .motto {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.06em;
}

footer .footer-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-left: 18px;
}

@media (max-width: 640px) {
  footer .footer-links {
    display: flex;
    margin: 10px 0 0;
  }
}

/* --------------------------------------------------------------------------
   4. Utilitaires
   -------------------------------------------------------------------------- */

/* Un élément marqué « hidden » reste toujours caché, quel que soit son style */
[hidden] {
  display: none !important;
}

/* Texte lu par les lecteurs d'écran mais invisible à l'écran */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Champ piège anti-robots des formulaires (ne jamais afficher) */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.nowrap {
  white-space: nowrap;
}

/* Respecte le réglage « réduire les animations » du visiteur */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
