/* =============================================
   Admin Panel Stylesheet
   ============================================= */

:root {
    --sand: #FDFAF6;
    --blue-light: #F0F7FA;
    --blue-medium: #D4E8F0;
    --blue: #4A90A4;
    --blue-dark: #1A3A4A;
    --warm: #D4A574;
    --warm-dark: #B8895A;
    --text: #2C3E50;
    --text-light: #6B7B8D;
    --white: #FFFFFF;
    --green: #27AE60;
    --red: #C0392B;
    --orange: #F39C12;
    --grey: #BDC3C7;
    --grey-light: #ECF0F1;
    --font-body: 'Lato', sans-serif;
    --radius: 8px;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --transition: 0.3s ease;
}

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

body {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background: #F5F6FA;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--warm); }

/* --- Login Page --- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--blue-dark) 0%, #2C5F72 100%);
}

.login-container { width: 100%; max-width: 400px; padding: 1.5rem; }

.login-box {
    background: var(--white);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.login-logo {
    font-family: 'Monsieur La Doulaise', cursive;
    font-size: 2.5rem;
    text-align: center;
    color: var(--blue-dark);
    margin-bottom: 0.2rem;
}

.login-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

/* --- Admin Layout --- */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* --- Sidebar --- */
.admin-sidebar {
    width: 250px;
    background: var(--blue-dark);
    color: var(--white);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform var(--transition);
}

.admin-sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.admin-logo {
    font-family: 'Monsieur La Doulaise', cursive;
    font-size: 1.8rem;
    color: var(--white) !important;
    display: block;
}

.admin-badge-tag {
    display: inline-block;
    background: var(--warm);
    color: var(--white);
    padding: 0.15rem 0.6rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.3rem;
}

.admin-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    color: rgba(255,255,255,0.7) !important;
    font-size: 0.95rem;
    transition: all var(--transition);
    position: relative;
}

.admin-nav-item:hover,
.admin-nav-item.active {
    background: rgba(255,255,255,0.1);
    color: var(--white) !important;
}

.admin-nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--warm);
}

.admin-count {
    background: var(--red);
    color: var(--white);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}

.admin-sidebar-footer {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 0.5rem 0;
}

/* --- Main Content --- */
.admin-main {
    flex: 1;
    margin-left: 250px;
    min-width: 0;
}

.admin-header {
    background: var(--white);
    padding: 1rem 2rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 50;
}

.admin-header h1 {
    font-size: 1.4rem;
    color: var(--blue-dark);
    font-family: var(--font-body);
    font-weight: 700;
}

.admin-sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--blue-dark);
}

.admin-content {
    padding: 2rem;
}

/* --- Stats Cards --- */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    text-align: center;
    border-top: 4px solid var(--blue);
}

.stat-card.stat-new { border-top-color: var(--orange); }
.stat-card.stat-messages { border-top-color: var(--green); }

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--blue-dark);
    line-height: 1;
    margin-bottom: 0.3rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* --- Panels --- */
.admin-panel {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.admin-panel h2 {
    font-size: 1.2rem;
    color: var(--blue-dark);
    margin-bottom: 1rem;
    font-family: var(--font-body);
    font-weight: 700;
}

.admin-panel h3 {
    font-size: 1.1rem;
    color: var(--blue-dark);
    margin-bottom: 0.8rem;
    font-family: var(--font-body);
    font-weight: 700;
}

/* --- Tables --- */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 0.6rem 0.8rem;
    text-align: left;
    border-bottom: 1px solid var(--grey-light);
    font-size: 0.9rem;
}

.admin-table thead th {
    background: #F8F9FA;
    font-weight: 700;
    color: var(--blue-dark);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table tbody tr:hover {
    background: #FAFBFC;
}

.row-new {
    background: #FFF8E1 !important;
}

/* Detail table */
.admin-detail-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-detail-table th {
    text-align: left;
    padding: 0.5rem 1rem 0.5rem 0;
    color: var(--text-light);
    font-weight: 400;
    width: 120px;
    vertical-align: top;
}

.admin-detail-table td {
    padding: 0.5rem 0;
}

/* --- Badges --- */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-nouvelle { background: #FFF3E0; color: #E65100; }
.badge-lue { background: #E3F2FD; color: #1565C0; }
.badge-confirmee { background: #E8F5E9; color: #2E7D32; }
.badge-annulee { background: #FFEBEE; color: #C62828; }
.badge-disponible { background: #E8F5E9; color: #2E7D32; }
.badge-complet { background: #FFEBEE; color: #C62828; }
.badge-option { background: #FFF8E1; color: #E65100; }
.badge-bloque { background: #ECEFF1; color: #546E7A; }

/* --- Forms (shared) --- */
.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 700;
    color: var(--blue-dark);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 2px solid var(--grey-light);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text);
    background: var(--white);
    transition: border-color var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(74,144,164,0.15);
}

textarea.form-control { resize: vertical; min-height: 80px; }

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    text-align: center;
    text-decoration: none;
    font-family: var(--font-body);
}

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

.btn-secondary {
    background: var(--blue);
    color: var(--white);
}
.btn-secondary:hover {
    background: var(--blue-dark);
    color: var(--white);
}

/* --- Flash --- */
.flash {
    padding: 0.8rem 1.2rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-weight: 700;
    font-size: 0.9rem;
}

.flash-success { background: #E8F5E9; color: var(--green); border: 1px solid var(--green); }
.flash-error { background: #FFEBEE; color: var(--red); border: 1px solid var(--red); }

/* --- Responsive --- */
@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar.open {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0;
    }

    .admin-sidebar-toggle {
        display: block;
    }

    .admin-stats {
        grid-template-columns: 1fr;
    }

    .admin-content {
        padding: 1rem;
    }
}

/* --- Utility --- */
.text-light { color: var(--text-light); }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mt-3 { margin-top: 1.5rem; }
