/* ============================================================
   Guide IFSI 2026 — N'oublie Jamais
   Feuille de style principale
   Arrêté du 20 février 2026 — NOR : ESRS2601184A
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600;9..40,700&display=swap');

/* ========== VARIABLES ========== */
:root {
  /* Marque NJ */
  --nj-blue: #0343E5;
  --nj-pink: #F01B59;

  /* Domaines — couleurs principales, fonds, textes */
  --da: #0343E5;  --da-bg: #EAEEFE;  --da-text: #032B96;
  --db: #F01B59;  --db-bg: #FEE8F2;  --db-text: #A01040;
  --dc: #0EA676;  --dc-bg: #E4F7F1;  --dc-text: #087354;
  --dd: #F5A623;  --dd-bg: #FEF5E4;  --dd-text: #A06E10;
  --de: #5B2D8E;  --de-bg: #F0EAF9;  --de-text: #3D1D60;
  --ds: #4A5568;  --ds-bg: #EEF0F3;  --ds-text: #2D3748;

  /* Neutres */
  --bg: #FFFFFF;
  --bg-soft: #F9FAFB;
  --text: #1A1A2E;
  --text-mid: #3A3A4E;
  --text-light: #6B7280;
  --border: #E5E7EB;
  --border-light: #F3F4F6;

  /* Progressivité années */
  --y1: #10B981;  --y1-bg: #ECFDF5;
  --y2: #F59E0B;  --y2-bg: #FFFBEB;
  --y3: #F01B59;  --y3-bg: #FEF2F6;

  /* Domaine courant — surchargé par chaque page */
  --domain: var(--da);
  --domain-bg: var(--da-bg);
  --domain-text: var(--da-text);
}

/* ========== RESET ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ========== BASE ========== */
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
ul, ol { list-style: none; }

/* ========== HEADER ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.logo-text {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--nj-blue);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.nj-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--nj-blue);
  color: white;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}
.main-nav {
  display: none;
  gap: 1.5rem;
}
.main-nav a {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-mid);
  text-decoration: none;
  transition: color 0.2s;
}
.main-nav a:hover { color: var(--nj-blue); }
.main-nav a.active { color: var(--nj-blue); font-weight: 600; }
.menu-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.3rem 0.5rem;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--text-mid);
}

/* ========== BREADCRUMB ========== */
.breadcrumb {
  padding: 0.6rem 1rem;
  font-size: 0.75rem;
  color: var(--text-light);
  overflow-x: auto;
  white-space: nowrap;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border-light);
}
.breadcrumb a {
  color: var(--text-light);
  text-decoration: none;
}
.breadcrumb a:hover {
  color: var(--domain);
  text-decoration: underline;
}
.breadcrumb .current {
  color: var(--text-mid);
  font-weight: 600;
}
.breadcrumb span { margin: 0 0.3rem; }

/* ========== LAYOUT ========== */
.page {
  max-width: 800px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

/* ========== BADGES ========== */
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}
.ects-badge {
  background: var(--domain);
  color: white;
}
.consol-badge {
  background: transparent;
  color: var(--text-light);
  border: 1px solid var(--border);
}

/* ========== DOMAIN HERO ========== */
.domain-hero {
  background: var(--domain-bg);
  border-left: 4px solid var(--domain);
  border-radius: 0 8px 8px 0;
  padding: 1.2rem 1.2rem;
  margin-bottom: 2rem;
}
.domain-letter {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--domain);
  line-height: 1;
  margin-bottom: 0.2rem;
}
.domain-hero h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--domain-text);
  line-height: 1.25;
  margin-bottom: 0.5rem;
}
.domain-desc {
  font-size: 0.85rem;
  color: var(--text-mid);
  line-height: 1.5;
  margin-bottom: 0.8rem;
}
.domain-hero .badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* ========== SECTION TITLES ========== */
.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.title-icon {
  display: inline-block;
  width: 4px;
  height: 1.1rem;
  background: var(--domain);
  border-radius: 2px;
  flex-shrink: 0;
}

/* ========== COMPETENCE CARDS (pages Domaine) ========== */
.competence-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.2rem;
  margin-bottom: 1rem;
  scroll-margin-top: 4rem;
}
.comp-header {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}
.comp-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
  height: 1.6rem;
  background: var(--domain);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 4px;
  flex-shrink: 0;
}
.comp-num.generic { background: var(--ds); }
.comp-header h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}
.comp-links {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-bottom: 0.6rem;
}
.comp-links a {
  color: var(--domain);
  text-decoration: none;
  font-weight: 500;
}
.comp-links a:hover { text-decoration: underline; }

/* Progressivité L1/L2/L3 */
.comp-progression {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.prog-year {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.5rem 0.7rem;
  border-radius: 6px;
  font-size: 0.82rem;
  line-height: 1.4;
}
.prog-year.y1 { background: var(--y1-bg); }
.prog-year.y2 { background: var(--y2-bg); }
.prog-year.y3 { background: var(--y3-bg); }
.year-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 1.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: white;
  border-radius: 4px;
  flex-shrink: 0;
}
.year-badge.y1 { background: var(--y1); }
.year-badge.y2 { background: var(--y2); }
.year-badge.y3 { background: var(--y3); }
.prog-year p { color: var(--text-mid); }
.prog-year .verb { font-weight: 600; color: var(--text); }
.prog-year .not-applicable {
  color: var(--text-light);
  font-style: italic;
}

/* ========== UE LINK CARDS (pages Domaine) ========== */
.ue-section { margin-top: 2rem; }
.ue-link-card {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--domain);
  border-radius: 0 8px 8px 0;
  text-decoration: none;
  color: var(--text);
  margin-bottom: 0.6rem;
  transition: background 0.15s, border-color 0.15s;
}
.ue-link-card:hover {
  background: var(--domain-bg);
  border-color: var(--domain);
}
.ue-code {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--domain);
  flex-shrink: 0;
  min-width: 2.2rem;
}
.ue-info { flex: 1; }
.ue-name {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 0.15rem;
}
.ue-meta {
  display: block;
  font-size: 0.72rem;
  color: var(--text-light);
}
.ue-link-card .arrow {
  font-size: 1.1rem;
  color: var(--text-light);
  flex-shrink: 0;
  transition: transform 0.15s;
}
.ue-link-card:hover .arrow {
  transform: translateX(3px);
  color: var(--domain);
}

/* ========== INFO BOX / CROSS-LINKS ========== */
.info-box {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  margin-top: 2rem;
  font-size: 0.82rem;
  color: var(--text-mid);
  line-height: 1.6;
}
.info-box strong { color: var(--text); }
.info-box a {
  color: var(--domain);
  text-decoration: none;
  font-weight: 500;
}
.info-box a:hover { text-decoration: underline; }

/* ========== NAVIGATION INTER-DOMAINES ========== */
.domain-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
}
.domain-nav a {
  color: var(--text-mid);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}
.domain-nav a:hover { color: var(--nj-blue); }
.domain-nav .up { color: var(--text-light); }

/* ========== UE HEADER (pages UE) ========== */
.ue-hero {
  background: var(--domain-bg);
  border-left: 4px solid var(--domain);
  border-radius: 0 8px 8px 0;
  padding: 1.2rem;
  margin-bottom: 2rem;
}
.ue-hero .ue-domain-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--domain-text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
}
.ue-hero .ue-hero-code {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--domain);
  line-height: 1;
  margin-bottom: 0.2rem;
}
.ue-hero h1 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--domain-text);
  line-height: 1.25;
  margin-bottom: 0.6rem;
}
.ue-hero .badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}
.ue-hero .comp-refs {
  font-size: 0.78rem;
  color: var(--text-mid);
}
.ue-hero .comp-refs a {
  color: var(--domain);
  text-decoration: none;
  font-weight: 600;
}
.ue-hero .comp-refs a:hover { text-decoration: underline; }

/* ========== SECTIONS DE CONTENU UE ========== */
/* Bloc commun paramédical niv.6 */
.content-block {
  border-left: 4px solid;
  border-radius: 0 8px 8px 0;
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
}
.content-block.common {
  border-color: var(--ds);
  background: var(--ds-bg);
}
.content-block.specific {
  border-color: var(--domain);
  background: var(--domain-bg);
}
.content-block.neutral {
  border-color: var(--border);
  background: var(--bg-soft);
}
.block-label {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 3px;
  margin-bottom: 0.7rem;
}
.block-label.common {
  background: var(--ds);
  color: white;
}
.block-label.specific {
  background: var(--domain);
  color: white;
}
.block-label.neutral {
  background: var(--text-light);
  color: white;
}
.content-block h3 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.content-block ul {
  list-style: none;
  padding: 0;
}
.content-block ul li {
  font-size: 0.85rem;
  color: var(--text-mid);
  padding: 0.2rem 0 0.2rem 1rem;
  position: relative;
  line-height: 1.5;
}
.content-block ul li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--domain);
  font-weight: 600;
}
.content-block.common ul li::before {
  color: var(--ds);
}
.content-block p {
  font-size: 0.85rem;
  color: var(--text-mid);
  line-height: 1.6;
}

/* ========== ÉVALUATION NORMATIVE ========== */
.eval-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
}
.eval-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6rem;
  height: 1.6rem;
  background: var(--domain);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 4px;
  flex-shrink: 0;
}
.eval-card p {
  font-size: 0.85rem;
  color: var(--text-mid);
  line-height: 1.4;
}

/* ========== NAVIGATION INTER-UE ========== */
.page-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.page-nav a {
  color: var(--text-mid);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}
.page-nav a:hover { color: var(--nj-blue); }
.page-nav .up { color: var(--text-light); }

/* ========== FOOTER GLOBAL ========== */
.site-footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  padding: 1.5rem 1rem;
  font-size: 0.75rem;
  color: var(--text-light);
  text-align: center;
  line-height: 1.8;
}
.site-footer a {
  color: var(--nj-blue);
  text-decoration: none;
}
.site-footer a:hover { text-decoration: underline; }
.footer-brand {
  font-weight: 700;
  color: var(--nj-blue);
  font-size: 0.85rem;
  margin-bottom: 0.2rem;
}
.footer-links { margin-bottom: 0.5rem; }
.footer-links a, .footer-links span { margin: 0 0.5rem; }
.footer-legal { font-size: 0.7rem; }

/* ========== VUE D'ENSEMBLE — grilles de cartes ========== */
.domains-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
  margin-bottom: 2rem;
}
.domain-card {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  transition: transform 0.15s, box-shadow 0.15s;
}
.domain-card:hover { transform: translateY(-1px); }
.domain-card .letter {
  font-size: 1.6rem;
  font-weight: 700;
  flex-shrink: 0;
  min-width: 2rem;
}
.domain-card .card-info { flex: 1; }
.domain-card .card-name {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.3;
}
.domain-card .card-meta {
  font-size: 0.72rem;
  color: var(--text-light);
}

/* ========== RESPONSIVE ========== */
@media (min-width: 640px) {
  .domains-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 768px) {
  .site-header { padding: 0.6rem 2rem; }
  .main-nav { display: flex; }
  .menu-toggle { display: none; }
  .breadcrumb { padding: 0.6rem 2rem; }
  .page { padding: 2rem 2rem 4rem; }
  .comp-progression { flex-direction: row; gap: 0.6rem; }
  .prog-year { flex: 1; flex-direction: column; align-items: flex-start; }
}
@media (min-width: 1024px) {
  .page { padding: 2.5rem 2rem 5rem; }
  .domains-grid { grid-template-columns: 1fr 1fr 1fr; }
}
