/* =========================================================
   MickArmement — Linktree
   Palette : sombre / tactique (vert olive + orange sécurité)
   ========================================================= */

:root {
  --bg:          #0b0d10;
  --bg-2:        #12161b;
  --surface:     #171c22;
  --surface-2:   #1e242c;
  --border:      #2a323c;
  --text:        #f2f4f7;
  --muted:       #9aa4b2;
  --accent:      #ff6b2c;   /* orange sécurité */
  --accent-2:    #7c9a3f;   /* vert olive */
  --radius:      16px;
  --shadow:      0 18px 40px -18px rgba(0, 0, 0, 0.85);
  --ease:        cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px 18px 40px;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1100px 620px at 50% -12%, #1b2430 0%, transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* ---------- Décor de fond ---------- */
.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.032) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(900px 600px at 50% 0%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(900px 600px at 50% 0%, #000 0%, transparent 78%);
}

.bg-glow {
  position: fixed;
  top: -220px;
  left: 50%;
  width: 620px;
  height: 620px;
  transform: translateX(-50%);
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 107, 44, 0.18), transparent 62%);
  filter: blur(24px);
  animation: float 12s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(22px); }
}

/* ---------- Carte principale ---------- */
.card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  padding: 32px 22px 20px;
  background: linear-gradient(180deg, rgba(30, 36, 44, 0.72), rgba(17, 21, 26, 0.72));
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: rise 0.6s var(--ease) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Profil ---------- */
.profile {
  text-align: center;
  margin-bottom: 24px;
}

.avatar {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  font-family: "Oswald", sans-serif;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 0 0 4px rgba(255, 107, 44, 0.14), 0 14px 30px -12px rgba(255, 107, 44, 0.8);
}

.avatar-ring {
  position: absolute;
  inset: -8px;
  border: 2px dashed rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  animation: spin 26s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.name {
  margin: 0;
  font-family: "Oswald", sans-serif;
  font-size: 1.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.tagline {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.badge {
  display: inline-block;
  margin-top: 12px;
  padding: 5px 12px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(255, 107, 44, 0.1);
  border: 1px solid rgba(255, 107, 44, 0.28);
  border-radius: 999px;
}

/* ---------- Liens ---------- */
.links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.link {
  --brand: var(--accent);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.22s var(--ease), border-color 0.22s var(--ease),
              background 0.22s var(--ease), box-shadow 0.22s var(--ease);
  opacity: 0;
  animation: fadeIn 0.5s var(--ease) forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.link:hover,
.link:focus-visible {
  transform: translateY(-3px);
  background: var(--surface-2);
  border-color: color-mix(in srgb, var(--brand) 60%, transparent);
  box-shadow: 0 14px 26px -16px var(--brand);
  outline: none;
}

.link:active { transform: translateY(-1px) scale(0.995); }

.link-icon {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: color-mix(in srgb, var(--brand) 16%, transparent);
  color: var(--brand);
  transition: background 0.22s var(--ease), color 0.22s var(--ease);
}

.link-icon svg { width: 22px; height: 22px; }

.link:hover .link-icon {
  background: var(--brand);
  color: #0b0d10;
}

.link-text {
  flex: 1;
  min-width: 0;
}

.link-title {
  display: block;
  font-weight: 600;
  font-size: 0.98rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-sub {
  display: block;
  margin-top: 2px;
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-arrow {
  flex: 0 0 auto;
  color: var(--muted);
  transition: transform 0.22s var(--ease), color 0.22s var(--ease);
}

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

/* Couleurs de marque */
.link[data-brand="site"]     { --brand: #7c9a3f; }
.link[data-brand="youtube"]  { --brand: #ff0033; }
.link[data-brand="kick"]     { --brand: #53fc18; }
.link[data-brand="facebook"] { --brand: #1877f2; }
.link[data-brand="twitch"]   { --brand: #a970ff; }

/* ---------- Fallback / footer ---------- */
.fallback {
  margin: 16px 0 0;
  text-align: center;
  font-size: 0.9rem;
  line-height: 2;
  color: var(--muted);
}
.fallback a { color: var(--accent); text-decoration: none; }
.fallback a:hover { text-decoration: underline; }

.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
}

.share-btn:hover {
  color: var(--accent);
  border-color: rgba(255, 107, 44, 0.5);
  background: rgba(255, 107, 44, 0.08);
}

.copyright {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
  opacity: 0.75;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 24px);
  padding: 10px 18px;
  font-size: 0.85rem;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  z-index: 10;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Responsive / accessibilité ---------- */
@media (max-width: 380px) {
  .card { padding: 26px 14px 16px; border-radius: 20px; }
  .name { font-size: 1.5rem; }
  .link-title { font-size: 0.92rem; }
}

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