/* === Style Block 1 === */
:root {
    --bg-main: #f3f4f6;
    --sidebar-width: 55%;
    --primary: #1e40af;
    --primary-hover: #1d4ed8;
    --accent: #f59e0b;
    --text-dark: #111827;
    --text-muted: #4b5563;
    --border: #e5e7eb;
    --surface: #ffffff;
    --success: #10b981;
    --danger: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-dark);
    height: 100vh;
    overflow: hidden;
    display: flex;
}

/* Login Screen */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #0f172a;
    background: radial-gradient(circle at 50% 40%, #1e293b 0%, #0f172a 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.login-card {
    background-color: #ffffff;
    padding: 36px 36px 32px 36px;
    border-radius: 24px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border-top: 10px solid var(--primary, #1e40af);
    position: relative;
    box-sizing: border-box;
    text-align: center;
}

.login-card .login-logo {
    max-width: 220px;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin-bottom: 8px;
    display: inline-block;
}

.login-card h2 {
    font-size: 1.08rem;
    font-weight: 700;
    color: #0f172a;
    margin: 6px 0 20px 0;
    line-height: 1.3;
}

.login-card .login-field {
    margin-bottom: 12px;
}

.login-card .login-field.login-field-password,
.login-card .login-field-password {
    margin-bottom: 25px !important;
}

.login-card input[type="email"],
.login-card input[type="password"],
.login-card input {
    width: 100%;
    padding: 12px 16px !important;
    border-radius: 10px !important;
    border: 1px solid var(--border) !important;
    outline: none;
    font-size: 0.92rem !important;
    box-sizing: border-box;
    transition: all 0.2s ease;
    background-color: #f8fafc;
    color: #1e293b;
    margin: 0 !important;
    display: block;
}

.login-card input:focus {
    background-color: #ffffff;
    border-color: var(--primary, #1e40af) !important;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.12) !important;
}

.login-card input::placeholder {
    color: #94a3b8;
    transition: opacity 0.2s ease;
}

.login-card input:focus::placeholder {
    opacity: 0;
}

.login-card .login-submit-btn {
    width: 100%;
    justify-content: center;
    padding: 12px;
    border-radius: 10px;
    font-weight: 600;
    margin-top: 0 !important;
}

.login-card .login-error-msg {
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 12px;
    font-weight: 600;
    display: none;
}

/* Layout */
.admin-container {
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100vh;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.admin-container.visible {
    opacity: 1;
}

.admin-top-banner {
    display: flex;
    justify-content: space-between;
align-items: center;
            padding: 4px 24px;
            background-color: #ffffff;
            border-bottom: 1px solid var(--border);
            flex-shrink: 0;
            z-index: 999;
            height: 48px;
            box-sizing: border-box;
        }

        /* --- Dock Central --- */
        .dock-container {
            display: flex;
            align-items: center;
            padding: 0;
            gap: 6px;
        }

        .dock-separator {
            width: 1px;
            height: 20px;
            background-color: var(--border);
            margin: 0 4px;
        }

        .dock-btn {
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            background: transparent;
            border: 1px solid transparent;
            border-radius: 6px;
            padding: 6px 10px;
            cursor: pointer;
            transition: all 0.2s ease;
            color: #64748b;
            font-family: inherit;
        }

        .dock-btn.active {
            background: var(--secondary);
            border-color: var(--border);
            color: #334155;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
        }

        .dock-btn:hover {
            background: var(--secondary);
            border-color: var(--border);
        }

        .dock-icon {
            width: 20px;
            height: 20px;
            flex-shrink: 0;
            transition: color 0.2s ease;
        }

        /* Tooltip pour le texte */
        .dock-text {
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%) translateY(-2px);
            margin-top: 8px;
            background: #1e293b;
            color: white;
            padding: 6px 10px;
            border-radius: 6px;
            font-size: 0.75rem;
            font-weight: 500;
            opacity: 0;
            pointer-events: none;
            white-space: nowrap;
            transition: all 0.2s ease;
            z-index: 100;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }

        /* Petite flèche du tooltip */
        .dock-text::before {
            content: '';
            position: absolute;
            bottom: 100%;
            left: 50%;
            transform: translateX(-50%);
            border-width: 5px;
            border-style: solid;
            border-color: transparent transparent #1e293b transparent;
        }

        .dock-btn:hover .dock-text {
            opacity: 1;
            transform: translateX(-50%) translateY(0);
        }

        /* Hover Colors */
        .dock-btn.save:hover {
            color: #3b82f6;
        }

        .dock-btn.publish:hover {
            color: #10b981;
        }

        .dock-btn.web.active,
        .dock-btn.web:hover {
            color: #3b82f6;
        }

        .dock-btn.print.active,
        .dock-btn.print:hover {
            color: #3b82f6;
        }

        .dock-btn.qrcode.active,
        .dock-btn.qrcode:hover {
            color: #3b82f6;
        }

        .dock-btn.stats.active,
        .dock-btn.stats:hover {
            color: #3b82f6;
        }

        .dock-btn.print-menu.active,
        .dock-btn.print-menu:hover,
        .dock-btn.print-allergens.active,
        .dock-btn.print-allergens:hover,
        .dock-btn.export-png.active,
        .dock-btn.export-png:hover,
        .dock-btn.export-svg.active,
        .dock-btn.export-svg:hover {
            color: #f59e0b;
        }

        .dock-btn.execute-print:hover {
            color: #10b981;
        }

        #btn-refresh-preview-web .dock-btn {
            background: transparent;
            border: 1px solid transparent;
            box-shadow: none;
            transition: all 0.2s ease;
        }

        #btn-refresh-preview-web .dock-btn:hover {
            background: transparent;
            border-color: #64748b !important;
            color: #334155;
            box-shadow: none;
            transform: translateY(-1px);
        }

        #device-selector:focus,
        #device-selector:active {
            outline: none !important;
            box-shadow: none !important;
        }

        .admin-top-banner h1 {
            font-size: 1.05rem;
            font-weight: 500;
            color: #64748b;
            margin: 0;
            white-space: nowrap;
            letter-spacing: 0.02em;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .admin-top-banner h1 .resto-name {
            font-weight: 700;
            opacity: 0.9;
        }

        .admin-body {
            display: flex;
            flex: 1;
            overflow: hidden;
        }

        /* Editor Panel (Left) */
        .editor-panel {
            width: var(--sidebar-width);
            height: 100%;
            background-color: var(--surface);
            border-right: 1px solid var(--border);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .action-buttons {
            display: flex;
            gap: 10px;
        }

        .btn {
            padding: 8px 16px;
            border-radius: 8px;
            font-size: 0.85rem;
            font-weight: 600;
            cursor: pointer;
            border: none;
            transition: all 0.2s ease;
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .btn-primary {
            background-color: var(--primary);
            color: white;
        }

        .btn-primary:hover {
            background-color: var(--primary-hover);
        }

        .btn-secondary {
            background-color: #f3f4f6;
            color: var(--text-dark);
            border: 1px solid var(--border);
        }

        .btn-secondary:hover {
            background-color: #e5e7eb;
        }

        .btn-success {
            background-color: var(--success);
            color: white;
        }

        .btn-success:hover {
            background-color: #059669;
        }

        .btn-danger {
            background-color: var(--danger);
            color: white;
            padding: 6px 12px;
            font-size: 0.75rem;
        }

        .btn-danger:hover {
            background-color: #dc2626;
        }

        .btn-sm {
            padding: 6px 12px;
            font-size: 0.8rem;
            border-radius: 6px;
        }

        /* Navigation Onglets (Tabs) */
        .admin-tabs {
            display: flex;
            background-color: #f3f4f6;
            border-bottom: 1px solid var(--border);
        }

        .tab-btn {
            flex: 1;
            padding: 12px;
            background: none;
            border: none;
            border-bottom: 3px solid transparent;
            font-weight: 600;
            font-size: 0.9rem;
            color: var(--text-muted);
            cursor: pointer;
            transition: all 0.2s;
        }

        .tab-btn.active {
            color: var(--primary);
            border-bottom-color: var(--primary);
            background-color: var(--surface);
        }

        /* Contenus des Onglets */
        .editor-content {
            flex: 1;
            overflow-y: auto;
            padding: 24px;
            display: none;
        }

        .editor-content.active {
            display: block;
        }

        /* Accordéons */
        .section-card {
            background-color: var(--surface);
            border: 1px solid var(--border);
            border-radius: 12px;
            margin-bottom: 20px;
            overflow: hidden;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
            transition: box-shadow 0.2s ease;
        }

        .section-header-btn {
            width: 100%;
            padding: 18px 24px;
            background-color: #ffffff;
            border: none;
            text-align: left;
            display: flex;
            justify-content: space-between;
            align-items: center;
            cursor: pointer;
            font-weight: 700;
            font-size: 1rem;
            color: var(--text-dark);
            transition: all 0.2s ease;
            border-bottom: 1px solid transparent;
        }

        .section-header-btn:hover {
            background-color: #f8fafc;
        }

        .section-header-btn.active {
            background-color: #f1f5f9;
            border-bottom: 1px solid var(--border);
        }

        .section-body {
            padding: 24px;
            background-color: #f8fafc;
            /* Back-drop légèrement grisé pour faire ressortir les cartes blanches */
            display: none;
        }

        .section-body.active {
            display: block;
        }

        .template-option-card {
            border: 2px solid var(--border);
            background-color: #ffffff;
            border-radius: 8px;
            padding: 16px;
            cursor: pointer;
            transition: all 0.2s ease-in-out;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            flex: 1;
            position: relative;
            height: 150px;
            box-sizing: border-box;
            overflow: hidden;
        }

        .template-option-card:hover {
            border-color: #93c5fd;
            background-color: #f8fafc;
            transform: translateY(-2px);
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
        }

        .template-option-card.selected {
            border-color: var(--primary);
            background-color: #eff6ff;
            box-shadow: 0 4px 12px -2px rgba(30, 64, 175, 0.15);
        }

        /* Hover animation for integrated badges option card */
        .mini-badges {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
            width: 100%;
            transition: all 0.25s ease-in-out;
            margin-top: 8px;
            margin-bottom: 8px;
        }

        .template-option-card.integrated .mini-badges,
        .template-option-card.accordion-mode .mini-badges {
            max-height: 0;
            opacity: 0;
            overflow: hidden;
            margin-top: 0;
            margin-bottom: 0;
        }

        .template-option-card.integrated:hover .mini-badges,
        .template-option-card.accordion-mode:hover .mini-badges {
            max-height: 40px;
            opacity: 1;
            margin-top: 8px;
            margin-bottom: 8px;
        }

        .mini-desc {
            font-size: 0.7rem;
            color: var(--text-muted);
            line-height: 1.3;
            border-top: 1px dashed var(--border);
            padding-top: 8px;
            transition: all 0.25s ease-in-out;
            margin-top: auto;
            width: 100%;
        }

        .template-option-card.integrated .mini-desc {
            margin-top: 28px;
        }

        .mini-badges-accordion {
            max-height: 0;
            opacity: 0;
            overflow: hidden;
            transition: all 0.25s ease-in-out;
            margin-top: 0;
            margin-bottom: 0;
            display: flex;
            gap: 4px;
            flex-wrap: wrap;
            width: 100%;
        }

        .template-option-card.accordion-mode:hover .mini-badges-accordion {
            max-height: 50px;
            opacity: 1;
            margin-top: 2px;
            margin-bottom: 2px;
        }

        .mini-photo-accordion {
            max-height: 0;
            opacity: 0;
            overflow: hidden;
            transition: all 0.25s ease-in-out;
            margin-top: 0;
            width: 100%;
        }

        .template-option-card.accordion-mode:hover .mini-photo-accordion {
            max-height: 30px;
            opacity: 1;
            margin-top: 2px;
        }

        .template-option-card.integrated:hover .mini-desc {
            margin-top: 4px;
        }

        /* Fullpage mode bottom sheet */
        .mini-bottom-sheet {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 0;
            opacity: 0;
            background: #ffffff;
            border-top: 2px solid var(--primary);
            border-top-left-radius: 8px;
            border-top-right-radius: 8px;
            box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
            transition: all 0.25s ease-in-out;
            z-index: 5;
            padding: 10px;
            box-sizing: border-box;
            display: flex;
            flex-direction: column;
            gap: 4px;
            text-align: left;
        }

        .template-option-card.fullpage-mode {
            overflow: hidden;
        }

        /*.template-option-card.fullpage-mode .mini-desc {
            margin-top: 28px;
        }*/

        .template-option-card.fullpage-mode:hover .mini-bottom-sheet {
            height: 85%;
            opacity: 1;
        }

        /* Mini Navigation Horizontale */
        .template-option-card.nav-horizontal-mode {
            overflow: hidden;
        }

        .mini-nav-horizontal-container {
            position: relative;
            width: 100%;
            margin-top: 10px;
            overflow: hidden;
            -webkit-mask-image: linear-gradient(to right, black 80%, transparent 100%);
            mask-image: linear-gradient(to right, black 80%, transparent 100%);
        }

        .mini-nav-horizontal-wrapper {
            display: flex;
            gap: 6px;
            transition: transform 0.4s ease;
        }

        .template-option-card.nav-horizontal-mode:hover .mini-nav-horizontal-wrapper {
            transform: translateX(-35px);
        }

        .template-option-card.fullpage-mode:hover .mini-nav-fullpage-wrapper {
            transform: translateY(-20px);
        }

        .mini-nav-btn {
            background: #f1f5f9;
            color: #64748b;
            font-size: 0.55rem;
            padding: 4px 8px;
            border-radius: 12px;
            white-space: nowrap;
            font-weight: 600;
            border: 1px solid #e2e8f0;
            transition: all 0.3s ease;
        }

        .template-option-card.nav-horizontal-mode:hover .mini-nav-btn,
        .template-option-card.fullpage-mode:hover .mini-nav-btn {
            border-color: var(--primary);
            color: var(--primary);
            background: #eff6ff;
        }

        /* Mini Navigation Pop-up */
        .template-option-card.nav-popup-mode .mini-nav-popup-container {
            height: 0;
            opacity: 0;
            transition: all 0.3s ease;
            margin-top: 0;
            border: none;
            overflow: hidden;
        }

        .template-option-card.nav-popup-mode:hover .mini-nav-popup-container {
            height: 35px;
            opacity: 1;
            margin-top: 10px;
        }

        /* Header Visibility Mode */
        .template-option-card.header-mode-card .mini-schematic {
            max-height: 0;
            opacity: 0;
            overflow: hidden;
            transition: all 0.25s ease-in-out;
            margin-top: 0;
            margin-bottom: 0;
            width: 100%;
        }

        .template-option-card.header-mode-card:hover .mini-schematic {
            max-height: 140px;
            opacity: 1;
            margin-top: 8px;
            margin-bottom: 8px;
        }

        .template-option-card.header-mode-card .mini-desc {
            transition: all 0.25s ease-in-out;
            max-height: 80px;
            opacity: 1;
            overflow: hidden;
        }

        .template-option-card.header-mode-card:hover .mini-desc {
            max-height: 0;
            opacity: 0;
            padding-top: 0;
            margin-top: 0;
            border-top-color: transparent;
        }

        /* Banner / Category Photo Mode */
        .template-option-card.banner-mode-card .mini-schematic {
            max-height: 0;
            opacity: 0;
            overflow: hidden;
            transition: all 0.25s ease-in-out;
            margin-top: 0;
            margin-bottom: 0;
            width: 100%;
        }

        .template-option-card.banner-mode-card:hover .mini-schematic {
            max-height: 140px;
            opacity: 1;
            margin-top: 8px;
            margin-bottom: 8px;
        }

        .template-option-card.banner-mode-card .mini-desc {
            transition: all 0.25s ease-in-out;
            max-height: 80px;
            opacity: 1;
            overflow: hidden;
        }

        .template-option-card.banner-mode-card:hover .mini-desc {
            max-height: 0;
            opacity: 0;
            padding-top: 0;
            margin-top: 0;
            border-top-color: transparent;
        }

        .mini-popup-sticky-bar {
            width: 100%;
            height: 100%;
            background: #f8fafc;
            border: 1px solid #e2e8f0;
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 10px;
            box-sizing: border-box;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        }

        .mini-popup-sticky-bar .mini-burger-icon {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .mini-popup-sticky-bar .mini-burger-icon span {
            width: 12px;
            height: 2px;
            background: var(--primary);
            border-radius: 2px;
        }

        .mini-popup-sticky-bar .mini-logo-text {
            font-size: 0.6rem;
            font-weight: 800;
            color: var(--text-dark);
            text-transform: uppercase;
        }

        /* Styles de la Galerie de Thèmes déplacés vers css/admin-theme-store.css */

        /* Inputs */
        .form-group {
            margin-bottom: 16px;
        }

        .form-row {
            display: flex;
            gap: 16px;
            margin-bottom: 16px;
        }

        .form-row .form-group {
            flex: 1;
            margin-bottom: 0;
        }

        label {
            display: block;
            font-size: 0.8rem;
            font-weight: 600;
            color: var(--text-muted);
            margin-bottom: 6px;
        }

        .admin-container input[type="text"],
        .admin-container input[type="number"],
        .admin-container input[type="password"],
        .admin-container textarea,
        .admin-container select {
            width: 100%;
            padding: 10px 14px;
            border-radius: 8px;
            border: 1px solid var(--border);
            font-family: inherit;
            font-size: 0.9rem;
            outline: none;
            transition: border-color 0.2s;
        }

        .admin-container input[type="text"]:hover,
        .admin-container input[type="number"]:hover,
        .admin-container input[type="password"]:hover,
        .admin-container textarea:hover,
        .admin-container select:hover {
            border-color: #94a3b8;
        }

        .admin-container input[type="text"]:focus,
        .admin-container input[type="number"]:focus,
        .admin-container input[type="password"]:focus,
        .admin-container textarea:focus,
        .admin-container select:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
        }

        textarea {
            height: 80px;
            resize: vertical;
        }

        .footer-textarea {
            width: 100%;
            margin-bottom: 0;
            font-size: 0.85rem;
            padding: 8px 10px;
            height: 50px;
            border: 1px solid var(--border);
            border-radius: 6px;
            resize: none;
            font-family: inherit;
            outline: none;
            transition: border-color 0.2s;
        }

        .footer-textarea:hover {
            border-color: #94a3b8;
        }

        .footer-textarea:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
        }

        .options-title-input {
            width: 125px !important;
            padding: 4px 8px !important;
            font-size: 0.75rem !important;
            border-radius: 4px !important;
            height: 24px !important;
            margin-bottom: 0 !important;
        }

        /* File uploader button integration */
        .upload-wrapper {
            display: flex;
            gap: 10px;
            align-items: center;
        }

        .upload-input-file {
            display: none;
        }

        .upload-trigger-btn {
            padding: 10px 14px;
            border-radius: 8px;
            background-color: #e5e7eb;
            color: var(--text-dark);
            font-size: 0.85rem;
            font-weight: 600;
            cursor: pointer;
            border: 1px solid var(--border);
            white-space: nowrap;
        }

        .upload-trigger-btn:hover {
            background-color: #d1d5db;
        }

        /* Checkbox lists */
        .checkbox-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 12px;
            padding: 12px;
            border: 1px solid var(--border);
            border-radius: 8px;
            background-color: #f9fafb;
        }

        .checkbox-grid.compact {
            grid-template-columns: repeat(3, 1fr);
            gap: 6px;
            padding: 8px;
        }

        .checkbox-grid.compact .checkbox-item {
            padding: 2px 4px;
            font-size: 0.75rem;
            gap: 4px;
        }

        .checkbox-item {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 0.8rem;
            cursor: pointer;
            padding: 4px 6px;
            border-radius: 4px;
            transition: background-color 0.2s;
        }

        .checkbox-item:hover {
            background-color: #f1f5f9;
        }

        /* Products cards */
        .product-card {
            border: 1px solid var(--border);
            border-left: 4px solid var(--primary);
            /* Ligne d'accentuation bleue */
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 20px;
            background-color: #ffffff;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
            transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
            position: relative;
        }

        .product-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
            border-color: #cbd5e1;
        }

        .product-card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
            border-bottom: 1px solid #f1f5f9;
            padding-bottom: 10px;
        }

        .product-card-title {
            font-weight: 700;
            font-size: 1rem;
            color: var(--primary);
        }

        /* Combo (Formules) cards */
        .combo-card {
            border: 1px solid var(--border);
            border-left: 4px solid #10b981;
            /* Ligne d'accentuation verte */
            border-radius: 8px;
            padding: 14px 18px;
            margin-bottom: 12px;
            background-color: #ffffff;
            display: flex;
            gap: 12px;
            align-items: center;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }

        .combo-card:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
        }

        .product-actions {
            display: flex;
            gap: 6px;
        }

        .order-btn {
            background: white;
            border: 1px solid var(--border);
            width: 28px;
            height: 28px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 0.75rem;
            color: var(--text-muted);
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }

        .order-btn:hover {
            background-color: #f3f4f6;
        }

        .visibility-btn {
            background: white;
            border: 1px solid var(--border);
            width: 28px;
            height: 28px;
            border-radius: 6px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            color: #64748b;
            transition: all 0.2s ease;
        }

        .visibility-btn:hover {
            background-color: #f1f5f9;
            color: #334155;
            border-color: #cbd5e1;
        }

        .visibility-btn.rupture {
            background-color: #fef3c7;
            border-color: #fcd34d;
            color: #d97706;
        }

        .visibility-btn.rupture:hover {
            background-color: #fde047;
        }


        /* Preview Panel (Right) */
        .preview-panel {
            flex: 1;
            height: 100%;
            background-color: var(--border);
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            align-items: center;
            padding: 20px;
            overflow-y: auto;
            gap: 20px;
            position: relative;
        }

        .preview-header {
            width: 100%;
            display: flex;
            justify-content: space-between;
            align-items: center;
            z-index: 10;
            flex-shrink: 0;
        }

        .preview-title {
            font-size: 0.8rem;
            font-weight: 700;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 1px;
            background: rgba(255, 255, 255, 0.85);
            padding: 6px 14px;
            border-radius: 20px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        }

        .phone-mockup {
            width: 393px;
            /* Default size (iPhone 15 Pro) */
            height: 800px;
            border: 12px solid #0f172a;
            border-radius: 44px;
            background-color: white;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
            position: relative;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            margin: auto;
            flex-shrink: 0;
        }

        .phone-status-bar {
            height: 38px;
            background-color: #ffffff;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 24px;
            font-size: 0.7rem;
            font-weight: 600;
            color: #000000;
            position: relative;
            z-index: 1002;
            user-select: none;
            border-bottom: 1px solid #f1f5f9;
        }

        .phone-status-bar.android {
            font-family: sans-serif;
            font-weight: 500;
            font-size: 0.72rem;
            padding: 0 16px;
            height: 34px;
        }

        .phone-status-icons {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .phone-notch {
            background-color: #0f172a;
            position: absolute;
            left: 50%;
            transform: translateX(-50%);
            z-index: 1003;
            pointer-events: none;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .phone-notch.island {
            width: 110px;
            height: 28px;
            border-radius: 14px;
            top: 5px;
        }

        .phone-notch.punch-hole {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            top: 11px;
        }

        .phone-notch.none {
            display: none;
        }

        .preview-iframe {
            width: 100%;
            height: 100%;
            border: none;
            flex: 1;
        }

        /* Backups history styles */
        .backup-item {
            background-color: var(--surface);
            border: 1px solid var(--border);
            border-radius: 10px;
            padding: 16px 20px;
            margin-bottom: 12px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 16px;
        }

        .backup-info {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .backup-date {
            font-weight: 600;
            font-size: 0.95rem;
            color: var(--text-dark);
        }

        .backup-filename {
            font-family: monospace;
            font-size: 0.75rem;
            color: var(--text-muted);
        }

        /* Combo Card */
        .combo-card {
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 10px;
            margin-bottom: 10px;
            background-color: #f9fafb;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        /* Toast notifications */
        .toast {
            position: fixed;
            bottom: 24px;
            left: 24px;
            background-color: #0f172a;
            color: white;
            padding: 14px 28px;
            border-radius: 8px;
            font-size: 0.9rem;
            font-weight: 500;
            box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
            display: flex;
            align-items: center;
            gap: 10px;
            transform: translateY(100px);
            opacity: 0;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            z-index: 999999;
        }

        .toast.show {
            transform: translateY(0);
            opacity: 1;
        }

        .toast.success {
            border-left: 4px solid var(--success);
        }

        .toast.error {
            border-left: 4px solid var(--danger);
        }

        /* Styles réactifs pour l'édition et la suppression de photos */
        .prod-photo-thumb {
            position: relative;
            transition: all 0.2s ease;
        }

        .prod-photo-thumb:hover {
            border-color: var(--primary) !important;
            background: #f4f4f5 !important;
        }

        .delete-photo-btn {
            position: absolute;
            top: 8px;
            right: 8px;
            background: #e2e8f0;
            color: #64748b;
            border: none;
            border-radius: 50%;
            width: 28px;
            height: 28px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s ease;
            z-index: 10;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        }

        .delete-photo-btn:hover {
            background: #fee2e2 !important;
            color: #ef4444 !important;
            transform: scale(1.1);
            box-shadow: 0 2px 6px rgba(239, 68, 68, 0.2);
        }

/* === Style Block 2 === */
#admin-burger-btn:hover {
                            color: var(--primary) !important;
                        }

                        .custom-dropdown-menu {
                            display: none;
                            position: absolute;
                            top: 48px;
                            background: white;
                            border: 1px solid var(--border);
                            border-top: none;
                            /* Effet tiroir ancré au header */
                            border-radius: 0 0 8px 8px;
                            /* Coins ronds uniquement en bas */
                            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
                            min-width: 200px;
                            z-index: 100;
                            overflow: hidden;
                        }

                        .admin-dropdown-item {
                            width: 100%;
                            text-align: left;
                            padding: 12px 16px;
                            background: none;
                            border: none;
                            border-bottom: 1px solid #f1f5f9;
                            cursor: pointer;
                            font-size: 0.85rem;
                            font-family: inherit;
                            font-weight: 500;
                            color: var(--text-dark);
                            transition: all 0.2s ease;
                            white-space: nowrap;
                            display: flex;
                            align-items: center;
                            justify-content: space-between;
                        }

                        .admin-dropdown-item:last-child {
                            border-bottom: none;
                        }

                        .admin-dropdown-item:hover {
                            background-color: #f8fafc;
                            color: var(--primary);
                            padding-left: 20px;
                        }

                        .admin-dropdown-item.active {
                            color: var(--primary);
                            font-weight: 600;
                            background-color: #f1f5f9;
                        }

                        .category-row-hover {
                            transition: background-color 0.2s ease;
                        }

                        .category-row-hover:hover {
                            background-color: #f8fafc !important;
                        }

                        .add-menu-item:hover {
                            background-color: #f8fafc;
                        }

/* === Style Block 3 === */
.print-zone-content {
            background: white;
            color: black;
            font-family: 'Inter', sans-serif;
        }

        .print-zone-content .print-header {
            text-align: center;
            margin-bottom: 15px;
        }

        .print-zone-content .print-logo {
            max-width: 150px;
            max-height: 100px;
            margin-bottom: 15px;
        }

        .print-zone-content .print-contact {
            font-size: 12pt;
            color: #333;
        }

        .print-zone-content .print-category {
            page-break-inside: avoid;
            margin-bottom: 10px;
        }

        .print-zone-content .print-category h1 {
            font-family: 'Dancing Script', cursive;
            font-size: 22pt;
            text-transform: none;
            border-bottom: 2px solid #000;
            padding-bottom: 5px;
            margin-bottom: 15px;
            text-align: center;
        }

        .print-zone-content .print-subcategory {
            font-size: 14pt;
            font-weight: bold;
            margin-top: 15px;
            margin-bottom: 10px;
            color: #444;
            text-decoration: underline;
        }

        .print-zone-content .print-item {
            display: flex;
            justify-content: space-between;
            align-items: baseline;
            margin-bottom: 5px;
        }

        .print-zone-content .print-item-left {
            flex-grow: 1;
            display: flex;
            align-items: baseline;
        }

        .print-zone-content .print-item-name {
            font-weight: 600;
            font-size: 11pt;
        }

        .print-zone-content .print-item-name sup {
            line-height: 0;
        }

        .print-zone-content .print-item-badges {
            font-size: 9pt;
            color: #555;
            font-style: italic;
            margin-left: 8px;
        }

        .print-zone-content .print-item-price {
            font-weight: bold;
            font-size: 11pt;
            white-space: nowrap;
        }

        .print-zone-content .print-item-desc {
            font-size: 9pt;
            color: #666;
            margin-bottom: 8px;
            padding-left: 10px;
            font-style: italic;
        }

        .print-zone-content .print-item-container {
            page-break-inside: avoid;
            margin-bottom: 10px;
        }

        .print-zone-content .print-allergens-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 9pt;
            margin-top: 20px;
            page-break-inside: auto;
        }

        .print-zone-content .print-allergens-table tr {
            page-break-inside: avoid;
            page-break-after: auto;
        }

        .print-zone-content .print-allergens-table th,
        .print-zone-content .print-allergens-table td {
            border: 1px solid #ccc;
            padding: 4px;
        }

        .print-zone-content .print-allergens-table th {
            background-color: #f1f5f9;
            text-align: center;
            vertical-align: bottom;
            height: 100px;
            padding-bottom: 5px;
            font-weight: 600;
        }

        .print-zone-content .vertical-text {
            writing-mode: vertical-rl;
            transform: rotate(180deg);
            white-space: nowrap;
            margin: 0 auto;
        }

        .print-zone-content .category-row td {
            background-color: #e2e8f0;
            font-weight: bold;
            text-transform: uppercase;
            font-size: 10pt;
            padding-top: 8px;
            padding-bottom: 8px;
        }

        .print-zone-content .subcategory-row td {
            background-color: #f8fafc;
            font-weight: 600;
            font-size: 9.5pt;
            font-style: italic;
            padding-top: 6px;
            padding-bottom: 6px;
            padding-left: 15px;
        }

        #print-zone {
            display: none;
        }

        @media print {
            * {
                -webkit-print-color-adjust: exact !important;
                print-color-adjust: exact !important;
            }

            body {
                background-color: white !important;
            }

            body * {
                visibility: hidden;
            }

            #print-zone,
            #print-zone * {
                visibility: visible;
            }

            #print-zone {
            display: block;
            position: absolute;
            left: 0;
            top: 0;
            width: 100%;
            padding: 0;
        }
    }

/* === Styles pour la sélection multiple et les Groupes de Produits === */
.product-group-floating-bar {
    position: fixed;
    bottom: 24px;
    left: calc(var(--sidebar-width) / 2);
    transform: translateX(-50%);
    background: #0f172a;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 50px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 9999;
    animation: slideUpFloatingBar 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    font-size: 0.85rem;
}

@keyframes slideUpFloatingBar {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.product-group-floating-bar .bar-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.product-group-floating-bar .bar-count-badge {
    background: #6366f1;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

.product-group-floating-bar .bar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-group-floating-bar button {
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 6px 14px;
    border-radius: 20px;
    transition: all 0.2s;
    border: none;
}

.product-group-floating-bar .btn-group-create {
    background: #6366f1;
    color: #ffffff;
}

.product-group-floating-bar .btn-group-create:hover {
    background: #4f46e5;
}

.product-group-floating-bar .btn-group-cancel {
    background: rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
}

.product-group-floating-bar .btn-group-cancel:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.group-header-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid #c7d2fe;
    border-left: 4px solid #6366f1;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.group-header-row:hover {
    background: #f1f5f9;
}

.product-select-checkbox {
    width: 17px;
    height: 17px;
    cursor: pointer;
    accent-color: #6366f1;
    margin: 0;
}

.select-move-product,
.select-move-group,
.select-move-subcat {
    width: 145px;
    min-width: 145px;
    max-width: 145px;
    height: 28px;
    padding: 4px 8px;
    font-size: 0.75rem;
    margin-bottom: 0;
    background: white;
    border-radius: 6px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    cursor: pointer;
    box-sizing: border-box;
}

.select-move-product,
.select-move-subcat {
    border: 1px solid var(--border);
    color: var(--text-dark);
}

.select-move-group {
    border: 1px solid #c7d2fe;
    color: #4338ca;
    font-weight: 600;
}

/* ==========================================================================
   MODALES ADMINISTRATION & GESTION DES ACCÈS (PALIER 2)
   ========================================================================== */
.admin-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1000005;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: adminFadeIn 0.2s ease-out forwards;
}

.admin-modal-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px;
    position: relative;
    color: #1e293b;
    font-family: 'Inter', -apple-system, sans-serif;
    animation: adminSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes adminFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes adminSlideUp {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.admin-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 14px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 20px;
}

.admin-modal-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-modal-close {
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.admin-modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.admin-modal-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.admin-modal-section-title {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #475569;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.admin-modal-field {
    margin-bottom: 12px;
}

.admin-modal-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 5px;
}

.admin-modal-input {
    width: 100%;
    padding: 9px 12px;
    font-size: 0.9rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.admin-modal-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.admin-modal-help {
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.4;
    margin-top: 6px;
}

.admin-modal-btn {
    width: 100%;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.admin-modal-btn-primary {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.admin-modal-btn-primary:hover {
    background: #1d4ed8;
}

.admin-modal-btn-primary:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.admin-modal-btn-secondary {
    background: #e2e8f0;
    color: #334155;
}

.admin-modal-btn-secondary:hover {
    background: #cbd5e1;
}

.admin-alert-banner {
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 0.84rem;
    line-height: 1.4;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.admin-alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.admin-alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.admin-alert-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.admin-alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* --- Mode Assistance SuperAdmin (Bouton retour latéral & Badge Header) --- */
.sa-lateral-impersonate-banner {
    display: flex;
    align-items: center;
    padding: 6px 16px;
    background: #fff1f2;
    border-bottom: 1px solid #fecdd3;
    flex-shrink: 0;
    box-sizing: border-box;
    z-index: 10;
}

.sa-lateral-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #881337;
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 700;
    flex-shrink: 0;
    transition: all 0.15s ease;
    box-shadow: 0 1px 3px rgba(136, 19, 55, 0.2);
}

.sa-lateral-back-btn:hover {
    background: #9f1239;
    box-shadow: 0 2px 6px rgba(136, 19, 55, 0.35);
    transform: translateY(-1px);
    color: #ffffff;
}

.sa-header-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fff1f2;
    border: 1px solid #fda4af;
    color: #9f1239;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 20px;
    margin-left: 8px;
    font-family: inherit;
    vertical-align: middle;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: -0.01em;
    box-shadow: 0 1px 2px rgba(136, 19, 55, 0.06);
}




