/* ==========================================================================
   ASTRIONI — COMPONENTS
   Bibliothèque de composants basée 100% sur tokens.css.
   États : repos / hover / focus-visible / active / disabled.
   Accessibilité : focus visible ≥ 3:1, cibles ≥ 44px, prefers-reduced-motion.
   CSP-strict friendly : aucune dépendance, classes uniquement.
   Requiert : tokens.css chargé avant ce fichier.
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. RESET DOUX + BASE
   -------------------------------------------------------------------------- */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: var(--surface-bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  font-weight: var(--weight-regular);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

::selection {
  background: var(--brand-accent-tint);
  color: var(--text-primary);
}

:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

/* Atmosphère : fond papier + maillage discret + grain (refresh premium) */
.atmosphere {
  position: relative;
  background-color: var(--surface-bg);
  background-image: var(--mesh-1), var(--mesh-2), var(--mesh-3);
  background-repeat: no-repeat;
}
.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* --------------------------------------------------------------------------
   1. TYPOGRAPHIE — styles prêts
   -------------------------------------------------------------------------- */

.display {
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  font-size: var(--text-6xl);
  line-height: var(--leading-none);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
}
.h1, h1.ds {
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  font-size: var(--text-5xl);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}
.h2, h2.ds {
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  font-size: var(--text-4xl);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}
.h3, h3.ds {
  font-family: var(--font-display);
  font-weight: var(--weight-medium);
  font-size: var(--text-3xl);
  line-height: var(--leading-snug);
}
.h4, h4.ds {
  font-family: var(--font-display);
  font-weight: var(--weight-medium);
  font-size: var(--text-2xl);
  line-height: var(--leading-snug);
}
.h5, h5.ds {
  font-family: var(--font-body);
  font-weight: var(--weight-semibold);
  font-size: var(--text-xl);
  line-height: var(--leading-snug);
}
.h6, h6.ds {
  font-family: var(--font-body);
  font-weight: var(--weight-semibold);
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
}
.lead {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--text-secondary);
}
.body { font-size: var(--text-base); line-height: var(--leading-normal); }
.small { font-size: var(--text-sm); line-height: var(--leading-normal); }
.muted { color: var(--text-muted); }
.overline {
  font-family: var(--font-body);
  font-weight: var(--weight-semibold);
  font-size: var(--text-2xs);
  letter-spacing: var(--brand-overline-tracking, var(--tracking-overline));
  text-transform: var(--brand-overline-transform, uppercase);
  color: var(--brand-accent-text);
}
.mono {
  font-family: var(--font-mono);
  font-feature-settings: "tnum" 1;
  letter-spacing: -0.01em;
}
.text-accent { color: var(--brand-accent-text); }
.text-balance { text-wrap: balance; }
.text-pretty  { text-wrap: pretty; }

/* --------------------------------------------------------------------------
   2. LAYOUT — conteneur & section
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: var(--space-6);
}
@media (min-width: 768px) { .container { padding-inline: var(--space-8); } }
.section { padding-block: var(--space-20); }
.stack > * + * { margin-top: var(--space-4); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }

/* --------------------------------------------------------------------------
   3. BOUTONS — primaire / secondaire / ghost / danger (+ tailles)
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--tap-target);
  padding: 0 var(--space-5);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: var(--weight-semibold);
  font-size: var(--text-base);
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background-color var(--duration-fast) var(--ease-standard),
    border-color var(--duration-fast) var(--ease-standard),
    color var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard),
    transform var(--duration-instant) var(--ease-standard);
}
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
.btn .icon { width: 1.25em; height: 1.25em; }

/* Primaire — fill accent */
.btn-primary {
  background-color: var(--brand-accent);
  color: var(--brand-accent-contrast);
  box-shadow: var(--shadow-sm), var(--shadow-inset);
}
.btn-primary:hover { background-color: var(--brand-accent-strong); box-shadow: var(--shadow-md); }
.btn-primary:active { background-color: var(--brand-accent-pressed); box-shadow: var(--shadow-xs); }

/* Secondaire — outline encre */
.btn-secondary {
  background-color: var(--surface-card);
  color: var(--text-primary);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover { background-color: var(--surface-sunken); border-color: var(--color-ink); }
.btn-secondary:active { background-color: var(--surface-sunken); }

/* Ghost — texte seul */
.btn-ghost {
  background-color: transparent;
  color: var(--text-primary);
}
.btn-ghost:hover { background-color: color-mix(in srgb, var(--color-ink), transparent 92%); }
.btn-ghost:active { background-color: color-mix(in srgb, var(--color-ink), transparent 86%); }

/* Danger */
.btn-danger {
  background-color: var(--danger);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-danger:hover { background-color: color-mix(in oklab, var(--danger), #000 12%); box-shadow: var(--shadow-md); }
.btn-danger:active { background-color: color-mix(in oklab, var(--danger), #000 22%); }

/* Tailles */
.btn-sm { min-height: 36px; padding: 0 var(--space-3); font-size: var(--text-sm); border-radius: var(--radius-sm); }
.btn-lg { min-height: 52px; padding: 0 var(--space-8); font-size: var(--text-md); border-radius: var(--radius-lg); }
.btn-block { display: flex; width: 100%; }
.btn-pill { border-radius: var(--radius-pill); }
.btn-icon { padding: 0; width: var(--tap-target); aspect-ratio: 1; }

/* --------------------------------------------------------------------------
   4. LIENS
   -------------------------------------------------------------------------- */

.link {
  color: var(--brand-accent-text);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1.5px;
  text-decoration-color: var(--brand-accent-border);
  border-radius: 3px;
  transition: text-decoration-color var(--duration-fast) var(--ease-standard);
}
.link:hover { text-decoration-color: currentColor; }
.link-muted { color: var(--text-secondary); text-decoration-color: var(--border-strong); }
.link-muted:hover { color: var(--text-primary); }

/* --------------------------------------------------------------------------
   5. CHAMPS DE FORMULAIRE + VALIDATION
   -------------------------------------------------------------------------- */

.field { display: flex; flex-direction: column; gap: var(--space-2); }
.label {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
}
.label .req { color: var(--danger-text); margin-left: 2px; }
.hint { font-size: var(--text-sm); color: var(--text-muted); }

.input, .textarea, .select {
  width: 100%;
  min-height: var(--tap-target);
  padding: var(--space-3) var(--space-4);
  background-color: var(--surface-raised);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--duration-fast) var(--ease-standard),
              box-shadow var(--duration-fast) var(--ease-standard);
}
.textarea { min-height: 120px; padding: var(--space-3) var(--space-4); resize: vertical; line-height: var(--leading-normal); }
.input::placeholder, .textarea::placeholder { color: var(--text-muted); }
.input:hover, .textarea:hover, .select:hover { border-color: var(--color-ink); }
.input:focus-visible, .textarea:focus-visible, .select:focus-visible {
  outline: none;
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 var(--focus-ring-width) var(--brand-accent-ring);
}
.input:disabled, .textarea:disabled, .select:disabled {
  background-color: var(--surface-sunken);
  opacity: 0.6;
  cursor: not-allowed;
}

.select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-secondary) 50%),
    linear-gradient(135deg, var(--text-secondary) 50%, transparent 50%);
  background-position: calc(100% - 20px) center, calc(100% - 14px) center;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: var(--space-10);
}

/* États de validation */
.field.is-valid .input,
.field.is-valid .textarea,
.field.is-valid .select { border-color: var(--success); }
.field.is-invalid .input,
.field.is-invalid .textarea,
.field.is-invalid .select { border-color: var(--danger); }
.field.is-invalid .input:focus-visible,
.field.is-invalid .textarea:focus-visible { box-shadow: 0 0 0 var(--focus-ring-width) color-mix(in srgb, var(--danger), transparent 60%); }
.field-msg { font-size: var(--text-sm); display: flex; align-items: center; gap: var(--space-2); }
.field.is-invalid .field-msg { color: var(--danger-text); }
.field.is-valid .field-msg { color: var(--success-text); }

/* Cases / radios / switch */
.check { display: inline-flex; align-items: center; gap: var(--space-3); cursor: pointer; min-height: var(--tap-target); }
.check input { width: 20px; height: 20px; accent-color: var(--brand-accent); }
.switch { position: relative; display: inline-flex; align-items: center; gap: var(--space-3); cursor: pointer; min-height: var(--tap-target); }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track {
  width: 44px; height: 26px; border-radius: var(--radius-pill);
  background: var(--border-strong);
  transition: background-color var(--duration-base) var(--ease-standard);
  flex: none;
}
.switch .thumb {
  position: absolute; left: 3px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; border-radius: 50%; background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-base) var(--ease-emphasized);
}
.switch input:checked ~ .track { background: var(--brand-accent); }
.switch input:checked ~ .thumb { transform: translate(18px, -50%); }
.switch input:focus-visible ~ .track { box-shadow: 0 0 0 var(--focus-ring-width) var(--brand-accent-ring); }

/* --------------------------------------------------------------------------
   6. CARTES
   -------------------------------------------------------------------------- */

.card {
  background-color: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-6);
}
.card-hover { transition: transform var(--duration-base) var(--ease-standard), box-shadow var(--duration-base) var(--ease-standard); }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card-flush { padding: 0; overflow: hidden; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-4); }
.card-title { font-family: var(--font-display); font-weight: var(--weight-medium); font-size: var(--text-xl); }
.card-media { aspect-ratio: 16 / 10; background: var(--surface-sunken); }

/* --------------------------------------------------------------------------
   7. EN-TÊTE DE NAVIGATION + LOGO (wordmark A***ONI)
   -------------------------------------------------------------------------- */

.navbar {
  position: sticky; top: 0; z-index: var(--z-sticky);
  display: flex; align-items: center; gap: var(--space-6);
  min-height: 68px;
  padding-inline: var(--space-6);
  background: color-mix(in srgb, var(--surface-bg-soft), transparent 14%);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border-subtle);
}
.navbar .brand-spacer { flex: 1; }
.nav-links { display: flex; align-items: center; gap: var(--space-1); list-style: none; margin: 0; padding: 0; }
.nav-link {
  display: inline-flex; align-items: center; min-height: 40px;
  padding: 0 var(--space-3); border-radius: var(--radius-sm);
  font-weight: var(--weight-medium); font-size: var(--text-sm);
  color: var(--text-secondary); text-decoration: none;
  transition: background-color var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard);
}
.nav-link:hover { background: color-mix(in srgb, var(--color-ink), transparent 92%); color: var(--text-primary); }
.nav-link[aria-current="page"] { color: var(--text-primary); }
.nav-link[aria-current="page"]::after {
  content: ""; display: block; height: 2px; width: 100%;
  margin-top: 4px; border-radius: 2px; background: var(--brand-accent);
}

/* LOGO : wordmark — A initial + I final colorés pour faire émerger « AI » */
.logo {
  display: inline-flex; align-items: baseline; gap: 0;
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  font-size: var(--text-2xl);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
  text-decoration: none;
  line-height: 1;
}
.logo .a, .logo .i { color: var(--brand-accent-text); }
.logo-sm { font-size: var(--text-xl); }
.logo-lg { font-size: var(--text-4xl); }
/* Pastille marque optionnelle devant le wordmark */
.logo-mark {
  display: inline-grid; place-items: center;
  width: 1.5em; height: 1.5em; margin-right: 0.4em;
  border-radius: var(--radius-sm);
  background: var(--brand-accent); color: var(--brand-accent-contrast);
  font-size: 0.78em; font-weight: var(--weight-bold);
}

/* --------------------------------------------------------------------------
   8. PIED DE PAGE
   -------------------------------------------------------------------------- */

.footer {
  background: var(--surface-inverse);
  color: var(--text-inverse-soft);
  padding-block: var(--space-16) var(--space-8);
}
.footer a { color: var(--text-inverse-soft); text-decoration: none; }
.footer a:hover { color: var(--text-inverse); }
.footer .logo { color: var(--text-inverse); }
.footer-grid { display: grid; gap: var(--space-8); grid-template-columns: 1.5fr repeat(3, 1fr); }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-col h4 { font-family: var(--font-body); font-size: var(--text-sm); text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--text-inverse); margin: 0 0 var(--space-4); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); font-size: var(--text-sm); }
.footer-bottom { margin-top: var(--space-12); padding-top: var(--space-6); border-top: 1px solid var(--border-inverse); display: flex; flex-wrap: wrap; gap: var(--space-4); justify-content: space-between; font-size: var(--text-sm); }

/* --------------------------------------------------------------------------
   9. BADGES / PILLS
   -------------------------------------------------------------------------- */

.badge {
  display: inline-flex; align-items: center; gap: var(--space-1);
  padding: 3px var(--space-2);
  border-radius: var(--radius-xs);
  font-size: var(--text-xs); font-weight: var(--weight-semibold);
  line-height: 1.4;
}
.pill { border-radius: var(--radius-pill); padding-inline: var(--space-3); }
.badge-accent  { background: var(--brand-accent-soft); color: var(--brand-accent-text); }
.badge-neutral { background: var(--surface-sunken); color: var(--text-secondary); }
.badge-success { background: var(--success-soft); color: var(--success-text); }
.badge-warning { background: var(--warning-soft); color: var(--warning-text); }
.badge-danger  { background: var(--danger-soft);  color: var(--danger-text); }
.badge-info    { background: var(--info-soft);    color: var(--info-text); }
.badge-solid   { background: var(--brand-accent); color: var(--brand-accent-contrast); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* --------------------------------------------------------------------------
   10. TABLEAUX
   -------------------------------------------------------------------------- */

.table-wrap { overflow-x: auto; border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); background: var(--surface-card); }
.table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.table th, .table td { padding: var(--space-3) var(--space-4); text-align: left; }
.table thead th {
  font-weight: var(--weight-semibold); color: var(--text-secondary);
  font-size: var(--text-xs); text-transform: uppercase; letter-spacing: var(--tracking-wide);
  background: var(--surface-bg-soft);
  border-bottom: 1px solid var(--border-default);
  position: sticky; top: 0;
}
.table tbody tr { border-bottom: 1px solid var(--border-subtle); }
.table tbody tr:last-child { border-bottom: none; }
.table tbody tr:hover { background: var(--surface-bg-soft); }
.table td.num { font-family: var(--font-mono); text-align: right; font-feature-settings: "tnum" 1; }

/* --------------------------------------------------------------------------
   11. ALERTES / TOASTS
   -------------------------------------------------------------------------- */

.alert {
  display: flex; gap: var(--space-3); align-items: flex-start;
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  border-left-width: 4px;
}
.alert-icon { flex: none; width: 22px; height: 22px; }
.alert-body { display: flex; flex-direction: column; gap: 2px; }
.alert-title { font-weight: var(--weight-semibold); }
.alert-info    { background: var(--info-soft);    border-color: var(--info);    color: var(--info-text); }
.alert-success { background: var(--success-soft); border-color: var(--success); color: var(--success-text); }
.alert-warning { background: var(--warning-soft); border-color: var(--warning); color: var(--warning-text); }
.alert-danger  { background: var(--danger-soft);  border-color: var(--danger);  color: var(--danger-text); }

.toast {
  display: flex; gap: var(--space-3); align-items: center;
  min-width: 280px; max-width: 380px;
  padding: var(--space-4);
  background: var(--surface-inverse); color: var(--text-inverse);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
}
.toast .toast-accent { width: 4px; align-self: stretch; border-radius: 999px; background: var(--brand-accent); }
.toast-stack { position: fixed; right: var(--space-6); bottom: var(--space-6); z-index: var(--z-toast); display: flex; flex-direction: column; gap: var(--space-3); }

/* --------------------------------------------------------------------------
   12. HERO
   -------------------------------------------------------------------------- */

.hero { padding-block: var(--space-24); }
.hero-eyebrow { margin-bottom: var(--space-4); }
.hero-title { font-family: var(--font-display); font-weight: var(--weight-semibold); font-size: clamp(2.5rem, 6vw, var(--text-6xl)); line-height: var(--leading-tight); letter-spacing: var(--tracking-tight); max-width: 16ch; text-wrap: balance; }
.hero-sub { margin-top: var(--space-5); font-size: var(--text-lg); line-height: var(--leading-relaxed); color: var(--text-secondary); max-width: 52ch; text-wrap: pretty; }
.hero-actions { margin-top: var(--space-8); display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* --------------------------------------------------------------------------
   13. CARTES DE TARIFICATION
   -------------------------------------------------------------------------- */

.pricing-grid { display: grid; gap: var(--space-6); grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.price-card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: var(--space-8);
  display: flex; flex-direction: column; gap: var(--space-5);
}
.price-card.is-featured {
  border-color: var(--brand-accent);
  box-shadow: var(--shadow-lg);
  position: relative;
}
.price-card.is-featured::before {
  content: "Recommandé";
  position: absolute; top: 0; right: var(--space-6); transform: translateY(-50%);
  background: var(--brand-accent); color: var(--brand-accent-contrast);
  font-size: var(--text-2xs); font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wide); text-transform: uppercase;
  padding: 4px var(--space-3); border-radius: var(--radius-pill);
}
.price-amount { font-family: var(--font-display); font-size: var(--text-5xl); font-weight: var(--weight-semibold); line-height: 1; color: var(--brand-accent-text); }
.ten-twelve { margin: var(--space-6) auto 0; max-width: 60ch; text-align: center; background: var(--brand-accent-soft); border: 1px solid var(--brand-accent-border); border-radius: var(--radius-md); padding: var(--space-4) var(--space-5); color: var(--text-secondary); font-size: var(--text-sm); }
.ten-twelve strong { color: var(--brand-accent-text); }
.price-amount .per { font-family: var(--font-body); font-size: var(--text-base); font-weight: var(--weight-regular); color: var(--text-muted); }
.price-features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.price-features li { display: flex; gap: var(--space-3); align-items: flex-start; font-size: var(--text-sm); }
.price-features .tick { color: var(--brand-accent-text); flex: none; font-weight: var(--weight-bold); }

/* --------------------------------------------------------------------------
   14. BANDEAU CTA
   -------------------------------------------------------------------------- */

.cta-banner {
  background: var(--surface-inverse);
  color: var(--text-inverse);
  border-radius: var(--radius-xl);
  padding: var(--space-12);
  display: flex; flex-wrap: wrap; gap: var(--space-8);
  align-items: center; justify-content: space-between;
  position: relative; overflow: hidden;
}
.cta-banner::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 120% at 100% 0%, color-mix(in oklab, var(--brand-accent), transparent 78%), transparent 60%);
}
.cta-banner > * { position: relative; }
.cta-banner h3 { font-family: var(--font-display); font-size: var(--text-3xl); margin: 0 0 var(--space-2); color: var(--text-inverse); }
.cta-banner p { margin: 0; color: var(--text-inverse-soft); max-width: 46ch; }

/* --------------------------------------------------------------------------
   15. ONGLETS
   -------------------------------------------------------------------------- */

.tabs { display: flex; gap: var(--space-1); border-bottom: 1px solid var(--border-default); }
.tab {
  appearance: none; background: none; border: none; cursor: pointer;
  min-height: 44px; padding: 0 var(--space-4);
  font-weight: var(--weight-semibold); font-size: var(--text-sm);
  color: var(--text-secondary);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard);
}
.tab:hover { color: var(--text-primary); }
.tab[aria-selected="true"] { color: var(--brand-accent-text); border-bottom-color: var(--brand-accent); }
.tab-panel { padding-top: var(--space-5); }
.tab-panel[hidden] { display: none; }

/* --------------------------------------------------------------------------
   16. MODALE
   -------------------------------------------------------------------------- */

.modal-backdrop {
  position: fixed; inset: 0; z-index: var(--z-modal);
  display: grid; place-items: center; padding: var(--space-4);
  background: color-mix(in srgb, var(--navy-950), transparent 40%);
  backdrop-filter: blur(2px);
}
.modal-backdrop[hidden] { display: none; }
.modal {
  width: 100%; max-width: 480px;
  background: var(--surface-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: var(--space-8);
  display: flex; flex-direction: column; gap: var(--space-4);
}
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); }
.modal-title { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: var(--weight-medium); margin: 0; }
.modal-close {
  appearance: none; border: none; background: none; cursor: pointer;
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  display: grid; place-items: center; color: var(--text-secondary);
  font-size: var(--text-xl);
}
.modal-close:hover { background: var(--surface-sunken); color: var(--text-primary); }
.modal-actions { display: flex; gap: var(--space-3); justify-content: flex-end; margin-top: var(--space-2); }

/* --------------------------------------------------------------------------
   17. FIL D'ARIANE
   -------------------------------------------------------------------------- */

.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--text-muted); }
.breadcrumb a { color: var(--text-secondary); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand-accent-text); }
.breadcrumb .sep { color: var(--border-strong); }
.breadcrumb [aria-current="page"] { color: var(--text-primary); font-weight: var(--weight-medium); }

/* --------------------------------------------------------------------------
   18. SCORE GAUGE 0–100 (arkhoni / athenori)
   -------------------------------------------------------------------------- */

.gauge {
  --gauge-value: 72;
  --gauge-size: 168px;
  --gauge-track: var(--surface-sunken);
  --gauge-fill: var(--brand-accent);
  width: var(--gauge-size); height: var(--gauge-size);
  display: grid; place-items: center; position: relative;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, var(--surface-card) 78%, transparent 79% 100%),
    conic-gradient(var(--gauge-fill) calc(var(--gauge-value) * 1%), var(--gauge-track) 0);
}
.gauge.is-low    { --gauge-fill: var(--danger); }
.gauge.is-mid    { --gauge-fill: var(--warning); }
.gauge.is-high   { --gauge-fill: var(--success); }
.gauge-num {
  font-family: var(--font-mono);
  font-size: calc(var(--gauge-size) * 0.27);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  line-height: 1; font-feature-settings: "tnum" 1;
}
.gauge-label { font-size: var(--text-xs); color: var(--text-muted); text-transform: uppercase; letter-spacing: var(--tracking-wide); }
.gauge-sm { --gauge-size: 96px; }
.gauge-lg { --gauge-size: 220px; }

/* Barre de score linéaire (alternative compacte) */
.score-bar { height: 10px; border-radius: 999px; background: var(--surface-sunken); overflow: hidden; }
.score-bar > span { display: block; height: 100%; border-radius: 999px; background: var(--brand-accent); transition: width var(--duration-slow) var(--ease-emphasized); }

/* --------------------------------------------------------------------------
   19. DIVERS — séparateur, kbd, tooltip
   -------------------------------------------------------------------------- */

.divider { height: 1px; background: var(--border-default); border: none; margin-block: var(--space-6); }
.kbd { font-family: var(--font-mono); font-size: var(--text-xs); padding: 2px 6px; border-radius: 6px; background: var(--surface-sunken); border: 1px solid var(--border-default); box-shadow: 0 1px 0 var(--border-strong); }

.tooltip { position: relative; display: inline-flex; }
.tooltip > .tip {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: var(--surface-inverse); color: var(--text-inverse);
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm);
  font-size: var(--text-xs); white-space: nowrap; box-shadow: var(--shadow-md);
  opacity: 0; pointer-events: none; transition: opacity var(--duration-fast) var(--ease-standard);
}
.tooltip:hover > .tip, .tooltip:focus-within > .tip { opacity: 1; }
