/* ==========================================================================
   Veridy.ca — Design System v2.0 (Clair & Institutionnel)
   Theme: Light Institutional Trust / Quebec Privacy Standards
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@500;600;700;800&display=swap');

:root {
  /* Palette Institutionnelle */
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-accent-light: #eff6ff;

  --border-color: #e2e8f0;
  --border-hover: #cbd5e1;
  --border-focus: #3b82f6;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --primary: #1e40af;
  --primary-hover: #1e3a8a;
  --primary-light: #dbeafe;

  --secondary: #0ea5e9;

  --success: #059669;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;

  --warning: #d97706;
  --warning-bg: #fffbeb;
  --warning-border: #fde68a;

  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', 'Inter', system-ui, sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.1), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.25;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover { color: var(--primary-hover); }

/* SVG fallback strict */
svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  max-width: 100%;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.header-banner {
  background: linear-gradient(90deg, #1e3a8a 0%, #1e40af 100%);
  color: #ffffff;
  font-size: 0.85rem;
  padding: 6px 20px;
  text-align: center;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.header-banner svg { width: 16px; height: 16px; fill: none; stroke: currentColor; }

.navbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--text-primary);
}

.brand-logo svg { width: 32px; height: 32px; }

.brand-badge {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-link {
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95rem;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.nav-link svg { width: 18px; height: 18px; stroke-width: 2; }

/* Hamburger: caché sur desktop, visible sur mobile (<=900px) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle svg { width: 24px; height: 24px; stroke: var(--text-primary); }

/* DESKTOP (>=901px): liens horizontaux classiques, hamburger caché */
@media (min-width: 901px) {
  .nav-links {
    display: flex;
  }
  .nav-toggle { display: none; }
}

/* MOBILE (<=900px): hamburger à droite, menu déroulant */
@media (max-width: 900px) {
  .nav-container {
    justify-content: space-between;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    flex-direction: column;
    padding: 16px 24px;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    order: 3;
  }
  .nav-links.open { display: flex; }
  .nav-toggle {
    display: flex;
    order: 2;
    margin-left: auto;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  color: #ffffff;
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--border-color);
  color: var(--text-primary);
}

.btn-outline:hover {
  background-color: var(--bg-subtle);
  border-color: var(--border-hover);
}

.btn-success { background-color: var(--success); color: #ffffff; }

.btn-lg { padding: 14px 28px; font-size: 1.05rem; border-radius: var(--radius-md); }

/* ==========================================================================
   Hero Scanner — LE point focal
   ========================================================================== */

.hero {
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-main) 100%);
  padding: 64px 24px 48px 24px;
  border-bottom: 1px solid var(--border-color);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(30,64,175,0.06) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.hero-container { max-width: 900px; margin: 0 auto; position: relative; z-index: 1; }

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-accent-light);
  color: var(--primary);
  border: 1px solid #bfdbfe;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero-title {
  font-size: 2.8rem;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
  color: var(--text-primary);
}

.hero-title span { color: var(--primary); }

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 720px;
  margin: 0 auto 0 auto;
  font-weight: 400;
}

/* ── Scanner box ── La star de la page ── */

.scan-wrapper {
  max-width: 700px;
  margin: 36px auto 0;
  position: relative;
  z-index: 1;
}

.scan-box {
  background: var(--bg-card);
  padding: 8px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--primary);
  box-shadow: 0 8px 32px rgba(30, 64, 175, 0.18), 0 0 0 4px rgba(30, 64, 175, 0.06);
  display: flex;
  gap: 8px;
  transition: box-shadow 0.3s, border-color 0.3s;
}

.scan-box:focus-within {
  border-color: var(--primary-hover);
  box-shadow: 0 12px 40px rgba(30, 64, 175, 0.25), 0 0 0 6px rgba(30, 64, 175, 0.08);
}

.scan-input-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.scan-input-wrapper svg {
  position: absolute;
  left: 18px;
  width: 22px;
  height: 22px;
  color: var(--primary);
}

.scan-input {
  width: 100%;
  padding: 18px 16px 18px 52px;
  font-size: 1.15rem;
  border: none;
  border-radius: var(--radius-md);
  outline: none;
  font-family: var(--font-sans);
  background: transparent;
  color: var(--text-primary);
  font-weight: 500;
}

.scan-input::placeholder {
  color: var(--text-light);
  font-weight: 400;
}

.scan-box .btn-primary {
  padding: 0 32px;
  font-size: 1.05rem;
  white-space: nowrap;
}

/* Trust badges sous le scanner */
.scan-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 24px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.scan-trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.scan-trust-item svg {
  width: 16px;
  height: 16px;
  color: var(--success);
}

/* Badge "gratuit" flottant */
.scan-badge-free {
  position: absolute;
  top: -14px;
  right: 20px;
  background: var(--success);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
}

/* Trust row legacy (utilisée sur d'autres pages) */
.trust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  margin-top: 32px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.trust-item { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.trust-item svg { width: 18px; height: 18px; color: var(--success); }

/* ==========================================================================
   Stats Live Cards (index.html)
   ========================================================================== */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: -40px auto 0;
  padding: 0 24px;
  position: relative;
  z-index: 10;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s;
}

.stat-card:hover { transform: translateY(-3px); }

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-danger .stat-number { color: var(--danger); }
.stat-success .stat-number { color: var(--success); }

/* ==========================================================================
   Comparison Table (index.html)
   ========================================================================== */

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.compare-table th {
  background: var(--bg-subtle);
  padding: 16px 20px;
  font-weight: 700;
  text-align: left;
  border-bottom: 2px solid var(--border-color);
}

.compare-table th.veridy-col {
  background: var(--primary-light);
  color: var(--primary);
}

.compare-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.compare-table tr:last-child td { border-bottom: none; }

.compare-table .check { color: var(--success); font-weight: 700; }
.compare-table .cross { color: var(--danger); font-weight: 700; }
.compare-table .veridy-col { background: #eff6ff; font-weight: 600; }

/* ==========================================================================
   FAQ Accordion (index.html)
   ========================================================================== */

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

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 0;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.faq-item + .faq-item {
  border-top: none;
  border-radius: 0;
}

.faq-item:first-child {
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.faq-item:last-child {
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.faq-item:only-child {
  border-radius: var(--radius-md);
}

.faq-item:hover {
  border-color: var(--border-hover);
}

.faq-item.open {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 22px 28px;
  text-align: left;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-family: var(--font-heading);
  transition: color 0.2s;
}

.faq-item.open .faq-question {
  color: var(--primary);
  background: var(--bg-accent-light);
}

.faq-question-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: var(--text-muted);
  font-size: 1.4rem;
  font-weight: 300;
  line-height: 1;
}

.faq-item.open .faq-question-icon {
  background: var(--primary);
  color: #ffffff;
  transform: rotate(45deg);
}

.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s ease;
}

.faq-item.open .faq-answer {
  grid-template-rows: 1fr;
}

.faq-answer-inner {
  overflow: hidden;
}

.faq-answer-content {
  padding: 20px 28px 24px 28px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  border-top: 1px solid var(--border-color);
}

.faq-answer-content p { margin-bottom: 8px; }
.faq-answer-content p:last-child { margin-bottom: 0; }

/* ==========================================================================
   Grilles & Section Content
   ========================================================================== */

.section { padding: 64px 24px; }
.container { max-width: 1200px; margin: 0 auto; }

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 48px auto;
}

.section-title { font-size: 2rem; margin-bottom: 12px; }
.section-subtitle { color: var(--text-secondary); font-size: 1.05rem; }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.card-icon svg { width: 24px; height: 24px; }
.card-title { font-size: 1.25rem; margin-bottom: 10px; }
.card-desc { color: var(--text-secondary); font-size: 0.95rem; }

/* ==========================================================================
   Tables (registre, scan results)
   ========================================================================== */

.table-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: var(--shadow-sm);
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.table th {
  background-color: var(--bg-subtle);
  padding: 14px 20px;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
}

.table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background-color: #f8fafc; }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-success { background-color: var(--success-bg); color: var(--success); border: 1px solid var(--success-border); }
.badge-warning { background-color: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-border); }
.badge-danger { background-color: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-border); }

.badge-score {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 800;
}

.score-a { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }
.score-b { background: #e0f2fe; color: #0369a1; border: 1px solid #7dd3fc; }
.score-c { background: #fef9c3; color: #a16207; border: 1px solid #fde047; }
.score-d { background: #ffedd5; color: #c2410c; border: 1px solid #fdba74; }
.score-f { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }

/* ==========================================================================
   Sector Filters (registre.html)
   ========================================================================== */

.sector-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  justify-content: center;
}

.filter-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-pill.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* ==========================================================================
   Tech Chips & Recommendations (scan.html)
   ========================================================================== */

.tech-chip {
  display: inline-block;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  margin: 2px;
  border: 1px solid var(--border-color);
}

.rec-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.rec-item:last-child { border-bottom: none; }

.rec-priority {
  flex-shrink: 0;
  width: 36px;
  text-align: center;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
}

.rec-p0 { background: var(--danger-bg); color: var(--danger); }
.rec-p1 { background: var(--warning-bg); color: var(--warning); }
.rec-p2 { background: var(--bg-subtle); color: var(--text-muted); }

/* ==========================================================================
   Form Elements
   ========================================================================== */

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Code Block (solution.html)
   ========================================================================== */

.code-block {
  background: #0f172a;
  color: #f8fafc;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-family: monospace;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-md);
}

.code-block code { color: #38bdf8; }

.copy-btn {
  background: #1e293b;
  border: 1px solid #334155;
  color: #94a3b8;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.copy-btn:hover { background: #334155; color: #ffffff; }

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 64px 24px 32px 24px;
  border-top: 1px solid #1e293b;
  font-size: 0.9rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  margin-bottom: 48px;
}

.footer-title { color: #ffffff; font-size: 1rem; margin-bottom: 16px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: #94a3b8; transition: color 0.2s; }
.footer-links a:hover { color: #ffffff; }

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 32px;
  border-top: 1px solid #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
}

/* Stat icon (initStatsLive) */
.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(30, 64, 175, 0.08);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.stat-icon svg {
  width: 22px;
  height: 22px;
}
.stat-danger .stat-icon {
  background: rgba(220, 38, 38, 0.08);
  color: var(--danger);
}
.stat-success .stat-icon {
  background: rgba(5, 150, 105, 0.08);
  color: var(--success);
}

/* ==========================================================================
   RESPONSIVE — Mobile & Tablet improvements
   ========================================================================== */

/* Tablette (768px) */
@media (max-width: 768px) {
  /* Grid-3 → 1 colonne en mobile (les 3 cartes métriques se stackent) */
  .grid-3 {
    grid-template-columns: 1fr !important;
  }

  /* Grid-2 → 1 colonne */
  .grid-2 {
    grid-template-columns: 1fr !important;
  }

  /* Scan bar: input et bouton se stackent verticalement */
  .scan-box {
    flex-direction: column !important;
    gap: 12px !important;
  }
  .scan-box .scan-input-wrapper {
    width: 100% !important;
  }
  .scan-box .btn-lg {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Cards: padding réduit */
  .card {
    padding: 16px !important;
  }

  /* Sections: padding réduit */
  .section {
    padding: 32px 0 !important;
  }

  /* Hero: taille de titre réduite */
  .hero-title {
    font-size: 1.8rem !important;
  }

  /* Tableau: taille de police réduite */
  .table {
    font-size: 0.8rem !important;
  }
  .table th, .table td {
    padding: 8px 10px !important;
  }

  /* Score bar (scan results): stack verticalement */
  .scan-result-grid {
    grid-template-columns: 1fr !important;
  }

  /* Actions row: wrap + plein écran */
  .scan-actions-row {
    flex-wrap: wrap !important;
  }
  .scan-actions-row .btn {
    flex: 1 1 auto !important;
    min-width: 120px !important;
  }
}

/* Mobile (480px) */
@media (max-width: 480px) {
  /* iOS Safari: empêcher le zoom au focus (requires font-size >= 16px) */
  input[type="text"],
  input[type="email"],
  input[type="url"],
  textarea,
  select {
    font-size: 16px !important;
  }
  .scan-input {
    font-size: 16px !important;
  }

  /* Container: padding latéral réduit */
  .container {
    padding: 0 12px !important;
  }

  /* Hero: encore plus petit */
  .hero-title {
    font-size: 1.5rem !important;
  }
  .hero-subtitle {
    font-size: 0.9rem !important;
  }

  /* Metric values: plus petit */
  .metric-value {
    font-size: 1.8rem !important;
  }

  /* Grade circle: plus petit */
  .grade-circle {
    width: 56px !important;
    height: 56px !important;
    font-size: 1.5rem !important;
  }

  /* Footer: stack */
  .footer-container {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  /* Steps timeline: wrap serré */
  .scan-step {
    padding: 4px 10px !important;
    font-size: 0.7rem !important;
  }

  /* Log feed: pleine largeur */
  #log-feed {
    max-width: 100% !important;
    font-size: 0.7rem !important;
  }

  /* Recommandations card: padding réduit */
  #reco-card {
    padding: 12px !important;
  }

  /* Hide nav brand badge on very small screens */
  .brand-badge {
    display: none !important;
  }
}
