/* ═══════════════════════════════════════════════
   ISERP — CSS pages Cours / Niveaux scolaires
   ═══════════════════════════════════════════════ */

/* ── Niveau header ── */
.niveau-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy3) 100%);
  padding: 3rem 2.5rem 5rem; position: relative; overflow: hidden;
}
.niveau-hero::after {
  content: ''; position: absolute; bottom: -1px; left: 0; right: 0;
  height: 55px; background: var(--light);
  clip-path: polygon(0 55px, 100% 0, 100% 55px);
}
.niveau-hero .inner { max-width: 1240px; margin: 0 auto; }
.niveau-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700; color: #fff; margin-bottom: .4rem;
}
.niveau-hero p { font-size: .92rem; color: rgba(255,255,255,.55); font-weight: 600; max-width: 600px; }

/* Breadcrumb */
.breadcrumb { display: flex; gap: 8px; align-items: center; margin-bottom: .8rem; flex-wrap: wrap; }
.breadcrumb a { font-size: .75rem; color: rgba(255,255,255,.45); font-weight: 600; text-decoration: none; transition: color .2s; }
.breadcrumb a:hover { color: var(--yellow); }
.breadcrumb .sep { font-size: .75rem; color: rgba(255,255,255,.2); }
.breadcrumb .cur { font-size: .75rem; color: var(--yellow); font-weight: 700; }

/* ── Page layout ── */
.page-content { max-width: 1240px; margin: 0 auto; padding: 3rem 2.5rem 5rem; background: var(--light); min-height: 50vh; }

/* ── Classe nav cards ── */
.classe-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px,1fr)); gap: 1rem; margin-bottom: 2.5rem; }
.cn-card {
  background: #fff; border: 2px solid var(--border); border-radius: var(--radius);
  padding: 1.3rem; text-align: center; text-decoration: none;
  transition: all .22s; position: relative; overflow: hidden;
}
.cn-card::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: var(--yellow); transform: scaleX(0); transition: transform .3s; }
.cn-card:hover { border-color: var(--yellow); transform: translateY(-4px); box-shadow: var(--shadow2); }
.cn-card:hover::after { transform: scaleX(1); }
.cn-card.active { border-color: var(--navy); background: var(--navy); }
.cn-card.active .cn-level { color: var(--yellow); }
.cn-card.active .cn-name, .cn-card.active .cn-price { color: rgba(255,255,255,.7); }
.cn-level { font-family: 'Playfair Display', serif; font-size: 1.5rem; font-weight: 700; color: var(--navy); line-height: 1; }
.cn-name  { font-size: .78rem; font-weight: 800; color: var(--text2); margin: .3rem 0 .2rem; }
.cn-price { font-size: .72rem; font-weight: 700; color: var(--blue); }

/* ── Classe overview ── */
.classe-overview {
  display: grid; grid-template-columns: 2fr 1.2fr; gap: 2rem; margin-bottom: 2.5rem;
}
.co-main { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow); }
.co-main h2 { font-family: 'Playfair Display', serif; font-size: 1.35rem; font-weight: 700; color: var(--navy); margin-bottom: 1rem; padding-bottom: .6rem; border-bottom: 2px solid var(--yellow); }
.co-objectifs { list-style: none; }
.co-objectifs li { font-size: .88rem; color: var(--text2); padding: .45rem 0; border-bottom: 1px solid var(--border); display: flex; gap: 10px; align-items: start; font-weight: 600; line-height: 1.55; }
.co-objectifs li:last-child { border: none; }
.co-objectifs li::before { content: '✓'; color: #059669; font-weight: 900; flex-shrink: 0; margin-top: 1px; }

.co-info { display: flex; flex-direction: column; gap: 1rem; }
.info-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow); }
.info-card h4 { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; color: var(--blue); margin-bottom: .8rem; }
.info-row { display: flex; justify-content: space-between; align-items: center; padding: .35rem 0; border-bottom: 1px solid var(--border); font-size: .82rem; }
.info-row:last-child { border: none; }
.ir-label { font-weight: 700; color: var(--navy); }
.ir-val { font-weight: 800; color: var(--blue); font-size: .85rem; }
.ir-val.green { color: #059669; }

/* ── Matières grid ── */
.matieres-section h3 {
  font-family: 'Playfair Display', serif; font-size: 1.15rem;
  font-weight: 700; color: var(--navy); margin-bottom: 1.2rem;
}
.matieres-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 1.3rem; margin-bottom: 2.5rem; }

/* Matière card */
.mat-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: all .25s;
}
.mat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow2); }
.mat-hdr {
  padding: 1rem 1.3rem; display: flex; align-items: center; gap: 1rem;
  border-bottom: 1px solid var(--border);
}
.mat-ico { font-size: 1.8rem; flex-shrink: 0; }
.mat-hdr-info { flex: 1; }
.mat-hdr-info h4 { font-size: .97rem; font-weight: 800; color: var(--navy); margin-bottom: 2px; }
.mat-coef {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .65rem; font-weight: 800; padding: .18rem .6rem;
  border-radius: 50px; background: var(--light); border: 1px solid var(--border);
  color: var(--blue); letter-spacing: .5px;
}
.mat-hours { font-size: .65rem; font-weight: 700; color: var(--gray); margin-left: .4rem; }
.mat-body { padding: 1.1rem 1.3rem; }
.mat-desc { font-size: .82rem; color: var(--text2); line-height: 1.7; margin-bottom: .9rem; font-weight: 600; }
.mat-obj-title { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--navy); margin-bottom: .5rem; }
.mat-obj-list { list-style: none; }
.mat-obj-list li { font-size: .78rem; color: var(--text2); padding: .25rem 0; display: flex; gap: 7px; align-items: start; font-weight: 600; border-bottom: 1px solid var(--border); }
.mat-obj-list li:last-child { border: none; }
.mat-obj-list li::before { content: '→'; color: var(--blue); font-weight: 900; flex-shrink: 0; font-size: .75rem; }
.mat-footer {
  padding: .75rem 1.3rem; background: var(--light); border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem;
}
.mat-eval { display: flex; gap: .4rem; flex-wrap: wrap; }
.eval-tag {
  font-size: .6rem; font-weight: 800; padding: .15rem .5rem; border-radius: 4px;
  letter-spacing: .3px; text-transform: uppercase;
}
.et-quiz  { background: #ede9fe; color: #6d28d9; }
.et-qcm   { background: var(--blue-lt); color: #1d4ed8; }
.et-test  { background: #d1fae5; color: #065f46; }
.et-exam  { background: #fee2e2; color: #b91c1c; }
.et-exerc { background: #fef9c3; color: #854d0e; }
.mat-link {
  font-size: .72rem; font-weight: 800; color: var(--blue);
  text-decoration: none; display: flex; align-items: center; gap: 4px;
  transition: color .2s;
}
.mat-link:hover { color: var(--navy); }

/* ── Cours list ── */
.cours-section { margin-top: 2.5rem; }
.cours-section h3 { font-family: 'Playfair Display', serif; font-size: 1.15rem; font-weight: 700; color: var(--navy); margin-bottom: 1.2rem; }
.cours-list { display: flex; flex-direction: column; gap: .65rem; }
.cours-row {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem 1.3rem; display: flex; align-items: center; gap: 1.1rem;
  box-shadow: 0 1px 6px rgba(0,0,0,.05); transition: all .22s;
  border-left: 4px solid transparent; cursor: pointer;
}
.cours-row:hover { border-left-color: var(--yellow); transform: translateX(5px); }
.cr-num {
  width: 32px; height: 32px; border-radius: 7px;
  background: var(--light); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 800; color: var(--navy); flex-shrink: 0;
}
.cr-info { flex: 1; }
.cr-info h5 { font-size: .9rem; font-weight: 800; color: var(--navy); margin-bottom: 2px; }
.cr-info p  { font-size: .75rem; color: var(--gray); font-weight: 600; }
.cr-meta { display: flex; gap: .4rem; align-items: center; }
.cr-dur { font-size: .68rem; font-weight: 700; color: var(--gray); background: var(--light); border: 1px solid var(--border); padding: .12rem .5rem; border-radius: 4px; }
.cr-res { display: flex; gap: .3rem; }
.res-dot { width: 8px; height: 8px; border-radius: 50%; }
.rd-pdf   { background: #ef4444; }
.rd-video { background: #3b82f6; }
.rd-schema{ background: #10b981; }

/* ── Cours detail (page cours) ── */
.cours-detail { }
.cd-banner {
  background: var(--navy); border-radius: var(--radius);
  overflow: hidden; margin-bottom: 1.5rem; box-shadow: var(--shadow2);
  display: grid; grid-template-columns: 220px 1fr;
}
.cd-banner img { width: 220px; height: 175px; object-fit: cover; display: block; }
.cd-banner-body { padding: 1.5rem 2rem; }
.cd-subject { font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: 2px; color: var(--yellow); margin-bottom: .4rem; }
.cd-banner-body h2 { font-family: 'Playfair Display', serif; font-size: 1.4rem; font-weight: 700; color: #fff; margin-bottom: .7rem; line-height: 1.25; }
.cd-meta-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: .7rem; margin-bottom: .9rem; }
.cdm-item label { font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,.45); display: block; margin-bottom: 2px; }
.cdm-item span  { font-size: .82rem; font-weight: 800; color: #fff; }
.cd-intro-block { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.cdi-item { background: rgba(255,255,255,.07); border-radius: 6px; padding: .6rem .9rem; }
.cdi-item .cdi-label { font-size: .6rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--yellow); margin-bottom: 3px; }
.cdi-item .cdi-val   { font-size: .8rem; color: rgba(255,255,255,.75); font-weight: 600; line-height: 1.5; }

.cd-body { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.5rem; }
.cd-col { }
.cd-block { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 1.2rem; box-shadow: var(--shadow); }
.cd-block-hdr { padding: .8rem 1.2rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.cd-block-hdr h4 { font-size: .8rem; font-weight: 800; color: var(--navy); }
.cd-block-hdr .bh-ico { font-size: 1rem; }
.cd-block-body { padding: 1rem 1.2rem; }

/* Chapitre row */
.chap-row {
  display: flex; align-items: center; gap: .8rem; padding: .55rem .8rem;
  border-radius: 7px; border: 1px solid var(--border); margin-bottom: .4rem;
  font-size: .83rem; font-weight: 700; color: var(--navy);
  cursor: pointer; transition: all .2s; background: var(--light);
}
.chap-row:hover { background: #fff; border-color: var(--yellow); }
.chap-num { width: 24px; height: 24px; border-radius: 5px; background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .65rem; font-weight: 900; flex-shrink: 0; }

/* Resource row */
.res-row {
  display: flex; align-items: center; gap: .75rem; padding: .5rem .8rem;
  border-radius: 7px; border: 1px solid var(--border); margin-bottom: .4rem;
  font-size: .8rem; font-weight: 700; color: var(--navy); background: var(--light);
  cursor: pointer; transition: all .2s;
}
.res-row:hover { background: #fff; border-color: var(--blue); }
.res-row img { width: 18px; height: 18px; object-fit: contain; flex-shrink: 0; }
.res-type { font-size: .6rem; font-weight: 800; padding: .12rem .45rem; border-radius: 3px; flex-shrink: 0; }
.rt-pdf    { background: #fee2e2; color: #b91c1c; }
.rt-video  { background: var(--blue-lt); color: #1d4ed8; }
.rt-schema { background: #d1fae5; color: #065f46; }

/* Evaluation row */
.eval-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: .6rem .9rem; border-radius: 7px; border: 1px solid var(--border);
  margin-bottom: .4rem; background: var(--light); cursor: pointer; transition: all .2s;
}
.eval-row:hover { background: #fff; border-color: var(--yellow); }
.eval-type { font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 2px; }
.et-quiz-clr { color: #6d28d9; } .et-qcm-clr { color: #1d4ed8; }
.et-test-clr { color: #065f46; } .et-exam-clr { color: #b91c1c; }
.eval-name { font-size: .83rem; font-weight: 700; color: var(--navy); }
.eval-pts  { font-size: .72rem; font-weight: 800; color: var(--gray); background: var(--light); border: 1px solid var(--border); padding: .1rem .4rem; border-radius: 4px; }

/* ── Horaires table ── */
.horaires-table { width: 100%; border-collapse: collapse; font-size: .82rem; margin-bottom: 1.5rem; }
.horaires-table th { background: var(--navy); color: var(--yellow); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; padding: .7rem 1rem; text-align: left; }
.horaires-table td { padding: .6rem 1rem; border-bottom: 1px solid var(--border); color: var(--text); font-weight: 600; }
.horaires-table tr:last-child td { border: none; }
.horaires-table tr:nth-child(even) td { background: var(--light); }
.horaires-table tr:hover td { background: #e0f2fc; }
.coef-badge { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--yellow); color: var(--navy); font-size: .75rem; font-weight: 900; }
.hours-badge { display: inline-flex; align-items: center; gap: 4px; font-size: .75rem; font-weight: 700; color: var(--blue); }

/* ── Series tabs (lycée) ── */
.serie-tabs { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.serie-tab {
  padding: .45rem 1.1rem; border-radius: 6px; border: 2px solid var(--border);
  background: #fff; font-size: .82rem; font-weight: 700; color: var(--text2);
  cursor: pointer; transition: all .2s; font-family: 'Nunito', sans-serif;
}
.serie-tab:hover { border-color: var(--yellow); color: var(--navy); }
.serie-tab.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.serie-panel { display: none; }
.serie-panel.active { display: block; }

/* ── Notice ── */
.notice { padding: .9rem 1.2rem; border-radius: 7px; font-size: .83rem; font-weight: 700; margin-bottom: 1.2rem; line-height: 1.65; }
.n-warn { background: #fffbe8; border: 1px solid #ffe57a; border-left: 4px solid var(--yellow); color: #7a5f00; }
.n-info { background: var(--blue-lt); border: 1px solid #93c5fd; border-left: 4px solid var(--blue); color: #1e3a5f; }
.n-success { background: #d1fae5; border: 1px solid #6ee7b7; border-left: 4px solid #059669; color: #064e3b; }

/* ── Responsive ── */
@media(max-width:900px) {
  .classe-overview { grid-template-columns: 1fr; }
  .cd-banner { grid-template-columns: 1fr; }
  .cd-banner img { width: 100%; height: 200px; }
  .cd-meta-grid { grid-template-columns: repeat(2,1fr); }
  .cd-body { grid-template-columns: 1fr; }
  .matieres-grid { grid-template-columns: 1fr; }
  .cd-intro-block { grid-template-columns: 1fr; }
}
@media(max-width:768px) {
  .page-content { padding: 2rem 1.2rem 3rem; }
  .niveau-hero { padding: 2rem 1.2rem 3.5rem; }
}
