/* MathMaroc — PACK COURSE 15
   UX Premium officielle pour lesson_premium_test.php
   Objectif : différencier visuellement la nouvelle expérience sans toucher à la logique PHP.
*/

body.mm15-lesson-premium-active{
  background:
    radial-gradient(circle at top left, rgba(26,86,219,.10), transparent 34%),
    radial-gradient(circle at 85% 20%, rgba(16,185,129,.12), transparent 30%),
    linear-gradient(180deg,#EEF6FF 0%,#F8FAFC 44%,#FFFFFF 100%) !important;
}

body.mm15-lesson-premium-active::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background-image:
    linear-gradient(rgba(15,23,42,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,.035) 1px, transparent 1px);
  background-size:36px 36px;
  mask-image:linear-gradient(180deg,rgba(0,0,0,.35),transparent 52%);
  z-index:0;
}

body.mm15-lesson-premium-active > *{
  position:relative;
  z-index:1;
}

/* Bandeau test déjà présent — rendu plus pro */
body.mm15-lesson-premium-active .mm13-test-ribbon{
  width:min(1360px, calc(100% - 28px)) !important;
  margin:18px auto 0 !important;
  border-radius:26px !important;
  padding:14px 18px !important;
  background:
    linear-gradient(135deg,rgba(15,23,42,.96),rgba(26,86,219,.94)),
    radial-gradient(circle at top left,rgba(255,255,255,.20),transparent 35%) !important;
  box-shadow:0 22px 70px rgba(15,23,42,.22) !important;
}

/* Topbar premium */
body.mm15-lesson-premium-active .mmlp-topbar{
  width:min(1360px, calc(100% - 28px));
  margin:16px auto 0;
  border-radius:30px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.66);
  box-shadow:0 20px 70px rgba(15,23,42,.13);
  backdrop-filter:blur(14px);
}

body.mm15-lesson-premium-active .mmlp-brand,
body.mm15-lesson-premium-active .mmlp-topbar a,
body.mm15-lesson-premium-active .mmlp-topbar button{
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease;
}

body.mm15-lesson-premium-active .mmlp-topbar a:hover,
body.mm15-lesson-premium-active .mmlp-topbar button:hover{
  transform:translateY(-2px);
  box-shadow:0 12px 28px rgba(15,23,42,.12);
}

/* Hero plus premium */
body.mm15-lesson-premium-active .mmlp-hero,
body.mm15-lesson-premium-active .hero,
body.mm15-lesson-premium-active .lesson-hero{
  position:relative;
  overflow:hidden;
}

body.mm15-lesson-premium-active .mmlp-hero::after,
body.mm15-lesson-premium-active .hero::after,
body.mm15-lesson-premium-active .lesson-hero::after{
  content:"Lesson Premium";
  position:absolute;
  right:3%;
  bottom:-28px;
  font-size:clamp(58px,10vw,150px);
  font-weight:950;
  letter-spacing:-.08em;
  color:rgba(255,255,255,.08);
  pointer-events:none;
}

/* Cartes de contenu */
body.mm15-lesson-premium-active .mmlp-card,
body.mm15-lesson-premium-active .card,
body.mm15-lesson-premium-active section{
  scroll-margin-top:90px;
}

body.mm15-lesson-premium-active .mmlp-card,
body.mm15-lesson-premium-active .lesson-card,
body.mm15-lesson-premium-active .mm-lesson-card{
  border-radius:30px !important;
  box-shadow:0 18px 55px rgba(15,23,42,.09) !important;
  border:1px solid rgba(226,232,240,.92) !important;
}

/* Lecture guidée */
.mm15-reading-shell{
  width:min(1360px, calc(100% - 28px));
  margin:18px auto;
  background:rgba(255,255,255,.86);
  border:1px solid rgba(226,232,240,.92);
  border-radius:28px;
  box-shadow:0 20px 70px rgba(15,23,42,.10);
  padding:14px;
  backdrop-filter:blur(16px);
}

.mm15-reading-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.mm15-reading-title{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:220px;
}

.mm15-reading-title b{
  display:block;
  font-size:15px;
  letter-spacing:-.02em;
  color:#0F172A;
}

.mm15-reading-title span{
  display:block;
  font-size:12px;
  font-weight:800;
  color:#64748B;
  margin-top:2px;
}

.mm15-reading-icon{
  width:42px;
  height:42px;
  border-radius:16px;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,#0F172A,#1A56DB);
  color:#fff;
  font-size:20px;
  box-shadow:0 12px 26px rgba(26,86,219,.24);
}

.mm15-reading-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.mm15-reading-actions button,
.mm15-reading-actions a{
  border:0;
  border-radius:999px;
  padding:10px 13px;
  min-height:40px;
  background:#F8FAFC;
  border:1px solid #E2E8F0;
  color:#0F172A;
  font-weight:950;
  text-decoration:none;
  cursor:pointer;
  transition:transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.mm15-reading-actions button:hover,
.mm15-reading-actions a:hover{
  transform:translateY(-2px);
  background:#fff;
  box-shadow:0 10px 24px rgba(15,23,42,.10);
}

.mm15-reading-actions .primary{
  background:linear-gradient(135deg,#0F766E,#1A56DB);
  color:#fff;
  border-color:transparent;
}

.mm15-progress{
  margin-top:12px;
  height:9px;
  border-radius:999px;
  background:#E2E8F0;
  overflow:hidden;
}

.mm15-progress span{
  display:block;
  height:100%;
  width:0%;
  border-radius:999px;
  background:linear-gradient(90deg,#10B981,#1A56DB);
  transition:width .16s linear;
}

/* Mode focus */
body.mm15-focus-mode .mmlp-topbar,
body.mm15-focus-mode .mm13-test-ribbon,
body.mm15-focus-mode .mmlp-nav,
body.mm15-focus-mode .mmlp-staff,
body.mm15-focus-mode .mmlp-floating,
body.mm15-focus-mode .assistant-floating,
body.mm15-focus-mode .mm15-reading-actions .hide-in-focus{
  display:none !important;
}

body.mm15-focus-mode .mm15-reading-shell{
  position:sticky;
  top:10px;
  z-index:200;
}

body.mm15-focus-mode{
  background:#FFFFFF !important;
}

body.mm15-focus-mode main,
body.mm15-focus-mode .mmlp-main,
body.mm15-focus-mode .lesson-content,
body.mm15-focus-mode article{
  max-width:920px !important;
  margin-left:auto !important;
  margin-right:auto !important;
}

/* Taille de lecture */
body.mm15-font-large{
  font-size:110%;
}
body.mm15-font-large p,
body.mm15-font-large li{
  font-size:1.08em !important;
  line-height:1.95 !important;
}

body.mm15-font-soft{
  filter:saturate(.94);
}
body.mm15-font-soft p,
body.mm15-font-soft li{
  color:#1E293B !important;
}

/* Petites améliorations sur boutons existants */
body.mm15-lesson-premium-active a[href*="assistant"],
body.mm15-lesson-premium-active a[href*="quiz"],
body.mm15-lesson-premium-active button{
  transition:transform .18s ease, box-shadow .18s ease;
}

body.mm15-lesson-premium-active a[href*="assistant"]:hover,
body.mm15-lesson-premium-active a[href*="quiz"]:hover,
body.mm15-lesson-premium-active button:hover{
  transform:translateY(-2px);
}

/* Responsive */
@media(max-width:760px){
  .mm15-reading-shell{
    width:min(100% - 18px,1360px);
    padding:12px;
    border-radius:22px;
  }
  .mm15-reading-toolbar{
    align-items:flex-start;
  }
  .mm15-reading-actions,
  .mm15-reading-actions button,
  .mm15-reading-actions a{
    width:100%;
  }
  body.mm15-lesson-premium-active .mmlp-topbar{
    width:min(100% - 18px,1360px);
    border-radius:22px;
  }
}
