/*
 * design-system.css — Composants réutilisables pour les pages publiques
 * Référence visuelle : templates/immersions/presentation.html
 * (carte blanche arrondie, ombre douce, titres Garamond colorés en --c1)
 *
 * Objectif : remplacer les <style> inline dupliqués dans les templates
 * (module-card, section-card, profil-card, parcours-timeline, etc.)
 * par un jeu réduit de classes communes.
 */

/* ── En-tête du site (déplacé depuis templates/base.html) ───────────────── */
.site-header {
  text-align: center;
  padding: 1.4rem 1rem 1rem;
  background: #fff;
}
.site-header h1 {
  font-family: 'EB Garamond', Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  letter-spacing: .01em;
  color: #1a1a1a;
  margin: 0;
  line-height: 1.2;
}

/* ── Titres en Garamond sur tout le site ─────────────────────────────────── */
h1, h2, h3, h4, h5, h6,
.card-title, .display-1, .display-2, .display-3,
.display-4, .display-5, .display-6 {
  font-family: 'EB Garamond', Georgia, serif;
  font-weight: 400;
}

/* ── Titre héros (accueil uniquement) ────────────────────────────────────── */
.site-hero {
  text-align: center;
  padding: 1.6rem 1rem 1.2rem;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  overflow: hidden;
}
.site-hero h1 {
  font-family: 'EB Garamond', Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  letter-spacing: .01em;
  color: #1a1a1a;
  margin: 0;
  line-height: 1.2;
  animation: hero-fade-in 1s ease both;
}
@keyframes hero-fade-in {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Navbar ───────────────────────────────────────────────────────────────── */
.navbar-site {
  background: #fff;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  padding: .35rem 0;
}
.navbar-site .nav-link,
.navbar-site .navbar-brand-link {
  color: #1a1a1a;
  font-size: .875rem;
  padding: .35rem .7rem;
}
.navbar-site .nav-link:hover,
.navbar-site .navbar-brand-link:hover {
  color: var(--c1, #2563eb);
}
.navbar-site .nav-link.active,
.navbar-site .nav-link.fw-semibold {
  font-weight: 600;
}
.navbar-site .dropdown-menu {
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  font-size: .875rem;
  min-width: 170px;
}
.navbar-site .dropdown-item {
  padding: .45rem 1rem;
  color: #1a1a1a;
}
.navbar-site .dropdown-item:hover {
  background: #f3f4f6;
}
.navbar-site .social-icon {
  color: #1a1a1a;
  font-size: 1rem;
  padding: .35rem .4rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}
.navbar-site .social-icon:hover { color: var(--c1, #2563eb); }

/* ══════════════════════════════════════════════════════════════════════════
   CARTES DE CONTENU — pattern "immersions"
   ══════════════════════════════════════════════════════════════════════════ */

/* Boîte blanche arrondie avec ombre douce (remplace .module-card, .section-card,
   .profil-card, .profil-header…). Empilable, un bloc par section de page. */
.content-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  padding: 20px 22px;
  margin-bottom: 20px;
}
.content-card h2,
.content-card h3 {
  font-family: 'EB Garamond', Georgia, serif;
  font-weight: 500;
  color: var(--c1);
  margin-bottom: 8px;
}
/* Variante en-tête : avatar + texte côte à côte (profil, fiche établissement…) */
.content-card-flex {
  display: flex;
  gap: 24px;
  align-items: center;
}

/* Grille de cartes cliquables (annuaire, listes…) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.card-tile {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,.07);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow .2s, transform .1s;
}
.card-tile:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.13);
  transform: translateY(-2px);
  color: inherit;
}

/* ── Avatars circulaires (initiales ou photo) ────────────────────────────── */
.avatar-circle {
  border-radius: 50%;
  background: var(--c1);
  color: #fff;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.avatar-circle img { width: 100%; height: 100%; object-fit: cover; }
.avatar-circle-lg { width: 80px; height: 80px; font-size: 32px; }
.avatar-circle-sm { width: 52px; height: 52px; font-size: 20px; }

/* ── Logos établissement (carré, fond clair, object-fit contain) ─────────── */
.logo-box {
  border-radius: 8px;
  object-fit: contain;
  background: #f5f6f8;
  flex-shrink: 0;
}
.logo-box-sm { width: 56px; height: 56px; }
.logo-box-lg { width: 96px; height: 96px; border-radius: 10px; }

/* ── Carte-ligne cliquable (annuaire d'écoles, listes horizontales) ──────── */
.card-row {
  background: #fff;
  border-radius: 10px;
  padding: 16px 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .15s, transform .15s;
}
.card-row:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,.14);
  transform: translateY(-1px);
  color: inherit;
}

/* ── Vignette vidéo (YouTube facade) ──────────────────────────────────────── */
.video-thumb-wrap {
  position: relative;
  display: block;
  border-radius: 6px;
  overflow: hidden;
}
.video-thumb-wrap img { width: 100%; display: block; }
.video-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.25);
  color: #fff;
  font-size: 40px;
}

/* ── Listes à lignes séparées (module-seance/module-date, prepa-ligne…) ──── */
.list-row {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 4px 0;
  border-top: 1px solid #f0f0f0;
  font-size: .92rem;
  color: #444;
}
.list-row:first-of-type {
  border-top: none;
  margin-top: 8px;
}
.list-row-between { justify-content: space-between; }

/* ── Timeline verticale (parcours) ───────────────────────────────────────── */
.timeline {
  list-style: none;
  position: relative;
  padding-left: 28px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 8px; top: 6px; bottom: 6px;
  width: 2px;
  background: #e0e0e0;
}
.timeline li {
  position: relative;
  margin-bottom: 18px;
  line-height: 1.4;
}
.timeline li::before {
  content: '';
  position: absolute;
  left: -24px; top: 6px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--c1);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--c1);
}
.timeline li.ecole::before { background: var(--c2); box-shadow: 0 0 0 2px var(--c2); }
.timeline li.lycee::before { background: var(--c5); box-shadow: 0 0 0 2px var(--c5); }

/* ── Badges pastille (léger, texte + fond clair) ─────────────────────────── */
.badge-pill {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 6px;
  font-weight: 600;
}
.badge-pill-cpge  { background: var(--c1-l); color: var(--c1-d); }
.badge-pill-ecole { background: var(--c2-l); color: var(--c2-d); }
.badge-pill-lycee { background: var(--c5-l); color: var(--c5-d); }
.badge-pill-autre { background: var(--c4-l); color: var(--c4-d); }

/* ── Bouton LinkedIn ──────────────────────────────────────────────────────── */
.btn-linkedin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #0077b5;
  color: #fff;
  padding: 7px 16px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  margin-top: 10px;
  transition: background .2s;
}
.btn-linkedin:hover { background: #005f8e; color: #fff; }

/* ── État vide ────────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

/* ══════════════════════════════════════════════════════════════════════════
   GRILLE D'ACCUEIL (page home) — cartes média (image + en-tête)
   ══════════════════════════════════════════════════════════════════════════ */
.home-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 20px;
  margin-bottom: 40px;
}
@media (min-width: 576px) {
  .home-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px) {
  .home-grid { grid-template-columns: repeat(3, 1fr); }
}

.home-card {
  background: transparent;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .18s, border-color .18s;
}
.home-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.10);
  border-color: var(--c1);
  text-decoration: none;
  color: inherit;
}

.home-card-header {
  padding: 16px 18px 12px;
  min-height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
}
.home-card-title {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.08rem;
  font-weight: 500;
  color: #1a1a1a;
  line-height: 1.25;
  margin: 0;
}
.home-card-sub {
  font-size: .78rem;
  font-weight: 600;
  color: var(--c1);
  min-height: 1.1em;
  margin: 0;
}

.home-card-img {
  background: #f3f4f6;
  overflow: hidden;
}
.home-card-img img {
  width: 100%;
  height: auto;
  display: block;
}
.home-card-img-placeholder {
  min-height: 160px;
  background: linear-gradient(135deg, var(--c1-l, #eff6ff) 0%, #f8fafc 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--c1);
  opacity: .6;
}
