/* ============================================================
   Omnicursus — charte custom (par-dessus Bootstrap)
   ============================================================ */

:root {
  --bleu:        #1A3A6B;   /* couleur principale */
  --bleu-clair:  #2250a0;
  --or:          #C9A84C;   /* accent */
  --or-clair:    #dfc07a;
  --rouge:       #C0392B;   /* alerte */
  --fond:        #F8F7F2;   /* fond clair */
  --gris-texte:  #555555;
  --gris-doux:   #6b7280;   /* assez foncé pour rester lisible en petit corps (contraste AA) */

  /* Couleurs niveaux (rappel charte) */
  --primaire: #2e7d32;
  --college:  #1A3A6B;
  --lycee:    #C0392B;
  --bts:      #C9A84C;
}

/* ── Base ─────────────────────────────────────────────────── */

body {
  background-color: var(--fond);
  color: #171717;
  font-family: "Source Sans 3", system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3, h4,
.titre-serif {   /* texte à l’allure d’un titre sans en être un (nom de série sur une leçon) */
  font-family: "Libre Baskerville", Georgia, serif;
  color: var(--bleu);
}

a { color: var(--bleu); }

/* Gris secondaire de Bootstrap (#6c757d) : 4,37:1 seulement sur le fond crème du site.
   Le gris « hover » de Bootstrap passe à 5,7:1 (WCAG AA). */
.text-secondary { color: #5c636a !important; }
.btn-outline-secondary { --bs-btn-color: #5c636a; --bs-btn-border-color: #5c636a; }

main { flex: 1 0 auto; }

.texte-bleu { color: var(--bleu) !important; }
.texte-or   { color: var(--or) !important; }
.fond-bleu  { background-color: var(--bleu) !important; }

/* ── Logo tricolore ───────────────────────────────────────── */

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}
.logo__barre {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 6px;
}
.logo__barre span {
  display: block;
  height: 16px;
  border-radius: 2px;
}
.logo__barre .bleu   { background-color: #002395; }
.logo__barre .blanc  { background-color: #fff; border: 1px solid #e5e7eb; }
.logo__barre .rouge  { background-color: #ED2939; }
.logo__nom {
  font-family: "Libre Baskerville", Georgia, serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--bleu);
  letter-spacing: -0.01em;
}

/* ── En-tête / navigation ─────────────────────────────────── */

.site-entete {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.site-entete .nav-link {
  color: var(--bleu);
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: 6px;
  padding: 0.4rem 0.75rem;
}
.site-entete .nav-link:hover { background: #eef2f9; }
.site-entete .nav-link[aria-current="page"] {
  background: #eef2f9;
  font-weight: 600;
}
.site-entete .nav-link.desactive {
  color: var(--gris-doux);
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Lien d'évitement (accessibilité clavier) ─────────────── */
/* Invisible tant qu'il n'a pas le focus (via .visually-hidden-focusable de
   Bootstrap) ; à la 1re tabulation il apparaît en haut à gauche. */
.skip-lien:focus {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 2000;
  background: var(--bleu);
  color: #fff;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
}

/* ── Bouton hamburger (menu mobile) ───────────────────────── */
.nav-burger {
  background: transparent;
  border: 1px solid var(--bleu);
  color: var(--bleu);
  border-radius: 6px;
  font-size: 1.15rem;
  line-height: 1;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
}
.nav-burger:hover { background: #eef2f9; }

/* ── Boutons charte ───────────────────────────────────────── */

.btn-omni {
  background-color: var(--bleu);
  border-color: var(--bleu);
  color: #fff;
}
.btn-omni:hover { background-color: #15305a; border-color: #15305a; color: #fff; }
.btn-omni-or {
  background-color: var(--or);
  border-color: var(--or);
  color: var(--bleu);
}
.btn-omni-or:hover { background-color: var(--or-clair); border-color: var(--or-clair); }
/* Action secondaire de la charte : reste lisible à côté d'un .btn-omni plein. */
.btn-outline-omni {
  background-color: transparent;
  border-color: var(--bleu);
  color: var(--bleu);
}
.btn-outline-omni:hover { background-color: var(--bleu); border-color: var(--bleu); color: #fff; }

/* ── Filtres à facettes (partagés élèves + enseignants) ───── */
.filtre { border: 1px solid #d1d5db; background: #fff; color: #555; border-radius: 999px; }
.filtre.actif.filtre-matiere { background: var(--bleu); border-color: var(--bleu); color: #fff; }
.filtre.actif.filtre-niveau  { background: var(--or);  border-color: var(--or);  color: var(--bleu); }
.filtre.actif.filtre-type    { background: var(--primaire); border-color: var(--primaire); color: #fff; }
.filtre-vue { color: var(--gris-doux); font-weight: 600; border: 0; }
.filtre-vue.actif { color: var(--bleu); border-bottom: 2px solid var(--bleu); }

/* ── Badges ───────────────────────────────────────────────── */

.badge-type {
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
}
.badge-matiere {
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  color: #fff;
}

/* ── Cartes de cours ──────────────────────────────────────── */

.carte-cours {
  display: flex;
  flex-direction: column;
  border: 2px solid #e5e7eb;
  border-radius: 1rem;
  overflow: hidden;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  height: 100%;
}
.carte-cours:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}
.carte-cours__barre { height: 8px; }
.carte-cours__corps { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.carte-cours__titre {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0.25rem 0;
  line-height: 1.3;
}
.carte-cours__desc {
  font-size: 0.9rem;
  color: var(--gris-texte);
  flex: 1;
  line-height: 1.55;
}
/* Leçon publiée après sa série (accueil « Derniers contenus », catalogue). */
.carte-cours__nouveaute {
  font-size: 0.85rem;
  line-height: 1.4;
  margin: 0.6rem 0 0;
}
.carte-cours__lien {
  margin-top: 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* ── Fil d'Ariane ─────────────────────────────────────────── */

.fil-ariane {
  font-size: 0.85rem;
  color: var(--gris-doux);
}
.fil-ariane a { color: var(--gris-doux); text-decoration: none; }
.fil-ariane a:hover { color: #374151; }
.fil-ariane .actif { color: var(--bleu); font-weight: 500; }

/* ── Pied de page ─────────────────────────────────────────── */

.site-pied {
  flex-shrink: 0;
  background: #fff;
  border-top: 1px solid #e5e7eb;
}
.site-pied a { color: var(--gris-texte); text-decoration: none; font-size: 0.9rem; }
.site-pied a:hover { color: #1f2937; }

/* ── Cours : iframe d'affichage ───────────────────────────── */

.cours-cadre {
  width: 100%;
  min-height: 80vh;
  border: 0;
  display: block;
  background: #fff;
}

/* Fiche rendue dans la page (inc/fiche.php) : même fond blanc que l’ancienne iframe. */
.fiche-hote {
  display: block;
  background: #fff;
}

/* ── Accueil : hero ───────────────────────────────────────── */

.hero-accueil {
  position: relative;
  background-color: var(--bleu);
  color: #fff;
  overflow: hidden;
}
.hero-accueil::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image: repeating-linear-gradient(
    45deg, var(--or) 0, var(--or) 1px, transparent 0, transparent 50%);
  background-size: 22px 22px;
}
.hero-accueil__contenu { position: relative; }
.hero-accueil h1 {
  color: #fff;
  font-weight: 700;
  line-height: 1.15;
}
.hero-accueil .accent-or { color: var(--or); }
.hero-accueil__chapo { color: #cdd8ec; }

/* ── Accueil : bande de statistiques ──────────────────────── */

.bande-stats {
  background: #fff;
  border-bottom: 1px solid #eef0f3;
}
.bande-stats .stat__valeur {
  font-family: "Libre Baskerville", Georgia, serif;
  font-weight: 700;
  color: var(--bleu);
  line-height: 1;
}
.bande-stats .stat__libelle {
  font-size: 0.85rem;
  color: var(--gris-doux);
}
.bande-stats .stat + .stat { border-left: 1px solid #eef0f3; }

/* ── Accueil : cartes Espaces ─────────────────────────────── */

.carte-espace {
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.carte-espace__tete { padding: 1.5rem 1.75rem; color: #fff; }
.carte-espace__tete h3 { color: #fff; margin: 0; }
.carte-espace__corps { padding: 1.25rem 1.75rem 1.75rem; flex: 1; display: flex; flex-direction: column; }
.carte-espace__liste { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.carte-espace__liste li { display: flex; align-items: center; gap: 0.6rem; padding: 0.3rem 0; font-size: 0.92rem; color: #374151; }
.carte-espace__puce { width: 8px; height: 8px; border-radius: 999px; flex-shrink: 0; }

/* ── Accueil : cartes Niveaux ─────────────────────────────── */

.carte-niveau {
  display: block;
  border-radius: 1rem;
  border: 2px solid;
  padding: 1.5rem;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  height: 100%;
}
.carte-niveau:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08); }
.carte-niveau__icone {
  width: 46px; height: 46px; border-radius: 0.7rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin-bottom: 0.9rem;
}
.carte-niveau__titre { font-size: 1.1rem; font-weight: 700; margin: 0; }
.carte-niveau__sous {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; margin: 0.15rem 0 0.6rem;
}
.carte-niveau__desc { font-size: 0.88rem; color: var(--gris-texte); margin: 0; line-height: 1.5; }

/* ── Carte « magazine » (listing cycle / niveau) ──────────── */

.carte-magazine {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  background: #fff;
  border: 1px solid #ecebe2;
  border-radius: 14px;
  padding: 24px 22px 20px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.carte-magazine::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  background: var(--c, var(--bleu));
}
.carte-magazine:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(20, 40, 80, 0.12);
  color: inherit;
}
.carte-magazine__wm {
  position: absolute;
  right: 10px; top: -8px;
  font-family: "Libre Baskerville", Georgia, serif;
  font-weight: 700;
  font-size: 4rem;
  line-height: 1;
  color: var(--c, var(--bleu));
  opacity: 0.10;
  pointer-events: none;
}
.carte-magazine__sur {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--c, var(--bleu));
}
.carte-magazine__titre {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--bleu);
  margin: 0;
}
.carte-magazine__meta { color: var(--gris-texte); font-size: 0.88rem; }

/* ── Page matière : séries (parcours) + cours ─────────────── */

.section-matiere { display: flex; align-items: center; gap: 10px; margin: 6px 0 16px; }
.section-matiere h2 { font-size: 1.25rem; color: var(--bleu); margin: 0; }
.badge-compte {
  background: #eef2f9; color: var(--bleu); font-weight: 700;
  font-size: 0.72rem; border-radius: 999px; padding: 4px 10px;
}

.serie-carte {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e7e6db;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(20, 40, 80, 0.07);
}
.serie-carte__tete {
  background: linear-gradient(135deg, var(--c, var(--bleu)), var(--c2, #15305a));
  color: #fff;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.serie-carte__titre {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "Libre Baskerville", Georgia, serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
}
.serie-carte__badge {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  padding: 4px 11px;
  font-weight: 700;
  font-size: 0.74rem;
  white-space: nowrap;
}
.serie-carte__corps { padding: 14px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.serie-lecons { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.serie-lecon {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid #eef0f3;
  border-radius: 9px;
  text-decoration: none;
  color: inherit;
  transition: background 0.14s ease, border-color 0.14s ease;
}
.serie-lecon:hover { background: #f6f8fc; border-color: var(--c, var(--bleu)); color: inherit; }
.serie-lecon__no {
  width: 23px; height: 23px; border-radius: 50%;
  background: var(--c, var(--bleu)); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 0.76rem; flex: 0 0 auto;
}
.serie-lecon__t { font-weight: 600; font-size: 0.9rem; color: var(--bleu); }
.serie-lecon__ar { margin-left: auto; color: var(--c, var(--bleu)); }
.btn-serie {
  align-self: flex-start; margin-top: auto;
  background: var(--c, var(--bleu)); color: #fff;
  border-radius: 10px; padding: 9px 16px; font-weight: 700;
  text-decoration: none; font-size: 0.9rem;
}
.btn-serie:hover { filter: brightness(0.92); color: #fff; }

.cours-liste { display: flex; flex-direction: column; gap: 8px; }
.cours-liste__item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid #e7e6db;
  border-radius: 12px;
  padding: 15px 18px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}
.cours-liste__item:hover { transform: translateX(4px); box-shadow: 0 8px 18px rgba(20, 40, 80, 0.08); border-color: var(--c, var(--bleu)); color: inherit; }
.cours-liste__point { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--bleu)); flex: 0 0 auto; }
.cours-liste__texte { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cours-liste__t { font-weight: 700; color: var(--bleu); }
.cours-liste__d {
  color: var(--gris-texte);
  font-size: 0.88rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}
.cours-liste__ar { margin-left: auto; color: var(--c, var(--bleu)); }

/* ── Hub élèves : bandeaux par cycle ──────────────────────── */

.hub-bandeau {
  display: flex;
  align-items: stretch;
  background: #fff;
  border: 1px solid #eceadf;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 18px;
  box-shadow: 0 6px 18px rgba(20, 40, 80, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.hub-bandeau:hover {
  box-shadow: 0 14px 32px rgba(20, 40, 80, 0.12);
  transform: translateY(-3px);
}
.hub-bandeau__cote {
  flex: 0 0 232px;
  color: #fff;
  text-decoration: none;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hub-bandeau__cote:hover { color: #fff; }
.hub-bandeau__icone { font-size: 1.8rem; line-height: 1; }
.hub-bandeau__titre {
  font-family: "Libre Baskerville", Georgia, serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: #fff;
  margin: 0.45rem 0 0.1rem;
}
.hub-bandeau__sous { font-size: 0.85rem; opacity: 0.85; }
.hub-bandeau__niveaux {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  gap: 12px;
  padding: 22px 26px;
}
.hub-tuile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 96px;
  padding: 12px 16px;
  border-radius: 14px;
  background: #f6f7f9;
  border: 1px solid #eaecf1;
  text-decoration: none;
  color: #26324a;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.hub-tuile:hover { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08); color: #26324a; }
.hub-tuile b { font-size: 1.05rem; }
.hub-tuile span { font-size: 0.78rem; color: var(--gris-doux); }

@media (max-width: 720px) {
  .hub-bandeau { flex-direction: column; }
  .hub-bandeau__cote { flex-basis: auto; }
}

/* ── Espace enseignant (accent bleu pastel) ───────────────── */

:root {
  --ens: #5C8AC4;
  --ens2: #3a5f8f;
  --ens-l: #eaf1fb;
}

.ens-band {
  background: linear-gradient(135deg, var(--ens), var(--ens2));
  color: #fff;
}
.ens-band a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.ens-band a:hover { color: #fff; }
.ens-band h1 { color: #fff; }
.ens-fil { color: rgba(255, 255, 255, .7); font-size: .85rem; }
.ens-fil a { text-decoration: none; }
.ens-badge {
  display: inline-block; font-weight: 700; font-size: .72rem;
  border-radius: 999px; padding: 4px 10px;
  background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .35); color: #fff;
}
.ens-band .ens-dl {
  display: inline-flex; align-items: center; gap: .45rem;
  background: #fff; color: var(--ens2); border-radius: 11px;
  padding: 11px 18px; font-weight: 800; text-decoration: none;
}
.ens-band .ens-dl:hover { color: var(--ens2); opacity: .92; }
.ens-band .ens-dl--ghost {
  background: transparent; color: #fff; border: 1.5px solid rgba(255, 255, 255, .6);
}
.ens-band .ens-dl--ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; opacity: 1; }

.pack-fiche {
  display: flex; align-items: center; gap: 15px;
  background: #fff; border: 1px solid #e7e6db; border-radius: 14px;
  padding: 14px 18px; margin-bottom: 12px; transition: .14s;
}
.pack-fiche:hover { box-shadow: 0 10px 22px rgba(20, 40, 80, .08); border-color: #cdddf0; }
.pack-fiche--opt { border-style: dashed; background: #fcfdff; }
.pack-fiche__tag {
  width: 46px; height: 54px; flex: 0 0 auto; border-radius: 7px;
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .7rem;
  background: var(--ens);
}
.pack-fiche__role {
  display: inline-block; background: var(--ens-l); color: var(--ens2);
  font-weight: 700; font-size: .7rem; border-radius: 999px; padding: 3px 9px; margin-bottom: 4px;
}
.pack-fiche__titre { margin: 0; font-size: 1.02rem; color: #1A3A6B; }
.pack-fiche__corps { flex: 1; min-width: 0; }
.pack-fiche__lien { color: var(--ens2); font-weight: 700; text-decoration: none; white-space: nowrap; }

.pack-carte {
  display: flex; flex-direction: column; height: 100%;
  background: #fff; border: 1px solid #e7e1f1; border-radius: 16px; overflow: hidden;
  box-shadow: 0 8px 22px rgba(40, 70, 120, .07); transition: .15s; text-decoration: none;
}
.pack-carte:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(40, 70, 120, .13); }
.pack-carte__top {
  background: linear-gradient(135deg, var(--ens), var(--ens2)); color: #fff;
  padding: 15px 17px; display: flex; align-items: flex-start; gap: 10px;
}
.pack-carte__top h3 { margin: 0; color: #fff; font-size: 1.05rem; line-height: 1.25; }
.pack-carte__body { padding: 14px 17px 17px; display: flex; flex-direction: column; flex: 1; }

/* Programme annuel : séances */
.prog-theme { margin: 26px 0 10px; display: flex; align-items: baseline; gap: 10px; }
.prog-theme h2 { font-size: 1.2rem; color: #1A3A6B; margin: 0; }
.prog-theme .c { color: #6b7280; font-size: .85rem; font-weight: 600; }
.prog-seance {
  display: flex; align-items: center; gap: 14px; background: #fff;
  border: 1px solid #e7e6db; border-radius: 11px; padding: 10px 14px; margin-bottom: 7px;
}
.prog-seance__no {
  width: 30px; height: 30px; flex: 0 0 auto; border-radius: 8px;
  background: var(--ens-l); color: var(--ens2); display: grid; place-items: center;
  font-weight: 800; font-size: .9rem;
}
.prog-seance__ti { font-weight: 600; font-size: .94rem; flex: 1; min-width: 0; }
.prog-seance__files { display: flex; gap: 6px; flex: 0 0 auto; flex-wrap: wrap; }
.fiche-chip {
  display: inline-flex; align-items: center; gap: 5px; border-radius: 8px;
  padding: 5px 10px; font-weight: 700; font-size: .76rem; color: #fff;
  text-decoration: none; white-space: nowrap;
}
.fiche-chip--prof { background: #1A3A6B; }
.fiche-chip--eleve { background: #7E57C2; }
.fiche-chip--exos { background: #E67E22; }
.fiche-chip--opt { background: #fff; color: #6b7280; border: 1px dashed #b9c9e6; }
.prog-legende { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; font-size: .84rem; color: #444; }
.prog-legende .tag { width: 14px; height: 14px; border-radius: 4px; display: inline-block; vertical-align: -2px; margin-right: 5px; }

/* ── Hub enseignant : sections, cycles, types ─────────────── */
/* Bootstrap souligne tout lien par défaut : les tuiles, puces et fils d'Ariane de cet
   espace sont des liens-blocs, ils désactivent explicitement le soulignement. */

.ens-sectitle { display: flex; align-items: center; gap: 10px; margin: 34px 0 14px; }
.ens-sectitle h2 { font-family: "Libre Baskerville", Georgia, serif; font-size: 1.3rem; color: var(--bleu); margin: 0; }
.ens-sectitle .pill { background: var(--ens-l); color: var(--ens); font-weight: 700; font-size: .72rem; border-radius: 999px; padding: 4px 10px; }
.ens-sectitle .more { margin-left: auto; color: var(--ens); font-weight: 700; font-size: .86rem; text-decoration: none; }
.ens-sectitle .more:hover { color: var(--ens2); }

.ens-packwrap { background: var(--ens-l); border: 1px solid #dbe6f5; border-radius: 18px; padding: 18px; }

.ens-cgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ens-cycle { text-decoration: none; background: #fff; border: 1px solid #e7e6db; border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 6px; border-top: 4px solid var(--c, var(--ens)); transition: transform .15s, box-shadow .15s; }
.ens-cycle:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(20, 40, 80, .1); color: inherit; }
.ens-cycle h3 { font-family: "Libre Baskerville", Georgia, serif; margin: 0; color: var(--c, var(--ens)); font-size: 1.2rem; }
.ens-cycle .lv { color: var(--gris-doux); font-size: .88rem; }
.ens-cycle .n { margin-top: 4px; font-weight: 700; color: var(--bleu); }

.ens-tgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.ens-type { text-decoration: none; background: #fff; border: 1px solid #e7e6db; border-radius: 12px; padding: 14px 15px; display: flex; flex-direction: column; gap: 3px; transition: transform .14s, border-color .14s, background .14s; }
.ens-type:hover { border-color: var(--ens); background: #fbfdff; transform: translateY(-2px); color: inherit; }
.ens-type .t { font-weight: 700; color: var(--bleu); font-size: .94rem; }
.ens-type .n { color: var(--gris-doux); font-size: .8rem; }

.ens-chip { display: inline-block; text-decoration: none; border: 1px solid #d1d5db; background: #fff; color: #555; border-radius: 999px; padding: 4px 12px; font-weight: 600; font-size: .85rem; }
.ens-chip:hover { border-color: var(--ens); color: var(--ens); }
.ens-chip.actif { background: var(--ens); border-color: var(--ens); color: #fff; }

@media (max-width: 880px) {
  .ens-cgrid { grid-template-columns: 1fr; }
  .ens-tgrid { grid-template-columns: 1fr 1fr; }
}

/* ── Impression ───────────────────────────────────────────── */

.print-only { display: none; }

@media print {
  .no-print { display: none !important; }
  .print-only { display: block !important; }
}

@page { margin: 1.5cm; }

/* ── Espace Enseignants : accès réservé (bandeau, invitation) ─ */

.btn-ens { background: var(--ens2); border-color: var(--ens2); color: #fff; font-weight: 700; }
.btn-ens:hover { background: #2d4b73; border-color: #2d4b73; color: #fff; }
.ens-acces { background: #fff; border-bottom: 1px solid #e3e7ee; }
.ens-acces__int { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 12px; font-size: 0.93rem; color: #374151; }
.ens-acces__ic { width: 34px; height: 34px; border-radius: 10px; background: var(--ens-l); color: var(--ens2); display: grid; place-items: center; flex: 0 0 auto; }
.ens-acces__texte { flex: 1 1 320px; min-width: 0; }
.ens-acces__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ens-invitation {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px;
  background: #fff; border: 1px solid #dbe6f5; border-left: 5px solid var(--ens);
  border-radius: 14px; padding: 18px 20px; margin: 0 0 20px;
}
.ens-invitation__texte { flex: 1 1 300px; min-width: 0; }
.ens-invitation h2 { font-size: 1.1rem; margin: 0 0 4px; color: var(--bleu); }
.ens-invitation p { margin: 0; color: #4b5563; font-size: 0.95rem; }
.ens-invitation__actions { display: flex; gap: 8px; flex-wrap: wrap; }
