/* ============================================================
   HymSchool — Composants UI
   components.css
   ============================================================ */

/* ─── Boutons ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--transition), border-color var(--transition),
              color var(--transition), transform var(--transition),
              box-shadow var(--transition);
  white-space: nowrap;
  user-select: none;
}
.btn:hover   { transform: translateY(-1px); }
.btn:active  { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; }

.btn--primary {
  background-color: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
}
.btn--primary:hover {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(13,148,136,.35);
}

.btn--secondary {
  background-color: transparent;
  color: var(--theme-text-primary);
  border-color: var(--theme-text-primary);
}
.btn--secondary:hover {
  background-color: var(--color-primary-light);
  color: var(--theme-text-primary-hover);
}

.btn--outline-white {
  background-color: transparent;
  color: #ffffff;
  border-color: rgba(255,255,255,.5);
}
.btn--outline-white:hover {
  background-color: rgba(255,255,255,.12);
  border-color: #ffffff;
  color: #ffffff;
}

.btn--ghost {
  background-color: transparent;
  color: var(--color-muted);
  border-color: transparent;
}
.btn--ghost:hover {
  background-color: var(--color-bg-light);
  color: var(--color-text);
}

.btn--white {
  background-color: #ffffff;
  color: var(--color-primary-dark);
  border-color: #ffffff;
}
.btn--white:hover {
  background-color: var(--color-primary-light);
  color: var(--color-primary-dark);
}

.btn--lg { padding: 1rem 2rem; font-size: var(--text-lg); }
.btn--sm { padding: 0.5rem 1rem; font-size: var(--text-sm); }
.btn--full { width: 100%; }

.btn--loading {
  pointer-events: none;
  opacity: .7;
}
.btn--loading::after {
  content: '';
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  display: inline-block;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Navigation ─────────────────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 64px;
  display: flex;
  align-items: center;
  background-color: transparent;
  transition: background-color var(--transition-slow), box-shadow var(--transition-slow);
}
.navbar.is-scrolled {
  background: var(--theme-nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--theme-nav-border);
  box-shadow: var(--theme-nav-shadow);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-title);
  font-size: var(--text-xl);
  font-weight: 800;
  color: #ffffff;
  text-decoration: none;
  transition: color var(--transition);
}
.nav-logo__icon {
  width: 32px;
  height: 32px;
  background: var(--color-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}
.nav-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: rgba(255,255,255,.80);   /* always white — navbar starts transparent over dark hero */
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  transition: color var(--transition), background-color var(--transition);
  position: relative;
}
.nav-link:hover {
  color: #ffffff;
  background-color: rgba(255,255,255,.10);
}
.nav-link.is-active {
  color: var(--color-accent);
  background-color: rgba(232,120,30,.14);
  font-weight: 600;
}
/* Once scrolled, switch to theme-aware colors */
.navbar.is-scrolled .nav-link            { color: var(--theme-nav-link); }
.navbar.is-scrolled .nav-link:hover      { color: var(--theme-nav-link-hover-c); background-color: var(--theme-nav-link-hover-bg); }
.navbar.is-scrolled .nav-link.is-active  { color: var(--theme-nav-active-c); background-color: var(--theme-nav-active-bg); }

.nav-cta {
  margin-left: var(--space-2);
}

/* Theme toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,.10);  /* white tint over dark hero */
  border: none;
  color: #ffffff;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform var(--transition);
  flex-shrink: 0;
  margin-left: var(--space-1);
}
.theme-toggle:hover {
  background: rgba(255,255,255,.20);
  transform: rotate(20deg);
}
/* When scrolled, switch to theme-aware colors */
.navbar.is-scrolled .theme-toggle       { background: var(--theme-toggle-bg); color: var(--theme-toggle-c); }
.navbar.is-scrolled .theme-toggle:hover { background: var(--theme-toggle-hover); }
.theme-toggle__icon { display: block; }
.theme-toggle__icon--sun  { display: var(--theme-sun-display,  none); }
.theme-toggle__icon--moon { display: var(--theme-moon-display, block); }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  margin-left: auto;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: #ffffff;    /* white over dark hero */
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.navbar.is-scrolled .nav-hamburger span { background-color: var(--theme-hamburger); }
/* hamburger stays white — nav stays dark on scroll */
.nav-hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.is-open span:nth-child(2) { opacity: 0; }
.nav-hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Drawer mobile */
.nav-drawer {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--theme-drawer-bg);
  z-index: 999;
  padding: var(--space-4);
  flex-direction: column;
  gap: var(--space-2);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform var(--transition-slow);
}
.nav-drawer.is-open {
  transform: translateX(0);
}
.nav-drawer__link {
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--theme-drawer-text);
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  transition: background-color var(--transition), color var(--transition);
}
.nav-drawer__link:hover {
  background-color: var(--theme-drawer-hover);
  color: var(--theme-text-primary);
}

@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
  .nav-drawer { display: flex; }
}

/* ─── Hero ───────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-navy-dark) 0%, var(--color-primary-dark) 55%, var(--color-primary) 100%);
  padding-top: 64px;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(255,255,255,.07) 0%, transparent 60%),
    radial-gradient(ellipse 35% 35% at 15% 85%, rgba(232,120,30,.18) 0%, transparent 55%),
    radial-gradient(ellipse 25% 25% at 85% 20%, rgba(232,120,30,.10) 0%, transparent 50%);
  pointer-events: none;
}

.hero__particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.hero__particle {
  position: absolute;
  border-radius: 50%;
  background: var(--color-accent);
  opacity: .12;
  animation: float linear infinite;
}

@keyframes float {
  0%   { transform: translateY(0) rotate(0deg); opacity: .12; }
  50%  { opacity: .2; }
  100% { transform: translateY(-100vh) rotate(360deg); opacity: 0; }
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  background: rgba(13,148,136,.18);
  border: 1px solid rgba(94,234,212,.25);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}

.hero__title {
  font-family: var(--font-title);
  font-size: clamp(2.5rem, 6vw, var(--text-6xl));
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin-bottom: var(--space-3);
}
.hero__title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--color-accent), var(--color-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: var(--text-lg);
  color: rgba(255,255,255,.7);
  line-height: 1.7;
  margin-bottom: var(--space-6);
  max-width: 560px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
}

.hero__trust {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: rgba(255,255,255,.5);
}
.hero__trust-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.hero__trust-icon {
  width: 16px;
  height: 16px;
  color: var(--color-accent);
}

.hero__mockup {
  position: absolute;
  right: -2%;
  top: 50%;
  transform: translateY(-50%);
  width: 50%;
  max-width: 620px;
  opacity: .9;
}

@media (max-width: 1024px) {
  .hero__mockup { display: none; }
  .hero__content { max-width: 100%; }
}
@media (max-width: 640px) {
  .hero__title { font-size: 2.25rem; }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; }
}

/* ─── Hero brand lockup ───────────────────────────────────────────────────────── */
.hero__brand-lockup {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  margin-bottom: var(--space-6);
}

/* Entrée badge depuis la gauche */
@keyframes badge-enter {
  from { opacity: 0; transform: scale(0.65) translateX(-36px); }
  to   { opacity: 1; transform: scale(1)    translateX(0); }
}

/* Entrée texte depuis la droite */
@keyframes brand-text-enter {
  from { opacity: 0; transform: translateX(28px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Pulsation du halo */
@keyframes logo-glow {
  0%, 100% {
    box-shadow:
      0 0 0 4px rgba(45,156,138,.45),
      0 0 0 10px rgba(45,156,138,.15),
      0 24px 64px rgba(45,156,138,.40),
      0 0 120px rgba(232,120,30,.20);
  }
  50% {
    box-shadow:
      0 0 0 6px rgba(45,156,138,.55),
      0 0 0 14px rgba(45,156,138,.20),
      0 24px 80px rgba(45,156,138,.50),
      0 0 140px rgba(232,120,30,.30);
  }
}

.hero__logo-badge {
  width: 200px;
  height: 200px;
  background: #ffffff;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin: 0;
  animation:
    badge-enter 0.9s cubic-bezier(0.16,1,0.3,1) 0.1s both,
    logo-glow   4s ease-in-out 1.5s infinite;
}
.hero__logo-badge img {
  width: 78%;
  height: 78%;
  object-fit: contain;
  display: block;
}

/* Nom de marque */
.hero__brand-name {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.hero__brand-hym {
  font-family: var(--font-title);
  font-size: clamp(2.8rem, 5.5vw, 4.5rem);
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.04em;
  line-height: 0.9;
  display: block;
  animation: brand-text-enter 0.8s cubic-bezier(0.16,1,0.3,1) 0.40s both;
}
.hero__brand-divider {
  width: 52px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-primary));
  border-radius: 2px;
  animation: brand-text-enter 0.8s cubic-bezier(0.16,1,0.3,1) 0.55s both;
}
.hero__brand-school {
  font-family: var(--font-title);
  font-size: clamp(1.1rem, 2vw, 1.75rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.18em;
  display: block;
  animation: brand-text-enter 0.8s cubic-bezier(0.16,1,0.3,1) 0.65s both;
}

@media (max-width: 640px) {
  .hero__brand-lockup { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
  .hero__logo-badge   { width: 150px; height: 150px; }
  .hero__brand-hym    { font-size: 2.5rem; }
}

/* ─── Stats ──────────────────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background-color: var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.stat-item {
  background-color: var(--color-bg-white);
  padding: var(--space-6) var(--space-4);
  text-align: center;
}
.stat-value {
  font-family: var(--font-title);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
  display: block;
  margin-bottom: 0.5rem;
}
.stat-label {
  font-size: var(--text-sm);
  color: var(--color-muted);
  font-weight: 500;
}
@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 400px) {
  .stats-grid { grid-template-columns: 1fr; }
}

/* ─── Cartes ──────────────────────────────────────────────────────────────────── */
.card {
  background-color: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: var(--space-4);
  transition: transform var(--transition-slow), box-shadow var(--transition-slow);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(45,156,138,.18), 0 4px 16px rgba(0,0,0,.08);
}

.card--module {
  cursor: pointer;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  color: var(--color-text);
}
.card--module:hover { color: var(--color-text); }
.card--module:hover .card__icon { background-color: var(--color-primary); color: #fff; }

.card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background-color: var(--color-primary-light);
  color: var(--theme-text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: background-color var(--transition), color var(--transition);
  flex-shrink: 0;
}
.card__title {
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: 1.3;
}
.card__text {
  font-size: var(--text-sm);
  color: var(--color-muted);
  line-height: 1.6;
}
.card__arrow {
  margin-top: auto;
  color: var(--theme-text-primary);
  font-size: var(--text-sm);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Carte tarif */
.card--pricing {
  position: relative;
  display: flex;
  flex-direction: column;
}
.card--pricing.is-featured {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary), var(--shadow-lg);
}
.card__popular {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: #ffffff;
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 0.2rem 0.8rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
}
.card__plan-name {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.card__plan-size {
  font-size: var(--text-sm);
  color: var(--color-muted);
  margin-bottom: var(--space-3);
}
.card__price-block {
  margin-bottom: var(--space-3);
  padding: var(--space-3);
  background-color: var(--color-bg-light);
  border-radius: var(--radius-sm);
  text-align: center;
}
.card__price-label {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--theme-text-primary);
  font-family: var(--font-title);
}
.card__price-note {
  font-size: var(--text-xs);
  color: var(--color-muted);
}
.card__features {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: var(--space-4);
}
.card__feature {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: var(--text-sm);
}
.card__feature-icon {
  color: var(--color-success);
  flex-shrink: 0;
  margin-top: 1px;
  font-size: 14px;
}

/* Carte témoignage */
.card--testimonial {
  text-align: left;
}
.card__quote {
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text);
  margin-bottom: var(--space-4);
  position: relative;
}
.card__quote::before {
  content: '\201C';
  font-family: Georgia, serif;
  font-size: 4rem;
  color: var(--theme-text-primary);
  line-height: 0;
  position: absolute;
  top: 1rem;
  left: -0.5rem;
  opacity: .3;
}
.card__author {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.card__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 700;
  font-size: var(--text-sm);
  flex-shrink: 0;
}
.card__author-name {
  font-weight: 600;
  font-size: var(--text-sm);
}
.card__author-role {
  font-size: var(--text-xs);
  color: var(--color-muted);
}

/* ─── Badges ─────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1.4;
}
.badge--teal    { background-color: var(--color-primary-light); color: var(--color-primary-dark); }
.badge--success { background-color: #d1fae5; color: #065f46; }
.badge--danger  { background-color: #fee2e2; color: #991b1b; }
.badge--warning { background-color: #fef3c7; color: #92400e; }
.badge--gray    { background-color: var(--color-bg-light); color: var(--color-muted); }
.badge--outline { background-color: transparent; border: 1px solid currentColor; }

/* ─── Formulaires ─────────────────────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: var(--space-3);
}
.form-label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
}
.form-label .required { color: var(--color-danger); margin-left: 2px; }

.form-control {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--color-text);
  background-color: var(--color-bg-white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(13,148,136,.15);
}
.form-control:invalid:not(:focus):not(:placeholder-shown) {
  border-color: var(--color-danger);
}
.form-control::placeholder { color: var(--color-muted); }

textarea.form-control {
  height: auto;
  min-height: 120px;
  padding: 12px;
  resize: vertical;
}
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-error {
  font-size: var(--text-xs);
  color: var(--color-danger);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.form-hint {
  font-size: var(--text-xs);
  color: var(--color-muted);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
}

/* Checkbox et radio */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
  flex-shrink: 0;
  margin-top: 2px;
}

/* Honeypot — invisible aux humains */
.form-honeypot { display: none !important; }

/* Alerte soumission */
.form-alert {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  margin-bottom: var(--space-3);
}
.form-alert--success {
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}
.form-alert--error {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

/* ─── Tabs ─────────────────────────────────────────────────────────────────────── */
.tab-nav {
  display: flex;
  gap: 0.25rem;
  background-color: var(--color-bg-light);
  border-radius: var(--radius-md);
  padding: 0.3rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.tab-nav::-webkit-scrollbar { display: none; }

.tab-nav__btn {
  flex-shrink: 0;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition);
  white-space: nowrap;
}
.tab-nav__btn:hover { color: var(--color-text); background-color: rgba(0,0,0,.04); }
.tab-nav__btn.is-active {
  background-color: var(--color-bg-white);
  color: var(--color-primary);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.tab-panel {
  display: none;
}
.tab-panel.is-active {
  display: block;
}

/* Tabs collants (fonctionnalités) */
.sticky-tabs {
  position: sticky;
  top: 0;
  z-index: 1010;
  background: var(--theme-tab-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--theme-tab-border);
  box-shadow: 0 2px 16px rgba(0,0,0,.15);
  padding: 0.4rem 0;
  transition: background var(--transition-slow), border-color var(--transition-slow);
}
.sticky-tabs .tab-nav {
  background: none;
  padding: 0;
  gap: 0;
}
.sticky-tabs .tab-nav__btn {
  border-radius: 0;
  border-bottom: 2px solid transparent;
  padding: 0.7rem 1.25rem;
  color: var(--theme-tab-link);
  font-size: var(--text-sm);
  transition: color var(--transition), background-color var(--transition);
}
.sticky-tabs .tab-nav__btn:hover {
  color: var(--theme-tab-link-hover-c);
  background-color: var(--theme-tab-link-hover-bg);
}
.sticky-tabs .tab-nav__btn.is-active {
  background: none;
  box-shadow: none;
  border-bottom-color: var(--theme-tab-active-border);
  color: var(--theme-tab-active-c);
  font-weight: 600;
}

/* ─── Accordéon ────────────────────────────────────────────────────────────────── */
.accordion {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.accordion__item {
  border-bottom: 1px solid var(--color-border);
}
.accordion__item:last-child { border-bottom: none; }

.accordion__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  transition: background-color var(--transition);
  gap: var(--space-3);
}
.accordion__trigger:hover { background-color: var(--color-bg-light); }
.accordion__trigger:focus-visible { outline: 2px solid var(--color-primary); outline-offset: -2px; }

.accordion__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--color-muted);
  transition: transform var(--transition-slow);
}
.accordion__item.is-open .accordion__icon { transform: rotate(180deg); }

.accordion__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 350ms ease;
}
.accordion__body-inner {
  padding: 0 var(--space-4) var(--space-3);
  font-size: var(--text-base);
  color: var(--color-muted);
  line-height: 1.7;
}

/* ─── Slider Témoignages ──────────────────────────────────────────────────────── */
.testimonial-slider {
  position: relative;
  overflow: hidden;
}
.testimonial-track {
  display: flex;
  transition: transform 500ms ease;
}
.testimonial-slide {
  flex-shrink: 0;
  width: 100%;
}
.testimonial-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: var(--space-4);
}
.testimonial-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-border);
  border: none;
  cursor: pointer;
  transition: background-color var(--transition), transform var(--transition);
  padding: 0;
}
.testimonial-dot.is-active {
  background-color: var(--color-primary);
  transform: scale(1.3);
}

/* ─── Tableau comparatif ─────────────────────────────────────────────────────── */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.comparison-table th,
.comparison-table td {
  padding: 0.875rem 1rem;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
}
.comparison-table th:first-child,
.comparison-table td:first-child {
  text-align: left;
  font-weight: 500;
}
.comparison-table thead th {
  font-family: var(--font-title);
  font-weight: 700;
  background-color: var(--color-bg-light);
}
.comparison-table thead th.is-highlight {
  background-color: var(--color-primary);
  color: #ffffff;
}
.comparison-table tbody tr:hover {
  background-color: var(--color-bg-light);
}
.comparison-table .icon-yes { color: var(--color-success); font-size: 1.1rem; }
.comparison-table .icon-no  { color: var(--color-border); font-size: 1.1rem; }
.comparison-table .icon-partial { color: var(--color-warning); font-size: 1rem; }

.comparison-wrapper { overflow-x: auto; }

/* ─── Section screenshot placeholder ─────────────────────────────────────────── */
.screenshot-placeholder {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--color-bg-dark) 0%, var(--color-bg-dark-2) 100%);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.4);
  font-size: var(--text-sm);
  font-weight: 500;
  gap: 0.75rem;
  border: 1px solid rgba(255,255,255,.06);
  overflow: hidden;
  position: relative;
}
.screenshot-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(255,255,255,.03) 39px, rgba(255,255,255,.03) 40px),
    repeating-linear-gradient(90deg, transparent, transparent 79px, rgba(255,255,255,.03) 79px, rgba(255,255,255,.03) 80px);
}
.screenshot-placeholder__label {
  position: relative;
  z-index: 1;
  padding: 0.4rem 1rem;
  background: rgba(13,148,136,.2);
  border: 1px solid rgba(94,234,212,.2);
  border-radius: var(--radius-full);
  color: var(--color-accent);
}

/* Mockup browser frame */
.browser-frame {
  background: var(--color-bg-dark-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}
.browser-frame__bar {
  height: 36px;
  background-color: #1e293b;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 8px;
}
.browser-frame__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.browser-frame__dot:nth-child(1) { background: #ef4444; }
.browser-frame__dot:nth-child(2) { background: #f59e0b; }
.browser-frame__dot:nth-child(3) { background: #10b981; }
.browser-frame__url {
  flex: 1;
  margin-left: 8px;
  height: 20px;
  background: rgba(255,255,255,.06);
  border-radius: 10px;
}
.browser-frame__content {
  background: #0f172a;
  min-height: 260px;
  display: grid;
  grid-template-columns: 180px 1fr;
}
.browser-frame__sidebar {
  background: rgba(255,255,255,.04);
  border-right: 1px solid rgba(255,255,255,.06);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.browser-frame__sidebar-item {
  height: 12px;
  background: rgba(255,255,255,.08);
  border-radius: 6px;
}
.browser-frame__sidebar-item.active {
  background: var(--color-primary);
  opacity: .6;
}
.browser-frame__main {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.browser-frame__row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.browser-frame__widget {
  background: rgba(255,255,255,.05);
  border-radius: 6px;
  padding: 10px;
  height: 60px;
}
.browser-frame__chart-row {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 50px;
  background: rgba(255,255,255,.03);
  border-radius: 4px;
  padding: 6px 8px;
}
.browser-frame__bar-item {
  flex: 1;
  background: var(--color-primary);
  border-radius: 2px 2px 0 0;
  opacity: .5;
}

/* ─── Wizard démo ────────────────────────────────────────────────────────────── */
.wizard {
  max-width: 640px;
  margin-inline: auto;
}
.wizard-progress-bar {
  width: 100%;
  height: 4px;
  background-color: var(--color-border);
  border-radius: 2px;
  margin-bottom: var(--space-4);
  overflow: hidden;
}
.wizard-progress-bar__fill {
  height: 100%;
  background-color: var(--color-primary);
  border-radius: 2px;
  transition: width 400ms ease;
}
.wizard-steps {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}
.wizard-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-muted);
}
.wizard-step__num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background-color: var(--color-border);
  color: var(--color-muted);
  font-size: var(--text-xs);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.wizard-step.is-active .wizard-step__num {
  background-color: var(--color-primary);
  color: #ffffff;
}
.wizard-step.is-active { color: var(--color-text); }
.wizard-step.is-done .wizard-step__num {
  background-color: var(--color-success);
  color: #ffffff;
}

.wizard-pane { display: none; }
.wizard-pane.is-active { display: block; }

/* ─── Pagination ──────────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  margin-top: var(--space-8);
}
.pagination__item {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-muted);
  border: 1px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
}
.pagination__item:hover { background-color: var(--color-bg-light); color: var(--color-text); }
.pagination__item.is-active {
  background-color: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
}
.pagination__item--ellipsis { pointer-events: none; }

/* ─── Admin Layout ────────────────────────────────────────────────────────────── */
.admin-layout {
  display: flex;
  min-height: 100vh;
}
.admin-sidebar {
  width: 240px;
  background-color: var(--color-bg-dark);
  color: rgba(255,255,255,.8);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 100;
}
.admin-sidebar__logo {
  padding: var(--space-4);
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-family: var(--font-title);
  font-weight: 800;
  font-size: var(--text-lg);
  color: #ffffff;
}
.admin-sidebar__nav {
  padding: var(--space-2);
  flex: 1;
}
.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.875rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  color: rgba(255,255,255,.65);
  transition: background-color var(--transition), color var(--transition);
  text-decoration: none;
  margin-bottom: 0.1rem;
}
.admin-nav-link:hover, .admin-nav-link.is-active {
  background-color: rgba(255,255,255,.08);
  color: #ffffff;
}
.admin-nav-link.is-active { background-color: rgba(13,148,136,.25); color: var(--color-accent); }
.admin-sidebar__footer {
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: var(--text-xs);
  color: rgba(255,255,255,.35);
}

.admin-main {
  margin-left: 240px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.admin-header {
  height: 60px;
  background-color: var(--color-bg-white);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: var(--space-4);
  position: sticky;
  top: 0;
  z-index: 50;
}
.admin-content {
  padding: var(--space-6);
  flex: 1;
}
.admin-page-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--space-6);
}

/* Admin — cartes stat */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}
.admin-stat-card {
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
}
.admin-stat-card__value {
  font-size: var(--text-3xl);
  font-weight: 800;
  font-family: var(--font-title);
  color: var(--color-primary);
}
.admin-stat-card__label { font-size: var(--text-sm); color: var(--color-muted); margin-top: 0.25rem; }

@media (max-width: 1024px) {
  .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Admin — tableau */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  background: var(--color-bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}
.admin-table th {
  background-color: var(--color-bg-light);
  font-weight: 600;
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}
.admin-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background-color: var(--color-bg-light); }

/* Admin — filtres */
.admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: flex-end;
  margin-bottom: var(--space-4);
  padding: var(--space-3);
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.admin-filters .form-group { margin-bottom: 0; min-width: 160px; }

@media (max-width: 768px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-main { margin-left: 0; }
}

/* ─── Blog ────────────────────────────────────────────────────────────────────── */
.article-card {
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-slow), box-shadow var(--transition-slow);
}
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.article-card__image {
  aspect-ratio: 16/9;
  overflow: hidden;
}
.article-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}
.article-card:hover .article-card__image img { transform: scale(1.04); }
.article-card__image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-3xl);
}

.article-card__body {
  padding: var(--space-3);
}
.article-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: 0.75rem;
  font-size: var(--text-xs);
  color: var(--color-muted);
}
.article-card__title {
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}
.article-card__title a { color: inherit; }
.article-card__title a:hover { color: var(--color-primary); }
.article-card__excerpt {
  font-size: var(--text-sm);
  color: var(--color-muted);
  line-height: 1.6;
  margin-bottom: var(--space-2);
}
.article-card__link {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
}

/* Article individuel */
.article-content {
  font-size: var(--text-lg);
  line-height: 1.8;
  color: var(--color-text);
}
.article-content h2 { font-size: var(--text-2xl); margin: var(--space-6) 0 var(--space-2); }
.article-content h3 { font-size: var(--text-xl); margin: var(--space-4) 0 var(--space-2); }
.article-content p  { margin-bottom: var(--space-3); }
.article-content ul, .article-content ol {
  padding-left: 1.5rem;
  margin-bottom: var(--space-3);
}
.article-content ul { list-style: disc; }
.article-content ol { list-style: decimal; }
.article-content li { margin-bottom: 0.4rem; }
.article-content img { border-radius: var(--radius-md); margin: var(--space-4) 0; }

/* ─── Footer ─────────────────────────────────────────────────────────────────── */
.footer {
  background: linear-gradient(160deg, var(--color-navy-dark) 0%, var(--color-primary-dark) 100%);
  color: rgba(255,255,255,.7);
  padding-top: var(--space-12);
  padding-bottom: var(--space-6);
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}
.footer__col-title {
  font-family: var(--font-title);
  font-size: var(--text-sm);
  font-weight: 700;
  color: #ffffff;
  margin-bottom: var(--space-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.footer__link {
  display: block;
  font-size: var(--text-sm);
  color: rgba(255,255,255,.55);
  margin-bottom: 0.5rem;
  transition: color var(--transition);
}
.footer__link:hover { color: #ffffff; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-sm);
  color: rgba(255,255,255,.4);
  flex-wrap: wrap;
  gap: var(--space-2);
}
.footer__tagline {
  font-size: var(--text-sm);
  color: rgba(255,255,255,.5);
  line-height: 1.6;
  margin-bottom: var(--space-4);
}
.footer__social {
  display: flex;
  gap: var(--space-2);
}
.footer__social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.6);
  font-size: var(--text-sm);
  transition: background-color var(--transition), color var(--transition);
}
.footer__social-link:hover {
  background-color: var(--color-primary);
  color: #ffffff;
}

@media (max-width: 1024px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .footer__grid { grid-template-columns: 1fr; gap: var(--space-4); }
  .footer__bottom { flex-direction: column; text-align: center; }
}

/* ─── Newsletter inline ─────────────────────────────────────────────────────── */
.newsletter-form {
  display: flex;
  gap: 0.5rem;
}
.newsletter-form .form-control {
  flex: 1;
  background-color: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.15);
  color: #ffffff;
}
.newsletter-form .form-control::placeholder { color: rgba(255,255,255,.4); }
.newsletter-form .form-control:focus { border-color: var(--color-accent); }

@media (max-width: 480px) {
  .newsletter-form { flex-direction: column; }
}

/* ─── Alertes flash ─────────────────────────────────────────────────────────── */
.flash-message {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: var(--space-4);
  animation: slideDown 200ms ease;
}
@keyframes slideDown {
  from { transform: translateY(-8px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.flash-message--success { background: #d1fae5; color: #065f46; border-left: 4px solid #10b981; }
.flash-message--error   { background: #fee2e2; color: #991b1b; border-left: 4px solid #ef4444; }

/* ─── School tree preview (fonctionnalités → structure) ──────────────────────── */
.school-tree-preview {
  background: linear-gradient(160deg, var(--color-navy-dark) 0%, #0e3028 100%);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  font-size: var(--text-sm);
}
.school-tree-preview__header {
  background: rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.school-tree-preview__name {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
}
.school-tree-preview__year {
  font-size: var(--text-xs);
  color: var(--color-accent);
  background: rgba(232,120,30,.15);
  border: 1px solid rgba(232,120,30,.3);
  padding: .2rem .6rem;
  border-radius: var(--radius-full);
}
.school-tree-preview__cycles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255,255,255,.05);
  margin: 1px;
}
.school-tree-cycle {
  background: rgba(255,255,255,.03);
  padding: 1rem;
}
.school-tree-cycle__label {
  font-weight: 700;
  color: var(--color-primary);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .6rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.school-tree-cycle__levels {
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.school-tree-level {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .3rem .5rem;
  border-radius: 4px;
  background: rgba(255,255,255,.04);
  border-left: 2px solid rgba(45,156,138,.4);
}
.school-tree-level__name { color: rgba(255,255,255,.8); font-size: .78rem; }
.school-tree-level__meta { color: rgba(255,255,255,.4); font-size: .72rem; }
.school-tree-preview__footer {
  border-top: 1px solid rgba(255,255,255,.06);
  padding: .75rem 1.25rem;
  display: flex;
  gap: 1.5rem;
}
.school-tree-stat {
  display: flex;
  flex-direction: column;
}
.school-tree-stat__value {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--color-primary);
}
.school-tree-stat__label { color: rgba(255,255,255,.4); font-size: .72rem; }

/* ─── Dashboard / demo mockups ────────────────────────────────────────────────── */
.dash-mock {
  background: linear-gradient(160deg, #0c1640 0%, #0e2c22 100%);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.07);
  min-height: 380px;
  display: flex;
  flex-direction: column;
}
.dash-mock__topbar {
  background: rgba(255,255,255,.05);
  border-bottom: 1px solid rgba(255,255,255,.07);
  padding: .6rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .75rem;
  color: rgba(255,255,255,.5);
}
.dash-mock__topbar-title { color: rgba(255,255,255,.85); font-weight: 600; font-size: .8rem; }
.dash-mock__live {
  display: flex; align-items: center; gap: .3rem;
  font-size: .7rem; color: #10b981;
}
.dash-mock__live::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: #10b981; display: block;
}

/* KPI grid */
.dash-kpis {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 1px;
  background: rgba(255,255,255,.05);
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.dash-kpi {
  padding: .8rem 1rem;
  background: rgba(255,255,255,.02);
}
.dash-kpi__value {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.3rem;
  display: block;
  line-height: 1.1;
}
.dash-kpi__label { font-size: .68rem; color: rgba(255,255,255,.45); margin-top: .2rem; display: block; }
.dash-kpi--teal  .dash-kpi__value { color: var(--color-primary); }
.dash-kpi--green .dash-kpi__value { color: #10b981; }
.dash-kpi--orange .dash-kpi__value { color: var(--color-accent); }
.dash-kpi--red   .dash-kpi__value { color: #ef4444; }

/* Bar chart inside dash-mock */
.dash-chart-area {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 1px;
  background: rgba(255,255,255,.04);
}
.dash-chart {
  padding: 1rem;
}
.dash-chart__title { font-size: .72rem; color: rgba(255,255,255,.45); margin-bottom: .75rem; }
.dash-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 90px;
}
.dash-bar {
  flex: 1;
  border-radius: 3px 3px 0 0;
  background: rgba(45,156,138,.35);
  transition: background .2s;
  position: relative;
}
.dash-bar.is-current { background: var(--color-primary); }
.dash-bar__month {
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: .62rem;
  color: rgba(255,255,255,.35);
  white-space: nowrap;
}
.dash-labels { margin-top: 24px; }

/* Activity feed */
.dash-activity {
  padding: 1rem;
  border-left: 1px solid rgba(255,255,255,.05);
}
.dash-activity__title { font-size: .72rem; color: rgba(255,255,255,.45); margin-bottom: .6rem; }
.dash-event {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  padding: .35rem 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.dash-event__dot {
  width: 6px; height: 6px; border-radius: 50%;
  flex-shrink: 0; margin-top: 4px;
}
.dash-event__dot--teal   { background: var(--color-primary); }
.dash-event__dot--orange { background: var(--color-accent); }
.dash-event__dot--green  { background: #10b981; }
.dash-event__dot--red    { background: #ef4444; }
.dash-event__text { font-size: .7rem; color: rgba(255,255,255,.6); line-height: 1.4; }
.dash-event__time { font-size: .65rem; color: rgba(255,255,255,.3); margin-top: .1rem; }

/* Table mockup */
.dash-table { width: 100%; border-collapse: collapse; }
.dash-table th {
  font-size: .68rem; color: rgba(255,255,255,.4); font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em;
  padding: .5rem .75rem; border-bottom: 1px solid rgba(255,255,255,.06);
  text-align: left;
}
.dash-table td {
  font-size: .75rem; color: rgba(255,255,255,.75);
  padding: .5rem .75rem; border-bottom: 1px solid rgba(255,255,255,.04);
}
.dash-badge {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: 999px;
  font-size: .65rem;
  font-weight: 600;
}
.dash-badge--green  { background: rgba(16,185,129,.2); color: #6ee7b7; }
.dash-badge--orange { background: rgba(232,120,30,.2);  color: #fdba74; }
.dash-badge--gray   { background: rgba(255,255,255,.08); color: rgba(255,255,255,.5); }
.dash-badge--red    { background: rgba(239,68,68,.2);   color: #fca5a5; }

/* Bulletin mockup */
.bul-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 1rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,.07);
}
.bul-student { color: #fff; }
.bul-student__name { font-weight: 700; font-size: .95rem; }
.bul-student__meta { font-size: .72rem; color: rgba(255,255,255,.45); margin-top: .15rem; }
.bul-average {
  text-align: center;
  background: rgba(45,156,138,.15);
  border: 1px solid rgba(45,156,138,.3);
  border-radius: var(--radius-md);
  padding: .5rem .9rem;
}
.bul-average__value { font-family: var(--font-title); font-size: 1.4rem; font-weight: 800; color: var(--color-primary); display: block; line-height: 1; }
.bul-average__label { font-size: .65rem; color: rgba(255,255,255,.45); }
.bul-rank { font-size: .7rem; color: var(--color-accent); margin-top: .2rem; }

/* Finance bars */
.fin-bars { display: flex; align-items: flex-end; gap: 8px; height: 100px; padding: 0 1rem; }
.fin-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.fin-bar { width: 100%; border-radius: 3px 3px 0 0; }
.fin-bar--col   { background: var(--color-primary); opacity: .8; }
.fin-bar--imp   { background: rgba(239,68,68,.5); }
.fin-bar__month { font-size: .62rem; color: rgba(255,255,255,.35); }

@media (max-width: 768px) {
  .dash-kpis { grid-template-columns: repeat(2,1fr); }
  .dash-chart-area { grid-template-columns: 1fr; }
  .school-tree-preview__cycles { grid-template-columns: 1fr; }
}
/* Grouped income/expense bar chart */
.dash-legend {
  display: flex;
  gap: 1rem;
  margin-bottom: .5rem;
}
.dash-legend__item {
  font-size: .65rem;
  color: rgba(255,255,255,.5);
  display: flex;
  align-items: center;
  gap: .3rem;
}
.dash-legend__item::before {
  content: '';
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 2px;
}
.dash-legend__item--income::before  { background: var(--color-primary); }
.dash-legend__item--expense::before { background: #ef4444; opacity: .75; }

.fin-bars-grouped {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 90px;
  padding: 0 .25rem;
}
.fin-bars-grouped__month {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.fin-bars-grouped__pair {
  width: 100%;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 72px;
}
.fin-bar-pair__income {
  flex: 1;
  background: var(--color-primary);
  opacity: .85;
  border-radius: 2px 2px 0 0;
  min-height: 4px;
}
.fin-bar-pair__expense {
  flex: 1;
  background: #ef4444;
  opacity: .65;
  border-radius: 2px 2px 0 0;
  min-height: 4px;
}
.fin-bars-grouped__label {
  font-size: .62rem;
  color: rgba(255,255,255,.35);
}

/* Fake search bar for eleves module */
.dash-search-bar {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: .5rem 1rem;
  padding: .45rem .75rem;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-sm);
  font-size: .75rem;
  color: rgba(255,255,255,.35);
}
.dash-search-bar__icon { font-size: .8rem; }
.dash-search-bar__text { flex: 1; }

/* Schedule grid for personnel module */
.mod-schedule {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mod-schedule__slot {
  display: grid;
  grid-template-columns: 60px 1fr;
  grid-template-rows: auto auto;
  gap: 0 .5rem;
  padding: .45rem .6rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid transparent;
}
.mod-schedule__slot--teal   { background: rgba(45,156,138,.12); border-left-color: var(--color-primary); }
.mod-schedule__slot--orange { background: rgba(232,120,30,.10); border-left-color: var(--color-accent); }
.mod-schedule__slot--gray   { background: rgba(255,255,255,.05); border-left-color: rgba(255,255,255,.2); }
.mod-schedule__time {
  grid-row: 1 / 3;
  display: flex;
  align-items: center;
  font-size: .65rem;
  color: rgba(255,255,255,.4);
  font-weight: 600;
}
.mod-schedule__subj { font-size: .75rem; font-weight: 700; color: #fff; }
.mod-schedule__meta { font-size: .65rem; color: rgba(255,255,255,.4); }

/* Email template preview for communication module */
.mod-email-preview {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-sm);
  overflow: hidden;
  font-size: .7rem;
}
.mod-email-preview__field {
  display: flex;
  gap: .5rem;
  padding: .3rem .75rem;
  border-bottom: 1px solid rgba(255,255,255,.05);
  color: rgba(255,255,255,.65);
}
.mod-email-preview__label { color: rgba(255,255,255,.3); font-weight: 600; min-width: 36px; }
.mod-email-preview__body {
  padding: .65rem .75rem;
  color: rgba(255,255,255,.55);
  line-height: 1.5;
  font-size: .68rem;
}
.mod-email-preview__var {
  color: var(--color-accent);
  font-weight: 600;
  font-style: italic;
}

.flash-message--info    { background: #dbeafe; color: #1e40af; border-left: 4px solid #3b82f6; }

/* ═══════════════════════════════════════════════════════ DARK MODE OVERRIDES
   The hero gradient covers the full page via html background-attachment:fixed.
   Surfaces get a frosted-glass treatment so the gradient shows through.
   ════════════════════════════════════════════════════════════════════════════ */
html[data-theme="dark"] .card {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.11);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
html[data-theme="dark"] .card:hover {
  background: rgba(255,255,255,.10);
  box-shadow: 0 8px 32px rgba(0,0,0,.40), 0 0 0 1px rgba(45,156,138,.25);
}
html[data-theme="dark"] .card--module { color: rgba(255,255,255,.90); }
html[data-theme="dark"] .card--module:hover { color: rgba(255,255,255,.90); }
html[data-theme="dark"] .card__text   { color: rgba(255,255,255,.55); }
html[data-theme="dark"] .card__quote  { color: rgba(255,255,255,.85); }
html[data-theme="dark"] .card__author-role { color: rgba(255,255,255,.45); }

html[data-theme="dark"] .stat-item {
  background: rgba(255,255,255,.07);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
html[data-theme="dark"] .stats-grid {
  background-color: rgba(255,255,255,.06);
}

html[data-theme="dark"] .section--gray {
  background-color: rgba(0,0,0,.15);
}

html[data-theme="dark"] .card__price-block {
  background: rgba(0,0,0,.20);
  border: 1px solid rgba(255,255,255,.08);
}
html[data-theme="dark"] .card--pricing.is-featured {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary), 0 8px 40px rgba(45,156,138,.30);
}

html[data-theme="dark"] .form-control {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.14);
  color: rgba(255,255,255,.90);
}
html[data-theme="dark"] .form-control:focus {
  background: rgba(255,255,255,.10);
  border-color: var(--color-primary);
}
html[data-theme="dark"] .form-control::placeholder { color: rgba(255,255,255,.35); }
html[data-theme="dark"] .form-label { color: rgba(255,255,255,.80); }
html[data-theme="dark"] .form-hint  { color: rgba(255,255,255,.40); }
html[data-theme="dark"] select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23ffffff' stroke-opacity='.5' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}

html[data-theme="dark"] .wizard { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.10); }

html[data-theme="dark"] .accordion__item {
  border-color: rgba(255,255,255,.09);
}
html[data-theme="dark"] .accordion__trigger { color: rgba(255,255,255,.85); }
html[data-theme="dark"] .accordion__body-inner { color: rgba(255,255,255,.60); }

html[data-theme="dark"] .article-card {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.10);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
html[data-theme="dark"] .article-card__title a { color: rgba(255,255,255,.90); }
html[data-theme="dark"] .article-card__excerpt  { color: rgba(255,255,255,.55); }
html[data-theme="dark"] .article-card__link     { color: var(--color-primary); }

html[data-theme="dark"] .btn--ghost {
  color: rgba(255,255,255,.60);
}
html[data-theme="dark"] .btn--ghost:hover {
  background-color: rgba(255,255,255,.08);
  color: rgba(255,255,255,.90);
}

html[data-theme="dark"] .section-title,
html[data-theme="dark"] .heading-1,
html[data-theme="dark"] .heading-2,
html[data-theme="dark"] .heading-3,
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4 { color: rgba(255,255,255,.95); }

html[data-theme="dark"] .section-subtitle { color: rgba(255,255,255,.60); }

html[data-theme="dark"] .divider { border-color: rgba(255,255,255,.09); }

html[data-theme="dark"] .pagination__item {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.10);
  color: rgba(255,255,255,.70);
}
html[data-theme="dark"] .pagination__item:hover,
html[data-theme="dark"] .pagination__item.is-active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

html[data-theme="dark"] .screenshot-placeholder {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.10);
}

/* ─── Page header (used on fonctionnalites, tarifs, contact, demo, blog) ────── */
.page-header {
  background: linear-gradient(135deg,var(--color-navy-dark) 0%,var(--color-primary-dark) 55%,var(--color-primary) 100%);
}
.page-header__title   { color: #ffffff; }
.page-header__subtitle { color: rgba(255,255,255,.70); }

html[data-theme="light"] .page-header {
  background: linear-gradient(135deg, #e6f7f5 0%, #b2e8e3 55%, #d1f5f0 100%);
}
html[data-theme="light"] .page-header__title   { color: var(--color-navy-dark); }
html[data-theme="light"] .page-header__subtitle { color: var(--color-muted); }
html[data-theme="light"] .page-header .section-label--light {
  color: var(--color-primary-dark);
  background: rgba(13,148,136,.10);
}

/* ─── Hero section light mode ────────────────────────────────────────────────── */
html[data-theme="light"] .hero {
  background: linear-gradient(135deg, #e6f7f5 0%, #d1f5f0 55%, #b2e8e3 100%) !important;
}
html[data-theme="light"] .hero__title        { color: var(--color-navy-dark); }
html[data-theme="light"] .hero__subtitle     { color: var(--color-muted); }
html[data-theme="light"] .hero__trust        { color: var(--color-muted); }
html[data-theme="light"] .hero__brand-hym    { color: var(--color-primary-dark); }
html[data-theme="light"] .hero__badge        { color: var(--color-muted); background: rgba(255,255,255,.80); }
html[data-theme="light"] .hero__particles    { opacity: 0.15; }

/* ─── Section teal light mode ───────────────────────────────────────────────── */
html[data-theme="light"] .section--teal {
  background: linear-gradient(135deg, #e6f7f5 0%, #b2e8e3 100%) !important;
}
html[data-theme="light"] .section--teal h1,
html[data-theme="light"] .section--teal h2,
html[data-theme="light"] .section--teal h3,
html[data-theme="light"] .section--teal p  { color: var(--color-navy-dark) !important; }
html[data-theme="light"] .section--teal .btn--outline-white {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
html[data-theme="light"] .section--teal .btn--outline-white:hover {
  background: var(--color-primary);
  color: #fff;
}

/* ─── Footer light mode ──────────────────────────────────────────────────────── */
html[data-theme="light"] .footer {
  background: #f4faf9 !important;
  border-top: 1px solid var(--color-border);
}
html[data-theme="light"] .footer,
html[data-theme="light"] .footer h3,
html[data-theme="light"] .footer h4,
html[data-theme="light"] .footer p,
html[data-theme="light"] .footer a,
html[data-theme="light"] .footer .footer__brand-name,
html[data-theme="light"] .footer .footer__tagline,
html[data-theme="light"] .footer .footer__bottom { color: var(--color-text) !important; }
html[data-theme="light"] .footer a:hover { color: var(--color-primary) !important; }
html[data-theme="light"] .footer .footer__bottom { border-color: var(--color-border) !important; }

/* ─── Dark mode text visibility fixes ───────────────────────────────────────── */
html[data-theme="dark"] .stat-value  { color: rgba(255,255,255,.95); }
html[data-theme="dark"] .stat-label  { color: rgba(255,255,255,.55); }

html[data-theme="dark"] .badge--teal {
  background: rgba(45,156,138,.30);
  color: rgba(255,255,255,.90);
}
html[data-theme="dark"] .badge--green {
  background: rgba(34,197,94,.20);
  color: rgba(134,239,172,.95);
}
html[data-theme="dark"] .badge--red {
  background: rgba(239,68,68,.20);
  color: rgba(252,165,165,.95);
}
html[data-theme="dark"] .badge--orange {
  background: rgba(249,115,22,.20);
  color: rgba(253,186,116,.95);
}

html[data-theme="dark"] .feature-icon { background: rgba(45,156,138,.22); }
html[data-theme="dark"] .feature-icon svg { color: rgba(255,255,255,.85); }

html[data-theme="dark"] .step-number {
  background: rgba(45,156,138,.25);
  color: rgba(255,255,255,.90);
}

html[data-theme="dark"] .pricing-card {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.11);
}
html[data-theme="dark"] .pricing-card--featured {
  background: rgba(45,156,138,.22);
  border-color: rgba(45,156,138,.45);
}
html[data-theme="dark"] .pricing-card__price { color: rgba(255,255,255,.95); }
html[data-theme="dark"] .pricing-card__period { color: rgba(255,255,255,.55); }
html[data-theme="dark"] .pricing-feature-item { color: rgba(255,255,255,.80); }

html[data-theme="dark"] .testimonial-card {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.10);
}
html[data-theme="dark"] .testimonial-card blockquote { color: rgba(255,255,255,.80); }
html[data-theme="dark"] .testimonial-card cite       { color: rgba(255,255,255,.55); }

html[data-theme="dark"] .section-label {
  background: rgba(45,156,138,.22);
  color: rgba(255,255,255,.85);
}

html[data-theme="dark"] .cta-box {
  background: rgba(45,156,138,.18);
  border-color: rgba(45,156,138,.30);
}
html[data-theme="dark"] .cta-box h2,
html[data-theme="dark"] .cta-box p { color: rgba(255,255,255,.90) !important; }
