/* ============================================================
   LE TRAK-EUR — style.css
   Feuille de style PARTAGÉE par toutes les pages du site.
   Ne pas dupliquer : on la lie depuis chaque page avec
   <link rel="stylesheet" href="style.css">
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@600;700;800&family=Rajdhani:wght@500;600;700&family=Share+Tech+Mono&display=swap');

:root{
  --bg-0:#06070d;
  --bg-1:#0b0d1a;
  --bg-2:#12142a;
  --panel: rgba(15,17,32,0.82);
  --line: rgba(255,255,255,0.09);
  --text:#e8eaf6;
  --text-dim:#8890b8;

  --accent:#3fe7c8;      /* couleur signature de l'UI (radar/scan) */
  --stellar:#ffc93c;     /* jaune */
  --mythique:#ff4356;    /* rouge */
  --galactique:#a56bff;  /* violet */

  /* paliers de rareté des droïdes (Droidex + Parfait) */
  --tier-commun:     #8CFFA6;
  --tier-rare:       #7FD7FF;
  --tier-epic:       #D66BFF;
  --tier-legendaire: #FFA53C;
  --tier-mythique:   #FF4D8D;
  --tier-iconic:     #FFF48A;

  /* couleurs des 7 variantes cosmétiques (Droidex + Rebirth) */
  --v-defaut:    #e9ecf5;
  --v-or:        #f3c14b;
  --v-diamant:   #7fd7ff;
  --v-rainbow:   #ff6bd6; /* couleur de repli, rendu réel animé sur le Droidex */
  --v-beskar:    #b9c0c9;
  --v-galactic:  #a56bff;
  --v-stellar:   #ff9a3c;

  --header-h: 88px;
  --subnav-h: 46px;
  --credit-h: 60px;
  --font-display: 'Orbitron', sans-serif;
  --font-ui: 'Rajdhani', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
}

*{ box-sizing:border-box; }

html,body{
  margin:0; padding:0;
  min-height:100%;
  background:var(--bg-0);
  color:var(--text);
  font-family:var(--font-ui);
}

/* --- fond étoilé + nébuleuse, fixe sur toute la page --- */
body{
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,.9) 0, transparent 60%),
    radial-gradient(1px 1px at 65% 12%, rgba(255,255,255,.7) 0, transparent 60%),
    radial-gradient(1.5px 1.5px at 82% 55%, rgba(255,255,255,.8) 0, transparent 60%),
    radial-gradient(1px 1px at 35% 80%, rgba(255,255,255,.6) 0, transparent 60%),
    radial-gradient(1px 1px at 92% 85%, rgba(255,255,255,.7) 0, transparent 60%),
    radial-gradient(1.5px 1.5px at 8% 65%, rgba(255,255,255,.6) 0, transparent 60%),
    radial-gradient(1px 1px at 50% 45%, rgba(255,255,255,.5) 0, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 0%, rgba(165,107,255,.16), transparent 60%),
    radial-gradient(ellipse 50% 40% at 10% 100%, rgba(63,231,200,.12), transparent 60%),
    linear-gradient(180deg, var(--bg-1), var(--bg-0) 60%);
  background-repeat:no-repeat;
  background-attachment: fixed, fixed, fixed, fixed, fixed, fixed, fixed, fixed, fixed, fixed;
  background-size: cover;
}

a{ color:inherit; text-decoration:none; }

/* ============================================================
   HUD — en-tête fixe avec les 3 minuteurs
   ============================================================ */
.hud{
  position:fixed; top:0; left:0; right:0;
  height:var(--header-h);
  z-index:100;
  background:var(--panel);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
}
.hud-inner{
  max-width:1100px; margin:0 auto; height:100%;
  display:flex; align-items:center; justify-content:space-between;
  gap:24px; padding:0 24px;
}
.hud-logo{
  font-family:var(--font-display);
  font-size:1.05rem; font-weight:800; letter-spacing:.08em;
  color:var(--text); white-space:nowrap; flex-shrink:0;
}
.hud-logo span{ color:var(--accent); }

.timers{
  display:flex; gap:14px; flex-wrap:wrap; justify-content:flex-end;
}
.timer{
  --tc: var(--accent);
  position:relative;
  display:flex; align-items:center; gap:9px;
  padding:8px 14px;
  background:rgba(255,255,255,0.03);
  border:1px solid var(--line);
  min-width:132px;
}
/* petits crochets d'angle — motif signature du site */
.timer::before, .timer::after,
.brk::before, .brk::after{
  content:''; position:absolute; width:8px; height:8px;
  border:1px solid var(--tc); opacity:.9;
}
.timer::before{ top:-1px; left:-1px; border-right:none; border-bottom:none; }
.timer::after{ bottom:-1px; right:-1px; border-left:none; border-top:none; }

.timer[data-timer="stellar"]{ --tc: var(--stellar); }
.timer[data-timer="mythique"]{ --tc: var(--mythique); }
.timer[data-timer="galactique"]{ --tc: var(--galactique); }

.timer-dot{
  width:8px; height:8px; border-radius:50%;
  background:var(--tc);
  box-shadow:0 0 8px var(--tc), 0 0 2px var(--tc);
  flex-shrink:0;
}
.timer.urgent .timer-dot{ animation: pulse .5s ease-in-out infinite; }
@keyframes pulse{ 0%,100%{ opacity:1; transform:scale(1);} 50%{ opacity:.35; transform:scale(1.3);} }

.timer-text{ display:flex; flex-direction:column; line-height:1.1; }
.timer-label{
  font-size:.62rem; font-weight:700; letter-spacing:.12em;
  color:var(--tc);
  text-transform:uppercase;
}
.timer-value{
  font-family:var(--font-mono);
  font-size:1rem; color:var(--text);
  letter-spacing:.03em;
}
.timer.urgent .timer-value{ color:var(--tc); }

/* ============================================================
   SUBNAV — bandeau de navigation entre pages, sous le header,
   présent et identique sur toutes les pages
   ============================================================ */
.subnav{
  position:fixed; top:var(--header-h); left:0; right:0;
  height:var(--subnav-h);
  z-index:99;
  background:rgba(8,9,17,.88);
  backdrop-filter: blur(8px);
  border-bottom:1px solid var(--line);
  overflow-x:auto;
}
.subnav-inner{
  max-width:1100px; margin:0 auto; height:100%;
  display:flex; align-items:center; gap:2px;
  padding:0 24px;
}
.subnav-link{
  font-family:var(--font-ui); font-weight:600; font-size:.82rem;
  letter-spacing:.06em; text-transform:uppercase;
  color:var(--text-dim);
  white-space:nowrap;
  padding:6px 14px;
  border-bottom:2px solid transparent;
  display:flex; align-items:center; gap:6px;
  transition: color .15s ease, border-color .15s ease;
}
.subnav-icon{
  width:18px; height:18px;
  object-fit:contain;
  opacity:.75;
  transition: opacity .15s ease;
}
.subnav-link:hover .subnav-icon,
.subnav-link.active .subnav-icon{ opacity:1; }
.subnav-link:hover{ color:var(--text); }
.subnav-link.active{ color:var(--accent); border-color:var(--accent); }

/* espace pour ne pas passer sous le header + subnav fixes */
main{ padding-top:calc(var(--header-h) + var(--subnav-h)); }

/* page d'accueil : tout tient dans un seul écran, pas de scroll nécessaire */
.home-main{
  height:calc(100vh - var(--header-h) - var(--subnav-h) - var(--credit-h));
  display:flex; flex-direction:column;
  overflow:hidden;
}

@media (max-width:700px){
  :root{ --header-h:128px; }
  .hud-inner{ flex-wrap:wrap; padding:10px 16px; row-gap:8px; }
  .timers{ width:100%; justify-content:space-between; }
  .timer{ min-width:0; flex:1; padding:6px 8px; }
  .subnav-inner{ padding:0 16px; }
}

/* ============================================================
   HERO — page d'accueil
   ============================================================ */
.hero{
  flex:1;
  min-height:0;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  text-align:center; padding:28px 24px 20px;
  position:relative; overflow:hidden;
}

/* radar qui balaie derrière le titre — élément signature de la page d'accueil */
.radar{
  position:absolute; top:50%; left:50%;
  width:min(720px, 90vw, 78vh); height:min(720px, 90vw, 78vh);
  transform:translate(-50%,-50%);
  border-radius:50%;
  pointer-events:none;
  z-index:0;
}
.radar::before{
  content:'';
  position:absolute; inset:0; border-radius:50%;
  background: conic-gradient(from 0deg, rgba(63,231,200,.22), transparent 28%);
  animation: spin 9s linear infinite;
  filter: blur(1px);
}
.radar-ring{
  position:absolute; border:1px solid rgba(63,231,200,.16); border-radius:50%;
}
.radar-ring.r1{ inset:14%; }
.radar-ring.r2{ inset:32%; }
.radar-ring.r3{ inset:48%; }
@keyframes spin{ to{ transform:rotate(360deg); } }

.hero-content{ position:relative; z-index:1; }

.title{
  font-family:var(--font-display);
  font-weight:800;
  font-size:clamp(2rem, 6vw, 4rem);
  letter-spacing:.03em;
  margin:0;
  color:var(--text);
  text-shadow: 0 0 30px rgba(63,231,200,.35);
}
.subtitle{
  margin:8px 0 0;
  font-family:var(--font-ui);
  font-weight:600;
  font-size:1rem;
  letter-spacing:.35em;
  text-transform:uppercase;
  color:var(--text-dim);
}
.subtitle span{ color:var(--accent); }

.nav-buttons{
  margin-top:36px;
  display:flex; flex-wrap:wrap; gap:18px; justify-content:center;
}
.nav-btn{
  position:relative;
  font-family:var(--font-ui);
  font-weight:700; font-size:1.05rem; letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--text);
  padding:18px 34px;
  background:rgba(255,255,255,0.03);
  border:1px solid var(--line);
  display:flex; align-items:center; gap:12px;
  transition: border-color .2s ease, color .2s ease, background .2s ease, transform .2s ease;
}
.nav-btn-icon{
  width:26px; height:26px;
  object-fit:contain;
  opacity:.85;
  transition: opacity .2s ease;
}
.nav-btn:hover .nav-btn-icon{ opacity:1; }
.nav-btn::before, .nav-btn::after{
  content:''; position:absolute; width:10px; height:10px;
  border:1px solid var(--accent); opacity:0; transition:opacity .2s ease;
}
.nav-btn::before{ top:-1px; left:-1px; border-right:none; border-bottom:none; }
.nav-btn::after{ bottom:-1px; right:-1px; border-left:none; border-top:none; }
.nav-btn:hover, .nav-btn:focus-visible{
  color:var(--accent);
  border-color: rgba(63,231,200,.5);
  background: rgba(63,231,200,.06);
  transform: translateY(-2px);
  outline:none;
}
.nav-btn:hover::before, .nav-btn:hover::after,
.nav-btn:focus-visible::before, .nav-btn:focus-visible::after{ opacity:1; }

/* ============================================================
   Bandeau de crédit (page d'accueil)
   ============================================================ */
.credit-banner{
  position:fixed; bottom:0; left:0; right:0; z-index:50;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:4px;
  text-align:center;
  background:#20232f;
  border-top:1px solid rgba(255,255,255,0.09);
  padding:10px 24px;
}
.credit-line{
  margin:0;
  font-family:var(--font-ui); font-size:.74rem;
  color:#c7cbdb;
  line-height:1.4;
}
.credit-line:first-child{ color:#dfe2ee; font-weight:600; }
.credit-banner a{
  color:var(--accent);
  border-bottom:1px solid rgba(63,231,200,.35);
}
.credit-banner a:hover{ border-color:var(--accent); }
.page-body{
  max-width:900px; margin:0 auto; padding:64px 24px;
}
.page-title{
  font-family:var(--font-display); font-weight:700;
  font-size:2rem; letter-spacing:.04em; margin:0 0 8px;
  display:flex; align-items:center; gap:14px;
}
.page-title-icon{
  width:38px; height:38px;
  object-fit:contain;
}
.page-status{
  color:var(--text-dim); font-size:1rem;
}
.back-link{
  display:inline-block; margin-top:28px;
  color:var(--accent); font-weight:600; letter-spacing:.04em;
  border-bottom:1px solid rgba(63,231,200,.4);
}

/* ============================================================
   Barre d'outils recherche + filtre (Droidex, Parfait, ...)
   ============================================================ */
.toolbar{
  display:flex; flex-wrap:wrap; gap:12px;
  margin-bottom:26px;
}
.search-input{
  flex:1 1 220px;
  font-family:var(--font-ui); font-size:.95rem;
  color:var(--text);
  background:rgba(255,255,255,0.03);
  border:1px solid var(--line);
  border-radius:8px;
  padding:11px 14px;
  outline:none;
  transition: border-color .15s ease;
}
.search-input::placeholder{ color:var(--text-dim); }
.search-input:focus{ border-color: var(--accent); }

.filter-select{
  flex:0 0 auto;
  font-family:var(--font-ui); font-weight:600; font-size:.9rem;
  letter-spacing:.03em;
  color:var(--text);
  background:rgba(255,255,255,0.03);
  border:1px solid var(--line);
  border-radius:8px;
  padding:11px 14px;
  outline:none;
  cursor:pointer;
  transition: border-color .15s ease;
}
.filter-select:focus{ border-color: var(--accent); }
.filter-select option{ background:#12142a; color:var(--text); }
