/* ════════════════════════════════════════════════════════════════════════════
   ElectroCAD — Design System v7.0 « Précision+ »
   Consolidation 22 rapports + audit v6. Score cible 9.5/10.
   À charger APRÈS style.css : <link rel="stylesheet" href="/css/v7-unified.css">
   Ou @import 'v7-unified.css' à la fin de style.css.
   ════════════════════════════════════════════════════════════════════════════
   INTERDITS — viole brief Précision si réintroduit :
   - Glassmorphism (backdrop blur > 12px, transparence > 30 %)
   - Bento > 6 tiles, hover scale > 1.02, rounded-xl > 8px sauf .badge full
   - Glow rouge agressif sur boutons primary
   - Mesh gradient multicolor (indigo + vert + violet)
   - Emoji comme icônes UI (utiliser SVG inline)
   - Animations linear pour interactions (linear OK uniquement scroll-driven)
   - Couleurs pop : émeraude, indigo, fuchsia, cyan néon
   - drop-shadow > 32px ou alpha > 0.45
   - Animations `bottom` / `left` / `width` (utiliser `transform` only)
   ════════════════════════════════════════════════════════════════════════════ */

/* ═══ 1. TOKENS CONSOLIDÉS v7 ═══ */
:root,
[data-theme="dark"] {
  --ease-out:    cubic-bezier(0.32, 0, 0.16, 1);
  --ease-in:     cubic-bezier(0.84, 0, 0.84, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-linear: linear;

  --dur-instant: 0ms;
  --dur-fast:    100ms;
  --dur:         180ms;
  --dur-slow:    280ms;
  --dur-slower:  500ms;

  --bp-sm:   640px;
  --bp-md:   768px;
  --bp-lg:  1024px;
  --bp-xl:  1280px;
  --bp-2xl: 1536px;

  --z-hide: -1; --z-base: 0; --z-raised: 1;
  --z-dropdown: 100; --z-sticky: 200; --z-fixed: 300;
  --z-overlay: 400; --z-modal: 500; --z-popover: 600;
  --z-tooltip: 700; --z-toast: 800; --z-cmdpalette: 900; --z-max: 9999;

  --chart-1: #2563EB; --chart-2: #E8E5DC; --chart-3: #8B8985;
  --chart-4: #1E40AF; --chart-5: #2F7D5C; --chart-6: #3B5A8A;
  --chart-axis: var(--text3); --chart-grid: var(--rule);
  --chart-seq-1: rgba(37, 99, 235,0.10);
  --chart-seq-2: rgba(37, 99, 235,0.25);
  --chart-seq-3: rgba(37, 99, 235,0.45);
  --chart-seq-4: rgba(37, 99, 235,0.70);
  --chart-seq-5: var(--accent);

  --h-sm: 32px; --h: 40px; --h-lg: 48px; --h-xl: 56px;
  --btn-px: 20px; --btn-py: 10px; --btn-press-scale: 0.97;

  --icon-xs: 12px; --icon-sm: 14px; --icon: 16px;
  --icon-md: 18px; --icon-lg: 24px; --icon-xl: 32px;

  --btn-shadow:        0 1px 0 rgba(0,0,0,0.4);
  --btn-shadow-hover:  0 2px 4px rgba(0,0,0,0.5), 0 6px 16px rgba(0,0,0,0.35);
  --btn-glow-accent:   0 0 0 4px rgba(37, 99, 235, 0.22);

  --table-row-py-compact: 6px;
  --table-row-py:        10px;
  --table-row-py-loose:  14px;
}

[data-theme="light"] {
  --text-mute: #6F6E6A;
  --chart-2: #0A0A0B; --chart-3: #5C5B57;
  --btn-shadow:       0 1px 0 rgba(10,10,11,0.06);
  --btn-shadow-hover: 0 2px 4px rgba(10,10,11,0.08), 0 4px 12px rgba(10,10,11,0.06);
  --btn-glow-accent:  0 0 0 4px rgba(185, 28, 28, 0.18);
}

/* ═══ 2. RESET ANTI-PATTERNS v6 ═══ */
.hero-title         { font-weight: 600; }
nav .text-xl,
#nav .font-bold,
#nav-logo           { font-weight: 700; }
.testimonial-quote  { font-weight: 400; font-style: italic; }

.btn-primary:focus-visible,
.btn-danger:focus-visible {
  outline: 2px solid #FFFFFF;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--accent-glow-strong, rgba(37, 99, 235,0.30));
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
    animation-timeline: none !important;
  }
  .reveal, [data-reveal], [data-stagger] > *,
  .ec-reveal, .ec-parallax, .ec-stack > .ec-card {
    opacity: 1 !important;
    transform: none !important;
  }
}

@media (prefers-contrast: more) {
  :root, [data-theme="dark"] {
    --border: rgba(232,229,220,0.30);
    --text2: var(--text);
  }
  [data-theme="light"] {
    --border: rgba(10,10,11,0.30);
    --text2: var(--text);
  }
}

html { scrollbar-width: thin; scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track); }

/* ═══ 3. COMPOSANTS v7 (30+) ═══ */

/* — 1. BUTTON — */
.btn-v7 {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 var(--btn-px);
  font-family: 'Inter', sans-serif; font-weight: 500; font-size: 0.9rem;
  border: 1px solid var(--border); border-radius: var(--radius-xs);
  background: var(--surface); color: var(--text);
  cursor: pointer; user-select: none; white-space: nowrap;
  position: relative; overflow: hidden;
  transition: background-color var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out),
              color var(--dur) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-spring);
  box-shadow: var(--btn-shadow);
}
.btn-v7:hover:not(:disabled):not([aria-disabled="true"]) {
  border-color: var(--border-hover);
  box-shadow: var(--btn-shadow-hover);
}
.btn-v7:active:not(:disabled) { transform: scale(var(--btn-press-scale)); }
.btn-v7:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: var(--btn-glow-accent); }
.btn-v7:disabled, .btn-v7[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }

.btn-v7-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-v7-primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-v7-outline { background: transparent; border-color: var(--border-strong); }
.btn-v7-ghost   { background: transparent; border-color: transparent; }
.btn-v7-ghost:hover { background: var(--bg2); }
.btn-v7-danger  { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-v7-success { background: var(--success); color: #fff; border-color: var(--success); }

.btn-v7-link { background: transparent; border: 0; padding: 4px 2px; height: auto; color: var(--accent); border-radius: 0; box-shadow: none; }
.btn-v7-link::after { content: ""; display: block; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform var(--dur) var(--ease-out); }
.btn-v7-link:hover::after { transform: scaleX(1); }

.btn-v7-sm  { height: var(--h-sm); padding: 0 12px; font-size: 0.82rem; }
.btn-v7-lg  { height: var(--h-lg); padding: 0 24px; font-size: 0.95rem; }
.btn-v7-xl  { height: var(--h-xl); padding: 0 32px; font-size: 1rem; }
.btn-v7-block { display: flex; width: 100%; }
.btn-v7-icon { width: 36px; padding: 0; aspect-ratio: 1; }

.btn-v7-group { display: inline-flex; isolation: isolate; }
.btn-v7-group > .btn-v7 { border-radius: 0; margin-left: -1px; }
.btn-v7-group > .btn-v7:first-child { border-top-left-radius: var(--radius-xs); border-bottom-left-radius: var(--radius-xs); }
.btn-v7-group > .btn-v7:last-child  { border-top-right-radius: var(--radius-xs); border-bottom-right-radius: var(--radius-xs); }

.btn-v7.is-loading { color: transparent; pointer-events: none; }
.btn-v7.is-loading::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 1em; height: 1em; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  color: var(--text); animation: btn-spin 700ms linear infinite;
}
.btn-v7-primary.is-loading::after, .btn-v7-danger.is-loading::after, .btn-v7-success.is-loading::after { color: #fff; }
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* — 2. CARD — */
.card-v7 {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--sp-6);
  transition: border-color var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out),
              transform var(--dur) var(--ease-out);
}
.card-v7.is-interactive { cursor: pointer; }
.card-v7.is-interactive:hover { border-color: var(--border-hover); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.card-v7.is-interactive:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.card-v7 .card-header { padding-bottom: var(--sp-4); margin-bottom: var(--sp-4); border-bottom: 1px solid var(--rule); display: flex; align-items: center; gap: var(--sp-3); }
.card-v7 .card-body { color: var(--text2); font-size: 0.92rem; line-height: 1.6; }
.card-v7 .card-footer { display: flex; align-items: center; justify-content: space-between; padding-top: var(--sp-4); margin-top: var(--sp-5); border-top: 1px solid var(--rule); font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; color: var(--text3); }
.card-v7-glow:hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 24px var(--accent-glow); }

/* — 3. MODAL — */
.modal-v7 { position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: center; padding: var(--sp-4); background: var(--modal-overlay); opacity: 0; pointer-events: none; transition: opacity var(--dur-slow) var(--ease-out); }
.modal-v7.is-open { opacity: 1; pointer-events: auto; }
.modal-v7 .modal-box { background: var(--modal-bg); border: 1px solid var(--border); border-radius: var(--radius); max-width: 480px; width: 100%; padding: var(--sp-7); transform: translateY(8px) scale(0.98); transition: transform var(--dur-slow) var(--ease-out); }
.modal-v7.is-open .modal-box { transform: translateY(0) scale(1); }
.modal-v7 .modal-box-md { max-width: 640px; }
.modal-v7 .modal-box-lg { max-width: 840px; }

/* — 4. TOAST — */
.toast-v7 {
  position: fixed; bottom: 24px; right: 24px; z-index: var(--z-toast);
  display: flex; align-items: center; gap: var(--sp-3);
  background: var(--toast-bg); border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius); padding: 12px 16px;
  box-shadow: var(--shadow-lg);
  transform: translateX(120%);
  transition: transform var(--dur-slow) var(--ease-spring);
  max-width: 360px; min-width: 280px;
}
.toast-v7.is-shown { transform: translateX(0); }
.toast-v7--success { border-left-color: var(--success); }
.toast-v7--error   { border-left-color: var(--danger); }
.toast-v7--warning { border-left-color: var(--warning); }
.toast-v7--info    { border-left-color: var(--text3); }

/* — 5. BADGE — */
.badge-v7 {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px;
  font-family: 'JetBrains Mono', monospace; font-size: 0.7rem;
  font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em;
  border: 1px solid var(--border); border-radius: var(--radius-xs);
  background: var(--bg2); color: var(--text2);
}
.badge-v7--accent  { background: var(--accent-tint); color: var(--accent); border-color: var(--accent); }
.badge-v7--success { background: var(--success-glow); color: var(--success-text); border-color: var(--success); }
.badge-v7--warning { background: var(--warning-glow); color: var(--warning-text); border-color: var(--warning); }
.badge-v7--danger  { background: var(--danger-glow); color: var(--danger-text); border-color: var(--danger); }

/* — 6. PILL — */
.pill-v7 {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 12px;
  font-size: 0.78rem; font-weight: 500;
  border: 1px solid var(--border); border-radius: var(--radius-full);
  background: var(--bg); color: var(--text2);
  cursor: pointer; transition: all var(--dur-fast) var(--ease-out);
}
.pill-v7:hover { border-color: var(--accent); color: var(--text); }
.pill-v7.is-active { background: var(--accent-tint); border-color: var(--accent); color: var(--accent); }

/* — 7. FORM FIELDS — */
.field-v7 { display: flex; flex-direction: column; gap: 6px; }
.field-v7 .field-label { font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text3); }
.field-v7 .field-input,
.field-v7 .field-textarea,
.field-v7 .field-select {
  height: var(--h); padding: 0 12px;
  background: var(--input-bg); color: var(--text);
  border: 1px solid var(--input-border); border-radius: var(--radius-xs);
  font-family: inherit; font-size: 0.9rem;
  border-left: 2px solid transparent;
  transition: border-color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
}
.field-v7 .field-textarea { height: auto; padding: 10px 12px; min-height: 96px; resize: vertical; }
.field-v7 .field-input:focus,
.field-v7 .field-textarea:focus,
.field-v7 .field-select:focus { outline: none; border-color: var(--input-border-focus); background: var(--input-bg-focus); }
.field-v7 .field-input:user-invalid { border-color: var(--danger); border-left-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-glow); }
.field-v7 .field-help { font-size: 0.78rem; color: var(--text3); }
.field-v7 .field-error { font-size: 0.78rem; color: var(--danger-text); }

/* — 8. TABLE — */
.table-v7 { width: 100%; border-collapse: collapse; font-size: 0.875rem; color: var(--text); }
.table-v7 thead th {
  text-align: left; padding: 10px 12px;
  background: var(--table-header-bg); border-bottom: 1px solid var(--rule);
  font-family: 'JetBrains Mono', monospace; font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text3); font-weight: 500;
  position: sticky; top: 0; z-index: var(--z-raised);
}
.table-v7 tbody td { padding: var(--table-row-py) 12px; border-bottom: 1px solid var(--table-border); vertical-align: middle; }
.table-v7 tbody tr:hover { background: var(--table-row-hover); }
.table-v7 tbody tr.is-selected { background: var(--accent-tint); box-shadow: inset 2px 0 0 var(--accent); }

.table-v7 thead th[aria-sort] { cursor: pointer; user-select: none; padding-right: 28px; position: relative; }
.table-v7 thead th[aria-sort]::after {
  content: ""; position: absolute; right: 10px; top: 50%;
  width: 8px; height: 8px;
  border-right: 1.5px solid var(--text3); border-bottom: 1.5px solid var(--text3);
  transform: translateY(-70%) rotate(45deg);
  opacity: 0.4; transition: opacity var(--dur-fast);
}
.table-v7 thead th[aria-sort="ascending"]::after  { transform: translateY(-30%) rotate(-135deg); opacity: 1; border-color: var(--accent); }
.table-v7 thead th[aria-sort="descending"]::after { opacity: 1; border-color: var(--accent); }

.table-v7[data-density="compact"] tbody td { padding: var(--table-row-py-compact) 12px; }
.table-v7[data-density="loose"]   tbody td { padding: var(--table-row-py-loose) 12px; }

.cell-mono   { font-family: 'JetBrains Mono', monospace; font-size: 0.825rem; }
.cell-num    { text-align: right; font-variant-numeric: tabular-nums; }
.cell-date   { color: var(--text3); white-space: nowrap; }
.cell-status::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 6px; background: var(--status-color, var(--text3)); }
.cell-status[data-status="active"]  { --status-color: var(--success-text); }
.cell-status[data-status="expired"] { --status-color: var(--danger-text); }

@media (max-width: 640px) {
  .table-v7--responsive thead { display: none; }
  .table-v7--responsive, .table-v7--responsive tbody, .table-v7--responsive tr, .table-v7--responsive td { display: block; width: 100%; }
  .table-v7--responsive tr { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: var(--sp-3); padding: var(--sp-3); }
  .table-v7--responsive td { border: 0; padding: 6px 0; display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); }
  .table-v7--responsive td::before { content: attr(data-label); flex: 0 0 40%; font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text3); }
}

.bulk-bar-v7 {
  position: sticky; bottom: var(--sp-4); z-index: 20;
  display: flex; align-items: center; gap: var(--sp-3);
  margin: var(--sp-3) auto 0; max-width: 720px;
  padding: 10px 16px;
  background: var(--surface); border: 1px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  transform: translateY(120%); opacity: 0; pointer-events: none;
  transition: transform var(--dur) var(--ease-out), opacity var(--dur) var(--ease-out);
}
.bulk-bar-v7.is-visible { transform: translateY(0); opacity: 1; pointer-events: auto; }
.bulk-bar-v7 .bulk-count { font-family: 'JetBrains Mono', monospace; color: var(--accent); font-weight: 600; }

/* — 9. TABS — */
.tabs-v7 { display: flex; gap: var(--sp-1); border-bottom: 1px solid var(--rule); }
.tabs-v7 .tab { padding: 10px 16px; background: transparent; border: 0; color: var(--text2); font-size: 0.9rem; font-weight: 500; border-bottom: 2px solid transparent; cursor: pointer; transition: color var(--dur-fast) var(--ease-out), border-color var(--dur) var(--ease-out); }
.tabs-v7 .tab:hover { color: var(--text); }
.tabs-v7 .tab[aria-selected="true"], .tabs-v7 .tab.is-active { color: var(--text); border-bottom-color: var(--accent); }
.tabs-v7 .tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* — 10. ACCORDION (native <details>) — */
.accordion-v7 { display: grid; gap: 0; }
.accordion-v7 .accordion-item { border-bottom: 1px solid var(--rule); }
.accordion-v7 .accordion-item summary { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; cursor: pointer; list-style: none; font-weight: 500; color: var(--text); }
.accordion-v7 .accordion-item summary::-webkit-details-marker { display: none; }
.accordion-v7 .accordion-item summary::after { content: "+"; font-family: 'JetBrains Mono', monospace; color: var(--accent); font-size: 1.2rem; transition: transform var(--dur) var(--ease-spring); }
.accordion-v7 .accordion-item[open] summary::after { transform: rotate(45deg); }
.accordion-v7 .accordion-item .accordion-body { padding: 0 0 16px 0; color: var(--text2); line-height: 1.6; }

/* — 11. STEPPER — */
.stepper-v7 { display: flex; align-items: center; gap: 0; counter-reset: step; }
.stepper-v7 .step { display: flex; align-items: center; gap: 12px; flex: 1; counter-increment: step; }
.stepper-v7 .step::after { content: ""; flex: 1; height: 1px; background: var(--rule); margin-left: 12px; }
.stepper-v7 .step:last-child::after { display: none; }
.stepper-v7 .step .step-bullet { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--bg2); border: 1px solid var(--border); font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; color: var(--text3); }
.stepper-v7 .step .step-bullet::before { content: counter(step); }
.stepper-v7 .step.is-current .step-bullet { background: var(--accent); color: #fff; border-color: var(--accent); }
.stepper-v7 .step.is-current .step-label { color: var(--text); font-weight: 500; }
.stepper-v7 .step.is-done .step-bullet { background: var(--success); color: #fff; border-color: var(--success); }
.stepper-v7 .step.is-done .step-bullet::before { content: "✓"; }

/* — 12. PROGRESS — */
.progress-v7 { width: 100%; height: 6px; background: var(--bg2); border-radius: var(--radius-full); overflow: hidden; }
.progress-v7 .progress-fill { height: 100%; background: var(--accent); border-radius: var(--radius-full); transition: width var(--dur-slow) var(--ease-out); }

/* — 13. ALERT — */
.alert-v7 { display: flex; gap: 12px; padding: 14px 18px; border: 1px solid var(--border); border-left-width: 3px; border-radius: var(--radius); background: var(--surface); font-size: 0.875rem; }
.alert-v7--info    { border-left-color: var(--text3); background: var(--bg2); }
.alert-v7--success { border-left-color: var(--success); background: var(--success-glow); }
.alert-v7--warning { border-left-color: var(--warning); background: var(--warning-glow); }
.alert-v7--danger  { border-left-color: var(--danger); background: var(--danger-glow); }

/* — 14. BANNER — */
.banner-v7 {
  position: sticky; top: 0; z-index: var(--z-sticky);
  display: flex; align-items: center; justify-content: center; gap: var(--sp-3);
  padding: 8px 16px; min-height: 36px;
  background: var(--accent); color: #fff;
  font-family: 'JetBrains Mono', monospace; font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.06em;
}

/* — 15. CALLOUT — */
.callout-v7 { display: flex; gap: 12px; padding: 14px 18px; border-radius: var(--radius); border-left: 3px solid; margin: 20px 0; font-size: 0.9rem; }
.callout-v7--note { background: rgba(99,102,241,0.08); border-color: #6366f1; }
.callout-v7--tip  { background: rgba(34,197,94,0.08);  border-color: #22c55e; }
.callout-v7--warn { background: rgba(255,159,28,0.08); border-color: #ff9f1c; }
.callout-v7--danger { background: var(--danger-glow); border-color: var(--danger); }

/* — 16. AVATAR — */
.avatar-v7 {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%; border: 1px solid var(--border);
  background: var(--bg2); color: var(--text);
  font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; overflow: hidden;
}
.avatar-v7 img { width: 100%; height: 100%; object-fit: cover; }
.avatar-v7--sm { width: 24px; height: 24px; font-size: 0.62rem; }
.avatar-v7--lg { width: 48px; height: 48px; font-size: 0.86rem; }
.avatar-v7--xl { width: 72px; height: 72px; font-size: 1rem; }
.avatar-stack { display: inline-flex; }
.avatar-stack .avatar-v7 { margin-left: -8px; box-shadow: 0 0 0 2px var(--bg); }
.avatar-stack .avatar-v7:first-child { margin-left: 0; }

/* — 17. TOOLTIP — */
.tooltip-v7 { position: absolute; z-index: var(--z-tooltip); padding: 6px 10px; background: var(--tooltip-bg); color: var(--tooltip-text); font-size: 0.78rem; font-weight: 500; border-radius: var(--radius-xs); box-shadow: var(--shadow); pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.tooltip-v7.is-visible { opacity: 1; transform: translateY(0); }

/* — 18. POPOVER — */
.popover-v7 { position: absolute; z-index: var(--z-popover); min-width: 240px; max-width: 360px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: var(--sp-4); opacity: 0; transform: translateY(-6px) scale(0.98); pointer-events: none; transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); }
.popover-v7.is-open { opacity: 1; transform: none; pointer-events: auto; }

/* — 19. DROPDOWN — */
.dropdown-v7 { position: relative; }
.dropdown-v7 .dropdown-menu { position: absolute; top: calc(100% + 4px); right: 0; min-width: 200px; z-index: var(--z-dropdown); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; display: grid; gap: 2px; opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.dropdown-v7[aria-expanded="true"] .dropdown-menu { opacity: 1; transform: none; pointer-events: auto; }
.dropdown-v7 .dropdown-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; min-height: 32px; border-radius: var(--radius-xs); color: var(--text); font-size: 0.875rem; cursor: pointer; transition: background var(--dur-fast); }
.dropdown-v7 .dropdown-item:hover { background: var(--bg2); }
.dropdown-v7 .dropdown-divider { height: 1px; background: var(--rule); margin: 4px 0; }

/* — 20. SKELETON — */
.skeleton-v7 { position: relative; overflow: hidden; background: var(--skeleton-base); border-radius: var(--radius-xs); height: 12px; width: 100%; }
.skeleton-v7::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--skeleton-shine), transparent); transform: translateX(-100%); animation: skel-shimmer 1.4s var(--ease-in-out) infinite; }
.skeleton-v7--title { height: 24px; width: 60%; margin-bottom: 12px; }
.skeleton-v7--text  { height: 12px; margin-bottom: 8px; }
.skeleton-v7--avatar { width: 36px; height: 36px; border-radius: 50%; }
@keyframes skel-shimmer { to { transform: translateX(100%); } }

/* — 21. SPINNER — */
.spinner-v7 { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--bg3); border-top-color: var(--accent); border-radius: 50%; animation: spinner-v7 700ms linear infinite; }
.spinner-v7--sm { width: 12px; height: 12px; border-width: 1.5px; }
.spinner-v7--lg { width: 24px; height: 24px; border-width: 3px; }
@keyframes spinner-v7 { to { transform: rotate(360deg); } }

/* — 23. EMPTY STATE — */
.empty-state-v7 { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 48px 24px; gap: 12px; }
.empty-state-v7 .empty-icon { width: 64px; height: 64px; opacity: 0.4; margin-bottom: 8px; color: var(--text3); }
.empty-state-v7 .empty-title { font-family: 'Instrument Serif', Georgia, serif; font-style: italic; font-size: 1.25rem; color: var(--text); margin: 0; }
.empty-state-v7 .empty-hint { font-size: 0.9rem; color: var(--text2); max-width: 360px; margin: 0; }

/* — 24. KPI — */
.kpi-v7 { display: grid; gap: 6px; padding: var(--sp-5) var(--sp-6); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.kpi-v7 .kpi-label { font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.10em; color: var(--text3); }
.kpi-v7 .kpi-value { font-family: 'Inter', sans-serif; font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.25rem); line-height: 1; color: var(--text); letter-spacing: -0.018em; font-variant-numeric: tabular-nums; }
.kpi-v7 .kpi-delta { display: inline-flex; align-items: center; gap: 4px; font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; color: var(--text3); }
.kpi-v7 .kpi-delta.is-up   { color: var(--success-text); }
.kpi-v7 .kpi-delta.is-down { color: var(--danger-text); }
.kpi-v7 .kpi-spark { height: 32px; margin-top: 8px; }
.kpi-grid-v7 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.kpi-grid-v7 .kpi-v7 { border: 0; border-radius: 0; }

/* — 25. STAT COUNTER — */
.stat-counter-v7 { font-family: 'JetBrains Mono', monospace; font-weight: 600; font-variant-numeric: tabular-nums; font-size: clamp(2rem, 4vw, 2.8rem); color: var(--accent); line-height: 1; }

/* — 26. TESTIMONIAL — */
.testimonial-v7 { display: flex; flex-direction: column; gap: var(--sp-5); padding: var(--sp-6) var(--sp-8); background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius); }
.testimonial-v7 .testimonial-quote { font-family: 'Instrument Serif', Georgia, serif; font-style: italic; font-size: clamp(1.15rem, 1vw + 0.85rem, 1.55rem); line-height: 1.45; color: var(--text); margin: 0; quotes: "« " " »"; }
.testimonial-v7 .testimonial-quote::before { content: open-quote; color: var(--accent); }
.testimonial-v7 .testimonial-quote::after  { content: close-quote; color: var(--accent); }
.testimonial-v7 .testimonial-author { display: flex; align-items: center; gap: var(--sp-3); padding-top: var(--sp-4); border-top: 1px solid var(--rule); }
.testimonial-v7 .testimonial-name { font-weight: 600; color: var(--text); font-size: 0.9rem; }
.testimonial-v7 .testimonial-role { color: var(--text2); font-size: 0.82rem; }
.testimonial-v7 .testimonial-location { font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; color: var(--accent); letter-spacing: 0.06em; }

/* — 27. LOGO WALL — */
.logo-wall-v7 { padding-block: var(--sp-10); border-block: 1px solid var(--rule); }
.logo-wall-v7 .logo-wall-lead { text-align: center; font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text3); margin-bottom: var(--sp-7); }
.logo-wall-v7 .logo-wall-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--sp-6); align-items: center; max-width: 1080px; margin-inline: auto; }
.logo-wall-v7 img { width: 100%; max-height: 40px; object-fit: contain; filter: grayscale(1); opacity: 0.55; transition: filter var(--dur) var(--ease-out), opacity var(--dur) var(--ease-out); }
.logo-wall-v7 .logo-wall-grid > *:hover img { filter: grayscale(0); opacity: 1; }
@media (max-width: 768px) { .logo-wall-v7 .logo-wall-grid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-5); } }

/* — 28. FEATURE CARD — */
.feature-v7 { display: flex; flex-direction: column; gap: var(--sp-4); padding: var(--sp-8); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out); }
.feature-v7:hover { border-color: var(--border-hover); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.feature-v7 .feature-icon { width: 44px; height: 44px; display: inline-grid; place-items: center; border: 1px solid var(--border); border-radius: var(--radius-xs); background: var(--bg2); color: var(--accent); }
.feature-v7 .feature-icon svg { width: 22px; height: 22px; }
.feature-v7 h3 { font-family: 'Inter', sans-serif; font-weight: 600; font-size: 1.1rem; letter-spacing: -0.008em; color: var(--text); margin: 0; }
.feature-v7 p { color: var(--text2); font-size: 0.9rem; line-height: 1.6; flex: 1; margin: 0; }
.feature-v7 .feature-cta { font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.10em; color: var(--accent); display: inline-flex; align-items: center; gap: var(--sp-2); min-height: 24px; }
.feature-v7 .feature-cta::after { content: "→"; transition: transform var(--dur) var(--ease-out); }
.feature-v7:hover .feature-cta::after { transform: translateX(3px); }

/* — 29. CTA BANNER — */
.cta-banner-v7 { display: grid; gap: var(--sp-5); padding: var(--sp-12) var(--sp-8); background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius); text-align: center; position: relative; overflow: hidden; }
.cta-banner-v7::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at top, var(--accent-tint), transparent 60%); z-index: 0; }
.cta-banner-v7 > * { position: relative; z-index: 1; }
.cta-banner-v7 h2 { font-family: 'Instrument Serif', Georgia, serif; font-style: italic; font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.2; }
.cta-banner-v7 .cta-actions { display: flex; justify-content: center; gap: var(--sp-3); flex-wrap: wrap; }

/* — 30. PAGINATION — */
.pagination-v7 { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4); flex-wrap: wrap; }
.pagination-v7 .page-btn { min-width: 32px; height: 32px; padding: 0 8px; display: inline-grid; place-items: center; background: transparent; border: 1px solid var(--border); border-radius: var(--radius-xs); color: var(--text2); font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; cursor: pointer; transition: all var(--dur-fast) var(--ease-out); }
.pagination-v7 .page-btn:hover { color: var(--text); border-color: var(--border-hover); }
.pagination-v7 .page-btn.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }
.pagination-v7 .page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ═══ 4. SCROLL-DRIVEN ANIMATIONS (CSS native, 0 JS) ═══ */
@supports (animation-timeline: view()) {
  .ec-reveal { animation: ec-fade-up linear both; animation-timeline: view(); animation-range: entry 5% cover 35%; }
  .ec-img-reveal { animation: ec-img-in linear both; animation-timeline: view(); animation-range: entry 0% cover 25%; transform-origin: 50% 70%; }
  .ec-stack > .ec-card { position: sticky; top: 80px; animation: ec-card-compact linear forwards; animation-timeline: view(); animation-range: exit 0% exit 60%; transform-origin: 50% 0; }
}
@supports (animation-timeline: scroll()) {
  .ec-read-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); z-index: var(--z-fixed); animation: ec-grow linear forwards; animation-timeline: scroll(root block); }
}
@keyframes ec-fade-up    { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ec-img-in     { from { opacity: 0; transform: scale(0.94); filter: blur(8px); } to { opacity: 1; transform: scale(1); filter: blur(0); } }
@keyframes ec-card-compact { to { transform: scale(0.92) translateY(-12px); filter: brightness(0.7); } }
@keyframes ec-grow       { to { transform: scaleX(1); } }

/* ═══ 5. STAGGER (legacy fallback) ═══ */
[data-stagger] > * { opacity: 0; transform: translateY(8px); animation: stagger-in var(--dur-slow) var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 40ms); }
@keyframes stagger-in { to { opacity: 1; transform: none; } }

/* ═══ 6. BENTO GRID v7 ═══ */
.bento-v7 { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 220px; gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.bento-v7 .tile { background: var(--surface); padding: var(--sp-6); display: flex; flex-direction: column; justify-content: flex-end; transition: background-color var(--dur) var(--ease-out); }
.bento-v7 .tile:hover { background: var(--bg2); }
.bento-v7 .tile:hover h3, .bento-v7 .tile:hover h4 { color: var(--accent); }
.bento-v7 .tile--feature { grid-column: span 2; grid-row: span 2; padding: 0; position: relative; overflow: hidden; }
.bento-v7 .tile--wide    { grid-column: span 2; }
@media (max-width: 900px) { .bento-v7 { grid-template-columns: 1fr 1fr; grid-auto-rows: 180px; } .bento-v7 .tile--feature { grid-column: span 2; grid-row: span 1; } }
@media (max-width: 600px) { .bento-v7 { grid-template-columns: 1fr; } .bento-v7 .tile--feature, .bento-v7 .tile--wide { grid-column: span 1; } }

/* ═══ 7. METRIC STRIP ═══ */
.metric-strip-v7 { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--sp-7) var(--sp-6); }
.metric-strip-v7 .metric-item { display: flex; flex-direction: column; gap: var(--sp-2); text-align: center; padding-inline: var(--sp-4); border-right: 1px solid var(--rule); }
.metric-strip-v7 .metric-item:last-child { border-right: 0; }
.metric-strip-v7 .metric-value { font-family: 'JetBrains Mono', monospace; font-weight: 600; font-size: clamp(2rem, 4vw, 2.8rem); color: var(--accent); line-height: 1; font-variant-numeric: tabular-nums; }
.metric-strip-v7 .metric-label { color: var(--text2); font-size: 0.88rem; line-height: 1.45; }
@media (max-width: 720px) { .metric-strip-v7 { grid-template-columns: 1fr; gap: var(--sp-5); } .metric-strip-v7 .metric-item { border-right: 0; border-bottom: 1px solid var(--rule); padding-bottom: var(--sp-5); } .metric-strip-v7 .metric-item:last-child { border-bottom: 0; padding-bottom: 0; } }

/* ═══ 8. NAV V7 — underline ink-flow ═══ */
#nav-links a { position: relative; padding: 6px 2px; transition: color var(--dur) var(--ease-out); }
#nav-links a::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 100%; height: 1.5px; background: var(--accent); transform-origin: right center; transform: scaleX(0); transition: transform var(--dur-slow) var(--ease-in-out); }
#nav-links a:hover::after, #nav-links a:focus-visible::after { transform: scaleX(1); transform-origin: left center; }
#nav-links a[aria-current="page"] { color: var(--text); }
#nav-links a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left center; background: var(--text); }

#nav-mobile { display: block; max-height: 0; opacity: 0; overflow: hidden; transition: max-height var(--dur-slow) var(--ease-out), opacity var(--dur) var(--ease-out); }
#nav-mobile.is-open { max-height: 480px; opacity: 1; }
#nav-mobile a { opacity: 0; transform: translateY(-4px); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); }
#nav-mobile.is-open a { opacity: 1; transform: none; transition-delay: calc(var(--i, 0) * 40ms); }

/* Theme toggle */
.theme-toggle { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: var(--radius-xs); background: transparent; color: var(--text); cursor: pointer; }
.theme-toggle svg { width: var(--icon); height: var(--icon); transition: transform var(--dur-slow) var(--ease-out); }
.theme-toggle:hover svg { transform: rotate(180deg) scale(1.1); }
[data-theme="dark"]  .theme-toggle .icon-sun  { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* ═══ 9. COMMAND PALETTE Cmd+K ═══ */
.cmd-palette-v7 { position: fixed; top: 15vh; left: 50%; transform: translateX(-50%) translateY(8px) scale(0.98); width: min(640px, 92vw); z-index: var(--z-cmdpalette); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; opacity: 0; pointer-events: none; transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); }
.cmd-palette-v7.is-open { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0) scale(1); }
.cmd-palette-v7 .cmd-input-wrap { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.cmd-palette-v7 input { flex: 1; background: transparent; border: 0; outline: none; font-size: 0.95rem; color: var(--text); }
.cmd-palette-v7 .cmd-results { max-height: 360px; overflow-y: auto; padding: 8px; }
.cmd-palette-v7 .cmd-result { display: grid; grid-template-columns: 140px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: var(--radius-xs); cursor: pointer; }
.cmd-palette-v7 .cmd-result.is-active { background: var(--accent-tint); }
.cmd-palette-v7 .cmd-result code { font-weight: 600; color: var(--accent); }
.cmd-palette-v7 .cmd-foot { display: flex; gap: 16px; padding: 10px 18px; border-top: 1px solid var(--border); background: var(--bg2); font-size: 0.72rem; color: var(--text3); }
kbd { background: var(--bg2); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 3px; padding: 1px 6px; font-size: 0.7rem; font-family: 'JetBrains Mono', monospace; }

/* ═══ 10. SLIDE-OVER DRAWER ═══ */
.drawer-v7 { position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 92vw); z-index: var(--z-modal); background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow-lg); transform: translateX(100%); transition: transform var(--dur-slow) var(--ease-out); display: flex; flex-direction: column; }
.drawer-v7.is-open { transform: translateX(0); }
.drawer-v7 .drawer-header { padding: var(--sp-5) var(--sp-6); border-bottom: 1px solid var(--rule); display: flex; align-items: center; justify-content: space-between; }
.drawer-v7 .drawer-body { flex: 1; overflow-y: auto; padding: var(--sp-6); }
.drawer-v7 .drawer-footer { padding: var(--sp-4) var(--sp-6); border-top: 1px solid var(--rule); display: flex; justify-content: flex-end; gap: var(--sp-3); }

/* ═══ 11. VIEW TRANSITIONS API ═══
   Base minimale ici. Pour les named transitions (header-logo, page-h1,
   blog-cover-*, pricing-card-*) + fallback CSS + reduced-motion, charger :
     design-system/components/view-transitions-v7/transitions.css
   ════════════════════════════════════════════════════════════════════════ */
@view-transition { navigation: none; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 280ms; mix-blend-mode: normal; }
:root { transition: background-color var(--dur-slow) var(--ease-out), color var(--dur-slow) var(--ease-out); }

/* ════════════════════════════════════════════════════════════════════════════
   12. FOOTER v7 — « Atelier Suisse »
   - 4 cols : brand+status+newsletter / Produit / Ressources / Entreprise
   - Trust strip : NIBT 2020 · IEC 60617 · SIA 451 · AC2025-26 · .NET 8 · JWT
   - Bottom : REV © · theme toggle · lang FR/DE/IT · drapeau Suisse
   - 0 !important. Override via spécificité naturelle.
   ════════════════════════════════════════════════════════════════════════════ */

/* Reset des overrides v6 sur la footer-v7 (purge le bloc legacy) */
footer.footer-v7 { margin-top: clamp(80px, 10vw, 160px); padding: 0; background: transparent; border-top: none; color: var(--text2); position: relative; }
footer.footer-v7::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: min(1280px, calc(100% - 40px)); height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--rule) 18%, var(--rule) 82%, transparent 100%);
  pointer-events: none;
}
.footer-v7-inner { max-width: 1280px; margin: 0 auto; padding: clamp(48px, 6vw, 80px) clamp(20px, 4vw, 40px) 32px; }

/* — GRID 4 COL — */
.footer-v7-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: clamp(32px, 4vw, 64px); margin-bottom: clamp(48px, 6vw, 72px); }
@media (max-width: 1023px) { .footer-v7-grid { grid-template-columns: 1fr 1fr 1fr; } .footer-v7-brand { grid-column: 1 / -1; max-width: 540px; } }
@media (max-width: 639px) { .footer-v7-grid { grid-template-columns: 1fr 1fr; gap: 40px 24px; } .footer-v7-brand { grid-column: 1 / -1; } }

/* — BRAND COL — */
.footer-v7-brand { display: flex; flex-direction: column; gap: 18px; }
.footer-v7-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); width: max-content; }
.footer-v7-logo:hover { color: var(--accent); }
.footer-v7-logo:hover .footer-v7-mark { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.footer-v7-mark { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: var(--radius-xs); background: var(--surface); color: var(--text); transition: background var(--dur) var(--ease-out), color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out); }
.footer-v7-mark svg { width: 18px; height: 18px; }
.footer-v7-wordmark { font-family: 'Inter', sans-serif; font-size: 1.05rem; font-weight: 700; letter-spacing: -0.012em; }
.footer-v7-tagline { font-size: 0.9rem; line-height: 1.55; color: var(--text2); max-width: 38ch; margin: 0; }
.footer-v7-tagline em { font-family: 'Instrument Serif', 'Cormorant Garamond', Georgia, serif; font-style: italic; color: var(--text); font-size: 1.02em; }

/* — STATUS PILL — */
.footer-v7-status {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--surface);
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem; letter-spacing: 0.08em;
  width: max-content;
  transition: border-color var(--dur) var(--ease-out), background var(--dur) var(--ease-out);
}
.footer-v7-status:hover { border-color: var(--border-hover); background: var(--surface-raised); }
.footer-v7-status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #2F7D5C;
  box-shadow: 0 0 0 3px rgba(47,125,92,0.18);
  position: relative;
  flex-shrink: 0;
}
.footer-v7-status-dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1px solid #2F7D5C;
  animation: footer-v7-pulse 1.8s cubic-bezier(0.32,0,0.16,1) infinite;
}
@keyframes footer-v7-pulse { 0% { transform: scale(0.85); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }
.footer-v7-status-label { color: var(--text2); text-transform: uppercase; }
.footer-v7-status-version { color: var(--text); font-weight: 500; }
@media (prefers-reduced-motion: reduce) { .footer-v7-status-dot::after { animation: none; opacity: 0; } }

/* — NEWSLETTER — */
.footer-v7-newsletter { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.footer-v7-nl-label { font-family: 'JetBrains Mono', monospace; font-size: 0.68rem; letter-spacing: 0.14em; color: var(--text3); text-transform: uppercase; }
.footer-v7-nl-row { display: flex; gap: 0; align-items: stretch; max-width: 380px; }
.footer-v7-nl-row input[type="email"] {
  flex: 1; min-width: 0;
  height: 40px; padding: 0 12px;
  font-family: 'Inter', sans-serif; font-size: 0.875rem;
  border: 1px solid var(--border); border-right: 0;
  border-radius: var(--radius-xs) 0 0 var(--radius-xs);
  background: var(--surface);
  color: var(--text);
  transition: border-color var(--dur) var(--ease-out), background var(--dur) var(--ease-out);
}
.footer-v7-nl-row input[type="email"]:focus { outline: none; border-color: var(--accent); background: var(--surface-raised); }
.footer-v7-nl-row input[type="email"]::placeholder { color: var(--text-mute); }
.footer-v7-nl-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 14px;
  font-family: 'Inter', sans-serif; font-size: 0.85rem; font-weight: 500;
  background: var(--accent); color: #FFFFFF;
  border: 1px solid var(--accent);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  cursor: pointer; white-space: nowrap;
  transition: background var(--dur) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.footer-v7-nl-btn:hover { background: var(--accent-hover, #1D4ED8); }
.footer-v7-nl-btn:active { transform: translateY(1px); }
.footer-v7-nl-btn:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; box-shadow: 0 0 0 4px rgba(37, 99, 235,0.30); }
.footer-v7-nl-btn svg { transition: transform var(--dur) var(--ease-out); }
.footer-v7-nl-btn:hover svg { transform: translateX(2px); }
.footer-v7-nl-help { font-size: 0.72rem; color: var(--text3); margin: 0; line-height: 1.5; }

/* — NAV COL — */
.footer-v7-col { display: flex; flex-direction: column; gap: 14px; }
.footer-v7-col h4 {
  font-family: 'JetBrains Mono', monospace;
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text3);
  margin: 0 0 4px;
}
.footer-v7-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-v7-col li { padding: 0; }
.footer-v7-col a {
  position: relative;
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  color: var(--text2);
  text-decoration: none;
  transition: color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.footer-v7-col a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 1px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left center;
  transition: transform var(--dur) var(--ease-out);
}
.footer-v7-col a:hover { color: var(--text); }
.footer-v7-col a:hover::after { transform: scaleX(1); }
.footer-v7-col a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* — TRUST STRIP — */
.footer-v7-trust {
  list-style: none;
  margin: 0 0 24px;
  padding: 16px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: flex; flex-wrap: wrap;
  gap: 8px 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--text3);
  text-transform: uppercase;
}
.footer-v7-trust li {
  position: relative;
  padding: 0 16px;
}
.footer-v7-trust li:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0; top: 50%; transform: translateY(-50%);
  width: 2px; height: 2px; border-radius: 50%;
  background: var(--text-mute);
}
.footer-v7-trust li:first-child { padding-left: 0; }
.footer-v7-trust li:last-child { padding-right: 0; }

/* — BOTTOM — */
.footer-v7-bottom {
  display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between;
  gap: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.10em;
  color: var(--text3);
  text-transform: uppercase;
}
.footer-v7-rev { font-size: 0.66rem; }
.footer-v7-meta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

/* Theme toggle */
.footer-v7-theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  border: 1px solid var(--border); border-radius: var(--radius-xs);
  background: var(--surface); color: var(--text2);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out), background var(--dur) var(--ease-out);
  position: relative; overflow: hidden;
}
.footer-v7-theme-toggle:hover { border-color: var(--border-hover); color: var(--text); background: var(--surface-raised); }
.footer-v7-theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.footer-v7-theme-toggle svg { position: absolute; transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); }
[data-theme="dark"] .footer-v7-icon-sun { opacity: 1; transform: rotate(0); }
[data-theme="dark"] .footer-v7-icon-moon { opacity: 0; transform: rotate(-90deg); }
[data-theme="light"] .footer-v7-icon-sun { opacity: 0; transform: rotate(90deg); }
[data-theme="light"] .footer-v7-icon-moon { opacity: 1; transform: rotate(0); }

/* Lang switcher */
.footer-v7-lang { display: inline-flex; align-items: center; gap: 0; border: 1px solid var(--border); border-radius: var(--radius-xs); overflow: hidden; height: 28px; }
.footer-v7-lang button {
  appearance: none;
  height: 100%;
  padding: 0 10px;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--text3);
  cursor: pointer;
  transition: background var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}
.footer-v7-lang button:last-child { border-right: 0; }
.footer-v7-lang button:hover:not([disabled]) { background: var(--surface-raised); color: var(--text); }
.footer-v7-lang button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.footer-v7-lang button[disabled] { opacity: 0.4; cursor: not-allowed; }
.footer-v7-lang button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* Drapeau Suisse */
.footer-v7-flag { display: inline-flex; align-items: center; gap: 8px; }
.footer-v7-flag svg { display: block; border-radius: 1px; }

/* Responsive bottom */
@media (max-width: 639px) {
  .footer-v7-bottom { flex-direction: column; align-items: flex-start; }
  .footer-v7-meta { width: 100%; justify-content: space-between; }
  .footer-v7-trust { font-size: 0.62rem; }
  .footer-v7-trust li { padding: 0 10px; }
}

/* Print */
@media print {
  footer.footer-v7 { border-top: 1px solid #000; padding: 16px 0; margin-top: 24px; }
  .footer-v7-newsletter, .footer-v7-status, .footer-v7-meta { display: none; }
  .footer-v7-grid { grid-template-columns: 1fr; gap: 8px; }
}

/* ════════════════════════════════════════════════════════════════════════════
   13. HERO LOGO MEGA — wordmark géant + éclair animé électrique
   « Electro [⚡] CAD » au centre du hero, à la place du titre verbeux.
   ════════════════════════════════════════════════════════════════════════════ */

.hero-logo-mega {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: nowrap;
  gap: clamp(4px, 0.6vw, 12px);
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: clamp(34px, 9.1vw, 132px);
  line-height: 0.92;
  letter-spacing: -0.045em;
  color: var(--text);
  margin: 0 0 clamp(20px, 3vw, 32px);
  text-align: center;
  padding: 0 12px;
  position: relative;
  user-select: none;
}

.hero-logo-word {
  display: inline-block;
  background: linear-gradient(180deg, var(--text) 0%, var(--text) 60%, color-mix(in srgb, var(--text) 80%, transparent) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: hero-logo-rise 1.2s var(--ease-out, cubic-bezier(0.32,0,0.16,1)) backwards;
}
.hero-logo-word--left  { animation-delay: 0.08s; }
.hero-logo-word--right { animation-delay: 0.36s; }

@keyframes hero-logo-rise {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-logo-bolt-wrap {
  display: inline-flex; align-items: center; justify-content: center;
  position: relative;
  width:  clamp(28px, 6.3vw, 91px);
  height: clamp(56px, 12.6vw, 182px);
  flex-shrink: 0;
  animation: hero-logo-bolt-in 1s var(--ease-spring, cubic-bezier(0.34,1.56,0.64,1)) 0.22s backwards;
}

@keyframes hero-logo-bolt-in {
  from { opacity: 0; transform: scale(0.6) rotate(-8deg); }
  to   { opacity: 1; transform: scale(1) rotate(0); }
}

.hero-logo-bolt {
  width: 100%; height: 100%;
  overflow: visible;
}

/* AURA EXTERNE — pulse lent en fond */
.bolt-aura {
  transform-origin: 50% 50%;
  animation: bolt-aura-pulse 2.4s var(--ease-in-out, cubic-bezier(0.45,0,0.55,1)) infinite;
}
@keyframes bolt-aura-pulse {
  0%, 100% { opacity: 0.25; transform: scale(0.96); }
  50%      { opacity: 0.55; transform: scale(1.12); }
}

/* FORME PRINCIPALE — flicker subtil */
.bolt-shape {
  filter: drop-shadow(0 0 8px rgba(37, 99, 235,0.45));
  animation: bolt-flicker 4.8s steps(1, end) infinite;
}
@keyframes bolt-flicker {
  0%, 8%, 14%, 100% { opacity: 1; }
  10%, 12%          { opacity: 0.78; }
  62%, 64%          { opacity: 0.85; }
}

/* CORE blanc qui scintille */
.bolt-core {
  mix-blend-mode: screen;
  opacity: 0.55;
  animation: bolt-core-shine 3.2s var(--ease-in-out, cubic-bezier(0.45,0,0.55,1)) infinite;
}
@keyframes bolt-core-shine {
  0%, 100% { opacity: 0.30; }
  50%      { opacity: 0.85; }
}

/* COURANT qui file le long du contour (dash anim) */
.bolt-current {
  stroke-dashoffset: 0;
  animation: bolt-current-flow 1.8s linear infinite;
  filter: drop-shadow(0 0 4px rgba(255,255,255,0.85));
}
@keyframes bolt-current-flow {
  from { stroke-dashoffset: 0;    }
  to   { stroke-dashoffset: -294; }
}

/* ÉTINCELLES qui ping aléatoires */
.bolt-spark { opacity: 0; transform-origin: center; }
.spark-1 { animation: bolt-spark-pop 2.6s ease-out 0.4s infinite; }
.spark-2 { animation: bolt-spark-pop 2.2s ease-out 1.1s infinite; }
.spark-3 { animation: bolt-spark-pop 3.0s ease-out 1.8s infinite; }
@keyframes bolt-spark-pop {
  0%, 80%, 100% { opacity: 0; transform: scale(0.4); }
  84%           { opacity: 1; transform: scale(1.6); filter: drop-shadow(0 0 6px #93C5FD); }
  90%           { opacity: 0.4; transform: scale(2.4); }
}

/* Sous-titre logo (la phrase qui était le H1) */
.hero-logo-sub {
  margin-top: clamp(12px, 2vw, 20px);
  text-align: center;
  font-size: clamp(15px, 1.5vw, 19px);
  line-height: 1.55;
  color: var(--text2);
  max-width: 60ch;
  margin-left: auto; margin-right: auto;
  animation: hero-logo-rise 1s var(--ease-out, cubic-bezier(0.32,0,0.16,1)) 0.5s backwards;
}
.hero-logo-sub em {
  font-family: 'Instrument Serif', 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  color: var(--text);
  font-size: 1.05em;
}

/* Mobile : éclair plus serré */
@media (max-width: 639px) {
  .hero-logo-mega { font-size: clamp(28px, 9.8vw, 56px); letter-spacing: -0.04em; gap: 2px; }
  .hero-logo-bolt-wrap { width: 22px; height: 49px; }
}

/* Reduced motion : on coupe tout sauf l'apparition */
@media (prefers-reduced-motion: reduce) {
  .bolt-aura, .bolt-shape, .bolt-core, .bolt-current, .bolt-spark { animation: none !important; }
  .hero-logo-word, .hero-logo-bolt-wrap, .hero-logo-sub { animation: none !important; }
  .bolt-current { stroke-dasharray: none; opacity: 0.6; }
}

/* ════════════════════════════════════════════════════════════════════════════
   14. NAV THEME TOGGLE — bouton clair/sombre en barre du haut
   ════════════════════════════════════════════════════════════════════════════ */

#nav .nav-theme-toggle,
.nav-theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  position: relative;
  width: 36px; height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--surface);
  color: var(--text2);
  cursor: pointer;
  overflow: hidden;
  transition: border-color var(--dur, 180ms) var(--ease-out, ease-out),
              background var(--dur, 180ms) var(--ease-out, ease-out),
              color var(--dur, 180ms) var(--ease-out, ease-out),
              transform var(--dur-fast, 100ms) var(--ease-out, ease-out);
}
.nav-theme-toggle:hover {
  border-color: var(--border-hover, var(--text3));
  background: var(--surface-raised);
  color: var(--text);
}
.nav-theme-toggle:active { transform: scale(0.95); }
.nav-theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.nav-theme-toggle svg {
  position: absolute;
  transition: opacity var(--dur, 180ms) var(--ease-out, ease-out),
              transform var(--dur-slow, 280ms) var(--ease-spring, cubic-bezier(0.34,1.56,0.64,1));
}

/* Mode dark : on affiche le soleil (= "bascule vers clair") */
[data-theme="dark"] .nav-icon-sun  { opacity: 1; transform: rotate(0)    scale(1); }
[data-theme="dark"] .nav-icon-moon { opacity: 0; transform: rotate(-90deg) scale(0.6); }

/* Mode light : on affiche la lune (= "bascule vers sombre") */
[data-theme="light"] .nav-icon-sun  { opacity: 0; transform: rotate(90deg) scale(0.6); }
[data-theme="light"] .nav-icon-moon { opacity: 1; transform: rotate(0)    scale(1); }

@media (prefers-reduced-motion: reduce) {
  .nav-theme-toggle svg { transition: opacity var(--dur, 180ms) var(--ease-out, ease-out); transform: none !important; }
}

/* Mobile : afficher le toggle dans la nav mobile aussi (à compléter dans markup mobile) */
@media (max-width: 1023px) {
  /* Le toggle est dans nav-links (lg:hidden parent) — on le garde caché desktop only pour l'instant.
     Le menu hamburger s'occupe du reste. À enrichir Sprint 5 : toggle dans le drawer. */
}

/* ═══ FIN v7 ═══ */
