/* ============================================================
   SECTIONS — Hero, styles spécifiques aux 3 sections
   ============================================================ */

/* ===== HERO (page d'accueil) ===== */
.hero-section {
  background: var(--gradient-hero);
  color: white;
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
  min-height: 520px;
  display: flex;
  align-items: center;
}
.hero-section .container { position: relative; z-index: 2; }

/* Décoration géométrique + motif de points */
.hero-decoration {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 70% 50%, rgba(255,255,255,0.04) 0%, transparent 50%),
    radial-gradient(circle at 10% 80%, rgba(35,140,95,0.15) 0%, transparent 40%),
    radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: auto, auto, 30px 30px;
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: var(--fw-bold);
  color: white;
  line-height: 1.05;
  margin-bottom: 20px;
}
.hero-accent {
  background: linear-gradient(90deg, #7dd3fc, #34d399);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.8);
  max-width: 600px;
  line-height: var(--lh-relaxed);
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
}
.hero-actions .btn-secondary {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.35);
  color: white;
}
.hero-actions .btn-secondary:hover {
  background: rgba(255,255,255,0.2);
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.55);
}

/* Hero layout 2 colonnes (desktop) */
.hero-layout {
  display: flex;
  align-items: center;
  gap: 60px;
}
.hero-content { flex: 1; min-width: 0; }

/* Panneau visuel droite — masqué par défaut (mobile first) */
.hero-visual { display: none; }

@media (min-width: 1024px) {
  .hero-visual {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 260px;
    flex-shrink: 0;
  }
}

/* Cartes flottantes dans le panneau visuel */
.hero-float-card {
  background: rgba(255,255,255,0.10);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.22);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: background var(--t-base), transform var(--t-base);
  cursor: default;
}
.hero-float-card:hover {
  background: rgba(255,255,255,0.18);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
  transform: translateX(-4px) !important;
}
.hero-float-num {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: var(--fw-bold);
  color: rgba(255,255,255,0.20);
  line-height: 1;
  flex-shrink: 0;
}
.hero-float-card > span:last-child {
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: rgba(255,255,255,0.78);
  line-height: var(--lh-snug);
}
/* Stagger décalé : 2e et 3e carte légèrement décalées à droite */
.hero-float-card:nth-child(2) { transform: translateX(10px); }
.hero-float-card:nth-child(3) { transform: translateX(20px); }

@media (max-width: 767px) {
  .hero-section { padding: 80px 0 60px; min-height: auto; }
  .hero-actions  { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
}

/* ===== EN-TÊTE INTERNE DES SECTIONS ===== */
.section-page-hero {
  background: var(--gradient-hero);
  padding: 52px 0 44px;
  color: white;
  overflow: hidden;
}

/* Grand numéro décoratif en watermark */
.section-hero-bg-num {
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-heading);
  font-size: clamp(6rem, 18vw, 14rem);
  font-weight: var(--fw-bold);
  color: rgba(255,255,255,0.05);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.section-page-hero .section-num-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-full);
  padding: 5px 14px;
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  margin-bottom: 16px;
}
.section-page-hero h1 {
  color: white;
  font-size: var(--text-4xl);
  margin-bottom: 12px;
}
.section-page-hero p {
  color: rgba(255,255,255,0.75);
  font-size: var(--text-lg);
  max-width: 640px;
}

/* ===== SECTION 1 — Cadre Pédagogique ===== */

/* Tableau Organisation des enseignements */
.table-responsive { overflow-x: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.table-enseignements th:first-child { border-radius: var(--radius-md) 0 0 0; }
.table-enseignements th:last-child  { border-radius: 0 var(--radius-md) 0 0; }

/* Onglets semestres */
.tabs-container { margin-bottom: 0; }
.tabs-nav {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border-color);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs-nav::-webkit-scrollbar { display: none; }
.tab-btn {
  padding: 10px 18px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--t-fast);
}
.tab-btn:hover { color: var(--primary-color); }
.tab-btn.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  font-weight: var(--fw-semibold);
}
.tab-panel { display: none; padding-top: 20px; }
.tab-panel.active { display: block; }

/* Compétences par domaine */
.competences-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.competence-domain-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary-color);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-xs);
}
.competence-domain-card h4 {
  font-size: var(--text-base);
  color: var(--primary-dark);
  margin-bottom: 12px;
}
.competence-domain-card ul {
  list-style: none;
  padding: 0;
}
.competence-domain-card ul li {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  padding: 4px 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.competence-domain-card ul li::before {
  content: '▸';
  color: var(--secondary-color);
  flex-shrink: 0;
  margin-top: 1px;
}

/* Débouchés */
.debouches-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.debouche-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--t-base), transform var(--t-base);
}
.debouche-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.debouche-card .debouche-icon {
  font-size: 32px;
  margin-bottom: 12px;
}
.debouche-card h4 { font-size: var(--text-base); color: var(--primary-dark); margin-bottom: 8px; }
.debouche-card p { font-size: var(--text-sm); margin-bottom: 12px; }
.debouche-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.debouche-examples .tag {
  background: var(--secondary-100);
  color: var(--secondary-color);
  border-color: transparent;
}

@media (max-width: 767px) {
  .competences-grid { grid-template-columns: 1fr; }
  .debouches-grid   { grid-template-columns: 1fr; }
}
@media (max-width: 1023px) {
  .debouches-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== SECTION 2 — Processus ===== */

/* Grille de documents téléchargeables */
.documents-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card-document { cursor: default; }

/* Grille d'évaluation dans accordéon */
.grille-table { width: 100%; margin-top: 12px; }
.grille-table th {
  background: var(--primary-100);
  color: var(--primary-dark);
}
.grille-total-row td { font-weight: var(--fw-bold); background: var(--bg-surface); }

@media (max-width: 767px) {
  .documents-grid { grid-template-columns: 1fr; }
}

/* ===== SECTION 3 — Archives ===== */

/* Barre de progression des promotions */
.promotions-progress { margin-bottom: 40px; }
.promotion-bar-item { margin-bottom: 16px; }
.promotion-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.promotion-bar-header .year  { font-weight: var(--fw-semibold); color: var(--primary-dark); font-size: var(--text-sm); }
.promotion-bar-header .count { font-size: var(--text-sm); color: var(--text-muted); }
.progress-track {
  height: 10px;
  background: var(--bg-surface);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--gradient-section-header);
  border-radius: var(--radius-full);
  transition: width 1s var(--ease-out);
}

/* Grille de mémoires */
.memoires-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 1023px) { .memoires-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 767px)  { .memoires-grid { grid-template-columns: 1fr; } }

/* État vide */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state p { font-size: var(--text-base); }

/* Spinner intégré */
.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
