

:root {
    --bg-admin: #0D0D0D; /* Noir profond */
    --bg-card: #1C1C1E; /* Anthracite sombre */
    --bg-navbar: #121212;
    --border-color: rgba(255, 255, 255, 0.08);
    --text-main: #FFFFFF; /* Blanc */
    --text-muted: #E2E8F0; /* Gris clair */
    --primary-grad: linear-gradient(135deg, #FACC15, #FDE047); /* Dégradé jaune */
    --success-grad: linear-gradient(135deg, #10B981, #059669);
    --error-grad: linear-gradient(135deg, #EF4444, #DC2626);
    --accent-glow: rgba(250, 204, 21, 0.15);
    --bg-input: #121212;
    --font-sans: 'Inter', sans-serif;
    --font-head: 'Outfit', sans-serif;
}

.dark-mode {
    --bg-admin: #0D0D0D;
    --bg-card: #1C1C1E;
    --bg-navbar: #121212;
    --border-color: rgba(255, 255, 255, 0.08);
    --text-main: #FFFFFF;
    --text-muted: #E2E8F0;
    --primary-grad: linear-gradient(135deg, #FDE047, #FACC15);
    --accent-glow: rgba(250, 204, 21, 0.15);
    --bg-input: #121212;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-admin);
    background-image:
        radial-gradient(at 0% 0%, rgba(100, 116, 139, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(100, 116, 139, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s, color 0.3s;
}


.admin-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-navbar);

    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s, border-color 0.3s;
}

.admin-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-main);
}

.admin-logo span {
    color: var(--text-main) !important;
    background: none !important;
    -webkit-text-fill-color: var(--text-main) !important;
}

.admin-nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.admin-nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s;
}

.admin-nav-links a:hover {
    color: var(--text-main);
}

.admin-nav-links a.active {
    color: #374151;
    font-weight: 600;
}

.btn-logout {
    border: 1px solid rgba(239, 68, 68, 0.4);
    background: transparent;
    color: #ef4444;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-logout:hover {
    background: #ef4444;
    color: #fff;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

.btn-back {
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-back:hover {
    background: var(--border-color);
    color: var(--text-main);
}



.login-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);

    width: 100%;
    max-width: 420px;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.login-card h2 {
    font-family: var(--font-head);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #FACC15;
}

.login-card p.subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}


.form-group {
    text-align: left;
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #FACC15;
    box-shadow: 0 0 12px var(--accent-glow);
}


.admin-container {
    max-width: 1100px;
    width: 100%;
    margin: 2.5rem auto;
    padding: 0 1.5rem;
    flex: 1;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    font-family: var(--font-head);
    font-size: 2rem;
    font-weight: 700;
    color: #FACC15;
}

.dashboard-header p {
    color: var(--text-muted);
    font-size: 1rem;
}


.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.alert-success {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.alert-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}


.glass-panel {
    background: rgba(28, 28, 30, 0.6);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.prices-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    text-align: left;
}

.prices-table th {
    font-family: var(--font-head);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.prices-table td {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
}

.prices-table tr {
    transition: background-color 0.2s;
}

.prices-table tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}


.badge-trans {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-manual {
    background: rgba(107, 114, 128, 0.12);
    color: #6b7280;
    border: 1px solid rgba(107, 114, 128, 0.25);
}

.badge-auto {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-none {
    background: rgba(250, 204, 21, 0.12);
    color: #FACC15;
    border: 1px solid rgba(250, 204, 21, 0.25);
}

.price-value-col {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-main);
}


.btn-admin {
    display: inline-block;
    background: #FACC15;
    color: #121212;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.btn-admin:hover {
    background: #FDE047;
    color: #121212;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(250, 204, 21, 0.3);
}

.btn-admin:active {
    transform: translateY(0);
}

.btn-admin-secondary {
    background: transparent;
    border: 1px solid #FACC15;
    color: #FFFFFF;
}

.btn-admin-secondary:hover {
    background: rgba(250, 204, 21, 0.1);
    border-color: #FDE047;
    color: #FDE047;
    transform: translateY(-2px);
}

.actions-row {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: flex-end;
}


.price-input-wrapper {
    display: flex;
    align-items: center;
    position: relative;
    max-width: 140px;
}

.price-input-wrapper input {
    padding-right: 2rem;
    text-align: right;
    font-weight: 600;
}

.price-input-wrapper::after {
    content: "€";
    position: absolute;
    right: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}


.theme-switch-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ios-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.ios-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ios-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #CBD5E1;
    transition: .3s ease;
    border-radius: 24px;
}

.ios-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s ease;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .ios-slider:before {
    transform: translateX(20px);
}

.dark-mode .ios-slider {
    background-color: rgba(255, 255, 255, 0.15);
}

.theme-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.18);
    background: var(--bg-card);
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.3s;
    padding: 0;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.theme-toggle-btn:hover {
    transform: scale(1.05);
    border-color: rgba(0, 0, 0, 0.45);
}
.dark-mode .theme-toggle-btn {
    border-color: rgba(255, 255, 255, 0.25);
}
.dark-mode .theme-toggle-btn:hover {
    border-color: rgba(255, 255, 255, 0.6);
}


.mobile-theme-btn {
    display: none;
}


.admin-mobile-nav {
    display: none;
}


@media (max-width: 768px) {
    .admin-navbar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 0.75rem 1.25rem;
    }

    .admin-logo {
        justify-content: flex-start;
        gap: 0.5rem;
    }

    @media (max-width: 480px) {
        .admin-logo span {
            display: none;
        }
    }

    .admin-nav-links {
        display: none !important;
    }

    .admin-mobile-nav {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .mobile-theme-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        border-radius: 50%;
        border: 1px solid rgba(0, 0, 0, 0.18);
        background: var(--bg-card);
        color: var(--text-main);
        cursor: pointer;
        transition: all 0.3s;
        padding: 0;
        flex-shrink: 0;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }
    .dark-mode .mobile-theme-btn {
        border-color: rgba(255, 255, 255, 0.25);
    }

    .mobile-theme-btn:active {
        transform: scale(0.95);
    }

    .admin-container {
        margin: 1.5rem auto;
        padding: 0 1rem;
    }

    .dashboard-header {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }

    .dashboard-header h1 {
        font-size: 1.75rem;
    }

    .dashboard-header p {
        font-size: 0.9rem;
    }

    .glass-panel {
        padding: 1.25rem;
    }


    .prices-table,
    .prices-table thead,
    .prices-table tbody,
    .prices-table th,
    .prices-table td,
    .prices-table tr {
        display: block;
        width: 100%;
    }

    .prices-table thead {
        display: none;
    }

    .prices-table tr {
        border: 1px solid var(--border-color);
        border-radius: 12px;
        margin-bottom: 1.25rem;
        padding: 1.25rem;
        background: var(--bg-card);
        box-shadow: var(--shadow-subtle);
    }

    .prices-table tr:hover {
        background-color: var(--bg-card);
    }

    .prices-table td {
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        padding: 0.75rem 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right !important;
    }

    .dark-mode .prices-table td {
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .prices-table td:last-child {
        border-bottom: none;
        justify-content: center;
        padding-top: 1rem;
        margin-top: 0.5rem;
    }

    .prices-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--text-muted);
        font-size: 0.85rem;
        text-transform: uppercase;
        text-align: left;
        margin-right: 1rem;
        flex-shrink: 0;
    }

    .price-input {
        width: 120px !important;
    }
}



