/* ==========================================================================
   IZILAB — Feuille de style principale
   Design premium e-learning, palette verte canard IZILAB
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* Palette IZILAB */
  --primary: #0f8f8b;
  --primary-dark: #08736f;
  --primary-light: #eaf7f6;
  --primary-soft: #f5fbfa;

  --accent: #fb9129;

  --text-dark: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --background: #ffffff;
  --background-alt: #f8fafc;
  --background-soft: #fafcfc;

  --border: #e5e7eb;
  --border-light: #f1f5f9;

  --danger: #dc3f4d;
  --danger-bg: #ffe7e9;
  --success: #10b981;
  --success-bg: #d1fae5;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 999px;

  --shadow-soft: 0 8px 30px rgba(15, 143, 139, 0.06);
  --shadow-card: 0 4px 20px rgba(15, 23, 42, 0.06);
  --shadow-hover: 0 12px 40px rgba(15, 143, 139, 0.14);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --container: 1200px;
  --header-h: 76px;
}

/* -------- Reset -------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-body);
  background: var(--background);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; transition: color .15s; }
a:hover { color: var(--primary-dark); }
h1, h2, h3, h4 {
  margin: 0 0 16px;
  line-height: 1.2;
  color: var(--text-dark);
  font-weight: 700;
  letter-spacing: -0.01em;
}
p { margin: 0 0 16px; }
button { font-family: inherit; }

/* -------- Layout -------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
main { flex: 1; }

/* ==========================================================================
   HEADER
   ========================================================================== */
.header {
  background: var(--background);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
}
.header .container {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 40px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.5px;
}
.brand:hover { color: var(--text-dark); text-decoration: none; }
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-mark svg { width: 20px; height: 20px; }

.nav-main {
  display: flex;
  gap: 36px;
  justify-content: center;
}
.nav-main a {
  color: var(--text-body);
  font-weight: 500;
  font-size: 15px;
  padding: 6px 0;
  position: relative;
}
.nav-main a:hover { color: var(--primary); }
.nav-main a.active {
  color: var(--text-dark);
  font-weight: 600;
}
.nav-main a.active::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -22px;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: var(--primary);
  border-radius: 3px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-body);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--primary-light); color: var(--primary); }
.icon-btn svg { width: 20px; height: 20px; }

.link-plain {
  color: var(--text-body);
  font-weight: 500;
  font-size: 15px;
}
.link-plain:hover { color: var(--primary); }

/* Menu mobile toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 40px; height: 40px;
  align-items: center;
  justify-content: center;
  color: var(--text-dark);
}
.nav-toggle svg { width: 24px; height: 24px; }

/* ==========================================================================
   BOUTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-full);
  font-size: 15px;
  font-weight: 600;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}
.btn-ghost {
  background: transparent;
  color: var(--text-body);
}
.btn-ghost:hover { background: var(--background-alt); color: var(--text-dark); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 14px; }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  padding: 72px 0 88px;
  overflow: hidden;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero-content h1 {
  font-size: 64px;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  font-weight: 800;
}
.hero-content h1 span.accent {
  color: var(--primary);
  display: block;
}
.hero-content .lead {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 500px;
  margin-bottom: 32px;
  line-height: 1.6;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-actions .btn { padding: 14px 26px; font-size: 15px; }

/* Illustration hero */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 460px;
}
/* Forme abstraite verte derrière l'image */
.hero-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(closest-side at 55% 45%, #dff2f1 0%, #eaf7f6 55%, transparent 72%);
  border-radius: 50%;
  transform: scale(1.05);
}
.hero-image {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  height: auto;
  object-fit: contain;
}

/* ==========================================================================
   4 AVANTAGES
   ========================================================================== */
.benefits {
  padding: 48px 0 72px;
}
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.benefit {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}
.benefit-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.benefit-icon svg { width: 26px; height: 26px; }
.benefit h3 {
  font-size: 16px;
  margin: 0;
  color: var(--text-dark);
}
.benefit p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

/* ==========================================================================
   PARCOURS POPULAIRES
   ========================================================================== */
.paths {
  padding: 72px 0;
}
.section-header {
  text-align: center;
  margin-bottom: 40px;
}
.section-header h2 {
  font-size: 34px;
  font-weight: 700;
  margin: 0;
}

.paths-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.path-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
}
.path-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.path-image {
  position: relative;
  height: 180px;
  background: linear-gradient(135deg, var(--primary-light) 0%, #d5efee 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}
.path-image svg { width: 84px; height: 84px; opacity: 0.9; }
.path-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--primary);
  color: #fff;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.path-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.path-body h3 {
  font-size: 20px;
  margin-bottom: 8px;
}
.path-body p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
  flex: 1;
}
.path-meta {
  display: flex;
  gap: 18px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.path-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.path-meta svg { width: 14px; height: 14px; }

/* ==========================================================================
   TÉMOIGNAGE
   ========================================================================== */
.testimonial {
  padding: 72px 0;
  background: linear-gradient(180deg, var(--primary-soft) 0%, #fff 100%);
}
.testimonial-card {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
  padding: 40px 24px;
  position: relative;
}
.testimonial-quote-mark {
  color: var(--primary);
  opacity: 0.25;
  font-size: 80px;
  line-height: 0.6;
  font-family: Georgia, serif;
  margin-bottom: 16px;
  height: 40px;
}
.testimonial-text {
  font-size: 22px;
  color: var(--text-dark);
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 28px;
  font-style: italic;
}
.testimonial-author {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 24px;
}
.testimonial-avatar {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
}
.testimonial-name { text-align: left; }
.testimonial-name .name { font-weight: 600; color: var(--text-dark); }
.testimonial-name .role { font-size: 13px; color: var(--text-muted); }
.testimonial-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.testimonial-dots span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
}
.testimonial-dots span.active { background: var(--primary); width: 24px; border-radius: 4px; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  background: var(--background-alt);
  padding: 56px 0 24px;
  margin-top: 0;
  color: var(--text-body);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand .brand { margin-bottom: 12px; }
.footer-brand p {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 260px;
}
.footer h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 14px;
  text-transform: none;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer ul a {
  color: var(--text-muted);
  font-size: 14px;
}
.footer ul a:hover { color: var(--primary); }

.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.footer-social a {
  width: 36px; height: 36px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-body);
  transition: background .15s, color .15s;
}
.footer-social a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.footer-social svg { width: 16px; height: 16px; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* ==========================================================================
   AUTH / FORMULAIRES (pages register, login)
   ========================================================================== */
.auth-page {
  min-height: calc(100vh - var(--header-h) - 260px);
  display: flex;
  align-items: center;
  padding: 56px 0;
  background: var(--background-soft);
}
.container-sm { max-width: 460px; margin: 0 auto; padding: 0 24px; }
.auth-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-card);
}
.auth-card h1 { font-size: 26px; text-align: center; margin-bottom: 6px; }
.auth-card .subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 28px;
  font-size: 14px;
}
.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-muted);
}

.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 8px;
}
.form-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text-dark);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 143, 139, 0.15);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 16px;
}
.alert-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger);
}
.alert-success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success);
}
.hidden { display: none !important; }

/* ==========================================================================
   DASHBOARD / PROFIL (pages protégées)
   ========================================================================== */
.dashboard { padding: 56px 0; }
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}
.dashboard-header h1 { font-size: 28px; margin: 0; }
.dashboard-header .subtitle { color: var(--text-muted); margin: 0; font-size: 15px; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-soft);
}
.stat-card .label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  font-weight: 600;
}
.stat-card .value {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
}

.section-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-soft);
}
.section-card h2 { font-size: 18px; margin-bottom: 16px; }

.profile-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 700;
}
.profile-field {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 15px;
}
.profile-field:last-child { border-bottom: none; }
.profile-field .label { color: var(--text-muted); }
.profile-field .value { color: var(--text-dark); font-weight: 500; }
.role-badge {
  display: inline-block;
  padding: 2px 10px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-content h1 { font-size: 52px; }
  .benefits-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .paths-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --header-h: 64px; }
  .container { padding: 0 20px; }

  .nav-main, .nav-actions .link-plain, .nav-actions .icon-btn { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-actions { gap: 8px; }
  .header .container { grid-template-columns: auto 1fr auto; gap: 12px; }

  /* Menu déployé */
  .nav-main.open {
    display: flex;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border-light);
    flex-direction: column;
    gap: 0;
    padding: 8px 20px 20px;
  }
  .nav-main.open a {
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
  }
  .nav-main.open a.active::after { display: none; }

  .hero { padding: 40px 0 56px; }
  .hero .container { grid-template-columns: 1fr; gap: 32px; }
  .hero-content h1 { font-size: 40px; }
  .hero-content .lead { font-size: 16px; }
  .hero-visual { order: -1; min-height: 300px; }
  .hero-actions .btn { flex: 1; }

  .benefits { padding: 32px 0 48px; }
  .benefits-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }

  .paths { padding: 48px 0; }
  .section-header h2 { font-size: 26px; }

  .testimonial { padding: 48px 0; }
  .testimonial-text { font-size: 18px; }

  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 480px) {
  .benefits-grid { grid-template-columns: 1fr; }
  .hero-content h1 { font-size: 34px; }
}