/* Polices système uniquement : aucune police externe chargée (pas de transfert d'adresse IP vers un tiers).
   Toutes les combinaisons de couleurs respectent un contraste minimal de 4,5:1 (WCAG 2.1 AA / RGAA). */
:root {
  --encre: #1f2a37;
  --doux: #4b5563;
  --fond: #fffaf2;
  --carte: #ffffff;
  --nuit: #16324f;        /* en-tête et pied de page */
  --nuit-texte: #cfe3f5;
  --sarcelle: #0f766e;    /* couleur principale : boutons, liens */
  --sarcelle-fonce: #0f5e63;
  --terre: #b4532a;
  --soleil: #fcd34d;      /* détails décoratifs et focus sur fond sombre */
  --ligne: #ece4d6;
  --rayon: 12px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--encre);
  background: var(--fond);
  line-height: 1.6;
}
a { color: var(--sarcelle); }
.conteneur { max-width: 1000px; margin: 0 auto; padding: 0 1.25rem; }

/* En-tête */
header.site { background: var(--nuit); }
header.site .conteneur { display: flex; justify-content: space-between; align-items: center; padding-top: 1rem; padding-bottom: 1rem; flex-wrap: wrap; gap: .5rem; }
.marque { font-weight: 700; text-decoration: none; color: #fff; display: flex; align-items: center; gap: .6rem; }
.marque::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--soleil); box-shadow: 16px 0 0 #5eead4; margin-right: 16px; }
nav a { margin-left: 1.25rem; text-decoration: none; color: var(--nuit-texte); font-size: .95rem; }
nav a:hover { color: #fff; text-decoration: underline; }

/* Bandeau d'introduction */
.intro {
  position: relative; overflow: hidden;
  margin: 2rem 0 1rem; padding: 3rem 2.25rem;
  border-radius: var(--rayon);
  background: linear-gradient(135deg, var(--sarcelle-fonce) 0%, var(--nuit) 100%);
  color: #fff;
}
.intro::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(252,211,77,.35), rgba(252,211,77,0) 70%);
}
.intro h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.2; margin: 0 0 .75rem; max-width: 720px; }
.intro p { color: #d7f0ee; max-width: 620px; font-size: 1.1rem; margin: 0; }

/* Titres de section avec barre colorée */
h2 { font-size: 1.35rem; margin: 2.5rem 0 1rem; }
main > section > h2::after { content: ""; display: block; width: 48px; height: 4px; border-radius: 2px; margin-top: .35rem; background: linear-gradient(90deg, var(--sarcelle), var(--soleil)); }

/* Cartes de modules : une couleur par carte, en alternance */
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.module {
  --c: #0f766e; --c-clair: #e0f2f1;
  background: var(--carte); border: 1px solid var(--ligne); border-top: 6px solid var(--c);
  border-radius: var(--rayon); padding: 1.25rem; display: flex; flex-direction: column;
  box-shadow: 0 2px 6px rgba(22, 50, 79, .06);
}
.module:nth-child(4n+2) { --c: #b4532a; --c-clair: #fbe9df; }
.module:nth-child(4n+3) { --c: #6d28d9; --c-clair: #ede9fe; }
.module:nth-child(4n+4) { --c: #a16207; --c-clair: #fef3c7; }
.module h3 { margin: .35rem 0 .5rem; font-size: 1.1rem; }
.module .meta { font-size: .85rem; color: var(--doux); margin-bottom: .75rem; }
.module p { margin: 0 0 1rem; flex: 1; }
.etiquette { display: inline-block; font-size: .75rem; font-weight: 700; padding: .15rem .6rem; border-radius: 99px; background: var(--c-clair, #e0f2f1); color: #0f766e; }
.module:nth-child(4n+2) .etiquette { color: #8a3a18; }
.module:nth-child(4n+3) .etiquette { color: #5b21b6; }
.module:nth-child(4n+4) .etiquette { color: #854d0e; }
.module .etiquette.en-cours { background: #eceae5; color: #3f4754; }

.bouton { display: inline-block; background: var(--sarcelle); color: #fff; text-decoration: none; padding: .6rem 1.1rem; border-radius: 8px; border: 0; font: inherit; font-weight: 600; cursor: pointer; text-align: center; }
.bouton:hover { background: var(--sarcelle-fonce); }
.bouton.inactif { background: #e4e0d8; color: #3f4754; cursor: default; font-weight: 500; }

.vide { background: var(--carte); border: 2px dashed #b7d9d5; border-radius: var(--rayon); padding: 2rem; text-align: center; color: var(--doux); }

/* Contenu tiers chargé uniquement au clic */
.consentement { background: #f4faf9; border: 1px solid #cde7e3; border-radius: 8px; padding: 1rem; font-size: .9rem; color: var(--doux); }
.consentement .bouton { margin-top: .75rem; }
.media { position: relative; width: 100%; aspect-ratio: 16 / 9; }
.media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 6px; }

/* Pages de texte (mentions, confidentialité) */
.texte { max-width: 720px; padding: 2.5rem 0 3rem; }
.texte h1 { line-height: 1.2; color: var(--nuit); }
.texte h2 { color: var(--sarcelle-fonce); }
.a-completer { background: #fff3c4; padding: 0 .25rem; border-radius: 3px; }

/* Pied de page */
footer.site { background: var(--nuit); margin-top: 4rem; padding: 1.75rem 0; font-size: .85rem; color: #e5edf5; }
footer.site a { color: #e5edf5; margin-right: 1rem; }
footer.site a:hover { color: #fff; }

/* Accessibilité */
.evitement { position: absolute; left: -9999px; top: 0; background: var(--soleil); color: var(--nuit); font-weight: 700; padding: .75rem 1rem; z-index: 10; }
.evitement:focus { left: 1rem; top: 1rem; }
a:focus-visible, button:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }
header.site a:focus-visible, footer.site a:focus-visible, .intro a:focus-visible { outline-color: var(--soleil); }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
