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

:root {
  /* Couleurs principales */
  --blue: #2D9CDB;
  --teal: #2ABFBF;
  --orange: #F2994A;
  --green: #27AE60;
  --yellow: #F2C94C;
  --red: #EB5757;
  --purple: #9B51E0;

  /* Texte */
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-tertiary: #999999;

  /* Surfaces */
  --surface: #FFFFFF;
  --surface-alt: #F8F9FA;
  --border: #E8E8E8;

  /* Ombres */
  --shadow-sm: 0 2px 8px rgba(45, 156, 219, 0.08);
  --shadow-md: 0 4px 16px rgba(45, 156, 219, 0.12);

  /* Rayons */
  --radius-sm: 10px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

html {
  scroll-behavior: smooth;
}

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

h1, h2, h3, h4 {
  font-family: 'Quicksand', 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

a {
  color: var(--blue);
  text-decoration: none;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.8;
}

img {
  max-width: 100%;
  height: auto;
}

/* === Layout === */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.container--narrow {
  max-width: 780px;
}

/* === Header / Nav === */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav__logo {
  font-family: 'Quicksand', sans-serif;
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav__logo-img {
  width: 32px;
  height: 32px;
}

.nav__links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav__links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav__links a:hover {
  color: var(--blue);
  opacity: 1;
}

/* === Hero === */
.hero {
  padding: 80px 0 64px;
  text-align: center;
}

.hero__logo {
  display: block;
  width: 160px;
  height: 160px;
  margin: 0 auto 24px;
}

.hero__badge {
  display: inline-block;
  background: rgba(45, 156, 219, 0.1);
  color: var(--blue);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  margin-bottom: 20px;
  color: var(--text-primary);
}

.hero h1 em {
  font-style: normal;
  color: var(--blue);
}

.hero__subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  font-size: 1.05rem;
  padding: 14px 32px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(45, 156, 219, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}

.hero__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(45, 156, 219, 0.4);
  opacity: 1;
}

/* === Features === */
.features {
  padding: 64px 0 80px;
}

.features__title {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.features__subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 48px;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.feature-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.feature-card__icon svg {
  width: 24px;
  height: 24px;
}

.feature-card__icon--blue { background: rgba(45, 156, 219, 0.12); color: var(--blue); }
.feature-card__icon--teal { background: rgba(42, 191, 191, 0.12); color: var(--teal); }
.feature-card__icon--orange { background: rgba(242, 153, 74, 0.12); color: var(--orange); }
.feature-card__icon--green { background: rgba(39, 174, 96, 0.12); color: var(--green); }
.feature-card__icon--purple { background: rgba(155, 81, 224, 0.12); color: var(--purple); }
.feature-card__icon--yellow { background: rgba(242, 201, 76, 0.15); color: var(--yellow); }

.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* === Templates / Collections === */
.templates {
  padding: 64px 0 80px;
  background: var(--surface-alt);
}

.templates__title {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.templates__subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 48px;
}

.templates__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.template-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.template-tag svg {
  width: 16px;
  height: 16px;
  color: var(--blue);
}

/* === Nav GitHub icon === */
.nav__github {
  display: inline-flex;
  align-items: center;
}

.nav__github svg {
  width: 20px;
  height: 20px;
}

/* === Open Source === */
.opensource {
  padding: 64px 0 80px;
}

.opensource__title {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.opensource__subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 48px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.opensource__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.opensource__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

.opensource__card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.opensource__card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.opensource__card-icon svg {
  width: 24px;
  height: 24px;
}

.opensource__card-icon--green { background: rgba(39, 174, 96, 0.12); color: var(--green); }
.opensource__card-icon--purple { background: rgba(155, 81, 224, 0.12); color: var(--purple); }
.opensource__card-icon--blue { background: rgba(45, 156, 219, 0.12); color: var(--blue); }

.opensource__card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.opensource__card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.opensource__cta {
  text-align: center;
}

.opensource__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--text-primary);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  transition: transform 0.2s, box-shadow 0.2s;
}

.opensource__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(51, 51, 51, 0.2);
  opacity: 1;
}

.opensource__btn svg {
  width: 20px;
  height: 20px;
}

/* === Footer === */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer__copy {
  color: var(--text-tertiary);
  font-size: 0.9rem;
}

.footer__links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer__links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer__links a:hover {
  color: var(--blue);
}

/* === Legal pages === */
.legal {
  padding: 48px 0 80px;
}

.legal h1 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.legal__date {
  color: var(--text-tertiary);
  font-size: 0.9rem;
  margin-bottom: 40px;
}

.legal h2 {
  font-size: 1.3rem;
  margin-top: 40px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.legal h3 {
  font-size: 1.1rem;
  margin-top: 24px;
  margin-bottom: 8px;
}

.legal p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.7;
}

.legal ul, .legal ol {
  color: var(--text-secondary);
  margin-bottom: 16px;
  padding-left: 24px;
  line-height: 1.7;
}

.legal li {
  margin-bottom: 6px;
}

.legal a {
  color: var(--blue);
}

/* === Mobile Nav Toggle === */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}

.nav__toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav__toggle.active .nav__toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__toggle.active .nav__toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav__toggle.active .nav__toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* === Responsive === */
@media (max-width: 768px) {
  .nav__toggle {
    display: flex;
  }

  .nav__links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px 24px;
    gap: 0;
    box-shadow: var(--shadow-md);
  }

  .nav__links.open {
    display: flex;
  }

  .nav__links li {
    border-bottom: 1px solid var(--border);
  }

  .nav__links li:last-child {
    border-bottom: none;
  }

  .nav__links a {
    display: block;
    padding: 14px 0;
    font-size: 1rem;
  }

  .hero {
    padding: 48px 0 40px;
  }

  .features, .templates {
    padding: 40px 0 56px;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }
}
