/* ==========================================================================
   AZIMUT PARTNERS — socle.css
   Socle graphique commun à toutes les pages du site.

   Sommaire
     1. Polices (hébergées sur le serveur, aucun appel externe)
     2. Variables : couleurs, typographie, espacements, rayons, ombres
     3. Remise à zéro
     4. Typographie de base
     5. Mise en page (conteneur)
     6. Boutons et liens fléchés
     7. Icônes
     8. Accessibilité (focus, lien d'évitement, texte masqué)
     9. Animations d'entrée et d'apparition
    10. Message d'information temporaire

   Les couleurs sont relevées sur la maquette validée « charte site web ».
   Pour modifier une couleur sur tout le site, changez sa variable en 2.
   ========================================================================== */


/* 1. POLICES ------------------------------------------------------------- */
/* Inter (licence libre SIL OFL). « Inter Display » sert aux titres. */

@font-face {
  font-family: "Inter";
  src: url("../polices/inter-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../polices/inter-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../polices/inter-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../polices/inter-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter Display";
  src: url("../polices/inter-display-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter Display";
  src: url("../polices/inter-display-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}


/* 2. VARIABLES ----------------------------------------------------------- */

:root {
  /* Couleurs de texte */
  --marine: #082448;            /* titres */
  --encre: #14244a;             /* texte courant */
  --encre-douce: #46557a;       /* texte secondaire */

  /* Turquoise : couleur d'action de l'univers institutionnel */
  --turquoise: #018386;         /* boutons, titres d'accent */
  --turquoise-fonce: #036166;   /* bas du dégradé des boutons, texte sur fond pâle */
  --turquoise-vif: #05a399;     /* soulignements, flèches */
  --turquoise-icone: #069593;   /* pictogrammes */
  --turquoise-pale: #e9f6f6;    /* pastilles d'icônes */
  --turquoise-brume: #d9f1f0;   /* pilule « gratuit » */

  /* Accent lumineux, réservé aux fonds sombres */
  --cyan: #40f4f8;

  /* Fonds et filets */
  --blanc: #ffffff;
  --fond-doux: #f5f8fb;
  --filet: #e3eaf1;

  /* Typographie */
  --police-texte: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --police-titre: "Inter Display", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Mise en page */
  --largeur-max: 1440px;                       /* largeur maximale du contenu */
  --marge-page: clamp(20px, 3.6vw, 56px);      /* marge latérale du contenu */
  --espace-section: clamp(56px, 7vw, 112px);   /* respiration entre deux sections */

  /* Rayons */
  --rayon-s: 10px;
  --rayon-m: 14px;
  --rayon-l: 20px;
  --rayon-xl: 28px;

  /* Ombres */
  --ombre-douce: 0 10px 24px -10px rgba(8, 36, 72, 0.18);
  --ombre-panneau: 0 30px 60px -44px rgba(8, 36, 72, 0.35);

  /* Mouvement */
  --courbe: cubic-bezier(0.2, 0.7, 0.2, 1);
}


/* 3. REMISE À ZÉRO ------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--blanc);
  color: var(--encre);
  font-family: var(--police-texte);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

img,
picture {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
}

button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

/* Bloque le défilement de la page quand le menu mobile est ouvert */
.defilement-bloque {
  overflow: hidden;
}


/* 4. TYPOGRAPHIE DE BASE ------------------------------------------------- */

h1,
h2,
h3,
h4 {
  color: var(--marine);
  font-family: var(--police-titre);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

strong {
  font-weight: 600;
}


/* 5. MISE EN PAGE -------------------------------------------------------- */

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


/* 6. BOUTONS ------------------------------------------------------------- */
/* .bouton            base commune
   .bouton--plein     action principale (dégradé turquoise)
   .bouton--contour   action secondaire (fond blanc, contour turquoise)
   .bouton--clair     sur fond sombre (contour blanc)
   .bouton--compact   petit format (en-tête)
   .bouton--large     occupe toute la largeur disponible */

.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 56px;
  padding: 0.75rem 1.5rem;
  border: 2px solid transparent;
  border-radius: 12px;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.005em;
  text-align: left;
  text-decoration: none;
  transition: transform 0.25s var(--courbe), box-shadow 0.25s var(--courbe), background-color 0.25s, border-color 0.25s;
}

.bouton:hover {
  transform: translateY(-2px);
}

.bouton:active {
  transform: translateY(0);
}

.bouton__fleche {
  transition: transform 0.25s var(--courbe);
}

.bouton:hover .bouton__fleche {
  transform: translateX(4px);
}

.bouton--plein {
  background: linear-gradient(180deg, #018386 0%, #036166 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 14px 26px -14px rgba(3, 97, 102, 0.7);
  color: var(--blanc);
}

.bouton--plein:hover {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 20px 32px -14px rgba(3, 97, 102, 0.75);
}

.bouton--contour {
  border-color: #1c9a9b;
  background: var(--blanc);
  box-shadow: 0 10px 22px -16px rgba(8, 36, 72, 0.35);
  color: var(--marine);
}

.bouton--contour:hover {
  border-color: var(--turquoise);
  background: #f6fcfc;
}

.bouton--contour .icone {
  color: var(--turquoise);
}

.bouton--clair {
  border-width: 1.5px;
  border-color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.04);
  color: var(--blanc);
  font-weight: 500;
}

.bouton--clair:hover {
  border-color: var(--cyan);
  background: rgba(64, 244, 248, 0.1);
  box-shadow: 0 0 0 4px rgba(64, 244, 248, 0.1);
}

.bouton--compact {
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border-radius: var(--rayon-s);
  font-size: 0.9375rem;
  white-space: nowrap;
}

.bouton--large {
  width: 100%;
}

/* Lien de texte suivi d'une flèche */
.lien-fleche {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: #046a6e;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
}

.lien-fleche .icone {
  transition: transform 0.25s var(--courbe);
}

.lien-fleche:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.lien-fleche:hover .icone {
  transform: translateX(4px);
}


/* 7. ICÔNES -------------------------------------------------------------- */
/* Les pictogrammes sont définis une fois en haut de chaque page (bloc
   « BIBLIOTHÈQUE D'ICÔNES ») et appelés par <svg class="icone"><use href="#i-nom">. */

.icone {
  flex: none;
  width: 1.5em;
  height: 1.5em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icone--petite {
  width: 1.25em;
  height: 1.25em;
}

.icone--grande {
  width: 1.75em;
  height: 1.75em;
}


/* 8. ACCESSIBILITÉ ------------------------------------------------------- */

:focus-visible {
  outline: 3px solid var(--marine);
  outline-offset: 3px;
}

.sur-sombre :focus-visible {
  outline-color: var(--cyan);
}

/* Groupe de mots à ne jamais couper en fin de ligne (ex. « Soumettez-nous ») */
.insecable {
  white-space: nowrap;
}

/* Texte réservé aux lecteurs d'écran */
.visuellement-masque {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Lien « Aller au contenu », visible uniquement au clavier */
.lien-evitement {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 0.75rem 1rem;
  border-radius: var(--rayon-s);
  background: var(--marine);
  color: var(--blanc);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}

.lien-evitement:focus {
  transform: none;
}


/* 9. ANIMATIONS D'ENTRÉE ET D'APPARITION --------------------------------- */
/* .entree            animation jouée au chargement (sans JavaScript)
   [data-apparition]  apparition au défilement, déclenchée par site.js
   --delai            décalage facultatif, ex. style="--delai: 0.15s" */

@keyframes entree {
  from {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fondu {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.entree {
  animation: entree 0.9s var(--courbe) both;
  animation-delay: var(--delai, 0s);
}

.js [data-apparition] {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition: opacity 0.8s var(--courbe) var(--delai, 0s), transform 0.8s var(--courbe) var(--delai, 0s);
}

.js [data-apparition].est-visible {
  opacity: 1;
  transform: none;
}

/* Visiteurs ayant demandé la réduction des animations */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }

  .js [data-apparition] {
    opacity: 1;
    transform: none;
  }
}


/* 10. MESSAGE D'INFORMATION ------------------------------------------------- */
/* Court message en bas de l'écran, créé par assets/js/espace-demonstration.js
   (annonces de l'Espace Démonstration). */

.annonce {
  position: fixed;
  left: 50%;
  bottom: clamp(16px, 4vw, 32px);
  z-index: 300;
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 0.85rem 1.25rem;
  border-radius: var(--rayon-m);
  background: var(--marine);
  box-shadow: 0 20px 40px -16px rgba(8, 36, 72, 0.6);
  color: var(--blanc);
  font-size: 0.9375rem;
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity 0.3s, transform 0.3s var(--courbe);
  pointer-events: none;
}

.annonce.est-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}


/* LIENS CONTEXTUELS ------------------------------------------------------- */
/* Phrases de maillage interne (cahier des charges SEO) : texte courant, liens soulignés, jamais signalés par la couleur seule. */
.liens-contexte {
  max-width: 52rem;
  margin: 22px auto 0;
  color: var(--encre-douce);
  font-size: 1rem;
  line-height: 1.7;
  text-align: center;
  text-wrap: pretty;
}

.fiche-suite .liens-contexte {
  margin: 0;
  font-size: 1rem;
}

.liens-contexte--gauche {
  margin-left: 0;
  text-align: left;
}

.lien-contexte {
  padding-block: 13px;   /* agrandit la zone tactile (44 px) sans déplacer le texte, comme .lien-texte */
  color: var(--turquoise-fonce);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.lien-contexte:hover {
  color: var(--marine);
}
