﻿/* ============================================================
         Thème Acier (ancien)
         ============================================================ */
/* Google Fonts chargées via <link> non-bloquants dans app.html */

:root {
    --font-main: 'Poppins', Arial, sans-serif;
    --color-bg: #f4f6fa;
    --color-card: #f9f9f9;
    --color-primary: #3a3d42;
    --color-accent: #b0bec5;
    --color-accent2: #90a4ae;
    --color-glass: #fff;
    --color-border: #d1d5db;
    --color-text: #23272b;
    --color-muted: #7b7f85;
    --color-shadow: 0 2px 8px 0 rgba(60,72,88,0.08);
    --color-h1: #3a3d42;
    --color-h2: #5c5f66;
    --color-h3: #7b7f85;
    --color-h4: #b0bec5;
}

body {
    font-family: var(--font-main);
    background: var(--color-bg);
    color: var(--color-text);
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Ajoutez ici les styles spécifiques de l'ancien thème acier si besoin */
/* ============================================================
   Onboarding — Guide niveau 3
   ============================================================ */
.onb-grayscale-el {
    filter: grayscale(1) brightness(0.82) !important;
    transition: filter 0.35s ease;
}
.onb-spotlight-target {
    border-radius: 8px;
    animation: onb-pulse 1.2s ease-in-out infinite;
}
@keyframes onb-pulse {
    0%, 100% { box-shadow: 0 0 0 3px var(--accent), 0 0 12px rgba(59,130,246,0.6); }
    50%       { box-shadow: 0 0 0 5px var(--accent), 0 0 28px rgba(59,130,246,0.9); }
}

.onb-required-group {
    border-left: 3px solid var(--accent) !important;
    padding-left: 0.75rem !important;
    border-radius: 6px;
    background: color-mix(in srgb, var(--accent) 4%, transparent) !important;
    transition: all 0.2s;
}
.onb-optional-group {
    opacity: 0.35;
    filter: grayscale(0.4);
    transition: all 0.2s;
}
.onb-optional-group:focus-within {
    opacity: 1;
    filter: none;
}

/* Dropdown Documentation Footer */
.doc-dropdown-container {
    position: relative;
    display: inline-block;
}

.doc-dropdown-menu {
    position: absolute;
    left: 0;
    top: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    min-width: 220px;
    z-index: 100;
    padding: 0.5rem 0;
}
.doc-dropdown-menu a {
    display: block;
    padding: 0.7rem 1.2rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.2s;
}
.doc-dropdown-menu a:hover {
    background: var(--accent-glow, rgba(0,180,216,0.08));
    color: var(--accent);
}
/* ============================================================
   OK CUISINE PRO — CSS V2
   Design professionnel avec emojis conservés
   Typographie Poppins, palette harmonisée, animations fluides
   ============================================================ */

/* Google Fonts chargées via <link> non-bloquants dans app.html */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* Palette Landing Page - Modern glassmorphism */
    --bg-primary: #05060a;
    --bg-secondary: #0a0c16;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-input: rgba(255, 255, 255, 0.06);
    --bg-hover: rgba(0, 255, 213, 0.06);

    /* Textes avec meilleur contraste */
    --text-primary: #f3f6fa;
    --text-secondary: #b6c2e2;
    --text-muted: #6b7280;

    /* Accent - Bleu/teal/violet landing */
    --accent: #00ffd5;
    --accent-light: #3b82f6;
    --accent-dark: #a855f7;
    --accent-glow: rgba(0, 255, 213, 0.12);

    /* Couleurs sémantiques modernisées */
    --success: #22e6a6;
    --success-light: #5fffd5;
    --success-dark: #0fb98b;
    --success-glow: rgba(34, 230, 166, 0.12);

    --warning: #ffe066;
    --warning-light: #fff7ae;
    --warning-dark: #e6b800;
    --warning-glow: rgba(255, 224, 102, 0.12);

    --danger: #ff5e5e;
    --danger-light: #ffb3b3;
    --danger-dark: #d90429;
    --danger-glow: rgba(255, 94, 94, 0.12);

    --info: #3b82f6;
    --info-light: #a5d8ff;
    --info-dark: #2563eb;

    /* Bordures et ombres glassmorphism — blanc translucide comme la référence */
    --border: rgba(255, 255, 255, 0.08);
    --border-light: rgba(0, 255, 213, 0.45);
    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.2);
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(0, 255, 213, 0.15);

    /* Rayons arrondis cohérents */
    --radius: 18px;
    --radius-sm: 12px;
    --radius-lg: 28px;
    --radius-xl: 40px;

    /* Transitions V2 */
    --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.33s cubic-bezier(0.4, 0, 0.2, 1);

    /* Layout */
    --sidebar-width: 260px;
    --topbar-height: 68px;

    /* Typographie V3 - Inter */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Inter', sans-serif;
    --font-alt: 'Inter', sans-serif;
}

/* Fond étoiles galaxie — masqué par défaut, visible uniquement avec .theme-galaxie */
#galaxie-bg-canvas { display: none !important; }
body.theme-galaxie #galaxie-bg-canvas { display: block !important; }

html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.01em;
    line-height: 1.6;
}

/* --- V2 Global Enhancements --- */
::selection {
    background: var(--accent);
    color: white;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-light);
}

/* --- Écrans --- */
.screen { display: none; min-height: 100vh; position: relative; z-index: 1; }
.screen.active { display: flex; }

/* ============================================================
   LOGIN — V2 Polish
   ============================================================ */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    padding: 2rem;
    background: transparent;
    position: relative;
    overflow: hidden;
}

/* Subtle animated background */
.login-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 30%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 70% 70%, rgba(34, 197, 94, 0.05) 0%, transparent 50%);
    animation: loginBgFloat 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes loginBgFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-2%, -2%) rotate(5deg); }
}

.login-logo {
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 1;
}

.logo-icon {
    font-size: 4.5rem;
    margin-bottom: 0.75rem;
    filter: drop-shadow(0 4px 12px rgba(59, 130, 246, 0.3));
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.login-logo h1 {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.login-logo h1 span,
.login-logo h1 {
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 1.15rem;
    margin-top: 0.5rem;
    font-weight: 500;
}

.login-form {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg), 0 0 0 1px var(--border);
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
}

.login-form label {
    display: block;
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* User list V2 */
.user-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.user-list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    background: var(--bg-input);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    border: 2px solid transparent;
    box-shadow: var(--shadow-sm);
}

.user-list-item:hover, .user-list-item:focus {
    border-color: var(--accent);
    background: var(--accent-glow);
    transform: translateY(-2px);
    box-shadow: var(--shadow), var(--shadow-glow);
}

.user-list-item:active {
    transform: translateY(0);
}

.user-list-item .avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.user-list-item .user-info {
    flex: 1;
}

.user-list-item .user-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.user-list-item .user-role {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* PIN pad V2 */
.pin-section { text-align: center; }

.pin-display {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    margin: 2rem 0;
}

.pin-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    transition: all var(--transition);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.pin-dot.filled {
    background: var(--accent);
    box-shadow: 0 2px 12px rgba(59, 130, 246, 0.4);
    transform: scale(1.1);
}

.pin-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
    max-width: 300px;
    margin: 0 auto;
}

.pin-btn {
    padding: 1rem;
    font-size: 1.6rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    background: var(--bg-input);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition);
    min-height: 68px;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.pin-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition);
}

.pin-btn:hover {
    background: var(--bg-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.pin-btn:hover::before {
    opacity: 1;
}

.pin-btn:active {
    transform: scale(0.95) translateY(0);
    box-shadow: var(--shadow-sm);
}

.pin-btn-clear {
    color: var(--warning);
    font-size: 1.3rem;
    background: var(--warning-glow);
}

.pin-btn-clear:hover {
    background: rgba(245, 158, 11, 0.25);
}

.pin-btn-ok {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.pin-btn-ok:hover {
    background: linear-gradient(135deg, var(--success-light) 0%, var(--success) 100%);
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.4);
}

.btn-link {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 0.95rem;
    text-decoration: underline;
    margin-top: 1rem;
}

.login-footer {
    margin-top: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ============================================================
   MAIN LAYOUT
   ============================================================ */
#main-screen {
    display: none;
    flex-direction: column;
    min-height: 100vh;
}

#main-screen.active {
    display: flex;
}

/* Top bar V2 — glass style */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-height);
    background: rgba(5, 6, 10, 0.75);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 10px;
    transition: all var(--transition);
}

.menu-toggle:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition);
}

.menu-toggle:hover span {
    background: var(--accent);
}

.top-bar-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.voice-status {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.voice-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--danger);
    box-shadow: 0 0 6px var(--danger);
}

.voice-dot.active {
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
    animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.user-badge {
    cursor: pointer;
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.15rem;
    color: #fff;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    transition: all var(--transition);
}

.user-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Sidebar V2 — glass style */
.sidebar {
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: rgba(8, 10, 18, 0.88);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    z-index: 90;
    transform: translateX(-100%);
    transition: transform var(--transition-slow);
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.sidebar.open {
    transform: translateX(0);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 85;
}

.sidebar-overlay.active { display: block; }

/* Sidebar Brand Header V2 */
.sidebar-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.08) 0%, transparent 100%);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-brand-icon {
    font-size: 1.75rem;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-glow) 0%, rgba(59, 130, 246, 0.08) 100%);
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
}

.sidebar-brand-name {
    font-size: 1.1rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
}

.sidebar-brand-sub {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Sidebar View Toggle (admin essential/full mode) */
.sidebar-view-toggle {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
}

.view-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.6rem;
    background: rgba(0,180,216,0.08);
    border: 1px solid rgba(0,180,216,0.2);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: var(--transition);
}

.view-toggle-btn:hover {
    background: rgba(0,180,216,0.15);
    border-color: rgba(0,180,216,0.4);
}

.view-toggle-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.view-toggle-label {
    flex: 1;
    text-align: left;
}

.view-toggle-switch {
    flex-shrink: 0;
}

.view-toggle-track {
    display: block;
    width: 36px;
    height: 20px;
    background: var(--bg-input);
    border-radius: 10px;
    position: relative;
    transition: background 0.3s ease;
}

.view-toggle-track.active {
    background: var(--accent);
}

.view-toggle-thumb {
    display: block;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.view-toggle-track.active .view-toggle-thumb {
    transform: translateX(16px);
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    list-style: none;
    padding: 0.25rem 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* Nav Group (collapsible section) */
.nav-group {
    list-style: none;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.nav-group-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.7rem 0.8rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-group-toggle:hover {
    background: rgba(255,255,255,0.03);
    color: var(--text-primary);
}

.nav-group-color {
    width: 3px;
    height: 18px;
    border-radius: 3px;
    flex-shrink: 0;
}

.nav-group-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.nav-group-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-group-arrow {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-muted);
    transition: transform 0.2s ease;
    flex-shrink: 0;
    line-height: 1;
}

.nav-group.open > .nav-group-toggle .nav-group-arrow {
    transform: rotate(90deg);
}

.nav-group-badge {
    border-radius: 10px;
    padding: 0 6px;
    width: auto;
    min-width: 20px;
    height: 18px;
    font-size: 0.6rem;
}

/* Nav Group Items (collapsible) */
.nav-group-items {
    list-style: none;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.nav-group.open > .nav-group-items {
    max-height: 2000px;
}

/* Nav Item V2 */
.nav-item button {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    padding: 0.65rem 1.1rem 0.65rem 2.2rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition);
    text-align: left;
    position: relative;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin-right: 0.5rem;
}

.nav-item button:hover {
    background: var(--accent-glow);
    color: var(--text-primary);
}

.nav-item.active button {
    background: linear-gradient(90deg, var(--accent-glow) 0%, transparent 100%);
    color: var(--accent-light);
    border-left: 3px solid var(--accent);
    padding-left: calc(2.2rem - 3px);
    font-weight: 600;
}

.nav-icon { font-size: 1.15rem; flex-shrink: 0; }
.nav-label { font-weight: 500; flex: 1; }

.nav-badge {
    background: var(--danger);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    margin-left: auto;
    flex-shrink: 0;
}

/* Sidebar Footer V2 */
.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border);
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.15) 100%);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.4rem;
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.25);
}

.sidebar-user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sidebar-user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.btn-logout {
    width: 100%;
    padding: 0.65rem;
    background: var(--danger-glow);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all var(--transition);
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: var(--danger);
    transform: translateY(-1px);
}

/* Content V2 */
.content {
    margin-top: var(--topbar-height);
    padding: 2rem;
    padding-bottom: 5.5rem;
    min-height: calc(100vh - var(--topbar-height));
    background: transparent;
}

.page { display: none; }
.page.active {
    display: block;
    animation: pageIn 0.3s ease-out;
}

@keyframes pageIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   COMPOSANTS RÉUTILISABLES
   ============================================================ */

/* Cards V2 - True glassmorphism comme référence */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin-bottom: 1.25rem;
    border: 1.5px solid var(--border);
    box-shadow: var(--shadow), var(--shadow-glow);
    transition: all var(--transition);
    backdrop-filter: blur(18px) saturate(1.2);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
    font-family: var(--font-main);
}

.card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 40px rgba(0, 255, 213, 0.15), var(--shadow-lg);
    transform: translateY(-6px);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    letter-spacing: -0.02em;
}

/* Stats grid V2 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border);
    text-align: center;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent);
    opacity: 0;
    transition: opacity var(--transition);
}

.stat-card.success::before { background: var(--success); }
.stat-card.warning::before { background: var(--warning); }
.stat-card.danger::before { background: var(--danger); }
.stat-card.info::before { background: var(--info); }

.stat-card.clickable {
    cursor: pointer;
}

.stat-card.clickable:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.stat-card.clickable:hover::before {
    opacity: 1;
}

.stat-card.clickable:active {
    transform: translateY(-2px);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0.5rem 0;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-card.success .stat-value { color: var(--success); }
.stat-card.warning .stat-value { color: var(--warning); }
.stat-card.danger .stat-value { color: var(--danger); }
.stat-card.info .stat-value { color: var(--info); }

/* Dashboard widgets V2 */
.dashboard-widgets-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.widget-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.widget-card {
    cursor: grab;
    user-select: none;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.25rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: all var(--transition);
}

.widget-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-light);
}

.widget-card:active {
    cursor: grabbing;
    transform: scale(0.98);
}

.widget-subtext {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.widget-badge {
    margin-top: 0.35rem;
}

.dashboard-widgets-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 1.25rem 1.5rem 1.75rem;
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    background: var(--bg-card);
}

.drag-placeholder {
    border: 2px dashed var(--accent);
    border-radius: var(--radius);
    background: rgba(0, 180, 216, 0.08);
    min-height: 72px;
}

.drag-ghost {
    position: fixed;
    z-index: 10000;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.98);
    opacity: 0.9;
    box-shadow: 0 12px 30px var(--shadow);
}

.dashboard-trash {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.1rem;
    border-radius: 999px;
    border: 2px dashed var(--danger);
    color: var(--danger);
    background: rgba(231, 76, 60, 0.15);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    z-index: 10001;
}

.dashboard-trash.active {
    background: rgba(231, 76, 60, 0.3);
}

body.dashboard-dragging .dashboard-trash {
    opacity: 1;
    pointer-events: auto;
}

.dashboard-active .nav-item.widget-draggable button {
    cursor: grab;
}

/* Buttons V2 - Enhanced with shadows and animations */
.btn {
    padding: 0.85rem 1.75rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition);
}

.btn:hover::before {
    opacity: 1;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-light) 100%);
    color: #05060a;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(0, 255, 213, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(90deg, #00ffe0 0%, #60a5fa 100%);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 24px rgba(0, 255, 213, 0.4);
}

/* Thème France - Bouton tricolore 🇫🇷 */
.theme-france .btn-primary {
    background: linear-gradient(90deg, #002654 0%, #002654 30%, #ffffff 30%, #ffffff 70%, #e63946 70%, #e63946 100%);
    color: #ffffff;
    text-shadow: 
        -1px -1px 0 #002654,
        1px -1px 0 #002654,
        -1px 1px 0 #002654,
        1px 1px 0 #002654,
        0 0 8px rgba(0, 38, 84, 0.5);
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 38, 84, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.theme-france .btn-primary:hover {
    background: linear-gradient(90deg, #003580 0%, #003580 30%, #ffffff 30%, #ffffff 70%, #ff4d5a 70%, #ff4d5a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 38, 84, 0.5);
}

/* Thème France - Fond tricolore 🇫🇷 */
.theme-france {
    background: url('../logo3.png') center / cover no-repeat fixed !important;
}

.theme-france .main-content {
    background: transparent;
}

/* Thème France - Texte avec contour bleu */
.theme-france .section-title,
.theme-france .card-title,
.theme-france h1,
.theme-france h2,
.theme-france h3,
.theme-france h4,
.theme-france label,
.theme-france p,
.theme-france span,
.theme-france td,
.theme-france th {
    color: #ffffff !important;
    text-shadow: 
        -1px -1px 0 #002654,
        1px -1px 0 #002654,
        -1px 1px 0 #002654,
        1px 1px 0 #002654,
        0 0 6px rgba(0, 38, 84, 0.6);
}

/* Thème France - Cartes avec fond semi-transparent */
.theme-france .card {
    background: rgba(0, 38, 84, 0.85);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.theme-france .sidebar {
    background: rgba(0, 38, 84, 0.95);
}

.theme-france .sidebar-header {
    background: linear-gradient(90deg, #002654 0%, #ffffff 50%, #e63946 100%);
}

/* Thème France - Logo OK Cuisine tricolore */
.theme-france .sidebar-brand-name {
    background: linear-gradient(90deg, #002654 0%, #002654 33%, #ffffff 33%, #ffffff 66%, #e63946 66%, #e63946 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
    filter: drop-shadow(0 2px 4px rgba(0, 38, 84, 0.5));
}

/* Thème France - Logo login tricolore */
.theme-france .login-logo h1,
.theme-france .login-logo h1 span {
    background: linear-gradient(90deg, #002654 0%, #002654 33%, #444444 33%, #444444 66%, #e63946 66%, #e63946 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Thème France - Inputs et tables */
.theme-france .form-control,
.theme-france .table,
.theme-france input,
.theme-france select,
.theme-france textarea {
    background: rgba(0, 38, 84, 0.9) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    color: #ffffff !important;
}

.theme-france .table thead {
    background: rgba(0, 38, 84, 0.95);
}

/* Thème France - Nav items */
.theme-france .nav-item {
    color: #ffffff;
}

.theme-france .nav-item:hover,
.theme-france .nav-item.active {
    background: rgba(255, 255, 255, 0.2);
}

/* ============================================================
   Accent Tricolore 🇫🇷 - Bouton uniquement (tous thèmes)
   ============================================================ */
.accent-tricolor .btn-primary {
    background: linear-gradient(90deg, #002654 0%, #002654 30%, #ffffff 30%, #ffffff 70%, #e63946 70%, #e63946 100%);
    color: #ffffff;
    text-shadow: 
        -1px -1px 0 #002654,
        1px -1px 0 #002654,
        -1px 1px 0 #002654,
        1px 1px 0 #002654,
        0 0 8px rgba(0, 38, 84, 0.5);
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 38, 84, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.accent-tricolor .btn-primary:hover {
    background: linear-gradient(90deg, #003580 0%, #003580 30%, #ffffff 30%, #ffffff 70%, #ff4d5a 70%, #ff4d5a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 38, 84, 0.5);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.35);
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--success-light) 0%, var(--success) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.45);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning) 0%, var(--warning-dark) 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

.btn-warning:hover {
    background: linear-gradient(135deg, var(--warning-light) 0%, var(--warning) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, var(--danger-dark) 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

.btn-danger:hover {
    background: linear-gradient(135deg, var(--danger-light) 0%, var(--danger) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45);
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    border-radius: var(--radius);
    min-height: 56px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* Kitchen-specific: très gros boutons */
.btn-kitchen {
    padding: 1.2rem 2rem;
    font-size: 1.3rem;
    border-radius: var(--radius);
    min-height: 64px;
    min-width: 160px;
}

/* Forms V2 */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.form-control {
    width: 100%;
    padding: 0.9rem 1.1rem;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition);
    font-family: var(--font-main);
    box-shadow: var(--shadow-sm);
}

.form-control:hover {
    border-color: var(--border-light);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow), var(--shadow-sm);
    background: var(--bg-hover);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control-lg {
    padding: 1.1rem 1.3rem;
    font-size: 1.15rem;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23a0a0b0' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    color-scheme: dark;
}

select.form-control option,
select.form-control optgroup {
    background: var(--bg-secondary, #1a1a2e);
    color: var(--text-primary, #e8e8e8);
}

/* Tous les selects du site : forcer le rendu sombre du popup natif */
select {
    color-scheme: dark;
}

select option,
select optgroup {
    background: var(--bg-secondary, #1a1a2e);
    color: var(--text-primary, #e8e8e8);
}

/* Tables V2 */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.table th, .table td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table th {
    background: var(--bg-secondary);
    font-weight: 700;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: sticky;
    top: 0;
}

.table tr {
    transition: background var(--transition);
}

.table tr:hover td {
    background: var(--accent-glow);
}

.table tr:last-child td {
    border-bottom: none;
}

.table .status-ok { color: var(--success); font-weight: 700; }
.table .status-warning { color: var(--warning); font-weight: 700; }
.table .status-danger { color: var(--danger); font-weight: 700; }

/* Badges V2 */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    box-shadow: var(--shadow-sm);
    background: rgba(0,255,213,0.08);
    border: 1.2px solid var(--border-light);
    backdrop-filter: blur(8px) saturate(1.1);
    -webkit-backdrop-filter: blur(8px) saturate(1.1);
    font-family: var(--font-main);
}

.badge-success {
    background: var(--success-glow);
    color: var(--success);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-warning {
    background: var(--warning-glow);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
    background: var(--danger-glow);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-info {
    background: rgba(6, 182, 212, 0.15);
    color: var(--info);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

/* Section headers V2 */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-title {
    font-size: 1.7rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    letter-spacing: -0.02em;
    font-family: var(--font-display);
    color: var(--accent);
    text-shadow: 0 2px 18px rgba(0,255,213,0.10);
}
/* Global heading style for Inter and accent */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--accent-light);
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 18px rgba(0,255,213,0.10);
}

.section-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Date filter */
.date-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.date-filter input[type="date"] {
    padding: 0.5rem 0.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
}

/* Empty state V2 */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--border);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1.25rem;
    opacity: 0.4;
    filter: grayscale(0.5);
}

.empty-state-text {
    font-size: 1.15rem;
    font-weight: 500;
}

/* Quick actions grid V2 */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.75rem 1.25rem;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 1rem;
    font-weight: 600;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.quick-action-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent-glow) 0%, transparent 100%);
    opacity: 0;
    transition: opacity var(--transition);
}

.quick-action-btn:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.quick-action-btn:hover::before {
    opacity: 1;
}

.quick-action-btn:active {
    transform: translateY(-2px);
}

.quick-action-btn .qa-icon {
    font-size: 2.5rem;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* ============================================================
   PANNEAU VOCAL
   ============================================================ */
.voice-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 420px;
    max-width: 100vw;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    z-index: 200;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -4px 0 24px rgba(0,0,0,0.3);
}

.voice-panel.open {
    transform: translateX(0);
}

.voice-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}

.voice-panel-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
}

.voice-panel-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}

.voice-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.voice-panel-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-voice-answer {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.7rem 2rem;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    border: none;
    color: #04121a;
    font-weight: 700;
    border-radius: var(--radius);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 16px var(--accent-glow);
}
.btn-voice-answer:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn-voice-answer:active { transform: translateY(0); }

.btn-voice-cancel {
    padding: 0.7rem 2rem;
    background: rgba(231,76,60,0.2);
    border: 1px solid rgba(231,76,60,0.3);
    color: var(--danger);
    border-radius: var(--radius);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-voice-cancel:hover {
    background: rgba(231,76,60,0.3);
}

/* Voice listening indicator */
.voice-listening {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 120px;
    height: 120px;
    margin: 1rem auto 1.5rem;
}

.mic-icon {
    font-size: 2.5rem;
    z-index: 2;
    position: relative;
}

.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--accent);
    opacity: 0;
    animation: pulse-ring 2s infinite;
}

.pulse-ring.delay-1 { animation-delay: 0.5s; }
.pulse-ring.delay-2 { animation-delay: 1s; }

@keyframes pulse-ring {
    0% { transform: scale(0.5); opacity: 0.8; }
    100% { transform: scale(1.3); opacity: 0; }
}

.voice-listening.idle .pulse-ring {
    animation: none;
    opacity: 0.2;
    transform: scale(1);
}

.voice-listening.listening .pulse-ring {
    border-color: var(--success);
}

.voice-listening.speaking .pulse-ring {
    border-color: var(--warning);
    animation: pulse-ring 1s infinite;
}

/* Voice transcript */
.voice-transcript {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    min-height: 3rem;
    line-height: 1.5;
}

.voice-transcript .heard {
    color: var(--accent);
    font-weight: 600;
    display: block;
    font-size: 1.2rem;
    margin-top: 0.5rem;
}

/* Command grid */
.voice-commands h3 {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    text-align: center;
}

.command-section {
    margin-bottom: 1rem;
}

.command-section-title {
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0.75rem 0 0.5rem;
}

.command-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.command-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.command-card:hover {
    border-color: var(--accent);
    background: rgba(0,180,216,0.1);
}

.command-icon { font-size: 1.5rem; }
.command-name { font-size: 0.85rem; color: var(--text-secondary); font-weight: 500; }

/* Conversation */
.voice-conversation {
    max-height: 400px;
    overflow-y: auto;
}

.conversation-messages {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.conv-msg {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    max-width: 90%;
    line-height: 1.4;
    font-size: 1rem;
}

.conv-msg.assistant {
    background: var(--bg-card);
    border: 1px solid var(--border);
    align-self: flex-start;
    color: var(--accent);
}

.conv-msg.user {
    background: rgba(0,180,216,0.15);
    border: 1px solid rgba(0,180,216,0.3);
    align-self: flex-end;
    color: var(--text-primary);
}

.conv-msg.success {
    background: rgba(46,204,113,0.15);
    border: 1px solid rgba(46,204,113,0.3);
    color: var(--success);
}

.conv-msg.error {
    background: rgba(231,76,60,0.15);
    border: 1px solid rgba(231,76,60,0.3);
    color: var(--danger);
}

/* ============================================================
   BOUTON MICRO FLOTTANT (FAB) V2
   ============================================================ */
.fab-mic {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: auto;
    padding: 1.1rem 1.75rem;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    border: none;
    border-radius: 50px;
    color: #fff;
    cursor: pointer;
    z-index: 150;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    box-shadow: 0 6px 25px rgba(59, 130, 246, 0.4), 0 0 0 0 rgba(59, 130, 246, 0.4);
    transition: all var(--transition);
    font-family: var(--font-main);
}

.fab-mic:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 35px rgba(59, 130, 246, 0.5);
}

.fab-mic:active {
    transform: translateY(-1px) scale(0.98);
}

.fab-mic.listening {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
    box-shadow: 0 6px 25px rgba(34, 197, 94, 0.4);
    animation: fab-pulse 2s infinite;
}

@keyframes fab-pulse {
    0%, 100% { box-shadow: 0 6px 25px rgba(34, 197, 94, 0.4), 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50% { box-shadow: 0 6px 35px rgba(34, 197, 94, 0.6), 0 0 0 12px rgba(34, 197, 94, 0); }
}

.fab-mic-icon { font-size: 1.6rem; }
.fab-mic-label { font-size: 1rem; font-weight: 700; letter-spacing: 0.01em; }

/* ============================================================
   TOASTS / NOTIFICATIONS V2
   ============================================================ */
.toast-container {
    position: fixed;
    top: calc(var(--topbar-height) + 1.5rem);
    right: 1.5rem;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: toast-in 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    max-width: 420px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast.success {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.3);
}

.toast.warning {
    background: linear-gradient(135deg, var(--warning) 0%, var(--warning-dark) 100%);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.3);
}

.toast.danger {
    background: linear-gradient(135deg, var(--danger) 0%, var(--danger-dark) 100%);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3);
}

.toast.info {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

.toast.removing { animation: toast-out 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards; }

@keyframes toast-in {
    from { opacity: 0; transform: translateX(100px) scale(0.9); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toast-out {
    from { opacity: 1; transform: translateX(0) scale(1); }
    to { opacity: 0; transform: translateX(100px) scale(0.9); }
}

/* ============================================================
   MODAL V2 - Enhanced with animations
   ============================================================ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 250;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border);
    animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
    from { transform: translateY(-20px) scale(0.98); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.75rem;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
}

.modal-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.modal-close {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.4rem 0.6rem;
    transition: all var(--transition);
}

.modal-close:hover {
    background: var(--danger-glow);
    border-color: var(--danger);
    color: var(--danger);
}

.modal-minimize {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem 0.65rem 0.4rem;
    transition: all var(--transition);
    margin-right: 0.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.modal-minimize:hover {
    background: var(--primary-glow, rgba(99,102,241,.15));
    border-color: var(--primary);
    color: var(--primary);
}

.modal-body {
    padding: 1.75rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 1.25rem 1.75rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    background: var(--bg-card);
}

/* ============================================================
   ZONE-SPECIFIC: Nettoyage checklist V2
   ============================================================ */
.checklist {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
}

.checklist-item:hover {
    border-color: var(--accent);
    transform: translateX(4px);
    box-shadow: var(--shadow);
}

/* Module Nettoyage uniquement : AUCUN mouvement au survol. Sur une page dense, un
   transform au survol décale l'élément sous le curseur → le survol s'active/se
   désactive en boucle = clignotement. On neutralise donc tout transform au survol
   ici (checklist, cartes, stat-cards), tout en gardant bordure + ombre (survol
   propre, sans mouvement). Les autres modules ne sont PAS touchés. */
#page-nettoyage .checklist-item:hover,
#page-nettoyage .card:hover,
#page-nettoyage .stat-card:hover {
    transform: none;
}

.checklist-item.checked {
    border-color: var(--success);
    background: var(--success-glow);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

.checklist-check {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all var(--transition);
    flex-shrink: 0;
}

.checklist-item.checked .checklist-check {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.checklist-label { flex: 1; font-size: 1rem; font-weight: 500; }
.checklist-time { font-size: 0.85rem; color: var(--text-muted); }

/* ============================================================
   CONFIG: Tags/Chips V2
   ============================================================ */
.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.75rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
}

.chip:hover {
    border-color: var(--accent);
    background: var(--accent-glow);
}

.chip-remove {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0;
    line-height: 1;
    transition: transform var(--transition);
}

.chip-remove:hover {
    transform: scale(1.2);
}

/* ============================================================
   THEME PICKER - Sélecteur de couleur personnalisable
   ============================================================ */
.theme-preset-btn {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid transparent;
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-preset-btn:hover {
    transform: scale(1.1);
    border-color: var(--border-light);
}

.theme-preset-btn.active {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 3px var(--bg-primary), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.theme-preset-color {
    display: block;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--preset-color);
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.2), 0 2px 8px rgba(0, 0, 0, 0.3);
}

.theme-preset-check {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    opacity: 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.theme-preset-btn.active .theme-preset-check {
    opacity: 1;
}

/* Color picker input styling */
input[type="color"] {
    -webkit-appearance: none;
    appearance: none;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 2px;
    background: var(--bg-input);
    cursor: pointer;
    transition: all var(--transition);
}

input[type="color"]:hover {
    border-color: var(--accent);
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 6px;
}

/* ============================================================
   THEME CARDS - Cartes de sélection de thèmes complets
   ============================================================ */
.theme-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.theme-card {
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    border: 3px solid var(--border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-card);
}

.theme-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

.theme-card.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow), 0 8px 25px rgba(0, 0, 0, 0.25);
}

.theme-card.active::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.8rem;
}

/* Color pickers grid */
.color-pickers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.color-picker-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-input);
    border-radius: 10px;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.color-picker-item:hover {
    border-color: var(--accent);
    background: var(--bg-card);
}

.color-picker-item input[type="color"] {
    width: 45px;
    height: 35px;
    border: 2px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
}

.color-picker-item label {
    font-weight: 600;
    display: block;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.color-picker-item span {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Add item row */
.add-row {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.add-row .form-control { flex: 1; }

/* ============================================================
   INVENTAIRE: item list V2
   ============================================================ */
.inv-item {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.inv-item:hover {
    border-color: var(--border-light);
    box-shadow: var(--shadow);
}

.inv-item-info {
    flex: 1;
    min-width: 0;
}

.inv-item-row1 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.inv-item-name { font-weight: 500; }
.inv-item-qty {
    font-size: 1.2rem;
    font-weight: 700;
    min-width: 60px;
    text-align: center;
}
.inv-item-unit { color: var(--text-muted); font-size: 0.9rem; }

.inv-item-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.inv-item-details span {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.inv-dlc-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    white-space: nowrap;
}

.inv-dlc-ok { background: #d4edda; color: #155724; }
.inv-dlc-proche { background: #fff3cd; color: #856404; }
.inv-dlc-critique { background: #f8d7da; color: #721c24; }
.inv-dlc-depassee { background: #721c24; color: #fff; }

.inv-item-actions {
    display: flex;
    gap: 0.25rem;
    align-self: center;
}

.inv-item-actions button {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================
   COMMANDES
   ============================================================ */
.commande-progress-bar {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.commande-progress-fill {
    height: 100%;
    background: var(--success);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.commande-item-recu {
    opacity: 0.5;
    text-decoration: line-through;
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
    body { background: #fff; color: #000; }
    .top-bar, .sidebar, .sidebar-overlay, .fab-mic,
    .voice-panel, .toast-container, .modal-overlay,
    .btn, button, .section-actions { display: none !important; }
    .content { margin: 0; padding: 1rem; }
    .card { border: 1px solid #ccc; box-shadow: none; background: #fff; }
    .table th { background: #eee; color: #333; }
    .table td { color: #000; }
    .stat-card { border: 1px solid #ccc; background: #fff; }
    .stat-value { color: #333 !important; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablettes et écrans moyens */
@media (min-width: 768px) {
    .sidebar {
        transform: translateX(0);
    }

    .sidebar-overlay { display: none !important; }

    .content {
        margin-left: var(--sidebar-width);
    }

    .menu-toggle { display: none; }

    .voice-panel { width: 420px; }

    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .command-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Grands écrans / TV */
@media (min-width: 1200px) {
    html { font-size: 18px; }

    .content { padding: 2rem; }

    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .quick-actions {
        grid-template-columns: repeat(4, 1fr);
    }

    .table { font-size: 1rem; }
    .table th, .table td { padding: 1rem 1.25rem; }
}

/* Très grands écrans (TV cuisine) */
@media (min-width: 1600px) {
    html { font-size: 20px; }

    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Mobile */
@media (max-width: 480px) {
    .fab-mic-label { display: none; }
    .fab-mic { padding: 1rem; border-radius: 50%; width: 64px; height: 64px; justify-content: center; }
    .voice-panel { width: 100vw; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .quick-actions { grid-template-columns: repeat(2, 1fr); }
    .command-grid { grid-template-columns: repeat(2, 1fr); }
    .section-header { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   ANIMATIONS UTILITAIRES
   ============================================================ */
.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-up {
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Loading spinner */
.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Scrollbar custom */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ============================================================
   TABS
   ============================================================ */
.tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: -2px;
}

.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* Alert items */
.alert-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
}

.alert-item.critical {
    border-left: 4px solid var(--danger);
}

.alert-item.warning {
    border-left: 4px solid var(--warning);
}

.alert-item.resolved {
    opacity: 0.6;
    border-left: 4px solid var(--success);
}

.alert-icon { font-size: 1.5rem; flex-shrink: 0; }

.alert-content { flex: 1; }
.alert-title { font-weight: 600; margin-bottom: 0.25rem; }
.alert-desc { font-size: 0.9rem; color: var(--text-secondary); }
.alert-time { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.25rem; }

.alert-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Journal entries */
.journal-entry {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.journal-time {
    font-size: 0.85rem;
    color: var(--text-muted);
    min-width: 80px;
    flex-shrink: 0;
}

.journal-icon { font-size: 1.2rem; flex-shrink: 0; }

.journal-text {
    flex: 1;
    font-size: 0.95rem;
}

.journal-user {
    font-size: 0.85rem;
    color: var(--text-muted);
    min-width: 80px;
    text-align: right;
    flex-shrink: 0;
}

/* ============================================================
   NOUVEAUX MODULES HACCP — Styles
   ============================================================ */

/* --- Tab bar --- */
.tab-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.6rem 1.2rem;
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.tab-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.tab-btn:hover:not(.active) {
    background: var(--bg-input);
}

/* --- Allergene grid --- */
.allergene-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.allergene-chip {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-input);
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.allergene-icone { font-size: 1.5rem; flex-shrink: 0; }

.allergene-nom {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.allergene-detail {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* --- Allergene tags in plats --- */
.allergene-tag {
    display: inline-block;
    background: rgba(231, 76, 60, 0.15);
    color: var(--danger);
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    margin: 0.15rem;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

/* --- Allergen checkbox grid --- */
.allergene-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.25rem;
    max-height: 300px;
    overflow-y: auto;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
}

.allergene-checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem;
    cursor: pointer;
    font-size: 0.9rem;
}

/* --- Plats list --- */
.plats-list { display: grid; gap: 0.75rem; }

.plat-card {
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    padding: 1rem;
    border: 1px solid var(--border);
}

.plat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.plat-nom {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.plat-actions { display: flex; gap: 0.25rem; }

.plat-categorie {
    font-size: 0.8rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.plat-allergenes { margin-bottom: 0.5rem; }

.plat-ingredients {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --- Matrice table --- */
.matrice-table th, .matrice-table td {
    text-align: center;
    padding: 0.4rem;
    font-size: 0.8rem;
}

.matrice-table .matrice-plat {
    text-align: left;
    font-weight: 600;
    min-width: 150px;
}

.matrice-cell.present {
    background: rgba(231, 76, 60, 0.15);
    color: var(--danger);
    font-weight: bold;
}

/* --- Row danger highlight --- */
.row-danger {
    background: rgba(231, 76, 60, 0.08) !important;
}

/* --- Protocol pillars --- */
.protocol-pillars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.pillar-card {
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    border: 1px solid var(--border);
    position: relative;
}

.pillar-num {
    position: absolute;
    top: -12px;
    left: 12px;
    background: var(--accent);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.85rem;
}

.pillar-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent);
    margin-top: 0.5rem;
}

.pillar-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.pillar-list {
    list-style: none;
    padding: 0;
}

.pillar-list li {
    padding: 0.25rem 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.pillar-list li::before {
    content: '\2022 ';
    color: var(--accent);
}

/* --- HACCP Principles --- */
.haccp-principles { display: grid; gap: 0.75rem; }

.principle-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
}

.principle-num {
    background: var(--accent);
    color: white;
    min-width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.principle-titre {
    font-weight: 600;
    color: var(--text-primary);
}

.principle-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* --- Protocol steps --- */
.protocol-steps {
    display: grid;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.protocol-step {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
}

.step-num {
    background: var(--accent);
    color: white;
    min-width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.step-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: auto;
}

/* --- Temperature value highlight --- */
.temp-val { font-weight: 600; color: var(--accent); }

/* --- When wash grid --- */
.when-wash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.5rem;
}

.when-wash-item {
    padding: 0.5rem;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* --- Marche en avant flow --- */
.marche-avant-flow {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem 0;
    justify-content: center;
}

.flow-step {
    text-align: center;
    background: var(--bg-input);
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    min-width: 100px;
}

.flow-icon { font-size: 1.5rem; }

.flow-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.flow-detail {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.flow-arrow {
    font-size: 1.2rem;
    color: var(--accent);
}

/* --- Responsive adjustments for new modules --- */
@media (max-width: 600px) {
    .allergene-grid {
        grid-template-columns: 1fr;
    }
    .protocol-pillars {
        grid-template-columns: 1fr;
    }
    .marche-avant-flow {
        flex-direction: column;
    }
    .flow-arrow {
        transform: rotate(90deg);
    }
    .tab-bar {
        overflow-x: auto;
        flex-wrap: nowrap;
    }
    .tab-btn {
        white-space: nowrap;
        flex-shrink: 0;
    }
    .allergene-checkbox-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   MODULE MENUS — Styles
   ============================================================ */

.menu-week-card {
    margin-bottom: 1.5rem;
}

.menu-week-card .table td {
    font-size: 0.9rem;
}

/* --- Crèche complète — 3 bandes horizontales empilées --- */
.creche-complete-card .card-header {
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Chaque bande = un stade, table avec les jours en colonnes */
.creche-band {
    margin-bottom: 1.25rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.07);
}

.creche-band-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.85rem;
    flex-wrap: wrap;
}

.creche-band-label {
    font-weight: 700;
    font-size: 0.92rem;
    white-space: nowrap;
}

.creche-band-sub {
    font-size: 0.76rem;
    opacity: 0.8;
    flex: 1;
}

.creche-band-s2 .creche-band-header { background: rgba(255,200,0,0.12); border-left: 4px solid #ffc800; color: #ffc800; }
.creche-band-s3 .creche-band-header { background: rgba(255,140,0,0.12); border-left: 4px solid #ff8c00; color: #ff8c00; }
.creche-band-s4 .creche-band-header { background: rgba(0,180,216,0.12); border-left: 4px solid #00b4d8; color: #00b4d8; }

/* Table : jours en colonnes, composantes en lignes */
.creche-week-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    margin: 0;
}

.creche-week-table thead th {
    padding: 0.4rem 0.6rem;
    font-size: 0.82rem;
    font-weight: 700;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.creche-band-s2 .creche-week-table thead th:not(.creche-comp-header) { background: rgba(255,200,0,0.07); }
.creche-band-s3 .creche-week-table thead th:not(.creche-comp-header) { background: rgba(255,140,0,0.07); }
.creche-band-s4 .creche-week-table thead th:not(.creche-comp-header) { background: rgba(0,180,216,0.07); }

.creche-week-table tbody td {
    padding: 0.4rem 0.6rem;
    font-size: 0.83rem;
    vertical-align: top;
    /* texte qui se plie, rien de coupé */
    white-space: normal;
    word-break: break-word;
    overflow: visible;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

/* Colonne étiquette (Plat, Acc…) — fixe et étroite */
.creche-comp-header,
.creche-comp-label {
    width: 120px !important;
    min-width: 100px;
    max-width: 130px;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    vertical-align: middle;
}

/* Cellule jour cliquable */
.creche-day-cell {
    cursor: pointer;
    transition: background 0.15s;
    text-align: left;
}

.creche-day-cell:hover {
    background: rgba(255,255,255,0.05);
}

/* Label crèche complète dans la modale */
.creche-complete-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.6rem 0.75rem;
    background: rgba(0,180,216,0.08);
    border: 1px solid rgba(0,180,216,0.25);
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #00b4d8;
    font-weight: 500;
}

/* ============================================================
   MODULE AUDIT & CONTROLE — Styles
   ============================================================ */

#page-audit .card {
    margin-bottom: 1rem;
}

#page-audit .stats-grid {
    margin-top: 1rem;
}

#page-audit .table-container {
    margin-top: 0.75rem;
}

/* ============================================================
   MODULE SIMULATEUR DDPP — Styles
   ============================================================ */

#page-simulateur .sim-question {
    transition: border-color 0.2s ease;
}

#page-simulateur .sim-question:hover {
    background: rgba(0,180,216,0.03);
}

#page-simulateur .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

#page-simulateur .stats-grid .stat-card {
    padding: 0.75rem;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

#page-simulateur .stats-grid .stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

#page-simulateur .stats-grid .stat-value {
    font-size: 1.5rem;
}

@media (max-width: 600px) {
    #page-simulateur .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================
   Centre de formation en ligne
   ============================================================ */

.training-hero {
    position: relative;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 2rem;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    background: radial-gradient(circle at top left, rgba(0, 180, 216, 0.15), transparent 55%),
                linear-gradient(135deg, #0f1b2d 0%, #18263e 55%, #0f1524 100%);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.training-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0, rgba(255, 255, 255, 0.04) 1px, transparent 1px, transparent 6px);
    pointer-events: none;
}

.training-hero-content {
    position: relative;
    z-index: 1;
}

.training-hero-kicker {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.75rem;
    color: var(--accent);
    margin-bottom: 0.75rem;
    font-family: var(--font-alt);
}

.training-hero h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 2.6vw, 2.6rem);
    margin-bottom: 0.75rem;
}

.training-hero p {
    color: var(--text-secondary);
    max-width: 520px;
    margin-bottom: 1.25rem;
}

.training-hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.training-hero-card {
    position: relative;
    z-index: 1;
    background: rgba(15, 24, 40, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: grid;
    gap: 0.85rem;
}

.training-hero-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-alt);
}

.training-hero-metric .label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.training-hero-metric .value {
    font-size: 1.4rem;
    font-weight: 700;
}

.training-hero-badge {
    margin-top: 0.5rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: rgba(0, 180, 216, 0.15);
    color: var(--accent);
    font-weight: 600;
    text-align: center;
}

.training-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.training-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}

.training-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border 0.2s ease;
    animation: riseIn 0.4s ease both;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.training-card.active {
    border-color: rgba(0, 180, 216, 0.45);
    box-shadow: 0 12px 24px rgba(0, 180, 216, 0.15);
}

.training-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.35);
}

.training-card h3 {
    font-family: var(--font-display);
    font-size: 1.35rem;
}

.training-card p {
    color: var(--text-secondary);
    flex: 1;
}

.training-card-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: var(--font-alt);
}

.training-level {
    background: rgba(52, 152, 219, 0.2);
    color: var(--info);
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-weight: 600;
}

.training-duration {
    font-weight: 600;
}

.training-progress {
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
}

.training-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #5ce1ff);
    border-radius: 999px;
}

.training-progress-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-alt);
}

.training-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.training-status {
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.training-status.done {
    background: rgba(46, 204, 113, 0.2);
    color: var(--success);
}

.training-status.ongoing {
    background: rgba(243, 156, 18, 0.2);
    color: var(--warning);
}

.training-detail {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.training-detail-header {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.training-detail-kicker {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 0.4rem;
}

.training-detail-header h3 {
    font-family: var(--font-display);
    font-size: 1.6rem;
}

.training-detail-header p {
    color: var(--text-secondary);
    max-width: 520px;
}

.training-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.training-detail-progress {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.training-detail-badges {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.training-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.2rem;
}

.training-block {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
}

.training-block h4 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.training-block ul {
    display: grid;
    gap: 0.45rem;
    color: var(--text-secondary);
    padding-left: 1.2rem;
}

.training-lesson-list {
    display: grid;
    gap: 0.6rem;
}

.lesson-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
}

.lesson-item.done {
    border: 1px solid rgba(46, 204, 113, 0.35);
}

.lesson-title {
    display: block;
    font-weight: 600;
}

.lesson-status {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.training-lesson h3 {
    font-family: var(--font-display);
    margin-bottom: 0.75rem;
}

.training-lesson-content {
    color: var(--text-secondary);
    display: grid;
    gap: 0.75rem;
}

.training-quiz {
    display: grid;
    gap: 1.2rem;
}

.quiz-question {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 1rem;
}

.quiz-q {
    font-weight: 600;
    margin-bottom: 0.6rem;
}

.quiz-options {
    display: grid;
    gap: 0.5rem;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
}

.quiz-option input {
    accent-color: var(--accent);
}

@keyframes riseIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 960px) {
    .training-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .training-detail-header {
        flex-direction: column;
    }

    .training-detail-actions {
        width: 100%;
    }

    .training-hero {
        padding: 1.8rem;
    }
}
/* ============================================================
   CALENDRIER — Styles V2 (3 jours + Mois)
   ============================================================ */

.calendar-view-switch {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.calendar-view-switch .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border: 2px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
}

.calendar-view-switch .btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg-primary);
    font-weight: 600;
}

/* --- Vue 3 Jours --- */
.calendar-3days {
    display: flex;
    align-items: stretch;
    gap: 1rem;
    padding: 1.5rem 0;
    min-height: 500px;
}

.three-days-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.three-days-header,
.month-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 1rem;
}

.three-days-header h2,
.month-header h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--accent);
    flex: 1;
    text-align: center;
}

.days-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    flex: 1;
}

.day-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    min-height: 350px;
    transition: all var(--transition);
    cursor: pointer;
}

.day-card:hover {
    border-color: var(--accent);
    background: rgba(0, 180, 216, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 180, 216, 0.2);
}

.day-card.today {
    border-color: var(--accent);
    background: rgba(0, 180, 216, 0.1);
    box-shadow: 0 0 20px rgba(0, 180, 216, 0.25);
}

.day-card-header {
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
    text-align: center;
}

.day-card-header h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--accent);
    margin-bottom: 0.25rem;
}

.day-card-header .day-num {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.day-card-events {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-y: auto;
    padding-right: 0.5rem;
    margin-bottom: 1rem;
}

.event-compact {
    background: var(--bg-secondary);
    padding: 0.6rem;
    border-radius: 6px;
    border-left: 4px solid var(--accent);
    cursor: pointer;
    transition: all var(--transition);
}

.event-compact:hover {
    background: var(--bg-input);
    transform: translateX(4px);
}

.event-compact-time {
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 700;
}

.event-compact-title {
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-top: 0.2rem;
    word-wrap: break-word;
    line-height: 1.2;
}

.no-events {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
}

.btn-add-event {
    padding: 0.75rem;
    background: var(--accent);
    color: var(--bg-primary);
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    font-size: 0.85rem;
}

.btn-add-event:hover {
    background: var(--accent-dark);
    transform: scale(1.02);
}

/* --- Boutons Navigation --- */
.nav-button {
    background: var(--bg-card);
    border: 2px solid var(--border);
    color: var(--text-primary);
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition);
    min-width: 140px;
}

.nav-button:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg-primary);
    transform: scale(1.05);
}

.nav-prev,
.nav-next {
    flex-shrink: 0;
}

/* --- Vue Mois --- */
.calendar-month {
    padding: 1.5rem 0;
}

.nav-prev-month,
.nav-next-month {
    flex: 0 1 150px;
}

.month-days-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    text-align: center;
    color: var(--accent);
}

.month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.month-day {
    aspect-ratio: 1;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: all var(--transition);
    min-height: 80px;
}

.month-day:hover:not(.other-month) {
    border-color: var(--accent);
    background: rgba(0, 180, 216, 0.05);
    transform: translateY(-2px);
}

.month-day.today {
    border-color: var(--accent);
    background: rgba(0, 180, 216, 0.15);
    box-shadow: 0 0 15px rgba(0, 180, 216, 0.3);
}

.month-day.other-month {
    background: transparent;
    border: none;
    cursor: default;
}

.month-day-num {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.month-day-events {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    flex: 1;
}

.event-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    cursor: pointer;
}

.event-more {
    font-size: 0.65rem;
    color: var(--text-secondary);
    padding: 1px 3px;
    border-radius: 2px;
    background: var(--border);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .calendar-3days {
        flex-direction: column;
        min-height: auto;
    }

    .nav-button {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        min-width: 110px;
    }

    .three-days-container {
        order: 2;
    }

    .nav-prev {
        order: 1;
    }

    .nav-next {
        order: 3;
    }

    .days-row {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .calendar-3days {
        flex-direction: row;
    }

    .nav-button {
        padding: 0.6rem 0.8rem;
        font-size: 0.75rem;
        min-width: 70px;
    }

    .days-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .day-card {
        min-height: 200px;
        padding: 0.75rem;
    }

    .month-days-header {
        font-size: 0.75rem;
    }

    .month-day {
        min-height: 60px;
        padding: 0.4rem;
    }

    .month-day-num {
        font-size: 0.9rem;
    }

    .three-days-header,
    .month-header {
        flex-direction: column;
        margin-bottom: 1rem;
        gap: 0.5rem;
    }

    .three-days-header h2,
    .month-header h2 {
        font-size: 1.5rem;
    }

    .nav-prev-month,
    .nav-next-month {
        width: 100%;
    }
}

/* ============================================================
   NAVIGATION CLAVIER — Focus styles & panneau raccourcis
   ============================================================ */

/* Focus visible universel : outline cyan sur tout élément focusable */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

/* Les inputs ont déjà leur propre style de focus → ne pas dupliquer */
.form-control:focus-visible {
    outline: none;
}

/* Panneau raccourcis clavier — fixe en bas à droite, caché par défaut */
.kb-panel {
    position: fixed;
    bottom: 90px; /* au-dessus du bouton micro FAB */
    right: 20px;
    z-index: 900;
    display: none; /* caché jusqu'à activation dans config */
}

/* Bouton bulle rouge ? — visible quand l'option est activée mais le panneau fermé */
.kb-bubble {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--danger);
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.5);
    transition: var(--transition);
    line-height: 1;
}

.kb-bubble:hover,
.kb-bubble:focus-visible {
    background: var(--danger-dark);
    transform: scale(1.08);
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Panneau déployé */
.kb-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 12px;
    border-bottom: 1px solid var(--border);
    cursor: default;
    border-radius: var(--radius) var(--radius) 0 0;
    background: rgba(0, 180, 216, 0.08);
}

.kb-panel-title {
    font-weight: 600;
    color: var(--accent);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    user-select: none;
}

/* Quand le panneau est déployé, il devient une vraie carte */
.kb-panel:has(.kb-panel-header) {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 32px var(--shadow);
    min-width: 230px;
    max-width: 270px;
    font-size: 0.8rem;
}

.kb-panel-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 2px 6px;
    border-radius: 4px;
    transition: var(--transition);
    line-height: 1;
}

.kb-panel-toggle:hover,
.kb-panel-toggle:focus-visible {
    background: var(--bg-input);
    color: var(--text-primary);
    outline: 1px solid var(--accent);
}

.kb-panel-body {
    padding: 6px 0;
    max-height: 300px;
    overflow-y: auto;
}

.kb-table {
    width: 100%;
    border-collapse: collapse;
}

.kb-table td {
    padding: 3px 12px;
    color: var(--text-secondary);
    vertical-align: middle;
    line-height: 1.5;
}

.kb-table td:first-child {
    width: 90px;
    white-space: nowrap;
}

kbd {
    display: inline-block;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 0.72rem;
    font-family: monospace;
    color: var(--accent);
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Masquer le panneau sur mobile (trop petit, encombre l'écran) */
@media (max-width: 640px) {
    .kb-panel {
        display: none;
    }
}

/* ================================================================

/* ================================================================
   FORMATION PRO v3.0 — Styles (dark theme — OK Cuisine)
   ================================================================ */

/* — Header — */
.fp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
  border: 1px solid var(--accent);
  color: var(--text-primary);
  padding: 1.5rem 2rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
  box-shadow: 0 4px 24px rgba(0,180,216,0.12);
}
.fp-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0;
  font-family: var(--font-display);
}
.fp-subtitle { font-size: 0.88rem; color: var(--text-secondary); margin: 0.25rem 0 0; }
.fp-global-badge {
  background: rgba(0,180,216,0.12);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 0.75rem 1.25rem;
  text-align: center;
  min-width: 100px;
}
.fp-global-badge .fp-done-count { font-size: 2rem; font-weight: 900; color: var(--accent); display: block; }
.fp-global-badge small { font-size: 0.75rem; color: var(--text-secondary); }

/* — Modules grid — */
.fp-modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1rem;
}

/* ============================================================
   THÈME TERMINAL 💻 — CRT Phosphore Vert
   Ambiance : vieux terminal, Matrix, CLI, hacker
   ============================================================ */

/* Scanlines CRT effect sur tout l'écran */
.theme-terminal::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 65, 0.015) 2px,
        rgba(0, 255, 65, 0.015) 4px
    );
    pointer-events: none;
    z-index: 9998;
}

/* Police monospace globale */
.theme-terminal,
.theme-terminal * {
    font-family: 'JetBrains Mono', 'Courier New', monospace !important;
}

/* Coins angulaires partout */
.theme-terminal .card,
.theme-terminal .modal,
.theme-terminal .login-form,
.theme-terminal .sidebar,
.theme-terminal .btn,
.theme-terminal input,
.theme-terminal select,
.theme-terminal textarea,
.theme-terminal .form-control,
.theme-terminal .nav-item,
.theme-terminal .topbar,
.theme-terminal .user-list-item {
    border-radius: 2px !important;
}

/* Cards phosphore */
.theme-terminal .card {
    background: #040d04;
    border: 1px solid #00882a !important;
    box-shadow: 0 0 10px rgba(0,255,65,0.08), inset 0 0 20px rgba(0,255,65,0.02) !important;
}
.theme-terminal .card:hover {
    border-color: #00ff41 !important;
    box-shadow: 0 0 20px rgba(0,255,65,0.18), inset 0 0 30px rgba(0,255,65,0.04) !important;
}

/* Sidebar noire */
.theme-terminal .sidebar {
    background: #000000 !important;
    border-right: 1px solid #00882a !important;
    box-shadow: 2px 0 15px rgba(0,255,65,0.08) !important;
}
.theme-terminal .sidebar-header {
    background: #000000 !important;
    border-bottom: 1px solid #00ff41 !important;
}

/* Brand avec curseur clignotant */
.theme-terminal .sidebar-brand-name {
    color: #00ff41 !important;
    -webkit-text-fill-color: #00ff41 !important;
    background: none !important;
    text-shadow: 0 0 12px rgba(0,255,65,0.9) !important;
    font-weight: 700;
    letter-spacing: 0.08em;
}
.theme-terminal .sidebar-brand-name::after {
    content: '_';
    animation: terminal-blink 1s step-end infinite;
}
@keyframes terminal-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Nav items */
.theme-terminal .nav-item {
    color: #00aa2c !important;
    border-left: 2px solid transparent;
    transition: all 0.1s !important;
}
.theme-terminal .nav-item:hover,
.theme-terminal .nav-item.active {
    background: rgba(0,255,65,0.1) !important;
    color: #00ff41 !important;
    border-left: 2px solid #00ff41 !important;
    box-shadow: 2px 0 8px rgba(0,255,65,0.2) !important;
}

/* Titres */
.theme-terminal .section-title,
.theme-terminal .card-title,
.theme-terminal h1,
.theme-terminal h2,
.theme-terminal h3,
.theme-terminal h4 {
    color: #00ff41 !important;
    text-shadow: 0 0 8px rgba(0,255,65,0.5) !important;
}

/* Texte général */
.theme-terminal p,
.theme-terminal label,
.theme-terminal span,
.theme-terminal td,
.theme-terminal th,
.theme-terminal li {
    color: #00cc33 !important;
}

/* Boutons style terminal — outline phosphore */
.theme-terminal .btn-primary {
    background: transparent !important;
    color: #00ff41 !important;
    border: 1px solid #00ff41 !important;
    box-shadow: 0 0 8px rgba(0,255,65,0.3), inset 0 0 5px rgba(0,255,65,0.05) !important;
    text-shadow: 0 0 6px rgba(0,255,65,0.6);
    font-weight: 600;
    letter-spacing: 0.05em;
}
.theme-terminal .btn-primary:hover {
    background: rgba(0,255,65,0.15) !important;
    box-shadow: 0 0 18px rgba(0,255,65,0.5) !important;
    transform: none !important;
}

/* Inputs terminal */
.theme-terminal .form-control,
.theme-terminal input,
.theme-terminal select,
.theme-terminal textarea {
    background: #0a1a0a !important;
    border: 1px solid #004d10 !important;
    color: #00ff41 !important;
    caret-color: #00ff41;
}
.theme-terminal input:focus,
.theme-terminal select:focus,
.theme-terminal textarea:focus,
.theme-terminal .form-control:focus {
    border-color: #00ff41 !important;
    box-shadow: 0 0 8px rgba(0,255,65,0.4) !important;
    outline: none !important;
}

/* Tables ASCII */
.theme-terminal .table {
    border: 1px solid #004d10;
}
.theme-terminal .table thead {
    background: #040d04;
    border-bottom: 1px solid #00ff41;
}
.theme-terminal .table th {
    color: #00ff41 !important;
    text-shadow: 0 0 4px rgba(0,255,65,0.4) !important;
}
.theme-terminal .table tr:hover {
    background: rgba(0,255,65,0.04) !important;
}

/* Login page */
.theme-terminal .login-container {
    background: #000000 !important;
}
.theme-terminal .login-container::before {
    background: repeating-linear-gradient(
        0deg, transparent, transparent 2px,
        rgba(0,255,65,0.015) 2px, rgba(0,255,65,0.015) 4px
    ) !important;
    animation: none !important;
}
.theme-terminal .login-logo h1,
.theme-terminal .login-logo h1 span {
    color: #00ff41 !important;
    -webkit-text-fill-color: #00ff41 !important;
    background: none !important;
    text-shadow: 0 0 20px rgba(0,255,65,0.9) !important;
}
.theme-terminal .login-form {
    background: #040d04 !important;
    border: 1px solid #00882a !important;
    box-shadow: 0 0 30px rgba(0,255,65,0.15) !important;
}
.theme-terminal .login-subtitle {
    color: #00882a !important;
}
.theme-terminal .logo-icon {
    filter: drop-shadow(0 0 15px rgba(0,255,65,0.8)) !important;
}

/* Topbar */
.theme-terminal .topbar {
    background: #000000 !important;
    border-bottom: 1px solid #00882a !important;
}

/* Main content */
.theme-terminal .main-content {
    background: #000000 !important;
}

/* User list items */
.theme-terminal .user-list-item {
    background: #040d04 !important;
    border: 1px solid #004d10 !important;
}
.theme-terminal .user-list-item:hover {
    border-color: #00ff41 !important;
    background: rgba(0,255,65,0.08) !important;
    box-shadow: 0 0 10px rgba(0,255,65,0.2) !important;
}

/* Badge / statut */
.theme-terminal .badge,
.theme-terminal [class*="status-"] {
    border-radius: 2px !important;
}

/* Scrollbar phosphore */
.theme-terminal ::-webkit-scrollbar-track {
    background: #000;
}
.theme-terminal ::-webkit-scrollbar-thumb {
    background: #004d10;
}
.theme-terminal ::-webkit-scrollbar-thumb:hover {
    background: #00882a;
}


/* ============================================================
   THÈME BRASSERIE 🍷 — Bistrot Parisien
   Ambiance : papier kraft, ardoise, bistrot chic, gastronomie
   ============================================================ */

/* Police globale : Lato pour le corps, Playfair pour les titres */
.theme-brasserie * {
    font-family: 'Lato', Georgia, sans-serif !important;
}
.theme-brasserie .section-title,
.theme-brasserie .card-title,
.theme-brasserie h1,
.theme-brasserie h2,
.theme-brasserie h3,
.theme-brasserie h4,
.theme-brasserie .sidebar-brand-name,
.theme-brasserie .login-logo h1 {
    font-family: 'Playfair Display', Georgia, serif !important;
    letter-spacing: 0.01em;
}

/* Fond papier chaud */
.theme-brasserie {
    background: #fdf6e3 !important;
}
.theme-brasserie .main-content {
    background: #fdf6e3 !important;
}

/* Cards ivoire */
.theme-brasserie .card {
    background: #fffcf2 !important;
    border: 1px solid #e8d5a8 !important;
    box-shadow: 0 2px 8px rgba(139,90,43,0.1), 0 1px 3px rgba(139,90,43,0.08) !important;
    border-radius: 8px !important;
}
.theme-brasserie .card:hover {
    border-color: #b8860b !important;
    box-shadow: 0 6px 20px rgba(139,90,43,0.15), 0 2px 8px rgba(139,90,43,0.1) !important;
}

/* Sidebar bois sombre */
.theme-brasserie .sidebar {
    background: #1a0f08 !important;
    border-right: 3px solid #b8860b !important;
}
.theme-brasserie .sidebar-header {
    background: linear-gradient(135deg, #1a0f08 0%, #2d1b0e 100%) !important;
    border-bottom: 1px solid #b8860b !important;
}

/* Brand dorée Playfair */
.theme-brasserie .sidebar-brand-name {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background: none !important;
    font-family: 'Playfair Display', serif !important;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6) !important;
}

/* Subtitle sous le brand ("Assistant HACCP Vocal") */
.theme-brasserie .sidebar-brand-sub,
.theme-brasserie .sidebar-subtitle,
.theme-brasserie .sidebar-header span:not(.sidebar-brand-name) {
    color: rgba(255,255,255,0.65) !important;
}

/* Nav groups — titres de sections ("Opérations quotidiennes" etc.) */
.theme-brasserie .nav-group {
    border-bottom-color: rgba(255,255,255,0.08) !important;
}
.theme-brasserie .nav-group-toggle {
    color: #ffffff !important;
}
.theme-brasserie .nav-group-toggle:hover {
    color: #ffffff !important;
    background: rgba(255,255,255,0.08) !important;
}
.theme-brasserie .nav-group-arrow {
    color: rgba(255,255,255,0.5) !important;
}

/* Nav items — liens individuels */
.theme-brasserie .nav-item button {
    color: rgba(255,255,255,0.82) !important;
}
.theme-brasserie .nav-item button:hover {
    color: #ffffff !important;
    background: rgba(255,255,255,0.08) !important;
}
.theme-brasserie .nav-item.active button {
    color: #d4a017 !important;
    border-left-color: #b8860b !important;
    background: linear-gradient(90deg, rgba(184,134,11,0.25) 0%, transparent 100%) !important;
    font-weight: 600;
}

/* Footer sidebar — nom utilisateur, rôle, icône déconnexion */
.theme-brasserie .sidebar-footer {
    border-top-color: rgba(255,255,255,0.12) !important;
}
.theme-brasserie .sidebar-footer *,
.theme-brasserie .sidebar-user-name,
.theme-brasserie .sidebar-user-role,
.theme-brasserie .sidebar-user * {
    color: rgba(255,255,255,0.85) !important;
}
.theme-brasserie .sidebar-footer button,
.theme-brasserie .sidebar-footer a {
    color: rgba(255,255,255,0.7) !important;
}
.theme-brasserie .sidebar-footer button:hover,
.theme-brasserie .sidebar-footer a:hover {
    color: #ffffff !important;
    background: rgba(255,255,255,0.08) !important;
}

/* Vue essentielle / badges dans la sidebar */
.theme-brasserie .sidebar .nav-badge {
    background: #b8860b !important;
}

/* ── Sidebar : tout le texte en blanc sans exception ── */
.theme-brasserie .sidebar,
.theme-brasserie .sidebar * {
    color: rgba(255,255,255,0.85) !important;
}
/* Lien actif reste doré */
.theme-brasserie .nav-item.active button,
.theme-brasserie .nav-item.active button * {
    color: #d4a017 !important;
}

/* ── Contenu principal : couleurs chaudes ── */
.theme-brasserie .main-content .section-title,
.theme-brasserie .main-content .card-title,
.theme-brasserie .main-content h1,
.theme-brasserie .main-content h2,
.theme-brasserie .main-content h3,
.theme-brasserie .main-content h4,
.theme-brasserie .card .section-title,
.theme-brasserie .card .card-title,
.theme-brasserie .card h1,
.theme-brasserie .card h2,
.theme-brasserie .card h3,
.theme-brasserie .card h4 {
    color: #2c1a0e !important;
}

.theme-brasserie .main-content p,
.theme-brasserie .main-content label,
.theme-brasserie .main-content span,
.theme-brasserie .main-content td,
.theme-brasserie .main-content th,
.theme-brasserie .main-content li,
.theme-brasserie .card p,
.theme-brasserie .card label,
.theme-brasserie .card span,
.theme-brasserie .card td,
.theme-brasserie .card th,
.theme-brasserie .card li {
    color: #4a3020 !important;
}

/* Boutons or / ambre */
.theme-brasserie .btn-primary {
    background: linear-gradient(135deg, #c8960c 0%, #9a7008 100%) !important;
    color: #fff8e8 !important;
    box-shadow: 0 4px 12px rgba(184,134,11,0.4) !important;
    font-weight: 600;
    letter-spacing: 0.03em;
    border: none !important;
}
.theme-brasserie .btn-primary:hover {
    background: linear-gradient(135deg, #d4a017 0%, #b8860b 100%) !important;
    box-shadow: 0 6px 20px rgba(184,134,11,0.5) !important;
}

/* Inputs papier */
.theme-brasserie .form-control,
.theme-brasserie input,
.theme-brasserie select,
.theme-brasserie textarea {
    background: #f5ecd6 !important;
    border: 1px solid #d4b896 !important;
    color: #2c1a0e !important;
}
.theme-brasserie input:focus,
.theme-brasserie select:focus,
.theme-brasserie textarea:focus,
.theme-brasserie .form-control:focus {
    border-color: #b8860b !important;
    box-shadow: 0 0 0 3px rgba(184,134,11,0.15) !important;
    outline: none !important;
}

/* Tables bistrot */
.theme-brasserie .table {
    border: 1px solid #e8d5a8;
}
.theme-brasserie .table thead {
    background: #f8eecc;
    border-bottom: 2px solid #b8860b;
}
.theme-brasserie .table th {
    color: #2c1a0e !important;
    font-family: 'Playfair Display', serif !important;
}
.theme-brasserie .table tr:hover {
    background: #fef8e8 !important;
}

/* Login page */
.theme-brasserie .login-container {
    background: linear-gradient(145deg, #fdf6e3 0%, #f8eecc 50%, #f0e4b8 100%) !important;
}
.theme-brasserie .login-container::before {
    background: none !important;
    animation: none !important;
}
.theme-brasserie .login-logo h1,
.theme-brasserie .login-logo h1 span {
    color: #2c1a0e !important;
    -webkit-text-fill-color: #2c1a0e !important;
    background: none !important;
    text-shadow: none !important;
}
.theme-brasserie .login-logo h1 span {
    color: #b8860b !important;
    -webkit-text-fill-color: #b8860b !important;
}
.theme-brasserie .login-form {
    background: #fffcf2 !important;
    border: 1px solid #e8d5a8 !important;
    box-shadow: 0 8px 30px rgba(139,90,43,0.15) !important;
}
.theme-brasserie .login-subtitle {
    color: #7a5c3a !important;
}
.theme-brasserie .logo-icon {
    filter: drop-shadow(0 4px 12px rgba(184,134,11,0.4)) !important;
    animation: logoFloat 3s ease-in-out infinite;
}

/* Topbar ivoire */
.theme-brasserie .topbar {
    background: #fffcf2 !important;
    border-bottom: 2px solid #e8d5a8 !important;
    box-shadow: 0 2px 8px rgba(139,90,43,0.1) !important;
}

/* User list items */
.theme-brasserie .user-list-item {
    background: #f5ecd6 !important;
    border: 2px solid transparent !important;
}
.theme-brasserie .user-list-item:hover {
    border-color: #b8860b !important;
    background: #fef8e8 !important;
    box-shadow: 0 4px 12px rgba(184,134,11,0.2) !important;
}

/* Avatar en doré */
.theme-brasserie .user-list-item .avatar {
    background: linear-gradient(135deg, #c8960c 0%, #9a7008 100%) !important;
}

/* Scrollbar bois */
.theme-brasserie ::-webkit-scrollbar-track {
    background: #f5ecd6;
}
.theme-brasserie ::-webkit-scrollbar-thumb {
    background: #d4b896;
}
.theme-brasserie ::-webkit-scrollbar-thumb:hover {
    background: #b8860b;
}
.fp-module-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.fp-module-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(0,180,216,0.15);
  transform: translateY(-2px);
}
.fp-card-done { border-color: var(--success) !important; box-shadow: 0 0 0 1px rgba(46,204,113,0.2); }
.fp-card-illus { font-size: 2.2rem; margin-bottom: 0.25rem; }
.fp-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.35rem; }
.fp-card-num { font-size: 0.72rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.fp-card-title { font-size: 0.97rem; font-weight: 700; color: var(--text-primary); margin: 0 0 0.3rem; }
.fp-card-meta { font-size: 0.8rem; color: var(--text-secondary); margin: 0 0 0.2rem; }
.fp-card-legal { font-size: 0.7rem; color: var(--text-muted); margin: 0 0 0.5rem; font-style: italic; }

/* — Badges — */
.fp-badge { font-size: 0.68rem; padding: 0.2rem 0.55rem; border-radius: 20px; font-weight: 700; letter-spacing: 0.3px; }
.fp-badge-ok  { background: rgba(46,204,113,0.18); color: var(--success); border: 1px solid rgba(46,204,113,0.4); }
.fp-badge-quiz { background: rgba(243,156,18,0.15); color: var(--warning); border: 1px solid rgba(243,156,18,0.4); }
.fp-badge-prog { background: rgba(0,180,216,0.12); color: var(--accent); border: 1px solid rgba(0,180,216,0.4); }
.fp-badge-new  { background: rgba(160,160,176,0.12); color: var(--text-muted); border: 1px solid var(--border); }

/* — Progress bar — */
.fp-progress-bar { height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; margin: 0.5rem 0 0.2rem; }
.fp-progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent), #48cae4); border-radius: 3px; transition: width 0.5s ease; }
.fp-progress-label { font-size: 0.72rem; color: var(--text-muted); }

/* — Module detail layout — */
.fp-module-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.fp-module-header h2 { margin: 0; font-size: 1.1rem; color: var(--text-primary); }
.fp-module-header p  { margin: 0.15rem 0 0; font-size: 0.83rem; color: var(--text-secondary); }
.fp-back-btn {
  background: rgba(0,180,216,0.12);
  color: var(--accent);
  border: 1px solid rgba(0,180,216,0.35);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  font-size: 0.85rem;
  transition: var(--transition);
  white-space: nowrap;
}
.fp-back-btn:hover { background: rgba(0,180,216,0.22); }

.fp-two-col { display: grid; grid-template-columns: 1fr 330px; gap: 1rem; }
@media (max-width: 900px) { .fp-two-col { grid-template-columns: 1fr; } }

/* — Lesson list — */
.fp-section-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}
.fp-objectives {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.84rem;
  color: var(--text-secondary);
}
.fp-objectives strong { color: var(--text-primary); }
.fp-objectives ul { margin: 0.3rem 0 0 1.2rem; }
.fp-objectives li { margin: 0.2rem 0; }
.fp-lesson-list { display: flex; flex-direction: column; gap: 0.4rem; }
.fp-lesson-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  cursor: pointer;
  transition: var(--transition);
}
.fp-lesson-item:hover { border-color: var(--accent); background: rgba(0,180,216,0.06); }
.fp-lesson-done { border-color: rgba(46,204,113,0.5) !important; background: rgba(46,204,113,0.06) !important; }
.fp-lesson-icon { font-size: 1rem; }
.fp-lesson-info strong { display: block; font-size: 0.88rem; color: var(--text-primary); }
.fp-lesson-info small { color: var(--text-muted); font-size: 0.76rem; }

/* — Status column — */
.fp-status-col { display: flex; flex-direction: column; gap: 0.75rem; }
.fp-status-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}
.fp-status-card h3 { margin: 0 0 0.75rem; font-size: 0.88rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.5px; }
.fp-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.83rem;
}
.fp-stat-row:last-child { border-bottom: none; }
.fp-stat-row span { color: var(--text-secondary); }
.fp-stat-row strong { color: var(--text-primary); }
.fp-action-box {
  background: rgba(46,204,113,0.07);
  border: 1px solid rgba(46,204,113,0.25);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.fp-action-btn { width: 100%; padding: 0.65rem; border-radius: var(--radius-sm); font-size: 0.88rem; cursor: pointer; }
.fp-hint {
  background: rgba(243,156,18,0.08);
  border: 1px solid rgba(243,156,18,0.2);
  color: var(--warning);
  font-size: 0.83rem;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  text-align: center;
}
.fp-legal-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.78rem;
}
.fp-legal-box h4 { margin: 0 0 0.4rem; font-size: 0.82rem; color: var(--text-secondary); }
.fp-legal-box p { margin: 0; line-height: 1.5; color: var(--text-muted); }

/* — Lesson view — */
.fp-lesson-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 0.9rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}
.fp-lesson-header h2 { margin: 0; font-size: 1.05rem; flex: 1; color: var(--text-primary); }
.fp-lesson-header small { color: var(--text-muted); display: block; font-size: 0.78rem; margin-top: 0.15rem; }
.fp-timer {
  font-size: 0.92rem;
  font-weight: 700;
  background: rgba(0,180,216,0.15);
  color: var(--accent);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  font-variant-numeric: tabular-nums;
  border: 1px solid rgba(0,180,216,0.3);
}
.fp-lesson-body {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.fp-lesson-content {
  padding: 1.75rem 2rem;
  line-height: 1.75;
  font-size: 0.91rem;
  color: var(--text-primary);
}
.fp-lesson-content h3 { color: var(--accent); margin: 0 0 0.75rem; font-size: 1.1rem; }
.fp-lesson-content h4 {
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.3rem;
  margin: 1.25rem 0 0.6rem;
  font-size: 0.95rem;
}
.fp-lesson-footer {
  border-top: 1px solid var(--border);
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-secondary);
  border-radius: 0 0 var(--radius) var(--radius);
}
.fp-timer-msg { font-size: 0.88rem; padding: 0.5rem 1rem; border-radius: var(--radius-sm); }
.fp-timer-wait { background: rgba(243,156,18,0.1); color: var(--warning); border: 1px solid rgba(243,156,18,0.25); }
.fp-timer-ok   { background: rgba(46,204,113,0.1); color: var(--success); border: 1px solid rgba(46,204,113,0.25); }
.fp-validate-btn { min-width: 280px; padding: 0.75rem 1.5rem; font-size: 0.95rem; }
.fp-already-done { color: var(--success); font-size: 0.83rem; font-weight: 600; }

/* — Lesson content boxes — */
.fp-lesson-intro {
  background: rgba(0,180,216,0.07);
  border: 1px solid rgba(0,180,216,0.2);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}
.fp-lesson-intro h3 { margin: 0 0 0.5rem; color: var(--accent); }
.fp-lesson-intro p  { color: var(--text-secondary); font-size: 0.9rem; margin: 0; }
.fp-lesson-section { margin-bottom: 1.5rem; }

.fp-info-box {
  background: rgba(52,152,219,0.09);
  border-left: 3px solid var(--info);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.75rem 1rem;
  margin: 0.75rem 0;
  font-size: 0.87rem;
  color: var(--text-secondary);
}
.fp-info-box strong { color: var(--text-primary); }
.fp-info-box ul, .fp-info-box ol { margin: 0.4rem 0 0 1.2rem; }
.fp-info-box li { margin: 0.25rem 0; }
.fp-info-yellow {
  background: rgba(243,156,18,0.08);
  border-left-color: var(--warning);
}
.fp-info-red {
  background: rgba(231,76,60,0.08);
  border-left-color: var(--danger);
}
.fp-warning-box {
  background: rgba(231,76,60,0.08);
  border: 1px solid rgba(231,76,60,0.25);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin: 0.75rem 0;
  font-size: 0.87rem;
  color: var(--text-secondary);
}
.fp-warning-box strong { color: var(--danger); }
.fp-warning-box ul, .fp-warning-box ol { margin: 0.4rem 0 0 1.2rem; }

.fp-table-wrapper { overflow-x: auto; margin: 0.75rem 0; border-radius: var(--radius-sm); }
.fp-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.fp-table th {
  background: var(--bg-secondary);
  color: var(--accent);
  padding: 0.55rem 0.85rem;
  text-align: left;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border);
}
.fp-table td { padding: 0.45rem 0.85rem; border-bottom: 1px solid var(--border); color: var(--text-secondary); }
.fp-table td strong { color: var(--text-primary); }
.fp-table tr:hover td { background: rgba(0,180,216,0.04); }

.fp-lesson-summary {
  background: rgba(46,204,113,0.06);
  border: 1px solid rgba(46,204,113,0.2);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin-top: 1.5rem;
}
.fp-lesson-summary h4 { margin: 0 0 0.5rem; color: var(--success); font-size: 0.9rem; }
.fp-lesson-summary ul, .fp-lesson-summary ol { margin: 0 0 0 1.2rem; }
.fp-lesson-summary li { margin: 0.25rem 0; font-size: 0.86rem; color: var(--text-secondary); }

/* — HACCP Principles — */
.fp-principle-block {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin: 0.75rem 0;
}
.fp-principle-num {
  display: inline-block;
  background: var(--accent);
  color: #000;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.fp-principle-title { font-size: 0.97rem; font-weight: 700; color: var(--text-primary); margin: 0 0 0.5rem; }

/* — Decision tree — */
.fp-decision-tree {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  font-size: 0.84rem;
}
.fp-dt-question {
  margin: 0.6rem 0;
  padding: 0.55rem 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
}
.fp-dt-branch { display: flex; flex-direction: column; gap: 0.25rem; margin-top: 0.4rem; padding-left: 1rem; font-size: 0.81rem; }
.fp-dt-oui { color: var(--success); font-weight: 700; }
.fp-dt-non { color: var(--danger);  font-weight: 700; }

/* — Case studies — */
.fp-case-study { display: flex; flex-direction: column; gap: 0.25rem; }
.fp-case-header {
  background: var(--accent);
  color: #000;
  font-weight: 700;
  font-size: 0.83rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  margin-top: 0.75rem;
}
.fp-case-nc { background: var(--danger); color: #fff; }
.fp-case-header + .fp-info-box,
.fp-case-header + .fp-info-box.fp-info-red {
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  margin-top: 0;
  border-top: none;
}

/* — Quiz — */
.fp-quiz-header {
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}
.fp-quiz-header h2 { margin: 0 0 0.25rem; color: var(--accent); font-size: 1.1rem; }
.fp-quiz-header small { color: var(--text-secondary); font-size: 0.83rem; }
.fp-quiz-form { display: flex; flex-direction: column; gap: 0.85rem; }
.fp-question {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}
.fp-question-text { font-size: 0.93rem; margin: 0 0 0.75rem; color: var(--text-primary); font-weight: 600; }
.fp-options { display: flex; flex-direction: column; gap: 0.35rem; }
.fp-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.87rem;
  color: var(--text-secondary);
  border: 1px solid transparent;
  transition: var(--transition);
}
.fp-option:hover { background: rgba(0,180,216,0.08); border-color: rgba(0,180,216,0.3); color: var(--text-primary); }
.fp-option input { cursor: pointer; accent-color: var(--accent); }
.fp-quiz-submit {
  align-self: center;
  min-width: 250px;
  padding: 0.85rem 2rem;
  font-size: 0.95rem;
  margin-top: 0.5rem;
}

/* — Quiz result — */
.fp-quiz-result {
  text-align: center;
  padding: 2.5rem 2rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.fp-result-pass { border-color: rgba(46,204,113,0.5); box-shadow: 0 0 40px rgba(46,204,113,0.1); }
.fp-result-fail { border-color: rgba(231,76,60,0.4); }
.fp-result-icon { font-size: 4rem; margin-bottom: 1rem; }
.fp-result-score { font-size: 4rem; font-weight: 900; color: var(--accent); line-height: 1; }
.fp-result-score small { font-size: 1.5rem; }
.fp-result-threshold { color: var(--text-muted); font-size: 0.85rem; }
.fp-quiz-result h2 { color: var(--text-primary); margin: 0.5rem 0; }

/* — Attestation — */
.fp-attest-page { max-width: 820px; margin: 0 auto; }
.fp-attest-actions { display: flex; gap: 0.75rem; margin-bottom: 1rem; }
.fp-attestation {
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 2.5rem;
  background: var(--bg-card);
  color: var(--text-primary);
}
.fp-attest-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}
.fp-attest-logo { font-size: 1.5rem; font-weight: 900; color: var(--accent); letter-spacing: 2px; }
.fp-attest-org { font-size: 0.83rem; color: var(--text-secondary); text-align: right; }
.fp-attest-title-block { text-align: center; margin: 1.25rem 0; }
.fp-attest-ref { font-size: 0.78rem; color: var(--text-muted); font-family: monospace; }
.fp-attest-title { font-size: 1.3rem; color: var(--text-primary); letter-spacing: 1px; margin: 0.25rem 0 0; font-family: var(--font-display); }
.fp-attest-body { font-size: 0.88rem; line-height: 1.8; color: var(--text-secondary); }
.fp-attest-body strong { color: var(--text-primary); }
.fp-attest-agent {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  text-align: center;
  padding: 0.75rem;
  border: 1px solid rgba(0,180,216,0.4);
  background: rgba(0,180,216,0.07);
  border-radius: var(--radius-sm);
  margin: 0.75rem 0;
}
.fp-attest-module {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin: 0.75rem 0;
  text-align: center;
  color: var(--text-primary);
}
.fp-attest-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin: 1rem 0;
  font-size: 0.83rem;
}
.fp-attest-details > div {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.3rem;
}
.fp-attest-details span { color: var(--text-muted); }
.fp-attest-objectives ul { margin: 0.3rem 0 0 1.3rem; }
.fp-attest-objectives li { color: var(--text-secondary); font-size: 0.85rem; }
.fp-attest-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
}
.fp-attest-sign { text-align: center; color: var(--text-secondary); }
.fp-sign-line { border-bottom: 1px solid var(--border); margin: 0 1rem 0.4rem; height: 50px; }
.fp-attest-legal { font-size: 0.74rem; color: var(--text-muted); }
.fp-attest-legal p { margin: 0 0 0.25rem; }

@media print {
  .fp-attest-actions, nav, header, .fp-module-header,
  .fp-back-btn, .sidebar, .topbar { display: none !important; }
  .fp-attestation {
    border: 2px solid #333 !important;
    background: #fff !important;
    color: #111 !important;
  }
  .fp-attest-logo, .fp-attest-title, .fp-attest-agent { color: #000 !important; }
  .fp-attest-body, .fp-attest-org, .fp-attest-sign { color: #333 !important; }
}

/* =================================================================
   FORMATION-PRO v4.0 — Classes manquantes
   ================================================================= */

/* Code formation individuel (affiché dans le header) */
.fp-code-badge {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.3rem 0.75rem;
  background: rgba(0,180,216,0.1);
  border: 1px solid rgba(0,180,216,0.35);
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
}
.fp-code-badge strong { color: var(--accent); font-family: monospace; font-size: 0.85rem; }

/* Module verrouillé */
.fp-card-locked {
  opacity: 0.55;
  cursor: not-allowed !important;
  filter: grayscale(0.4);
}
.fp-card-locked:hover { transform: none !important; border-color: var(--border) !important; }

/* Leçon verrouillée */
.fp-lesson-locked {
  opacity: 0.5;
  cursor: not-allowed !important;
}

/* Badge verrou */
.fp-badge-lock { background: rgba(120,120,140,0.12); color: var(--text-muted); border: 1px solid var(--border); }

/* Statut attestation (validée ou en attente) */
.fp-attest-validated {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.3rem 1rem;
  background: rgba(46,204,113,0.12);
  border: 1px solid rgba(46,204,113,0.4);
  border-radius: 20px;
  color: var(--success);
  font-size: 0.82rem;
  font-weight: 600;
}
.fp-attest-pending {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.3rem 1rem;
  background: rgba(243,156,18,0.1);
  border: 1px solid rgba(243,156,18,0.35);
  border-radius: 20px;
  color: var(--warning);
  font-size: 0.82rem;
}

/* Dashboard superviseur — table dans le style de l'app */
.fp-supervisor-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
}
.fp-supervisor-table th {
  background: var(--bg-secondary);
  color: var(--accent);
  padding: 0.65rem 1rem;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1;
}
.fp-supervisor-table td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: middle;
}
.fp-supervisor-table td strong { color: var(--text-primary); }
.fp-supervisor-table tr:hover td { background: rgba(0,180,216,0.05); }
.fp-supervisor-table .btn-sm {
  padding: 0.25rem 0.6rem;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
}

/* Panneau détail agent */
.fp-detail-panel h3 { color: var(--text-primary); margin: 0 0 0.75rem; font-size: 1rem; }



/* ============================================================
   THEME ACIER - Industriel, metal brosse, technique
   ============================================================ */

.theme-acier .section-title,
.theme-acier .card-title,
.theme-acier h1, .theme-acier h2,
.theme-acier h3, .theme-acier h4,
.theme-acier .nav-group-label,
.theme-acier .sidebar-brand-name,
.theme-acier .btn,
.theme-acier .nav-label {
    font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif !important;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.theme-acier .card {
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px)) !important;
    border-radius: 0 !important;
    border: 1px solid #334055 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4), inset 0 1px 0 rgba(126,184,212,0.06) !important;
}
.theme-acier .card:hover {
    border-color: #7eb8d4 !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5), 0 0 0 1px rgba(126,184,212,0.2) !important;
}

.theme-acier .btn, .theme-acier button { border-radius: 0 !important; }
.theme-acier .btn-primary {
    background: linear-gradient(135deg, #7eb8d4 0%, #4a8aab 100%) !important;
    color: #0d1520 !important;
    box-shadow: none !important;
    font-weight: 700;
    letter-spacing: 0.1em;
    border-radius: 0 !important;
}
.theme-acier .btn-primary:hover {
    background: linear-gradient(135deg, #a0d0e8 0%, #6aaac8 100%) !important;
    transform: none !important;
}

.theme-acier .login-container {
    background: linear-gradient(160deg, #0c1018 0%, #141820 50%, #1c2230 100%) !important;
}
.theme-acier .login-container::before { background: none !important; animation: none !important; }
.theme-acier .login-logo h1,
.theme-acier .login-logo h1 span {
    color: #d0dae6 !important;
    -webkit-text-fill-color: #d0dae6 !important;
    background: none !important;
    font-family: 'Barlow Condensed', sans-serif !important;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 2.4rem !important;
}
.theme-acier .login-logo h1 span { color: #7eb8d4 !important; -webkit-text-fill-color: #7eb8d4 !important; }
.theme-acier .login-form {
    background: #1c2230 !important;
    border: 1px solid #334055 !important;
    border-radius: 0 !important;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5) !important;
}

.theme-acier .sidebar { background: #0c1018 !important; border-right: 2px solid #334055 !important; }
.theme-acier .sidebar-header {
    background: linear-gradient(135deg, #0c1018 0%, #141820 100%) !important;
    border-bottom: 1px solid #7eb8d4 !important;
}
.theme-acier .sidebar,
.theme-acier .sidebar * { color: rgba(208,218,230,0.85) !important; }
.theme-acier .sidebar-brand-name {
    color: #7eb8d4 !important;
    -webkit-text-fill-color: #7eb8d4 !important;
    background: none !important;
    font-family: 'Barlow Condensed', sans-serif !important;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 1.1em !important;
}
.theme-acier .nav-group { border-bottom-color: rgba(126,184,212,0.1) !important; }
.theme-acier .nav-group-toggle { color: #7eb8d4 !important; font-size: 0.68rem !important; letter-spacing: 1.8px !important; }
.theme-acier .nav-item button { color: rgba(208,218,230,0.75) !important; border-radius: 0 !important; }
.theme-acier .nav-item button:hover { color: #d0dae6 !important; background: rgba(126,184,212,0.08) !important; border-radius: 0 !important; }
.theme-acier .nav-item.active button {
    color: #7eb8d4 !important;
    border-left-color: #7eb8d4 !important;
    background: rgba(126,184,212,0.1) !important;
    border-radius: 0 !important;
}
.theme-acier .sidebar-footer { border-top-color: rgba(126,184,212,0.15) !important; }
.theme-acier .topbar { background: #0c1018 !important; border-bottom: 1px solid #334055 !important; border-radius: 0 !important; box-shadow: 0 2px 8px rgba(0,0,0,0.4) !important; }
.theme-acier .section-title { font-size: 0.8rem !important; letter-spacing: 2px !important; color: #7eb8d4 !important; }

.theme-acier input, .theme-acier select, .theme-acier textarea, .theme-acier .form-control {
    border-radius: 0 !important;
    border-left: 2px solid #334055 !important;
}
.theme-acier input:focus, .theme-acier select:focus, .theme-acier textarea:focus, .theme-acier .form-control:focus {
    border-left-color: #7eb8d4 !important;
    box-shadow: none !important;
}
.theme-acier .table thead { background: #141820 !important; border-bottom: 2px solid #334055 !important; }
.theme-acier .table th { font-family: 'Barlow Condensed', sans-serif !important; letter-spacing: 0.1em !important; text-transform: uppercase !important; font-size: 0.8rem !important; }
.theme-acier ::-webkit-scrollbar-track { background: #0c1018; }
.theme-acier ::-webkit-scrollbar-thumb { background: #334055; }
.theme-acier ::-webkit-scrollbar-thumb:hover { background: #7eb8d4; }


/* ============================================================
   THEME BLOC-NOTES - Papier ligne, ecriture manuscrite
   ============================================================ */

.theme-notepad,
.theme-notepad * { font-family: 'Caveat', cursive !important; }

.theme-notepad { background: #fefefe !important; }
.theme-notepad .main-content {
    background: repeating-linear-gradient(
        transparent 0px, transparent 27px, #c8d8f0 28px
    ) !important;
    background-color: #fefefe !important;
}

.theme-notepad .card {
    background: #fffff8 !important;
    border: none !important;
    border-left: 4px solid #1a56a0 !important;
    box-shadow: 2px 3px 10px rgba(0,0,0,0.12) !important;
    border-radius: 2px !important;
    position: relative;
}
.theme-notepad .card::before {
    content: '';
    position: absolute;
    top: -6px; left: 50%;
    transform: translateX(-50%);
    width: 14px; height: 14px;
    background: radial-gradient(circle, #e63946 40%, #c0392b 100%);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    z-index: 1;
}
.theme-notepad .card:hover {
    box-shadow: 3px 5px 18px rgba(0,0,0,0.18) !important;
    transform: translateY(-2px) rotate(0.3deg) !important;
}

.theme-notepad .sidebar { background: #1a2d4a !important; border-right: none !important; }
.theme-notepad .sidebar-header { background: #1a2d4a !important; border-bottom: 2px solid #c8d8f0 !important; }
.theme-notepad .sidebar,
.theme-notepad .sidebar * { color: rgba(255,255,255,0.88) !important; }
.theme-notepad .sidebar-brand-name {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background: none !important;
    font-size: 1.2rem !important;
    font-weight: 700;
}
.theme-notepad .nav-group { border-bottom-color: rgba(200,216,240,0.2) !important; }
.theme-notepad .nav-group-toggle { color: #c8d8f0 !important; font-size: 1rem !important; letter-spacing: 0 !important; text-transform: none !important; }
.theme-notepad .nav-item button { color: rgba(255,255,255,0.8) !important; }
.theme-notepad .nav-item button:hover { color: #ffffff !important; background: rgba(200,216,240,0.15) !important; }
.theme-notepad .nav-item.active button { color: #ffffff !important; border-left-color: #c8d8f0 !important; background: rgba(200,216,240,0.2) !important; }
.theme-notepad .sidebar-footer { border-top-color: rgba(200,216,240,0.2) !important; }

.theme-notepad .topbar { background: #fffff8 !important; border-bottom: 2px solid #1a56a0 !important; box-shadow: 0 2px 6px rgba(0,0,0,0.06) !important; }

.theme-notepad .section-title,
.theme-notepad .card-title,
.theme-notepad h1, .theme-notepad h2,
.theme-notepad h3, .theme-notepad h4 {
    color: #1a2d4a !important;
    font-size: 1.15rem !important;
    border-bottom: 1px solid #c8d8f0;
    padding-bottom: 0.2em;
    display: block;
}

.theme-notepad .btn-primary {
    background: #1a56a0 !important;
    color: #ffffff !important;
    border: 2px solid #1a56a0 !important;
    border-radius: 3px !important;
    box-shadow: 2px 2px 0 #0d3d7a !important;
    font-weight: 700;
}
.theme-notepad .btn-primary:hover {
    background: #134588 !important;
    transform: translate(1px, 1px) !important;
    box-shadow: 1px 1px 0 #0d3d7a !important;
}

.theme-notepad input, .theme-notepad select,
.theme-notepad textarea, .theme-notepad .form-control {
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid #1a56a0 !important;
    border-radius: 0 !important;
    padding-left: 0 !important;
    color: #1a1a2e !important;
    box-shadow: none !important;
}
.theme-notepad input:focus, .theme-notepad select:focus,
.theme-notepad textarea:focus, .theme-notepad .form-control:focus {
    border-bottom-color: #e63946 !important;
    box-shadow: none !important;
    outline: none !important;
    background: rgba(26,86,160,0.03) !important;
}

.theme-notepad .table { border: none !important; background: transparent !important; }
.theme-notepad .table thead { background: transparent !important; border-bottom: 2px solid #1a56a0 !important; }
.theme-notepad .table th { color: #1a2d4a !important; font-size: 0.9rem !important; }
.theme-notepad .table td { border-bottom: 1px solid #c8d8f0 !important; }
.theme-notepad .table tr:hover { background: rgba(26,86,160,0.04) !important; }
.theme-notepad ::-webkit-scrollbar-track { background: #f0f4fa; }
.theme-notepad ::-webkit-scrollbar-thumb { background: #c8d8f0; }
.theme-notepad ::-webkit-scrollbar-thumb:hover { background: #1a56a0; }


/* ============================================================
   THEME LUXE - Restaurant etoile, noir & or
   ============================================================ */

.theme-luxe * { font-family: 'Lato', Georgia, sans-serif !important; }
.theme-luxe .section-title,
.theme-luxe .card-title,
.theme-luxe h1, .theme-luxe h2,
.theme-luxe h3, .theme-luxe h4,
.theme-luxe .sidebar-brand-name,
.theme-luxe .login-logo h1,
.theme-luxe .nav-group-label {
    font-family: 'Cormorant Garamond', Georgia, serif !important;
    font-style: italic;
    letter-spacing: 0.02em;
}

.theme-luxe { background: #080808 !important; }
.theme-luxe .main-content { background: #080808 !important; }

.theme-luxe .card {
    background: #141414 !important;
    border: 1px solid #2a2520 !important;
    border-top: 1px solid #c9a84c !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.6) !important;
    border-radius: 2px !important;
}
.theme-luxe .card:hover {
    border-color: #c9a84c !important;
    box-shadow: 0 8px 30px rgba(0,0,0,0.7), 0 0 0 1px rgba(201,168,76,0.2) !important;
}

.theme-luxe .sidebar { background: #050505 !important; border-right: 1px solid #2a2520 !important; }
.theme-luxe .sidebar-header { background: #050505 !important; border-bottom: 1px solid #c9a84c !important; }
.theme-luxe .sidebar,
.theme-luxe .sidebar * { color: rgba(245,240,232,0.7) !important; }
.theme-luxe .sidebar-brand-name {
    color: #c9a84c !important;
    -webkit-text-fill-color: #c9a84c !important;
    background: none !important;
    font-family: 'Cormorant Garamond', serif !important;
    font-style: italic;
    font-size: 1.3em !important;
    font-weight: 600;
    letter-spacing: 0.08em;
}
.theme-luxe .nav-group { border-bottom-color: rgba(201,168,76,0.08) !important; }
.theme-luxe .nav-group-toggle {
    color: rgba(201,168,76,0.6) !important;
    font-family: 'Cormorant Garamond', serif !important;
    font-style: italic;
    font-size: 0.85rem !important;
    letter-spacing: 1px !important;
    text-transform: none !important;
}
.theme-luxe .nav-item button { color: rgba(245,240,232,0.65) !important; letter-spacing: 0.03em; }
.theme-luxe .nav-item button:hover { color: #f5f0e8 !important; background: rgba(201,168,76,0.06) !important; }
.theme-luxe .nav-item.active button { color: #c9a84c !important; border-left-color: #c9a84c !important; background: rgba(201,168,76,0.08) !important; font-weight: 600; }
.theme-luxe .sidebar-footer { border-top-color: rgba(201,168,76,0.12) !important; }

.theme-luxe .topbar { background: #080808 !important; border-bottom: 1px solid #2a2520 !important; box-shadow: 0 2px 10px rgba(0,0,0,0.5) !important; }

.theme-luxe .login-container { background: #050505 !important; }
.theme-luxe .login-container::before { background: none !important; animation: none !important; }
.theme-luxe .login-logo h1,
.theme-luxe .login-logo h1 span {
    color: #f5f0e8 !important;
    -webkit-text-fill-color: #f5f0e8 !important;
    background: none !important;
    font-family: 'Cormorant Garamond', serif !important;
    font-style: italic;
    font-size: 3.5rem !important;
    font-weight: 400;
    letter-spacing: 0.04em;
}
.theme-luxe .login-logo h1 span { color: #c9a84c !important; -webkit-text-fill-color: #c9a84c !important; }
.theme-luxe .login-subtitle { color: rgba(201,168,76,0.7) !important; font-family: 'Cormorant Garamond', serif !important; font-style: italic; letter-spacing: 0.1em; }
.theme-luxe .login-form {
    background: #0f0f0f !important;
    border: 1px solid #2a2520 !important;
    border-top: 2px solid #c9a84c !important;
    border-radius: 2px !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.7) !important;
}

.theme-luxe .section-title { color: #c9a84c !important; font-size: 1.4em !important; font-weight: 400 !important; border-bottom: 1px solid rgba(201,168,76,0.2); padding-bottom: 0.4em; }
.theme-luxe .card-title { color: #f5f0e8 !important; font-size: 1.2em !important; font-weight: 500 !important; }

.theme-luxe .btn-primary {
    background: transparent !important;
    color: #c9a84c !important;
    border: 1px solid #c9a84c !important;
    box-shadow: none !important;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.8em !important;
    border-radius: 1px !important;
    transition: all 0.3s ease !important;
}
.theme-luxe .btn-primary:hover { background: #c9a84c !important; color: #080808 !important; transform: none !important; box-shadow: 0 4px 12px rgba(201,168,76,0.3) !important; }

.theme-luxe input, .theme-luxe select,
.theme-luxe textarea, .theme-luxe .form-control {
    background: #0a0a0a !important;
    border: 1px solid #2a2520 !important;
    border-bottom-color: #c9a84c !important;
    border-radius: 0 !important;
    color: #f5f0e8 !important;
}
.theme-luxe input:focus, .theme-luxe select:focus,
.theme-luxe textarea:focus, .theme-luxe .form-control:focus {
    border-color: #c9a84c !important;
    box-shadow: 0 0 0 1px rgba(201,168,76,0.15) !important;
    outline: none !important;
}

.theme-luxe .table { border-color: #2a2520 !important; }
.theme-luxe .table thead { background: #0f0f0f !important; border-bottom: 1px solid #c9a84c !important; }
.theme-luxe .table th { color: #c9a84c !important; font-family: 'Cormorant Garamond', serif !important; font-style: italic; font-weight: 400; letter-spacing: 0.05em; }
.theme-luxe .table tr:hover { background: rgba(201,168,76,0.03) !important; }
.theme-luxe ::-webkit-scrollbar-track { background: #080808; }
.theme-luxe ::-webkit-scrollbar-thumb { background: #2a2520; }
.theme-luxe ::-webkit-scrollbar-thumb:hover { background: #c9a84c; }

/* ============================================================
   Recherche rapide de modules (palette Ctrl+K)
   ============================================================ */
/* Bouton « ? » — aide contextuelle par écran (zone assistance, à côté du vocal) */
.help-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--danger);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: all var(--transition, .15s);
}
.help-btn:hover {
    color: var(--danger);
    border-color: var(--border-light);
    background: var(--bg-hover);
}
/* Boîte à idées — bouton carré collé à la loupe (petit espace) */
.idea-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-left: 6px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    flex: 0 0 auto;
    -webkit-tap-highlight-color: transparent;
    transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.idea-btn:hover,
.idea-btn:focus-visible {
    color: var(--accent);
    border-color: var(--border-light);
    background: var(--accent-glow);
    outline: none;
}
/* Badge ⭐ Fondateur */
.founder-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 11px;
    border-radius: 999px;
    background: rgba(242, 183, 5, 0.14);
    color: #ffcf4d;
    border: 1px solid rgba(242, 183, 5, 0.55);
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: 0.01em;
}
/* Boîte à idées — fenêtre */
.bi-wrap { font-size: 0.92rem; }
.bi-intro { margin: 0 0 12px; color: var(--text-secondary); line-height: 1.5; }
.bi-lab { display: block; font-size: 0.78rem; font-weight: 600; color: var(--text-muted); margin: 10px 0 4px; }
.bi-select, .bi-textarea { width: 100%; padding: 0.55rem 0.7rem; background: var(--bg-input); border: 1.5px solid var(--border); border-radius: 10px; color: var(--text-primary); font-family: inherit; font-size: 0.9rem; }
.bi-select:focus, .bi-textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.bi-textarea { resize: vertical; min-height: 84px; }
.bi-send { width: 100%; margin-top: 12px; }
.bi-sub { font-weight: 700; color: var(--accent); margin: 18px 0 8px; font-size: 0.85rem; }
.bi-list { display: flex; flex-direction: column; gap: 8px; max-height: 240px; overflow-y: auto; }
.bi-empty { color: var(--text-muted); font-size: 0.85rem; padding: 8px 2px; }
.bi-item { background: var(--bg-input); border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; }
.bi-item-top { margin-bottom: 4px; }
.bi-badge { font-size: 0.72rem; font-weight: 700; color: var(--text-secondary); }
.bi-item-txt { font-size: 0.88rem; color: var(--text-primary); line-height: 1.45; white-space: pre-wrap; }
.bi-note { margin-top: 6px; padding: 6px 9px; border-radius: 8px; background: var(--accent-glow); color: var(--text-secondary); font-size: 0.82rem; }
/* Carte d'aide contextuelle (dans la modale existante) */
.mh-body { font-size: .95rem; line-height: 1.55; }
.mh-desc { margin: 0 0 10px; color: var(--text-secondary); }
.mh-sub { font-weight: 700; color: var(--accent); margin: 12px 0 5px; font-size: .9rem; }
.mh-list { margin: 0 0 6px; padding-left: 20px; }
.mh-list li { margin: 3px 0; }
.mh-q { margin: 7px 0; }
.mh-q > div { color: var(--text-secondary); font-size: .9rem; margin-top: 2px; }
.mh-tip { margin-top: 12px; padding: 9px 12px; border-radius: 10px; background: var(--accent-glow); color: var(--text-secondary); font-size: .9rem; }

.search-palette-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-left: 10px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    flex: 0 0 auto;
    transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.search-palette-btn:hover {
    color: var(--accent);
    border-color: var(--border-light);
    background: var(--accent-glow);
}

.search-palette-overlay {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 12vh 16px 16px;
    background: rgba(0, 0, 0, 0.55);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}
.search-palette-overlay.open { display: flex; }

.search-palette-box {
    width: 100%;
    max-width: 560px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    overflow: hidden;
    animation: sp-pop .12s ease;
}
@keyframes sp-pop {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: none; }
}

.search-palette-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}
.search-palette-input-icon { font-size: 1.1rem; opacity: .8; flex: 0 0 auto; }
.search-palette-input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 1.05rem;
    font-family: inherit;
}
.search-palette-input::placeholder { color: var(--text-muted); }
.search-palette-hint {
    flex: 0 0 auto;
    font-size: .7rem;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 2px 6px;
    background: var(--bg-card);
}

.search-palette-results {
    overflow-y: auto;
    padding: 6px;
}
.search-palette-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-primary);
    font-size: .95rem;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}
.search-palette-item.active,
.search-palette-item:hover {
    background: var(--accent-glow);
    color: var(--accent);
}
.search-palette-item-icon {
    flex: 0 0 auto;
    width: 22px;
    text-align: center;
    font-size: 1.1rem;
}
.search-palette-item-label { flex: 1; min-width: 0; }
.search-palette-empty {
    padding: 24px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: .9rem;
}

@media (max-width: 640px) {
    .search-palette-overlay { padding: 8vh 10px 10px; }
    .search-palette-box { max-height: 78vh; }
}

/* ============================================================
   Visite guidée / Démo interactive
   ============================================================ */
.demo-bubble {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 3500;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    background: var(--bg-secondary);
    border-top: 2px solid var(--accent);
    box-shadow: 0 -6px 28px rgba(0, 0, 0, 0.35);
    animation: demo-rise .18s ease;
}
@keyframes demo-rise {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: none; }
}
.demo-bubble-avatar {
    flex: 0 0 auto;
    font-size: 1.9rem;
    line-height: 1;
    filter: drop-shadow(0 0 6px var(--accent-glow));
}
.demo-bubble-main { flex: 1; min-width: 0; }
.demo-bubble-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 3px;
    flex-wrap: wrap;
}
.demo-bubble-step {
    font-weight: 700;
    font-size: .9rem;
    color: var(--accent);
}
.demo-bubble-dots { display: inline-flex; gap: 5px; align-items: center; }
.demo-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--border);
    transition: background .3s;
}
.demo-dot.active { background: var(--accent); }
.demo-dot.done { background: var(--success); }
.demo-bubble-text {
    font-size: .9rem;
    color: var(--text-secondary);
    line-height: 1.4;
}
.demo-bubble-ctrl {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 6px;
}
.demo-ctrl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}
.demo-ctrl-btn:hover:not([disabled]) {
    border-color: var(--border-light);
    background: var(--accent-glow);
}
.demo-ctrl-btn[disabled] { opacity: .4; cursor: default; }
.demo-ctrl-quit:hover { border-color: var(--danger); background: var(--danger-glow); color: var(--danger); }

/* Anneau lumineux sur l'élément mis en avant (petit bouton OU gros bloc de contenu) */
.demo-highlight {
    position: relative;
    z-index: 3400 !important;
    border-radius: 14px;
    scroll-margin-top: 84px;
    transition: box-shadow .3s ease;
    animation: demo-pulse 1.8s ease-in-out infinite;
}
@keyframes demo-pulse {
    0%, 100% { box-shadow: 0 0 0 2px var(--accent), 0 0 0 6px var(--accent-glow), 0 0 16px 2px var(--accent-glow); }
    50%      { box-shadow: 0 0 0 3px var(--accent), 0 0 0 9px var(--accent-glow), 0 0 24px 5px var(--accent-glow); }
}

@media (max-width: 640px) {
    .demo-bubble { flex-wrap: wrap; gap: 10px; padding: 12px 14px; }
    .demo-bubble-main { order: 3; flex-basis: 100%; }
    .demo-bubble-ctrl { margin-left: auto; }
}

/* ============================================================
   Bouton micro flottant — état réduit (pastille discrète)
   Réduit au repos quand le vocal écoute en silence ; reprend sa
   pilule pleine quand l'assistant parle ou que le vocal est coupé.
   ============================================================ */
.fab-mic-label {
    overflow: hidden;
    white-space: nowrap;
    max-width: 160px;
    opacity: 1;
    transition: max-width .28s ease, opacity .2s ease;
}
.fab-mic.collapsed {
    padding: 1rem;
    gap: 0;
    border-radius: 50%;
}
.fab-mic.collapsed .fab-mic-label {
    max-width: 0;
    opacity: 0;
}
/* Pulsation adoucie quand la pastille est réduite (écoute au repos) */
.fab-mic.collapsed.listening {
    animation: fab-pulse-soft 2.6s infinite;
}
@keyframes fab-pulse-soft {
    0%, 100% { box-shadow: 0 4px 16px rgba(34, 197, 94, 0.35); }
    50%      { box-shadow: 0 5px 22px rgba(34, 197, 94, 0.55); }
}

/* Retour visuel du micro pendant l'enregistrement (mobile push-to-talk).
   Classe dédiée : ne touche pas .listening (= vocal ON). */
.fab-mic.fab-recording {
    animation: fab-recording-pulse 1.05s ease-in-out infinite !important;
}
@keyframes fab-recording-pulse {
    0%, 100% { box-shadow: 0 6px 22px rgba(255, 94, 94, 0.5), 0 0 0 0 rgba(255, 94, 94, 0.55); }
    50%      { box-shadow: 0 6px 30px rgba(255, 94, 94, 0.7), 0 0 0 12px rgba(255, 94, 94, 0); }
}
.fab-mic.fab-processing { opacity: 0.8; }
