/* Vue participant : téléphone d'abord, utilisable d'une main. Texte de 16 px minimum. */
body { min-height: 100dvh; font-size: 18px; }

.barre { position: sticky; top: 0; z-index: 5; background: var(--fond); }
.barre-ligne { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 16px 6px;
  font-size: 16px; color: var(--vert); font-weight: 600; }
#minuteur { font-variant-numeric: tabular-nums; }
#reseau { margin: 0; padding: 10px 16px; background: var(--lie); color: #fff; font-size: 16px; }

.chargement { padding: 24px 16px; color: var(--neutre); }
.ecran .corps { padding: 12px 16px calc(132px + env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto; }
.ecran h1 { font-size: 30px; margin-top: 8px; }
.consigne { margin: 0 0 18px; }
.discret { color: #56605A; font-size: 16px; }
.mention { color: #56605A; font-size: 16px; margin-top: 20px; }
.erreur { color: var(--lie); font-size: 16px; min-height: 1.4em; margin: 8px 0 0; font-weight: 600; }
.etiquette { margin: 0 0 4px; font-size: 16px; font-weight: 700; color: var(--vert); }
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
label { display: block; font-weight: 600; margin: 16px 0 6px; font-size: 16px; }

/* Action principale fixée en bas, sous le pouce */
.actions { position: fixed; z-index: 10; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
  display: grid; gap: 6px; background: linear-gradient(to bottom, rgba(242, 244, 238, 0), var(--fond) 30%); }
.actions > * { max-width: 528px; width: 100%; margin: 0 auto; }
button { cursor: pointer; }
button.principal { min-height: 58px; border: 0; border-radius: var(--r); background: var(--vert); color: #fff;
  font-size: 19px; font-weight: 700; }
button.principal:disabled { background: var(--trait); color: #56605A; }
button.principal:active:not(:disabled) { background: #163A2E; }
button.lien { background: none; border: 0; color: var(--vert); font-size: 17px; font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px; min-height: 44px; padding: 6px 0; justify-self: start; }
.actions button.lien { justify-self: center; }

.grand { display: block; width: 100%; font-size: 18px; padding: 14px; border: 2px solid var(--trait);
  border-radius: var(--r); background: var(--carte); }
.grand:focus { border-color: var(--vert); outline: none; }
textarea.grand { resize: vertical; line-height: 1.4; }
select.grand { appearance: none; background: var(--carte) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%231E4A3B' stroke-width='2.5' fill='none'/%3E%3C/svg%3E") right 16px center no-repeat; padding-right: 44px; }
input.code { font: 800 28px var(--titre); letter-spacing: .25em; text-transform: uppercase; text-align: center; }

.carte { background: var(--carte); border-radius: var(--r); padding: 14px 16px; margin: 0 0 12px; }
.carte p { margin: 0 0 4px; }
blockquote.defi { margin: 0 0 16px; padding: 12px 14px; background: var(--carte); border-left: 5px solid var(--vert); border-radius: 0 var(--r) var(--r) 0; }

/* Classement par glisser-déposer */
.classement { list-style: none; margin: 0; padding: 0; counter-reset: rang; }
.classement li { counter-increment: rang; display: flex; align-items: center; gap: 12px; min-height: 56px;
  margin-bottom: 8px; padding: 8px 12px; background: var(--carte); border: 2px solid transparent; border-radius: var(--r);
  touch-action: none; user-select: none; -webkit-user-select: none; position: relative; }
.classement .rang::before { content: counter(rang); display: grid; place-items: center; width: 32px; height: 32px;
  border-radius: 50%; background: var(--fond); font: 800 17px var(--titre); }
.classement li:nth-child(-n+2) { border-color: var(--ocre); }
.classement li:nth-child(-n+2) .rang::before { background: var(--ocre); color: var(--encre); }
.classement li:nth-child(2) { margin-bottom: 30px; }
.classement li:nth-child(2)::after { content: 'Vos 2 défis porteront sur ces deux sujets'; position: absolute; left: 4px;
  top: calc(100% + 6px); font-size: 16px; color: #56605A; pointer-events: none; }
.classement .libelle { flex: 1; font-weight: 600; }
.classement .poignee { width: 22px; height: 16px; background: linear-gradient(var(--neutre) 0 0) 0 0 / 100% 2.5px,
  linear-gradient(var(--neutre) 0 0) 0 50% / 100% 2.5px, linear-gradient(var(--neutre) 0 0) 0 100% / 100% 2.5px; background-repeat: no-repeat; }
.classement li.saisi { z-index: 2; box-shadow: 0 8px 24px rgba(23, 34, 29, .25); border-color: var(--vert); }

/* Matrice impact × facilité */
.matrice { display: grid; grid-template-columns: 26px 1fr; grid-template-rows: auto 26px; gap: 4px; max-width: 420px; }
.axe { font-size: 16px; font-weight: 700; color: var(--vert); }
.axe-y { writing-mode: vertical-rl; transform: rotate(180deg); text-align: left; }
.axe-x { grid-column: 2; text-align: right; }
.grille { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.case { aspect-ratio: 1; min-height: 44px; border: 2px solid var(--trait); border-radius: 6px; background: var(--carte);
  display: grid; place-items: center; padding: 0; }
.case:disabled { cursor: default; }
.case[aria-pressed="true"] { background: var(--ocre); border-color: var(--encre); }
.losange { display: inline-grid; place-items: center; width: 26px; height: 26px; font: 800 15px var(--titre); color: #fff; position: relative; }
.losange::before { content: ''; position: absolute; inset: 3px; background: var(--vert); transform: rotate(45deg); border-radius: 2px; z-index: -1; }
.losange { z-index: 0; }
.losange.petit { width: 22px; height: 22px; font-size: 13px; vertical-align: middle; }

/* Trios */
.membres { list-style: none; padding: 0; margin: 0 0 16px; }
.membres li { background: var(--carte); border-radius: var(--r); padding: 12px 14px; margin-bottom: 8px; }
.membres li span { color: #56605A; }
.membres li.moi { border-left: 5px solid var(--ocre); }
.mon-qr { margin: 0 auto; max-width: 300px; text-align: center; }
.qr { background: #fff; border-radius: var(--r); padding: 8px; }
.qr svg { display: block; width: 100%; height: auto; }
.mon-qr figcaption { margin-top: 10px; font-size: 18px; }
.code { font: 800 30px var(--titre); letter-spacing: .2em; }
.accueillir summary { color: var(--vert); font-weight: 600; min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.camera { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r); background: var(--encre); }

/* Losanges : position de départ (vide) et changement de dimension validé (ocre) */
.losange.fantome::before { background: transparent; border: 2.5px solid var(--neutre); }
.losange.ocre { color: var(--encre); }
.losange.ocre::before { background: var(--ocre); outline: 2px solid var(--encre); }
.case { gap: 2px; grid-auto-flow: column; }
.case[aria-pressed="true"] .losange.fantome::before { border-color: var(--encre); }

/* Phase 1d : idées */
.idees-ecrites:not(:empty) { margin: 0 0 8px; }
.idee-envoyee { margin: 0 0 8px; padding: 10px 14px; background: var(--vert-clair); border-radius: var(--r); }
.idee-envoyee::before { content: 'Envoyée : '; font-weight: 700; color: var(--vert); }

/* Phase 1e : idées reçues et choix du type de changement */
.carte.idee { display: grid; gap: 4px; }
button.retenir { justify-self: start; margin-top: 6px; min-height: 44px; padding: 8px 16px; border-radius: 999px;
  border: 2px solid var(--vert); background: var(--carte); color: var(--vert); font-weight: 700; font-size: 16px; }
button.retenir[aria-pressed="true"] { background: var(--vert); color: #fff; }
button.retenir[aria-pressed="true"]::before { content: '✓ '; }
.options { display: grid; gap: 10px; }
.option { text-align: left; display: grid; gap: 2px; padding: 14px 16px; min-height: 64px; border-radius: var(--r);
  border: 2px solid var(--trait); background: var(--carte); }
.option strong { font-size: 18px; }
.option span { font-size: 16px; color: #56605A; }
.option[aria-checked="true"] { border-color: var(--encre); background: var(--ocre-clair); box-shadow: inset 6px 0 0 var(--ocre); }

/* Phase 1f : points */
.score { margin: 8px 0 4px; font-size: 20px; }
.score strong { font: 800 72px/1 var(--titre); color: var(--vert); margin-right: 8px; }
.rang { font: 800 24px var(--titre); margin: 8px 0 16px; }

/* Matrice libre : le point se pose au doigt et se glisse ; axes nommés par leurs extrémités */
.matrice-libre { display: grid; grid-template-columns: 30px minmax(0, 1fr); grid-template-rows: auto auto; gap: 4px 6px;
  max-width: 440px; margin: 0 auto 8px; user-select: none; -webkit-user-select: none; }
.cadre-matrice { position: relative; aspect-ratio: 1; background: var(--carte); border-radius: 12px;
  border: 2px solid var(--trait); }
.quadrillage, .zone-matrice { position: absolute; inset: 20px; }
.quadrillage { background:
  linear-gradient(to right, var(--fond) 2px, transparent 2px) 0 0 / 25% 100%,
  linear-gradient(to bottom, var(--fond) 2px, transparent 2px) 0 0 / 100% 25%;
  border-right: 2px solid var(--fond); border-bottom: 2px solid var(--fond); }
/* Coin « fort impact, facile » légèrement teinté : là où l'on veut amener les défis */
.quadrillage::after { content: ''; position: absolute; right: 0; top: 0; width: 50%; height: 50%;
  background: linear-gradient(225deg, var(--ocre-clair), transparent 70%); opacity: .7; }
.zone-matrice { touch-action: none; cursor: crosshair; }
.zone-matrice[role="img"] { cursor: default; }
.fleches-matrice { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.fleches-matrice .trait { stroke: var(--encre); stroke-width: 2.5; stroke-dasharray: 5 4; }
.repere { position: absolute; width: 40px; height: 40px; transform: translate(-50%, -50%); padding: 0; border: 0;
  background: none; display: grid; place-items: center; z-index: 1; touch-action: none; }
.repere::before { content: ''; position: absolute; inset: 7px; transform: rotate(45deg); border-radius: 3px;
  background: var(--vert); box-shadow: 0 2px 6px rgba(23, 34, 29, .3); }
.repere > span { position: relative; color: #fff; font: 800 15px var(--titre); }
/* Point actif : vert avec un anneau (l'ocre est réservé aux changements de dimension validés) */
.repere.actif::before { outline: 3px solid var(--encre); outline-offset: 3px; }
.repere.actif { z-index: 2; }
.repere.ocre::before { background: var(--ocre); outline: 2px solid var(--encre); }
.repere.ocre > span { color: var(--encre); }
.repere.fantome { width: 30px; height: 30px; z-index: 0; pointer-events: none; }
.repere.fantome::before { inset: 6px; background: transparent; border: 2.5px solid var(--neutre); box-shadow: none; }
.axe-libre { display: flex; justify-content: space-between; align-items: center; font-size: 16px; color: var(--vert); }
.axe-libre > span { font-weight: 700; }
.axe-libre small { font-size: 16px; color: #56605A; }
.axe-impact { grid-row: 1; grid-column: 1; writing-mode: vertical-rl; transform: rotate(180deg); padding: 20px 0; }
.axe-impact .haut { order: 3; }
.axe-impact .bas { order: -1; }
.axe-facilite { grid-row: 2; grid-column: 2; padding: 0 20px; }

/* Une carte par défi sous la matrice : la toucher rend son point actif */
.carte-placement { background: var(--carte); border-radius: var(--r); padding: 12px 14px; margin: 0 0 12px;
  border: 2px solid transparent; }
.carte-placement.actif { border-color: var(--ocre); }
.carte-placement .tete { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left;
  background: none; border: 0; padding: 0; }
.carte-placement .tete .repere { position: relative; left: auto; top: auto; transform: none; flex: none; width: 34px; height: 34px; }
.carte-placement .tete p { margin: 0; }
.carte-placement .valeurs { font-size: 16px; color: #56605A; margin: 6px 0 4px; }
.carte-placement textarea { margin-top: 6px; }
.carte-placement label { margin: 10px 0 4px; }

/* Phase 1 : questions de l'entretien et suivi du tour */
.questions { margin: 0 0 16px; padding-left: 1.4em; display: grid; gap: 12px; }
.questions li { font-size: 20px; line-height: 1.35; font-weight: 600; }
.questions li::marker { color: var(--vert); font-weight: 800; }
.questions-repliees { margin: 0 0 14px; background: var(--carte); border-radius: var(--r); padding: 8px 14px; }
.questions-repliees summary { min-height: 44px; display: flex; align-items: center; font-weight: 700; color: var(--vert); cursor: pointer; }
.questions-repliees .questions li { font-size: 17px; }
.etat-tour { margin: 0 0 12px; padding: 10px 14px; background: var(--vert-clair); border-radius: var(--r); font-size: 16px; }
button.principal.alerte { background: var(--lie); }

.classement[data-pour="autre"] li:nth-child(2)::after { content: 'Ses 2 défis porteront sur ces deux sujets'; }

/* --- Groupes thématiques ------------------------------------------------------------------ */
.bloc-animation { margin: 16px 0; padding: 12px 14px; border-radius: var(--r); background: var(--carte);
  box-shadow: inset 5px 0 0 var(--ocre); }
.bloc-animation p { margin: 0 0 8px; }
.relances { margin: 0 0 8px; padding-left: 1.2em; }
.relances li { margin-bottom: 6px; font-weight: 600; }
.deroule { margin: 4px 0 0; padding-left: 1.4em; font-size: 16px; color: #56605A; }

.cartes-vote, .cartes-idees { display: grid; gap: 10px; margin-bottom: 12px; }
.carte-vote { display: block; width: 100%; text-align: left; padding: 12px 14px; border-radius: var(--r);
  background: var(--carte); border: 2px solid var(--trait); }
.carte-vote[role="button"] { cursor: pointer; }
.carte-vote[aria-pressed="true"] { border-color: var(--encre); background: var(--ocre-clair); box-shadow: inset 6px 0 0 var(--ocre); }
.carte-vote p { margin: 0 0 4px; }
.auteurs { font-size: 16px; color: #56605A; }
.fusionnes { margin: 6px 0 0; padding-left: 1.2em; font-size: 16px; color: #56605A; }

.minuteur-orateur { font: 800 28px var(--titre); margin: 0 0 8px; font-variant-numeric: tabular-nums; }
.ordre { padding-left: 1.4em; margin: 0 0 12px; }
.ordre li { padding: 6px 0; }
.ordre li.actif { font-weight: 700; color: var(--vert); }
.ordre li.passe { color: var(--neutre); text-decoration: line-through; }

.leviers { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.levier { min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 2px solid var(--vert); background: var(--carte);
  color: var(--vert); font-weight: 700; font-size: 16px; }
.levier[aria-checked="true"] { background: var(--vert); color: #fff; }
.levier:disabled { opacity: .6; }
.badge-levier { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--vert-clair); color: var(--vert);
  font-size: 14px; font-weight: 700; vertical-align: 2px; }

.carte-idee { background: var(--carte); border-radius: var(--r); padding: 12px 14px; border: 2px solid transparent; }
.carte-idee.retenue { border-color: var(--ocre); }
.carte-idee p { margin: 0 0 6px; }
.actions-idee { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
button.plus { min-height: 44px; min-width: 76px; padding: 6px 14px; border-radius: 999px; border: 2px solid var(--vert);
  background: var(--carte); color: var(--vert); font-weight: 800; font-size: 16px; }
button.plus[aria-pressed="true"] { background: var(--vert); color: #fff; }

.champ-fiche { margin-bottom: 14px; }
.champ-fiche label { margin-top: 0; }
.champ-fiche .aide { margin: 0 0 6px; font-size: 16px; color: #56605A; }
.champ-fiche.porteur { padding: 10px 12px; border-radius: var(--r); background: var(--vert-clair); }
textarea.grand[readonly], input.grand[readonly] { background: var(--fond); border-style: dashed; }
.porteurs { list-style: none; margin: 0; padding: 0; font-size: 16px; }
.porteurs li { padding: 4px 0; }
.phrase-restitution { font-size: 20px; line-height: 1.45; background: var(--carte); padding: 14px 16px; border-radius: var(--r); }
