/* Lumi — interface compacte et sobre, contraste AA, rien d'externe. */
:root {
  --fond: #f4f5f7;
  --surface: #ffffff;
  --texte: #1b1f24;
  --doux: #5d6570;
  --bord: #e2e5ea;
  --bleu: #2d5bd3;
  --bleu-fonce: #1f44a8;
  --bleu-pale: #edf2fd;
  --ambre: #f4b740;
  --rouge: #c0352a;
  --rouge-fonce: #962519;
  --rouge-pale: #fdeeed;
  --vert: #1f7a4a;
  --vert-fonce: #155c37;
  --vert-pale: #e9f6ef;
  --orange: #94530a;
  --orange-pale: #fdf3e2;
  --rayon: 14px;
  --ombre: 0 1px 2px rgba(20, 25, 35, .06), 0 4px 14px rgba(20, 25, 35, .06);
}
* { box-sizing: border-box; }
html { font-size: 17px; }
body {
  margin: 0; background: var(--fond); color: var(--texte);
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  line-height: 1.5; -webkit-font-smoothing: antialiased;
}
h1 { font-size: 1.35rem; line-height: 1.25; margin: 0 0 .5rem; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; line-height: 1.3; margin: 0 0 .4rem; }
p { margin: .3rem 0 .6rem; }
a { color: var(--bleu-fonce); }
.cache { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--ambre); outline-offset: 2px; }

/* En-tête : logo, statut discret, bouton d'arrêt toujours visible */
.barre {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: .55rem;
  padding: .5rem .75rem; background: rgba(255, 255, 255, .92); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--bord);
}
.logo { width: 30px; height: 30px; flex: none; }
.marque { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.15; }
.barre .titre { font-weight: 700; font-size: 1rem; }
.etat { display: flex; align-items: center; gap: .35rem; font-size: .78rem; color: var(--doux); min-height: 1em; }
.pastille { width: .55rem; height: .55rem; border-radius: 50%; background: #a4abb5; flex: none; }
.pastille.ok { background: #2e9d5f; box-shadow: 0 0 0 3px rgba(46, 157, 95, .18); }
.pastille.attente { background: #d9901c; box-shadow: 0 0 0 3px rgba(217, 144, 28, .18); }
.btn-stop {
  display: inline-flex; align-items: center; gap: .4rem; background: var(--rouge); color: #fff;
  border: 0; border-radius: 999px; font: inherit; font-size: .85rem; font-weight: 700;
  padding: .45rem .85rem; min-height: 40px; cursor: pointer; box-shadow: 0 2px 6px rgba(192, 53, 42, .3);
}
.btn-stop::before { content: ""; width: .6rem; height: .6rem; border-radius: 2px; background: #fff; }
.btn-stop:hover { background: var(--rouge-fonce); }

main { max-width: 640px; margin: 0 auto; padding: .9rem .8rem 7.5rem; }
.carte {
  background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon);
  padding: .9rem 1rem; margin: 0 0 .8rem; box-shadow: var(--ombre);
}
.accueil-tete { display: flex; align-items: center; gap: .7rem; margin-bottom: .6rem; }
.accueil-tete .logo { width: 44px; height: 44px; }

/* Boutons */
button, .btn { font: inherit; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; text-decoration: none;
  min-height: 48px; padding: .5rem 1.1rem; border-radius: 12px; border: 1.5px solid transparent;
  font-size: 1rem; font-weight: 650; cursor: pointer; text-align: center; transition: background .15s, border-color .15s;
}
.btn-principal { background: var(--bleu); color: #fff; }
.btn-principal:hover { background: var(--bleu-fonce); }
.btn-second { background: var(--surface); color: var(--texte); border-color: #c9ced6; }
.btn-second:hover { background: #f1f3f6; }
.btn-oui { background: var(--vert); color: #fff; }
.btn-oui:hover { background: var(--vert-fonce); }
.btn-non { background: var(--surface); color: var(--rouge-fonce); border-color: #e3a49e; }
.btn-non:hover { background: var(--rouge-pale); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.boutons { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: .7rem; }
.boutons .btn { flex: 1 1 9rem; }

/* Formulaires */
label { display: block; font-weight: 650; font-size: .9rem; margin-bottom: .25rem; }
input[type=password], input[type=text], textarea {
  width: 100%; font: inherit; font-size: 1rem; padding: .6rem .75rem; border: 1.5px solid #c9ced6;
  border-radius: 12px; background: #fff; color: var(--texte); transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 5.5rem; resize: vertical; }
input:focus, textarea:focus { outline: none; border-color: var(--bleu); box-shadow: 0 0 0 3px rgba(45, 91, 211, .18); }
.aide-champ { color: var(--doux); font-size: .82rem; }
.erreur { color: var(--rouge-fonce); font-weight: 650; font-size: .9rem; }
.case { display: flex; align-items: center; gap: .45rem; font-weight: 400; margin-top: .45rem; font-size: .85rem; }
.case input { width: 1.1rem; height: 1.1rem; }

/* Exemples de problèmes */
.exemples { display: flex; flex-wrap: wrap; gap: .4rem; margin: .6rem 0; }
.exemple {
  font: inherit; font-size: .85rem; background: var(--bleu-pale); color: var(--bleu-fonce);
  border: 1px solid #d3def8; border-radius: 999px; padding: .35rem .75rem; cursor: pointer; min-height: 36px;
}
.exemple:hover { background: #dfe8fb; }

/* Conversation */
.fil { display: flex; flex-direction: column; gap: .6rem; }
.bulle { max-width: 88%; padding: .6rem .85rem; border-radius: 16px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .97rem; }
.bulle.aide { background: var(--surface); border: 1px solid var(--bord); align-self: flex-start; border-bottom-left-radius: 5px; box-shadow: var(--ombre); }
.bulle.maman { background: var(--bleu); color: #fff; align-self: flex-end; border-bottom-right-radius: 5px; }
.bulle .qui { display: block; font-size: .72rem; font-weight: 700; color: var(--doux); margin-bottom: .1rem; }
.bulle.maman .qui { color: rgba(255, 255, 255, .8); }
.activite { display: flex; align-items: center; gap: .5rem; color: var(--doux); font-size: .88rem; min-height: 1.6rem; margin-top: .4rem; }
.rond { width: .9rem; height: .9rem; border-radius: 50%; border: 2.5px solid #d3d8df; border-top-color: var(--bleu); animation: tourne 1s linear infinite; flex: none; }
@keyframes tourne { to { transform: rotate(360deg); } }
.fil > .carte { margin: 0; padding: .65rem .85rem; font-size: .93rem; box-shadow: none; }
.info { border-left: 4px solid var(--bleu); background: var(--bleu-pale); }
.ok-fait { border-left: 4px solid var(--vert); background: var(--vert-pale); }
.bloque { border-left: 4px solid var(--rouge); background: var(--rouge-pale); }

/* Demandes d'accord */
.fil > .demande { padding: .85rem .95rem; box-shadow: var(--ombre); border-width: 1.5px; }
.demande.r-aucun, .demande.r-faible { border-color: #a8d5bc; }
.demande.r-moyen { border-color: #ecc58a; }
.demande.r-eleve { border-color: #e7a39c; }
.badge {
  display: inline-flex; align-items: center; gap: .3rem; font-weight: 700; font-size: .78rem;
  border-radius: 999px; padding: .15rem .6rem; margin-bottom: .45rem;
}
.badge.r-aucun, .badge.r-faible { color: var(--vert); background: var(--vert-pale); }
.badge.r-moyen { color: var(--orange); background: var(--orange-pale); }
.badge.r-eleve { color: var(--rouge-fonce); background: var(--rouge-pale); }
.demande .je-voudrais { font-size: .78rem; font-weight: 650; color: var(--doux); margin: 0; text-transform: uppercase; letter-spacing: .04em; }
.demande .quoi { font-size: 1.05rem; font-weight: 700; margin: .1rem 0 .45rem; }
.demande h2 { font-size: 1.05rem; }
.encadre { border-radius: 10px; padding: .5rem .7rem; margin: .45rem 0; font-size: .92rem; }
.encadre.prudence { background: var(--orange-pale); }
.encadre.sensible { background: var(--rouge-pale); font-weight: 650; }
.encadre.windows { background: var(--bleu-pale); }
.etiquette { font-weight: 650; }
.demande .boutons { flex-direction: row-reverse; }
details { margin-top: .55rem; font-size: .78rem; color: var(--doux); }
details summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; }
details pre { white-space: pre-wrap; overflow-wrap: anywhere; background: #f3f5f8; padding: .5rem; border-radius: 8px; max-height: 14rem; overflow: auto; }
.issue { font-weight: 650; margin-top: .5rem; font-size: .9rem; }
.issue.oui { color: var(--vert); }
.issue.non { color: var(--rouge-fonce); }

/* Zone de saisie en bas */
.saisie {
  position: fixed; left: 0; right: 0; bottom: 0; background: rgba(255, 255, 255, .95); backdrop-filter: blur(6px);
  border-top: 1px solid var(--bord); padding: .55rem .75rem .5rem;
}
.saisie form { max-width: 640px; margin: 0 auto; display: flex; gap: .5rem; align-items: flex-end; }
.saisie textarea { min-height: 46px; height: 46px; border-radius: 23px; padding: .6rem 1rem; resize: none; }
.saisie .btn { min-width: 5.5rem; min-height: 46px; border-radius: 23px; }
.saisie .regle { max-width: 640px; margin: .35rem auto 0; display: flex; justify-content: center; }
.saisie .regle .btn { min-height: 34px; font-size: .85rem; font-weight: 600; padding: .3rem .9rem; border-radius: 999px; }

/* Portail : schémas SmartScreen dessinés en HTML */
.etapes { counter-reset: etape; list-style: none; padding: 0; margin: .6rem 0 0; }
.etapes > li { counter-increment: etape; position: relative; padding-left: 2.6rem; margin-bottom: 1.1rem; }
.etapes > li::before {
  content: counter(etape); position: absolute; left: 0; top: 0; width: 1.8rem; height: 1.8rem; border-radius: 50%;
  background: var(--bleu); color: #fff; font-weight: 700; font-size: .9rem; display: flex; align-items: center; justify-content: center;
}
.ecran { border: 1px solid #b8c0cb; border-radius: 8px; overflow: hidden; margin: .5rem 0; font-family: "Segoe UI", Arial, sans-serif; font-size: .72rem; background: #fff; max-width: 26rem; }
.ecran .entete { background: #eef1f5; padding: .25rem .55rem; color: #33404d; font-weight: 600; }
.ecran .corps { padding: .6rem .7rem; }
.ecran.smartscreen .corps { background: #0f5ea8; color: #fff; }
.ecran.smartscreen .gros { font-size: 1rem; font-weight: 300; margin: 0 0 .35rem; }
.faux-bouton { display: inline-block; border: 1px solid #7b8794; border-radius: 4px; padding: .1rem .5rem; background: #f3f5f7; color: #1c2a36; margin: .2rem .3rem .2rem 0; }
.faux-lien { color: #fff; text-decoration: underline; font-weight: 600; }
.cible { outline: 3px solid var(--ambre); outline-offset: 2px; }
.regle-or { border: 1.5px solid #e3a49e; background: var(--rouge-pale); border-radius: 12px; padding: .7rem .85rem; font-weight: 600; font-size: .93rem; }

@media (max-width: 420px) {
  html { font-size: 16px; }
  main { padding-left: .6rem; padding-right: .6rem; }
}
@media (prefers-reduced-motion: reduce) {
  .rond { animation: none; border-top-color: #d3d8df; }
  * { transition: none !important; scroll-behavior: auto !important; }
}
