:root{
  --bg:#0b1220;
  --card:#0f172a;
  --text:#e5e7eb;
  --muted:#9ca3af;
  --border:#1f2937;
  --brand:#93c5fd;
}

/* Base */
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font:16px/1.5 system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,'Helvetica Neue',Arial,sans-serif;
}
a{color:var(--brand);text-decoration:none}
a:hover{text-decoration:underline}

/* Accessibilité focus */
:focus{outline:none}
:focus-visible{outline:2px solid rgba(147,197,253,.6); outline-offset:2px}

/* Layout */
.container{max-width:1100px; margin:0 auto; padding:24px}
.card{background:var(--card); border:1px solid var(--border); border-radius:12px}
.grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:16px}

/* -------- LOGO DES OUTILS - VERSION CERCLE -------- */
.tool-logo{
  width:50px;
  height:50px;
  border-radius:50%;      /* cercle parfait */
  object-fit:cover;       /* recadre proprement */
  display:block;
  margin-bottom:12px;
  box-shadow:0 6px 16px rgba(15,23,42,.45);
  background:#0f172a;     /* évite le blanc si PNG transparent */
}

/* NAV */
.site-nav{
  background:rgba(8,13,24,.7);
  border-bottom:1px solid var(--border);
  position:sticky; top:0; z-index:10;
}
.nav-inner{
  max-width:1100px; margin:0 auto; padding:12px 22px;
  display:flex; align-items:center; justify-content:space-between; gap:16px;
}
.brand{display:flex; align-items:center; gap:10px; color:var(--text)}
.brand img{height:28px; width:auto; transition:transform .3s ease}
.brand:hover img{transform:scale(1.05)}
.menu{display:flex; gap:16px; margin:0; padding:0; list-style:none}
.menu a{color:var(--text)}
.actions{display:flex; align-items:center; gap:10px}
.pill{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 12px; border-radius:999px;
  border:1px solid var(--border); background:var(--card);
  color:var(--text); font-weight:600;
}
.pill-primary{background:var(--brand); color:#05172b; border-color:#0b3d62}
.theme-btn{background:transparent; border:1px solid var(--border); border-radius:10px; padding:6px 10px; color:var(--text); cursor:pointer}

/* Boutons unifiés */
.btn{
  appearance:none; -webkit-appearance:none;
  display:inline-flex; align-items:center; justify-content:center;
  gap:6px;
  padding:10px 14px;
  border-radius:10px;
  border:1px solid transparent;
  background:#1f2a44;
  color:#e5e7eb;
  font-weight:600;
  text-decoration:none;
  cursor:pointer;
  transition:filter .15s ease, box-shadow .15s ease, transform .15s ease;
}
.btn:hover{ filter:brightness(1.08); transform:translateY(-1px) }
.btn:focus-visible{ box-shadow:0 0 0 3px rgba(147,197,253,.30) }
.btn-outline{ background:transparent; border:1px solid var(--border); color:#93c5fd }

/* Flash / tables */
.flash{padding:8px 12px;border-radius:6px;margin:8px 0;}
.flash.error{background:#2b0f13;border:1px solid #b43a4a;color:#ffd7dc}
.flash.ok{background:#0f2b13;border:1px solid #3ab45a;color:#d7ffdf}
table{border-collapse:collapse;width:100%;}
th,td{border:1px solid #263042;padding:8px;}
th{background:#0f172a;text-align:left;color:#cbd5e1}

/* Footer */
.site-footer{border-top:1px solid var(--border); margin-top:40px}
.footer-inner{max-width:1100px; margin:0 auto; padding:24px 22px; color:var(--muted)}
.footer-inner a{color:var(--brand)}

/* Hero */
.hero{
  position:relative;
  padding:24px;
  min-height:200px;
  background:linear-gradient(135deg,#0f172a 0%, #0b1220 40%, #0f172a 100%);
  color:#e5e7eb;
  border-radius:12px;
}
.hero-bg{position:absolute;inset:0;pointer-events:none;border-radius:12px;overflow:hidden;border:1px solid rgba(148,163,184,.15)}
.hero h1{margin:0 0 6px 0}
.hero-sub{color:#cbd5e1;margin:0 0 16px 0}

/* Hero search row */
.hero-search{
  display:flex;
  gap:8px;
  align-items:center;
  margin-top:8px;
}
.hero-search input[type="text"]{
  flex:1;
  background:#0b1220;
  border:1px solid var(--border);
  border-radius:10px;
  padding:10px;
  color:var(--text);
  outline:none;
  transition: box-shadow .15s ease;
}
.hero-search input[type="text"]:focus{ box-shadow:0 0 0 3px rgba(147,197,253,.30) }

/* Badges, chips, CTA */
.badge{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:6px 10px}
.badge-counter{background:rgba(147,197,253,.12);border:1px solid var(--border);color:#93c5fd}
.role-cta{display:flex;gap:12px;flex-wrap:wrap;margin-top:14px}
.pill:hover{filter:brightness(1.05)}
.pill-active{background:linear-gradient(180deg,#93c5fd1a,#60a5fa26)}
.pill-label{font-weight:700}
.pill-desc{font-size:12px;color:#cbd5e1}
.chips{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}
.chip{display:inline-block;padding:6px 10px;border:1px solid var(--border);border-radius:999px;text-decoration:none;color:#93c5fd;background:transparent}
.chip:hover{filter:brightness(1.1)}
.hero-meta{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin-top:14px}

/* Cards */
.card-tool{
  padding:14px;
  border:1px solid var(--border);
  border-radius:14px;
  background:rgba(2,6,23,.35);
  transition: box-shadow .2s ease, transform .2s ease;
}
.card-tool h3{margin:6px 0 4px 0}
.card-tool p{color:#cbd5e1;margin:0 0 8px 0}
.card:focus-within, .card-tool:focus-within, .card:hover, .card-tool:hover {
  box-shadow: 0 0 0 1px rgba(147,197,253,.25), 0 8px 24px rgba(2,6,23,.35);
  transform: translateY(-1px);
}

/* Skeleton */
.skel{
  position:relative;
  overflow:hidden;
  background:rgba(148,163,184,.08);
}
.skel::after{
  content:"";
  position:absolute;
  inset:0;
  transform:translateX(-100%);
  background:linear-gradient(90deg,transparent,rgba(148,163,184,.15),transparent);
  animation:sh 1.2s infinite;
}

/* ⚠️ ICI LA VERSION CORRIGÉE : FERMETURE PROPRE */
@keyframes sh{
  0%{transform:translateX(-100%)}
  100%{transform:translateX(100%)}
}

/* Top catégories */
.topcats{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:10px}
.topcat{display:flex;align-items:center;justify-content:space-between;padding:10px;border:1px solid var(--border);border-radius:12px;background:rgba(2,6,23,.35);text-decoration:none;color:#e5e7eb}
.topcat .count{font-size:12px;color:#93c5fd}

/* Responsive */
@media (max-width: 720px){
  .hero-search{flex-direction:column;align-items:stretch}
}

/* ===== HEADER LISTOOLAI ===== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(10, 10, 20, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.75rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-logo {
  border-radius: 12px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: #ffffff;
}

.brand-subtitle {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav a {
  font-size: 0.9rem;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.75);
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Bouton principal */

.btn.btn-primary,
.creator-btn {
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 600;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #ffffff !important;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35);
  white-space: nowrap;
}

.btn.btn-primary:hover,
.creator-btn:hover {
  background: linear-gradient(135deg, #6366f1, #818cf8);
  transform: translateY(-1px);
}

/* Theme toggle */

.theme-toggle {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1.1rem;
  margin-left: 0.25rem;
  padding: 0.3rem;
  border-radius: 999px;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Burger (mobile) */

.nav-toggle {
  display: none;
  border: none;
  background: transparent;
  font-size: 1.4rem;
  cursor: pointer;
  color: #ffffff;
}

/* Responsive header */

@media (max-width: 900px) {
  .header-inner {flex-wrap: wrap;}
  .nav-toggle {display: block;}
  .nav {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-top: 0.5rem;
    display: none;
  }
  .nav.nav-open {display:flex;}
}

@media (max-width: 600px) {
  .brand-subtitle {display:none;}
}


.hero-sponsored {
  background-color: #f0f4f8;
  padding: 20px;
  text-align: center;
  margin-bottom: 30px;
}

.badge-hero {
  background-color: #facc15;
  padding: 5px 10px;
  border-radius: 12px;
  font-weight: bold;
  color: #111;
}

.hero-sponsored h1 {
  font-size: 2.5rem;
  margin-top: 10px;
}

.hero-sponsored p {
  font-size: 1.2rem;
  color: #555;
}

.hero-sponsored a {
  margin-top: 15px;
  display: inline-block;
  font-weight: bold;
  color: #007bff;
  text-decoration: none;
}

.hero-sponsored a:hover {
  text-decoration: underline;
}
