/* AlteaSoft : thème sombre aux tons bleus, repris du logo.
   Aucune dépendance externe : pas de police ni de script tiers. */

:root {
  --logo: #06071f;        /* fond du logo : l'en-tête garde cette teinte */
  --nuit: #142a62;        /* fond principal */
  --profond: #25529d;     /* cartes, bandeaux */
  --moyen: #1962af;       /* boutons, liens soulignés */
  --vif: #4daae8;         /* accent, survol, titres secondaires */
  --pale: #9ccfe9;        /* détails */
  --chaud: #f2a24a;       /* orange, complémentaire du bleu : appels à l'action et touches d'accent */
  --chaud-clair: #ffbf75;
  --clair: #f2f4f5;       /* texte */
  --discret: #c6d3e6;     /* texte secondaire */
  --bord: #4272b6;
  --rayon: 10px;
  --largeur: 1080px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--nuit);
  color: var(--clair);
  font: 1.0625rem/1.65 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--vif); text-underline-offset: 3px; }
a:hover { color: var(--pale); }

:focus-visible { outline: 3px solid var(--vif); outline-offset: 3px; border-radius: 4px; }

.conteneur { width: min(var(--largeur), 100% - 2rem); margin-inline: auto; }

.lien-evitement {
  position: absolute; left: -999px; top: 0; z-index: 10;
  background: var(--vif); color: var(--nuit); padding: .6rem 1rem; font-weight: 600;
}
.lien-evitement:focus { left: 1rem; top: 1rem; }

/* En-tête */
.entete { border-bottom: 1px solid var(--bord); background: var(--logo); position: sticky; top: 0; z-index: 5; }
.entete .conteneur { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .6rem; }
.logo img { height: 52px; width: auto; }

.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.nav a { color: var(--clair); text-decoration: none; padding: .35rem 0; border-bottom: 2px solid transparent; font-weight: 500; }
.nav a:hover { color: var(--vif); }
.nav a[aria-current="page"] { border-bottom-color: var(--vif); color: var(--vif); }

/* Titres */
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); color: var(--vif); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

main { display: block; }
section { padding-block: 3rem; }
.chapeau { font-size: 1.2rem; color: var(--discret); max-width: 62ch; }

/* Bandeau d'accueil */
.hero {
  background:
    radial-gradient(900px 400px at 85% -10%, rgba(77, 170, 232, .28), transparent 60%),
    linear-gradient(180deg, var(--profond) 0%, var(--nuit) 100%);
  border-bottom: 1px solid var(--bord);
  padding-block: 4rem 3.5rem;
}
.hero .actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

/* Boutons */
.bouton {
  display: inline-block; padding: .7rem 1.3rem; border-radius: 8px; font-weight: 600;
  text-decoration: none; border: 2px solid var(--moyen); background: var(--moyen); color: #fff; cursor: pointer;
  font-size: 1rem; font-family: inherit;
}
.bouton:hover { background: var(--vif); border-color: var(--vif); color: var(--nuit); }
.bouton.secondaire { background: transparent; color: var(--clair); border-color: var(--bord); }
.bouton.secondaire:hover { border-color: var(--vif); color: var(--vif); background: transparent; }

/* Cartes */
.grille { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.carte { background: var(--profond); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 1.4rem; }
.carte h3 { color: var(--clair); }
.carte p:last-child, .carte ul:last-child { margin-bottom: 0; }
.carte ul { margin: 0; padding-left: 1.2rem; }
.carte li { margin-bottom: .45rem; }

.bandeau { background: var(--profond); border-block: 1px solid var(--bord); }

/* Pages de contenu */
.page-titre { padding-block: 3rem 1rem; background: linear-gradient(180deg, var(--profond), var(--nuit)); border-bottom: 1px solid var(--bord); }
.page-titre h1 { margin-bottom: .3em; }
.texte { max-width: 74ch; }
.texte h2 { margin-top: 2rem; }
.texte h2:first-child { margin-top: 0; }
.texte ul { padding-left: 1.2rem; }

dl.fiche { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.5rem; margin: 0 0 1rem; }
dl.fiche dt { color: var(--discret); }
dl.fiche dd { margin: 0; }

/* Formulaire */
form { display: grid; gap: 1.1rem; max-width: 40rem; }
label { font-weight: 600; display: block; margin-bottom: .35rem; }
input, textarea {
  width: 100%; padding: .7rem .8rem; border-radius: 8px; border: 1px solid var(--bord);
  background: var(--nuit); color: var(--clair); font: inherit;
}
input:focus, textarea:focus { border-color: var(--vif); outline: 2px solid var(--vif); outline-offset: 1px; }
textarea { min-height: 9rem; resize: vertical; }
.piege { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.message { padding: .9rem 1rem; border-radius: 8px; border: 1px solid var(--bord); background: var(--profond); }
.message[hidden] { display: none; }
.message.erreur { border-color: #e8a04d; }

/* Téléchargements */
table { width: 100%; border-collapse: collapse; background: var(--profond); border-radius: var(--rayon); overflow: hidden; }
th, td { text-align: left; padding: .8rem 1rem; border-bottom: 1px solid var(--bord); vertical-align: top; }
th { color: var(--pale); font-weight: 600; background: rgba(14, 40, 90, .45); }
td code { font-size: .8rem; word-break: break-all; color: var(--discret); }
.table-defilante { overflow-x: auto; }

.note { border-left: 4px solid var(--vif); padding: .2rem 0 .2rem 1rem; color: var(--discret); }

/* Pied de page */
.pied { border-top: 1px solid var(--bord); background: var(--profond); padding-block: 2rem; margin-top: 2rem; color: var(--discret); font-size: .95rem; }
.pied .conteneur { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.pied h2 { font-size: 1rem; color: var(--clair); }
.pied address { font-style: normal; }
.pied ul { list-style: none; padding: 0; margin: 0; }
.pied .copyright { grid-column: 1 / -1; border-top: 1px solid var(--bord); padding-top: 1rem; }

@media (max-width: 640px) {
  .entete .conteneur { flex-direction: column; align-items: flex-start; }
  dl.fiche { grid-template-columns: 1fr; }
  dl.fiche dt { margin-top: .6rem; }
  section { padding-block: 2rem; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Utilitaires (pas de style en ligne : la politique CSP l'interdit) */
.espace-haut { margin-top: 2rem; }
.colonnes-larges { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }

/* Sections de texte : aligner à gauche avec le reste du contenu */
.conteneur.texte { max-width: none; }
.conteneur.texte > * { max-width: 74ch; }

/* Grille à trois colonnes (cinq thèmes : 3 + 2) */
.grille.trois { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.espace-haut-petit { margin-top: 1rem; }

/* Icônes des cartes (SVG décoratifs) */
.carte .icone { width: 48px; height: 48px; margin-bottom: .8rem; }

/* Lisibilité : liens plus clairs sur les fonds de cartes, bandeaux et pied de page */
.carte a:not(.bouton), .bandeau a:not(.bouton), .pied a { color: var(--pale); }
.carte a:not(.bouton):hover, .bandeau a:not(.bouton):hover, .pied a:hover { color: #fff; }
.bandeau h2 { color: var(--pale); }

/* Bouton principal lisible sur les bandeaux plus clairs */
.bandeau .bouton:not(.secondaire) { background: #fff; border-color: #fff; color: var(--nuit); }
.bandeau .bouton:not(.secondaire):hover { background: var(--pale); border-color: var(--pale); color: var(--nuit); }

/* Touche chaude (orange, complémentaire du bleu) */
.bouton:not(.secondaire), .bandeau .bouton:not(.secondaire) { background: var(--chaud); border-color: var(--chaud); color: #10224f; }
.bouton:not(.secondaire):hover, .bandeau .bouton:not(.secondaire):hover { background: var(--chaud-clair); border-color: var(--chaud-clair); color: #10224f; }
.nav a[aria-current="page"] { border-bottom-color: var(--chaud); color: var(--clair); }
.nav a:hover { color: var(--chaud-clair); }
.note { border-left-color: var(--chaud); }
/* Ombre portée sous le bandeau de titre, pour le détacher du contenu */
.page-titre, .hero { position: relative; z-index: 1; box-shadow: 0 10px 28px rgba(3, 8, 30, .55); }

/* Ombre légère sous les cartes */
.carte { box-shadow: 0 6px 18px rgba(3, 8, 30, .4); }

/* Cartes mises en avant : bleu clair (les autres restent en bleu soutenu) */
.carte.mise-en-avant { background: #d3e4f6; border-color: #b4cfec; color: #14284f; }
.carte.mise-en-avant h3 { color: var(--nuit); }
.carte.mise-en-avant p, .carte.mise-en-avant li { color: #1f3560; }
.carte.mise-en-avant a:not(.bouton) { color: #0f4d94; }
.carte.mise-en-avant a:not(.bouton):hover { color: var(--nuit); }
