:root {
  --fond: #f4f6f9; --carte: #fff; --texte: #1d2733; --discret: #66727f; --bord: #d9dee5;
  --accent: #1f5fa8; --accent-fonce: #174a84; --rouge: #c0392b; --jaune: #fff6dd;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-family: -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--fond); color: var(--texte); font-size: 16px; }
body.centre { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
header { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; background: var(--carte); border-bottom: 1px solid var(--bord); }
header h1 { font-size: 1.25rem; margin: 0; }
main { max-width: 820px; margin: 0 auto; padding: 20px 16px 60px; }
.carte { background: var(--carte); border: 1px solid var(--bord); border-radius: 12px; padding: 20px; margin-bottom: 20px; }
.carte h2 { margin: 0 0 6px; font-size: 1.1rem; }
.connexion { width: 100%; max-width: 340px; text-align: center; }
.connexion input { margin: 12px 0; text-align: center; }
.discret { color: var(--discret); font-size: .88rem; margin: 4px 0 12px; }
a.discret { text-decoration: none; }
.erreur { color: var(--rouge); }
.avertissement { background: var(--jaune); border: 1px solid #f0d58a; border-radius: 8px; padding: 10px 12px; }
textarea, input, select { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--bord); border-radius: 8px; background: #fff; color: inherit; }
textarea { resize: vertical; line-height: 1.5; }
textarea:focus, input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.micro-zone { display: flex; align-items: center; gap: 16px; margin: 8px 0 14px; }
.micro { width: 72px; height: 72px; border-radius: 50%; border: none; font-size: 2rem; background: var(--accent); color: #fff; cursor: pointer; flex-shrink: 0; box-shadow: 0 2px 8px rgba(31,95,168,.3); }
.micro:disabled { background: #b5bec9; cursor: not-allowed; box-shadow: none; }
.micro.actif { background: var(--rouge); animation: pulse 1.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(192,57,43,.5); } 70% { box-shadow: 0 0 0 16px rgba(192,57,43,0); } 100% { box-shadow: 0 0 0 0 rgba(192,57,43,0); } }
.etat { font-weight: 600; }
.interim { color: var(--discret); font-style: italic; min-height: 1.4em; margin: 4px 2px 10px; }
.options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 10px; }
.options label, .champ { display: block; font-size: .9rem; font-weight: 600; }
.options select, .options textarea, .champ input, .champ textarea { margin-top: 4px; font-weight: 400; }
.champ { margin-bottom: 14px; }
details { margin: 6px 0 14px; }
summary { cursor: pointer; color: var(--accent); font-size: .92rem; margin-bottom: 8px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.ligne { display: flex; gap: 8px; }
.ligne input { flex: 1; }
.btn { font: inherit; padding: 10px 16px; border-radius: 8px; border: 1px solid var(--bord); background: #fff; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--accent); }
.btn.principal { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.principal:hover { background: var(--accent-fonce); }
.btn:disabled { opacity: .6; cursor: wait; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #1d2733; color: #fff; padding: 10px 18px; border-radius: 8px; max-width: calc(100% - 32px); }
@media (max-width: 600px) {
  .options { grid-template-columns: 1fr; }
  .ligne { flex-direction: column; }
}
.consigne { background: #eef4fb; border-left: 4px solid var(--accent); border-radius: 6px; padding: 10px 12px; margin: 8px 0 14px; font-size: .95rem; }
.astuce { background: #f7f9fb; border: 1px dashed var(--bord); border-radius: 8px; padding: 10px 14px; margin: 4px 0 12px; font-size: .9rem; }
.astuce ul { margin: 6px 0; padding-left: 20px; }
.choix { border: 1px solid transparent; border-radius: 10px; margin: 0 0 12px; padding: 4px 6px 6px; display: flex; flex-wrap: wrap; gap: 8px; }
.choix legend { font-weight: 600; font-size: .92rem; padding: 0 4px; margin-bottom: 4px; }
.choix.manquant { border-color: var(--rouge); background: #fdf1ef; }
.requis { color: var(--rouge); font-weight: 400; font-size: .8rem; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; padding: 8px 14px; border: 1px solid var(--bord); border-radius: 999px; cursor: pointer; background: #fff; font-size: .92rem; user-select: none; }
.chip span:hover { border-color: var(--accent); }
.chip input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.entete-droite { display: flex; align-items: center; gap: 16px; }
.entete-droite .utilisateur { font-weight: 600; font-size: .9rem; }
.connexion .discret a { color: var(--discret); text-decoration: none; }
@media (max-width: 600px) { .entete-droite { gap: 10px; } .entete-droite .utilisateur { display: none; } }
