/* Variables et styles globaux */
:root {
    --primary-color: #4a90d9;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --bg-light: #f8f9fa;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
}
body { background-color: #f5f7fa; }

/* _index.scss */
#list_user { padding: 3%; }
#list_user #users { text-align: center; }
#list_user .logo { width: auto; height: 150px; }
#list_user #div-btn-user { width: 100%; margin: auto; padding-top: 2%; padding-bottom: 1%; }
#list_user #btn-user { text-align: center; width: 250px; height: 250px; }
.navbar { width: 100%; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important; box-shadow: var(--shadow); }
.navbar .navbar-brand { color: white !important; font-weight: bold; font-size: 1.5rem; }
.navbar .btn-outline-secondary { color: white; border-color: rgba(255,255,255,0.5); }
.navbar .btn-outline-secondary:hover { background-color: rgba(255,255,255,0.2); color: white; }
.navbar .btn-outline-primary { color: white; border-color: white; }
.navbar .btn-outline-primary:hover { background-color: white; color: #667eea; }
#circleUser { width: 30px; height: 30px; color: white; }
#bodyContain { padding-top: 20px; }
#titleListe { margin: 0 20px; }
#acceuilSite { padding-top: 20px; justify-content: center; margin-right: 5%; margin-left: 5%; max-width: 1200px; margin: 20px auto; }
#acceuilSite h2 { font-size: 2rem; text-align: center; padding-bottom: 10px; color: #333; }
#acceuilSite .btn { margin-bottom: 10px; }
#acceuilSite #cameraButton { position: absolute; top: 0; border-radius: 5px; right: 18px; z-index: 2; border: none; height: 38px; cursor: pointer; transform: translateX(2px); }
#acceuilSite #divSearchButton { padding-top: 15px; }
#acceuilSite #selectuser { padding-top: 15px; }
.row { padding-bottom: 15px; }

/* Cards améliorées */
.card { border: none; border-radius: 12px; box-shadow: var(--shadow); transition: transform 0.2s, box-shadow 0.2s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(0,0,0,0.15); }
.card-header { border-radius: 12px 12px 0 0 !important; }

/* _tablivres.scss */
#tableBook { padding: 20px; background: white; border-radius: 12px; box-shadow: var(--shadow); margin: 0 20px; }
#tableBook table { margin-bottom: 0; }
#tableBook thead th { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border: none; padding: 15px 10px; font-weight: 500; }
#tableBook thead th a { color: white; text-decoration: none; }
#tableBook thead th a:hover { color: #ddd; }
#tableBook tbody tr { transition: background-color 0.2s; }
#tableBook tbody tr:hover { background-color: #f8f9fa; }
#tableBook tbody td { vertical-align: middle; padding: 10px; border-color: #eee; }
#tableBook tbody > tr { height: auto; min-height: 120px; }
@media only screen and (max-device-width: 900px) {
    #tableBook { padding: 10px; margin: 0 10px; }
    #tableBook tr th:nth-child(3), #tableBook tr td:nth-child(3),
    #tableBook tr th:nth-child(4), #tableBook tr td:nth-child(4),
    #tableBook tr th:nth-child(5), #tableBook tr td:nth-child(5),
    #tableBook tr th:nth-child(6), #tableBook tr td:nth-child(6) { display: none; }
}
.pagination { display: flex; flex-wrap: wrap; padding: 20px 0; list-style: none; border-radius: 0.25rem; justify-content: center; }
.pagination .page-link { border-radius: 8px; margin: 0 3px; border: none; color: #667eea; }
.pagination .page-item.active .page-link { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border: none; }
.indexAuteur { flex-wrap: wrap; display: flex; padding-left: 0; list-style: none; border-radius: 0.25rem; justify-content: center; }
#myImg { border-radius: 8px; cursor: pointer; transition: 0.3s; }
#myImg:hover { opacity: 0.7; }
#caption { margin: auto; display: block; width: 80%; max-width: 700px; text-align: center; color: #ccc; padding: 10px 0; height: 150px; }

/* Images de couverture dans le tableau */
.img-cover { border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.15); transition: transform 0.2s, box-shadow 0.2s; cursor: pointer; }
.img-cover:hover { transform: scale(1.05); box-shadow: 0 4px 15px rgba(0,0,0,0.25); opacity: 0.7; }

/* Fix input-group alignment */
.border-right-0 { border-right: 0 !important; }
.border-left-0 { border-left: 0 !important; }
.input-group-lg > .input-group-prepend > .input-group-text,
.input-group-lg > .input-group-append > .btn {
    height: 100%;
    display: flex;
    align-items: center;
}

/* _livres.scss */
#titleLivre { text-align: center; margin-bottom: 30px; }
.detail-infos th, .detail-infos td { padding: 5px; }
.cover { display: block; margin-left: auto; margin-right: auto; margin-bottom: 30px; }
.details_listuser { border-collapse: collapse; border: 2px solid black; font-family: sans-serif; font-size: 0.8rem; letter-spacing: 1px; }
.details_listuser thead, .details_listuser tfoot { background-color: grey; }
.details_listuser th, .details_listuser td { border: 1px solid black; padding: 8px 10px; }
.details_listuser td:last-of-type { text-align: center; }

/* Image Modal (pour la liste des livres) */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
}
.image-modal-content {
    margin: auto;
    display: block;
    max-width: 80%;
    max-height: 80vh;
    animation: zoomIn 0.3s;
}
.image-modal-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
}
.image-modal-close:hover { color: #bbb; }
@keyframes zoomIn {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* User Avatar Styles */
.user-menu-btn {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
    padding: 5px 10px;
    border-radius: 25px;
    transition: background-color 0.2s;
}
.user-menu-btn:hover {
    background-color: rgba(255,255,255,0.2);
    text-decoration: none;
    color: white;
}
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255,255,255,0.8);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.user-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}
.user-avatar-initials {
    color: white;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
}
.user-name {
    font-weight: 500;
    font-size: 14px;
}
.dropdown-header {
    padding: 10px 15px;
    background-color: #f8f9fa;
}

/* Navbar Brand Dropdown */
.navbar-brand.dropdown-toggle {
    cursor: pointer;
}
.navbar-brand.dropdown-toggle::after {
    margin-left: 8px;
}
