@import url("glass.css?v=3");
/* Recap — cartes de leçons (matières scientifiques : Mathématiques, Physique, Chimie, SVT).
   Même langage que la page Matières (cartes doodle) ; titre de semestre dans le style de la page Réglages ;
   titres longs : une ligne qui défile sur le côté, comme les cartes de la page Recherche.
   Activé par renderSubjectLessons(key, labels, { cards: true }) — les autres matières gardent l'ancien rendu. */
:root { --k1: var(--gold); --k2: var(--teal); --k3: var(--blue); --k4: var(--purple); --k5: var(--red); }
.lv { padding: 4px 0 80px; }
.lv svg { fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.lv h2 { margin: 0; }
.lv a { text-decoration: none; color: var(--text); -webkit-tap-highlight-color: transparent; }
.lc { display: block; position: relative; transition: transform .12s ease, opacity .12s ease; }
.lc.wip { pointer-events: none; }
/* قيد الإعداد : البطاقة غير قابلة للضغط لكن العنوان الطويل يبقى قابلاً للتحريك (scroll) */
.lc.wip .lc-t { pointer-events: auto; touch-action: pan-x pan-y; }
.lc-in { display: block; position: relative; }
.lc-ic svg, .lc-go svg, .lc-st svg, .lc-pile svg { width: 100%; height: 100%; }
.lc-pile { display: none; }
.lc .tp, .lc .tp2 { display: none; }
/* titre de semestre — même langage que les titres de la page Réglages (pastille feuille + surligneur) */
.ls { margin-top: 26px; } .ls:first-child { margin-top: 6px; }
.ls-head { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; }
.ls-n { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50% 0 50% 0; background: var(--c); color: var(--on);
  box-shadow: 2px 3px 0 color-mix(in srgb, var(--c) 32%, transparent); rotate: -4deg; font: 700 1.5rem/1 "Caveat", "Segoe Print", cursive; }
.ls-t { position: relative; isolation: isolate; padding: 0 5px; font: 700 1.9rem/1 "Caveat", "Segoe Print", cursive; color: var(--text); }
.ls-t::before { content: ""; position: absolute; z-index: -1; left: -2px; right: -2px; bottom: 1px; height: 46%; rotate: -1.4deg; border-radius: 3px 9px 4px 10px;
  background: color-mix(in srgb, var(--c) 36%, transparent); }
.ls-c { margin-inline-start: auto; font-size: .68rem; font-weight: 800; color: var(--muted); padding: 2px 10px; border: 1.5px dashed color-mix(in srgb, var(--muted) 55%, transparent); border-radius: 999px; white-space: nowrap; }
.ls-c b { font: 700 1.05rem "Caveat", cursive; color: var(--c); }
@keyframes lv-spark { 0%, 100% { rotate: 14deg; scale: .8; opacity: .45; } 50% { rotate: 104deg; scale: 1.3; opacity: 1; } }

/* ===== Design 2 — Carte doodle pleine largeur : icône pastille à gauche, texte, flèche ===== */
.lv2 .ls-list { display: flex; flex-direction: column; gap: 20px; padding: 4px 2px 0; }
.lv2 .lc { rotate: -.7deg; background: var(--card); border: 2.5px solid var(--c); border-radius: 18px 38px 20px 34px / 34px 18px 38px 20px; box-shadow: 3px 5px 0 color-mix(in srgb, var(--c) 35%, transparent); }
.lv2 .lc:nth-child(even) { rotate: .8deg; border-radius: 36px 18px 34px 20px / 18px 36px 20px 34px; }
.lv2 .lc:active { transform: scale(.975); opacity: .75; }
.lv2 .lc-in { display: flex; align-items: center; gap: 14px; padding: 16px 14px 14px 16px; }
.lv2 .lc-ic { flex: none; position: relative; display: grid; place-items: center; width: 56px; height: 56px; padding: 13px; box-sizing: border-box; border: 2px dashed var(--c); border-radius: 50%;
  color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); box-shadow: 2px 3px 0 color-mix(in srgb, var(--c) 25%, transparent); }
.lv2 .lc-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.lv2 .lc-no { position: absolute; top: 7px; right: 16px; font: 700 1.25rem "Caveat", cursive; color: color-mix(in srgb, var(--c) 55%, var(--muted)); }
.lv2 .lc-d { font-size: .74rem; color: var(--muted); line-height: 1.35; }
.lv2 .lc-st { display: inline-flex; align-self: flex-start; align-items: center; gap: 4px; margin-top: 3px; font-size: .64rem; font-weight: 800; color: var(--c); padding: 1px 9px 1px 6px; border-radius: 999px; background: color-mix(in srgb, var(--c) 14%, transparent); }
.lv2 .lc-st svg { width: 12px; height: 12px; stroke-width: 3; } .lv2 .lc-st em { font-style: normal; }
.lv2 .lc-go { flex: none; box-sizing: border-box; width: 28px; height: 28px; padding: 6px; border-radius: 50%; color: var(--c); border: 1.8px solid var(--c); align-self: flex-end; margin-bottom: 2px; }
.lv2 .lc.wip { border-style: dashed; box-shadow: none; background: color-mix(in srgb, var(--card) 55%, transparent); }
.lv2 .lc.wip .lc-ic { border-color: var(--muted); color: var(--muted); background: none; box-shadow: none; }
.lv2 .lc.wip .lc-t { color: var(--muted); } .lv2 .lc.wip .lc-tx::before { background: color-mix(in srgb, var(--muted) 22%, transparent); }
.lv2 .lc.wip .lc-st { color: var(--muted); background: none; border: 1.5px dashed color-mix(in srgb, var(--muted) 55%, transparent); }
.lv2 .lc.wip .lc-go { display: none; } .lv2 .lc.wip .lc-no { color: var(--muted); opacity: .7; }

/* titre : une ligne, défile sur le côté (même rendu que les cartes de la page Recherche) */
.lv2 .lc-t { display: block; align-self: stretch; margin-inline-end: 36px; font: 700 1.3rem/1.25 "Caveat", "Segoe Print", cursive; color: var(--c);
  overflow-x: auto; overflow-y: hidden; white-space: nowrap; padding-bottom: 6px; margin-bottom: -2px; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; -ms-overflow-style: none; }
.lv2 .lc-t::-webkit-scrollbar { display: none; width: 0; height: 0; }
.lv2 .lc-tx { position: relative; isolation: isolate; display: inline-block; padding: 0 4px; }
.lv2 .lc-tx::before { content: ""; position: absolute; z-index: -1; left: -2px; right: -2px; bottom: 1px; height: 44%; rotate: -1.2deg; border-radius: 3px 9px 4px 10px; background: color-mix(in srgb, var(--c) 30%, transparent); }
.lv2 .lc-t.fe:not(.fs) { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 30px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 30px), transparent); }
.lv2 .lc-t.fs:not(.fe) { -webkit-mask-image: linear-gradient(90deg, transparent, #000 30px); mask-image: linear-gradient(90deg, transparent, #000 30px); }
.lv2 .lc-t.fs.fe { -webkit-mask-image: linear-gradient(90deg, transparent, #000 30px, #000 calc(100% - 30px), transparent); mask-image: linear-gradient(90deg, transparent, #000 30px, #000 calc(100% - 30px), transparent); }

/* ===== Arrivée en cascade : après le stylo, chaque semestre puis chaque carte arrive l'un après l'autre
   (même vocabulaire que la page d'accueil : montée douce, icône qui « pop », surligneur qui balaie le titre).
   Durées multipliées par --tm (Réglages > Vitesse du stylo). ===== */
@keyframes lv-rise { from { opacity: 0; translate: 0 22px; scale: .93; } }
@keyframes lv-pop { from { scale: .4; rotate: -24deg; opacity: 0; } }
@keyframes lv-sweep { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes lv-fade { from { opacity: 0; translate: 0 5px; } }
.lv-wait .ls-head:not(.in), .lv-wait .lc:not(.in) { opacity: 0 !important; transition: none; }   /* !important : « .lv2 .lc.wip { opacity: 1 } » (plus bas) rendait les cartes « en préparation » visibles avant leur tour, puis elles disparaissaient pour réapparaître */
.lv2 .lc.in { animation: lv-rise calc(.62s * var(--tm, 1)) cubic-bezier(.2, 1.2, .4, 1) both; }
.lv2 .lc.in .lc-ic { animation: lv-pop calc(.55s * var(--tm, 1)) cubic-bezier(.3, 1.6, .5, 1) calc(.16s * var(--tm, 1)) both; }
.lv2 .lc.in .lc-no { animation: lv-fade calc(.4s * var(--tm, 1)) ease-out calc(.3s * var(--tm, 1)) both; }
.lv2 .lc.in .lc-st { animation: lv-fade calc(.4s * var(--tm, 1)) ease-out calc(.5s * var(--tm, 1)) both; }
.lv2 .lc.in .lc-go { animation: lv-pop calc(.5s * var(--tm, 1)) cubic-bezier(.3, 1.6, .5, 1) calc(.4s * var(--tm, 1)) both; }
.lv2 .lc.in .lc-tx::before, .lv2 .ls-head.in .ls-t::before { transform-origin: left center; animation: lv-sweep calc(.6s * var(--tm, 1)) cubic-bezier(.4, .1, .2, 1) calc(.38s * var(--tm, 1)) both; }
.lv2 .ls-head.in { animation: lv-rise calc(.55s * var(--tm, 1)) cubic-bezier(.2, 1.2, .4, 1) both; }
.lv2 .ls-head.in .ls-n { animation: lv-pop calc(.5s * var(--tm, 1)) cubic-bezier(.3, 1.6, .5, 1) calc(.12s * var(--tm, 1)) both; }
.lv2 .ls-head.in .ls-c { animation: lv-fade calc(.4s * var(--tm, 1)) ease-out calc(.35s * var(--tm, 1)) both; }
.quick #lessons > .lv { animation: none; }

/* ===== Version arabe (renderSubjectLessons(..., { cards: true, lang: 'ar' })) : mêmes cartes, écrites de droite à gauche.
   Icône à droite, flèche à gauche, titres en Markazi Text, chiffres arabes-indiens, pas de numéro dans la carte. ===== */
.fr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.lv-ar { direction: rtl; --f-ar: "Tajawal", system-ui, -apple-system, "Segoe UI", sans-serif; }
.lv-ar .ls-n { font: 700 1.3rem/1 var(--f-ar); padding-top: 0; }
.lv-ar .ls-t { font: 700 1.6rem/1.3 "Baloo Bhaijaan 2", var(--f-ar); }
.lv-ar .ls-t::before { transform-origin: right center; rotate: 1.2deg; border-radius: 9px 3px 10px 4px; bottom: 3px; height: 42%; }
.lv-ar .ls-c { font-family: "Tajawal", system-ui, sans-serif; font-size: .7rem; }
.lv-ar .ls-c b { font: 700 1rem var(--f-ar); }
.lv-ar .lc { box-shadow: -3px 5px 0 color-mix(in srgb, var(--c) 35%, transparent); }
.lv-ar .lc.wip { box-shadow: none; }
.lv-ar .lc-in { padding: 16px 16px 14px 14px; }
.lv-ar .lc-ic { width: 58px; height: 58px; padding: 14px; box-shadow: -2px 3px 0 color-mix(in srgb, var(--c) 25%, transparent); }
.lv-ar .lc.wip .lc-ic { box-shadow: none; }
.lv-ar .lc-t { margin-inline-end: 0; font: 700 1.2rem/1.45 var(--f-ar); }
.lv-ar .lc-tx::before { left: 0; right: 0; bottom: 3px; height: 40%; rotate: 1deg; border-radius: 9px 3px 10px 4px; transform-origin: right center; }
.lv-ar .lc-d { font-family: "Tajawal", system-ui, sans-serif; font-size: .78rem; line-height: 1.45; }
.lv-ar .lc-st { font-family: "Tajawal", system-ui, sans-serif; font-size: .72rem; padding: 1px 10px 1px 7px; margin-top: 5px; }
.lv-ar .lc-st svg { width: 13px; height: 13px; }
.lv-ar .lc-go { width: 28px; height: 28px; padding: 6px; }
.lv-ar .lc-t.fe:not(.fs) { -webkit-mask-image: linear-gradient(270deg, #000 calc(100% - 30px), transparent); mask-image: linear-gradient(270deg, #000 calc(100% - 30px), transparent); }
.lv-ar .lc-t.fs:not(.fe) { -webkit-mask-image: linear-gradient(270deg, transparent, #000 30px); mask-image: linear-gradient(270deg, transparent, #000 30px); }
.lv-ar .lc-t.fs.fe { -webkit-mask-image: linear-gradient(270deg, transparent, #000 30px, #000 calc(100% - 30px), transparent); mask-image: linear-gradient(270deg, transparent, #000 30px, #000 calc(100% - 30px), transparent); }
.lv-ar.lv2 .lc.in .lc-tx::before, .lv-ar.lv2 .ls-head.in .ls-t::before { transform-origin: right center; }

/* bouton « Ouvrir l'aperçu » : cours encore en préparation mais consultable (champ preview dans les données) */
.lc.wip .lc-pv { pointer-events: auto; cursor: pointer; display: inline-flex; align-self: flex-start; align-items: center; gap: 4px; margin: 6px 0 0 6px; padding: 3px 11px 3px 8px; border-radius: 999px; font-size: .68rem; font-weight: 800; color: var(--on, #fff); background: var(--c); border: 0; -webkit-tap-highlight-color: transparent; }
.lc.wip .lc-pv svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.lc.wip .lc-pv em { font-style: normal; }
.lc.wip .lc-pv:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ===== Cartes de leçons « en préparation » : même carte nette que les autres (fond plein, couleur de la matière), seulement le contour est en tirets ===== */
.lv2 .lc.wip { background-color: var(--card) !important; opacity: 1; box-shadow: 3px 5px 0 color-mix(in srgb, var(--c) 22%, transparent); }
.lv2 .lc.wip .lc-ic { border-color: var(--c); color: var(--c); background: color-mix(in srgb, var(--c) 10%, transparent); }
.lv2 .lc.wip .lc-t { color: color-mix(in srgb, var(--c) 82%, var(--text)); }
.lv2 .lc.wip .lc-tx::before { background: color-mix(in srgb, var(--c) 20%, transparent); }
.lv2 .lc.wip .lc-no { color: color-mix(in srgb, var(--c) 55%, var(--muted)); opacity: 1; }
.lv2 .lc.wip .lc-st { color: var(--c); background: color-mix(in srgb, var(--c) 10%, transparent); border: 1.5px dashed color-mix(in srgb, var(--c) 60%, transparent); }
.lv-ar.lv2 .lc.wip { box-shadow: -3px 5px 0 color-mix(in srgb, var(--c) 22%, transparent); }
