/* ============================================
   Upevia Landing — CSS
   ============================================ */

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Primaire (Vert) */
  --green-50: #f5faf6;
  --green-100: #eef6f0;
  --green-200: #c8e0ce;
  --green-300: #a0c8ad;
  --green-400: #5a9e72;
  --green-500: #3d7a54;
  --green-600: #336a48;
  --green-700: #2d5a3d;
  --green-800: #234a31;
  --green-900: #1a3a25;
  --green-950: #122a1a;

  /* Secondaire (Jaune/Or) */
  --yellow-300: #edd47a;
  --yellow-400: #dfc05a;
  --yellow-700: #c9a93a;

  /* Texte */
  --ink: #1a2e22;
  --ink-mid: #3b5248;
  --ink-muted: #7a9585;
  --ink-faint: #b0c5b8;

  /* Surfaces */
  --surface: #ffffff;
  --surface-alt: #f5faf6;
  --border: #dde9e0;
  --page-bg: #c8e0ce;

  /* Status */
  --danger: #e07070;
  --success: #3d7a54;
  --info: #5a88cc;
  --warning: #d2692a;

  /* Radius */
  --radius-sm: 0.4rem;
  --radius-md: 0.65rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(30, 60, 40, 0.06), 0 1px 2px rgba(30, 60, 40, 0.04);
  --shadow-md: 0 4px 16px rgba(30, 60, 40, 0.08), 0 2px 6px rgba(30, 60, 40, 0.05);
  --shadow-lg: 0 12px 40px rgba(30, 60, 40, 0.12), 0 4px 12px rgba(30, 60, 40, 0.07);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--green-500);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--green-700);
}

img {
  max-width: 100%;
  display: block;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
}

.section--alt {
  background: var(--surface-alt);
}

.section__title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--ink);
}

.section__subtitle {
  font-size: 1.1rem;
  color: var(--ink-mid);
  margin-bottom: 2.5rem;
  max-width: 38rem;
}

.section__title--center,
.section__subtitle--center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  line-height: 1.4;
}

.btn--primary {
  background: var(--green-500);
  color: #fff;
  border-color: var(--green-500);
}

.btn--primary:hover {
  background: var(--green-700);
  border-color: var(--green-700);
  color: #fff;
}

.btn--secondary {
  background: transparent;
  color: var(--green-500);
  border-color: var(--green-500);
}

.btn--secondary:hover {
  background: var(--green-50);
  color: var(--green-700);
  border-color: var(--green-700);
}

.btn--lg {
  padding: 0.875rem 2rem;
  font-size: 1.1rem;
}

/* --- Header / Nav --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.2s ease;
}

.header--scrolled {
  box-shadow: var(--shadow-sm);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.header__logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--green-700);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.header__logo:hover {
  color: var(--green-500);
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.header__links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.header__link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-mid);
}

.header__link:hover {
  color: var(--green-500);
}

.header__link--active {
  color: var(--green-700);
  font-weight: 600;
}

.header__cta {
  padding: 0.5rem 1.25rem;
  font-size: 0.9rem;
}

.header__discord {
  display: flex;
  align-items: center;
  color: var(--ink-muted);
}

.header__discord:hover {
  color: var(--green-500);
}

.header__discord svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Mobile nav toggle */
.header__toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.header__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* --- Hero --- */
.hero {
  padding: 7rem 0 4rem;
  background: linear-gradient(135deg, var(--green-700) 0%, var(--green-500) 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  max-width: 40rem;
}

.hero__title {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.hero__subtitle {
  font-size: 1.15rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 2rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero .btn--primary {
  background: #fff;
  color: var(--green-700);
  border-color: #fff;
}

.hero .btn--primary:hover {
  background: var(--green-50);
  border-color: var(--green-50);
}

.hero .btn--secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}

.hero .btn--secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
  color: #fff;
}

/* --- How it works --- */
.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.step-card {
  text-align: center;
  padding: 2rem 1.5rem;
}

.step-card__icon {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1.25rem;
  background: var(--green-100);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-600);
}

.step-card__icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.step-card__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--green-500);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.step-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--ink);
}

.step-card__desc {
  font-size: 0.95rem;
  color: var(--ink-mid);
  line-height: 1.6;
}

/* --- Formateurs cards --- */
.formateurs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.formateur-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.formateur-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.formateur-card__avatar {
  flex-shrink: 0;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--green-200);
  color: var(--green-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  overflow: hidden;
}

.formateur-card__avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.formateurs-loading {
  text-align: center;
  color: var(--gray-500);
  padding: 2rem 0;
}

.formateur-card__info {
  flex: 1;
}

.formateur-card__name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.formateur-card__bio {
  font-size: 0.9rem;
  color: var(--ink-mid);
  line-height: 1.5;
}

.section__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  margin-top: 2rem;
  font-size: 1rem;
}

.section__link:hover {
  gap: 0.6rem;
}

/* --- Ressources grid --- */
.ressources-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.ressource-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  text-align: center;
}

.ressource-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.ressource-card__icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  background: var(--green-100);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-600);
}

.ressource-card__icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.ressource-card__title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
  color: var(--ink);
}

.ressource-card__desc {
  font-size: 0.85rem;
  color: var(--ink-mid);
  line-height: 1.5;
}

/* --- Footer --- */
.footer {
  background: var(--green-950);
  color: var(--green-300);
  padding: 2.5rem 0;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  list-style: none;
}

.footer__link {
  font-size: 0.9rem;
  color: var(--green-300);
}

.footer__link:hover {
  color: #fff;
}

.footer__bottom {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.footer__discord {
  display: flex;
  align-items: center;
  color: var(--green-300);
}

.footer__discord:hover {
  color: #fff;
}

.footer__discord svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* --- Legal pages --- */
.legal {
  padding: 7rem 0 4rem;
  min-height: 60vh;
}

.legal__title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: var(--ink);
}

.legal__placeholder {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  color: var(--ink-mid);
  font-size: 1rem;
}

.legal__date {
  color: var(--ink-mid);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.legal__intro {
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 2.5rem;
  color: var(--ink);
}

.legal__section {
  margin-bottom: 2.5rem;
}

.legal__section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.75rem;
}

.legal__section h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.5rem;
  margin-top: 1rem;
}

.legal__section p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--ink-mid);
  margin-bottom: 0.75rem;
}

.legal__section ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal__section ul li {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--ink-mid);
  margin-bottom: 0.25rem;
}

.legal__section a {
  color: var(--accent);
  text-decoration: underline;
}

/* --- Formateurs page --- */
.page-header {
  padding: 7rem 0 2.5rem;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
}

.page-header__title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.page-header__subtitle {
  color: var(--ink-mid);
  font-size: 1.1rem;
}

.formateurs-page-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding: 3rem 0 4rem;
}

/* --- Mobile nav --- */
@media (max-width: 47.99em) {
  .header__toggle {
    display: flex;
  }

  .header__nav {
    position: fixed;
    top: 4rem;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    flex-direction: column;
    justify-content: flex-start;
    padding: 2rem 1.5rem;
    gap: 1.5rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }

  .header__nav--open {
    transform: translateX(0);
  }

  .header__links {
    flex-direction: column;
    gap: 1rem;
    width: 100%;
  }

  .header__link {
    font-size: 1.1rem;
    padding: 0.5rem 0;
  }

  .header__cta {
    width: 100%;
    text-align: center;
    padding: 0.75rem;
    font-size: 1rem;
  }

  .header__toggle--open span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
  }

  .header__toggle--open span:nth-child(2) {
    opacity: 0;
  }

  .header__toggle--open span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
  }
}

/* --- Tablet (48em / 768px) --- */
@media (min-width: 48em) {
  .hero__title {
    font-size: 2.75rem;
  }

  .section__title {
    font-size: 2rem;
  }

  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .formateurs-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ressources-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .formateurs-page-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- Desktop (64em / 1024px) --- */
@media (min-width: 64em) {
  .hero {
    padding: 9rem 0 5rem;
  }

  .hero__title {
    font-size: 3.25rem;
  }

  .hero__subtitle {
    font-size: 1.25rem;
  }

  .section {
    padding: 5rem 0;
  }

  .formateurs-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .ressources-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .formateurs-page-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
  }
}
