/*
 * Assoverse — feuille de style commune aux quatre pages vitrine.
 *
 * The four pages used to each carry their own inline <style>, which is how the
 * palette drifted apart. Everything shared lives here; a page only adds what is
 * genuinely its own.
 *
 * Palette: identity charter v3. Split roughly 60 % neutrals, 30 % navy, 10 %
 * amber -- amber marks actions and confirmations, never a decorative surface.
 */

/* ------------------------------------------------------------------ jetons */
:root {
  --navy: #12203a;
  --navy-clair: #1b2c4a;
  --ambre: #e8a33d;
  --ambre-sombre: #c9852a;
  --creme: #f2f1ec;
  --gris-clair: #f4f5f7;
  --gris: #8792a8;
  /* Le gris de la charte tombe à 2,8:1 sur crème : illisible en petit texte.
     Cette variante passe 4,9:1 et sert partout où le fond est clair. */
  --gris-texte: #5c6884;
  --ardoise: #33405a;
  --blanc: #fff;
  --trait: rgba(18, 32, 58, 0.12);
  --trait-sombre: rgba(242, 241, 236, 0.16);
  --ombre: 0 1px 2px rgba(18, 32, 58, 0.04), 0 8px 24px rgba(18, 32, 58, 0.06);
  --ombre-haute: 0 2px 4px rgba(18, 32, 58, 0.06), 0 18px 44px rgba(18, 32, 58, 0.1);
  --rayon: 14px;
  --rayon-petit: 9px;
  --largeur: 1120px;
  --display: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --corps: 'Hanken Grotesk', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: 'Space Mono', ui-monospace, SFMono-Regular, monospace;
}

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

html {
  scroll-behavior: smooth;
  /* Sous la barre collante : sans ça une ancre cadre son titre derrière elle. */
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--creme);
  color: var(--ardoise);
  font-family: var(--corps);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  font-family: var(--display);
  color: var(--navy);
  line-height: 1.14;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.2rem, 1.3rem + 3.6vw, 3.9rem);
  font-weight: 700;
}
h2 {
  font-size: clamp(1.65rem, 1.1rem + 2.2vw, 2.6rem);
  font-weight: 700;
}
h3 {
  font-size: 1.22rem;
  font-weight: 600;
}
h4 {
  font-size: 1.02rem;
  font-weight: 600;
}

p {
  margin: 0 0 1.05em;
  text-wrap: pretty;
}

a {
  color: var(--navy);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover {
  color: var(--ambre-sombre);
}

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

strong {
  font-weight: 600;
  color: var(--navy);
}

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

.wrap {
  width: min(100% - 40px, var(--largeur));
  margin-inline: auto;
}

.saut-contenu {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: var(--creme);
  padding: 12px 18px;
  z-index: 100;
  border-radius: 0 0 var(--rayon-petit) 0;
}
.saut-contenu:focus {
  left: 0;
}

/* ---------------------------------------------------------------- barre nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(242, 241, 236, 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--trait);
}
.nav .wrap {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 66px;
}
.nav-marque {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.28rem;
  letter-spacing: -0.025em;
  color: var(--navy);
  /* Zone de respiration : la hauteur d'une oreille, comme la charte l'exige. */
  padding: 6px 4px;
}
.nav-marque img {
  width: 34px;
  height: 34px;
}
.nav-liens {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.nav-liens a {
  text-decoration: none;
  /* Sans ça « Demander une démo » se coupe en deux lignes dans la barre
     défilante du mobile. */
  white-space: nowrap;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ardoise);
  padding: 9px 13px;
  border-radius: var(--rayon-petit);
}
.nav-liens a:hover {
  background: rgba(18, 32, 58, 0.06);
  color: var(--navy);
}
.nav-liens a[aria-current='page'] {
  color: var(--navy);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--ambre);
  border-radius: 0;
}

@media (max-width: 720px) {
  .nav .wrap {
    flex-wrap: wrap;
    padding-block: 10px;
  }
  .nav-liens {
    margin-left: 0;
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }
  .nav-liens::-webkit-scrollbar {
    display: none;
  }
}

/* --------------------------------------------------------------- boutons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  padding: 15px 24px;
  border-radius: var(--rayon-petit);
  border: 1.5px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.12s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}
.btn:active {
  transform: translateY(1px);
}
/* Ambre sur navy : 7,5:1. L'ambre en TEXTE sur blanc ne passe pas, il ne sert
   donc que de fond ou de trait. */
.btn-primaire {
  background: var(--ambre);
  color: var(--navy);
}
.btn-primaire:hover {
  background: var(--ambre-sombre);
  color: var(--navy);
}
.btn-secondaire {
  background: transparent;
  color: var(--navy);
  border-color: rgba(18, 32, 58, 0.28);
}
.btn-secondaire:hover {
  border-color: var(--navy);
  background: rgba(18, 32, 58, 0.04);
  color: var(--navy);
}
.sur-navy .btn-secondaire {
  color: var(--creme);
  border-color: var(--trait-sombre);
}
.sur-navy .btn-secondaire:hover {
  color: var(--creme);
  background: rgba(242, 241, 236, 0.08);
  border-color: rgba(242, 241, 236, 0.4);
}
.boutons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* --------------------------------------------------------------- sections */
.section {
  padding: clamp(56px, 7vw, 104px) 0;
}
.section-creme {
  background: var(--creme);
}
.section-claire {
  background: var(--gris-clair);
}
.section-blanche {
  background: var(--blanc);
}
.sur-navy {
  background: var(--navy);
  color: var(--creme);
}
.sur-navy h1,
.sur-navy h2,
.sur-navy h3,
.sur-navy h4 {
  color: var(--creme);
}
.sur-navy p {
  color: #c6cddc;
}
.sur-navy a {
  color: var(--creme);
}
/* `strong` est en navy par défaut : sur un fond navy il disparaît purement et
   simplement — c'est arrivé sur l'encart du parcours. */
.sur-navy strong,
.demo strong {
  color: var(--creme);
}

.oeil {
  font-family: var(--display);
  font-size: 0.79rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--gris-texte);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.oeil::before {
  content: '';
  width: 22px;
  height: 2px;
  background: var(--ambre);
  flex: none;
}
.sur-navy .oeil {
  color: var(--gris);
}

.intro {
  font-size: 1.16rem;
  color: var(--gris-texte);
  max-width: 62ch;
}
.sur-navy .intro {
  color: #c6cddc;
}
.tete-section {
  max-width: 66ch;
  margin-bottom: clamp(32px, 4vw, 54px);
}

/* ------------------------------------------------------------------- hero */
.hero {
  position: relative;
  background: var(--navy);
  color: var(--creme);
  overflow: hidden;
}
.hero-image {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Le personnage est à droite : sur mobile on garde ce bord plutôt que de
     centrer, sinon il sort du cadre. */
  object-position: 72% center;
}
.hero-voile {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    100deg,
    rgba(18, 32, 58, 0.96) 0%,
    rgba(18, 32, 58, 0.9) 38%,
    rgba(18, 32, 58, 0.55) 62%,
    rgba(18, 32, 58, 0.28) 100%
  );
}
.hero .wrap {
  position: relative;
  z-index: 2;
  padding: clamp(58px, 7vw, 104px) 0;
}
/* Le personnage occupe la moitié droite de l'illustration : une colonne de
   texte plus large que ça le recadrerait hors du cadre, et un héros plus haut
   que l'image la zoomerait. */
.hero-texte {
  max-width: min(100%, 620px);
}
.hero h1 {
  color: var(--creme);
  font-size: clamp(2.1rem, 1.25rem + 3.1vw, 3.45rem);
  margin-bottom: 0.42em;
}
.hero-sous {
  font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.28rem);
  color: #ccd3e1;
  max-width: 46ch;
  margin-bottom: 1.7em;
}
.hero .boutons {
  margin-bottom: 26px;
}
.hero-appui {
  font-size: 0.92rem;
  color: var(--gris);
  margin: 0;
}
/* Le contour navy du bouton secondaire disparaît sur le voile du héros. */
.hero .btn-secondaire {
  color: var(--creme);
  border-color: rgba(242, 241, 236, 0.45);
}
.hero .btn-secondaire:hover {
  background: rgba(242, 241, 236, 0.1);
  border-color: var(--creme);
  color: var(--creme);
}

/*
 * Sur petit écran l'illustration passe SOUS le texte au lieu de rester en
 * fond. Un voile assez opaque pour que le titre reste lisible efface le
 * personnage — et c'est lui qu'il faut garder visible. En bandeau, la scène
 * est entière et le texte est sur navy plein.
 */
@media (max-width: 760px) {
  .hero {
    display: flex;
    flex-direction: column;
  }
  .hero .wrap {
    order: 1;
    padding-bottom: clamp(34px, 6vw, 48px);
  }
  .hero-image {
    order: 2;
    position: relative;
    inset: auto;
  }
  .hero-image img {
    height: auto;
    aspect-ratio: 16 / 9;
  }
  .hero-voile {
    display: none;
  }
}

/* ------------------------------------------------------------------ cartes */
.grille {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}
.grille-2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
}

.carte {
  background: var(--blanc);
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
  padding: 26px 24px;
  box-shadow: var(--ombre);
}
.carte h3 {
  margin-bottom: 0.4em;
}
.carte p:last-child {
  margin-bottom: 0;
}
.carte-illustree {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.carte-illustree img {
  width: 100%;
  aspect-ratio: 22 / 12;
  object-fit: cover;
}
.carte-illustree > div {
  padding: 24px;
}
.sur-navy .carte {
  background: var(--navy-clair);
  border-color: var(--trait-sombre);
  box-shadow: none;
}

.jeton {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--display);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
  background: rgba(232, 163, 61, 0.18);
  border: 1px solid rgba(232, 163, 61, 0.45);
  padding: 5px 11px;
  border-radius: 999px;
}
.sur-navy .jeton {
  color: var(--creme);
  background: rgba(232, 163, 61, 0.16);
}

/* ------------------------------------------------------------- énumérations */
.liste {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 13px;
}
.liste li {
  position: relative;
  padding-left: 30px;
}
.liste li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--ambre);
}

.etapes {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: etape;
  display: grid;
  gap: 4px;
}
.etapes li {
  counter-increment: etape;
  position: relative;
  padding: 18px 0 18px 62px;
  border-top: 1px solid var(--trait);
}
.etapes li:first-child {
  border-top: 0;
}
.etapes li::before {
  content: counter(etape);
  position: absolute;
  left: 0;
  top: 16px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--navy);
  background: var(--ambre);
  border-radius: 50%;
}
.sur-navy .etapes li {
  border-color: var(--trait-sombre);
}
.etapes strong {
  display: block;
  font-family: var(--display);
  font-size: 1.06rem;
}
.sur-navy .etapes strong {
  color: var(--creme);
}

/* --------------------------------------------------------------- chiffres */
.chiffres {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
}
.chiffre b {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.7rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.sur-navy .chiffre b {
  color: var(--creme);
}
.chiffre span {
  display: block;
  font-size: 0.95rem;
  color: var(--gris-texte);
  margin-top: 4px;
}
.sur-navy .chiffre span {
  color: var(--gris);
}

/* --------------------------------------------------------------- médaillon */
.medaillon {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  flex: none;
  box-shadow: var(--ombre);
}
.bloc-medaillon {
  display: flex;
  gap: 26px;
  align-items: center;
  flex-wrap: wrap;
}
.bloc-medaillon > div {
  flex: 1 1 320px;
  min-width: 0;
}

/* ---------------------------------------------------------------- tableau */
.tableau-cadre {
  overflow-x: auto;
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
  background: var(--blanc);
}
table.donnees {
  border-collapse: collapse;
  width: 100%;
  min-width: 520px;
  font-size: 0.96rem;
}
table.donnees th,
table.donnees td {
  text-align: left;
  padding: 13px 18px;
  border-bottom: 1px solid var(--trait);
  vertical-align: top;
}
table.donnees th {
  font-family: var(--display);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gris-texte);
  background: var(--gris-clair);
}
table.donnees tr:last-child td {
  border-bottom: 0;
}

/* --------------------------------------------------------------------- FAQ */
.faq details {
  border-bottom: 1px solid var(--trait);
  padding: 6px 0;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 40px 16px 0;
  position: relative;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--navy);
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '';
  position: absolute;
  right: 8px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -7px;
  border-right: 2px solid var(--ambre);
  border-bottom: 2px solid var(--ambre);
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}
.faq details[open] summary::after {
  transform: rotate(-135deg);
  margin-top: -2px;
}
.faq details p:last-child {
  margin-bottom: 16px;
}

/* ------------------------------------------------------------------ encart */
.encart {
  border-left: 3px solid var(--ambre);
  background: var(--blanc);
  border-radius: 0 var(--rayon-petit) var(--rayon-petit) 0;
  padding: 18px 22px;
}
.encart p:last-child {
  margin-bottom: 0;
}
.sur-navy .encart {
  background: var(--navy-clair);
}

/* ---------------------------------------------------------------- démo */
.demo {
  background: var(--navy);
  color: var(--creme);
}
.demo .wrap {
  padding: clamp(56px, 7vw, 96px) 0;
  max-width: 780px;
}
.demo h2 {
  color: var(--creme);
}
/* La section de démonstration est sur navy sans porter la classe `sur-navy` :
   ses deux textes d'accompagnement doivent l'être explicitement. */
.demo .oeil {
  color: var(--gris);
}
.demo .intro {
  color: #c6cddc;
}
.demo form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 30px;
}
.demo .pleine {
  grid-column: 1 / -1;
}
.demo label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: var(--display);
  margin-bottom: 6px;
  color: var(--creme);
}
.demo label .option {
  font-weight: 400;
  color: var(--gris);
}
.demo input,
.demo textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--creme);
  background: rgba(242, 241, 236, 0.06);
  border: 1px solid var(--trait-sombre);
  border-radius: var(--rayon-petit);
  padding: 12px 14px;
}
.demo textarea {
  min-height: 108px;
  resize: vertical;
}
.demo input:focus,
.demo textarea:focus {
  border-color: var(--ambre);
  background: rgba(242, 241, 236, 0.1);
}
.demo button {
  grid-column: 1 / -1;
  justify-self: start;
}
.demo button[disabled] {
  opacity: 0.55;
  cursor: progress;
}
/* Piège à robots : invisible pour l'œil et pour le lecteur d'écran, mais
   présent dans le DOM. `display:none` serait ignoré par une part des robots. */
.piege {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.etat {
  grid-column: 1 / -1;
  min-height: 22px;
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0;
}
.etat-ok {
  color: var(--ambre);
}
.etat-ko {
  color: #ff9d8e;
}
.mention-rgpd {
  grid-column: 1 / -1;
  font-size: 0.85rem;
  color: var(--gris);
  margin: 0;
}
.mention-rgpd a {
  color: var(--gris);
}

@media (max-width: 640px) {
  .demo form {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------------------- pied */
.pied {
  background: var(--navy);
  color: var(--gris);
  border-top: 1px solid var(--trait-sombre);
  padding: 52px 0 34px;
  font-size: 0.94rem;
}
.pied-haut {
  display: flex;
  flex-wrap: wrap;
  gap: 34px;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--trait-sombre);
}
.pied-marque {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--creme);
  text-decoration: none;
}
.pied-marque img {
  width: 32px;
  height: 32px;
}
.pied nav {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
}
.pied nav a {
  color: #c6cddc;
  text-decoration: none;
}
.pied nav a:hover {
  color: var(--ambre);
}
/* Les deux profils : des pastilles, pas des mots — le pied de page en porte
   déjà cinq, et un sixième et septième lien textuel les noieraient. */
.pied-social {
  display: flex;
  gap: 10px;
  align-items: center;
}
.pied-social a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--rayon-petit);
  border: 1px solid var(--trait-sombre);
  color: #c6cddc;
}
.pied-social a:hover {
  color: var(--navy);
  background: var(--ambre);
  border-color: var(--ambre);
}
.pied-social svg {
  width: 19px;
  height: 19px;
}
.pied-bas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  padding-top: 24px;
  color: var(--gris);
}

/* ------------------------------------------------------- texte technique */
.mono,
code {
  font-family: var(--mono);
  font-size: 0.9em;
}
code {
  background: rgba(18, 32, 58, 0.07);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ------------------------------------------------------------ préférences */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
