/*
 * Page d'événement BI Développement — MEDEF, 3 novembre, Douai.
 *
 * Les couleurs sont celles du site b-i-dev.com, reprises telles quelles pour
 * que le visiteur qui passe de l'une à l'autre reconnaisse la même maison.
 * Elles vivent dans `src/index.css` du dépôt bidev-sparkle.
 */
:root {
  --primaire: hsl(210 85% 28%);
  --primaire-clair: hsl(210 85% 36%);
  --secondaire: hsl(180 85% 45%);
  --accent: hsl(15 90% 55%);
  --accent-sombre: hsl(15 90% 48%);
  --texte: hsl(220 26% 14%);
  --texte-doux: hsl(220 9% 46%);
  --fond: hsl(0 0% 100%);
  --fond-doux: hsl(220 14% 96%);
  --bordure: hsl(220 13% 91%);
  --rayon: 0.75rem;
  --ombre: 0 10px 30px -10px hsl(210 85% 28% / 0.3);
  --ombre-douce: 0 4px 16px -8px hsl(210 85% 28% / 0.25);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family:
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    Arial,
    sans-serif;
  color: var(--texte);
  background: var(--fond);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0 0 0.5em;
  /* Les lettres descendantes (g, p, y) d'un texte en dégradé se font couper
     sans cette réserve : même correctif que sur le site. */
  padding-bottom: 0.08em;
}

a {
  color: var(--primaire);
}

.contenant {
  width: min(100% - 2rem, 1180px);
  margin-inline: auto;
}
.contenant--etroit {
  width: min(100% - 2rem, 760px);
}

.saut {
  position: absolute;
  left: -9999px;
}
.saut:focus {
  left: 1rem;
  top: 1rem;
  z-index: 50;
  background: var(--fond);
  padding: 0.75rem 1rem;
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
}

/* ---------------------------------------------------------------- En-tête */
.entete {
  position: sticky;
  top: 0;
  z-index: 20;
  background: hsl(0 0% 100% / 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--bordure);
}
.entete__barre {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0;
  flex-wrap: wrap;
}
.marque {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}
/* L'image fait 1024 × 508 : on ne fixe que la hauteur, la largeur suit. */
.marque img {
  height: 44px;
  width: auto;
  display: block;
}
.pastille {
  margin: 0;
  background: hsl(180 85% 45% / 0.12);
  color: var(--primaire);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  white-space: nowrap;
}
.entete__action {
  margin-left: auto;
}

/* ---------------------------------------------------------------- Boutons */
.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  border: 0;
  border-radius: var(--rayon);
  padding: 0.7rem 1.4rem;
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.2s,
    background-color 0.2s;
}
.bouton--accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 20px -6px hsl(15 90% 55% / 0.45);
}
.bouton--accent:hover {
  background: var(--accent-sombre);
  transform: translateY(-1px);
}
.bouton--fantome {
  background: transparent;
  color: var(--texte-doux);
  border: 1px solid var(--bordure);
}
.bouton--fantome:hover {
  color: var(--primaire);
  border-color: var(--primaire);
}
.bouton--grand {
  font-size: 1.05rem;
  padding: 0.95rem 1.8rem;
}
.bouton__duree {
  font-weight: 500;
  opacity: 0.85;
  font-size: 0.9em;
  padding-left: 0.6rem;
  margin-left: 0.2rem;
  border-left: 1px solid hsl(0 0% 100% / 0.35);
}
.bouton:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}
.bouton:focus-visible,
a:focus-visible,
input:focus-visible,
.choix:focus-visible {
  outline: 3px solid var(--secondaire);
  outline-offset: 2px;
}

/* ----------------------------------------------------------------- Héros */
.heros {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 3rem;
  background:
    radial-gradient(60% 60% at 75% 25%, hsl(180 85% 45% / 0.1), transparent 70%),
    linear-gradient(180deg, hsl(220 14% 98%), var(--fond));
}
.heros__grille {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 900px) {
  .heros__grille {
    grid-template-columns: 1.05fr 0.95fr;
  }
}
.heros h1 {
  font-size: clamp(2.1rem, 5.4vw, 3.6rem);
  font-weight: 800;
  color: var(--primaire);
  letter-spacing: -0.015em;
}
.heros h1 .accentue {
  display: block;
  color: var(--secondaire);
}
.chapo {
  font-size: clamp(1rem, 2.1vw, 1.2rem);
  color: var(--texte-doux);
  max-width: 48ch;
  margin: 0 0 1.75rem;
}
.heros__mention {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  color: var(--texte-doux);
  max-width: 46ch;
}

.heros__visuel {
  position: relative;
  min-height: 340px;
  display: grid;
  gap: 0.9rem;
  align-content: center;
  isolation: isolate;
}
/* Halo : sans lui, les trois cartes flottent sur du vide. */
.heros__visuel::before {
  content: '';
  position: absolute;
  inset: -12% -8%;
  z-index: -2;
  border-radius: 50%;
  background:
    radial-gradient(42% 42% at 64% 30%, hsl(180 85% 45% / 0.38), transparent 72%),
    radial-gradient(48% 48% at 32% 70%, hsl(210 85% 45% / 0.3), transparent 72%),
    radial-gradient(70% 70% at 50% 50%, hsl(195 85% 50% / 0.12), transparent 75%);
  filter: blur(10px);
}
/* Le fil pointillé qui relie les trois étapes. */
.heros__fil {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.heros__fil path {
  fill: none;
  stroke: hsl(210 85% 40% / 0.5);
  stroke-width: 0.6;
  stroke-dasharray: 1.6 2.2;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
}
/* Les pastilles ont leur propre calque : étirées par `preserveAspectRatio`,
   elles deviendraient des ellipses dans le même SVG que le fil. */
.heros__points {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.heros__points circle {
  fill: var(--secondaire);
  vector-effect: non-scaling-stroke;
}
.jeton {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--fond);
  border: 1px solid var(--bordure);
  border-radius: 1rem;
  padding: 0.9rem 1.1rem;
  box-shadow: var(--ombre-douce);
  max-width: 330px;
}
.jeton--2 {
  margin-left: auto;
}
.jeton--3 {
  margin-left: 1.5rem;
}
.jeton__icone {
  font-size: 1.3rem;
}
.jeton strong {
  display: block;
  font-size: 0.95rem;
}
.jeton__barre {
  display: block;
  height: 6px;
  width: 110px;
  border-radius: 3px;
  background: var(--fond-doux);
  margin-top: 0.35rem;
}
.jeton__coche {
  margin-left: auto;
  color: var(--secondaire);
  font-weight: 700;
}

/* -------------------------------------------------------- Les quatre axes */
.axes {
  list-style: none;
  margin: 3rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.axe {
  background: var(--fond);
  border: 1px solid var(--bordure);
  border-radius: 1rem;
  padding: 1.5rem 1.25rem;
  text-align: center;
  box-shadow: var(--ombre-douce);
}
.axe h2 {
  font-size: 1.05rem;
  color: var(--primaire);
  margin: 0.75rem 0 0.25rem;
}
.axe p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--texte-doux);
}
.axe__icone {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  font-size: 1.4rem;
}
.axe__icone--cyan {
  background: hsl(180 85% 45% / 0.12);
}
.axe__icone--orange {
  background: hsl(15 90% 55% / 0.12);
}
.axe__icone--bleu {
  background: hsl(210 85% 28% / 0.1);
}

/* ----------------------------------------------------------- Questionnaire */
.diagnostic {
  padding: clamp(2.5rem, 6vw, 4rem) 0 4.5rem;
  background: var(--fond-doux);
}
.carte {
  background: var(--fond);
  border: 1px solid var(--bordure);
  border-radius: 1.25rem;
  box-shadow: var(--ombre);
}
.carte--diagnostic {
  padding: clamp(1.5rem, 4vw, 2.5rem);
}
.carte--diagnostic h2 {
  font-size: clamp(1.35rem, 3.4vw, 1.9rem);
  color: var(--primaire);
}
/* Le focus posé par le script ne doit pas dessiner un cadre ; celui d'une
   vraie navigation au clavier, si. */
.carte--diagnostic h2:focus:not(:focus-visible),
.resultat h2:focus:not(:focus-visible) {
  outline: none;
}

.avancement {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.avancement__barres {
  display: flex;
  gap: 0.35rem;
  flex: 1;
}
.avancement__barre {
  height: 6px;
  flex: 1;
  border-radius: 3px;
  background: var(--fond-doux);
  transition: background-color 0.3s;
}
.avancement__barre[data-faite] {
  background: linear-gradient(90deg, var(--primaire), var(--secondaire));
}
.avancement__texte {
  font-size: 0.85rem;
  color: var(--texte-doux);
  white-space: nowrap;
}

.etape__aide {
  color: var(--texte-doux);
  margin: -0.25rem 0 1.5rem;
}

.choix-liste {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  margin-bottom: 1.75rem;
}
.choix {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-align: left;
  font: inherit;
  background: var(--fond);
  border: 2px solid var(--bordure);
  border-radius: var(--rayon);
  padding: 0.95rem 1.1rem;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background-color 0.2s;
}
.choix:hover {
  border-color: hsl(180 85% 45% / 0.5);
}
.choix[aria-pressed='true'],
.choix[aria-checked='true'] {
  border-color: var(--secondaire);
  background: hsl(180 85% 45% / 0.07);
}
.choix__icone {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 0.6rem;
  background: hsl(210 85% 28% / 0.07);
  font-size: 1.1rem;
  flex-shrink: 0;
}
.choix__libelle {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.3;
}
.choix__marque {
  margin-left: auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--bordure);
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  color: #fff;
  flex-shrink: 0;
}
.choix[aria-pressed='true'] .choix__marque,
.choix[aria-checked='true'] .choix__marque {
  background: var(--secondaire);
  border-color: var(--secondaire);
}

/* ------------------------------------------------------------ Coordonnées */
.champs {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
@media (min-width: 600px) {
  .champs {
    grid-template-columns: 1fr 1fr;
  }
}
.champ label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.champ input {
  width: 100%;
  font: inherit;
  padding: 0.7rem 0.9rem;
  border: 2px solid var(--bordure);
  border-radius: var(--rayon);
  background: var(--fond);
}
.champ input:focus {
  border-color: var(--secondaire);
}
.consentement {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  font-size: 0.88rem;
  color: var(--texte-doux);
  margin-bottom: 1.5rem;
}
.consentement input {
  margin-top: 0.25rem;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.erreur {
  color: hsl(0 72% 42%);
  font-size: 0.88rem;
  margin: -0.75rem 0 1rem;
}

.actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
.actions .bouton--accent {
  margin-left: auto;
}

/* ---------------------------------------------------------------- Résultat */
.resultat {
  text-align: center;
}
.resultat__coche {
  display: inline-grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: hsl(180 85% 45% / 0.13);
  color: var(--secondaire);
  font-size: 2.3rem;
  margin-bottom: 1rem;
}
.resultat__merci {
  color: var(--texte-doux);
  margin: 0;
}
.resultat h2 {
  color: var(--primaire);
  margin-top: 0.4rem;
}
.resultat__texte {
  max-width: 48ch;
  margin: 0 auto 1.75rem;
  color: var(--texte-doux);
}
.resultat__rdv {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: hsl(210 85% 28% / 0.07);
  color: var(--primaire);
  font-weight: 600;
  border-radius: var(--rayon);
  padding: 0.8rem 1.3rem;
  margin-bottom: 1.5rem;
}
.resultat__liens {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------------------------------------------------------------- Pied */
.pied {
  border-top: 1px solid var(--bordure);
  padding: 1.5rem 0 2.5rem;
  font-size: 0.9rem;
  color: var(--texte-doux);
}
.pied__barre {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.pied__barre p {
  margin: 0;
}
.pied__legal {
  margin-top: 1rem;
  font-size: 0.8rem;
  line-height: 1.5;
}
.pied__legal p {
  margin: 0;
  max-width: 80ch;
}


/* ------------------------------------------------- Questionnaire, suite */

/* Introduction, posée au-dessus de la première question seulement. */
.intro {
  border-bottom: 1px solid var(--bordure);
  padding-bottom: 1.5rem;
  margin-bottom: 1.75rem;
}
.intro__titre {
  font-size: clamp(1.3rem, 3.2vw, 1.75rem);
  color: var(--primaire);
  margin-bottom: 0.4rem;
}
.intro__sous-titre {
  font-weight: 600;
  color: var(--secondaire);
  margin: 0 0 0.6rem;
}
.intro__texte {
  color: var(--texte-doux);
  margin: 0;
  font-size: 0.95rem;
}

/* Amorce de phrase : c'est le début de la réponse, pas une consigne. */
.amorce {
  font-size: 1.05rem;
  font-style: italic;
  color: var(--primaire);
  background: hsl(210 85% 28% / 0.05);
  border-left: 3px solid var(--secondaire);
  padding: 0.7rem 1rem;
  border-radius: 0 var(--rayon) var(--rayon) 0;
  margin: 0 0 1rem;
}

.champ--libre {
  margin-bottom: 1.5rem;
}
.champ textarea {
  width: 100%;
  font: inherit;
  padding: 0.8rem 0.9rem;
  border: 2px solid var(--bordure);
  border-radius: var(--rayon);
  background: var(--fond);
  resize: vertical;
  min-height: 5.5rem;
}
.champ textarea:focus {
  border-color: var(--secondaire);
  outline: 3px solid transparent;
}

/* Saisie rattachée à un choix « Autre » : elle occupe toute la largeur de
   la grille pour ne pas déformer la rangée de boutons. */
.choix__saisie {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  background: hsl(180 85% 45% / 0.06);
  border: 2px solid hsl(180 85% 45% / 0.35);
  border-radius: var(--rayon);
  padding: 0.7rem 0.9rem;
}
.choix__saisie[hidden] {
  display: none;
}
.choix__saisie-libelle {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
}
.choix__saisie input {
  flex: 1;
  min-width: 12rem;
  font: inherit;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--bordure);
  border-radius: 0.5rem;
  background: var(--fond);
}

/* Visible des lecteurs d'écran seulement. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Huit questions : les barres d'avancement deviennent fines. */
.avancement__barre {
  min-width: 10px;
}
