/* ==========================================================================
   Linktree — thème « Daily Grind »
   Nuit profonde · trajets · accents feux / autoroute
   ========================================================================== */

/* ---------- Variables (modifie ici pour tout relooker) ---------- */
:root {
  /* Fonds — anthracite / bleu nuit */
  --bg-deep: #07090f;
  --bg-mid: #0e121c;
  --bg-surface: rgba(22, 28, 40, 0.72);

  /* Accents — orange feux / bande d’arrêt d’urgence */
  --accent: #e85d04;
  --accent-soft: rgba(232, 93, 4, 0.35);
  --accent-glow: rgba(232, 93, 4, 0.18);

  /* Texte */
  --text: #ebe6df;
  --text-muted: #9a948a;

  /* Contours */
  --border: rgba(235, 230, 223, 0.12);
  --border-hover: rgba(232, 93, 4, 0.55);

  /* Typo */
  --font-display: "Syne", sans-serif;
  --font-body: "DM Sans", sans-serif;

  /* Layout */
  --max-width: 420px;
  --radius-avatar: 50%;
  --radius-link: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset léger ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  font-family: var(--font-body);
  font-optical-sizing: auto;
  color: var(--text);
  background: var(--bg-deep);
  line-height: 1.5;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------- Atmosphère (fond vivant, pas plat) ---------- */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% -10%, #1a2235 0%, transparent 55%),
    linear-gradient(180deg, var(--bg-mid) 0%, var(--bg-deep) 55%, #050608 100%);
}

/* Halo type phares / lever de soleil sur le bitume */
.atmosphere__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
  will-change: transform, opacity;
}

.atmosphere__glow--amber {
  width: min(70vw, 420px);
  height: min(40vw, 240px);
  left: 50%;
  bottom: 8%;
  transform: translateX(-50%);
  background: var(--accent-glow);
  animation: pulse-amber 8s var(--ease) infinite alternate;
}

.atmosphere__glow--cold {
  width: min(90vw, 560px);
  height: min(50vw, 320px);
  top: -8%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(70, 100, 150, 0.14);
  animation: drift-cold 12s var(--ease) infinite alternate;
}

/* Lignes de voie subtiles — suggestion d’autoroute */
.atmosphere__road {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent calc(50% - 1px),
      rgba(235, 230, 223, 0.035) calc(50% - 1px),
      rgba(235, 230, 223, 0.035) calc(50% + 1px),
      transparent calc(50% + 1px),
      transparent 100%
    ),
    linear-gradient(
      180deg,
      transparent 0%,
      rgba(235, 230, 223, 0.02) 40%,
      rgba(232, 93, 4, 0.04) 100%
    );
  mask-image: linear-gradient(180deg, transparent, #000 60%);
  opacity: 0.7;
}

@keyframes pulse-amber {
  from {
    opacity: 0.55;
    transform: translateX(-50%) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) scale(1.08);
  }
}

@keyframes drift-cold {
  from {
    opacity: 0.7;
    transform: translateX(-52%) translateY(0);
  }
  to {
    opacity: 1;
    transform: translateX(-48%) translateY(12px);
  }
}

/* ---------- Page ---------- */
.page {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, var(--max-width));
  margin: 0 auto;
  padding: clamp(2.5rem, 8vh, 4.5rem) 0 clamp(2rem, 5vh, 3rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
}

/* ---------- Profil ---------- */
.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.85rem;
  animation: rise-in 0.7s var(--ease) both;
}

.profile__avatar-wrap {
  position: relative;
  margin-bottom: 0.35rem;
}

.profile__avatar {
  width: 112px;
  height: 112px;
  border-radius: var(--radius-avatar);
  object-fit: cover;
  border: 2px solid var(--border);
  box-shadow: 0 0 0 4px rgba(7, 9, 15, 0.5);
  background: var(--bg-surface);
}

.profile__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.65rem, 5vw, 1.9rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.profile__bio {
  max-width: 34ch;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ---------- Sections de liens ---------- */
.sections {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.65rem;
}

.link-section {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  animation: rise-in 0.65s var(--ease) both;
}

.link-section:nth-child(1) { animation-delay: 0.08s; }
.link-section:nth-child(2) { animation-delay: 0.16s; }
.link-section:nth-child(3) { animation-delay: 0.24s; }

.link-section__title {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-left: 0.15rem;
}

/* Trait subtil sous le titre (ambiance bitume / marquage) */
.link-section__title::after {
  content: "";
  display: block;
  width: 2rem;
  height: 2px;
  margin-top: 0.45rem;
  background: var(--accent);
  opacity: 0.55;
  border-radius: 1px;
}

/* ---------- Liens ---------- */
.links {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.85rem;
  position: relative;
  width: 100%;
  min-height: 3.6rem;
  padding: 0.85rem 1.1rem;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-link);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition:
    transform 0.28s var(--ease),
    border-color 0.28s var(--ease),
    background 0.28s var(--ease),
    color 0.28s var(--ease);
}

.link__icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  color: var(--accent);
  background: rgba(232, 93, 4, 0.1);
  transition:
    color 0.28s var(--ease),
    background 0.28s var(--ease);
}

.link__text {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
  flex: 1;
}

.link__label {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.3;
  text-align: left;
}

.link__meta {
  font-size: 0.72rem;
  font-weight: 450;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* Hover / focus — agrandissement léger + accent autoroute */
.link:hover,
.link:focus-visible {
  transform: scale(1.03);
  border-color: var(--border-hover);
  background: rgba(28, 34, 48, 0.9);
  outline: none;
}

.link:hover .link__icon,
.link:focus-visible .link__icon {
  color: #ff7a2e;
  background: rgba(232, 93, 4, 0.18);
}

.link:active {
  transform: scale(0.985);
}

/* ---------- Footer ---------- */
.footer {
  margin-top: 0.5rem;
  animation: rise-in 0.7s var(--ease) 0.5s both;
}

.footer__tag {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(154, 148, 138, 0.65);
}

/* ---------- Motion d’entrée ---------- */
@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Accessibilité : réduire les animations ---------- */
@media (prefers-reduced-motion: reduce) {
  .atmosphere__glow,
  .profile,
  .link-section,
  .footer {
    animation: none !important;
  }

  .link:hover,
  .link:focus-visible,
  .link:active {
    transform: none;
  }
}

/* ---------- Mobile (déjà fluide ; affinage petit écran) ---------- */
@media (max-width: 380px) {
  .page {
    width: min(100% - 1.5rem, var(--max-width));
    gap: 1.5rem;
  }

  .profile__avatar {
    width: 96px;
    height: 96px;
  }

  .link {
    min-height: 3.15rem;
    font-size: 0.9rem;
  }
}
