:root {
  --night:#0e2233;
  --cream:#fff9f2;
  --paper:#fff;
  --ink:#17212b;
  --muted:#6f7d86;
  --line:#e7e0d8;
  --coral:#ef6f61;
  --teal:#159d99;
}
*{box-sizing:border-box}
body{margin:0;background:#ece8e2;color:var(--ink);font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif}
button,input,select,textarea{font:inherit}
a{color:inherit}
.admin-shell{width:min(100%,720px);min-height:100vh;margin:auto;padding:0 16px 44px;background:var(--cream)}
header{margin:0 -16px;padding:18px 20px 24px;border-radius:0 0 34px 34px;color:white;background:linear-gradient(145deg,#0d2030,#1d5360)}
header a{font-size:12px;font-weight:800;text-decoration:none;color:#ffd4cb}
header p,.saved-section>div>p{margin:20px 0 6px;color:#ffd4cb;font-size:10px;font-weight:900;letter-spacing:.18em}
header h1{margin:0;font-size:26px;line-height:1.08;letter-spacing:-.03em}
header span{display:block;margin-top:8px;color:rgba(255,255,255,.72);font-size:12.5px;line-height:1.45}
.consent-note{margin:18px 0;padding:16px;border-radius:18px;background:#fff0ed;border:1px solid #ffd7d0}
.consent-note strong{color:#a33f35}
.consent-note p{margin:6px 0 0;font-size:12px;line-height:1.45;color:#6f4d49}
form{display:grid;grid-template-columns:1fr 1fr;gap:13px;padding:20px;border-radius:28px;background:white;box-shadow:0 16px 42px rgba(14,34,51,.08)}
.field{display:grid;gap:7px}.full{grid-column:1/-1}
label{font-size:11px;font-weight:900}
input,select,textarea{width:100%;border:1px solid var(--line);border-radius:14px;padding:12px 13px;outline:0;background:#fcfbf9;color:var(--ink)}
input:focus,select:focus,textarea:focus{border-color:var(--teal);box-shadow:0 0 0 3px rgba(21,157,153,.11)}
small{color:var(--muted);font-size:10px;line-height:1.35}
.checkbox-field{grid-template-columns:22px 1fr;align-items:start;padding:12px;border-radius:14px;background:#f3f7f6}
.checkbox-field input{width:18px;height:18px}
.save-error{grid-column:1/-1;margin:0;padding:12px 14px;border-radius:14px;background:#fff0ed;border:1px solid #ffd7d0;color:#a33f35;font-size:12px;line-height:1.45;font-weight:700}
.primary,.secondary{border:0;border-radius:15px;padding:14px;font-weight:900}
.primary{color:white;background:var(--coral)}
.secondary{color:var(--night);background:#e6f3f1}
.photo-preview{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.photo-preview img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:12px}
.saved-section{margin-top:20px;padding:20px;border-radius:28px;background:white}
.saved-section>div>p{margin:0;color:var(--coral)}
.saved-section h2{margin:5px 0 15px}
.saved-card{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-top:1px solid var(--line)}
.saved-card-main{min-width:0;flex:1}
.saved-card-actions{display:flex;flex-wrap:wrap;gap:8px}
.saved-card strong{display:block;font-size:13px}.saved-card small{display:block;margin-top:4px}
.saved-card button{border:0;border-radius:10px;min-height:44px;padding:8px 12px;color:#a33f35;background:#fff0ed;font-weight:900}
.saved-card .play-note{color:var(--night);background:#e6f3f1}

/* Activités multiples et cuisines */
.choice-section{border:0;margin:0;padding:0}
.choice-section legend{font-size:11px;font-weight:900;padding:0}
.choice-section > small{display:block;margin:4px 0 8px}
.choice-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.choice-chip{position:relative;display:block;min-width:0}
.choice-chip input{position:absolute;opacity:0;pointer-events:none}
.choice-chip span{
  min-height:44px;
  padding:8px 7px;
  border:1px solid var(--line);
  border-radius:12px;
  display:grid;
  place-items:center;
  text-align:center;
  color:#59656d;
  background:white;
  font-size:10px;
  font-weight:800;
  line-height:1.15;
  cursor:pointer;
}
.choice-chip input:checked + span{color:white;border-color:var(--teal);background:var(--teal);box-shadow:0 8px 18px rgba(21,157,153,.17)}
.choice-chip input:focus-visible + span{outline:3px solid rgba(21,157,153,.22);outline-offset:2px}

/* Audio et dictée */
.field-label-row{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.smart-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:7px}
.mini-action{
  min-height:44px;
  border:1px solid #cfe7e4;
  border-radius:12px;
  padding:8px 12px;
  color:var(--night);
  background:#eaf6f4;
  font-size:10px;
  font-weight:900;
}
.mini-action[aria-pressed="true"],
.mini-action.active{color:white;border-color:var(--teal);background:var(--teal)}
.talk-action{border-color:#cfe7e4;background:#eaf6f4}
.danger-soft{border:0;border-radius:15px;min-height:44px;padding:12px;color:#a33f35;background:#fff0ed;font-weight:900}

/* Panneau "Parler et résumer" */
.talk-panel{margin-top:4px;padding:14px;border:1px solid #cfe7e4;border-radius:16px;background:#f3faf9}
.talk-auth{display:grid;gap:6px;margin-bottom:12px;padding-bottom:12px;border-bottom:1px dashed #cfe7e4}
.talk-auth label{font-size:10px;font-weight:900;color:var(--night)}
.talk-auth input{width:100%;min-height:44px;border:1px solid var(--line);border-radius:13px;padding:10px 12px;background:white;font:inherit}
.talk-auth small{font-size:9.5px;line-height:1.35;color:var(--muted)}
.talk-status{display:grid;grid-template-columns:12px 1fr auto;align-items:center;gap:8px;color:var(--night);font-size:11px}
.recording-dot{width:9px;height:9px;border-radius:999px;background:#aab5ba}
.recording-dot.active{background:#e04d45;box-shadow:0 0 0 5px rgba(224,77,69,.12);animation:recordingPulse 1.2s ease-in-out infinite}
@keyframes recordingPulse{0%,100%{opacity:1}50%{opacity:.45}}
.talk-actions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 9px}
.talk-actions button{flex:1 1 110px;min-height:44px}
.talk-error{margin-top:4px;padding:11px 12px;border-radius:13px;color:#a33f35;background:#fff0ed;font-size:11.5px;line-height:1.4;font-weight:700}
.talk-preview{margin-top:10px;padding-top:10px;border-top:1px dashed #cfe7e4}
.talk-result-notice{margin:0 0 10px;padding:10px 11px;border-radius:12px;background:#fff8df;color:#735d1b;font-size:10.5px;line-height:1.4;font-weight:800}
.talk-preview label{display:block;font-size:10px;font-weight:900;color:var(--night);margin-bottom:6px}
.talk-preview textarea{width:100%;border:1px solid var(--line);border-radius:13px;padding:10px;font:inherit;font-size:12.5px;line-height:1.45;background:white}
.talk-chip-group{margin-top:10px}
.talk-chip-group small{display:block;font-size:9px;font-weight:900;letter-spacing:.08em;color:var(--muted);margin-bottom:6px}
.talk-chip-row{display:flex;flex-wrap:wrap;gap:6px}
.talk-chip{min-height:38px;padding:7px 12px;border:1px solid var(--line);border-radius:999px;background:white;color:#59656d;font-size:11px;font-weight:800}
.talk-chip.active{color:white;border-color:var(--teal);background:var(--teal)}
.talk-preview-actions{display:flex;gap:8px;margin-top:12px}
.talk-preview-actions button{flex:1;min-height:44px}
@media(max-width:480px){.choice-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.mini-action{flex:1 1 0}}

/* Bannière de reprise de brouillon */
.draft-banner{margin:18px 0;padding:16px;border-radius:18px;background:#eaf6f4;border:1px solid #cfe7e4}
.draft-banner p{margin:0 0 10px;color:var(--night);font-size:13px;font-weight:800}
.draft-banner div{display:flex;gap:8px;flex-wrap:wrap}
.draft-banner button{flex:1 1 150px;min-height:44px;border:0;border-radius:13px;font-weight:900}

/* Progression des étapes */
.wizard-progress{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:4px}
.wizard-progress span:first-child{font-size:11px;font-weight:900;color:var(--night)}
.wizard-dots{display:flex;gap:6px}
.wizard-dots span{width:8px;height:8px;border-radius:999px;background:var(--line);transition:width .2s ease,background .2s ease}
.wizard-dots span.active{width:20px;border-radius:999px;background:var(--teal)}
.wizard-step{display:contents}
.wizard-step[hidden]{display:none}

#placeForm{padding-bottom:14px}
#placeForm input,#placeForm select,#placeForm textarea{scroll-margin-bottom:104px;scroll-margin-top:16px}
.wizard-nav-clearance{grid-column:1/-1;height:76px}

/* Navigation sticky Retour/Suivant */
.wizard-nav{
  position: sticky;
  bottom: max(12px, env(safe-area-inset-bottom));
  display:flex;
  gap:10px;
  margin-top:0;
  padding:10px;
  border-radius:16px;
  background:rgba(255,255,255,.97);
  box-shadow:0 -10px 26px rgba(14,34,51,.12);
  z-index:5;
}
.wizard-nav button{flex:1;min-height:48px;border:0;border-radius:14px;font-weight:900}
.wizard-nav button[disabled]{opacity:.4}
.wizard-nav .wizard-back[hidden]{display:none}

/* Récapitulatif de l'étape 4 */
.wizard-summary{padding:14px;border-radius:16px;background:#f6f3ee;font-size:12px;line-height:1.6;color:var(--muted)}
.wizard-summary strong{color:var(--night)}
dialog{width:min(calc(100% - 28px),480px);border:0;border-radius:26px;padding:24px;box-shadow:0 24px 60px rgba(14,34,51,.25)}
dialog::backdrop{background:rgba(5,18,27,.7)}
dialog h2{margin-top:0}dialog p{color:var(--muted)}
dialog div{display:grid;grid-template-columns:1fr 1fr;gap:8px}
dialog a,dialog button{border:0;border-radius:13px;padding:12px;text-align:center;text-decoration:none;font-weight:900}
dialog a{color:white;background:var(--night)}dialog button{color:var(--night);background:#e6f3f1}
@media(max-width:520px){form{grid-template-columns:1fr}.field,.full{grid-column:1}.admin-shell{padding-left:12px;padding-right:12px}header{margin-left:-12px;margin-right:-12px}}
