/* NeuralTradeSchool — Centre de formation des formateurs */
:root {
  --teal: #0F766E;
  --cream: #FDF6E3;
  --slate: #334155;
  --amber: #D97706;
  --indigo: #3730A3;
  --white: #FFFFFF;
  --teal-light: #14B8A6;
  --cream-dark: #F5ECD3;
  --slate-light: #64748B;
  --shadow: 0 4px 24px rgba(51, 65, 85, 0.12);
  --radius: 8px;
  --max-width: 1140px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Asap', sans-serif;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--slate);
  background: var(--cream);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Bitter', serif;
  color: var(--slate);
  line-height: 1.3;
}

h1 { font-size: 2.4rem; margin-bottom: 1rem; }
h2 { font-size: 1.85rem; margin-bottom: 0.85rem; margin-top: 2rem; }
h3 { font-size: 1.35rem; margin-bottom: 0.6rem; margin-top: 1.5rem; }

a {
  color: var(--teal);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--indigo);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  background: var(--white);
  border-bottom: 3px solid var(--teal);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.logo-main {
  font-family: 'Bitter', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--teal);
}

.logo-sub {
  font-size: 0.72rem;
  color: var(--slate-light);
  max-width: 280px;
  line-height: 1.3;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.main-nav a {
  font-weight: 600;
  color: var(--slate);
  font-size: 0.95rem;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--teal);
  border-bottom-color: var(--amber);
}

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--teal);
  border-radius: var(--radius);
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  font-family: 'Asap', sans-serif;
  color: var(--teal);
  font-weight: 600;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--teal) 0%, #115E59 100%);
  color: var(--white);
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 40%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.4;
}

.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.hero h1 {
  color: var(--white);
  font-size: 2.6rem;
}

.hero-slogan {
  font-family: 'Bitter', serif;
  font-style: italic;
  font-size: 1.15rem;
  margin: 1.25rem 0 1.75rem;
  opacity: 0.95;
  border-left: 4px solid var(--amber);
  padding-left: 1rem;
}

.hero-text {
  opacity: 0.92;
  margin-bottom: 1.5rem;
}

.hero-image img {
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  border: 3px solid rgba(255,255,255,0.2);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-family: 'Asap', sans-serif;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-align: center;
}

.btn-primary {
  background: var(--amber);
  color: var(--white);
}

.btn-primary:hover {
  background: #B45309;
  color: var(--white);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn-secondary:hover {
  background: var(--white);
  color: var(--teal);
}

.btn-outline {
  background: transparent;
  color: var(--teal);
  border: 2px solid var(--teal);
}

.btn-outline:hover {
  background: var(--teal);
  color: var(--white);
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section-alt {
  background: var(--white);
}

.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-title h2 {
  margin-top: 0;
  color: var(--teal);
}

.section-title p {
  color: var(--slate-light);
  max-width: 640px;
  margin: 0.5rem auto 0;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--teal);
  transition: transform 0.2s;
}

.card:hover {
  transform: translateY(-3px);
}

.card-ref {
  display: inline-block;
  background: var(--cream);
  color: var(--indigo);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

.card h3 {
  margin-top: 0;
  color: var(--teal);
}

.card-image {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1rem;
}

.card-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

/* Fiche style */
.fiche {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-left: 5px solid var(--amber);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  margin: 1.5rem 0;
  box-shadow: var(--shadow);
}

.fiche-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amber);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

/* Two column layout */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.two-col img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* FAQ */
.faq-item {
  background: var(--white);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  background: var(--white);
  border: none;
  padding: 1.25rem 1.5rem;
  font-family: 'Bitter', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--slate);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-question:hover {
  background: var(--cream);
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--teal);
  flex-shrink: 0;
}

.faq-item.open .faq-question::after {
  content: '−';
}

.faq-answer {
  display: none;
  padding: 0 1.5rem 1.25rem;
  color: var(--slate-light);
}

.faq-item.open .faq-answer {
  display: block;
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--slate);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--cream-dark);
  border-radius: var(--radius);
  font-family: 'Asap', sans-serif;
  font-size: 1rem;
  background: var(--white);
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--teal);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

/* Contact info */
.contact-block {
  background: var(--teal);
  color: var(--white);
  padding: 2rem;
  border-radius: var(--radius);
}

.contact-block h3 {
  color: var(--white);
  margin-top: 0;
}

.contact-block a {
  color: var(--cream);
}

.contact-block a:hover {
  color: var(--white);
}

.contact-item {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  position: relative;
}

.contact-item::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--amber);
}

/* Disclaimer */
.disclaimer {
  background: var(--cream-dark);
  border: 1px solid var(--amber);
  border-radius: var(--radius);
  padding: 1.5rem;
  font-size: 0.92rem;
  line-height: 1.65;
  margin: 2rem 0;
}

.disclaimer strong {
  color: var(--amber);
}

/* Legal pages */
.legal-content h2 {
  color: var(--teal);
  border-bottom: 2px solid var(--cream-dark);
  padding-bottom: 0.5rem;
}

.legal-content ul, .legal-content ol {
  margin: 1rem 0 1rem 1.5rem;
}

.legal-content li {
  margin-bottom: 0.5rem;
}

/* Page header */
.page-header {
  background: var(--teal);
  color: var(--white);
  padding: 3rem 0;
  text-align: center;
}

.page-header h1 {
  color: var(--white);
  margin-bottom: 0.5rem;
}

.page-header p {
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* Breadcrumb */
.breadcrumb {
  padding: 1rem 0;
  font-size: 0.88rem;
  color: var(--slate-light);
}

.breadcrumb a {
  color: var(--teal);
}

/* Stats */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  text-align: center;
  margin: 2rem 0;
}

.stat-item {
  background: var(--white);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat-number {
  font-family: 'Bitter', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--teal);
}

.stat-label {
  font-size: 0.88rem;
  color: var(--slate-light);
}

/* Timeline */
.timeline-item {
  border-left: 3px solid var(--teal);
  padding: 0 0 2rem 1.5rem;
  position: relative;
}

.timeline-item::before {
  content: '';
  width: 12px;
  height: 12px;
  background: var(--amber);
  border-radius: 50%;
  position: absolute;
  left: -7.5px;
  top: 0.3rem;
}

.timeline-year {
  font-family: 'Bitter', serif;
  font-weight: 700;
  color: var(--indigo);
  margin-bottom: 0.25rem;
}

/* Footer */
.site-footer {
  background: var(--slate);
  color: rgba(255,255,255,0.85);
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand .logo-main {
  color: var(--white);
  margin-bottom: 0.5rem;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-col h4 {
  font-family: 'Bitter', serif;
  color: var(--white);
  margin-bottom: 1rem;
  font-size: 1rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: var(--amber);
}

.footer-disclaimer {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 1.5rem;
  font-size: 0.82rem;
  line-height: 1.6;
  opacity: 0.8;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  margin-top: 1.5rem;
  padding-top: 1rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.82rem;
  opacity: 0.7;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.15);
  padding: 1.5rem;
  z-index: 1000;
  display: none;
  border-top: 3px solid var(--teal);
}

.cookie-banner.visible {
  display: block;
}

.cookie-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: center;
}

.cookie-text {
  font-size: 0.92rem;
  line-height: 1.6;
}

.cookie-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cookie-actions .btn {
  padding: 0.6rem 1.2rem;
  font-size: 0.88rem;
}

.btn-cookie-accept {
  background: var(--teal);
  color: var(--white);
}

.btn-cookie-accept:hover {
  background: #115E59;
  color: var(--white);
}

.btn-cookie-refuse {
  background: var(--slate);
  color: var(--white);
}

.btn-cookie-refuse:hover {
  background: #1E293B;
  color: var(--white);
}

.btn-cookie-custom {
  background: transparent;
  color: var(--teal);
  border: 2px solid var(--teal);
}

.btn-cookie-custom:hover {
  background: var(--cream);
}

/* Cookie modal */
.cookie-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(51, 65, 85, 0.6);
  z-index: 1001;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.cookie-modal.visible {
  display: flex;
}

.cookie-modal-content {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 520px;
  width: 100%;
  box-shadow: var(--shadow);
}

.cookie-modal-content h3 {
  color: var(--teal);
  margin-top: 0;
}

.cookie-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--cream-dark);
}

.cookie-option label {
  font-weight: 600;
}

.cookie-option input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--teal);
}

.cookie-modal-actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

/* 404 */
.error-page {
  text-align: center;
  padding: 5rem 0;
}

.error-page h1 {
  color: var(--teal);
  font-size: 2.2rem;
}

.error-code {
  font-family: 'Bitter', serif;
  font-size: 6rem;
  font-weight: 700;
  color: var(--cream-dark);
  line-height: 1;
  margin-bottom: 1rem;
}

/* Alert messages */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}

.alert-success {
  background: #D1FAE5;
  color: #065F46;
  border: 1px solid #6EE7B7;
}

.alert-error {
  background: #FEE2E2;
  color: #991B1B;
  border: 1px solid #FCA5A5;
}

/* Responsive */
@media (max-width: 900px) {
  .hero .container,
  .two-col,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .cookie-inner {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    width: 100%;
  }

  .main-nav.open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .main-nav li {
    border-top: 1px solid var(--cream-dark);
  }

  .main-nav a {
    display: block;
    padding: 0.75rem 0;
  }

  h1 { font-size: 1.85rem; }
  .hero h1 { font-size: 2rem; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .stats-row {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .cookie-actions {
    flex-direction: column;
  }

  .cookie-actions .btn {
    width: 100%;
  }
}
