:root {
  --bg-primary: #061929;
  --bg-secondary: #0a1e2e;
  --bg-card: rgba(12, 35, 55, 0.72);
  --bg-card-hover: rgba(16, 47, 72, 0.9);
  --text-primary: #f0f2f2;
  --text-secondary: #8a9dad;
  --accent: #df6637;
  --brand-green: #00b773;
  --brand-green-light: #00d68f;
  --border: rgba(0, 183, 115, 0.2);
  --border-strong: rgba(0, 183, 115, 0.42);
  --focus: #00d68f;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.32);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --font-main: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: var(--font-main);
  color: var(--text-primary);
  background:
    radial-gradient(circle at 50% 8%, rgba(0, 183, 115, 0.17) 0, transparent 34rem),
    radial-gradient(circle at 90% 86%, rgba(223, 102, 55, 0.12) 0, transparent 28rem),
    var(--bg-primary);
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.22));
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(6, 25, 41, 0.12), rgba(6, 25, 41, 0.78));
  pointer-events: none;
}

a {
  color: inherit;
}

.page {
  width: min(100%, 620px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px 18px 42px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}

.shell {
  position: relative;
  width: 100%;
  padding: 26px 18px 22px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(10, 30, 46, 0.84), rgba(7, 22, 36, 0.7)),
    rgba(10, 30, 46, 0.72);
  border: 1px solid rgba(0, 183, 115, 0.24);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.shell::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 183, 115, 0.7), rgba(7, 22, 36, 0.7), transparent);
  pointer-events: none;
}

.profile {
  position: relative;
  text-align: center;
  margin-bottom: 24px;
}

.logo-wrap {
  margin: 0 auto 16px;
}

.logo-img {
  display: block;
  max-height: 72px;
  width: auto;
  max-width: 280px;
}

.description {
  width: min(100%, 440px);
  margin: 14px auto 0;
  color: var(--text-secondary);
  font-size: 0.94rem;
}

.links {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

.link-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  min-height: 64px;
  padding: 14px 15px;
  color: var(--text-primary);
  text-decoration: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.link-card:hover {
  transform: translateY(-2px);
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
}

.link-card:focus-visible,
.social-link:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.link-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(0, 183, 115, 0.12);
  border: 1px solid rgba(0, 183, 115, 0.22);
  color: var(--brand-green-light);
  flex: 0 0 auto;
}

.link-icon svg,
.arrow svg {
  width: 20px;
  height: 20px;
  display: block;
}

.link-content {
  min-width: 0;
}

.link-title {
  display: block;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.link-subtitle {
  display: block;
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 0.78rem;
}

.arrow {
  color: rgba(240, 242, 242, 0.55);
  transition: transform 180ms ease, color 180ms ease;
}

.link-card:hover .arrow {
  transform: translateX(3px);
  color: var(--brand-green-light);
}

.social-section {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 15px;
  color: var(--brand-green);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.section-label::before,
.section-label::after {
  content: "";
  height: 1px;
  flex: 1;
  background: rgba(0, 183, 115, 0.18);
}

.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.social-link {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: var(--text-primary);
  text-decoration: none;
  background: rgba(12, 35, 55, 0.62);
  border: 1px solid rgba(0, 183, 115, 0.18);
  border-radius: 16px;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease;
}

.social-link:hover {
  transform: translateY(-2px);
  color: var(--brand-green-light);
  background: rgba(0, 183, 115, 0.1);
  border-color: rgba(0, 183, 115, 0.42);
}

.social-link svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.footer {
  margin-top: 24px;
  text-align: center;
  color: rgba(138, 157, 173, 0.7);
  font-size: 0.76rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 520px) {
  .page {
    padding: 48px 24px;
  }

  .shell {
    padding: 34px 34px 28px;
  }

  .links {
    gap: 14px;
  }

  .link-card {
    min-height: 72px;
    padding: 16px 18px;
  }

  .link-icon {
    width: 42px;
    height: 42px;
  }
}

.link-card--has-preview {
  overflow: hidden;
}

.link-preview {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 48%;
  pointer-events: none;
  mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.5) 40%, rgba(0, 0, 0, 0.82) 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.5) 40%, rgba(0, 0, 0, 0.82) 100%);
}

.link-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
  opacity: 0.3;
  transition: opacity 180ms ease;
}

.link-card--has-preview:hover .link-preview-img {
  opacity: 0.48;
}

@media (min-width: 768px) {
  .page {
    width: min(100%, 1060px);
  }

  .profile {
    display: flex;
    align-items: center;
    gap: 24px;
    text-align: left;
    margin-bottom: 14px;
  }

  .logo-wrap {
    flex: 0 0 auto;
    margin: 0;
  }

  .description {
    margin: 0;
    width: auto;
    max-width: none;
    font-size: 0.9rem;
  }

  .links {
    grid-template-columns: repeat(3, 1fr);
    margin-top: 16px;
  }

  .social-section {
    margin-top: 18px;
    padding-top: 16px;
  }

  .link-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    min-height: 130px;
    padding: 18px 18px 16px;
  }

  .arrow {
    margin-top: auto;
    align-self: flex-end;
  }

  .link-preview {
    top: auto;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 55%;
    mask-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.75));
    -webkit-mask-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.75));
  }

  .link-preview-img {
    object-position: center top;
  }
}

/* ─── Spotlight ─────────────────────────────────────── */

.spotlight {
  width: 100%;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(145deg, rgba(10, 30, 46, 0.84), rgba(7, 22, 36, 0.7)),
    rgba(10, 30, 46, 0.72);
  border: 1px solid rgba(0, 183, 115, 0.24);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.spotlight::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 1;
  background: linear-gradient(90deg, transparent, rgba(0, 183, 115, 0.7), rgba(7, 22, 36, 0.7), transparent);
  pointer-events: none;
}

.spotlight-hero {
  position: relative;
  height: 190px;
  overflow: hidden;
}

.spotlight-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.spotlight-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(6, 25, 41, 0.15) 0%, rgba(6, 25, 41, 0.88) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px 20px;
}

.spotlight-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 3px 10px;
  margin-bottom: 8px;
  border-radius: 999px;
  background: rgba(223, 102, 55);
  border: 1px solid rgba(223, 102, 55, 0.4);
  color: var(--text-primary);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.spotlight-title {
  margin: 0 0 4px;
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.spotlight-title strong {
  color: var(--brand-green-light);
}

.spotlight-sub {
  margin: 0;
  font-size: 0.72rem;
  color: rgba(240, 242, 242, 0.65);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.spotlight-body {
  flex: 1;
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Countdown */
.spotlight-countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(0, 183, 115, 0.14);
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.countdown-num {
  font-size: 1.9rem;
  font-weight: 900;
  color: var(--brand-green-light);
  letter-spacing: -0.05em;
  line-height: 1;
}

.countdown-label {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.countdown-sep {
  font-size: 1.5rem;
  font-weight: 900;
  color: rgba(0, 183, 115, 0.4);
  align-self: flex-start;
  margin-top: 4px;
}

/* Stats */
.spotlight-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(0, 183, 115, 0.14);
}

.spotlight-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px;
  border-radius: var(--radius-sm);
  background: rgba(0, 183, 115, 0.05);
  border: 1px solid rgba(0, 183, 115, 0.1);
}

.stat-value {
  font-size: 0.84rem;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.6rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Pills */
.spotlight-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.spotlight-pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 183, 115, 0.09);
  border: 1px solid rgba(0, 183, 115, 0.24);
  color: var(--brand-green-light);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* Deposit */
.spotlight-deposit {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.spotlight-deposit strong {
  color: var(--text-primary);
}

/* CTAs */
.spotlight-ctas {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.spotlight-btn {
  display: block;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.spotlight-btn:hover {
  transform: translateY(-2px);
}

.spotlight-btn--primary {
  background: var(--brand-green);
  color: var(--text-primary);
  box-shadow: 0 8px 24px rgba(0, 183, 115, 0.28);
}

.spotlight-btn--primary:hover {
  box-shadow: 0 12px 32px rgba(0, 183, 115, 0.42);
}

.spotlight-btn--secondary {
  background: transparent;
  border: 1px solid rgba(0, 183, 115, 0.32);
  color: var(--brand-green-light);
}

.spotlight-btn--secondary:hover {
  border-color: rgba(0, 183, 115, 0.55);
  background: rgba(0, 183, 115, 0.07);
}

/* ─── Mobile & Tablette (< 1024px) ──────────────────── */

@media (max-width: 767px) {
  /* Profile : logo + description empilés et centrés */
  .profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    margin-bottom: 20px;
  }

  .logo-wrap {
    margin: 0;
  }

  .description {
    margin: 0;
    font-size: 0.88rem;
    width: min(100%, 440px);
  }

  /* Cards : layout horizontal pleine largeur sur mobile */
  .links {
    gap: 10px;
    margin-top: 20px;
  }

  .link-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    align-items: center;
    min-height: 64px;
    padding: 14px 15px;
  }

  .arrow {
    margin-top: 0;
    align-self: auto;
  }

  /* Masquer les previews sur mobile (peu lisibles sur cards horizontales) */
  .link-preview {
    display: none;
  }

  /* Spotlight : compact pour mobile */
  .spotlight-hero {
    height: 160px;
  }

  .spotlight-body {
    gap: 12px;
    padding: 14px 16px 16px;
  }

  .countdown-num {
    font-size: 1.6rem;
  }

  .spotlight-stats {
    gap: 6px;
  }

  .stat-value {
    font-size: 0.8rem;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  /* Tablette : shell + spotlight empilés, full width */
  .page {
    align-items: stretch;
    gap: 20px;
  }

  /* Profile : côte à côte sur tablette */
  .profile {
    display: flex;
    align-items: center;
    gap: 20px;
    text-align: left;
    margin-bottom: 14px;
  }

  .logo-wrap {
    margin: 0;
  }

  .description {
    margin: 0;
    width: auto;
    max-width: none;
  }
}

/* ─── Layout desktop : shell + spotlight côte à côte ── */

@media (min-width: 1024px) {
  body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .page {
    width: min(100%, 1240px);
    flex-direction: row;
    align-items: stretch;
    gap: 20px;
    min-height: auto;
    padding: 40px 24px;
  }

  .shell {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
  }

  .social-section {
    margin-top: auto !important;
  }

  .spotlight {
    flex: 0 0 360px;
    width: 360px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
