/*
Auteur : Anthony NISOL — Conseiller Numérique (CCTVL)
Projet : Cours interactif "Découvrir son ordinateur"
*/

:root{
  --bg:#f7f8fb;
  --card:#ffffff;
  --text:#111827;
  --muted:#6b7280;
  --border:#e5e7eb;
  --shadow:0 12px 32px rgba(17,24,39,.08);
  --r1:18px;
  --r2:14px;
  --primary:#4f46e5;
  --primary2:#4338ca;
  --ok:#16a34a;
  --bad:#dc2626;
  --focus:0 0 0 4px rgba(79,70,229,.22);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Arial,"Noto Sans","Liberation Sans",sans-serif;
  color:var(--text);
  background:linear-gradient(180deg,#ffffff, var(--bg));
}

.app{
  display:grid;
  grid-template-columns: 320px 1fr;
  min-height:100vh;
}

@media (max-width: 980px){
  .app{grid-template-columns:1fr}
  .sidebar{position:sticky; top:0; z-index:10}
}

.sidebar{
  padding:16px;
  border-right:1px solid var(--border);
  background:rgba(255,255,255,.9);
  backdrop-filter: blur(8px);
}

.brand{
  border:1px solid var(--border);
  border-radius:var(--r1);
  box-shadow:var(--shadow);
  padding:14px;
  background:linear-gradient(180deg,#fff, #f3f4f6);
}
.badge{
  display:inline-flex;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid #e0e7ff;
  background:#eef2ff;
  color:#3730a3;
  font-weight:900;
  font-size:.88rem;
}
.brandTitle{font-weight:1000; font-size:1.2rem; margin-top:10px}
.brandSubtitle{color:var(--muted); font-size:.92rem; margin-top:4px}

.progressBox{
  margin-top:12px;
  border:1px solid var(--border);
  border-radius:var(--r1);
  padding:12px;
  background:#fff;
  box-shadow:var(--shadow);
}
.progressTop{display:flex; align-items:center; justify-content:space-between; gap:10px}
.bar{
  height:12px; border-radius:999px;
  background:#eef2f7;
  border:1px solid var(--border);
  overflow:hidden;
  margin-top:8px;
}
.barFill{
  height:100%;
  width:0%;
  border-radius:999px;
  background:linear-gradient(90deg, var(--primary), #22c55e);
  transition: width .35s ease;
}

.pills{display:flex; flex-wrap:wrap; gap:8px; margin-top:10px}
.pill{
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  color:var(--muted);
  font-weight:900;
  font-size:.82rem;
  cursor:not-allowed;
  opacity:.75;
}
.pill.isActive{
  cursor:pointer; opacity:1;
  border-color:#c7d2fe;
  background:#eef2ff;
  color:#3730a3;
}
.pill.isDone{
  cursor:pointer; opacity:1;
  border-color:#bbf7d0;
  background:#ecfdf5;
  color:#166534;
}

.nav{
  margin-top:12px;
  border:1px solid var(--border);
  border-radius:var(--r1);
  padding:10px;
  background:#fff;
  box-shadow:var(--shadow);
}
.navBtn{
  width:100%;
  text-align:left;
  border:1px solid var(--border);
  background:#fff;
  padding:10px 12px;
  border-radius:12px;
  font-weight:900;
  cursor:not-allowed;
  opacity:.6;
  margin-bottom:8px;
}
.navBtn:last-child{margin-bottom:0}
.navBtn.isActive{opacity:1; cursor:pointer; border-color:#c7d2fe; background:#eef2ff}
.navBtn.isDone{opacity:1; cursor:pointer; border-color:#bbf7d0; background:#ecfdf5}
.navBtn:focus{outline:none; box-shadow:var(--focus)}

.sidebarFooter{margin-top:12px; display:grid; gap:10px}

.main{
  padding:18px 18px 40px;
}
.hero{
  border:1px solid var(--border);
  border-radius:var(--r1);
  background:linear-gradient(180deg,#fff, var(--bg));
  padding:18px;
  box-shadow:var(--shadow);
}
.hero h1{margin:0 0 8px; letter-spacing:-.02em}
.hero p{margin:0; color:var(--muted); line-height:1.6}
.heroRow{display:flex; flex-wrap:wrap; gap:8px; margin-top:12px}
.chip{
  padding:7px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  font-weight:900;
  font-size:.85rem;
}

.step{
  margin-top:14px;
  border:1px solid var(--border);
  border-radius:var(--r1);
  background:#fff;
  box-shadow:var(--shadow);
  padding:18px;
  display:none;
}
.step.isActive{display:block}

.stepHead .kicker{color:var(--muted); font-weight:1000; font-size:.9rem}
.stepHead h2{margin:6px 0 6px; letter-spacing:-.02em}
.stepHead p{margin:0}

.stepFoot{
  margin-top:16px;
  padding-top:12px;
  border-top:1px dashed var(--border);
  display:flex;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}

/* Typography helpers */
.h3{margin:0 0 8px; font-size:1.05rem}
.strong{font-weight:1000}
.muted{color:var(--muted)}
.tiny{font-size:.88rem}

/* Buttons */
.btn{
  border:1px solid var(--border);
  background:#fff;
  color:var(--text);
  padding:10px 14px;
  border-radius:12px;
  cursor:pointer;
  font-weight:1000;
  transition: transform .06s ease, background .2s ease, border-color .2s ease;
}
.btn:hover{transform: translateY(-1px)}
.btn:focus{outline:none; box-shadow:var(--focus)}
.btn[disabled]{opacity:.55; cursor:not-allowed; transform:none}
.btn.primary{
  background:linear-gradient(180deg, var(--primary), var(--primary2));
  border-color:rgba(79,70,229,.35);
  color:#fff;
}
.btn.ghost{background:#fff}

/* Notes */
.note{
  margin-top:12px;
  padding:12px;
  border-radius:14px;
  border:1px solid #e0e7ff;
  background:#eef2ff;
  color:#3730a3;
  font-weight:900;
}

/* Panels */
.panel{
  border:1px solid var(--border);
  border-radius:var(--r1);
  padding:14px;
  background:#fff;
}
.panel.soft{
  background:var(--bg);
}

/* Toolbar */
.toolbar{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  margin:12px 0;
}
.toggle{
  display:flex;
  border:1px solid var(--border);
  background:#fff;
  border-radius:999px;
  padding:4px;
  gap:4px;
}
.toggleBtn{
  border:none;
  background:transparent;
  padding:8px 10px;
  border-radius:999px;
  cursor:pointer;
  font-weight:1000;
  color:var(--muted);
}
.toggleBtn.isOn{background:#eef2ff; color:#3730a3}

/* Drag & Drop */
.dd{
  display:grid;
  grid-template-columns: 1.1fr 1.9fr;
  gap:14px;
}
@media (max-width: 1000px){
  .dd{grid-template-columns:1fr}
}

.cardPool{
  display:grid;
  grid-template-columns: 1fr;
  gap:10px;
}
.card{
  display:flex;
  gap:10px;
  align-items:center;
  text-align:left;
  width:100%;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background:#fff;
  cursor:grab;
  font-weight:1000;
  transition: transform .08s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover{transform: translateY(-1px); box-shadow:0 10px 18px rgba(17,24,39,.06)}
.card.isSelected{border-color:#c7d2fe; box-shadow:0 0 0 4px rgba(79,70,229,.12)}
.card:focus{outline:none; box-shadow:var(--focus)}

.zones{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:14px;
}
@media (max-width: 760px){
  .zones{grid-template-columns:1fr}
}
.zone{
  border:1px solid var(--border);
  border-radius:var(--r2);
  padding:12px;
  background:#fff;
}
.zoneTitle{font-weight:1000; margin-bottom:6px}
.drop{
  min-height:120px;
  border-radius:14px;
  background:var(--bg);
  border:2px dashed #d7dbe4;
  padding:10px;
  display:grid;
  gap:10px;
}
.drop.isOver{border-color:#a5b4fc; background:#eef2ff}

.result{
  margin-top:12px;
  border:1px solid var(--border);
  border-radius:var(--r2);
  padding:12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  background:#fff;
}
@media (max-width: 680px){
  .result{flex-direction:column; align-items:stretch}
  .resultActions{display:flex; justify-content:flex-end}
}

/* Flip */
.grid2{display:grid; grid-template-columns: 1fr 1fr; gap:14px}
@media (max-width: 900px){.grid2{grid-template-columns:1fr}}
.grid3{display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:14px}
@media (max-width: 900px){.grid3{grid-template-columns:1fr}}

.flip{
  border:none;
  background:transparent;
  padding:0;
  cursor:pointer;
  text-align:left;
  width:100%;
  perspective: 1200px;
  -webkit-perspective: 1200px;
}

.flip:focus{
  outline:none;
  box-shadow:var(--focus);
  border-radius:var(--r1);
}

.flipInner{
  position:relative;
  width:100%;
  min-height:170px;

  border-radius:var(--r1);
  border:1px solid var(--border);
  background:#fff;
  box-shadow:var(--shadow);

  transform-style:preserve-3d;
  -webkit-transform-style:preserve-3d;
  transition:transform .45s ease;
   overflow: visible;
  will-change: transform;
}

.flip[aria-pressed="true"] .flipInner{
  transform: rotateY(180deg);
}

.flipFront,
.flipBack{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  padding:16px;

  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:8px;

  background:#fff;
  color:var(--text);

  backface-visibility:hidden;
  -webkit-backface-visibility:hidden;

  /* ultra fiable */
  opacity: 1;
  transition: opacity .18s ease;
  
  border-radius: var(--r1);
  overflow: hidden;
}


.flipFront{
  transform: rotateY(0deg) translateZ(1px);
  z-index: 2;
}

.flipBack{
   transform: rotateY(180deg) translateZ(1px);
  line-height:1.55;
  z-index: 1;
  opacity: 0;
}

/* Quand c’est retourné : on cache le recto et on affiche le verso */
.flip[aria-pressed="true"] .flipFront{
  opacity: 0;
  z-index: 1;
}

.flip[aria-pressed="true"] .flipBack{
  opacity: 1;
  z-index: 2;
}

.emoji{font-size:2rem}
.flipTitle{font-weight:1100; font-size:1.15rem; letter-spacing:-.01em}
.miniFlip .flipInner{min-height:150px}



/* Timeline */
.timeline{
  display:grid;
  gap:10px;
  margin-top:10px;
}
.time{
  display:grid;
  grid-template-columns: 20px 1fr;
  gap:10px;
  align-items:center;
  background:#fff;
  border:1px solid var(--border);
  border-radius:14px;
  padding:12px;
  cursor:pointer;
  text-align:left;
  font-weight:1000;
  transition: transform .06s ease;
}
.time:hover{transform: translateY(-1px)}
.time:focus{outline:none; box-shadow:var(--focus)}
.time.isActive{border-color:#c7d2fe; background:#eef2ff}
.dot{
  width:14px; height:14px;
  border-radius:999px;
  background:#fff;
  border:3px solid #a5b4fc;
  box-shadow:0 0 0 4px rgba(79,70,229,.08);
}
.eraBox{
  margin-top:12px;
  border:1px solid var(--border);
  border-radius:var(--r1);
  background:#fff;
  box-shadow:var(--shadow);
  padding:14px;
  display:grid;
  grid-template-columns: 120px 1fr;
  gap:14px;
  align-items:center;
}
@media (max-width: 760px){.eraBox{grid-template-columns:1fr}}
.eraMedia{
  border-radius:16px;
  border:1px solid var(--border);
  background:var(--bg);
  overflow:hidden;
  min-height:110px;
  padding:0;
  display:block;
}

.eraMedia img{
  width:100%;
  height:110px;
  object-fit:cover;
  display:block;
}

/* Choice cards */
.choiceRow{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  margin-top:12px;
}
@media (max-width: 900px){.choiceRow{grid-template-columns:1fr}}
.choiceCard{
  border:1px solid var(--border);
  border-radius:var(--r1);
  background:#fff;
  padding:16px;
  box-shadow:var(--shadow);
  cursor:pointer;
  text-align:left;
  transition: transform .06s ease, border-color .2s ease;
}
.choiceCard:hover{transform: translateY(-1px)}
.choiceCard:focus{outline:none; box-shadow:var(--focus)}
.choiceEmoji{font-size:2rem; margin-bottom:6px}

/* Hotspots */
.hotspotWrap{
  display:grid;
  grid-template-columns: 1.6fr 1fr;
  gap:14px;
  margin-top:12px;
}
@media (max-width: 1000px){.hotspotWrap{grid-template-columns:1fr}}
.hotspotCanvas{
  position:relative;
  border:1px solid var(--border);
  border-radius:var(--r1);
  background:linear-gradient(180deg,#fff, var(--bg));
  box-shadow:var(--shadow);
  overflow:hidden;
  min-height:340px;
}
.deviceSvg{
  width:100%;
  height:100%;
  display:block;
}
.spot{
  position:absolute;
  width:38px; height:38px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  font-weight:1100;
  transform: translate(-50%,-50%);
  box-shadow:0 10px 18px rgba(17,24,39,.08);
}
.spot span{font-size:1.2rem}
.spot:focus{outline:none; box-shadow:var(--focus)}
.spot.isVisited{border-color:#bbf7d0; background:#ecfdf5; color:#166534}

.checklist{display:grid; gap:8px; margin:10px 0}
.checkItem{
  display:flex; align-items:center; gap:10px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#fff;
  font-weight:900;
}
.checkItem .mark{
  width:24px; height:24px; border-radius:8px;
  border:1px solid var(--border);
  display:flex; align-items:center; justify-content:center;
  color:var(--muted);
  background:#fff;
}
.checkItem.isDone{border-color:#bbf7d0; background:#ecfdf5}
.checkItem.isDone .mark{border-color:#bbf7d0; background:#16a34a; color:#fff}

.panelTop{display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:10px}

/* Image Cards / Modal */
.imageCard{
  border:1px solid var(--border);
  border-radius:var(--r1);
  background:#fff;
  padding:16px;
  box-shadow:var(--shadow);
  cursor:pointer;
  text-align:left;
}
.imageCard:hover{transform: translateY(-1px)}
.imageCard:focus{outline:none; box-shadow:var(--focus)}
.imgPh{
  height:84px;
  border-radius:16px;
  border:1px solid var(--border);
  background:var(--bg);
  display:flex; align-items:center; justify-content:center;
  font-size:2rem;
  margin-bottom:10px;
}

.modal{
  border:none;
  border-radius:16px;
  box-shadow:var(--shadow);
  padding:14px;
  width:min(640px, 92vw);
}
.modal::backdrop{background:rgba(15,23,42,.35)}
.modalHead{display:flex; align-items:center; justify-content:space-between; gap:10px}

/* Accordion */
.accordion{display:grid; gap:10px; margin-top:12px}
details{
  border:1px solid var(--border);
  border-radius:14px;
  background:#fff;
  padding:12px 12px;
}
summary{
  cursor:pointer;
  font-weight:1000;
}
.accBody{color:var(--muted); margin-top:8px; line-height:1.55}

/* Trainer */
.gifPh{
  border:1px dashed #cbd5e1;
  background:#fff;
  border-radius:14px;
  padding:14px;
  margin-top:10px;
  color:var(--muted);
  font-weight:900;
  text-align:center;
}
.trainer{
  border:1px solid var(--border);
  border-radius:16px;
  background:#fff;
  padding:14px;
  margin-top:10px;
}
.trainerTop{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
}
.trainerBadge{
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background:var(--bg);
  font-weight:1000;
}
.trainerTarget{
  font-size:2.2rem;
  font-weight:1200;
  letter-spacing:.08em;
  min-width:64px;
  text-align:right;
}
.trainerBar{
  display:flex; gap:8px;
  margin-top:12px;
}
.trainerDot{
  flex:1;
  height:10px;
  border-radius:999px;
  background:#eef2f7;
  border:1px solid var(--border);
}
.trainerDot.isOk{background:#bbf7d0; border-color:#86efac}
.trainerDot.isBad{background:#fecaca; border-color:#fca5a5}
.trainerActions{
  display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap;
  margin-top:12px;
}
.shake{animation: shake .25s linear}
@keyframes shake{
  0%{transform: translateX(0)}
  25%{transform: translateX(-6px)}
  50%{transform: translateX(6px)}
  75%{transform: translateX(-4px)}
  100%{transform: translateX(0)}
}

/* Copy */
.copyBox{margin-top:10px}
.copySource{
  padding:12px;
  border-radius:14px;
  border:1px solid var(--border);
  background:var(--bg);
  font-weight:900;
  line-height:1.55;
}
.copyArea{
  width:100%;
  margin-top:10px;
  padding:12px;
  border-radius:14px;
  border:1px solid var(--border);
  font: inherit;
  line-height:1.5;
}
.copyArea:focus{outline:none; box-shadow:var(--focus)}
.copyMeta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  margin-top:8px;
}

/* OS */
.chipsWrap{display:flex; flex-wrap:wrap; gap:8px; margin-top:6px}
.chipBtn{
  border:1px solid var(--border);
  background:#fff;
  padding:8px 10px;
  border-radius:999px;
  cursor:pointer;
  font-weight:1000;
}
.chipBtn:focus{outline:none; box-shadow:var(--focus)}
.chipBtn.isHit{border-color:#bbf7d0; background:#ecfdf5; color:#166534}
.osInfo{
  margin-top:10px;
  padding:12px;
  border-radius:14px;
  border:1px solid var(--border);
  background:var(--bg);
  color:var(--muted);
  line-height:1.55;
}
.know{
  margin-top:10px;
  padding:12px;
  border-radius:14px;
  border:1px solid #fde68a;
  background:#fffbeb;
}

/* Misc */
.row{display:flex; gap:10px; flex-wrap:wrap; margin-top:12px}
.footer{margin-top:14px; text-align:center}


.deviceImg{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;      /* IMPORTANT : l’image remplit le cadre */
  object-position:center;
  display:block;
}

.deviceImg{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;   /* recommandé pour que les % restent cohérents */
  display:block;
}

.calloutSvg{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  pointer-events:none; /* ne bloque pas les clics sur les + */
}

.calloutLine{
  stroke: rgba(79,70,229,.55);
  stroke-width: 3;
}

.calloutDot{
  fill: #ffffff;
  stroke: rgba(79,70,229,.85);
  stroke-width: 3;
}

.typeImg{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
  padding:10px; /* laisse un peu d’air */
}

.modalMedia{
  margin-top:10px;
  border:1px solid var(--border);
  border-radius:14px;
  background:var(--bg);
  padding:12px;
}
.modalImg{
  width:100%;
  height:180px;
  object-fit:contain;
  display:block;
}

.accImg{
  width: min(360px, 100%);
  height: auto;
  display: block;
  margin: 12px auto;     /* centre + espace */
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: #fff;
}

/* ✅ UNIQUEMENT pour l’étape souris (posture ergonomique) */
[data-step="mouse"] .ergFlip .flipInner{
  height: 160px; /* hauteur “jolie” du recto */
  transition: transform .45s ease, height .25s ease; /* flip + agrandissement doux */
}

[data-step="mouse"] .ergFlip .flipBack{
  padding: 0; /* on met le padding sur le content */
}

[data-step="mouse"] .ergFlip .flipBackContent{
  padding: 16px;
  line-height: 1.55;
}

.ergFrontImg{
  width: min(220px, 100%);
  height: 110px;
  object-fit: contain;
  display: block;
  margin: 0 auto 10px;
}

[data-step="mouse"] .ergFlip .flipFront{
  align-items: center;
  text-align: center;
}

.hotspotCanvas{
  position:relative;
}

.deviceImg{
  width:100%;
  height:100%;
  display:block;
  object-fit:contain;      /* garde les proportions */
  user-select:none;
  pointer-events:none;     /* évite de “cliquer” l’image au lieu des hotspots */
}

/* ✅ Fix uniquement pour l’étape 11 (OS) */
[data-step="os"] .grid2{
  align-items: start; /* empêche la colonne droite de s’étirer */
}

/* ✅ Encadre et limite le GIF */
[data-step="os"] .gifPh{
  padding: 0;                 /* enlève le gros padding autour */
  height: 260px;              /* ajuste la hauteur comme vous voulez */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg);
}

/* ✅ Le GIF remplit proprement le cadre */
[data-step="os"] .gifPh img{
  width: 100%;
  height: 100%;
  object-fit: contain;        /* garde les proportions */
  display: block;
}

/* =======================
   QUIZ FINAL
======================= */
.quizTop{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.quizQ{
  margin-top:12px;
  font-weight:1000;
  line-height:1.45;
}

.quizOptions{
  display:grid;
  gap:10px;
  margin-top:12px;
}

.quizOpt{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:12px;
  border-radius:14px;
  border:1px solid var(--border);
  background:#fff;
  cursor:pointer;
}

.quizOpt:hover{
  transform: translateY(-1px);
  box-shadow:0 10px 18px rgba(17,24,39,.06);
}

.quizOpt input{
  margin-top:3px;
}

.quizOpt .label{
  display:block;
  font-weight:900;
}

.quizOpt .hint{
  display:block;
  margin-top:4px;
  color:var(--muted);
  font-weight:700;
  font-size:.92rem;
  line-height:1.45;
}

.quizFeedback{
  margin-top:12px;
  padding:12px;
  border-radius:14px;
  border:1px solid var(--border);
  background:#fff;
  line-height:1.55;
}

.quizFeedback.ok{
  border-color:#bbf7d0;
  background:#ecfdf5;
}

.quizFeedback.bad{
  border-color:#fecaca;
  background:#fef2f2;
}

.quizNav{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  margin-top:12px;
}

.quizSummary{
  margin-top:12px;
  border:1px solid var(--border);
  border-radius:14px;
  background:#fff;
  padding:12px;
  display:grid;
  gap:8px;
}

.quizSumItem{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#fff;
  font-weight:900;
}

.quizSumItem.ok{
  border-color:#bbf7d0;
  background:#ecfdf5;
  color:#166534;
}

.quizSumItem.bad{
  border-color:#fecaca;
  background:#fef2f2;
  color:#991b1b;
}

/* =======================
   CONFETTIS + FIN DE COURS
======================= */

.confetti{
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

.endHero{
  margin-top:14px;
  border:1px solid var(--border);
  border-radius:var(--r1);
  background: linear-gradient(180deg, #fff, #eef2ff);
  box-shadow: var(--shadow);
  padding: 18px;
  display:grid;
  gap:10px;
}

.endTitle{
  font-size: 1.6rem;
  font-weight: 1100;
  letter-spacing:-.02em;
  margin:0;
}

.endSub{
  margin:0;
  color: var(--muted);
  line-height: 1.6;
}

.endBadges{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:6px;
}

.endBadge{
  padding:7px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  font-weight:1000;
  font-size:.85rem;
}

.endGrid{
  margin-top:12px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
}

@media (max-width: 900px){
  .endGrid{grid-template-columns:1fr}
}

.endCard{
  border:1px solid var(--border);
  border-radius:var(--r1);
  background:#fff;
  box-shadow: var(--shadow);
  padding:14px;
  display:grid;
  gap:8px;
}

.endScore{
  font-size: 1.4rem;
  font-weight: 1200;
}

.endMsg{
  color: var(--muted);
  line-height:1.55;
}

.footer{
  margin-top:14px;
  text-align:center;
  display:grid;
  gap:6px;
  padding:10px 0;
}

.footerSignature{
  font-size:.86rem;
  color:var(--muted);
  opacity:.9;
}

.footerSignature strong{
  color:var(--text);
}