/* 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
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* Palette V2 - Plus harmonieuse et professionnelle */
    --bg-primary: #0c0f1a;
    --bg-secondary: #141829;
    --bg-card: #1a1f35;
    --bg-input: #242b45;
    --bg-hover: #2a3352;
    
    /* Textes avec meilleur contraste */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Accent - Bleu plus moderne */
    --accent: #3b82f6;
    --accent-light: #60a5fa;
    --accent-dark: #2563eb;
    --accent-glow: rgba(59, 130, 246, 0.15);
    
    /* Couleurs sémantiques améliorées */
    --success: #22c55e;
    --success-light: #4ade80;
    --success-dark: #16a34a;
    --success-glow: rgba(34, 197, 94, 0.15);
    
    --warning: #f59e0b;
    --warning-light: #fbbf24;
    --warning-dark: #d97706;
    --warning-glow: rgba(245, 158, 11, 0.15);
    
    --danger: #ef4444;
    --danger-light: #f87171;
    --danger-dark: #dc2626;
    --danger-glow: rgba(239, 68, 68, 0.15);
    
    --info: #06b6d4;
    --info-light: #22d3ee;
    --info-dark: #0891b2;
    
    /* Bordures et ombres V2 */
    --border: #2d3654;
    --border-light: #3d4766;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.3);
    
    /* Rayons arrondis cohérents */
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Transitions V2 */
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Layout */
    --sidebar-width: 260px;
    --topbar-height: 68px;
    
    /* Typographie V2 - Poppins */
    --font-main: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Poppins', sans-serif;
    --font-alt: 'Poppins', sans-serif;
}

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; }
.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: linear-gradient(145deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, #1e2744 100%);
    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 */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.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 */
.sidebar {
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 90;
    transform: translateX(-100%);
    transition: transform var(--transition-slow);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
}

.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: 600px;
}

/* 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;
    min-height: calc(100vh - var(--topbar-height));
    background: var(--bg-primary);
}

.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 - Enhanced shadows and hover */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin-bottom: 1.25rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: all var(--transition);
}

.card:hover {
    border-color: var(--border-light);
    box-shadow: var(--shadow-lg);
}

.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(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45);
}

/* 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: linear-gradient(90deg, #002654 0%, #002654 30%, #f0f0f0 30%, #f0f0f0 70%, #e63946 70%, #e63946 100%) !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;
}

/* Tables V2 */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.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);
}

.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.6rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    letter-spacing: -0.02em;
}

.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;
}

.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-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);
}

.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;
}

/* ============================================================
   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;
}
.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; }
