@import "./var.css";

:root {
  --main-max: 1200px;
}


main[data-page-content] {
  margin: 0 auto;
  max-width: var(--main-max);
  padding: 2rem 1.25rem;
  box-sizing: border-box;
}

.grid { display: block; }


.hero {
  position: relative;
  overflow: hidden;
  background: #0b1324;
  box-shadow: var(--shadow);
  border-radius: 1rem;
  padding: clamp(2rem, 4.5vw, 3.5rem);
  color: var(--text);
  min-height: clamp(24rem, 56vw, 34rem);
}

.hero-carousel-track {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 700ms ease, transform 1000ms ease;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(110deg, rgba(2, 6, 23, 0.78) 18%, rgba(2, 6, 23, 0.28) 58%, rgba(2, 6, 23, 0.66) 100%),
    radial-gradient(circle at 72% 20%, rgba(56, 189, 248, 0.2), transparent 48%);
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero-inner {
  width: 100%;
  max-width: 52rem;
  position: relative;
  z-index: 2;
}

.eyebrow {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 0.6rem;
}

.hero-title {
  font-family: "Georgia", "Palatino Linotype", serif;
  font-size: clamp(3rem, 8vw, 5rem);
  line-height: 1;
  margin: 0 0 0.25rem;
  color: #f8fbff;
  text-shadow: 0 10px 28px rgba(2, 6, 23, 0.38);
}

.hero-subtitle {
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  color: #e7edf9;
  margin: 0 0 1rem;
  font-weight: 600;
  text-shadow: 0 4px 18px rgba(2, 6, 23, 0.35);
}

.lead {
  color: #d8e1f3;
  max-width: 68ch;
  margin: 0 0 1.25rem;
  text-wrap: pretty;
  text-shadow: 0 2px 14px rgba(2, 6, 23, 0.34);
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-controls {
  position: absolute;
  right: clamp(1rem, 2.5vw, 2rem);
  bottom: clamp(1rem, 2.8vw, 1.75rem);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.55rem;
  border-radius: 999px;
  backdrop-filter: blur(10px);
  background: rgba(2, 6, 23, 0.46);
  border: 1px solid rgba(148, 163, 184, 0.28);
}

.hero-control {
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 1.32rem;
  color: #e2e8f0;
  background: rgba(148, 163, 184, 0.22);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
}

.hero-control:hover {
  transform: translateY(-1px);
  background: rgba(125, 211, 252, 0.36);
}

.hero-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0.15rem;
}

.hero-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 999px;
  border: 0;
  background: rgba(226, 232, 240, 0.55);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
}

.hero-dot.is-active {
  background: #7dd3fc;
  transform: scale(1.18);
}



.features {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: stretch;
}

.env-choices {
  margin-top: 1.8rem;
  display: grid;
  gap: 1rem;
  padding: clamp(1rem, 2.4vw, 1.5rem);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.02);
  box-shadow: 0 8px 22px rgba(2, 6, 23, 0.35);
}

.env-choices-header h2 {
  margin: 0 0 0.45rem;
  font-family: "Georgia", "Palatino Linotype", serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.env-choices-header p {
  margin: 2rem 0 1rem;
  color: var(--muted);
  max-width: 78ch;
}

.env-row {
  display: grid;
  grid-template-columns: minmax(170px, 0.9fr) minmax(0, 2.1fr);
  gap: clamp(0.85rem, 2vw, 1.35rem);
  align-items: stretch;
}

.env-row.is-reverse {
  grid-template-columns: minmax(0, 2.1fr) minmax(170px, 0.9fr);
}

.env-media,
.env-text {
  margin: 0;
  border-radius: 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  overflow: hidden;
  background: rgba(2, 6, 23, 0.22);
}

.env-media {
  min-height: clamp(140px, 20vw, 190px);
}

.env-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.env-text {
  padding: clamp(1rem, 2.4vw, 1.4rem);
  display: grid;
  align-content: center;
  gap: 0.55rem;
}

.env-text h3 {
  margin: 0;
  font-family: "Georgia", "Palatino Linotype", serif;
  font-size: clamp(1.25rem, 2vw, 1.6rem);
}

.env-text p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

/* Styles page Téléchargements */
.downloads {
  margin-top: 1.5rem;
}

.downloads-header h1 { margin: 0 0 0.35rem; }

.download-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.download-card {
  display: flex;
  gap: 1rem;
  align-items: stretch;
  padding: 0.8rem;
  border-radius: 0.75rem;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(148,163,184,0.06);
}

.download-media { width: 220px; flex: 0 0 220px; overflow: hidden; border-radius: 0.5rem; }
.download-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.download-body { flex: 1 1 auto; display: flex; flex-direction: column; gap: 0.6rem; }

.download-actions { display: flex; gap: 0.6rem; margin-top: auto; }

@media (max-width: 880px) {
  .download-grid { grid-template-columns: 1fr; }
  .download-media { width: 140px; flex-basis: 140px; }
}

/* Versions toolbar */
.version-toolbar {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.8rem;
}

.version-current { color: var(--muted); }

.versions-archive {
  margin-top: 0.8rem;
  padding: 0.8rem;
  border-radius: 0.6rem;
  background: rgba(255,255,255,0.01);
  border: 1px solid rgba(148,163,184,0.06);
}

.versions-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.version-item { display: flex; justify-content: space-between; align-items: center; padding: 0.4rem 0.6rem; border-radius: 0.45rem; }
.version-meta { color: var(--muted); margin-left: 0.6rem; font-size: 0.92rem; }
.version-actions { display: flex; gap: 0.4rem; }

@media (max-width: 640px) {
  .version-toolbar { flex-direction: column; align-items: flex-start; }
  .version-actions { width: 100%; display: flex; gap: 0.5rem; }
}


.features .card {
  flex: 1 1 0;
  min-width: 0;
  min-height: 11rem;
  background: rgba(255,255,255,0.02);
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 8px 22px rgba(2,6,23,0.45);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 220ms ease, box-shadow 220ms ease, opacity 220ms ease;
}

.features .card h2 {
  margin: 0;
  font-family: "Georgia", serif;
  font-size: clamp(1.25rem, 1.6vw, 1.6rem);
  line-height: 1.1;
  transition: transform 220ms ease;
}

.features .card p {
  margin: 0;
  font-size: clamp(0.95rem, 1.05vw, 1.08rem);
  line-height: 1.6;
  position: absolute;
  left: 1.5rem;
  right: 1.5rem;
  bottom: 1.35rem;
  padding: 0.85rem 1rem;
  opacity: 0;
  transform: translateY(0.5rem);
  transition: opacity 180ms ease, transform 220ms ease;
  pointer-events: none;
}

.features:not(:hover) .card:first-child,
.features .card:first-child:hover,
.features .card:first-child:focus {
  flex-grow: 2.6;
  justify-content: flex-start;
}

.features:not(:hover) .card:first-child p,
.features .card:first-child:hover p,
.features .card:first-child:focus p {
  opacity: 1;
  transform: translateY(0);
}

.features:hover .card:first-child:not(:hover):not(:focus) {
  flex-grow: 1;
  justify-content: center;
}

.features:hover .card:first-child:not(:hover):not(:focus) p {
  opacity: 0;
  transform: translateY(0.5rem);
}

.features .card:hover,
.features .card:focus {
  flex-grow: 2.6;
  justify-content: flex-start;
  transform: translateY(-6px);
  box-shadow: 0 22px 60px rgba(2,6,23,0.55);
  z-index: 2;
}

.features .card:hover p,
.features .card:focus p {
  opacity: 1;
  transform: translateY(0);
}

.features .card:focus {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}


@media (max-width: 980px) {
  .hero-title { font-size: clamp(2.2rem, 7vw, 4rem); }

  .hero {
    min-height: 27rem;
  }

  .hero-controls {
    left: 1rem;
    right: auto;
  }

  .features {
    flex-direction: column;
  }

  .env-row,
  .env-row.is-reverse {
    grid-template-columns: 1fr;
  }

  .env-media {
    min-height: 185px;
  }

  .features .card {
    cursor: default;
  }

  .features .card:hover,
  .features .card:focus {
    transform: none;
  }

  .features .card p {
    position: static;
    margin-top: 0.85rem;
    opacity: 1;
    transform: none;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    pointer-events: auto;
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: 29rem;
    padding: 1.5rem;
  }

  .hero-inner {
    max-width: 100%;
  }

  .hero-controls {
    left: 0.8rem;
    right: 0.8rem;
    justify-content: space-between;
  }
}