/*
 * Shared production overrides for the exported deck pages.
 * The page builder emitted most layout declarations inline, so the responsive
 * selectors intentionally match those stable declarations and use !important.
 * Keep this file loaded after each page's viewport metadata.
 */
:root {
  color-scheme: dark;
  --neo-base: #1d2a36;
  --neo-surface: #233442;
  --neo-card: #2a3a48;
  --neo-card-strong: #314352;
  --neo-text: #f5f7fb;
  --neo-text-soft: #d8e0e8;
  --neo-muted: #c1ccd7;
  --neo-muted-dim: #97a6b5;
  --neo-nav: rgba(29, 42, 54, 0.88);
}

html {
  scroll-behavior: smooth;
}

html,
body {
  max-width: 100%;
  overflow-x: clip;
}

body {
  min-width: 320px;
}

img,
svg,
canvas,
video,
image-slot {
  max-width: 100%;
}

a,
p,
h1,
h2,
h3 {
  overflow-wrap: anywhere;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #ffe14d;
  outline-offset: 3px;
}

/* Grid children need an explicit shrinking boundary or long labels can push an
   inline grid outside the viewport even after the columns become responsive. */
[style*="display:grid"] > *,
[style*="display:flex"] > * {
  min-width: 0;
}

.btn-primary,
.btn-ghost {
  max-width: 100%;
  text-align: center;
}

nav .navlink[aria-current="page"] {
  color: #fff !important;
  font-weight: 600 !important;
}

.site-nav {
  background: var(--neo-nav) !important;
  box-shadow: 0 8px 24px rgba(9, 17, 24, 0.18);
}

.site-nav > div {
  min-height: 64px;
  padding: 12px 6vw !important;
}

.site-nav__toggle {
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  color: var(--neo-text);
  cursor: pointer;
  display: none;
  font: 600 0.82rem / 1 "Space Grotesk", sans-serif;
  gap: 8px;
  padding: 9px 11px;
}

.site-nav__toggle-icon {
  font-size: 1rem;
  line-height: 1;
}

.site-nav__menu a {
  transition: color 0.18s ease, background 0.18s ease;
}

.site-nav__menu a:hover {
  color: var(--neo-text) !important;
}

/* The cards intentionally remain static until the association has approved
   detailed content for the three activity paths. */
.activity-card--pending {
  background: var(--neo-card) !important;
  cursor: default;
}

.activity-card--pending:hover {
  background: var(--neo-card) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  transform: none !important;
}

.activity-card__status {
  color: var(--neo-muted) !important;
  display: inline-block;
  font: 600 0.74rem / 1 "JetBrains Mono", monospace;
  letter-spacing: 0.05em;
  margin-top: 18px;
  text-transform: uppercase;
}

#eveil,
#soutien,
#formations {
  scroll-margin-top: 88px;
}

.partner-mark {
  align-items: center;
  background:
    radial-gradient(circle at 75% 20%, rgba(255, 225, 77, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(124, 92, 255, 0.2), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  height: 220px;
  justify-content: center;
  padding: 24px;
  text-align: center;
  width: 100%;
}

.partner-mark__initials {
  color: #ffe14d;
  font: 700 clamp(2rem, 6vw, 3.5rem) / 1 "Space Grotesk", sans-serif;
  letter-spacing: -0.04em;
}

.partner-mark__name {
  color: #d8d6e2;
  font: 600 1rem / 1.3 "Space Grotesk", sans-serif;
  margin-top: 12px;
}

@media (max-width: 1100px) {
  nav:not(.site-nav) > div {
    align-items: flex-start !important;
    flex-direction: column !important;
    gap: 14px !important;
  }

  nav:not(.site-nav) > div > div:last-child {
    justify-content: flex-start !important;
    width: 100% !important;
  }

  [style*="grid-template-columns"][style*="repeat(5"],
  [style*="grid-template-columns"][style*="repeat(4"],
  [style*="grid-template-columns"][style*="repeat(3"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  [style*="grid-template-columns"][style*="1.6fr"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 920px) {
  .site-nav > div {
    align-items: center !important;
    flex-direction: row !important;
    gap: 12px !important;
    position: relative;
  }

  .site-nav__toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .site-nav__menu {
    background: rgba(35, 52, 66, 0.98) !important;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    box-shadow: 0 18px 36px rgba(9, 17, 24, 0.3);
    display: none !important;
    flex-direction: column !important;
    gap: 4px !important;
    left: 5vw;
    padding: 10px;
    position: absolute;
    right: 5vw;
    top: calc(100% - 4px);
    width: auto !important;
  }

  .site-nav.is-menu-open .site-nav__menu {
    display: flex !important;
  }

  .site-nav__menu a {
    border-radius: 9px;
    padding: 10px 12px !important;
    width: 100%;
  }

  .site-nav__menu a:last-child {
    margin-top: 4px;
    text-align: center;
  }
}

@media (max-width: 820px) {
  [style*="grid-template-columns"][style*="1fr 1fr"],
  [style*="grid-template-columns"][style*="1.05fr"],
  [style*="grid-template-columns"][style*="1.3fr"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  header {
    padding: 56px 5vw 48px !important;
  }

  h1 {
    font-size: clamp(2rem, 9vw, 3rem) !important;
    line-height: 1.08 !important;
  }

  h2 {
    font-size: clamp(1.65rem, 7vw, 2.35rem) !important;
  }

  image-slot[style*="height: 440px"],
  image-slot[style*="height: 400px"] {
    height: clamp(240px, 72vw, 360px) !important;
  }
}

@media (max-width: 600px) {
  nav:not(.site-nav) {
    /* A multi-row navigation bar should not cover most of a phone viewport. */
    position: static !important;
  }

  nav:not(.site-nav) > div {
    padding: 14px 5vw !important;
  }

  nav:not(.site-nav) > div > div:last-child {
    gap: 8px 12px !important;
  }

  nav .navlink {
    font-size: 13px !important;
  }

  [style*="grid-template-columns"][style*="repeat(5"],
  [style*="grid-template-columns"][style*="repeat(4"],
  [style*="grid-template-columns"][style*="repeat(3"],
  [style*="grid-template-columns"][style*="1.6fr"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  [style*="grid-column"][style*="span 2"] {
    grid-column: auto !important;
  }

  [style*="grid-row"][style*="span 2"] {
    grid-row: auto !important;
  }

  [style*="border-left"] {
    border-left: 0 !important;
  }

  footer {
    padding: 56px 5vw 32px !important;
  }

  .partner-mark {
    height: 180px;
  }

  .site-nav > div {
    min-height: 58px;
    padding: 10px 5vw !important;
  }

  .site-nav > div > a > span {
    font-size: 17px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
