/* ========================================
   RESET & BASE
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f4f8;
    display: flex;
    min-height: 100vh;
}

/* ========================================
   SIDEBAR - BLUE SKY
   ======================================== */
.sidebar {
    width: 260px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: linear-gradient(180deg, #87CEEB 0%, #4A90D9 40%, #1E3A5F 100%);
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 15px;
}

.sidebar-header h2 {
    color: white;
    font-size: 22px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.sidebar-header .user-info-sidebar {
    margin-top: 10px;
}

.sidebar-header .user-info-sidebar p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    font-weight: 600;
}

.sidebar-header .badge {
    display: inline-block;
    background: rgba(255, 215, 0, 0.25);
    color: #FFD700;
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    margin-top: 4px;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 15%, rgba(255, 255, 255, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 25%, rgba(255, 255, 255, 0.15) 0%, transparent 40%);
    pointer-events: none;
}

.sidebar-nav {
    flex: 1;
    padding: 0 12px;
    position: relative;
    z-index: 1;
    overflow-y: auto;
    min-height: 0;
}
.sidebar-nav::-webkit-scrollbar { width: 8px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.25); border-radius: 4px; }

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 3px;
}

.sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transform: translateX(5px);
}

.sidebar-nav a.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.sidebar-nav a .nav-icon {
    font-size: 18px;
    width: 28px;
    text-align: center;
}

.sidebar-footer {
    padding: 15px 20px;
    border-top: 2px solid rgba(255, 255, 255, 0.15);
    position: relative;
    z-index: 1;
}

.sidebar-footer .btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    background: rgba(255, 69, 69, 0.15);
    color: white;
    border: 2px solid rgba(255, 69, 69, 0.25);
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.sidebar-footer .btn-logout:hover {
    background: rgba(255, 69, 69, 0.35);
    border-color: #ff6b6b;
    transform: scale(1.02);
}

.sidebar-footer .btn-back {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    padding: 10px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 13px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.sidebar-footer .btn-back:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.sidebar-overlay.active {
    display: block;
}

.main-content {
    margin-left: 260px;
    flex: 1;
    padding: 20px 30px;
    min-height: 100vh;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0 15px;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 10px;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.top-bar-left h1 {
    font-size: 22px;
    color: #1E3A5F;
    font-weight: 700;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #1E3A5F;
    padding: 5px 10px;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.top-bar-right .user-info {
    color: #636e72;
    font-size: 14px;
    font-weight: 500;
}

.btn-refresh {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #636e72;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.btn-refresh:hover {
    background: #e9ecef;
    transform: rotate(90deg);
}

.page-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.page-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px 18px;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.stat-icon {
    font-size: 32px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f4f8;
    border-radius: 12px;
}

.stat-info h3 {
    font-size: 12px;
    color: #636e72;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #1E3A5F;
}

.stat-change {
    font-size: 12px;
    font-weight: 600;
}

.stat-change.positive {
    color: #00b894;
}

.stat-change.negative {
    color: #ff6b6b;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.dashboard-card {
    background: white;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.dashboard-card.full-width {
    grid-column: 1 / -1;
}

/* ========================================
   RAPPORTS
   ======================================== */
.rapport-bars {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    min-height: 180px;
    padding: 10px 0;
    overflow-x: auto;
}
.rapport-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    min-width: 36px;
}
.rapport-bar-item .bar {
    width: 30px;
    border-radius: 6px 6px 0 0;
    background: linear-gradient(180deg, #4A90D9, #1E3A5F);
    min-height: 2px;
}
.rapport-bar-item .bar-label {
    font-size: 10px;
    color: #636e72;
    margin-top: 4px;
    transform: rotate(-40deg);
    white-space: nowrap;
}
.rapport-table-container {
    max-height: 260px;
    overflow-y: auto;
}
.rapport-table {
    width: 100%;
    border-collapse: collapse;
}
.rapport-table th,
.rapport-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #f0f4f8;
    font-size: 13px;
}
.rapport-table th {
    font-size: 11px;
    text-transform: uppercase;
    color: #636e72;
    border-bottom: 2px solid #e9ecef;
}
.rapport-empty {
    padding: 20px;
    text-align: center;
    color: #b2bec3;
}
.detail-anomalie {
    background: #fff5f5;
}
@media print {
    .sidebar, .top-bar, .sidebar-overlay { display: none !important; }
    .main-content { margin-left: 0 !important; }
    #rapportContent { display: block !important; }
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.card-header h3 {
    font-size: 16px;
    color: #1E3A5F;
}

.card-badge {
    background: #e9ecef;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    color: #636e72;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.page-header h2 {
    color: #1E3A5F;
    font-size: 20px;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.search-input {
    padding: 8px 14px;
    border: 2px solid #dfe6e9;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    min-width: 200px;
}

.search-input:focus {
    border-color: #4A90D9;
}

.btn-add {
    padding: 9px 20px;
    background: linear-gradient(135deg, #4A90D9, #1E3A5F);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-add:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(74, 144, 217, 0.3);
}

.table-container {
    background: white;
    border-radius: 12px;
    overflow-x: auto;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

thead {
    background: #f8f9fa;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

th {
    font-size: 12px;
    text-transform: uppercase;
    color: #636e72;
    font-weight: 600;
    letter-spacing: 0.3px;
}

td {
    font-size: 14px;
    color: #2d3436;
}

.text-center {
    text-align: center;
    padding: 30px !important;
    color: #b2bec3;
}

.form-container {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
    border: 2px solid #e9ecef;
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.form-header h3 {
    color: #1E3A5F;
    font-size: 18px;
}

.form-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #636e72;
    transition: all 0.3s ease;
}

.form-close:hover {
    color: #ff6b6b;
    transform: rotate(90deg);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #2d3436;
    font-size: 13px;
    margin-bottom: 4px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #dfe6e9;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #4A90D9;
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 60px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

.btn-save {
    padding: 10px 28px;
    background: linear-gradient(135deg, #00b894, #00a381);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-save:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0, 184, 148, 0.3);
}

.btn-cancel {
    padding: 10px 28px;
    background: #dfe6e9;
    color: #636e72;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    background: #b2bec3;
}

.btn-edit {
    padding: 4px 12px;
    background: #4A90D9;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 4px;
    font-size: 12px;
    transition: all 0.3s ease;
}

.btn-edit:hover {
    background: #357ABD;
}

.btn-delete {
    padding: 4px 12px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.btn-delete:hover {
    background: #e55a5a;
}

.badge-success {
    background: #e6f9ed;
    color: #00b894;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.badge-danger {
    background: #fde8e8;
    color: #ff6b6b;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.badge-primary {
    background: #e8f0fe;
    color: #4A90D9;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.badge-online {
    background: #eef4ff;
    color: #4A90D9;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.badge-caisse {
    background: #f1f3f5;
    color: #636e72;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.badge-warning {
    background: #fff3cd;
    color: #b8860b;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.badge-secondary {
    background: #e9ecef;
    color: #495057;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.btn-valider {
    padding: 4px 12px;
    background: #00b894;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.btn-valider:hover {
    background: #00a381;
}

/* ========================================
   MODALES
   ======================================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: #fff;
    border-radius: 14px;
    width: 520px;
    max-width: 92%;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: linear-gradient(135deg, #87CEEB 0%, #4A90D9 50%, #1E3A5F 100%);
    padding: 18px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: #fff;
    font-size: 20px;
    margin: 0;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    font-size: 20px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
}

.modal-body {
    padding: 22px;
}

/* ========================================
   DÉTAIL COMMANDE
   ======================================== */
.order-detail-modal {
    width: 560px;
}

.order-detail-info p {
    margin: 4px 0;
    font-size: 14px;
    color: #2d3436;
}

.order-detail-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    font-weight: 700;
    color: #1E3A5F;
    border-top: 2px solid #eef2f5;
    margin-top: 12px;
    padding-top: 12px;
}

.order-detail-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
}

.btn-toggle {
    padding: 4px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-toggle:hover {
    transform: scale(1.05);
}

.caisse-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    margin-bottom: 25px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.settings-card {
    background: white;
    border-radius: 14px;
    padding: 25px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.settings-card h3 {
    color: #1E3A5F;
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f4f8;
}

.rub-preview {
    max-width: 220px;
    max-height: 130px;
    object-fit: cover;
    border-radius: 6px;
    margin-top: 6px;
    border: 1px solid #ddd;
    display: block;
}
.rubrique-item input[type="text"],
.rubrique-item textarea {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid #d5dce6;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    resize: vertical;
}
.rubrique-item input[type="text"]:focus,
.rubrique-item textarea:focus {
    border-color: #4A90D9;
    outline: none;
}
.rubrique-item input.rub-file {
    font-size: 13px;
}

.backup-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.backup-info {
    font-size: 13px;
    color: #636e72;
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay.active {
        display: block;
    }

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        display: block;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .top-bar-left h1 {
        font-size: 18px;
    }

    .main-content {
        padding: 15px;
    }

    .caisse-stats {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .header-actions {
        flex-wrap: wrap;
    }

    .search-input {
        min-width: 100%;
    }
}

/* ========================================
   APERÇU EN DIRECT (page personnalisation)
   ======================================== */
.brand-preview-frame {
    background: #f0f0f0;
    border-radius: 12px;
    padding: 16px;
    margin-top: 12px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.08);
    overflow: auto;
    max-height: 560px;
}
.brand-preview {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.18);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.pv-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    font-size: 14px;
}
.pv-navbrand { display: flex; align-items: center; gap: 8px; font-weight: bold; }
.pv-logo { height: 30px; max-width: 90px; object-fit: contain; border-radius: 4px; }
.pv-navlinks { color: rgba(255,255,255,0.85); font-size: 12px; }
.pv-hero {
    position: relative;
    padding: 40px 22px;
    text-align: center;
    color: #fff;
}
.pv-hero-inner { position: relative; z-index: 2; }
.pv-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    color: #fff;
    font-size: 11px;
    margin-bottom: 10px;
}
.pv-title { font-size: 26px; font-weight: 800; margin-bottom: 8px; }
.pv-sub { font-size: 12px; color: rgba(255,255,255,0.92); margin-bottom: 16px; line-height: 1.5; }
.pv-btn {
    display: inline-block;
    padding: 10px 22px;
    border-radius: 30px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}
.pv-gallery { padding: 24px 16px; }
.pv-section-title { font-size: 16px; font-weight: 700; text-align: center; margin-bottom: 14px; }
.pv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pv-photo {
    height: 90px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
}
.pv-contact {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    padding: 16px;
    font-size: 12px;
    color: #444;
}

/* ========================================
   SITE-BUILDER - blocs de l'aperçu (drag & drop)
   ======================================== */
.pv-block {
    position: relative;
    margin-bottom: 10px;
    border: 1px dashed #c9d4e0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    cursor: grab;
}
.pv-block:active { cursor: grabbing; }
.pv-block-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    background: #eef3f8;
    font-size: 12px;
    font-weight: 600;
    color: #1E3A5F;
    border-bottom: 1px solid #dde6ef;
}
.pv-handle { cursor: grab; color: #7a8ea0; }
.pv-block-name { flex: 1; }
.pv-hide {
    background: transparent;
    border: none;
    font-size: 15px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
}
.pv-hide:hover { background: #dde6ef; }
.pv-block-body { padding: 4px; }
.pv-empty { text-align: center; color: #999; font-size: 13px; padding: 18px; }
.pv-hidden {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px 12px;
    margin-bottom: 8px;
    background: #f6f8fb;
    border-radius: 8px;
    font-size: 13px;
}
.pv-hidden-label { color: #777; }
.pv-chip {
    background: #fff;
    border: 1px dashed #4A90D9;
    color: #4A90D9;
    padding: 4px 10px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 12px;
}
.pv-chip:hover { background: #e6f0fb; }
.pv-tip {
    font-size: 11px;
    color: #888;
    text-align: center;
    padding: 6px 0 0;
}
.pv-photo { cursor: grab; }
.pv-photo:active { cursor: grabbing; }


/* ========================================
   GALERIE DE THÈMES (page personnalisation)
   ======================================== */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 12px;
}
.theme-card {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    font-family: inherit;
}
.theme-card:hover { border-color: #4A90D9; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.08); }
.theme-card.active { border-color: #175cd3; box-shadow: 0 0 0 2px rgba(23,92,211,0.2); }
.theme-swatches { display: flex; justify-content: center; gap: 6px; margin-bottom: 8px; }
.theme-swatches span {
    width: 42px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,0.1);
}
.theme-name { font-size: 13px; font-weight: 600; color: #1E3A5F; display: block; }


/* Sélecteur de langue (top bar) */
.lang-switch { display: inline-flex; gap: 2px; margin-right: 8px; }
.lang-switch a {
    padding: 3px 8px; font-size: 12px; font-weight: 700; text-decoration: none;
    color: #4A90D9; border: 1px solid #4A90D9; border-radius: 4px; line-height: 1.4;
}
.lang-switch a:hover { background: #4A90D9; color: #fff; }

