.main-header {
    background-color: #4a90e2;
    color: white;
    padding: 1.5rem 1rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
}

.main-header h1 {
    font-size: 2rem;
    margin: 0;
}

.navbar {
    margin-top: 1rem;
}

.navbar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.navbar ul li {
    display: inline;
}

.navbar ul li a {
    text-decoration: none;
    color: white;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.navbar ul li a:hover {
    background-color: #367bb4;
}

body {
    background: #f2f2f2;
    font-family: 'Open Sans', sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    line-height: 1.6;
}

.amandine-bg {
    background-image: url('/static/book/images/fleurs.jpg'); /* Chemin de ton image */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

header {
    background-color: #4a90e2;
    color: white;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2rem;
    margin: 0;
}

header p {
    font-size: 1rem;
    margin: 0.5rem 0 0;
}

/* Conteneur du champ de recherche */
.search-container {
    display: flex;
    flex-direction: column; /* Met le bouton sous le champ */
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 400px;
    margin: 20px auto;
    padding: 10px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Champ de recherche */
.search-container input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    border: 2px solid #4a90e2;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s ease-in-out;
}

/* Espacer le bouton du champ */
.search-container button {
    margin-top: 10px; /* Ajoute un espace sous l’input */
    width: 100%;
    padding: 12px 15px;
    background: #4a90e2;
    color: white;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease-in-out;
}

/* Effet au survol */
.search-container button:hover {
    background: #367bb4;
}

/* Effet focus sur l'input */
.search-container input[type="text"]:focus {
    border-color: #367bb4;
    box-shadow: 0 0 6px rgba(74, 144, 226, 0.5);
}


.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 30px auto;
    padding: 20px;
    width: 100%;
    max-width: 400px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Styles des labels */
.login-container label {
    font-weight: bold;
    margin: 10px 0 5px;
    display: block;
}

/* Champs de saisie */
.login-container input {
    width: 100%;
    padding: 12px;
    border: 2px solid #4a90e2;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease-in-out;
    outline: none;
}

/* Effet de focus */
.login-container input:focus {
    border-color: #367bb4;
    box-shadow: 0 0 6px rgba(74, 144, 226, 0.5);
}

/* Bouton de connexion */
.login-container button {
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    border: none;
    background: #4a90e2;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.3s ease-in-out;
}

/* Effet hover sur le bouton */
.login-container button:hover {
    background: #367bb4;
}

/* Conteneur principal */
.books-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 800px;
    margin: 30px auto;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Titre principal */
.books-container h1 {
    text-align: center;
    color: #4a90e2;
    font-size: 24px;
    margin-bottom: 20px;
}

/* Liste des livres */
.books-list {
    list-style: none;
    padding: 0;
    width: 100%;
}

/* Style de chaque livre */
.book-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #f4f4f9;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
}

/* Image du livre */
.book-item img {
    max-width: 120px;
    border-radius: 5px;
    margin-bottom: 10px;
}

/* Titre et auteur */
.book-item strong {
    font-size: 18px;
    color: #333;
}

.book-item em {
    color: #666;
    font-style: italic;
}

/* Bouton de suppression */
.btn-danger {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-danger:hover {
    background: #c0392b;
}

/* Formulaire de commentaire */
.comment-form {
    margin-top: 10px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Champ de texte pour le commentaire */
.comment-form textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #4a90e2;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease-in-out;
    outline: none;
    resize: vertical;
}

/* Effet focus sur le champ commentaire */
.comment-form textarea:focus {
    border-color: #367bb4;
    box-shadow: 0 0 6px rgba(74, 144, 226, 0.5);
}

/* Bouton de sauvegarde du commentaire */
.btn-commentaire {
    background: #4a90e2;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 10px;
}

.btn-commentaire:hover {
    background: #367bb4;
}

* Conteneur principal des livres */
.book-list-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 900px;
    margin: 30px auto;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Titre principal */
.book-list-container h2 {
    text-align: center;
    color: #4a90e2;
    font-size: 24px;
    margin-bottom: 20px;
}

/* Liste des livres */
.book-list {
    list-style: none;
    padding: 0;
    width: 100%;
}

/* Style de chaque livre */
.book-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #f4f4f9;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
}

/* Image du livre */
.book-item img {
    max-width: 120px;
    border-radius: 5px;
    margin-bottom: 10px;
}

/* Titre et auteur */
.book-item strong {
    font-size: 18px;
    color: #333;
}

.book-item em {
    color: #666;
    font-style: italic;
}

/* Bouton "Ajouter à ma liste" */
.btn-add {
    background: #4a90e2;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 10px;
}

.btn-add:hover {
    background: #367bb4;
}


.update-image-container {
    width: 80%;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f4f4f4;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Titre de la page */
.update-image-container h1 {
    font-size: 24px;
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

/* Formulaire */
.update-image-container form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.update-image-container label {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.update-image-container textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    min-height: 150px;
}

.update-image-container button {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.update-image-container button:hover {
    background-color: #0056b3;
}

@media (max-width: 768px) {
    body {
        font-size: 14px; /* Réduire un peu la taille du texte */
    }

    .navbar ul {
        display: flex;
        flex-direction: column;
        text-align: center;
    }

    .navbar ul li {
        margin: 10px 0;
    }

    /* Adapter les boutons */
    button {
        font-size: 16px;
        width: 100%;
        padding: 10px;
    }

    /* Champ de recherche plus large */
    .search-container {
        width: 100%;
    }
}

.search_lecteur {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 800px;
    margin: 30px auto;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Conteneur principal du header */
.main-header {
    position: relative;
    background: #4a90e2;
    padding: 15px;
    text-align: center;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Titre centré */
.main-header h1 {
    margin: 0;
    font-size: 24px;
}

/* Bouton Burger */
.burger-menu {
    display: none; /* Masqué sur desktop */
    cursor: pointer;
    position: absolute;
    top: 15px;
    right: 20px;
    width: 35px;
    height: 30px;
    z-index: 100;
}

.burger-menu span {
    display: block;
    width: 100%;
    height: 4px;
    margin: 5px 0;
    background: white;
    border-radius: 3px;
    transition: 0.3s ease-in-out;
}

/* Navigation */
.navbar {
    display: flex;
    justify-content: center;
    width: 100%;
}

.navbar ul {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 20px;
}

.navbar ul li {
    display: inline;
}

.navbar ul li a {
    text-decoration: none;
    color: white;
    font-size: 16px;
    font-weight: bold;
}

/* Mode mobile : cacher le menu */
#menu-toggle {
    display: none;
}

@media (max-width: 768px) {
    .burger-menu {
        display: block;
    }

    /* Réorganiser le header pour éviter que le menu recouvre le titre */
    .main-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 10px 20px;
    }

    .main-header h1 {
        font-size: 20px;
        flex: 1;
        text-align: center;
    }

    .navbar {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background: #4a90e2;
        flex-direction: column;
        text-align: center;
        padding: 10px 0;
    }

    .navbar ul {
        flex-direction: column;
        gap: 10px;
    }

    .navbar ul li {
        display: block;
        padding: 10px 0;
    }

    /* Afficher le menu quand le bouton est coché */
    #menu-toggle:checked + .burger-menu + .navbar {
        display: flex;
    }

    /* Effet croix sur le bouton burger */
    #menu-toggle:checked + .burger-menu span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    #menu-toggle:checked + .burger-menu span:nth-child(2) {
        opacity: 0;
    }

    #menu-toggle:checked + .burger-menu span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}

