/*
  LMS TRAINING — Charte professionnelle
  Design épuré, hiérarchie claire, expérience type site corporate / formation
*/
@import url('https://fonts.googleapis.com/css2?family=Anton&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --primary: #0a5c5f;
  --primary-hover: #084548;
  --primary-light: #0d7377;
  --accent: #3eb4b8;
  --accent-soft: rgba(62, 180, 184, 0.12);
  --rose: #faf5f6;
  --rose-border: #eedee2;
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --font-heading: 'Anton', sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 5rem;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.25rem;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --container: min(100% - 2rem, 1120px);
  --text-width: 42rem;
}

/* Compat */
:root {
  --lms-teal: var(--primary-light);
  --lms-teal-dark: var(--primary);
  --lms-aqua: var(--accent);
  --lms-rose-pale: var(--rose);
}

/* Reset & base */
* { box-sizing: border-box; }
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--gray-800);
  background: var(--white);
  margin: 0;
}
body.d-flex { min-height: 100vh; display: flex; flex-direction: column; }

/* Container */
.navbar .container,
main .container,
.footer-lms .container {
  width: var(--container);
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

/* ===== NAVBAR ===== */
.navbar {
  background: var(--white) !important;
  padding-top: var(--space-sm);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--gray-200);
}
.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none !important;
  color: var(--gray-900) !important;
  font-weight: 600;
  transition: color 0.2s;
}
.navbar-brand:hover { color: var(--primary) !important; }
.navbar-brand img.nav-logo { height: 80px; width: auto; }
@media (min-width: 768px) { .navbar-brand img.nav-logo { height: 92px; } }
.navbar-brand-text {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  letter-spacing: 0.03em;
}
.nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--gray-600) !important;
  padding: var(--space-xs) var(--space-sm) !important;
  border-radius: var(--radius);
  transition: color 0.25s ease, background 0.25s ease, transform 0.2s ease;
  position: relative;
}
.nav-link:not(.dropdown-toggle)::after {
  content: '';
  position: absolute;
  left: var(--space-sm);
  right: var(--space-sm);
  bottom: 4px;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: right;
  border-radius: 1px;
  transition: transform 0.3s ease;
}
.nav-link:hover {
  color: var(--primary) !important;
  background: var(--gray-50);
  transform: translateY(-1px);
}
.nav-link:hover:not(.dropdown-toggle)::after { transform: scaleX(1); transform-origin: left; }
.nav-link.active:not(.dropdown-toggle)::after { transform: scaleX(1); transform-origin: left; }
.nav-link.catalogue { color: var(--primary) !important; font-weight: 600; }
.nav-link.catalogue::after { display: none; }
.nav-link.dropdown-toggle:hover { transform: translateY(-1px); }

/* Dropdown menu */
.nav-item.dropdown .nav-link.dropdown-toggle::after { transition: transform 0.25s ease; }
.nav-item.dropdown.show .nav-link.dropdown-toggle::after { transform: rotate(180deg); }
.dropdown-menu {
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg);
  padding: var(--space-xs) 0;
  margin-top: var(--space-xs);
  animation: dropdownFadeIn 0.25s ease;
}
@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.dropdown-item {
  font-size: 0.9375rem;
  padding: 0.5rem 1rem;
  transition: background 0.2s ease, padding-left 0.2s ease, color 0.2s ease;
}
.dropdown-item:hover {
  background: var(--gray-50);
  color: var(--primary);
  padding-left: 1.25rem;
}
.dropdown-item:active { background: var(--gray-100); }
.dropdown-divider { margin: 0.35rem 0; border-color: var(--gray-200); }
.dropdown-menu .dropdown-item.external::after {
  content: '';
  display: inline-block;
  width: 0.4em;
  height: 0.4em;
  margin-left: 0.35em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='currentColor'%3E%3Cpath d='M8 0L6.59 1.41 12.17 7H0v2h12.17l-5.58 5.59L8 16l8-8-8-8z'/%3E%3C/svg%3E") no-repeat center;
  opacity: 0.6;
  vertical-align: 0.15em;
}

/* Lang switcher */
.lang-switcher { display: flex; gap: var(--space-xs); }
.lang-switcher a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 18px;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}
.lang-switcher a:hover { transform: scale(1.08); box-shadow: var(--shadow); }
.lang-switcher a.active-lang { box-shadow: 0 0 0 2px var(--primary); }
.lang-switcher a span.flag-icon {
  display: block;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}
.lang-switcher a span.flag-fr {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 6'%3E%3Crect fill='%23002395' width='3' height='6'/%3E%3Crect fill='%23fff' x='3' width='3' height='6'/%3E%3Crect fill='%23ED2939' x='6' width='3' height='6'/%3E%3C/svg%3E");
}
.lang-switcher a span.flag-gb {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 30'%3E%3Crect fill='%23012169' width='60' height='30'/%3E%3Cpath stroke='%23fff' stroke-width='6' fill='none' d='M0 15h60M30 0v30'/%3E%3Cpath stroke='%23C8102E' stroke-width='4' fill='none' d='M0 15h60M30 0v30'/%3E%3Cpath stroke='%23fff' stroke-width='5' fill='none' d='M0 0l60 30M60 0L0 30'/%3E%3Cpath stroke='%23C8102E' stroke-width='3' fill='none' d='M0 0l60 30M60 0L0 30'/%3E%3C/svg%3E");
}

/* ===== TYPO ===== */
h1, h2, h3, .display-4, .display-5, .navbar-brand-text {
  font-family: var(--font-heading) !important;
  color: var(--gray-900);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.display-4 { font-size: clamp(2rem, 4.5vw, 2.75rem); }
.display-5 { font-size: clamp(1.65rem, 3.5vw, 2rem); }
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--primary);
  margin-bottom: var(--space-xs);
}

/* ===== HERO ===== */
.hero-formation,
.hero-page-dark,
.hero-page-light {
  position: relative;
  padding: var(--space-2xl) var(--space-lg);
  border-radius: var(--radius-2xl);
  overflow: hidden;
}
@media (min-width: 768px) {
  .hero-formation,
  .hero-page-dark,
  .hero-page-light { padding: var(--space-3xl) var(--space-xl); }
}
.hero-formation {
  background: linear-gradient(145deg, var(--primary) 0%, var(--primary-light) 40%, var(--accent) 100%);
  color: var(--white);
  box-shadow: 0 4px 24px rgba(10, 92, 95, 0.25);
}
.hero-formation::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 70% at 50% 120%, rgba(62, 180, 184, 0.4) 0%, transparent 50%),
    radial-gradient(ellipse 60% 50% at 0% 0%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 100% 20%, rgba(250, 245, 246, 0.06) 0%, transparent 45%);
  pointer-events: none;
}
.hero-formation::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L30 60M0 30L60 30' stroke='rgba(255,255,255,0.04)' stroke-width='1' fill='none'/%3E%3C/svg%3E");
  opacity: 0.6;
  pointer-events: none;
}
.hero-formation .eyebrow {
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: 0.2em;
}
.hero-formation .display-4,
.hero-formation .display-5 {
  color: var(--white);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}
.hero-page-dark {
  background: linear-gradient(160deg, var(--primary), var(--primary-light));
  color: var(--white);
}
.hero-page-light {
  background: linear-gradient(160deg, var(--primary-light), var(--accent));
  color: var(--white);
}
.hero-logo-img {
  width: 80px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.2));
  position: relative;
  z-index: 1;
}
@media (min-width: 768px) { .hero-logo-img { width: 96px; } }

/* Cartes dans le hero (charte: primary, accent) */
.card-formation {
  border: none;
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 20px rgba(10, 92, 95, 0.2);
}
.card-formation:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
}
.card-formation.aqua {
  background: rgba(62, 180, 184, 0.28);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 20px rgba(62, 180, 184, 0.25);
}
.card-formation.aqua:hover {
  background: rgba(62, 180, 184, 0.42);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 16px 36px rgba(10, 92, 95, 0.35);
}

/* ===== MAIN ===== */
main { flex: 1; padding: var(--space-xl) 0 var(--space-2xl); }

/* Sections */
.page-section {
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-2xl);
}
.page-section:first-of-type { padding-top: 0; }
.page-section--alt {
  background: var(--gray-50);
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-2xl);
}
.page-section--teal {
  background: var(--accent-soft);
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-2xl);
}

.section-title {
  font-family: var(--font-heading) !important;
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  letter-spacing: 0.05em;
  color: var(--gray-900);
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}
.section-subtitle {
  font-size: 1rem;
  color: var(--gray-600);
  margin-bottom: var(--space-md);
  max-width: var(--text-width);
  line-height: 1.65;
}
.section-intro {
  margin-bottom: var(--space-md);
  color: var(--gray-700);
  max-width: var(--text-width);
}
.section-heading {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: var(--space-sm);
}

/* Grille simple (2 col desktop) */
.grid-quinconce {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .grid-quinconce {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }
}
@media (min-width: 992px) {
  .grid-quinconce.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
}

/* Cartes de contenu (pavés) */
.pave {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}
.pave:hover {
  box-shadow: var(--shadow);
  border-color: var(--gray-300);
  transform: translateY(-2px);
}
.pave--alt {
  background: var(--rose);
  border-color: var(--rose-border);
}
.pave__body { padding: var(--space-lg); }

/* Images */
.img-pave {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--primary);
  width: 100%;
}
.img-pave img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.92;
  transition: opacity 0.35s, transform 0.4s;
}
.img-pave:hover img {
  opacity: 1;
  transform: scale(1.03);
}
.img-pave::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(10, 92, 95, 0.5) 100%);
  pointer-events: none;
}
.img-pave__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-md) var(--space-lg);
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 1;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

/* Boutons */
.btn-lms {
  background: var(--primary);
  border: none;
  color: var(--white);
  font-weight: 600;
  font-size: 0.9375rem;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-lg);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn-lms:hover {
  background: var(--primary-hover);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(10, 92, 95, 0.35);
}
.btn-lms-aqua {
  background: var(--accent);
  border: none;
  color: var(--gray-900);
  font-weight: 600;
  font-size: 0.9375rem;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-lg);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn-lms-aqua:hover {
  background: #35a3a7;
  color: var(--gray-900);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(62, 180, 184, 0.4);
}
.btn-light.rounded-pill {
  font-weight: 600;
  padding: var(--space-sm) var(--space-lg);
  border: 1px solid rgba(255,255,255,0.4);
  color: var(--gray-900);
}
.btn-light.rounded-pill:hover {
  background: var(--white);
  border-color: var(--white);
  color: var(--gray-800);
  box-shadow: var(--shadow);
}

/* Blocs contenu (pages internes) */
.block-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: var(--space-xl);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.block-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--gray-300);
}
.blockquote-lms {
  border-left: 3px solid var(--primary);
  background: var(--rose);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: var(--space-md);
  margin: var(--space-md) 0;
  font-size: 0.9375rem;
}
.badge-lms {
  background: var(--accent-soft);
  color: var(--primary);
  font-weight: 600;
  font-size: 0.75rem;
}

.module-list { list-style: none; padding-left: 0; margin: 0; }
.module-list li {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  font-size: 0.9375rem;
}
.module-list li:last-child { border-bottom: 0; }
.module-list .module-num {
  font-weight: 700;
  color: var(--primary);
  min-width: 2rem;
}

/* Animations légères */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-slide-up { animation: slideUp 0.5s ease-out forwards; }
.animation-delay-1 { animation-delay: 0.08s; }
.animation-delay-2 { animation-delay: 0.16s; }
.pave { opacity: 0; animation: slideUp 0.5s ease-out forwards; }
.pave:nth-child(1) { animation-delay: 0.05s; }
.pave:nth-child(2) { animation-delay: 0.1s; }
.pave:nth-child(3) { animation-delay: 0.15s; }
.pave:nth-child(4) { animation-delay: 0.2s; }
.pave:nth-child(5) { animation-delay: 0.25s; }
.pave:nth-child(6) { animation-delay: 0.3s; }
.pave:nth-child(7) { animation-delay: 0.35s; }
.pave:nth-child(8) { animation-delay: 0.4s; }
.pave:nth-child(9) { animation-delay: 0.45s; }
.pave:nth-child(10) { animation-delay: 0.5s; }
.page-section .section-title { opacity: 0; animation: fadeIn 0.4s ease-out 0.1s forwards; }
.page-section .section-subtitle { opacity: 0; animation: fadeIn 0.4s ease-out 0.15s forwards; }
.page-section .section-intro { opacity: 0; animation: fadeIn 0.4s ease-out 0.2s forwards; }

/* Footer */
.footer-lms {
  background: var(--primary);
  color: var(--white);
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.footer-lms .small { opacity: 0.92; }
.footer-signature img {
  height: 32px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem 0.5rem;
  font-size: 0.875rem;
}
.footer-nav a {
  color: rgba(255,255,255,0.92);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-nav a:hover { color: #fff; }
.footer-nav--legal { font-size: 0.8125rem; opacity: 0.85; }
.footer-sep {
  color: rgba(255,255,255,0.5);
  user-select: none;
  margin: 0 0.15rem;
}
.nav-link.active { color: var(--primary) !important; font-weight: 600; }

.img-cover { object-fit: cover; object-position: center; border-radius: var(--radius-lg); }
main .block-card { animation: slideUp 0.45s ease-out both; }
main .block-card:nth-of-type(1) { animation-delay: 0.08s; }
main .block-card:nth-of-type(2) { animation-delay: 0.16s; }
