/* parcours-portes.css — l'index « à la Khan » en trois portes, commun à tous les
   chapitres (18/10/2026). Va avec assets/js/parcours/parcours-portes.js. */
.layout { display: block; }
.pt-outils-btn {
  display: flex; align-items: baseline; gap: 8px; width: 100%; margin: 0 0 8px;
  padding: 8px 12px; border: 1.5px dashed #94a3b8; border-radius: 12px; background: #fff;
  font: 800 13px Cairo, sans-serif; color: #334155; cursor: pointer; text-align: start;
}
.pt-outils-btn small { font-weight: 600; color: #64748b; font-size: 11px; }
.pt-outils { margin: 0 0 10px; }
.pt-outils .sidebar { width: 100%; position: static; flex-direction: row; flex-wrap: wrap; }

.pt-portes {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
  /* collée SOUS la bannière fixe du site (48 px + son liseré, mesuré à 375 px) */
  margin: 4px 0 12px; position: sticky; top: 52px; z-index: 5; scroll-margin-top: 52px;
  background: var(--pk-bg, #f4f6fb); padding: 6px 0;
}
.pt-porte {
  display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0;
  padding: 10px 6px; border: 2px solid #cbd5e1; border-radius: 14px; background: #fff;
  font-family: Cairo, sans-serif; color: #0f172a; cursor: pointer; text-align: center;
}
.pt-porte b { font-size: 13px; font-weight: 900; line-height: 1.25; }
.pt-porte small { font-size: 10px; font-weight: 700; color: #64748b; line-height: 1.2; }
.pt-porte .pt-ico { font-size: 22px; line-height: 1; }
.pt-porte.on { border-color: #0f766e; background: #0f766e; color: #fff; box-shadow: 0 6px 16px rgba(15,118,110,.28); }
.pt-porte.on small { color: #ccfbf1; }

.pt-panneau[hidden] { display: none !important; }

.pt-recherche { position: relative; margin-bottom: 6px; }
.pt-recherche input {
  width: 100%; box-sizing: border-box; padding: 12px 14px; padding-inline-end: 40px;
  border: 2px solid #0f766e; border-radius: 12px; font: 700 15px Cairo, sans-serif; background: #fff;
}
.pt-recherche button {
  position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%);
  border: 0; background: #e2e8f0; border-radius: 50%; width: 26px; height: 26px; cursor: pointer;
}
.pt-info { font: 700 12px Cairo, sans-serif; color: #475569; margin: 4px 2px 8px; }
.pt-res {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 6px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
}
/* le type de la compétence : icône + mot, une couleur par type */
.pt-type {
  flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 58px; padding: 4px 2px; border-radius: 10px; font: 800 10px/1.2 Cairo, sans-serif;
  text-align: center; background: #f1f5f9; color: #334155;
}
.pt-type i { font-style: normal; font-size: 20px; line-height: 1.1; }
.pt-type.quiz { background: #e0f2fe; color: #075985; }
.pt-type.bina { background: #dcfce7; color: #166534; }
.pt-type.ex { background: #fef3c7; color: #92400e; }
.pt-type.err { background: #fee2e2; color: #991b1b; }
.pt-type.chain { background: #ede9fe; color: #5b21b6; }
.pt-type.act, .pt-type.vid { background: #ccfbf1; color: #115e59; }
.pt-res-t { flex: 1; min-width: 0; font-family: Cairo, sans-serif; }
.pt-res-t b { display: block; font-size: 13.5px; font-weight: 800; color: #0f172a; overflow-wrap: anywhere; }
.pt-res-t small { display: block; font-size: 11px; font-weight: 700; color: #64748b; }
.pt-res .pk-btn { flex: none; padding: 6px 12px; font-size: 13px; }
.pt-plus { display: block; margin: 8px auto 14px; }
.pt-fiqrat { display: flex !important; flex-direction: row !important; min-height: 0 !important;
  gap: 10px !important; padding: 12px 14px !important; margin: 10px 0 !important; justify-content: flex-start !important; }
.pt-cat { margin: 10px 0; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; padding: 8px 10px; }
.pt-cat summary { cursor: pointer; font: 900 14px Cairo, sans-serif; color: #0f172a; }
.pt-cat summary small { font-weight: 700; color: #64748b; font-size: 11px; }

.pt-cartes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pt-carte {
  display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px;
  background: #fff; border: 2px solid #0f766e; color: #0f172a; text-decoration: none; font-family: Cairo, sans-serif;
}
.pt-carte .pt-ico { font-size: 24px; }
.pt-carte b { display: block; font-size: 13.5px; font-weight: 900; }
.pt-carte small { display: block; font-size: 10.5px; font-weight: 700; color: #64748b; line-height: 1.3; }
.pt-sous { font: 900 13px Cairo, sans-serif; color: #0f766e; margin: 16px 2px 8px; }

/* ── 02/11, le chef : « même chose ici et ici » — le style tableau à la Khan, compact,
   pour « أتابع التعلّم » et « أراجع وأستعدّ للفرض ». CSS seul : rien dans les pages. ── */

/* ① أتابع التعلّم : une LIGNE par leçon (nom · carrés · boutons), deux colonnes */
#pk-app { display: grid; grid-template-columns: 1fr; column-gap: 24px; }
#pk-app > * { grid-column: 1 / -1; }
@media (min-width: 1000px) { #pk-app > section[id^="lecon-"] { grid-column: auto; } }
#pk-app > section[id^="lecon-"] {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 6px 14px; margin: 0;
  padding: 8px 8px; border: 0; border-bottom: 1px solid #e2e8f0; border-radius: 0;
  background: transparent; box-shadow: none; }
#pk-app > section[id^="lecon-"] .pk-lesson-head { flex: 0 0 9.5rem; gap: 8px; }
#pk-app > section[id^="lecon-"] .pk-ico { width: 28px; height: 28px; font-size: 15px; border-radius: 9px; }
#pk-app > section[id^="lecon-"] .pk-h2 { font-size: 13.5px; line-height: 1.3; margin: 0; }
#pk-app > section[id^="lecon-"] .pk-lesson-head .pk-sub { font-size: 11px; }
#pk-app > section[id^="lecon-"] .pk-squares { flex: 0 1 auto; margin: 0; gap: 3px; }
#pk-app > section[id^="lecon-"] .pk-squares .pk-sq { width: 14px; height: 14px; }
#pk-app > section[id^="lecon-"] .pk-lesson-actions { margin: 0; gap: 5px; }
#pk-app > section[id^="lecon-"] .pk-lesson-actions .pk-btn { min-height: 0; padding: 4px 10px; font-size: 12px; border-radius: 8px; }
/* les carrés des compétences se rangent À CÔTÉ du bouton « المهارات » s'il reste de la place */
#pk-app > section[id^="lecon-"] .pk-bt-zone { flex: 1 1 22rem; min-width: 0; margin: 0; padding: 0; border: 0; }
#pk-app > section[id^="lecon-"] .pk-bt-zone .pk-bt-leg { margin-bottom: 4px; }
@media (max-width: 600px) { #pk-app > section[id^="lecon-"] .pk-lesson-head { flex: 1 1 100%; } }

/* ③ أراجع وأستعدّ : cartes et bandes plus petites */
.pt-cartes { gap: 6px; }
.pt-carte { padding: 7px 10px !important; gap: 8px !important; border-radius: 10px !important; min-height: 0 !important; }
.pt-carte .pt-ico { font-size: 19px; }
.pt-carte b { font-size: 12.5px; }
.pt-carte small { font-size: 10px; }
.pt-sous { margin: 10px 2px 5px; font-size: 12px; }
#pt-muraja-plus .acc3-band, #pt-muraja-plus .rev-band {
  padding: 6px 12px !important; gap: 8px !important; border-radius: 10px !important; box-shadow: none !important; margin: 0 0 6px !important; }
#pt-muraja-plus .acc3-band-ico, #pt-muraja-plus .rev-band-ico { font-size: 17px !important; }
#pt-muraja-plus .acc3-band-title, #pt-muraja-plus .rev-band-title { font-size: 12.5px !important; }
#pt-muraja-plus .acc3-band-sub, #pt-muraja-plus .rev-band-sub { font-size: 10px !important; margin-top: 0 !important; }
#pt-muraja-plus .cta-choix { padding: 6px 12px !important; gap: 8px !important; min-height: 0 !important; border-radius: 10px !important; box-shadow: none !important; margin: 0 0 6px !important; }
#pt-muraja-plus .cta-choix .cc-ico { font-size: 18px !important; }
#pt-muraja-plus .cta-choix b { font-size: 12.5px !important; }
#pt-muraja-plus .cta-choix small { font-size: 10px !important; }
#pt-muraja-plus .cta-choix .cc-go { padding: 3px 10px !important; font-size: 11.5px !important; }

.devoirs-card.dc-tadrib { background: linear-gradient(160deg, #db2777, #9d174d); }

/* « للتحضير أكثر » : hors des portes, sous les cartes des devoirs, et les
   TROIS boutons côte à côte (le chef, 07/11). Les cadres .rev-wrap / .acc3-wrap
   deviennent transparents (display: contents) : chaque bande occupe une colonne
   de la rangée 1, et la liste qu'elle ouvre s'étale sur toute la largeur en
   rangée 2. */
.pt-plus-zone { margin: 4px 0 14px; }
#pt-muraja-plus { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: stretch; }
#pt-muraja-plus > .rev-wrap, #pt-muraja-plus > .acc3-wrap { display: contents; }
#pt-muraja-plus .rev-band, #pt-muraja-plus .acc3-band, #pt-muraja-plus > .cta-choix {
  grid-row: 1; margin: 0 !important; height: 100%; box-sizing: border-box; }
#pt-muraja-plus .rev-wrap > :not(.rev-band),
#pt-muraja-plus .acc3-wrap > :not(.acc3-band) { grid-row: 2; grid-column: 1 / -1; }
/* « اختر لي » : le bouquet s'affiche dans la page, plus en fenêtre flottante */
.pt-plus-zone .bq-overlay { position: static; inset: auto; background: none; padding: 0; z-index: auto; display: none; }
.pt-plus-zone .bq-overlay.bq-open { display: block; margin-top: 8px; }
.pt-plus-zone .bq-panel { width: 100%; max-height: none; overflow: visible; box-shadow: none; border: 1px solid #e2e8f0; }
.pt-plus-zone .bq-head { position: static; }
@media (max-width: 600px) {
  #pt-muraja-plus { gap: 5px; }
  #pt-muraja-plus .rev-band, #pt-muraja-plus .acc3-band, #pt-muraja-plus > .cta-choix {
    flex-direction: column; text-align: center; padding: 8px 4px !important; gap: 3px !important; }
  #pt-muraja-plus .rev-band-sub, #pt-muraja-plus .acc3-band-sub, #pt-muraja-plus small,
  #pt-muraja-plus .rev-band-arrow, #pt-muraja-plus .acc3-band-arrow { display: none !important; }
}

/* les petits carrés d'avancement sont décoratifs : 3 suffisent (le chef, 02/11) */
.pk-squares .pk-sq:nth-child(n+4) { display: none; }

/* ── 09/11 : une ligne par leçon, les numéros s'ouvrent au clic ── */
.pt-pliable > .pt-lecon-t { cursor: pointer; display: flex; align-items: center; gap: 8px; flex: 1 1 auto !important; padding: 6px 4px !important; }
.pt-pliable > .pt-lecon-t .pt-n { margin-inline-start: auto; font-size: 12px; font-weight: 800; color: #0f766e; background: #e6f4f2; border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.pt-pliable > .pt-lecon-t .pt-chev::before { content: "▾"; color: #64748b; font-size: 13px; }
.pt-pliable.ferme > .pt-lecon-t .pt-chev::before { content: "◂"; }
.pt-pliable { flex-wrap: wrap; }
.pt-pliable > .pk-bt-zone { flex: 1 1 100%; }
.pt-pliable.ferme > .pk-bt-zone { display: none; }
.pt-pliable > .pt-lecon-t:hover { background: #f1f8f7; border-radius: 8px; }

/* 24/11, le chef : la porte « أراجع للفرض » enrichie — jauge, « ابدأ من هنا », badges */
.pt-jauge { background: #fff; border: 1.5px solid #cbd5e1; border-radius: 12px; padding: 9px 12px; margin: 0 0 8px; }
.pt-jauge-t { display: flex; justify-content: space-between; font-size: 13px; font-weight: 900; color: #0f172a; }
.pt-jauge-b { height: 9px; background: #e2e8f0; border-radius: 99px; overflow: hidden; margin: 6px 0 4px; }
.pt-jauge-b i { display: block; height: 100%; background: #16a34a; border-radius: 99px; }
.pt-jauge small { font-size: 11px; font-weight: 700; color: #64748b; }
.pt-reco { display: flex; align-items: center; gap: 10px; background: #0f766e; color: #fff; border-radius: 12px; padding: 10px 12px; margin: 0 0 8px; text-decoration: none; }
.pt-reco .pt-ico { font-size: 24px; }
.pt-reco b { display: block; font-size: 14px; font-weight: 900; }
.pt-reco small { display: block; font-size: 11px; font-weight: 700; opacity: .92; }
.pt-reco .pt-go { margin-inline-start: auto; font-weight: 900; }
.pt-badge { margin-inline-start: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: #fee2e2; color: #b91c1c; font-size: 12px; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.pt-badge.ok { background: #dcfce7; color: #166534; }
.pt-carte.pt-vide { opacity: .72; }
