/* Portail animations PC — style aligné sur les apps React (slate + dégradés) */

:root {
  --bg: #f8fafc;
  --bg-alt: #f1f5f9;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.96);
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-hover: 0 8px 24px rgba(15, 23, 42, 0.08);
  --radius: 0.75rem;
  --radius-lg: 1rem;
  --max-w: 72rem;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --accent: #1d6b5c;
  --accent-hover: #165a4d;
  --accent-soft: #ecf6f3;
  --accent-2: #3d7a9e;
  --trust: #166534;
  --trust-soft: #f0fdf4;
  --trust-border: #bbf7d0;
  --gradient-hero: #1d6b5c;
  --gradient-indigo: linear-gradient(135deg, #4f46e5, #6366f1);
  --gradient-orange: linear-gradient(135deg, #c2410c, #ea580c);
  --gradient-teal: linear-gradient(135deg, #0d9488, #14b8a6);
  --gradient-violet: linear-gradient(135deg, #6d28d9, #7c3aed);
}

html.dark {
  --bg: #020617;
  --bg-alt: #0f172a;
  --surface: #1e293b;
  --surface-glass: rgba(15, 23, 42, 0.92);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --border: #334155;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  transition: background 0.25s, color 0.25s;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0.875rem 1.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
}

.brand-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-text strong {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-text small {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.header-nav a {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 0.5rem;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}

.header-nav a:hover {
  color: var(--text);
  background: var(--bg-alt);
  text-decoration: none;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-left: 0.25rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.theme-toggle:hover {
  color: var(--text);
  background: var(--bg-alt);
}

.theme-toggle svg {
  width: 1.125rem;
  height: 1.125rem;
}

.theme-icon--moon {
  display: none;
}

html.dark .theme-icon--sun {
  display: none;
}

html.dark .theme-icon--moon {
  display: block;
}

/* Bandeau confiance */
.trust-ribbon {
  border-bottom: 1px solid var(--trust-border);
  background: var(--trust-soft);
}

.trust-ribbon__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1.25rem;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0.65rem 1.25rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--trust);
}

html.dark .trust-ribbon {
  background: rgba(22, 101, 52, 0.15);
  border-bottom-color: rgba(34, 197, 94, 0.25);
}

html.dark .trust-ribbon__inner {
  color: #86efac;
}

.trust-ribbon__item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.trust-ribbon__item::before {
  content: '✓';
  font-weight: 700;
}

.trust-ribbon__sep {
  color: var(--text-muted);
  opacity: 0.5;
}

/* Hero */
.hero {
  padding: 3rem 1.25rem 2.5rem;
}

.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(29, 107, 92, 0.15);
  border-radius: 999px;
}

html.dark .hero-badge {
  background: rgba(29, 107, 92, 0.2);
  color: #99f6e4;
  border-color: rgba(29, 107, 92, 0.35);
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hero-gradient {
  color: var(--accent);
}

.hero-tagline {
  margin: 0 0 1.25rem;
  font-size: 1rem;
  color: var(--text-muted);
}

.hero-tagline strong {
  color: var(--text);
  font-weight: 600;
}

.hero-lead {
  max-width: 42rem;
  margin: 0 0 1.75rem;
  font-size: 1.125rem;
  color: var(--text-muted);
}

.hero-lead strong {
  color: var(--text);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.35rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 0.65rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.btn:hover {
  text-decoration: none;
}

.btn--primary {
  color: #fff;
  background: var(--accent);
}

.btn--primary:hover {
  background: var(--accent-hover);
}

.btn--ghost {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  background: var(--bg-alt);
}

.trust-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .trust-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .trust-cards {
    grid-template-columns: repeat(4, 1fr);
  }
}

.trust-cards li {
  padding: 1rem 1.1rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.trust-cards strong {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.trust-cards--highlight li:first-child {
  border-color: var(--trust-border);
  background: var(--trust-soft);
}

html.dark .trust-cards--highlight li:first-child {
  background: rgba(22, 101, 52, 0.12);
  border-color: rgba(34, 197, 94, 0.3);
}

/* Bloc rassurance parents */
.trust-panel {
  padding: 1.5rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.trust-panel h3 {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
}

.trust-panel p {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.trust-panel p:last-child {
  margin-bottom: 0;
}

.trust-panel ul {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.trust-panel li {
  margin-bottom: 0.35rem;
}

.trust-duo {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .trust-duo {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.trust-duo__kids {
  padding: 1.25rem;
  background: var(--accent-soft);
  border: 1px solid rgba(29, 107, 92, 0.12);
  border-radius: var(--radius-lg);
}

html.dark .trust-duo__kids {
  background: rgba(29, 107, 92, 0.12);
}

.trust-duo__kids h3 {
  margin: 0 0 0.5rem;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--accent);
}

html.dark .trust-duo__kids h3 {
  color: #5eead4;
}

.trust-duo__kids p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* Sections */
.section {
  padding: 3rem 1.25rem;
}

.section--alt {
  background: var(--bg-alt);
}

.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-header {
  margin-bottom: 2rem;
  max-width: 40rem;
}

.section-header h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.animations-trust-note {
  margin: 0 0 1.5rem;
  padding: 0.85rem 1rem;
  font-size: 0.875rem;
  color: var(--trust);
  background: var(--trust-soft);
  border: 1px solid var(--trust-border);
  border-radius: var(--radius);
}

html.dark .animations-trust-note {
  color: #86efac;
  background: rgba(22, 101, 52, 0.12);
}

.section-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.0625rem;
}

/* Filtres */
.animation-filters {
  margin-bottom: 1rem;
}

.filter-panel {
  padding: 1.25rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.filter-panel__hint {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.filter-group {
  margin-bottom: 1rem;
}

.filter-group:last-of-type {
  margin-bottom: 0;
}

.filter-group__label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.filter-chip {
  padding: 0.4rem 0.85rem;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.filter-chip:hover:not(:disabled) {
  color: var(--text);
  border-color: var(--accent);
}

.filter-chip:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.filter-chip--year.is-active {
  color: #1e1b4b;
  background: #eef2ff;
  border-color: #4338ca;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

html.dark .filter-chip--year.is-active {
  color: #e0e7ff;
  background: rgba(67, 56, 202, 0.35);
  border-color: #818cf8;
}

.filter-chip--topic.is-active {
  color: #7c2d12;
  background: #fff7ed;
  border-color: #ea580c;
  box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.2);
}

html.dark .filter-chip--topic.is-active {
  color: #fed7aa;
  background: rgba(234, 88, 12, 0.25);
  border-color: #fb923c;
}

.filter-reset {
  margin-top: 1rem;
  padding: 0.45rem 0.85rem;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: 0.5rem;
  cursor: pointer;
}

.filter-reset:hover {
  background: var(--bg-alt);
}

.filter-summary {
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}

.animations-empty {
  margin: 0;
  padding: 2rem 1.25rem;
  text-align: center;
  font-size: 0.9375rem;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}

/* Animation cards */
.animations-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .animations-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.animation-card {
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  opacity: 0;
  transform: translateY(12px);
}

.animation-card.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.2s;
}

.animation-card--available:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border);
}

.animation-card--soon.is-visible {
  opacity: 0.88;
}

.animation-card__link {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.5rem;
  color: inherit;
  text-decoration: none;
}

.animation-card--soon .animation-card__link {
  pointer-events: none;
  cursor: default;
}

.animation-card__link:hover {
  text-decoration: none;
}

.animation-card__head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.animation-card__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  font-size: 1.5rem;
  border-radius: var(--radius);
  color: #fff;
  box-shadow: var(--shadow);
}

.animation-card__icon--indigo {
  background: var(--gradient-indigo);
}

.animation-card__icon--orange {
  background: var(--gradient-orange);
}

.animation-card__icon--teal {
  background: var(--gradient-teal);
}

.animation-card__icon--violet {
  background: var(--gradient-violet);
}

.animation-card__meta {
  flex: 1;
  min-width: 0;
}

.animation-card__level {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.animation-card__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.animation-card__subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.animation-card__badge {
  flex-shrink: 0;
  padding: 0.25rem 0.6rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 999px;
}

.animation-card__badge--live {
  color: #166534;
  background: #dcfce7;
}

html.dark .animation-card__badge--live {
  color: #86efac;
  background: rgba(22, 101, 52, 0.35);
}

.animation-card__badge--soon {
  color: var(--text-muted);
  background: var(--bg-alt);
}

.animation-card__desc {
  margin: 0 0 0.5rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.animation-card__trust {
  margin: 0 0 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--trust);
}

html.dark .animation-card__trust {
  color: #86efac;
}

.animation-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.65rem;
  padding: 0;
  list-style: none;
}

.animation-card__tags:last-of-type {
  margin-bottom: 1.25rem;
}

.tag {
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
}

.tag--year {
  color: #3730a3;
  background: #eef2ff;
  border: 1px solid rgba(99, 102, 241, 0.25);
}

html.dark .tag--year {
  color: #c7d2fe;
  background: rgba(67, 56, 202, 0.3);
  border-color: rgba(129, 140, 248, 0.35);
}

.tag--topic {
  color: #9a3412;
  background: #fff7ed;
  border: 1px solid rgba(234, 88, 12, 0.25);
}

html.dark .tag--topic {
  color: #fdba74;
  background: rgba(234, 88, 12, 0.2);
  border-color: rgba(251, 146, 60, 0.35);
}

.animation-card__cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
}

.animation-card__cta svg {
  width: 1rem;
  height: 1rem;
  transition: transform 0.15s;
}

.animation-card--available:hover .animation-card__cta svg {
  transform: translateX(3px);
}

.animation-card--soon .animation-card__cta {
  color: var(--text-muted);
}

/* Pillars */
.pillars {
  display: grid;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
  .pillars {
    grid-template-columns: repeat(2, 1fr);
  }
}

.pillar {
  padding: 1.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.pillar-icon {
  display: block;
  margin-bottom: 0.65rem;
  font-size: 1.75rem;
}

.pillar-icon--calm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(29, 107, 92, 0.15);
  border-radius: 50%;
}

html.dark .pillar-icon--calm {
  color: #5eead4;
  background: rgba(29, 107, 92, 0.2);
}

.pillar h3 {
  margin: 0 0 0.5rem;
  font-size: 1.0625rem;
  font-weight: 700;
}

.pillar p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* Flow */
.flow {
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.flow-title {
  margin: 0 0 1.25rem;
  font-size: 1.125rem;
  font-weight: 700;
}

.flow-steps {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 768px) {
  .flow-steps {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
  }
}

.flow-steps li {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.flow-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 3.25rem;
  height: 3.25rem;
  font-size: 1.375rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  /* Mode clair : chiffre sombre sur fond clair — contraste maximal */
  color: #1e1b4b;
  background: #ffffff;
  border: 3px solid #4338ca;
  border-radius: 999px;
  box-shadow:
    0 2px 8px rgba(67, 56, 202, 0.2),
    inset 0 0 0 1px rgba(67, 56, 202, 0.08);
  text-shadow: none;
}

html.dark .flow-step-num {
  color: #ffffff;
  background: linear-gradient(145deg, #4f46e5 0%, #ea580c 100%);
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.flow-steps strong {
  display: block;
  font-size: 0.9375rem;
}

.flow-steps span:not(.flow-step-num) {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Teacher banner */
.teacher-banner {
  display: grid;
  gap: 1.5rem;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(234, 88, 12, 0.08));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

html.dark .teacher-banner {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(234, 88, 12, 0.1));
}

@media (min-width: 768px) {
  .teacher-banner {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
}

.teacher-banner h2 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 800;
}

.teacher-banner p {
  margin: 0;
  color: var(--text-muted);
}

.teacher-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.teacher-list li {
  position: relative;
  padding: 0.4rem 0 0.4rem 1.35rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.teacher-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.25rem;
  background: var(--surface);
  text-align: center;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.site-footer p {
  margin: 0.35rem 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.footer-copy {
  margin-top: 0.75rem !important;
  font-size: 0.8125rem !important;
}
