/* ═══════════════════════════════════════════════════════════════
   menace.css — Charte visuelle partagée menass.eu
   Police : Inter | Accent : #4F46E5 (indigo) | Fond : #F9FAFB
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg:          #F9FAFB;
  --surface:     #FFFFFF;
  --border:      #E5E7EB;
  --border-2:    #D1D5DB;
  --text:        #111827;
  --text-2:      #374151;
  --muted:       #6B7280;
  --muted-2:     #9CA3AF;
  --accent:      #4F46E5;
  --accent-h:    #4338CA;
  --accent-light:#EEF2FF;
  --accent-ring: rgba(79,70,229,.25);
  --ok:          #10B981;
  --warn:        #F59E0B;
  --err:         #EF4444;
  --radius:      12px;
  --radius-sm:   8px;
  --radius-lg:   16px;
  --shadow:      0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md:   0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
  --shadow-lg:   0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.04);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg { display: block; max-width: 100%; }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ── Animations ──────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up { animation: fadeUp .55s ease both; }
.fade-up-1 { animation-delay: .08s; }
.fade-up-2 { animation-delay: .16s; }
.fade-up-3 { animation-delay: .24s; }
.fade-up-4 { animation-delay: .32s; }

/* ── Layout ──────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-sm {
  max-width: 768px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header du hub ───────────────────────────────────────────── */
.site-header {
  background: linear-gradient(135deg, rgba(238,242,255,.6) 0%, #fff 100%);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.brand-logo {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-logo svg { color: #fff; }

.brand-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.02em;
}

.brand-name span { color: var(--accent); }

/* Header outil (sous-domaines) */
.tool-header {
  background: linear-gradient(135deg, rgba(238,242,255,.6) 0%, #fff 100%);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.tool-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .8125rem;
  color: var(--muted);
}

.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep { color: var(--muted-2); }

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 64px 24px 48px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: .8125rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.15;
  margin: 0 0 16px;
  color: var(--text);
}

.hero h1 span { color: var(--accent); }

.hero-lead {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 32px;
}

/* ── Search bar ──────────────────────────────────────────────── */
.search-wrap {
  max-width: 480px;
  margin: 0 auto 48px;
  position: relative;
}

.search-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-size: .9375rem;
  color: var(--text);
  outline: none;
  box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s;
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.search-input::placeholder { color: var(--muted-2); }

/* ── Category filters ────────────────────────────────────────── */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 40px;
}

.filter-btn {
  padding: 6px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── Tool grid ───────────────────────────────────────────────── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  padding-bottom: 64px;
}

.tool-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, box-shadow .15s, transform .15s;
  box-shadow: var(--shadow);
}

.tool-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md), 0 0 0 3px var(--accent-ring);
  transform: translateY(-2px);
  text-decoration: none;
}

.tool-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tool-card-icon svg { color: var(--accent); }

.tool-card-body { flex: 1; }

.tool-card-title {
  font-size: .9375rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 4px;
}

.tool-card-desc {
  font-size: .8125rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.tool-card-badge {
  font-size: .6875rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-light);
  color: var(--accent);
  align-self: flex-start;
}

.tool-card-badge.free { background: #ECFDF5; color: #059669; }

/* ── Tool page hero ──────────────────────────────────────────── */
.tool-hero {
  padding: 48px 0 32px;
  text-align: center;
}

.tool-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.15;
  margin: 0 0 12px;
}

.tool-hero .lead {
  font-size: 1.0625rem;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto;
}

/* ── Tool card (box de l'outil) ──────────────────────────────── */
.tool-box {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
  margin-bottom: 48px;
}

/* ── Boutons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: .9375rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .15s;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover { background: var(--accent-h); text-decoration: none; color: #fff; }

.btn-secondary {
  background: var(--surface);
  color: var(--text-2);
  border: 1.5px solid var(--border);
}

.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.btn-lg { padding: 13px 28px; font-size: 1rem; }
.btn-sm { padding: 7px 14px; font-size: .875rem; }
.btn-full { width: 100%; justify-content: center; }

/* ── Form elements ───────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .9375rem;
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
  background: var(--surface);
}

select.form-control { cursor: pointer; }

/* ── Result box ──────────────────────────────────────────────── */
.result-box {
  background: var(--accent-light);
  border: 1.5px solid rgba(79,70,229,.2);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-top: 16px;
}

.result-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  word-break: break-all;
}

.result-label {
  font-size: .8125rem;
  color: var(--muted);
  margin-top: 4px;
}

/* ── Copy button ─────────────────────────────────────────────── */
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: .8125rem;
  cursor: pointer;
  transition: all .15s;
}

.copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.copy-btn.copied { background: #ECFDF5; border-color: var(--ok); color: var(--ok); }

/* ── Sections contenu ────────────────────────────────────────── */
.content-section {
  padding: 48px 0;
  border-top: 1px solid var(--border);
}

.content-section h2 {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -.02em;
  margin: 0 0 20px;
  color: var(--text);
}

.steps-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.step-num {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: .8125rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.step-body { flex: 1; }
.step-title { font-weight: 600; margin-bottom: 4px; }
.step-desc { font-size: .9rem; color: var(--muted); }

/* ── Features list ───────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.feature-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.feature-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  background: var(--accent-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.feature-icon svg { color: var(--accent); }
.feature-title { font-weight: 600; font-size: .9375rem; }
.feature-desc { font-size: .875rem; color: var(--muted); }

/* ── FAQ ─────────────────────────────────────────────────────── */
.faq-list { display: flex; flex-direction: column; gap: 8px; }

.faq-item {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: .9375rem;
  color: var(--text);
  list-style: none;
  user-select: none;
}

.faq-question::-webkit-details-marker { display: none; }

.faq-question svg {
  flex-shrink: 0;
  transition: transform .2s;
  color: var(--muted);
}

details[open] .faq-question svg { transform: rotate(180deg); }

.faq-answer {
  padding: 0 20px 16px;
  font-size: .9375rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ── Related tools ───────────────────────────────────────────── */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.related-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  transition: all .15s;
}

.related-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
  text-decoration: none;
}

.related-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  background: var(--accent-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.related-icon svg { color: var(--accent); }
.related-name { font-size: .875rem; font-weight: 600; color: var(--text); }

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 48px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: center;
}

.footer-brand { font-weight: 700; color: var(--text); }
.footer-brand span { color: var(--accent); }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  font-size: .875rem;
  color: var(--muted);
  text-decoration: none;
  transition: color .15s;
}

.footer-links a:hover { color: var(--accent); }

.footer-copy {
  font-size: .8125rem;
  color: var(--muted-2);
  width: 100%;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ── Chips / tags ────────────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
}

.chip-blue  { background: var(--accent-light); color: var(--accent); }
.chip-green { background: #ECFDF5; color: #059669; }
.chip-gray  { background: #F3F4F6; color: var(--muted); }

/* ── Alerts ──────────────────────────────────────────────────── */
.alert {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
}

.alert-info { background: #EFF6FF; color: #1D4ED8; border: 1px solid #BFDBFE; }
.alert-ok   { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.alert-err  { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }

/* ── Upload zone ─────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border-2);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: all .15s;
  background: var(--bg);
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-light);
}

.upload-zone-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.upload-zone-icon svg { color: var(--accent); }
.upload-zone-title { font-weight: 600; margin-bottom: 4px; }
.upload-zone-hint { font-size: .875rem; color: var(--muted); }

/* ── Progress bar ────────────────────────────────────────────── */
.progress {
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width .3s ease;
}

/* ── Spinner ─────────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2.5px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

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

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero { padding: 40px 16px 32px; }
  .tool-box { padding: 20px 16px; }
  .content-section { padding: 32px 0; }
  .tools-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
}

@media (max-width: 420px) {
  .tools-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
}

/* ── Utilitaires ─────────────────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.font-bold { font-weight: 700; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.gap-8 { gap: 8px; }
.flex { display: flex; }
.items-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.hidden { display: none !important; }
