:root{
  --bg:#0b0d12;
  --surface:#141821;
  --surface-2:#1b202b;
  --border:#262c3a;
  --text:#eef1f6;
  --muted:#9aa4b7;
  --accent:#5b7fff;
  --accent-hover:#7893ff;
  --accent-soft:rgba(91,127,255,.12);
  --success:#3ecf8e;
  --radius-lg:16px;
  --radius-md:10px;
  --radius-sm:6px;
  --shadow:0 10px 40px rgba(0,0,0,.35);
}

*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(91,127,255,.10), transparent),
    var(--bg);
  color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
}
.container{max-width:1120px;margin:0 auto;padding:0 24px;}
a{color:var(--accent);text-decoration:none;}
a:hover{color:var(--accent-hover);}
h1,h2{letter-spacing:-0.02em;}

/* ---------- Header ---------- */
.site-header{
  border-bottom:1px solid var(--border);
  padding:18px 0;
  position:sticky;
  top:0;
  background:rgba(11,13,18,.85);
  backdrop-filter:blur(10px);
  z-index:100;
}
.header-inner{display:flex;justify-content:space-between;align-items:center;}
.logo{
  font-weight:700;
  font-size:1.15rem;
  color:var(--text);
  display:flex;
  align-items:center;
  gap:2px;
}
.logo-mark{
  background:var(--accent);
  color:#fff;
  padding:3px 8px;
  border-radius:6px;
  font-size:.95rem;
  font-weight:800;
}
.site-header nav a{color:var(--muted);font-size:.9rem;font-weight:500;}
.site-header nav a:hover{color:var(--text);}

/* ---------- Hero ---------- */
.hero{padding:76px 0 48px;text-align:center;}
.hero-badge{
  display:inline-block;
  background:var(--accent-soft);
  color:var(--accent-hover);
  border:1px solid rgba(91,127,255,.3);
  padding:6px 14px;
  border-radius:999px;
  font-size:.78rem;
  font-weight:600;
  margin-bottom:20px;
}
.hero h1{
  font-size:clamp(1.9rem, 4vw, 2.75rem);
  margin:0 0 14px;
  font-weight:800;
}
.hero p{
  color:var(--muted);
  max-width:560px;
  margin:0 auto;
  font-size:1.02rem;
}

/* ---------- Tools grid ---------- */
.tools-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(280px, 1fr));
  gap:20px;
  padding:12px 24px 72px;
}
.tool-card{
  background:linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:24px;
  display:flex;
  flex-direction:column;
  gap:12px;
  transition:border-color .15s ease, transform .15s ease;
}
.tool-card:hover{border-color:#33394a;}
.tool-icon{
  width:44px;height:44px;
  display:flex;align-items:center;justify-content:center;
  background:var(--accent-soft);
  border-radius:var(--radius-md);
  font-size:1.3rem;
}
.tool-card h2{font-size:1.08rem;margin:0;font-weight:700;}
.tool-desc{color:var(--muted);font-size:.85rem;margin:0;line-height:1.5;}
.tool-page-link{
  font-size:.78rem;
  font-weight:600;
  color:var(--accent);
  margin-top:-6px;
}
.tool-page-link:hover{color:var(--accent-hover);}

/* ---------- Dropzone ---------- */
.dropzone{
  border:1.5px dashed var(--border);
  border-radius:var(--radius-md);
  background:var(--bg);
  padding:18px 14px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  gap:2px;
  cursor:pointer;
  transition:border-color .15s ease, background .15s ease;
}
.dropzone:hover, .dropzone.dragover{
  border-color:var(--accent);
  background:var(--accent-soft);
}
.dropzone-label{font-size:.85rem;font-weight:600;color:var(--text);}
.dropzone-sub{font-size:.72rem;color:var(--muted);}

/* ---------- File order / selection list ---------- */
.file-order-list{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:6px;
  max-height:180px;
  overflow-y:auto;
}
.file-order-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  background:var(--bg);
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  padding:7px 9px;
  font-size:.78rem;
}
.file-order-name{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  flex:1;
}
.file-order-actions{display:flex;gap:4px;flex-shrink:0;}
.file-order-actions button{
  background:var(--surface-2);
  border:1px solid var(--border);
  color:var(--text);
  border-radius:4px;
  padding:3px 7px;
  cursor:pointer;
  font-size:.72rem;
  line-height:1;
}
.file-order-actions button:hover{border-color:var(--accent);}
.file-order-actions button:disabled{opacity:.3;cursor:default;}
.file-order-actions button.remove-btn{color:#ff7b7b;}

/* ---------- Inputs & buttons ---------- */
.tool-pages{
  background:var(--bg);
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  color:var(--text);
  padding:10px 12px;
  font-size:.85rem;
}
.tool-pages:focus{outline:none;border-color:var(--accent);}

.tool-btn{
  background:var(--accent);
  border:none;
  color:#fff;
  padding:11px;
  border-radius:var(--radius-sm);
  cursor:pointer;
  font-weight:600;
  font-size:.9rem;
  transition:background .15s ease;
  margin-top:auto;
}
.tool-btn:hover{background:var(--accent-hover);}
.tool-btn:disabled{opacity:.5;cursor:wait;}

.tool-result{font-size:.8rem;color:var(--muted);min-height:1.2em;word-break:break-word;}
.tool-result a{color:var(--success);font-weight:600;}

/* ---------- Ad slot ---------- */
.ad-slot{min-height:90px;margin:0 auto 40px;}

/* ---------- Footer ---------- */
.site-footer{border-top:1px solid var(--border);padding:28px 0;color:var(--muted);font-size:.85rem;}
.footer-inner p{margin:0 0 6px;}
.small{font-size:.75rem;}

/* ---------- Cookie banner ---------- */
.cookie-banner{
  position:fixed;left:16px;right:16px;bottom:16px;
  max-width:640px;margin:0 auto;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:18px;
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  align-items:center;
  justify-content:space-between;
  box-shadow:var(--shadow);
  z-index:999;
}
.cookie-banner.hidden{display:none;}
.cookie-banner p{margin:0;font-size:.85rem;flex:1 1 260px;color:var(--muted);}
.cookie-actions{display:flex;gap:8px;flex-shrink:0;}
.cookie-actions button{
  padding:9px 16px;border-radius:var(--radius-sm);border:1px solid var(--border);
  cursor:pointer;font-weight:600;font-size:.85rem;
}
#cookie-accept{background:var(--accent);color:#fff;border:none;}
#cookie-accept:hover{background:var(--accent-hover);}
#cookie-refuse{background:transparent;color:var(--text);}

/* ---------- Responsive ---------- */
@media (max-width: 640px){
  .hero{padding:48px 0 32px;}
  .tools-grid{
    grid-template-columns:1fr;
    padding:8px 16px 56px;
    gap:14px;
  }
  .container{padding:0 16px;}
  .header-inner{flex-wrap:wrap;gap:8px;}
  .cookie-banner{
    flex-direction:column;
    align-items:stretch;
    left:12px;right:12px;bottom:12px;
  }
  .cookie-actions{justify-content:flex-end;}
}

@media (min-width: 641px) and (max-width: 960px){
  .tools-grid{grid-template-columns:repeat(2, 1fr);}
}

/* ---------- Pages dédiées par outil ---------- */
.tool-page-hero{padding:56px 24px 24px;text-align:center;}
.tool-page-hero h1{
  font-size:clamp(1.7rem, 3.5vw, 2.3rem);
  margin:0 0 14px;
  font-weight:800;
}
.tool-page-hero p{color:var(--muted);max-width:640px;margin:0 auto;font-size:1rem;}

.tools-grid-single{
  grid-template-columns:1fr;
  max-width:520px;
  margin:0 auto;
  padding:12px 24px 40px;
}

.tool-page-content{padding:12px 24px 8px;max-width:720px;margin:0 auto;}
.tool-page-content h2{font-size:1.3rem;margin-bottom:16px;font-weight:800;}
.howto-list{
  color:var(--muted);
  font-size:.92rem;
  line-height:1.8;
  padding-left:22px;
}
.howto-list li{margin-bottom:6px;}

.other-tools{padding:20px 24px 20px;max-width:720px;margin:0 auto;}
.other-tools h2{font-size:1.2rem;margin-bottom:14px;font-weight:800;}
.other-tools-list{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
  gap:8px;
}
.other-tools-list a{
  display:block;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  padding:10px 14px;
  font-size:.85rem;
  color:var(--text);
}
.other-tools-list a:hover{border-color:var(--accent);color:var(--accent-hover);}

.faq{max-width:720px;margin:0 auto;}
