/* Association du Digital — feuille de style du site */

/* Polices hébergées sur le site (aucun appel à un service tiers) */
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --cobalt: #2B3FE0;
  --cobalt-dark: #2030BC;
  --sun: #FFC533;
  --ink: #14143A;
  --slate: #4A4F73;
  --paper: #F3F4FB;
  --line: #D5D9F2;
  --on-band: #E3E6FB;
  --on-ink: #C9CEF0;
  --display: "Space Grotesk", system-ui, sans-serif;
  --text: Inter, system-ui, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--text);
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
  background: #fff;
}
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 700; }
h2 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.02em; line-height: 1.1; }
h3 { font-size: 24px; letter-spacing: -0.3px; line-height: 1.2; }
p, ul, dl, dd { margin: 0; }
img, svg { max-width: 100%; }

a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--sun);
  text-decoration-thickness: 3px;
  text-underline-offset: 5px;
  transition: color .2s, text-underline-offset .2s;
}
a:hover { color: var(--cobalt); text-decoration-color: var(--cobalt); text-underline-offset: 8px; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; border-radius: 4px; }
.band :focus-visible, .footer :focus-visible { outline-color: var(--sun); }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 10; padding: 10px 16px; background: #fff; border-radius: 8px; }
.skip:focus { left: 8px; }

.wrap { max-width: 1208px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.muted { color: var(--slate); }
.lead { font-size: 20px; }

/* ---------- Bandeau cobalt texturé ---------- */
.band {
  position: relative;
  overflow: hidden;
  color: #fff;
  background-color: var(--cobalt);
  background-image: radial-gradient(rgba(255, 255, 255, .16) 1.5px, transparent 1.6px);
  background-size: 26px 26px;
}
.band > * { position: relative; }
/* Les points s'allument en jaune autour de la souris (--mx / --my posés par site.js) */
.band::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(var(--sun) 2.4px, transparent 2.6px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(circle 190px at var(--mx, -999px) var(--my, -999px), #000, transparent);
  mask-image: radial-gradient(circle 190px at var(--mx, -999px) var(--my, -999px), #000, transparent);
}

/* ---------- En-tête ---------- */
.site-header {
  min-height: 78px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: #fff;
  font-family: var(--display);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.4px;
  text-decoration: none;
}
.brand:hover { color: #fff; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px; padding: 8px 0; font-size: 17px; }
.nav a:not(.btn) { color: #fff; font-weight: 500; text-decoration: none; padding: 10px 0; }
.nav a:not(.btn) > span { padding-bottom: 4px; border-bottom: 3px solid transparent; }
.nav a[aria-current="page"]:not(.btn) > span { border-bottom-color: var(--sun); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 28px;
  border: 2px solid transparent;
  border-radius: 12px;
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  perspective: 400px;
}
.btn--sun, .btn--sun:hover { background: var(--sun); color: var(--ink); }
.btn--cobalt, .btn--cobalt:hover { background: var(--cobalt); color: #fff; }
.btn--ghost, .btn--ghost:hover { background: none; border-color: currentColor; color: var(--ink); }
/* Sur le bandeau, le bouton à contour a un fond plein : la trame de points ne passe pas derrière son texte */
.band .btn--ghost, .band .btn--ghost:hover { color: #fff; background: var(--cobalt); }
.btn--small { min-height: 44px; padding: 0 20px; border-radius: 10px; font-size: 17px; }

/* Effet « panneau » : le texte bascule sur lui-même au survol */
.flip { perspective: 400px; }
.flip > span { display: inline-block; }
.flip:hover > span { animation: flip .5s; }
@keyframes flip {
  0% { transform: rotateX(0); }
  50% { transform: rotateX(90deg); }
  51% { transform: rotateX(-90deg); }
  100% { transform: rotateX(0); }
}

/* ---------- Haut de page ---------- */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; padding-top: 40px; padding-bottom: 88px; }
.hero__text { flex: 999 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hero h1 { font-size: clamp(40px, 6vw, 72px); letter-spacing: -0.03em; line-height: 1.02; }
.hero h1 em { font-style: normal; color: var(--sun); }
.hero__lead { font-size: 21px; color: var(--on-band); max-width: 620px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; padding-top: 8px; }
.hero__art { flex: 1 1 300px; display: flex; justify-content: center; }
.hero--page { justify-content: space-between; gap: 32px 48px; padding-bottom: 64px; }
.hero--page .hero__text { gap: 16px; }
.hero--page h1 { font-size: clamp(38px, 5.5vw, 60px); line-height: 1.04; }

.mosaic { width: 100%; max-width: 440px; height: auto; }
.mosaic--strip { flex: 0 1 280px; width: 280px; }
.mosaic > * {
  transform-box: fill-box;
  transform-origin: center;
  animation: pop .5s backwards;
  transition: transform .4s;
}
.mosaic > *:nth-child(3n) { animation-delay: .15s; }
.mosaic > *:nth-child(3n+1) { animation-delay: .3s; }
.mosaic > *:nth-child(4n) { animation-delay: .45s; }
.mosaic > *:hover { transform: rotate(90deg) scale(.9) !important; }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }

/* ---------- Sections ---------- */
.section { padding-top: 72px; padding-bottom: 72px; }
.section--paper { background: var(--paper); }
.stack { display: flex; flex-direction: column; gap: 32px; }
.stack--tight { gap: 8px; }

.split { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 40px 64px; }
.split__aside { flex: 1 1 320px; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.split__main { flex: 2 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }

/* Cartes */
.cards { display: flex; flex-wrap: wrap; gap: 24px; }
.card {
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 32px;
  border-radius: 20px;
  background: var(--paper);
  transition: transform .25s, box-shadow .25s;
}
.section--paper .card { background: #fff; }
.card:hover { transform: translate(-4px, -4px); box-shadow: 8px 8px 0 var(--sun); }
.card--soon, .section--paper .card--soon { background: none; border: 2px dashed #B9BFE8; }
.card--soon:hover { transform: none; box-shadow: none; }
.card__grow { flex-grow: 1; }
.card__logo { height: 46px; width: auto; }
.card__num {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--cobalt);
  color: #fff;
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
}

/* Liste en trois points : carré cobalt, rond jaune, carré encre */
.points { list-style: none; padding: 0; }
.points li { display: flex; gap: 20px; padding: 22px 0; border-top: 1px solid var(--line); }
.points li:last-child { border-bottom: 1px solid var(--line); }
.points li::before {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 8px;
  border-radius: 4px;
  background: var(--cobalt);
}
.points li:nth-child(3n+2)::before { border-radius: 50%; background: var(--sun); }
.points li:nth-child(3n)::before { background: var(--ink); }
.points strong { display: block; }
.points span { color: var(--slate); }

.pill { padding: 8px 16px; border-radius: 999px; background: #FFF1C7; color: #5C4300; font-weight: 600; }

.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px 48px; padding-top: 72px; padding-bottom: 72px; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.details { display: flex; flex-direction: column; gap: 8px; }
.details div { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.details dt { flex: 0 0 110px; color: var(--slate); }
.details dd { font-weight: 600; }

/* Pages de texte : statuts, mentions légales */
.prose { max-width: 808px; padding-top: 64px; padding-bottom: 80px; display: flex; flex-direction: column; gap: 40px; }
.prose section { display: flex; flex-direction: column; gap: 12px; }
.prose h2 { font-size: 24px; letter-spacing: -0.3px; line-height: 1.2; }
.prose ul { padding-left: 24px; display: flex; flex-direction: column; gap: 8px; }
.prose__end { padding-top: 24px; border-top: 1px solid var(--line); }

/* ---------- Formulaire de contact ---------- */
.form-wrap { max-width: 768px; }
.form { display: flex; flex-direction: column; gap: 20px; }
.form__row { display: flex; flex-wrap: wrap; gap: 20px; }
.field { flex: 1 1 240px; display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 17px; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 54px;
  padding: 12px 16px;
  border: 2px solid #8A90B8;
  border-radius: 12px;
  background-color: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 18px;
}
.field textarea { line-height: 1.5; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 3px rgba(43, 63, 224, .25); }
.field select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 52px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='M4 7.5l6 6 6-6' fill='none' stroke='%232B3FE0' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
}
.form__note { font-size: 15px; color: var(--slate); }
/* Champ piège anti-robots : invisible pour les visiteurs */
.form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 40px; border-radius: 20px; background: var(--paper); }
.notice--error { padding: 20px 24px; background: #FDE7EA; color: #7A1626; }
[hidden] { display: none !important; }

/* ---------- Pied de page ---------- */
.footer { background: var(--ink); color: #fff; font-size: 16px; line-height: 1.5; }
.footer__inner { padding-top: 48px; padding-bottom: 28px; display: flex; flex-direction: column; gap: 32px; }
.footer__cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px 48px; }
.footer__brand { display: flex; flex-direction: column; gap: 12px; }
.footer__brand .brand { font-size: 19px; }
.footer__brand p { color: var(--on-ink); max-width: 340px; }
.footer__col { display: flex; flex-direction: column; }
.footer__col strong { padding-bottom: 6px; }
.footer__col a { padding: 6px 0; color: var(--on-ink); font-weight: 400; text-decoration: none; }
.footer__col a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--sun); }
.footer__legal { padding-top: 20px; border-top: 1px solid #3A3B66; font-size: 15px; color: var(--on-ink); }

/* ---------- Page 404 ---------- */
.lost { min-height: 100vh; display: flex; flex-direction: column; }
.lost .hero { flex-grow: 1; }
.lost__code { font-family: var(--display); font-weight: 700; font-size: clamp(72px, 14vw, 160px); line-height: 1; color: var(--sun); }

@media (max-width: 640px) {
  .section, .cta { padding-top: 56px; padding-bottom: 56px; }
  .hero { padding-bottom: 64px; }
  .card { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Une carte seule dans la colonne principale garde sa hauteur naturelle */
.split__main > .card { flex: none; align-self: stretch; }

/* Les champs posés directement dans le formulaire (colonne) gardent leur hauteur naturelle. */
.form > .field { flex: none; }

/* ---------- Menu sur petit écran ----------
   Le bouton « Menu » n'apparaît que si JavaScript est actif (classe .has-menu posée par site.js).
   Sans JavaScript, les liens restent simplement affichés sous le logo. */
.nav-toggle { display: none; }
@media (max-width: 820px) {
  .has-menu .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 14px;
    border: 2px solid rgba(255, 255, 255, .55);
    border-radius: 10px;
    background: var(--cobalt);
    color: #fff;
    font: 600 17px/1 var(--text);
    cursor: pointer;
    transition: background-color .2s, border-color .2s;
  }
  .has-menu .nav-toggle:hover, .has-menu .nav-toggle[aria-expanded="true"] { background: var(--cobalt-dark); border-color: #fff; }
  .nav-toggle__icon { position: relative; width: 20px; height: 14px; }
  .nav-toggle__icon::before, .nav-toggle__icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 2.5px;
    border-radius: 2px;
    background: currentColor;
    transition: transform .25s, top .25s, background-color .25s;
  }
  .nav-toggle__icon::before { top: 2px; }
  .nav-toggle__icon::after { top: 10px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__icon::before { top: 6px; transform: rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__icon::after { top: 6px; transform: rotate(-45deg); background: var(--sun); }

  /* La première ligne garde la hauteur de l'en-tête, menu ouvert ou fermé */
  .has-menu .brand { min-height: 78px; }
  .has-menu .nav { display: none; flex: 1 0 100%; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 0; padding: 4px 0 28px; font-size: 20px; }
  .has-menu .nav.is-open { display: flex; }
  .has-menu .nav a:not(.btn) { padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, .22); }
  .has-menu .nav .btn { margin-top: 20px; min-height: 52px; font-size: 18px; }
  .has-menu .nav.is-open > * { animation: menu-in .3s both; }
  .has-menu .nav.is-open > *:nth-child(2) { animation-delay: .04s; }
  .has-menu .nav.is-open > *:nth-child(3) { animation-delay: .08s; }
  .has-menu .nav.is-open > *:nth-child(4) { animation-delay: .12s; }
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* Très petit écran : le logo et le bouton tiennent sur une seule ligne */
@media (max-width: 480px) {
  .site-header { column-gap: 12px; }
  .brand { font-size: 19px; gap: 10px; }
  .nav-toggle__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .has-menu .nav-toggle { position: relative; width: 48px; padding: 0; justify-content: center; }
}

/* ---------- Pied de page sur petit écran ---------- */
@media (max-width: 820px) {
  /* Le logo sur toute la largeur, puis les trois rubriques côte à côte */
  .footer__cols { grid-template-columns: repeat(3, 1fr); gap: 32px 24px; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  /* Une rubrique par ligne, ses liens à la suite */
  .footer__cols { grid-template-columns: 1fr; gap: 24px; }
  .footer__col { flex-direction: row; flex-wrap: wrap; gap: 0 24px; }
  .footer__col strong { flex: 1 0 100%; padding-bottom: 2px; }
}

/* ---------- Mosaïque de l'accueil sur petit écran ----------
   Quand elle passe sous le texte, on n'en montre qu'une frise de deux rangées
   (les 3e et 4e, les plus remplies), alignée à gauche comme sur les autres pages. */
@media (max-width: 860px) {
  .hero { gap: 36px; }
  .hero__art { flex: 0 0 auto; display: block; width: min(100%, 340px); aspect-ratio: 126 / 48; overflow: hidden; }
  .hero__art .mosaic { display: block; max-width: none; margin-top: -41.27%; }
}


/* ==========================================================================
   Petites animations
   Toutes sont coupées par le réglage « réduire les animations » du visiteur
   (règle prefers-reduced-motion plus haut, reprise à la fin de ce bloc).
   ========================================================================== */

/* Passage d'une page à l'autre en fondu (navigateurs récents ; ignoré ailleurs) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }

/* Arrivée du texte du bandeau, élément après élément */
.hero__text > * { animation: rise .7s cubic-bezier(.2, .7, .2, 1) backwards; }
.hero__text > *:nth-child(2) { animation-delay: .1s; }
.hero__text > *:nth-child(3) { animation-delay: .2s; }
.hero__text > *:nth-child(4) { animation-delay: .3s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* Des remous parcourent la trame du bandeau : par endroits, les points blancs s'éclaircissent
   et grossissent, puis s'éteignent, sans changer de couleur.
   Une seconde couche de points, plus marqués, est révélée là où trois masques en bandes se croisent.
   Les trois glissent dans des directions et à des vitesses différentes (droite, gauche, bas) :
   leurs croisements forment des taches qui naissent et disparaissent de façon irrégulière.
   Chaque masque avance d'un nombre entier de ses périodes, la boucle est donc sans à-coup. */
.band { isolation: isolate; }
.band::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .3) 1.8px, transparent 2px);
  background-size: 26px 26px;
  -webkit-mask-image:
    repeating-linear-gradient(115deg, transparent 0, #000 152.7px, #000 271.5px, transparent 424.15px),
    repeating-linear-gradient(62deg, transparent 0, #000 115.7px, #000 205.7px, transparent 321.38px),
    repeating-linear-gradient(8deg, transparent 0, #000 106.9px, #000 190.1px, transparent 297.08px);
  mask-image:
    repeating-linear-gradient(115deg, transparent 0, #000 152.7px, #000 271.5px, transparent 424.15px),
    repeating-linear-gradient(62deg, transparent 0, #000 115.7px, #000 205.7px, transparent 321.38px),
    repeating-linear-gradient(8deg, transparent 0, #000 106.9px, #000 190.1px, transparent 297.08px);
  -webkit-mask-size: calc(100% + 468px) 100%, calc(100% + 728px) 100%, 100% calc(100% + 300px);
  mask-size: calc(100% + 468px) 100%, calc(100% + 728px) 100%, 100% calc(100% + 300px);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
  animation: swell 16s linear infinite;
}
@keyframes swell {
  from { -webkit-mask-position: -468px 0, 0 0, 0 -300px; mask-position: -468px 0, 0 0, 0 -300px; }
  to { -webkit-mask-position: 0 0, -728px 0, 0 0; mask-position: 0 0, -728px 0, 0 0; }
}
/* Sur téléphone et tablette (écrans tactiles), faire glisser les masques oblige l'appareil à
   redessiner tout le bandeau à chaque image : le défilement saccade. On garde l'effet avec
   une version légère : deux couches de points aux taches fixes, qui s'allument et s'éteignent
   à des rythmes différents. Seule leur transparence change, ce que l'appareil anime sans rien redessiner.
   (La couche ::before sert au survol de la souris, sans objet sur un écran tactile.) */
@media (hover: none) {
  .band::before, .band::after {
    z-index: -1;
    background-image: radial-gradient(rgba(255, 255, 255, .3) 1.8px, transparent 2px);
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-position: 0 0;
    mask-position: 0 0;
    -webkit-mask-composite: source-over;
    mask-composite: add;
    opacity: 0;
    animation: glow 9s ease-in-out infinite;
  }
  .band::after {
    -webkit-mask-image:
      radial-gradient(ellipse 55% 32% at 12% 22%, #000, transparent),
      radial-gradient(ellipse 50% 28% at 88% 62%, #000, transparent),
      radial-gradient(ellipse 45% 22% at 30% 96%, #000, transparent);
    mask-image:
      radial-gradient(ellipse 55% 32% at 12% 22%, #000, transparent),
      radial-gradient(ellipse 50% 28% at 88% 62%, #000, transparent),
      radial-gradient(ellipse 45% 22% at 30% 96%, #000, transparent);
  }
  .band::before {
    -webkit-mask-image:
      radial-gradient(ellipse 50% 26% at 85% 10%, #000, transparent),
      radial-gradient(ellipse 55% 30% at 15% 58%, #000, transparent),
      radial-gradient(ellipse 45% 24% at 75% 92%, #000, transparent);
    mask-image:
      radial-gradient(ellipse 50% 26% at 85% 10%, #000, transparent),
      radial-gradient(ellipse 55% 30% at 15% 58%, #000, transparent),
      radial-gradient(ellipse 45% 24% at 75% 92%, #000, transparent);
    animation-duration: 13s;
    animation-delay: -4s;
  }
}
@keyframes glow { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }

/* Apparition au défilement (classes posées par site.js, uniquement sous l'écran visible) */
.reveal { opacity: 0; transform: translateY(20px); }
.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--d, 0s);
}

/* Logo : le rond jaune rebondit, les carrés suivent */
.brand svg { overflow: visible; } /* le rond peut dépasser du cadre du logo quand il rebondit */
.brand svg > * { transform-box: fill-box; transform-origin: center; }
.brand:hover svg circle { animation: hop .6s cubic-bezier(.3, .6, .3, 1); }
.brand:hover svg rect { animation: nudge .5s; }
.brand:hover svg rect:nth-of-type(2) { animation-delay: .08s; }
.brand:hover svg rect:nth-of-type(3) { animation-delay: .16s; }
@keyframes hop { 0%, 100% { transform: none; } 40% { transform: translateY(-7px) scale(1.08); } 70% { transform: translateY(1px) scale(.96); } }
@keyframes nudge { 0%, 100% { transform: none; } 50% { transform: scale(.82); } }

/* Menu : le trait jaune se dessine sous le lien */
.nav a:not(.btn) > span {
  background: linear-gradient(var(--sun), var(--sun)) left bottom / 0 3px no-repeat;
  transition: background-size .3s cubic-bezier(.2, .7, .2, 1);
}
.nav a:not(.btn):hover > span, .nav a[aria-current="page"]:not(.btn) > span { background-size: 100% 3px; border-bottom-color: transparent; }

/* Boutons : léger décollage avec ombre décalée, et enfoncement au clic */
.btn { transition: transform .2s, box-shadow .2s, background-color .2s; }
.btn--sun:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--cobalt-dark); }
.btn--cobalt:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--sun); }
.btn--ghost:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 currentColor; }
.btn:active { transform: translate(1px, 1px) scale(.98); box-shadow: none; transition-duration: .05s; }

/* Flèche des liens : elle avance au survol */
.arrow { display: inline-block; transition: transform .25s cubic-bezier(.2, .7, .2, 1); }
a:hover .arrow { transform: translateX(5px); }

/* Cartes : le logo et le numéro réagissent au survol */
.card__logo, .card__num { transition: transform .3s cubic-bezier(.2, .7, .2, 1), background-color .3s, color .3s; }
.card:hover .card__logo { transform: scale(1.06) rotate(-2deg); }
.card:hover .card__num { transform: rotate(-8deg) scale(1.08); background: var(--ink); }
/* Carte « Et la suite » : les cases clignotent tour à tour, comme un chantier en cours */
.card--soon svg > * { animation: blink 3.2s ease-in-out infinite; }
.card--soon svg > *:nth-child(2) { animation-delay: .4s; }
.card--soon svg > *:nth-child(3) { animation-delay: 1.2s; }
.card--soon svg > *:nth-child(4) { animation-delay: .8s; }
@keyframes blink { 0%, 60%, 100% { opacity: 1; } 30% { opacity: .35; } }

/* Liste en trois points : la puce tourne et grossit au survol de la ligne */
.points li::before { transition: transform .35s cubic-bezier(.3, 1.6, .5, 1); }
.points li:hover::before { transform: rotate(90deg) scale(1.35); }
.points strong { transition: transform .25s; }
.points li:hover strong { transform: translateX(4px); }

/* Étiquette de cotisation : un reflet la traverse de temps en temps */
.pill { position: relative; overflow: hidden; }
.pill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, .85) 50%, transparent 65%);
  transform: translateX(-100%);
  animation: shine 6s ease-in-out 1.2s infinite;
}
@keyframes shine { 0%, 100% { transform: translateX(-100%); } 18%, 99% { transform: translateX(100%); } }

/* Formulaire : l'intitulé du champ en cours passe en cobalt */
.field label { transition: color .2s; }
.field:focus-within label { color: var(--cobalt); }
.field input, .field select, .field textarea { transition: border-color .2s, box-shadow .2s; }
/* Message envoyé : le symbole se construit case par case */
.notice svg > * { transform-box: fill-box; transform-origin: center; animation: pop .5s cubic-bezier(.3, 1.6, .5, 1) backwards; }
.notice svg > *:nth-child(2) { animation-delay: .12s; }
.notice svg > *:nth-child(3) { animation-delay: .24s; }
.notice svg > *:nth-child(4) { animation-delay: .36s; }

/* Pied de page : les liens glissent légèrement */

/* Page 404 : le nombre flotte doucement */
.lost__code { animation: float 5s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: none; } 50% { transform: translateY(-8px); } }

/* ---------- Bandeau d'accueil plein écran ----------
   Le bandeau occupe toute la hauteur de l'écran ; son contenu est centré dans la place restante.
   En bas, une petite souris dont la molette descend invite à faire défiler la page.
   Elle s'efface dès que l'on défile (.is-scrolled posé par site.js). */
.band--full { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
.band--full .site-header { width: 100%; }
.band--full .hero { flex-grow: 1; width: 100%; align-content: center; padding-bottom: 104px; } /* la place de l'invitation */
.band > .scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 52px;
  margin-left: -22px;
  transition: opacity .4s, visibility .4s;
  animation: float 3s ease-in-out infinite;
}
.scroll-hint__mouse {
  position: relative;
  width: 24px;
  height: 38px;
  border: 2px solid rgba(255, 255, 255, .85);
  border-radius: 12px;
  background: var(--cobalt);
  transition: border-color .2s;
}
.scroll-hint__mouse::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 7px;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--sun);
  animation: wheel 1.8s ease-in-out infinite;
}
.scroll-hint:hover .scroll-hint__mouse { border-color: var(--sun); }
.is-scrolled .scroll-hint { opacity: 0; visibility: hidden; }
@keyframes wheel { 0% { opacity: 0; transform: none; } 25% { opacity: 1; } 70%, 100% { opacity: 0; transform: translateY(11px); } }
/* Écran très bas (téléphone à l'horizontale) : pas la place pour l'invitation */
@media (max-height: 520px) { .scroll-hint { display: none; } }

/* ---------- Pied de page animé ---------- */
/* Logo : le rond jaune rebondit tout seul de temps en temps */
.footer__brand .brand svg circle { animation: hop-idle 5s cubic-bezier(.3, .6, .3, 1) 1s infinite; }
@keyframes hop-idle { 0%, 12%, 100% { transform: none; } 5% { transform: translateY(-6px) scale(1.08); } 9% { transform: translateY(1px) scale(.96); } }
/* Liens : une petite case jaune se glisse devant le lien survolé */
.footer__col a { display: flex; align-items: center; transition: color .2s; }
.footer__col a::before {
  content: "";
  flex: none;
  width: 0;
  height: 8px;
  margin-right: 0;
  border-radius: 2px;
  background: var(--sun);
  opacity: 0;
  transition: width .25s cubic-bezier(.2, .7, .2, 1), margin-right .25s cubic-bezier(.2, .7, .2, 1), opacity .25s, transform .4s;
}
.footer__col a:hover { text-decoration: none; }
.footer__col a:hover::before, .footer__col a:focus-visible::before { width: 8px; margin-right: 10px; opacity: 1; transform: rotate(90deg); }
/* Bas du pied de page : le copyright à gauche, un petit bloc de formes à droite.
   Ses cases pivotent en continu, comme celles du bandeau (voir site.js). */
.footer__legal { display: flex; align-items: center; justify-content: space-between; gap: 24px; transition: opacity .8s .2s; }
.mosaic--foot { flex: none; width: 100px; }
/* Le bas du pied de page apparaît en fondu à son arrivée à l'écran (.footer--wait posé par site.js) */
.footer--wait .footer__legal { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  @view-transition { navigation: none; }
}
