:root {
    --c-gold: #c5a065;
    --c-black: #1a1a1a;
    --c-text: #2c3e50;
    --c-bg: #f8f9fa;
    --c-white: #fff;
    --c-danger: #ef4444;
    --c-success: #10b981;
    --c-blue: #3498db;
    --c-warning: #f59e0b;
    --radius: 8px;

    /* Nouvelles variables accessibilité */
    --text-primary: #1a1a1a;
    --text-secondary: #4a5568;
    --text-muted: #6b7280;
}

@font-face {
    font-family: 'Maghribi Assile';
    src: url('Maghribi-Assile-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #ebe5d9;
    /* Crème base */
    color: var(--c-text);
    margin: 0;
    line-height: 1.5;
    position: relative;
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-image: url('https://upload.wikimedia.org/wikipedia/commons/d/d7/%D9%85%D8%B5%D8%AD%D9%81_%D9%85%D8%AE%D8%B7%D9%88%D8%B7_%D8%A8%D8%A7%D9%84%D8%AE%D8%B7_%D8%A7%D9%84%D9%85%D8%BA%D8%B1%D8%A8%D9%8A_%D8%A7%D9%84%D9%85%D8%A8%D8%B3%D9%88%D8%B7_%D9%A5.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: 0.08;
    pointer-events: none;
    mix-blend-mode: multiply;
}

/* ============================================= */
/* SIDEBAR & LAYOUT                             */
/* ============================================= */
.sidebar-layout {
    display: flex;
    min-height: calc(100vh - 80px);
    position: relative;
    position: relative;
}

.main-sidebar {
    width: 280px !important;
    /* Fixed width */
    background: #1e293b;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    padding-top: 30px;
    gap: 10px;
    z-index: 100;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.15);
    transition: none !important;
}

.main-sidebar:hover {
    width: 280px !important;
}

.nav-link {
    background: transparent;
    border: none;
    color: #cbd5e1;
    /* Lighter slate for better contrast */
    font-weight: 500;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    padding: 16px 24px;
    text-align: left;
    align-items: center;
    gap: 16px;
    transition: background 0.2s, color 0.2s;
    border-left: 4px solid transparent;
    width: 100%;
}

/* Classe pour cacher les éléments nav */
.nav-hidden {
    display: none !important;
}


.nav-link svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    opacity: 0.8;
    flex-shrink: 0;
}

/* État Actif */
.nav-link.active {
    background: rgba(197, 160, 101, 0.15);
    color: var(--c-gold);
    border-left-color: var(--c-gold);
    font-weight: 600;
}

.nav-link.active svg {
    opacity: 1;
    fill: var(--c-gold);
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    padding-left: 24px;
    /* No slide effect */
}

.nav-link:hover svg {
    opacity: 1;
}

/* ============================================= */
/* PAGE CONNEXION                               */
/* ============================================= */
.auth-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    overflow-y: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1a1a1a;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.98) 0%, rgba(44, 62, 80, 0.98) 100%),
        url('https://upload.wikimedia.org/wikipedia/commons/8/8a/Al_Quaraouiyine.jpg');
    background-size: cover;
    background-position: center;
    padding: 20px;
}

.auth-container {
    background: var(--c-white);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    border: 1px solid rgba(197, 160, 101, 0.3);
    margin: auto;
}

.auth-logo img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(197, 160, 101, 0.4);
}

.auth-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--c-black);
    margin: 0 0 5px;
}

.auth-subtitle {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 25px;
}

.auth-tabs {
    display: flex;
    margin-bottom: 25px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eee;
}

.auth-tab {
    flex: 1;
    padding: 12px;
    border: none;
    background: #f8f9fa;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
    color: #666;
}

.auth-tab.active {
    background: var(--c-gold);
    color: white;
}

.auth-form {
    text-align: left;
}

.auth-field {
    margin-bottom: 18px;
}

.auth-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #7f8c8d;
    margin-bottom: 6px;
}

.auth-field input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.auth-field input:focus {
    border-color: var(--c-gold);
    outline: none;
}

.auth-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--c-black);
    color: var(--c-gold);
}

.auth-btn:hover {
    background: #333;
    transform: translateY(-2px);
}

.auth-btn-gold {
    background: var(--c-gold);
    color: white;
}

.auth-btn-gold:hover {
    background: #b8954f;
}

.auth-error {
    color: var(--c-danger);
    font-size: 0.85rem;
    margin-top: 12px;
    text-align: center;
    display: none;
}

.auth-success {
    color: var(--c-success);
    font-size: 0.85rem;
    margin-top: 12px;
    text-align: center;
    display: none;
    background: #d4edda;
    padding: 10px;
    border-radius: 6px;
}

.auth-info {
    background: #e8f4fd;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-size: 0.85rem;
    color: #0a7cc8;
}

.auth-forgot {
    margin-top: 15px;
    text-align: center;
}

.auth-forgot a {
    color: var(--c-gold);
    text-decoration: none;
    font-size: 0.85rem;
}

.auth-forgot a:hover {
    text-decoration: underline;
}

.auth-footer {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 0.8rem;
    color: #999;
}

.auth-footer a {
    color: var(--c-gold);
    text-decoration: none;
}

/* ============================================= */
/* HEADER & NAV                                 */
/* ============================================= */
.site-header {
    background: var(--c-black);
    border-bottom: 4px solid var(--c-gold);
    color: white;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand a {
    display: flex;
    align-items: center;
}

.logo-img {
    width: 50px;
    height: 50px;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.site-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    margin: 0;
    color: #fff;
}

.site-subtitle {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--c-gold);
}

.user-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

#user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 12px;
    border-radius: 20px;
}

.u-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
}

.u-role {
    font-size: 0.65rem;
    color: var(--c-gold);
    text-transform: uppercase;
}

.btn-logout-icon {
    background: none;
    border: none;
    color: #ff6b6b;
    font-size: 1.1rem;
    cursor: pointer;
}

/* ============================================= */
/* SIDEBAR & LAYOUT                             */
/* ============================================= */
.sidebar-layout {
    display: flex;
    min-height: calc(100vh - 80px);
    /* Height of header approx */
}

.main-sidebar {
    width: 260px;
    /* Largeur fixe, plus de rétractation */
    background: #1e293b;
    /* Fond sombre "Slate" premium */
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    padding-top: 30px;
    gap: 8px;
    z-index: 100;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

/* Suppression de l'effet hover d'expansion */
.main-sidebar:hover {
    width: 260px;
}

.nav-link {
    background: transparent;
    border: none;
    color: #94a3b8;
    /* Gris clair pour fond sombre */
    font-weight: 500;
    text-transform: none;
    /* Plus élégant */
    font-size: 0.95rem;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    padding: 12px 25px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    width: 100%;
}

.nav-link svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    opacity: 0.7;
    transition: all 0.3s;
}

/* État Actif : Fond subtil et texte doré */
.nav-link.active {
    background: rgba(197, 160, 101, 0.1);
    color: var(--c-gold);
    border-left-color: var(--c-gold);
    font-weight: 600;
}

.nav-link.active svg {
    opacity: 1;
    fill: var(--c-gold);
}

.nav-link:hover {
    color: #e2e8f0;
    padding-left: 30px;
    /* Petit effet de glissement */
}

.nav-link:hover svg {
    opacity: 1;
}


.main-content-area {
    flex: 1;
    padding: 20px;
    background: transparent;
    overflow-x: hidden;
}

/* Ajustement contener principal pour le layout sidebar */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

/* ============================================= */
/* ADMIN TABS REDESIGN                          */
/* ============================================= */
.admin-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    background: transparent;
    padding: 0;
    border: none;
    justify-content: flex-start;
}

.tab-btn {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 12px 24px;
    border-radius: 30px;
    /* Pill shape */
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.tab-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    opacity: 0.6;
}

.tab-btn:hover {
    transform: translateY(-2px);
    border-color: #cbd5e1;
    color: #334155;
}

.tab-btn.active {
    background: var(--c-black);
    color: var(--c-gold);
    border-color: var(--c-black);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tab-btn.active svg {
    fill: var(--c-gold);
    opacity: 1;
}

/* Dashboard Stat Cards Icons */
.stat-icon {
    font-size: 0;
    /* Hide emoji if it was text */
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
    fill: var(--c-gold);
}

.card {
    background: var(--c-white);
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    border: 1px solid rgba(197, 160, 101, 0.3);
}

.card-header {
    background: #fdfaf2;
    padding: 12px 20px;
    border-bottom: 1px solid #e8dfc8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    margin: 0;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

.card-small {
    max-width: 400px;
    margin: 0 auto;
}

.page-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin: 0 0 20px;
}

/* CAROUSEL */
.carousel-wrapper {
    position: relative;
    /* Pour les flèches absolues si besoin, mais ici on garde les boutons titre */
}

.carousel-container {
    padding: 30px;
    background: white;
    margin-bottom: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    /* Plus subtil */
    display: flex;
    /* Added back for layout */
    align-items: center;
    /* Added back for layout */
    gap: 10px;
    /* Added back for layout */
}

.carousel-title {
    font-family: 'Playfair Display', serif;
    /* Kept from original */
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-left: 10px;
    border-left: 4px solid var(--c-gold);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.carousel-btn {
    background: white;
    color: var(--c-black);
    border: 1px solid #e0e0e0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.carousel-btn:hover {
    background: var(--c-gold);
    color: white;
    border-color: var(--c-gold);
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(197, 160, 101, 0.3);
}

.carousel-track-container {
    flex: 1;
    /* Kept from original */
    overflow: hidden;
    position: relative;
    border-radius: 10px;
    /* Kept from original */
}

.carousel-track {
    display: flex;
    gap: 25px;
    /* Espacement augmenté */
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 5px;
    /* Espace pour l'ombre */
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
}

.carousel-track::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome/Safari */
}

.carousel-item {
    flex: 0 0 140px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.carousel-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.c-img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 8px;
}

.c-title {
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* CATALOGUE */
.search-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.search-input:focus {
    border-color: var(--c-gold);
    outline: none;
}

.catalogue-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.catalogue-filters .search-input {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
}

.filter-select {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    background: white;
    min-width: 180px;
}

.filter-select:focus {
    border-color: var(--c-gold);
    outline: none;
}

.categorie-dropdown {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--c-gold);
}

.category-item-name {
    font-weight: 600;
}

.category-item-count {
    font-size: 0.8rem;
    color: #666;
}

.category-delete {
    background: none;
    border: none;
    color: var(--c-danger);
    cursor: pointer;
    font-size: 1rem;
    padding: 0 5px;
}

.livre-card {
    display: flex;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: all 0.2s;
}

.livre-card:hover {
    background: #fdfaf2;
    transform: translateX(5px);
}

.book-cover {
    width: 60px;
    height: 90px;
    object-fit: cover;
    border-radius: 4px;
    background: #eee;
}

.book-info {
    flex: 1;
}

.book-title {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    margin: 0 0 4px;
}

.book-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

/* BADGES */
.badge {
    font-size: 0.65rem;
    padding: 5px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-dispo {
    background: #10b981;
    color: white;
    font-weight: 600;
}

.badge-emprunte {
    background: #f59e0b;
    color: #1a1a1a;
    font-weight: 600;
}

.badge-retard {
    background: #ef4444;
    color: white;
    font-weight: 700;
    animation: pulse 2s infinite;
}

.badge-perdu {
    background: #6b7280;
    color: white;
    font-weight: 600;
}

.badge-archive {
    background: #9ca3af;
    color: white;
    font-weight: 600;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Highlight pour les emprunts en retard dans la liste membre */
.retard-highlight {
    background: #fff5f5 !important;
    border-left: 4px solid #e74c3c !important;
}

/* MODAL PREVIEW */
.modal-book-preview {
    max-width: 600px;
}

.book-preview-content {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.preview-cover {
    width: 150px;
    height: 220px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.preview-details {
    flex: 1;
}

.preview-details p {
    margin: 0 0 10px;
    font-size: 0.9rem;
}

.preview-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: 600;
    margin-top: 10px;
}

.preview-status.dispo {
    background: #d4edda;
    color: #155724;
}

.preview-status.emprunte {
    background: #fff3cd;
    color: #856404;
}

.preview-description {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--c-gold);
}

.preview-description h4 {
    margin: 0 0 10px;
    font-size: 0.9rem;
}

.preview-description p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #555;
}

/* INVENTAIRE */
.inventaire-actions {
    display: flex;
    gap: 10px;
}

.btn-import {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    font-size: 0.75rem;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
}

.btn-export {
    background: linear-gradient(135deg, #11998e, #38ef7d);
    color: white;
    border: none;
    font-size: 0.75rem;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
}

.inventaire-search-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.inventaire-search-bar input {
    flex: 1;
    min-width: 200px;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
}

.inventaire-search-bar select {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
}

.inventaire-stats {
    margin-bottom: 15px;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    font-weight: 600;
    color: #495057;
}

.inventaire-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 500px;
    overflow-y: auto;
}

.inventaire-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border: 1px solid #eee;
    border-radius: 10px;
    border-left: 4px solid transparent;
    transition: all 0.3s;
}

.inventaire-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.inventaire-item.status-disponible {
    border-left-color: #28a745;
}

.inventaire-item.status-emprunte {
    border-left-color: #ffc107;
}

.inventaire-item.status-perdu {
    border-left-color: #dc3545;
}

.inventaire-item.status-archive {
    border-left-color: #6c757d;
}

.inventaire-item-cover {
    width: 50px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    background: #f0f0f0;
}

.inventaire-item-info {
    flex: 1;
    min-width: 0;
}

.inventaire-item-title {
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inventaire-item-meta {
    font-size: 0.8rem;
    color: #666;
}

.inventaire-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-icon {
    background: white;
    border: 2px solid #e0e0e0;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-icon:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--c-gold);
}

.btn-icon.danger {
    border-color: #ffcccc;
}

.btn-icon.danger:hover {
    background: #fff5f5;
    border-color: var(--c-danger);
    color: var(--c-danger);
    transform: translateY(-2px) scale(1.05);
}

.btn-preter {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 8px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-preter:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(52, 152, 219, 0.4);
}

.status-select {
    font-size: 0.75rem;
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.status-select:hover {
    border-color: var(--c-gold);
}

.status-select:focus {
    border-color: var(--c-gold);
    outline: none;
    box-shadow: 0 0 0 3px rgba(197, 160, 101, 0.1);
}

/* BULK ACTIONS */
.bulk-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    color: white;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.bulk-actions-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.bulk-actions-right {
    display: flex;
    gap: 8px;
}

.bulk-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--c-gold);
}

.nav-link:hover,
.nav-link.active {
    color: var(--c-gold);
}

.btn-bulk-action {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border: none;
    padding: 6px 12px;
    font-size: 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-bulk-action:hover {
    background: white;
    transform: translateY(-1px);
}

.btn-bulk-delete {
    background: #dc3545;
    color: white;
}

.btn-bulk-delete:hover {
    background: #c82333;
}

.book-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--c-gold);
    margin-right: 10px;
}

.inventaire-item.selected {
    background: #f0f7ff;
    border-left-color: #667eea !important;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.2);
}

/* PRETS */
.pret-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border: 1px solid #eee;
    border-radius: 10px;
    margin-bottom: 10px;
    border-left: 4px solid var(--c-warning);
}

.pret-card.retard {
    border-left-color: var(--c-danger);
    background: #fff8f8;
}

.pret-info {
    flex: 1;
}

.pret-livre {
    font-weight: 700;
    margin-bottom: 4px;
}

.pret-membre {
    font-size: 0.85rem;
    color: #666;
}

.pret-dates {
    font-size: 0.8rem;
    color: #888;
    margin-top: 4px;
}

.pret-retour-btn {
    background: var(--c-success);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

/* ADHERENTS TABLEAU */
.adherents-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.adherents-table thead {
    background: #f8f9fa;
}

.adherents-table th {
    text-align: left;
    padding: 12px 15px;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.adherents-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.adherents-table tbody tr:hover {
    background: #fdfaf2;
}

.adherent-name-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.adherent-avatar-small {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--c-gold);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.adherent-avatar-small.admin {
    background: #667eea;
}

.role-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.role-badge.membre {
    background: #e8f4fd;
    color: #0a7cc8;
}

.role-badge.admin {
    background: #f3e8ff;
    color: #7c3aed;
}

.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.status-badge.active {
    background: #d4edda;
    color: #155724;
}

.status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.btn-table-action {
    padding: 5px 10px;
    font-size: 0.7rem;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #ddd;
    background: #f8f9fa;
    color: #495057;
}

.btn-table-action:hover {
    background: #e9ecef;
}

.btn-table-action.danger {
    background: #fff5f5;
    border-color: #fed7d7;
    color: #c53030;
}

.btn-table-action.danger:hover {
    background: #fed7d7;
}

.search-small {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.85rem;
}

.activation-code-box {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border-radius: 10px;
    text-align: center;
}

.activation-code-box .code {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 5px;
    color: #155724;
    font-family: 'Courier New', monospace;
}

.activation-code-box p {
    margin: 10px 0 0;
    font-size: 0.85rem;
    color: #155724;
}

/* RAPPORTS */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.stat-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #f8f9fa;
}

.stat-content {
    flex: 1;
}

.stat-num {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--c-black);
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #7f8c8d;
    font-weight: 600;
}

.stat-card.warning {
    border-left: 4px solid var(--c-danger);
}

.report-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.progress-bar {
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--c-gold), #e8d4b8);
    border-radius: 10px;
    transition: width 0.5s;
}

.progress-text {
    font-size: 0.85rem;
    color: #666;
    text-align: center;
}

.top-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 8px;
}

.top-rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--c-gold);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.top-rank.gold {
    background: linear-gradient(135deg, #ffd700, #ffb300);
}

.top-rank.silver {
    background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
}

.top-rank.bronze {
    background: linear-gradient(135deg, #cd7f32, #b87333);
}

.top-info {
    flex: 1;
}

.top-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.top-count {
    font-size: 0.75rem;
    color: #666;
}

.charts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.chart-container {
    height: 250px;
}

.alert-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.alert-item.warning {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
}

.alert-item.danger {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
}

.alert-item.info {
    background: #d1ecf1;
    border-left: 4px solid #17a2b8;
}

.no-alerts {
    text-align: center;
    color: #999;
    padding: 20px;
}

/* FORMS */
.input-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.input-wrapper {
    margin-bottom: 15px;
}

.input-wrapper label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    color: #7f8c8d;
}

input,
select,
textarea {
    width: 100%;
    padding: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    background: white;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--c-gold);
    outline: none;
}

.isbn-wrapper {
    position: relative;
    display: flex;
    flex: 1;
}

.isbn-wrapper input {
    padding-right: 40px;
}

.isbn-wrapper button {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 40px;
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.form-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #7f8c8d;
    margin-bottom: 6px;
}

.form-field input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
}

.form-field input:focus {
    border-color: var(--c-gold);
    outline: none;
}

.btn-add-member {
    background: var(--c-gold);
    color: white;
    border: none;
    padding: 14px 25px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-add-member:hover {
    background: #b8954f;
}

/* BUTTONS */
button {
    padding: 10px 20px;
    background: var(--c-black);
    color: var(--c-gold);
    border: 1px solid var(--c-black);
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    transition: 0.2s;
}

button:hover {
    background: var(--c-gold);
    color: white;
    border-color: var(--c-gold);
}

.btn-full {
    width: 100%;
}

.btn-cancel {
    background: #f0f0f0;
    border: 1px solid #ccc;
    color: #333;
}

.btn-small {
    font-size: 0.7rem;
    background: #eee;
    color: #333;
    padding: 6px 12px;
}

.btn-success {
    background: var(--c-success);
    color: white;
    border-color: var(--c-success);
}

.btn-warning {
    background: #e67e22;
    color: white;
    border-color: #e67e22;
}

.btn-gold {
    background: var(--c-gold);
    color: white;
    border-color: var(--c-gold);
}

/* ISBN Search Styling */
.isbn-wrapper {
    display: flex;
    align-items: center;
    position: relative;
    flex: 1;
}

.isbn-wrapper input {
    width: 100%;
    padding-right: 50px !important;
    /* Espace pour le bouton */
    border-radius: 8px !important;
}

#btn-fetch-isbn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--c-gold);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

#btn-fetch-isbn:hover {
    background: var(--c-black);
    transform: translateY(-50%) scale(1.05);
}

/* ADMIN TABS */
.admin-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 20px;
    background: #f0f0f0;
    border: none;
    border-radius: 8px 8px 0 0;
    font-weight: 600;
    cursor: pointer;
}

.tab-btn.active {
    background: white;
    color: var(--c-gold);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

/* MODALS */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-box {
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-large {
    max-width: 800px;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #999;
    padding: 0;
    line-height: 1;
}

.close-modal:hover {
    color: var(--c-danger);
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* IMPORT */
.import-instructions {
    background: #e8f4fd;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.btn-template {
    margin-top: 10px;
    background: #0a7cc8;
    color: white;
    border: none;
}

.import-upload {
    border: 2px dashed #ccc;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    margin-bottom: 20px;
    cursor: pointer;
}

.import-upload:hover {
    border-color: var(--c-gold);
    background: #fdfaf2;
}

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

#import-file-name {
    margin-top: 10px;
    font-weight: 600;
    color: var(--c-success);
}

.import-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.btn-back {
    background: #f0f0f0;
    border: none;
    color: #666;
}

.import-preview-grid {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.import-preview-item {
    display: flex;
    gap: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--c-success);
    margin-bottom: 8px;
    align-items: center;
}

.import-preview-item.error {
    border-left-color: var(--c-danger);
    background: #fff5f5;
}

.import-preview-item img {
    width: 40px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.import-preview-info {
    flex: 1;
}

.import-preview-info strong {
    display: block;
}

.import-preview-info small {
    color: #666;
}

.import-summary {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 15px;
}

.import-summary span {
    font-weight: 600;
}

#import-valid-count {
    color: var(--c-success);
}

#import-error-count {
    color: var(--c-danger);
}

/* NOUVELLE INTERFACE D'IMPORT ÉDITABLE */
.import-preview-item-v2 {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.import-preview-item-v2:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--c-gold);
}

.import-preview-item-v2.error {
    border-color: #e74c3c;
    background: #fff5f5;
    opacity: 0.6;
}

.import-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.import-item-cover {
    width: 60px;
    height: 85px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.import-item-status .status-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.import-item-status .status-badge.valid {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
}

.import-item-status .status-badge.invalid {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
}

.import-item-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.import-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.import-field label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.import-field.required label {
    color: #e74c3c;
}

.required-badge {
    background: #e74c3c;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.6rem;
    margin-left: 6px;
    animation: pulse 2s infinite;
}

.import-input,
.import-input-small {
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s;
    background: white;
}

.import-input:focus,
.import-input-small:focus {
    border-color: var(--c-gold);
    outline: none;
    box-shadow: 0 0 0 3px rgba(197, 160, 101, 0.1);
}

.import-input:disabled,
.import-input-small:disabled {
    background: #f8f9fa;
    cursor: not-allowed;
}

.import-field-small {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.import-field-small label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
}

.import-readonly {
    padding: 10px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #666;
    font-family: 'Courier New', monospace;
}

.import-readonly-display {
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #2c3e50;
    min-height: 48px;
    display: flex;
    align-items: center;
    border: 2px solid #e8e8e8;
}

.import-input-small {
    width: 80px;
}

/* Animation shake pour validation */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

/* FICHE ADHÉRENT DÉTAILLÉE */
.adherent-detail-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    margin-bottom: 25px;
    color: white;
}

.adherent-detail-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: white;
    color: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.adherent-detail-avatar.admin {
    background: var(--c-gold);
    color: white;
}

.adherent-detail-info {
    flex: 1;
}

.adherent-detail-info h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
}

.role-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 8px;
}

.role-badge.admin {
    background: var(--c-gold);
    color: white;
}

.role-badge.membre {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

.adherent-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.adherent-stat-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-left: 4px solid #667eea;
    transition: all 0.3s;
}

.adherent-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.adherent-stat-card.warning {
    border-left-color: #ffc107;
    background: linear-gradient(135deg, #fff3cd, #ffeeba);
}

.adherent-stat-icon {
    font-size: 2rem;
}

.adherent-stat-content {
    flex: 1;
}

.adherent-stat-num {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1;
}

.adherent-stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #666;
    margin-top: 4px;
}

.adherent-comment-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid var(--c-gold);
}

.adherent-comment-section label {
    display: block;
    font-weight: 700;
    margin-bottom: 10px;
    color: #2c3e50;
}

.adherent-comment-section textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    resize: vertical;
    transition: all 0.3s;
}

.adherent-comment-section textarea:focus {
    border-color: var(--c-gold);
    outline: none;
    box-shadow: 0 0 0 3px rgba(197, 160, 101, 0.1);
}

/* Legacy mobile styles removed - see end of file for new responsive rules */


/* ============================================= */
/* NOTIFICATION SYSTEM                           */
/* ============================================= */

/* Notify Modal */
.modal-notify {
    max-width: 400px;
    text-align: center;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.notify-icon-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.notify-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    animation: iconPop 0.4s ease-out 0.1s both;
}

.tuto-toc a {
    text-decoration: none;
    display: inline-block;
    background: white;
    border: 1px solid #e2e8f0;
    padding: 6px 12px;
    border-radius: 20px;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}

.tuto-toc a:hover {
    background: var(--c-gold);
    color: white;
    border-color: var(--c-gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(197, 160, 101, 0.2);
}

@keyframes iconPop {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.notify-icon.success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
}

.notify-icon.success::before {
    content: "✓";
    color: #155724;
}

.notify-icon.error {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
}

.notify-icon.error::before {
    content: "✕";
    color: #721c24;
}

.notify-icon.warning {
    background: linear-gradient(135deg, #fff3cd, #ffeeba);
}

.notify-icon.warning::before {
    content: "⚠";
    color: #856404;
}

.notify-icon.info {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
}

.notify-icon.info::before {
    content: "ℹ";
    color: #0c5460;
}

.notify-content {
    margin-bottom: 25px;
}

.notify-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    margin: 0 0 10px;
    color: var(--c-black);
}

.notify-message {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.btn-notify-ok {
    background: var(--c-gold);
    color: white;
    border: none;
}

.btn-notify-ok:hover {
    background: #b8954f;
}

/* Confirm Modal */
.modal-confirm {
    max-width: 450px;
    text-align: center;
    animation: modalSlideIn 0.3s ease-out;
}

.confirm-icon-container {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.confirm-icon {
    font-size: 3rem;
    animation: iconPop 0.4s ease-out 0.1s both;
}

.confirm-content {
    margin-bottom: 25px;
}

.confirm-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    margin: 0 0 12px;
    color: var(--c-black);
}

.confirm-message {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.confirm-actions button {
    flex: 1;
    max-width: 150px;
}

.modal-book-preview {
    max-width: 900px !important;
    width: 95% !important;
}

#toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: white;
    border-radius: 8px;
    padding: 15px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    animation: toastSlideIn 0.3s ease-out;
    pointer-events: all;
    border-left: 4px solid #ccc;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.hiding {
    animation: toastSlideOut 0.3s ease-out forwards;
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.toast-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-message {
    margin: 0;
    font-size: 0.9rem;
    color: var(--c-text);
    font-weight: 500;
}

.toast.success {
    border-left-color: #28a745;
}

.toast.success .toast-icon {
    color: #28a745;
}

.toast.error {
    border-left-color: #dc3545;
}

.toast.error .toast-icon {
    color: #dc3545;
}

.toast.warning {
    border-left-color: #ffc107;
}

.toast.warning .toast-icon {
    color: #ffc107;
}

.toast.info {
    border-left-color: #17a2b8;
}

.toast.info .toast-icon {
    color: #17a2b8;
}

@media (max-width: 768px) {
    #toast-container {
        right: 10px;
        left: 10px;
    }

    .toast {
        min-width: auto;
        max-width: none;
    }
}

/* ============================================= */
/* CHAMPS OBLIGATOIRES                           */
/* ============================================= */
.required-asterisk {
    color: var(--c-danger);
    margin-left: 4px;
    font-weight: 700;
}

label.required::after {
    content: ' *';
    color: var(--c-danger);
    font-weight: 700;
}

/* ============================================= */
/* BREADCRUMBS                                   */
/* ============================================= */
.breadcrumb {
    background: white;
    padding: 12px 20px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.breadcrumb ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.breadcrumb li {
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: var(--c-gold);
}

.breadcrumb .separator {
    color: var(--text-muted);
}

.breadcrumb .active {
    color: var(--c-gold);
    font-weight: 600;
}

/* ============================================= */
/* MODAL CONFIRMATION                            */
/* ============================================= */
.modal-confirm {
    max-width: 450px;
    text-align: center;
}

.btn-danger {
    background: var(--c-danger);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6b7280;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #4b5563;
}

/* ============================================= */
/* RACCOURCIS CLAVIER                            */
/* ============================================= */
.shortcuts-table {
    width: 100%;
    margin: 20px 0;
}

.shortcuts-table tr {
    border-bottom: 1px solid #e0e0e0;
}

.shortcuts-table td {
    padding: 12px;
}

.shortcuts-table td:first-child {
    width: 40%;
    font-weight: 600;
}

kbd {
    display: inline-block;
    padding: 4px 8px;
    background: #f8f9fa;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.85rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* ============================================= */
/* ACCESSIBILITÉ - FOCUS VISIBLE                */
/* ============================================= */
*:focus-visible {
    outline: 2px solid var(--c-gold);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--c-gold);
    outline-offset: 2px;
}

/* ============================================= */
/* TOOLTIPS                                      */
/* ============================================= */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: #1a1a1a;
    color: white;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 1000;
}

[data-tooltip]::after {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1a1a1a;
    opacity: 0;
    transition: opacity 0.3s;
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
    opacity: 1;
}

/* ============================================= */
/* PAGINATION                                    */
/* ============================================= */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 20px 0;
}

.pagination button {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.pagination button:hover:not(:disabled) {
    background: var(--c-gold);
    color: white;
    border-color: var(--c-gold);
}

.pagination button.active {
    background: var(--c-gold);
    color: white;
    border-color: var(--c-gold);
    font-weight: 700;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination span {
    color: var(--text-muted);
}

/* =============================================
   ADMIN SUBMENU NAVIGATION
   ============================================= */
.nav-group {
    display: flex;
    flex-direction: column;
}

.nav-parent {
    position: relative;
}

.nav-arrow {
    width: 20px;
    height: 20px;
    margin-left: auto;
    fill: currentColor;
    opacity: 0.7;
    transition: transform 0.3s;
}

.nav-parent.expanded .nav-arrow {
    transform: rotate(180deg);
}

.nav-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(0, 0, 0, 0.15);
    margin-left: 0;
}

.nav-submenu.open {
    max-height: 300px;
}

.nav-sublink {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 15px 10px 45px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.nav-sublink:hover {
    background: rgba(197, 160, 101, 0.2);
    color: var(--c-gold);
}

.nav-sublink svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* =============================================
   EMPRUNTS COUNTER
   ============================================= */
.emprunts-counter-box {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border-left: 4px solid var(--c-gold);
}

.emprunts-counter-box.at-limit {
    border-left-color: #e74c3c;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe4e4 100%);
}

.counter-icon {
    font-size: 2rem;
}

.counter-info {
    flex: 1;
}

.counter-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--c-text);
}

.counter-label {
    font-size: 0.85rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.counter-warning {
    padding: 5px 12px;
    background: #e74c3c;
    color: white;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* =============================================
   PROLONGER BUTTON & BADGE
   ============================================= */
.btn-prolonger {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: linear-gradient(135deg, var(--c-gold), #d4af37);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-prolonger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(197, 160, 101, 0.4);
}

.prolonge-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: #e8f5e9;
    color: #27ae60;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* =============================================
   LOGS D'ACTIVITÉ
   ============================================= */
.logs-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.log-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.2s;
    border-left: 3px solid var(--c-gold);
}

.log-item:hover {
    background: #f0f0f0;
    transform: translateX(5px);
}

.log-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.log-content {
    flex: 1;
    min-width: 0;
}

.log-action {
    font-weight: 600;
    color: var(--c-text);
    margin-bottom: 4px;
}

.log-details {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 8px;
}

.log-meta {
    display: flex;
    gap: 20px;
    font-size: 0.8rem;
    color: #888;
    flex-wrap: wrap;
}

.log-user,
.log-time {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* =============================================
   DISCORD SECTION (Contact)
   ============================================= */
.discord-section {
    margin-top: 25px;
    text-align: center;
}

.discord-divider {
    position: relative;
    margin-bottom: 20px;
}

.discord-divider::before,
.discord-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 35%;
    height: 1px;
    background: #ddd;
}

.discord-divider::before {
    left: 0;
}

.discord-divider::after {
    right: 0;
}

.discord-divider span {
    padding: 0 15px;
    background: white;
    color: #888;
    font-size: 0.85rem;
}

.discord-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 25px;
    background: #5865F2;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s;
}

.discord-link:hover {
    background: #4752C4;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(88, 101, 242, 0.3);
}

.discord-icon {
    width: 24px;
    height: 24px;
    fill: white;
}

/* =============================================
   RESPONSIVE ADJUSTMENTS FOR NEW FEATURES
   ============================================= */
@media (max-width: 768px) {
    .emprunts-counter-box {
        flex-wrap: wrap;
        padding: 12px 15px;
    }

    .counter-value {
        font-size: 1.2rem;
    }

    .log-item {
        flex-direction: column;
        gap: 10px;
    }

    .log-meta {
        flex-direction: column;
        gap: 5px;
    }

    .nav-submenu {
        margin-left: 0;
    }

    .nav-sublink {
        padding-left: 30px;
    }
}

/* =============================================
   CONTACT PAGE - NOUVELLE VERSION
   ============================================= */
.contact-email-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    padding: 50px 40px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    margin-bottom: 30px;
    border: 1px solid #e0e0e0;
}

.contact-icon {
    width: 100px;
    height: 100px;
    min-width: 100px;
    background: linear-gradient(135deg, var(--c-gold), #d4af37);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 30px rgba(197, 160, 101, 0.35);
}

.contact-icon svg {
    width: 50px;
    height: 50px;
    fill: white;
}


.contact-info {
    text-align: left;
}

.contact-label {
    font-size: 1.1rem;
    color: #666;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.contact-email-link {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--c-gold);
    text-decoration: none;
    transition: all 0.3s;
    display: block;
}

.contact-email-link:hover {
    color: #d4af37;
    text-decoration: underline;
}


.contact-discord-section {
    text-align: center;
    padding: 25px;
    background: #f0f4ff;
    border-radius: 16px;
    border: 2px dashed #5865F2;
    margin-bottom: 25px;
}

.discord-message {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.6;
}

.contact-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #888;
}

/* =============================================
   TAUX D'UTILISATION - DESIGN AMÉLIORÉ
   ============================================= */
.taux-utilisation-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    padding: 30px 20px;
}

.taux-circle {
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.taux-inner {
    width: 150px;
    height: 150px;
    background: white;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.05);
}

.taux-value {
    font-size: 3rem;
    font-weight: 800;
    color: var(--c-text);
    line-height: 1;
}

.taux-label {
    font-size: 0.75rem;
    color: #888;
    margin-top: 8px;
    font-weight: 600;
    letter-spacing: 2px;
}

.taux-stats {
    display: flex;
    justify-content: center;
    gap: 25px;
    width: 100%;
}

.taux-stat-item {
    text-align: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    min-width: 100px;
}

.taux-stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--c-text);
    line-height: 1;
}

.taux-stat-label {
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.taux-stat-divider {
    width: 1px;
    background: #ddd;
    align-self: stretch;
}

@media (max-width: 768px) {
    .contact-email-section {
        flex-direction: column;
        text-align: center;
    }

    .contact-info {
        text-align: center;
    }

    .taux-circle {
        width: 160px;
        height: 160px;
    }

    .taux-inner {
        width: 120px;
        height: 120px;
    }

    .taux-value {
        font-size: 2.2rem;
    }

    .taux-stats {
        flex-direction: column;
        gap: 10px;
    }

    .taux-stat-divider {
        display: none;
    }

    .taux-stat-item {
        min-width: auto;
    }
}

/* =============================================
   LOGS FILTERS - SIZING FIX
   ============================================= */
.logs-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.logs-filters-grid input[type="date"] {
    width: 100%;
    min-width: 120px;
    max-width: 150px;
    padding: 8px 10px;
    font-size: 0.85rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
}

.logs-filters-grid select,
.logs-filters-grid input[type="text"] {
    width: 100%;
    padding: 8px 10px;
    font-size: 0.9rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
}

/* =============================================
   MOBILE RESPONSIVE - BURGER MENU
   ============================================= */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1000;
    background: var(--c-gold);
    border: none;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.mobile-menu-toggle svg {
    width: 24px;
    height: 24px;
    fill: #fff;
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

.mobile-overlay.active {
    display: block;
}

@media (max-width: 900px) {
    .mobile-menu-toggle {
        display: block;
    }

    .main-sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        width: 260px !important;
        box-shadow: 5px 0 25px rgba(0, 0, 0, 0.5);
        display: flex !important;
        flex-direction: column !important;
        /* FORCE VERTICAL STACK */
    }

    .main-sidebar.open {
        left: 0;
    }

    /* Fix nav links on mobile to stay row-based and clean */
    .nav-link {
        flex-direction: row !important;
        /* Force row layout */
        justify-content: flex-start !important;
        padding: 15px 20px;
        font-size: 1rem;
        gap: 15px !important;
        text-align: left;
        border-left: 4px solid transparent;
        width: 100%;
        color: #cbd5e1 !important;
    }

    .nav-link.active {
        background: rgba(197, 160, 101, 0.1);
        color: var(--c-gold) !important;
        border-left-color: var(--c-gold);
    }

    /* Fix tutorial/report button specifically if it has ID or class */
    #nav-reports,
    #nav-mes-emprunts {
        /* Ensure they behave like others */
        position: static !important;
        transform: none !important;
    }

    .mobile-menu-toggle {
        display: flex !important;
    }

    .mobile-overlay.active {
        display: block !important;
    }

    .main-sidebar.open {
        left: 0;
    }

    .sidebar-layout {
        flex-direction: column;
    }

    .main-content-area {
        width: 100%;
        padding: 60px 10px 20px 10px;
    }

    /* Logo spacing */
    .main-header {
        padding-left: 60px;
    }

    /* Logs filters mobile */
    .logs-filters-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .logs-filters-grid input[type="date"] {
        max-width: 100%;
    }

    /* Carousel mobile */
    .carousel-container {
        padding: 0 10px;
    }

    .carousel-books {
        gap: 10px;
    }

    .catalog-card {
        min-width: 140px;
        max-width: 140px;
    }

    .catalog-card .c-cover {
        height: 180px;
    }

    /* Admin tabs mobile */
    .admin-tabs {
        flex-wrap: wrap;
        gap: 5px;
    }

    .admin-tabs .tab-btn {
        font-size: 0.8rem;
        padding: 8px 12px;
    }

    /* Cards mobile */
    .card {
        margin: 10px 0;
        border-radius: 10px;
    }

    .card-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    /* Tables mobile */
    .table-wrapper {
        overflow-x: auto;
    }

    table {
        font-size: 0.8rem;
    }

    /* Forms mobile */
    .form-row {
        flex-direction: column;
        gap: 10px;
    }

    .form-group {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .main-header h1 {
        font-size: 1.3rem;
    }

    .section-title {
        font-size: 1.1rem;
    }

    .catalog-card {
        min-width: 120px;
        max-width: 120px;
    }

    .catalog-card .c-cover {
        height: 150px;
    }

    .catalog-card .c-title {
        font-size: 0.8rem;
    }

    .btn-primary,
    .btn-secondary {
        font-size: 0.85rem;
        padding: 10px 16px;
    }

    /* Stats cards mobile */
    .stat-card {
        padding: 15px;
    }

    .stat-card h3 {
        font-size: 1.8rem;
    }
}

/* =============================================
   TUTORIAL PAGES
   ============================================= */
.tuto-section {
    max-width: 900px;
    margin: 0 auto;
}

.tuto-card {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.tuto-card h3 {
    color: var(--c-gold);
    margin-bottom: 15px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tuto-card p,
.tuto-card li {
    color: var(--text-secondary);
    line-height: 1.7;
}

.tuto-card ul {
    padding-left: 20px;
}

.tuto-card ul li {
    margin-bottom: 8px;
}

.tuto-placeholder {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-radius: 16px;
    border: 2px dashed #cbd5e1;
}

.tuto-placeholder svg {
    width: 80px;
    height: 80px;
    fill: #94a3b8;
    margin-bottom: 20px;
}

.tuto-placeholder h2 {
    color: #64748b;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.tuto-placeholder p {
    color: #94a3b8;
}

/* =============================================
   DEMANDES DE PRÊT SYSTEM
   ============================================= */

/* Badge compteur */
.nav-badge,
.tab-badge {
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
    min-width: 18px;
    text-align: center;
}

.tab-badge {
    background: #f59e0b;
    font-size: 0.65rem;
    padding: 1px 5px;
}

/* Demande card */
.demande-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-left: 4px solid var(--c-gold);
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.demande-card.refusee {
    border-left-color: #ef4444;
    opacity: 0.7;
}

.demande-card.acceptee {
    border-left-color: #10b981;
    opacity: 0.7;
}

.demande-cover {
    width: 60px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.demande-info {
    flex: 1;
}

.demande-livre {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--c-text);
    margin-bottom: 4px;
}

.demande-auteur {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.demande-membre {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: #f1f5f9;
    padding: 6px 10px;
    border-radius: 6px;
    margin-bottom: 8px;
}

.demande-date {
    font-size: 0.8rem;
    color: #94a3b8;
}

.demande-actions {
    display: flex;
    gap: 8px;
    flex-direction: column;
}

.demande-actions button {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.btn-accepter {
    background: #10b981;
    color: #fff;
}

.btn-accepter:hover {
    background: #059669;
}

.btn-refuser {
    background: #ef4444;
    color: #fff;
}

.btn-refuser:hover {
    background: #dc2626;
}

.demande-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.demande-status.acceptee {
    background: #d1fae5;
    color: #065f46;
}

.demande-status.refusee {
    background: #fee2e2;
    color: #991b1b;
}

.demandes-empty {
    text-align: center;
    padding: 40px;
    color: #94a3b8;
}

.demandes-empty svg {
    width: 60px;
    height: 60px;
    fill: #cbd5e1;
    margin-bottom: 15px;
}

/* Bouton demander dans catalogue */
.btn-demander {
    background: linear-gradient(135deg, var(--c-gold), #d4a855);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: center;
}

/* Bouton demander inline (à côté du statut) */
.btn-demander-inline {
    background: #fff;
    color: var(--c-gold);
    border: 1px solid var(--c-gold);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.btn-demander-inline:hover {
    background: var(--c-gold);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(197, 160, 101, 0.2);
}

.btn-demander-inline:disabled {
    background: #f1f5f9;
    color: #94a3b8;
    border-color: #cbd5e1;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-demander-inline.btn-demander-pending {
    background: #f59e0b;
}

/* Status row avec bouton */
.preview-status-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
}

/* Modal small pour date picker */
.modal-small {
    max-width: 400px !important;
    width: 95%;
}


.btn-demander:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(197, 160, 101, 0.3);
}

.btn-demander:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-demander-pending {
    background: #f59e0b;
}

/* Pulse animation for badge notification */
@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}

.nav-badge.pulse,
.tab-badge.pulse {
    animation: pulse 0.5s ease-in-out 3;
    background: #dc2626;
}

/* =============================================
   RESPONSIVE FIXES - COMPREHENSIVE
   ============================================= */

@media (max-width: 900px) {

    /* Sidebar mobile */
    .main-sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
        width: 260px;
    }

    .main-sidebar.open {
        left: 0;
    }

    .mobile-menu-toggle {
        display: flex !important;
    }

    .mobile-overlay.active {
        display: block !important;
    }

    /* Main content full width */
    .main-content {
        margin-left: 0 !important;
        padding: 15px !important;
        width: 100% !important;
    }

    /* Admin tabs responsive */
    .admin-tabs {
        flex-wrap: wrap;
        gap: 5px;
    }

    .admin-tabs .tab-btn {
        font-size: 0.75rem;
        padding: 8px 10px;
        flex: 1 1 auto;
        min-width: 80px;
    }

    .admin-tabs .tab-btn svg {
        width: 14px;
        height: 14px;
    }

    /* Cards responsive */
    .card {
        border-radius: 12px;
    }

    .card-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    /* Demande cards responsive */
    .demande-card {
        flex-direction: column;
        padding: 15px;
    }

    .demande-cover {
        width: 50px;
        height: 65px;
    }

    .demande-actions {
        flex-direction: row;
        width: 100%;
        margin-top: 10px;
    }

    .demande-actions button {
        flex: 1;
    }

    /* Forms responsive */
    .input-group {
        flex-direction: column;
        gap: 10px;
    }

    .form-row {
        flex-direction: column;
    }

    /* Tables responsive */
    .adherents-table {
        font-size: 0.8rem;
    }

    .adherents-table th,
    .adherents-table td {
        padding: 8px 5px;
    }

    /* Carousel responsive */
    .carousel-item {
        min-width: 140px !important;
    }

    /* Navigation sublinks */
    .nav-sublink {
        font-size: 0.85rem;
        padding: 8px 15px;
    }

    /* Logs filters */
    .logs-filters-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 600px) {
    .section-title {
        font-size: 1.1rem;
    }

    .admin-tabs .tab-btn {
        font-size: 0.65rem;
        padding: 6px 8px;
        min-width: 60px;
    }

    .admin-tabs .tab-btn svg {
        display: none;
    }

    .tuto-card {
        padding: 15px;
    }

    .tuto-card h3 {
        font-size: 1rem;
    }

    /* Modal responsive */
    .modal-box {
        max-width: 95vw;
        margin: 10px;
    }

    .book-preview-content {
        flex-direction: column;
    }

    .preview-cover {
        width: 100px;
        margin: 0 auto;
    }
}

/* =============================================
   MES DEMANDES (dans Mes Emprunts)
   ============================================= */

.mes-demandes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mes-demande-card {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-left: 4px solid var(--c-gold);
    display: flex;
    gap: 15px;
    align-items: center;
}

.mes-demande-card.pending {
    border-left-color: #f59e0b;
}

.mes-demande-card.accepted {
    border-left-color: #10b981;
}

.mes-demande-card.refused {
    border-left-color: #ef4444;
    opacity: 0.8;
}

.demande-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.demande-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

.demande-badge.accepted {
    background: #d1fae5;
    color: #065f46;
}

.demande-badge.refused {
    background: #fee2e2;
    color: #991b1b;
}

.demande-motif {
    font-size: 0.85rem;
    color: #ef4444;
    font-style: italic;
    margin-top: 4px;
}

@media (max-width: 600px) {
    .mes-demande-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .demande-badge {
        margin-top: 10px;
    }
}