@charset "utf-8";

/* ==========================================================================
   Sonora — feuille de style unique (aucune dépendance, aucun build)
   Jetons → base → composants → utilitaires.
   ========================================================================== */

:root {
    /* Encre */
    --color-ink: #16181d;
    --color-ink-soft: #3a404a;
    --color-muted: #5f6670;
    --color-faint: #8f949d;

    /* Surfaces */
    --color-canvas: #fafafb;
    --color-surface: #ffffff;
    --color-sunken: #f4f5f6;
    --color-line: #ecedf0;
    --color-line-strong: #dadce1;

    /* Marque */
    --color-primary: #2f6bd6;
    --color-primary-hover: #2a5fbe;
    --color-primary-soft: #eef3fd;

    /* Statuts */
    --color-success: #0f7b4f;
    --color-success-soft: #e9f7ef;
    --color-warning: #a8620a;
    --color-warning-soft: #fdf4e6;
    --color-danger: #c0392b;
    --color-danger-soft: #fdeeec;

    /* Rayons */
    --radius-xs: 5px;
    --radius-sm: 7px;
    --radius-md: 10px;
    --radius-lg: 14px;

    /* Typographie (base 14 px) */
    --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    --text-2xs: 0.6875rem;
    --text-xs: 0.75rem;
    --text-sm: 0.8125rem;
    --text-base: 0.875rem;
    --text-lg: 1rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.625rem;
}

[data-theme="dark"] {
    --color-ink: #ecedf0;
    --color-ink-soft: #c5c9d1;
    --color-muted: #9aa0a9;
    --color-faint: #7b818b;
    --color-canvas: #0d0f12;
    --color-surface: #15181d;
    --color-sunken: #1c2026;
    --color-line: #252a31;
    --color-line-strong: #333941;
    --color-primary-soft: #16233c;
    --color-success-soft: #10251b;
    --color-warning-soft: #2a1f0e;
    --color-danger-soft: #2a1512;
}

/* --- Base ---------------------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    color-scheme: light;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--color-canvas);
    color: var(--color-ink);
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    color: var(--color-ink);
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.25;
}

p, ul, ol, figure {
    margin: 0;
}

ul, ol {
    padding: 0;
    list-style: none;
}

a {
    color: inherit;
    text-decoration: none;
}

img, svg, video, canvas {
    display: block;
    max-width: 100%;
}

button, input, select, textarea {
    font: inherit;
    color: inherit;
}

button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

::selection {
    background: var(--color-primary-soft);
    color: var(--color-ink);
}

h1:focus,
h2:focus {
    outline: none;
}

/* --- Composants ---------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--color-ink);
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background: #23262d;
}

[data-theme="dark"] .btn-primary {
    background: #f4f5f6;
    color: #16181d;
}

.btn-brand {
    background: var(--color-primary);
    color: #fff;
}

.btn-brand:hover:not(:disabled) {
    background: var(--color-primary-hover);
}

.btn-secondary {
    background: var(--color-surface);
    border-color: var(--color-line-strong);
    color: var(--color-ink);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--color-sunken);
}

.btn-ghost {
    background: transparent;
    color: var(--color-muted);
}

.btn-ghost:hover:not(:disabled) {
    background: var(--color-sunken);
    color: var(--color-ink);
}

.btn-sm {
    padding: 0.4rem 0.7rem;
    font-size: var(--text-xs);
}

/* Indicateur d'activité des boutons (remplace celui de Lumex). */
.btn-spinner {
    width: 13px;
    height: 13px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: btn-spin 0.7s linear infinite;
    opacity: 0.85;
}

@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

.card {
    background: var(--color-surface);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
}

.card-pad {
    padding: 1.25rem;
}

.card-title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-ink);
}

.eyebrow {
    font-size: var(--text-2xs);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-faint);
}

.label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--color-ink-soft);
}

.field {
    width: 100%;
    padding: 0.625rem 0.75rem;
    background: var(--color-surface);
    border: 1px solid var(--color-line-strong);
    border-radius: var(--radius-sm);
    color: var(--color-ink);
    font-size: var(--text-base);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field::placeholder {
    color: var(--color-faint);
}

.field:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-soft);
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.1875rem 0.5rem;
    border-radius: 999px;
    background: var(--color-sunken);
    color: var(--color-muted);
    font-size: var(--text-2xs);
    font-weight: 600;
    white-space: nowrap;
}

.pill-primary { background: var(--color-primary-soft); color: var(--color-primary); }
.pill-success { background: var(--color-success-soft); color: var(--color-success); }
.pill-warning { background: var(--color-warning-soft); color: var(--color-warning); }
.pill-danger  { background: var(--color-danger-soft);  color: var(--color-danger); }

.nav-section {
    margin: 1.25rem 0 0.375rem;
    padding: 0 0.75rem;
    font-size: var(--text-2xs);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-faint);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--color-ink-soft);
    font-size: var(--text-sm);
    font-weight: 500;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-item:hover {
    background: var(--color-sunken);
    color: var(--color-ink);
}

.nav-item.is-active {
    background: var(--color-sunken);
    color: var(--color-ink);
    font-weight: 600;
}

.divider {
    height: 1px;
    background: var(--color-line);
}

.muted {
    color: var(--color-muted);
}

.material-symbols-rounded {
    font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
    font-size: inherit;
    line-height: 1;
    vertical-align: middle;
}

/* ==========================================================================
   Utilitaires — la centaine réellement utilisée dans les vues, écrite ici
   plutôt que générée par un outil. Convention : une classe = une propriété.
   ========================================================================== */

/* Affichage et flux */
.block { display: block; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.hidden { display: none; }
.contents { display: contents; }
.relative { position: relative; }

.flex-1 { flex: 1 1 0%; }
.shrink-0 { flex-shrink: 0; }
.min-w-0 { min-width: 0; }
.w-full { width: 100%; }

.items-center { align-items: center; }
.justify-center { justify-content: center; }

/* Espacements */
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-3\.5 { gap: 0.875rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }

.p-3 { padding: 0.75rem; }
.p-8 { padding: 2rem; }
.px-4 { padding-inline: 1rem; }

/* Dimensions */
.w-6 { width: 1.5rem; }
.w-10 { width: 2.5rem; }
.w-11 { width: 2.75rem; }
.w-14 { width: 3.5rem; }
.w-16 { width: 4rem; }
.w-20 { width: 5rem; }

.h-6 { height: 1.5rem; }
.h-10 { height: 2.5rem; }
.h-11 { height: 2.75rem; }
.h-14 { height: 3.5rem; }
.h-16 { height: 4rem; }

.min-h-screen { min-height: 100vh; }
.min-h-\[80vh\] { min-height: 80vh; }

/* Typographie */
.text-\[10px\] { font-size: 10px; }
.text-\[16px\] { font-size: 16px; }
.text-\[20px\] { font-size: 20px; }
.text-\[28px\] { font-size: 28px; }
.text-\[48px\] { font-size: 48px; }
.text-\[64px\] { font-size: 64px; }
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-6xl { font-size: 3.75rem; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-mono { font-family: var(--font-mono); }

.tracking-tight { letter-spacing: -0.025em; }
.tracking-widest { letter-spacing: 0.1em; }

.text-center { text-align: center; }
.uppercase { text-transform: uppercase; }
.capitalize { text-transform: capitalize; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Couleurs de texte */
.text-ink { color: var(--color-ink); }
.text-ink-soft { color: var(--color-ink-soft); }
.text-muted { color: var(--color-muted); }
.text-faint { color: var(--color-faint); }
.text-primary { color: var(--color-primary); }
.text-zinc-400,
.text-zinc-500 { color: var(--color-muted); }
.text-zinc-600 { color: var(--color-ink-soft); }
.text-zinc-900 { color: var(--color-ink); }

/* Fonds */
.bg-surface { background-color: var(--color-surface); }
.bg-sunken { background-color: var(--color-sunken); }
.bg-white { background-color: #fff; }
.bg-zinc-100 { background-color: var(--color-sunken); }
.bg-primary-soft { background-color: var(--color-primary-soft); }
.bg-red-500 { background-color: var(--color-danger); }

/* Bordures */
.border {
    border-width: 1px;
    border-style: solid;
    border-color: var(--color-line);
}

.border-2 { border-width: 2px; border-style: solid; }
.border-4 { border-width: 4px; border-style: solid; }
.border-dashed { border-style: dashed; }
.border-line { border-color: var(--color-line); }
.border-zinc-200,
.border-zinc-300 { border-color: var(--color-line-strong); }

.rounded { border-radius: 0.25rem; }
.rounded-\[10px\] { border-radius: 10px; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

/* Variantes sombres */
[data-theme="dark"] .dark\:block { display: block; }
[data-theme="dark"] .dark\:hidden { display: none; }
[data-theme="dark"] .dark\:text-white { color: #fff; }
[data-theme="dark"] .dark\:text-zinc-300 { color: var(--color-line-strong); }
[data-theme="dark"] .dark\:text-zinc-400 { color: var(--color-muted); }
[data-theme="dark"] .dark\:bg-zinc-800,
[data-theme="dark"] .dark\:bg-zinc-900 { background-color: var(--color-sunken); }
[data-theme="dark"] .dark\:border-zinc-700 { border-color: var(--color-line); }
[data-theme="dark"] .dark\:hover\:bg-zinc-700:hover { background-color: var(--color-line); }
