/* RÉGLAGES DU SITE — c'est ici que l'on change les couleurs, les polices et les arrondis.
   Les textes sont dans index.html. Les animations ne se règlent pas ici (voir GALON.md).

   Ce modèle a QUATRE ambiances, du matin à la nuit. Le moteur pose data-theme sur <html> selon la section
   à l'écran (attribut data-gm-theme dans index.html) ; chaque ambiance redéfinit les mêmes variables. */

@font-face { font-family: "Newsreader"; src: url("polices/newsreader.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("polices/newsreader-italic.woff2") format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Outfit"; src: url("polices/outfit.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

/* Les couleurs sont déclarées comme telles pour que le passage d'une ambiance à l'autre soit un fondu, pas un saut. */
@property --fond { syntax: "<color>"; inherits: true; initial-value: #f6ecd9; }
@property --fond-2 { syntax: "<color>"; inherits: true; initial-value: #fffaf0; }
@property --texte { syntax: "<color>"; inherits: true; initial-value: #1d2b36; }
@property --texte-doux { syntax: "<color>"; inherits: true; initial-value: #51606a; }
@property --accent { syntax: "<color>"; inherits: true; initial-value: #0f6b6b; }
@property --accent-2 { syntax: "<color>"; inherits: true; initial-value: #e8a13a; }
@property --trait { syntax: "<color>"; inherits: true; initial-value: rgba(29, 43, 54, .16); }
@property --astre { syntax: "<color>"; inherits: true; initial-value: #ffe1a0; }

/* LE MATIN (ambiance de départ, et celle du site sans JavaScript) : sable clair */
:root {
  --fond: #f6ecd9;          /* fond principal */
  --fond-2: #fffaf0;        /* fond des cartes */
  --texte: #1d2b36;         /* texte principal */
  --texte-doux: #51606a;    /* texte secondaire */
  --accent: #0f6b6b;        /* couleur de la marque : le vert du lagon */
  --accent-2: #e8a13a;      /* seconde couleur : le soleil */
  --trait: rgba(29, 43, 54, .16);
  --astre: #ffe1a0;         /* couleur du soleil dessiné */

  /* Polices */
  --police-titre: "Newsreader", Georgia, "Times New Roman", serif;
  --police-texte: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Formes */
  --rayon: 22px;
  --largeur: 1240px;
  --marge: clamp(1.1rem, 4vw, 3rem);

  /* Durée du fondu entre deux ambiances */
  --fondu: 1.6s;
}

/* MIDI : lagon clair */
html[data-theme="midi"] {
  --fond: #e4f2ee;
  --fond-2: #f8fcfa;
  --texte: #12303a;
  --texte-doux: #456069;
  --accent: #0b6670;
  --accent-2: #f0b545;
  --trait: rgba(18, 48, 58, .16);
  --astre: #fff3c4;
}

/* LE COUCHANT : ambre */
html[data-theme="couchant"] {
  --fond: #efb489;
  --fond-2: #f8d0b0;
  --texte: #2a1730;
  --texte-doux: #532f40;
  --accent: #7f1f10;
  --accent-2: #ffe0a8;
  --trait: rgba(42, 23, 48, .2);
  --astre: #ff7d3c;
}

/* LA NUIT : bleu nuit. La section « Le soir » porte toujours ces couleurs, même sans JavaScript. */
html[data-theme="nuit"], .soir {
  --fond: #0d1830;
  --fond-2: #16233f;
  --texte: #eef0f5;
  --texte-doux: #a9b4cc;
  --accent: #f2c66d;
  --accent-2: #8fd3d1;
  --trait: rgba(238, 240, 245, .16);
  --astre: #f2c66d;
}

html { transition: --fond var(--fondu) ease, --fond-2 var(--fondu) ease, --texte var(--fondu) ease, --texte-doux var(--fondu) ease, --accent var(--fondu) ease, --accent-2 var(--fondu) ease, --trait var(--fondu) ease, --astre var(--fondu) ease; }
@media (prefers-reduced-motion: reduce) { html { transition: none; } }
