@import url("https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,400&display=swap");

:root {
  --bg: #0a0a0f;
  --bg2: #111118;
  --bg3: #1a1a24;
  --border: rgba(255, 255, 255, 0.08);
  --accent: #7c6dfa;
  --accent-light: rgba(124, 109, 250, 0.1);
  --text: #e0e0e0;
  --muted: #666;
  --card: #111118;
  --radius: 12px;
  --nav-h: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── RIDEAU ── */
.curtain-left {
  position: fixed;
  top: 0;
  height: 50%;
  width: 100%;
  background: linear-gradient(to bottom, #000 99.7%, #fff 1%);
  z-index: 9999;
  transition: transform 1s cubic-bezier(0.76, 0, 0.24, 1);
  pointer-events: none;
}
.curtain-right {
  position: fixed;
  bottom: 0;
  height: 50%;
  width: 100%;
  background: linear-gradient(to top, #000 99.7%, #fff 1%);
  z-index: 9999;
  transition: transform 1s cubic-bezier(0.76, 0, 0.24, 1);
  pointer-events: none;
}
.curtain-left {
  left: 0;
  transform: translateY(0);
}
.curtain-right {
  right: 0;
  transform: translateY(0);
}
.curtain-left.open {
  transform: translateY(-100%);
}
.curtain-right.open {
  transform: translateY(100%);
}

/* Glows de fond */
body::before {
  content: "";
  position: fixed;
  top: -200px;
  left: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(124, 109, 250, 0.1) 0%,
    transparent 65%
  );
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: "";
  position: fixed;
  bottom: -200px;
  right: -200px;
  width: 700px;
  height: 700px;
  background: radial-gradient(
    circle,
    rgba(0, 210, 180, 0.07) 0%,
    transparent 65%
  );
  pointer-events: none;
  z-index: 0;
}

/* ── Navbar ── */
nav {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: min(960px, calc(100% - 40px));
  height: var(--nav-h);
  background: rgba(10, 10, 15, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 1000;
}

.nav-logo {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  justify-content: end;
  width: 100%;
  gap: 2px;
  list-style: none;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.87rem;
  font-weight: 400;
  padding: 7px 13px;
  border-radius: 8px;
  transition:
    color 0.15s,
    background 0.15s;
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Burger */
.burger {
  display: none; /* caché par défaut sur desktop */
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  padding: 8px;
  border: none;
  background: transparent;
  border-radius: 10px;
}
.burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition:
    transform 0.28s cubic-bezier(0.77, 0, 0.175, 1),
    opacity 0.2s;
  transform-origin: center;
}
.burger.open span:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}
.burger.open span:nth-child(2) {
  transform: translateY(-4px) rotate(-45deg);
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  top: calc(var(--nav-h) + 26px);
  left: 50%;
  transform: translateX(-50%);
  width: min(960px, calc(100% - 40px));
  background: rgba(10, 10, 15, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: 16px;
  z-index: 999;
  overflow: hidden;
  /* Fermé par défaut */
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transition:
    max-height 0.35s cubic-bezier(0.77, 0, 0.175, 1),
    opacity 0.25s ease;
}
.mobile-menu.open {
  max-height: 400px;
  opacity: 1;
  pointer-events: all;
}
.mobile-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  color: var(--muted);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  transition:
    background 0.15s,
    color 0.15s;
}
.mobile-menu a:last-child {
  border-bottom: none;
}
.mobile-menu a::after {
  content: "→";
  font-size: 0.85rem;
  opacity: 0;
  transition:
    opacity 0.15s,
    transform 0.15s;
  transform: translateX(-6px);
}
.mobile-menu a:hover,
.mobile-menu a.active {
  background: rgba(124, 109, 250, 0.07);
  color: var(--text);
}
.mobile-menu a:hover::after,
.mobile-menu a.active::after {
  opacity: 1;
  transform: translateX(0);
}
.mobile-menu a.active {
  color: var(--accent);
}

/* Overlay flou quand menu ouvert */
body.menu-open::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  min-height: 100vh;
  z-index: 998; /* juste en dessous du menu (999) */
  pointer-events: all;
}
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
body.menu-open .menu-overlay {
  opacity: 1;
  pointer-events: all;
}

/* Page */
.page {
  position: relative;
  z-index: 1;
  padding-top: calc(var(--nav-h) + 40px);
}

h1,
h2,
h3 {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  letter-spacing: 0.01em;
}

h1 {
  line-height: 80px;
}

/* Boutons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 8px;
  font-family: "DM Sans", sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}
.btn-primary:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}
.btn-arrow::after {
  content: "→";
}

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition:
    border-color 0.2s,
    transform 0.2s,
    box-shadow 0.2s;
}
.card:hover {
  border-color: rgba(124, 109, 250, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(124, 109, 250, 0.1);
}
.about-card h3 {
  font-size: 22px;
}

/* Tags */
.tag {
  display: inline-block;
  padding: 3px 9px;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid rgba(124, 109, 250, 0.2);
  border-radius: 4px;
  font-size: 0.74rem;
  font-weight: 500;
}

.section-title {
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 16px;
  font-family: "DM Sans", sans-serif;
}

/* Footer */
footer {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 80px auto 0;
  padding: 28px 40px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--muted);
}
footer a {
  color: var(--accent);
  text-decoration: none;
}
footer a:hover {
  opacity: 0.8;
}

/* Fade-up */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 18px;
  width: 100%;
  max-width: 680px;
  max-height: 88vh;
  overflow-y: auto;
  transform: translateY(24px) scale(0.97);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

.modal-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 18px 18px 0 0;
  display: block;
  background: var(--bg3);
}
.modal-img-placeholder {
  width: 100%;
  height: 220px;
  border-radius: 18px 18px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: rgba(255, 255, 255, 0.12);
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 4rem;
  letter-spacing: 0.04em;
}
.p-flowly-bg {
  background: linear-gradient(135deg, #1a56ff 0%, #6c3aff 100%);
}
.p-nas-bg {
  background: linear-gradient(135deg, #0d7a3c 0%, #0a5a2e 100%);
}
.p-gite-bg {
  background: linear-gradient(135deg, #c46200 0%, #8a3d00 100%);
}
.p-jais9-bg {
  background: linear-gradient(135deg, #7c2dbe 0%, #4a1080 100%);
}

.modal-body {
  padding: 28px 32px 32px;
}
.modal-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.modal-body h2 {
  font-size: 2rem;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.modal-body p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.75;
  margin-bottom: 12px;
}
.modal-body ul {
  list-style: none;
  margin-bottom: 16px;
}
.modal-body ul li {
  color: var(--muted);
  font-size: 0.88rem;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.modal-body ul li::before {
  content: "—";
  color: var(--accent);
  flex-shrink: 0;
}
.modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Responsive */
@media (max-width: 680px) {
  .nav-links {
    display: none;
  }
  .burger {
    display: flex;
  }
  footer {
    flex-direction: column;
    gap: 8px;
    text-align: center;
    padding: 24px 20px;
  }
  .modal-body {
    padding: 20px;
  }
  .modal-body h2 {
    font-size: 1.6rem;
  }
}
