/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    list-style: none;
    text-decoration: none;
}

:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #6b7280;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --background-color: #f8fafc;
    --text-color: #1f2937;
    --border-color: #e5e7eb;
    --white: #ffffff;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    list-style: none;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header et Navigation */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.nav-brand a {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem 0;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.welcome-message {
    font-size: 1.25rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    display: inline-block;
  
}


/* Boutons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

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


.btn-secondary:hover {
    background: #4b5563;
    transform: translateY(-1px);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Sections */
.features {
    padding: 4rem 0;
    background: var(--white);
}

.features h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--text-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: 0.75rem;
    background: var(--background-color);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Media Items */
.page-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
    color: var(--text-color);
}

.container-media {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 5px;
    gap: 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
}

.media-items {
    flex: 0 0 calc(33.333% - 2rem);
    max-width: calc(33.333% - 2rem);
    min-width: 250px;
    padding: 1rem;
    border-radius: 0.75rem;
    background: var(--background-color);
    border: 1px solid var(--border-color);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}


/* recherche & filtre */



.search-container {
    display: flex;
    justify-content: center;
    align-items: space-between;
}
.search-bar {
    display: flex;
    justify-content: center;
    align-items: space-between;
    min-width: 500px;
}

.search-input {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background-color: var(--background-color);
    color: var(--primary-color);
    min-width: 200px;
}

.search-button {
    border: solid var(--secondary-color);
    background-color: var(--background-color);
    color: var(--primary-color);
    border-radius: 5px;

}

.type-select {
    border: solid var(--secondary-color);
    background-color: var(--secondary-color);
    color: var(--background-color);
    border-radius: 5px;
}

.genre-select {
    border: solid var(--secondary-color);
    background-color: var(--secondary-color);
    color: var(--background-color);
    border-radius: 5px;
}

.emprunt-select {
    border: solid var(--secondary-color);
    background-color: var(--secondary-color);
    color: var(--background-color);
    border-radius: 5px;

}

/* -------------------------- */

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-card i {
    font-size: 3rem;
    color: var(--success-color);
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

/* Getting Started */
.getting-started {
    padding: 4rem 0;
    background: var(--background-color);
}

.getting-started h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.step {
    background: var(--white);
    padding: 2rem;
    border-radius: 0.75rem;
    text-align: center;
    box-shadow: var(--shadow);
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
}

/* Page Header */
.page-header {
    background: var(--white);
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
    font-size: 2.5rem;
    color: var(--text-color);
}

/* Content Grid */


.content {
    padding: 2rem 0;
}

/* PROFILE */

.profile-welcome{
    text-align: center;
}

.profile-container {
    display: flex;
    align-items: left;
    flex-direction: column;
    background: var(--white);
    padding: 2%;
    margin: 1% 15% 1% 15%;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
}

.profile-container h2{
    text-align: center;

}
.profile-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
    background: var(--white);
    padding: 2%;
    margin: 2% ;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
}

.profile-container-link {
    display: flex;
    justify-content: space-around;
    margin: 2% 0;
    align-items: center;
    
}
.borrow-rule {
    color:rgb(232, 25, 25); 
    font-style: italic;
}

/* BORROW AND RETURN*/
.borrow-confirmation-content {
    display: flex;
    align-items: center;
    flex-direction: column;
    background: var(--white);
    padding: 2%;
    margin: 1% 15% 1% 15%;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
}
 .confirmation-btn-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2% 0;
}

.message-borrows-limit {
    font-size: 12px;
}

.btn-current-borrow{
    padding: 7% 15%;
    margin: 10%;
    border: none;
    border-radius: 0.5rem;
    background: var(--primary-color);
    color: white;
    font-weight: 500;
    cursor: pointer;
    font-size: 18px;
    
}

.btn-current-borrow > a {
    text-decoration: none;
     color: white;
}
.btn-borrow{
    padding:2% 3%;
    margin: 2%;
    border: none;
    border-radius: 0.5rem;
    background:  var(--secondary-color);
    cursor: pointer;
    font-size: 18px;
    
}

.btn-borrow > a {
    text-decoration: none;
     color: white;
     font-weight: bold;
}


.btn-delete {
    padding: 7% 20%;
    border: none;
    margin: 10%;
    border-radius: 0.5rem;
    background-color: rgb(255, 0, 0);
    color: white;
    font-weight: 500;
    cursor: pointer;
    font-size: 18px;

}
.btn-delete > a{
    color: white;
}

.return-container {
    display:flex;
    align-items: center;
    justify-content: space-between;

}
.return-container > div {
    margin: 2%;
}

.btn-return {
    padding: 1%;
    width: 15%;
    border: none;
    border-radius: 0.5rem;
    background-color: #3b82f6;
    font-weight: 500;
    cursor: pointer;
    font-size: 18px;
    text-align: center;
}
.btn-return > a{
    color: white;
    text-decoration: none;
   
}

/* LATE BORROWS */

.late-borrows-content {
    display: flex;
    align-items: start;
    flex-direction: column;
    background: var(--white);
    padding: 2%;
    margin: 1% ;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
}
.late-days{
    color: rgb(232, 25, 25);

}
 /* DASHBOARD */
 .total-container {
    display: flex;
    align-items: center;
   justify-content: center;
    flex-direction: row;
    background: var(--white);
    padding: 2%;
    margin: 1% ;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
}
 .total-details {
    display: flex;
    align-items: center;
    flex-direction: column;
    background: var(--white);
    padding: 2%;
    margin: 1% ;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    font-weight: bold;
}
.total-number {
    font-size: 50px;
    color:#3b82f6 ;
}



/* Content */

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.content-main {
    background: var(--white);
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-box {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
}

.info-box h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Formulaires */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Authentification */
.auth-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-card {
    background: var(--white);
    padding: 3rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Messages Flash */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
}

.alert-success {
    background-color: #d1fae5;
    border-color: var(--success-color);
    color: #065f46;
}

.alert-error {
    background-color: #fee2e2;
    border-color: var(--error-color);
    color: #991b1b;
}

.alert-warning {
    background-color: #fef3c7;
    border-color: var(--warning-color);
    color: #92400e;
}

/* Page d'erreur */
.error-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background-color);
}

.error-content {
    text-align: center;
    max-width: 500px;
}

.error-icon {
    font-size: 4rem;
    color: var(--error-color);
    margin-bottom: 1rem;
}

.error-content h1 {
    font-size: 6rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.error-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.error-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--secondary-color);
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Footer */
.footer {
    background: var(--text-color);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
    margin-top: auto;
}

.footer-content p {
    margin-bottom: 0.5rem;
}

/* Code blocks */
pre {
    background: #f8f8f8;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1rem 0;
}

code {
    background: #f1f5f9;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .auth-card {
        padding: 2rem;
    }
    
    .features h2,
    .getting-started h2 {
        font-size: 2rem;
    }
    
    .steps {
        grid-template-columns: 1fr;
    }
    
    .error-actions {
        flex-direction: column;
    }
    
}

.cover-detail {
    max-width: 300px;
    max-height: 400px;
    /* width: auto;
    height: auto; */
}
.cover-detail img {
    width: 85%;
    height: 85%;
    object-fit: contain;
}

.cover-card {
    width: 150px;
    height: 200px;
}
.cover-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

