/* AIChartSignals — Atelier graphique pédagogique */
:root {
  --purple: #5B21B6;
  --warm: #FAF7F0;
  --deep: #1F2937;
  --grey: #6B7280;
  --coral: #FB7185;
  --purple-light: #7C3AED;
  --purple-dark: #4C1D95;
  --warm-dark: #F0EBE0;
  --white: #FFFFFF;
  --shadow: 0 4px 24px rgba(31, 41, 55, 0.08);
  --radius: 12px;
  --font-title: 'Manrope', sans-serif;
  --font-body: 'Lora', Georgia, serif;
  --transition: 0.35s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--deep);
  background: var(--warm);
  line-height: 1.7;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--purple);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition);
}

a:hover, a:focus-visible { color: var(--coral); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 700;
  line-height: 1.25;
  color: var(--deep);
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); margin-bottom: 1rem; }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); margin-bottom: 0.75rem; }

p { margin-bottom: 1rem; }

ul, ol { margin-bottom: 1rem; padding-left: 1.5rem; }

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--purple);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  z-index: 9999;
  border-radius: var(--radius);
  font-family: var(--font-title);
}

.skip-link:focus { top: 1rem; }

.container {
  width: min(1140px, 92%);
  margin: 0 auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(250, 247, 240, 0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--warm-dark);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
  gap: 1rem;
}

.logo {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--purple);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo span { color: var(--coral); }

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.main-nav a {
  font-family: var(--font-title);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--deep);
}

.main-nav a:hover, .main-nav a.active {
  color: var(--purple);
}

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--purple);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-family: var(--font-title);
  color: var(--purple);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn-primary {
  background: var(--purple);
  color: var(--warm);
}

.btn-primary:hover, .btn-primary:focus-visible {
  background: var(--coral);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-outline {
  background: transparent;
  color: var(--purple);
  border: 2px solid var(--purple);
}

.btn-outline:hover, .btn-outline:focus-visible {
  background: var(--purple);
  color: var(--warm);
}

.btn:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 2px;
}

/* Hero */
.hero {
  padding: 4rem 0 3rem;
  background: linear-gradient(135deg, var(--warm) 0%, var(--warm-dark) 100%);
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-title);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--coral);
  background: rgba(251, 113, 133, 0.12);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.hero-slogan {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--grey);
  margin-bottom: 1.5rem;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; }

.hero-visual {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 2px solid rgba(91, 33, 182, 0.15);
}

.hero-visual img { aspect-ratio: 4/3; object-fit: cover; }

.hero-annotation {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  background: rgba(250, 247, 240, 0.95);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-family: var(--font-title);
  font-size: 0.8rem;
  border-left: 3px solid var(--coral);
}

/* Stats band */
.stats-band {
  background: var(--purple);
  color: var(--warm);
  padding: 2.5rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat-number {
  font-family: var(--font-title);
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--coral);
  display: block;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Sections */
section { padding: 4rem 0; }

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3rem;
}

.section-tag {
  font-family: var(--font-title);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--coral);
  margin-bottom: 0.5rem;
}

.section-alt { background: var(--white); }

/* Cards grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--white);
  border: 1px solid rgba(91, 33, 182, 0.12);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--coral);
}

.card-badge {
  font-family: var(--font-title);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--purple);
  background: rgba(91, 33, 182, 0.08);
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 1rem;
}

.card-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--purple), var(--coral));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

/* Workshop blocks */
.workshop-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.workshop-block.reverse { direction: rtl; }
.workshop-block.reverse > * { direction: ltr; }

.block-label {
  font-family: var(--font-title);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--coral);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

/* Exercice / Observation / Annotation sections */
.pedagogy-section {
  border-left: 4px solid var(--purple);
  padding-left: 1.5rem;
  margin-bottom: 2rem;
}

.pedagogy-section.observation { border-color: var(--coral); }
.pedagogy-section.annotation { border-color: var(--grey); }

/* Process steps */
.process-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  counter-reset: step;
}

.process-step {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid rgba(91, 33, 182, 0.1);
  position: relative;
}

.process-step::before {
  counter-increment: step;
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--purple);
  color: var(--warm);
  border-radius: 50%;
  font-family: var(--font-title);
  font-weight: 800;
  margin: 0 auto 1rem;
}

/* Formats */
.format-card {
  background: var(--warm);
  border: 2px solid var(--purple);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
}

.format-card h3 { color: var(--purple); }

/* Testimonials */
.testimonial {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem;
  border-left: 4px solid var(--coral);
  font-style: italic;
}

.testimonial-author {
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-style: normal;
  color: var(--grey);
  margin-top: 1rem;
}

/* FAQ */
.faq-list details {
  background: var(--white);
  border: 1px solid rgba(91, 33, 182, 0.1);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.faq-list summary {
  font-family: var(--font-title);
  font-weight: 600;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--purple);
  transition: transform var(--transition);
}

.faq-list details[open] summary::after { content: '−'; }

.faq-list details[open] summary { color: var(--purple); }

.faq-answer {
  padding: 0 1.5rem 1.25rem;
  color: var(--grey);
}

/* Disclaimer */
.disclaimer-box {
  background: rgba(91, 33, 182, 0.06);
  border: 1px solid rgba(91, 33, 182, 0.15);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  font-size: 0.9rem;
  color: var(--grey);
}

.disclaimer-box strong {
  display: block;
  font-family: var(--font-title);
  color: var(--deep);
  margin-bottom: 0.5rem;
}

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, var(--purple-dark), var(--purple));
  color: var(--warm);
  padding: 4rem 0;
  text-align: center;
}

.cta-band h2 { color: var(--warm); margin-bottom: 1rem; }

.cta-band p { opacity: 0.9; max-width: 560px; margin: 0 auto 2rem; }

/* Page header */
.page-hero {
  padding: 3rem 0 2rem;
  background: var(--white);
  border-bottom: 1px solid var(--warm-dark);
}

.page-hero h1 { margin-bottom: 0.75rem; }

.page-hero .lead {
  font-size: 1.1rem;
  color: var(--grey);
  max-width: 720px;
}

/* Program cards */
.program-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid rgba(91, 33, 182, 0.12);
  margin-bottom: 1.5rem;
}

.program-code {
  font-family: var(--font-title);
  font-weight: 800;
  color: var(--coral);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.program-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: var(--font-title);
  font-size: 0.8rem;
  color: var(--grey);
  margin-top: 1rem;
}

.program-meta span {
  background: var(--warm);
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
}

/* Contact form */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
}

.contact-info-block {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid rgba(91, 33, 182, 0.1);
}

.contact-info-block h3 {
  font-size: 1rem;
  color: var(--purple);
  margin-top: 1.5rem;
}

.contact-info-block h3:first-child { margin-top: 0; }

.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.form-group .required { color: var(--coral); }

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--warm-dark);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--white);
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(91, 33, 182, 0.15);
}

.form-group textarea { min-height: 140px; resize: vertical; }

.form-honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

.form-consent {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.form-consent input { width: auto; margin-top: 0.3rem; }

.form-note {
  font-size: 0.85rem;
  color: var(--grey);
  margin-top: 1rem;
}

.form-status {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-family: var(--font-title);
  font-size: 0.95rem;
}

.form-status.hidden { display: none; }

.form-status--success {
  background: rgba(5, 150, 105, 0.1);
  border: 1px solid #059669;
  color: #065F46;
}

.form-status--error {
  background: rgba(251, 113, 133, 0.1);
  border: 1px solid var(--coral);
  color: #9F1239;
}

.form-status--flood {
  background: rgba(107, 114, 128, 0.1);
  border: 1px solid var(--grey);
  color: var(--deep);
}

.map-container {
  margin-top: 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--warm-dark);
}

.map-container iframe {
  width: 100%;
  height: 280px;
  border: 0;
}

/* Legal pages */
.legal-content {
  max-width: 820px;
  margin: 0 auto;
  padding: 3rem 0 4rem;
}

.legal-content h2 {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--warm-dark);
}

.legal-content h2:first-of-type { border-top: none; margin-top: 1.5rem; }

.legal-content ul { margin-bottom: 1.25rem; }

.legal-update {
  font-family: var(--font-title);
  font-size: 0.85rem;
  color: var(--grey);
  margin-bottom: 2rem;
}

/* Footer */
.site-footer {
  background: var(--deep);
  color: rgba(250, 247, 240, 0.85);
  padding: 3.5rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-brand .logo { color: var(--warm); margin-bottom: 1rem; display: inline-block; }

.footer-brand p { font-size: 0.9rem; opacity: 0.8; }

.footer-col h4 {
  font-family: var(--font-title);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--coral);
  margin-bottom: 1rem;
}

.footer-col ul { list-style: none; padding: 0; }

.footer-col li { margin-bottom: 0.5rem; }

.footer-col a {
  color: rgba(250, 247, 240, 0.8);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-col a:hover { color: var(--coral); }

.footer-legal {
  border-top: 1px solid rgba(250, 247, 240, 0.12);
  padding-top: 1.5rem;
  font-size: 0.8rem;
  opacity: 0.7;
  line-height: 1.6;
}

.footer-note {
  margin-top: 1rem;
  font-family: var(--font-title);
  font-size: 0.85rem;
  color: var(--coral);
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 2px solid var(--purple);
  padding: 1.25rem 0;
  box-shadow: 0 -4px 24px rgba(31, 41, 55, 0.12);
  z-index: 9998;
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

.cookie-banner.visible { transform: translateY(0); }

.cookie-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cookie-text {
  flex: 1;
  min-width: 280px;
  font-size: 0.9rem;
  color: var(--grey);
}

.cookie-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-cookie {
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background var(--transition);
}

.btn-cookie-accept { background: var(--purple); color: var(--warm); }
.btn-cookie-accept:hover { background: var(--coral); }

.btn-cookie-reject { background: var(--warm-dark); color: var(--deep); }
.btn-cookie-reject:hover { background: var(--grey); color: var(--white); }

.btn-cookie-custom { background: transparent; color: var(--purple); border: 1px solid var(--purple); }
.btn-cookie-custom:hover { background: var(--purple); color: var(--warm); }

/* 404 */
.error-page {
  text-align: center;
  padding: 6rem 0;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.error-code {
  font-family: var(--font-title);
  font-size: 6rem;
  font-weight: 800;
  color: var(--purple);
  line-height: 1;
}

/* Animations */
.js .fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.js .draw-line {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  transition: stroke-dashoffset 0.6s ease;
}

.js .draw-line.visible { stroke-dashoffset: 0; }

/* SVG chart decoration */
.chart-svg {
  width: 100%;
  max-width: 320px;
  margin: 1rem auto;
}

/* Team grid */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.team-member {
  background: var(--white);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid rgba(91, 33, 182, 0.1);
}

.team-role {
  font-family: var(--font-title);
  font-size: 0.8rem;
  color: var(--coral);
  margin-bottom: 0.5rem;
}

/* Table cookies */
.cookie-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.cookie-table th,
.cookie-table td {
  border: 1px solid var(--warm-dark);
  padding: 0.75rem 1rem;
  text-align: left;
}

.cookie-table th {
  background: var(--purple);
  color: var(--warm);
  font-family: var(--font-title);
}

/* Responsive */
@media (max-width: 900px) {
  .hero-grid,
  .workshop-block,
  .contact-grid,
  .footer-grid { grid-template-columns: 1fr; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .process-steps { grid-template-columns: 1fr; }

  .workshop-block.reverse { direction: ltr; }

  .nav-toggle { display: block; }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--warm);
    border-bottom: 1px solid var(--warm-dark);
    padding: 1rem;
    display: none;
  }

  .main-nav.open { display: block; }

  .main-nav ul { flex-direction: column; gap: 0.75rem; }

  .header-cta { display: none; }
}

@media (max-width: 600px) {
  .stats-grid { grid-template-columns: 1fr; }
  section { padding: 2.5rem 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
