/* ==========================================================================
   STYLE DE LA BOUSSOLE — identité Insuffle (navy, bleu, jaune)
   Un seul fichier pour les trois écrans : téléphone, facilitateur, écran projeté.
   ========================================================================== */

:root {
  --nuit: #02040a;        /* fond */
  --carte: #0c1629;       /* blocs */
  --trait: #1c2a44;       /* bordures */
  --bleu: #1f3a8b;
  --bleu-clair: #3b82f6;
  --jaune: #ffde59;       /* accent Insuffle */
  --jaune-fonce: #f0cc30;
  --texte: #f8fafc;
  --discret: #94a3b8;
  --alerte: #f38181;
  --rayon: 16px;
  --police: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--nuit);
  color: var(--texte);
  font-family: var(--police);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.15; letter-spacing: -.01em; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--jaune); }
[hidden] { display: none !important; }

.marque {
  font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--discret);
}
.discret { color: var(--discret); }
.erreur { color: var(--alerte); font-weight: 500; }

/* ---------- Boutons et champs ---------- */
.bouton {
  appearance: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  background: var(--jaune); color: var(--nuit);
  font: 600 17px/1 var(--police); text-decoration: none;
  transition: transform .12s, background .12s;
}
.bouton:hover { background: var(--jaune-fonce); }
.bouton:active { transform: scale(.98); }
.bouton:disabled { opacity: .45; cursor: default; }
.bouton.second { background: transparent; color: var(--texte); box-shadow: inset 0 0 0 1.5px var(--trait); }
.bouton.second:hover { box-shadow: inset 0 0 0 1.5px var(--discret); }
.bouton.danger { background: transparent; color: var(--alerte); box-shadow: inset 0 0 0 1.5px #5a2d33; }
.bouton.petit { min-height: 40px; padding: 0 16px; font-size: 14px; }
.bouton.large { width: 100%; }
:focus-visible { outline: 3px solid var(--bleu-clair); outline-offset: 3px; }

.champ {
  width: 100%; min-height: 52px; padding: 12px 16px;
  background: var(--carte); color: var(--texte);
  border: 1.5px solid var(--trait); border-radius: 12px;
  font: 400 17px/1.4 var(--police);
}
.champ:focus { border-color: var(--bleu-clair); outline: none; }
textarea.champ { resize: vertical; min-height: 120px; }
label.libelle { display: block; font-size: 14px; font-weight: 500; color: var(--discret); margin-bottom: 6px; }

/* ==========================================================================
   TÉLÉPHONE DU PARTICIPANT
   ========================================================================== */
.telephone { max-width: 560px; margin: 0 auto; padding: 20px 20px 40px; min-height: 100dvh; display: flex; flex-direction: column; }
.telephone header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.progression { height: 6px; background: var(--trait); border-radius: 99px; overflow: hidden; margin: 12px 0 28px; }
.progression i { display: block; height: 100%; width: 0; background: var(--jaune); border-radius: 99px; transition: width .25s ease; }
.etape { flex: 1; display: flex; flex-direction: column; gap: 18px; animation: arrivee .25s ease; }
/* Glissement seul, sans jouer sur l'opacité : le texte n'est jamais invisible, même si l'animation ne démarre pas. */
@keyframes arrivee { from { transform: translateY(8px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .etape { animation: none; } }

.axe-pastille {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 10px; border-radius: 99px; background: var(--carte);
  font-size: 13px; font-weight: 600; letter-spacing: .04em;
}
.axe-pastille i { width: 10px; height: 10px; border-radius: 50%; background: var(--couleur, var(--jaune)); }
.question { font-size: clamp(22px, 5.6vw, 28px); font-weight: 600; }
.aide { color: var(--discret); font-size: 15px; }
.options { display: grid; gap: 10px; margin-top: 6px; }
.option {
  appearance: none; cursor: pointer; text-align: left; width: 100%;
  padding: 16px 18px; min-height: 60px;
  background: var(--carte); color: var(--texte);
  border: 1.5px solid var(--trait); border-radius: var(--rayon);
  font: 500 17px/1.35 var(--police);
  transition: border-color .12s, background .12s;
}
.option:hover { border-color: var(--discret); }
.option.choisie { border-color: var(--couleur, var(--jaune)); background: color-mix(in srgb, var(--couleur, var(--jaune)) 16%, var(--carte)); }
.pied { margin-top: auto; padding-top: 24px; display: flex; gap: 10px; justify-content: space-between; align-items: center; }
.lien-retour { background: none; border: 0; color: var(--discret); font: 500 15px var(--police); cursor: pointer; padding: 12px 4px; }
.accueil-titre { font-size: clamp(32px, 9vw, 44px); font-weight: 700; }
.compteur-texte { align-self: flex-end; font-size: 13px; color: var(--discret); }
.merci svg { width: 100%; max-width: 420px; display: block; margin: 0 auto; }

/* ==========================================================================
   ÉCRAN DU FACILITATEUR
   ========================================================================== */
.bureau { max-width: 980px; margin: 0 auto; padding: 32px 24px 80px; }
.bureau > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
.bureau h1 { font-size: 30px; }
.bloc { background: var(--carte); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 24px; margin-bottom: 20px; }
.bloc h2 { font-size: 20px; margin-bottom: 16px; }
.formulaire { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.formulaire .plein { grid-column: 1 / -1; }
@media (max-width: 640px) { .formulaire { grid-template-columns: 1fr; } }
.atelier { display: grid; gap: 14px; }
.atelier-tete { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; }
.atelier-tete h3 { font-size: 20px; }
.etiquette { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 99px; background: var(--trait); color: var(--discret); }
.etiquette.vive { background: color-mix(in srgb, var(--jaune) 22%, transparent); color: var(--jaune); }
.atelier-chiffres { display: flex; flex-wrap: wrap; gap: 8px 28px; color: var(--discret); font-size: 15px; }
.atelier-chiffres b { color: var(--texte); font-size: 22px; font-weight: 700; margin-right: 6px; font-variant-numeric: tabular-nums; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; color: var(--jaune); font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.connexion { max-width: 400px; margin: 14vh auto 0; padding: 0 24px; display: grid; gap: 16px; }

/* ==========================================================================
   ÉCRAN PROJETÉ
   ========================================================================== */
.ecran { height: 100vh; display: flex; flex-direction: column; padding: 3.2vh 4vw; overflow: hidden; }
.ecran-tete { display: flex; align-items: flex-end; justify-content: space-between; gap: 3vw; margin-bottom: 2.4vh; }
.ecran-tete h1 { font-size: clamp(22px, 2.6vw, 44px); font-weight: 700; }
.ecran-compteur { font-size: clamp(16px, 1.5vw, 24px); color: var(--discret); white-space: nowrap; }
.ecran-compteur b { color: var(--jaune); font-size: 1.7em; font-weight: 700; margin-right: .3em; font-variant-numeric: tabular-nums; }
.ecran-corps { flex: 1; min-height: 0; }

/* Attente : QR code */
.attente { height: 100%; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 6vw; }
.attente .qr { background: #fff; padding: 2.2vh; border-radius: 24px; height: min(68vh, 44vw); aspect-ratio: 1; }
.attente .qr svg { width: 100%; height: 100%; display: block; }
.attente h2 { font-size: clamp(34px, 5vw, 84px); font-weight: 700; margin-bottom: 3vh; }
.attente .lien { font-size: clamp(18px, 2vw, 34px); color: var(--discret); }
.attente .lien b { color: var(--texte); font-weight: 600; }
.attente .gros-code { font-size: clamp(40px, 6vw, 104px); line-height: 1.1; margin-top: 1vh; }
.attente .gros-compteur { margin-top: 5vh; font-size: clamp(20px, 2.2vw, 36px); color: var(--discret); }
.attente .gros-compteur b { color: var(--jaune); font-size: 2.4em; font-weight: 700; margin-right: .25em; font-variant-numeric: tabular-nums; }

/* Onglets des résultats */
.onglets { display: flex; gap: 8px; }
.onglet { appearance: none; border: 0; cursor: pointer; padding: 10px 20px; border-radius: 99px; background: var(--carte); color: var(--discret); font: 600 clamp(13px, 1.1vw, 18px) var(--police); }
.onglet.actif { background: var(--jaune); color: var(--nuit); }

/* Vue 1 : la boussole du groupe */
.vue-boussole { height: 100%; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 4vw; align-items: center; }
.vue-boussole svg { width: 100%; height: 100%; max-height: 80vh; }
.legende { display: grid; gap: 1.6vh; }
.legende-ligne { display: grid; grid-template-columns: auto 1fr auto; gap: 1.2vw; align-items: center; padding: 1.5vh 1.4vw; background: var(--carte); border-radius: var(--rayon); border-left: 6px solid var(--couleur); }
.legende-ligne .nom { font-size: clamp(18px, 1.7vw, 30px); font-weight: 700; }
.legende-ligne .cle { font-size: clamp(12px, 1vw, 17px); color: var(--discret); }
.legende-ligne .score { font-size: clamp(26px, 2.8vw, 50px); font-weight: 700; font-variant-numeric: tabular-nums; }
.legende-ligne .niveau { font-size: clamp(11px, .9vw, 15px); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--discret); text-align: right; }

/* Vue 2 : les écarts */
.vue-ecarts { height: 100%; display: grid; align-content: center; gap: 2.6vh; }
.ecart { display: grid; grid-template-columns: minmax(120px, 15vw) 1fr minmax(110px, 12vw); gap: 2vw; align-items: center; }
.ecart .nom { font-size: clamp(18px, 1.9vw, 34px); font-weight: 700; color: var(--couleur); }
.ecart .piste { position: relative; height: 7vh; min-height: 44px; background: var(--carte); border-radius: 99px; }
.ecart .etendue { position: absolute; top: 0; bottom: 0; border-radius: 99px; background: color-mix(in srgb, var(--couleur) 26%, transparent); }
.ecart .point { position: absolute; top: 50%; width: 2.2vh; height: 2.2vh; min-width: 12px; min-height: 12px; margin: -1.1vh 0 0 -1.1vh; border-radius: 50%; background: var(--couleur); opacity: .9; }
.ecart .point span { position: absolute; bottom: 135%; left: 50%; transform: translateX(-50%); font-size: clamp(10px, .85vw, 15px); white-space: nowrap; color: var(--texte); }
.ecart .moyenne { position: absolute; top: -8px; bottom: -8px; width: 4px; margin-left: -2px; background: var(--texte); border-radius: 2px; }
.ecart .valeur { font-size: clamp(14px, 1.2vw, 20px); color: var(--discret); }
.ecart .valeur b { display: block; color: var(--texte); font-size: 1.7em; font-weight: 700; font-variant-numeric: tabular-nums; }
.echelle { display: grid; grid-template-columns: minmax(120px, 15vw) 1fr minmax(110px, 12vw); gap: 2vw; color: var(--discret); font-size: clamp(11px, .9vw, 15px); }
.echelle div { display: flex; justify-content: space-between; }

/* Vue 3 : les verbatims en post-its */
.vue-verbatims { height: 100%; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19vw), 1fr)); gap: 1.4vw; align-content: start; align-items: start; padding-bottom: 2vh; }
.postit { padding: 1.8vh 1.2vw; border-radius: 6px 6px 18px 6px; background: var(--couleur); color: #111827; box-shadow: 0 8px 20px rgba(0, 0, 0, .35); }
.postit .axe { font-size: clamp(10px, .8vw, 13px); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .7; }
.postit .texte { font-size: clamp(15px, 1.35vw, 24px); font-weight: 500; line-height: 1.3; margin-top: .4em; }
.postit .auteur { font-size: clamp(11px, .9vw, 15px); margin-top: .6em; opacity: .7; }
.vide { height: 100%; display: grid; place-items: center; color: var(--discret); font-size: clamp(18px, 2vw, 30px); }

/* ---------- La boussole dessinée (commune) ---------- */
.b-fond { fill: var(--carte); }
.b-nom { fill: var(--texte); font: 700 20px var(--police); }
.b-score { fill: var(--discret); font: 600 17px var(--police); }
.b-centre-nom { fill: #111827; font: 700 17px var(--police); }
.b-centre-score { fill: #111827; font: 700 30px var(--police); }

/* ==========================================================================
   RESTITUTION CLIENT
   ========================================================================== */
.restitution { max-width: 920px; margin: 0 auto; padding: 24px 24px 80px; }
.r-barre { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 48px; }
.r-tete h1 { font-size: clamp(36px, 7vw, 60px); font-weight: 700; margin: 10px 0 12px; }
.r-texte p + p, .r-bloc p + p { margin-top: .8em; }
.r-texte { margin-top: 16px; }
.r-vue { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: center; margin: 40px 0; }
.r-vue h2 { font-size: 24px; }
.r-dessin svg { width: 100%; display: block; }
@media (max-width: 720px) { .r-vue { grid-template-columns: 1fr; } }
.r-titre { font-size: 28px; margin: 56px 0 20px; }
.r-axe, .r-bloc { background: var(--carte); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 24px; margin-bottom: 16px; break-inside: avoid; }
.r-axe { border-left: 6px solid var(--couleur); }
.r-axe > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.r-axe h3, .r-bloc h3 { font-size: 22px; margin-bottom: 4px; }
.r-score { text-align: right; white-space: nowrap; }
.r-score b { font-size: 40px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; display: block; }
.r-score span { font-size: 13px; color: var(--discret); font-weight: 600; }
.r-jauge { position: relative; height: 12px; border-radius: 99px; background: var(--trait); margin: 18px 0 6px; overflow: hidden; }
.r-jauge .niveau { position: absolute; inset: 0 auto 0 0; background: var(--couleur); border-radius: 99px; }
.r-jauge .etendue { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--couleur) 35%, transparent); }
.r-note { font-size: 14px; color: var(--discret); }
.r-trois { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-top: 20px; }
.r-trois h4 { margin: 0 0 6px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--couleur); }
.r-trois p { font-size: 16px; }
.r-points { margin: 16px 0 0; padding-left: 20px; }
.r-points li + li { margin-top: 4px; }
.r-verbatims { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 20px; }
.r-verbatims blockquote { margin: 0; padding: 12px 14px; border-radius: 4px 4px 14px 4px; background: var(--couleur); color: #111827; font-weight: 500; font-size: 15px; line-height: 1.35; }
.r-etiquettes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.r-etiquettes span { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 99px; background: var(--couleur, var(--trait)); color: #111827; }
.r-etiquettes span:not([style]) { color: var(--discret); }
.r-arbitrage { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--trait); }
.r-plan .r-bloc { display: grid; grid-template-columns: auto 1fr; gap: 18px; }
.r-numero { font-size: 34px; font-weight: 700; line-height: 1; color: var(--jaune); font-variant-numeric: tabular-nums; }
.r-pied { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--trait); color: var(--discret); font-size: 14px; }

/* ---------- Version papier (bouton « Télécharger en PDF ») : fond blanc, encre sombre ---------- */
@media print {
  @page { size: A4; margin: 16mm 14mm; }
  :root { --nuit: #ffffff; --carte: #ffffff; --trait: #d7dce3; --texte: #111827; --discret: #4b5563; --jaune: #1f3a8b; }
  body { font-size: 11.5pt; }
  .restitution { max-width: none; padding: 0; }
  .r-barre .bouton { display: none; }
  .r-barre { margin-bottom: 24px; }
  .r-titre { margin-top: 28px; break-after: avoid; }
  .r-axe, .r-bloc, .r-verbatims blockquote, .r-jauge i, .r-etiquettes span, svg * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .b-fond { fill: #eef1f5; }
}

/* ==========================================================================
   PAGE DE PRÉSENTATION (accueil)
   ========================================================================== */
.accueil { max-width: 1080px; margin: 0 auto; padding: 24px 24px 48px; }
.a-nav { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.a-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: center; padding: 64px 0 40px; }
.a-hero h1 { font-size: clamp(40px, 6.4vw, 72px); font-weight: 700; line-height: 1.04; letter-spacing: -.025em; margin-bottom: 24px; }
.a-chapo { font-size: clamp(18px, 2vw, 22px); color: var(--discret); max-width: 34em; }
.a-chapo + .a-chapo { margin-top: .7em; color: var(--texte); }
.a-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 32px; font-size: 15px; }
.a-dessin svg { width: 100%; display: block; }
.a-section { padding: 56px 0; border-top: 1px solid var(--trait); }
.a-section h2 { font-size: clamp(28px, 4vw, 44px); font-weight: 700; margin-bottom: 28px; max-width: 18em; }
.a-texte { max-width: 40em; font-size: 19px; }
.a-texte p + p { margin-top: 1em; }
.a-axes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.a-axes article, .a-usages article { background: var(--carte); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 24px; }
.a-axes article { border-top: 5px solid var(--couleur); }
.a-axes h3, .a-usages h3 { font-size: 22px; margin-bottom: 8px; }
.a-axes .cle { color: var(--couleur); font-weight: 600; margin-bottom: 10px; }
.a-usages { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.a-usages p + p { margin-top: 14px; }
.a-usages a { font-weight: 600; }
.a-num { font-size: 40px; font-weight: 700; line-height: 1; color: var(--jaune); margin-bottom: 14px; }
.a-code { margin-top: 16px; }
.a-code div { display: flex; gap: 8px; }
.a-code .champ { min-width: 0; }
.a-fin { text-align: center; }
.a-fin h2, .a-fin .a-chapo { margin-left: auto; margin-right: auto; }
.a-fin .a-actions { justify-content: center; }
.a-pied { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 28px; border-top: 1px solid var(--trait); color: var(--discret); font-size: 14px; }
@media (max-width: 760px) {
  .a-hero { grid-template-columns: 1fr; padding-top: 40px; }
  .a-dessin { order: -1; max-width: 360px; margin: 0 auto; }
}

/* Résultat de l'autodiagnostic : même colonne étroite que le questionnaire, cartes empilées. */
.telephone.resultat { max-width: 680px; }
.telephone.resultat .r-axe, .telephone.resultat .r-bloc { margin-bottom: 0; }
.rdv #agenda { margin-top: 12px; }
@media print { .rdv, .pied { display: none !important; } .telephone { max-width: none; padding: 0; } }
