/* =====================================================================
   LOCUTO — APPARENCE (valeurs reprises des maquettes)
   ===================================================================== */

@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/plus-jakarta-sans-500.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/plus-jakarta-sans-600.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/plus-jakarta-sans-700.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 800; font-display: swap; src: url('../fonts/plus-jakarta-sans-800.woff2') format('woff2'); }

:root {
  --blanc: #FFFFFF;
  --clair: #F3F4F8;       /* pastilles et cartes */
  --piste: #EEF0F4;       /* piste de la barre de progression */
  --encre: #14140F;       /* texte principal */
  --discret: #667085;     /* texte discret */
  --citron: #C4F01A;      /* accent, boutons, réponse juste */
  --definition: #F4FCD6;  /* bloc de définition */
  --duree: 180ms;
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--blanc);
  color: var(--encre);
  font-family: 'Plus Jakarta Sans', -apple-system, 'Segoe UI', sans-serif;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button { font: inherit; color: inherit; margin: 0; }
a { color: inherit; text-decoration: none; }
h1, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }

/* Focus visible au clavier */
:focus-visible { outline: 3px solid var(--encre); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }

[hidden] { display: none !important; }

.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;
}

/* ---------- Colonne (mobile d'abord, ~440 px centrée sur grand écran) ---------- */

.colonne {
  max-width: 440px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: max(28px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(32px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
}

.entree { animation: apparition var(--duree) ease-out both; }
@keyframes apparition { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.pousse { flex-grow: 1; }

/* ---------- Logo ---------- */

.logo {
  display: inline-flex; align-items: center; gap: 10px;
  align-self: flex-start;
  min-height: 44px; margin: -7px 0; /* cible tactile de 44 px sans décaler la mise en page */
  border-radius: 10px;
}
.logo-marque {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--citron); color: var(--encre);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 800;
}
.logo-nom { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }

/* ---------- Textes ---------- */

.intro { margin-top: 56px; }
.titre { font-size: 34px; line-height: 1.12; font-weight: 800; letter-spacing: -0.02em; }
.sous-titre { font-size: 16px; line-height: 1.5; color: var(--discret); margin-top: 12px; }

/* ---------- Accueil ---------- */

.atouts { display: flex; flex-direction: column; gap: 8px; margin-top: 36px; }
.atouts li {
  display: flex; align-items: center; gap: 14px;
  height: 54px; padding: 0 18px; border-radius: 14px;
  background: var(--clair); font-size: 16px; font-weight: 600;
}
.atouts svg { flex-shrink: 0; }

.carte-meilleur { margin-top: 32px; background: var(--clair); border-radius: 16px; padding: 20px 22px 22px; }
.carte-etiquette { font-size: 13px; font-weight: 500; color: var(--discret); }
.carte-nom { font-size: 26px; line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; margin-top: 8px; }

.jauge { display: flex; gap: 6px; }
.jauge span { flex-grow: 1; height: 10px; border-radius: 5px; background: var(--piste); }
.jauge span.plein { background: var(--citron); }
.carte-meilleur .jauge { margin-top: 18px; }
.carte-meilleur .jauge span { background: var(--blanc); }
.carte-meilleur .jauge span.plein { background: var(--citron); }
.jauge-texte { font-size: 13px; font-weight: 600; color: var(--discret); margin-top: 10px; }

/* ---------- Boutons ---------- */

.actions { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 32px; }
.actions.large { gap: 14px; }

.bouton {
  width: 100%; height: 56px; border: 0; border-radius: 14px;
  background: var(--citron); color: var(--encre);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700; cursor: pointer;
  transition: filter var(--duree);
}
.bouton-secondaire { height: 52px; background: var(--clair); font-size: 16px; font-weight: 600; }
@media (hover: hover) { .bouton:hover { filter: brightness(0.96); } }

.note { font-size: 13px; color: var(--discret); margin-top: 4px; text-align: center; }

/* ---------- Question ---------- */

.entete { display: flex; align-items: center; gap: 14px; }
.progression { flex-grow: 1; height: 6px; border-radius: 3px; background: var(--piste); overflow: hidden; }
.progression-remplie { height: 100%; border-radius: 3px; background: var(--citron); transition: width 200ms ease-out; }
.compteur {
  background: var(--clair); border-radius: 999px; padding: 7px 14px;
  font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums;
}

.definition-bloc { margin-top: 40px; background: var(--definition); border-radius: 16px; padding: 20px 22px 24px; }
.groupe { font-size: 13px; font-weight: 500; color: var(--discret); }
.definition { font-size: 25px; line-height: 1.25; font-weight: 800; letter-spacing: -0.02em; margin-top: 10px; }

.propositions { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }
.proposition {
  position: relative; width: 100%; min-height: 54px; padding: 0 52px;
  border: 0; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--clair); color: var(--encre);
  font-size: 17px; font-weight: 600; cursor: pointer;
  transition: background-color 150ms, color 150ms, opacity 150ms;
}
@media (hover: hover) { .propositions:not(.verrouille) .proposition:hover { background: #E7E9EF; } }
.proposition .icone { position: absolute; right: 18px; display: flex; }
.proposition.juste { background: var(--citron); color: var(--encre); font-weight: 700; }
.proposition.fausse { background: var(--encre); color: var(--blanc); font-weight: 700; }
.proposition.attenuee { opacity: 0.5; }
.verrouille .proposition, .verrouille + .je-ne-sais-pas { cursor: default; }

.je-ne-sais-pas {
  align-self: center; margin-top: 10px; min-height: 44px; padding: 12px 20px;
  background: none; border: 0; border-radius: 10px;
  font-size: 14px; font-weight: 600; color: var(--discret); cursor: pointer;
  transition: opacity 150ms;
}
.je-ne-sais-pas.attenuee { opacity: 0.5; }

/* ---------- Résultat ---------- */

.ligne-etiquette { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 26px; }
.etiquette-niveau { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--discret); }
.pastille-record { background: var(--citron); border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.resultat .titre { margin-top: 10px; }
.resultat .sous-titre { margin-top: 10px; }
.bloc-jauge { margin-top: 32px; }

.stats { display: flex; gap: 8px; margin-top: 28px; }
.stat { flex: 1 1 0; min-width: 0; background: var(--clair); border-radius: 14px; padding: 18px 18px 16px; }
.stat-valeur { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-texte { font-size: 13px; color: var(--discret); margin-top: 4px; }

/* ---------- Chargement / erreur ---------- */

.message-centre { flex-grow: 1; display: flex; flex-direction: column; justify-content: center; gap: 20px; text-align: center; }
.message-centre p { font-size: 16px; line-height: 1.5; color: var(--discret); }
.chargement { opacity: 0; animation: apparition var(--duree) ease-out 400ms forwards; }

/* ---------- Panneau de partage (ordinateur) ---------- */

.panneau {
  width: calc(100% - 32px); max-width: 392px; max-height: calc(100dvh - 32px);
  border: 0; border-radius: 16px; padding: 0;
  background: var(--blanc); color: var(--encre);
}
.panneau-contenu { padding: 22px; }
.panneau::backdrop { background: rgba(20, 20, 15, 0.45); }
.panneau[open] { animation: apparition var(--duree) ease-out; }
.panneau-titre { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.panneau-apercu {
  display: block; margin: 16px auto 0; width: auto; max-width: 100%;
  height: 36vh; max-height: 300px; border-radius: 12px; background: var(--citron);
}
.panneau .actions { margin-top: 18px; }
.panneau-statut { min-height: 20px; font-size: 13px; font-weight: 600; color: var(--discret); text-align: center; }
.lien-discret {
  min-height: 44px; padding: 12px 20px; background: none; border: 0; border-radius: 10px;
  font-size: 14px; font-weight: 600; color: var(--discret); cursor: pointer;
}

/* ---------- Petits écrans en hauteur (ex. iPhone SE) ---------- */

@media (max-height: 740px) {
  .intro { margin-top: 36px; }
  .atouts { margin-top: 28px; }
  .definition-bloc { margin-top: 24px; padding: 16px 20px 20px; }
  .definition { font-size: 22px; margin-top: 8px; }
  .propositions { margin-top: 20px; }
}

/* ---------- Mouvements réduits ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .chargement { opacity: 1; }
}
