            /* Mobile First M (375px) */


/* General Settings */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box
}
html, body{
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Empêche le défilement horizontal */
}
body {
    background-image: url("../medias/cinema.jpg");
    background-attachment: fixed;
    background-size: cover; /* Améliore la couverture de l'image de fond */
    background-position: center; /* Centre l'image de fond */
    margin: 0;
    font-family: Arial, sans-serif;
    padding-top: 70px; /* Ajoute un espace sous le header fixe */
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
main {
    flex: 1; /* Le contenu principal prend l'espace restant disponible */
    width: 100%;
    margin-bottom: 20px;
    padding: 15px 15px 0; /* Ajoute un padding pour éviter que le contenu touche les bords */
}
h1{
    display: flex;
    justify-content: center;
    text-align: center;
    color: white;
    font-size: 28px; /* Taille réduite pour mobile */
    margin: 30px 0 40px 0; /* Réduit la marge supérieure car nous avons déjà padding-top sur body */
    padding: 0 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7); /* Ajoute une ombre pour améliorer la lisibilité */
}
h2{
    display: flex;
    justify-content: center;
    text-align: center;
    color: white;
    font-size: 22px; /* Taille réduite pour mobile */
    margin: 25px 0;
    padding: 0 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7); /* Ajoute une ombre pour améliorer la lisibilité */
}
img{
    width: 100%;
    height: auto; /* Maintient le ratio d'aspect */
    max-width: 100%; /* Assure que l'image ne dépasse pas son conteneur */
}





/* Layout */

    /* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(25, 25, 25, 0.95); /* Fond légèrement transparent */
    padding: 12px 20px;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4); /* Ombre subtile */
    transition: all 0.3s ease; /* Animation fluide pour les changements */
    height: 70px; /* Hauteur fixe pour le header */
}

/* Logo */
.logo {
    order: 1;
    flex-shrink: 0;
}

.logo img {
    width: 130px; /* Taille ajustée */
    transition: transform 0.3s; /* Animation au survol */
    padding: 10px; /* Réduit le padding du logo */
    display: block; /* Assure que le logo est toujours visible */
}

.logo img:hover {
    transform: scale(1.05); /* Légère augmentation de taille au survol */
}

/* Barre de recherche */
.search-container {
    position: relative;
    order: 2; /* Entre le logo et le menu burger */
    flex-grow: 1; /* Prend l'espace disponible */
    width: auto;
    display: flex; /* Affiche la barre en ligne */
    padding: 0 10px;
    background-color: transparent;
    z-index: 9;
    box-shadow: none;
    transform: none;
    opacity: 1;
    pointer-events: auto;
}

/* Bouton de recherche dans le header */
.search-toggle {
    display: none; /* Masque le bouton car la barre est toujours visible */
}

/* Style de la barre de recherche */
#search {
    width: 100%;
    padding: 8px 12px; /* Réduit le padding pour économiser de l'espace */
    border-radius: 20px;
    border: 1px solid #444;
    background-color: #333;
    color: white;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
}

#search:focus {
    background-color: #444;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
    border-color: #777;
}

#search::placeholder {
    color: #aaa;
}

#suggestion {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    color: white;
    background-color: #333;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
    z-index: 15;
    max-height: 300px;
    overflow-y: auto;
}

/* Style des éléments de suggestion */
#suggestion div {
    padding: 10px 15px;
    border-bottom: 1px solid #444;
    cursor: pointer;
    transition: background-color 0.2s;
}

#suggestion div:last-child {
    border-bottom: none;
    border-radius: 0 0 10px 10px;
}

#suggestion div:hover {
    background-color: #444;
}

/* Burger menu */
.burger-menu {
    order: 3;
    display: block;
    cursor: pointer;
    padding: 8px;
    margin-left: 5px;
    border-radius: 5px;
    transition: background-color 0.3s;
    flex-shrink: 0;
}

.burger-menu:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.burger-line {
    background-color: white;
    height: 3px;
    width: 28px;
    margin: 5px 0;
    border-radius: 3px;
    transition: all 0.3s;
}

/* Animation du burger menu quand actif */
.burger-menu.active .burger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger-menu.active .burger-line:nth-child(2) {
    opacity: 0;
}

.burger-menu.active .burger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Navbar (menu) */
.navbar {
    display: none; /* Cache le menu par défaut */
    position: absolute;
    top: 70px; /* Pour ne pas chevaucher le header */
    right: 0;
    background-color: rgba(25, 25, 25, 0.95);
    padding: 5px;
    border-radius: 0 0 0 10px;
    box-shadow: -2px 2px 10px rgba(0, 0, 0, 0.3);
    min-width: 200px;
    transition: all 0.3s;
}

.navbar ul {
    list-style: none;
    padding: 10px;
    margin: 0;
    text-align: center;
}

.navbar li {
    margin: 15px 0;
    transition: transform 0.2s;
}

.navbar li:hover {
    transform: translateX(5px);
}

.navbar a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    display: block;
    padding: 5px 10px;
    border-radius: 5px;
    transition: all 0.3s;
}

.navbar a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.co {
    background-color: #2e7d32; /* Vert plus moderne */
    color: white;
    font-size: 16px;
    padding: 1px 15px; /* Réduit encore plus le padding vertical */
    border-radius: 20px;
    border: none;
    transition: all 0.3s;
    margin-top: 5px;
    cursor: pointer;
    white-space: nowrap; /* Empêche le texte de passer à la ligne */
}

.co:hover {
    background-color: #388e3c;
    transform: scale(1.05);
}

.co a {
    color: white;
    text-decoration: none;
    white-space: nowrap; /* Empêche le texte de passer à la ligne */
    display: inline-block; /* Assure que le texte reste sur une ligne */
}

.co a:hover {
    background-color: transparent;
}

.deco {
    background-color: #d32f2f; /* Rouge plus moderne */
    color: white;
    font-size: 16px;
    padding: 6px 15px; /* Réduit le padding vertical */
    border-radius: 20px;
    border: none;
    transition: all 0.3s;
    margin-top: 5px;
    cursor: pointer;
    white-space: nowrap; /* Empêche le texte de passer à la ligne */
}

.deco:hover {
    background-color: #e53935;
    transform: scale(1.05);
}

/* Display menu when active */
.navbar.active {
    display: block; /* Affiche le menu */
    animation: fadeIn 0.3s; /* Animation d'apparition */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Desktop and tablet view (min-width: 768px) */
@media (min-width: 768px) and (max-width: 991px) {
    /* Styles spécifiques pour les tablettes uniquement */
    body {
        padding-top: 80px;
    }
    
    h1 {
        margin-top: 20px;
    }
    
    header {
        padding: 15px 20px;
        height: 80px;
    }
    
    .logo img {
        padding: 5px;
        width: 140px;
        display: block; /* Assure que le logo est visible */
    }
    
    /* La barre de recherche reste visible sur tablette */
    .search-container {
        order: 2;
        flex-grow: 1;
        padding: 0 15px;
    }
    
    #search {
        font-size: 15px;
        padding: 8px 15px;
    }
    
    /* Conserve le burger-menu pour les tablettes */
    .burger-menu {
        display: block;
    }
    
    /* Le menu est masqué par défaut sur tablette aussi */
    .navbar {
        display: none;
        position: absolute;
        top: 80px; /* Ajusté à la hauteur du header sur tablette */
        right: 0;
        background-color: rgba(25, 25, 25, 0.95);
        padding: 5px;
        border-radius: 0 0 0 10px;
        box-shadow: -2px 2px 10px rgba(0, 0, 0, 0.3);
        min-width: 200px;
        transition: all 0.3s;
    }
    
    .navbar.active {
        display: block;
    }
    
    .navbar ul {
        flex-direction: column;
        padding: 10px;
        margin: 0;
        text-align: center;
    }
    
    .navbar li {
        margin: 15px 0;
    }
    
    .navbar li:hover {
        transform: translateX(5px);
    }
    
    .navbar a {
        font-size: 15px;
        padding: 8px 12px;
    }
    
    .co, .deco {
        font-size: 15px;
        padding: 2px 15px;
        white-space: nowrap;
    }
}

/* Desktop (992px et plus) */
@media (min-width: 992px) {
    body {
        padding-top: 80px;
    }
    
    h1 {
        margin-top: 15px;
    }
    
    header {
        padding: 15px 30px;
        height: 80px;
    }
    
    .logo img {
        padding: 5px;
        width: 150px;
        display: block;
    }
    
    /* Cache le burger-menu sur les écrans desktop */
    .burger-menu {
        display: none;
    }
    
    /* La barre de recherche en mode desktop */
    .search-container {
        order: 2;
        flex-grow: 1;
        padding: 0 20px;
    }
    
    #search {
        font-size: 16px;
        padding: 10px 15px;
    }
    
    /* Le menu est visible en mode horizontal sur desktop */
    .navbar {
        order: 3;
        flex-shrink: 0;
        display: flex;
        justify-content: flex-end;
        position: static;
        background-color: transparent;
        box-shadow: none;
        min-width: auto;
        padding: 0;
    }
    
    .navbar ul {
        display: flex;
        flex-direction: row;
        align-items: center;
        padding: 0;
    }
    
    .navbar li {
        margin: 0 15px;
    }
    
    .navbar li:hover {
        transform: none;
    }
    
    .navbar a {
        font-size: 16px;
        padding: 8px 12px;
    }
    
    .co {
        font-size: 15px;
        padding: 2px 15px;
        white-space: nowrap;
    }
    
    .deco {
        font-size: 15px;
        padding: 10px 15px;
        white-space: nowrap;
    }
}

    /* Footer */
footer {
    width: 100%;
    top: 0;
    bottom: 0;
    background-color: #333;
    padding: 20px 0; /* Ajout de padding vertical */
    margin: 0; /* Supprimer les marges */
    text-align: center; /* Centrer le contenu horizontalement */
    color: white; /* Assurez que le texte est lisible */
    box-sizing: border-box; /* Inclut les paddings dans la largeur totale */
}
    
footer p {
    margin: 0; /* Supprime les marges du paragraphe */
    font-size: 14px; /* Optionnel : ajustez la taille du texte */
}

    /* Anchor */
    .anchor {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background-color: white;
        color: black;
        border-radius: 50%;
        width: 50px;
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        text-decoration: none;
        font-size: 1.5rem;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
        transition: background-color 0.3s;
        border-color: black;
        border-style: solid;
        opacity: 0;
        transition: opacity 0.5s ease-in-out;
        pointer-events: none;
        cursor: pointer;
    
    }





/* Home Page + Movie Page + Serie Page */

/* Pour les films et séries sur la page d'accueil */
#movies, #tvs, #tendMovies, #topMovies, #tendTvs, #topTvs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    padding: 10px 0;
}

.movie, .tv {
    background-color: white;
    border-radius: 15px;
    width: 100%; /* Pleine largeur sur mobile */
    max-width: 280px; /* Réduit la largeur maximale */
    margin: 0 auto 20px auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.movie:hover, .tv:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

.movie h2, .tv h2 {
    color: black;
    margin: 10px 0;
    font-size: 18px;
    text-align: center;
    min-height: 50px; /* Hauteur minimale pour uniformiser les cartes */
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: none; /* Supprime l'ombre du texte pour les titres à l'intérieur des cartes */
}

.movie img, .tv img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    border: 1px solid #ddd;
    margin-bottom: 10px;
    object-fit: cover; /* S'assure que l'image couvre bien l'espace */
}

.movie p, .tv p {
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.4;
}

.movie a, .tv a {
    text-decoration: none;
    width: 100%;
    margin-top: 10px;
}

.movie button, .tv button {
    background-color: #e50914; /* Rouge style Netflix */
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
    transition: background-color 0.3s;
}

.movie button:hover, .tv button:hover {
    background-color: #b20710;
}

/* Tablettes (600px et plus) */
@media (min-width: 600px) {
    h1 {
        font-size: 32px;
        margin-top: 30px;
    }
    
    h2 {
        font-size: 24px;
    }
    
    main {
        padding: 0 20px;
    }
    
    #movies, #tvs, #tendMovies, #topMovies, #tendTvs, #topTvs {
        gap: 20px; /* Augmente l'espacement entre les cartes sur tablette */
        padding: 10px;
        justify-content: center;
    }
    
    .movie, .tv {
        width: calc(50% - 25px);
        max-width: 260px; /* Réduit la taille maximale sur tablette */
        margin: 12px;
        padding: 12px;
    }
    
    .movie h2, .tv h2 {
        font-size: 18px;
        min-height: 50px;
    }
    
    .movie p, .tv p {
        font-size: 14px;
    }
    
    .movie button, .tv button {
        padding: 10px 15px;
    }
}

/* Écrans moyens (768px et plus) */
@media (min-width: 768px) {
    body {
        background-size: 150%;
    }
    
    h1 {
        margin-top: 25px;
    }
    
    #movies, #tvs, #tendMovies, #topMovies, #tendTvs, #topTvs {
        gap: 25px; /* Encore plus d'espace sur les écrans moyens */
    }
    
    .movie, .tv {
        width: calc(50% - 30px);
        max-width: 280px; /* Légèrement plus grande sur écrans moyens */
        margin: 15px;
    }
}

/* Grands écrans (992px et plus) */
@media (min-width: 992px) {
    h1 {
        font-size: 36px;
        margin-top: 15px;
    }
    
    main {
        padding: 0 50px;
        max-width: 1400px;
        margin: 0 auto;
    }
    
    .movie, .tv {
        width: calc(50% - 40px);
        max-width: 340px; /* Réduit la taille maximale sur grands écrans */
        margin: 20px;
    }
}

/* Très grands écrans (1200px et plus) */
@media (min-width: 1200px) {
    body {
        background-size: 120%;
        font-size: 18px;
    }
    
    main {
        max-width: 1300px;
    }
    
    #movies, #tvs, #tendMovies, #topMovies, #tendTvs, #topTvs {
        gap: 30px;
    }
    
    #credits li, #credits .director-container {
        width: 180px;
    }
    
    #credits li img, #credits .director-container img {
        width: 160px;
        height: 160px;
    }
    
    #similar li {
        width: 180px;
    }
    
    #similar li img {
        width: 160px;
        height: 240px;
    }
    
    /* Améliorer la mise en page pour les grands écrans */
    #details, #comments-section, #credits, #similar {
        padding: 30px;
        margin-bottom: 40px;
    }
    
    #details img.poster {
        max-width: 400px;
    }
    
    #credits ul, #similar ul {
        justify-content: center;
    }
}





/* Error404 Page */
/* Style pour centrer le contenu */
.error-section {
    display: flex;
    flex-direction: column; /* Aligner le texte et l'image verticalement */
    justify-content: center; /* Centrage vertical */
    align-items: center; /* Centrage horizontal */
    text-align: center; /* Centrer le texte */
    margin: 0;
    padding: 20px;
    min-height: 70vh; /* Assure une hauteur minimale pour centrer le contenu */
}

/* Ajustement du texte */
.p404 {
    font-size: 1.5em; /* Taille de texte plus grande */
    color: white; /* Couleur du texte */
    margin: 15px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8); /* Ombre pour améliorer la lisibilité */
    font-weight: bold;
}

/* Ajustement de l'image */
.error404 {
    max-width: 90%; /* L'image s'adapte à l'écran */
    height: auto; /* Conserve les proportions */
    margin-top: 20px;
    border-radius: 10px; /* Coins arrondis pour l'image */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5); /* Ombre portée pour l'image */
}

/* Tablettes (600px et plus) */
@media (min-width: 600px) {
    .p404 {
        font-size: 1.8em;
    }
    
    .error404 {
        max-width: 80%;
    }
}

/* Écrans moyens (768px et plus) */
@media (min-width: 768px) {
    .error-section {
        padding: 30px;
    }
    
    .p404 {
        font-size: 2em;
        margin: 20px 0;
    }
    
    .error404 {
        max-width: 70%;
    }
}

/* Grands écrans (992px et plus) */
@media (min-width: 992px) {
    .error-section {
        padding: 40px;
    }
    
    .p404 {
        font-size: 2.2em;
    }
    
    .error404 {
        max-width: 60%;
        max-height: 70vh; /* Limite la hauteur sur grands écrans */
    }
}

/* Très grands écrans (1200px et plus) */
@media (min-width: 1200px) {
    .p404 {
        font-size: 2.5em;
    }
    
    .error404 {
        max-width: 50%;
    }
}





/* Detail */
#details {
    background-color: white;
    border-radius: 15px;
    width: 90%;
    max-width: 1000px;
    margin: 30px auto;
    padding: 20px 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

#details h2 {
    color: black;
    margin: 10px 0 20px;
    text-shadow: none;
    text-align: center;
    font-size: 24px;
    width: 100%;
}

#details img.poster {
    width: 100%;
    max-width: 280px;
    height: auto;
    border-radius: 10px;
    margin: 0 auto 25px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: block;
}

#details p {
    margin: 12px 0;
    line-height: 1.5;
    font-size: 15px;
    width: 100%;
}

#details .info-container {
    width: 100%;
    display: flex;
    flex-direction: column;
}

#favorite-button {
    background-color: #2ecc71;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin: 25px auto 15px;
    display: block;
    width: fit-content;
    min-width: 180px;
    text-align: center;
    transition: all 0.3s ease;
}

#favorite-button:hover {
    background-color: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Section crédits et similaires */
#credits, #similar {
    background-color: white;
    border-radius: 15px;
    width: 90%;
    max-width: 1000px;
    margin: 20px auto;
    padding: 20px 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

#credits h3, #similar h3 {
    color: #333;
    font-size: 20px;
    margin-bottom: 20px;
    text-align: center;
}

#credits h4 {
    color: #333;
    font-size: 18px;
    margin: 15px 0;
    text-align: center;
    width: 100%;
}

/* Style spécifique pour les acteurs */
#credits ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

#credits li, #credits .director-container {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 15px;
    width: 120px;
    margin: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-align: center;
}

#credits li:hover, #credits .director-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

#credits li img, #credits .director-container img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 15px;
    aspect-ratio: 1/1;
    object-fit: cover;
    display: block;
}

#credits li span, #credits .director-container span {
    color: #333;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 5px;
}

#credits li small, #credits .director-container small {
    color: #666;
    font-size: 12px;
}

/* Style pour la section des réalisateurs */
#credits .directors-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    width: 100%;
    margin-top: 20px;
}

#similar ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    list-style: none;
    padding: 0;
}

#similar li {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 15px;
    width: 120px;
    margin: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

#similar li:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

#similar li img {
    width: 100px;
    height: 150px;
    border-radius: 5px;
    margin-bottom: 10px;
}

#similar li a {
    color: #333;
    text-decoration: none;
    font-weight: bold;
    text-align: center;
}

/* Tablettes et plus grands écrans */
@media (min-width: 768px) {
    #details, #comments-section, #credits, #similar {
        padding: 25px 35px;
        margin: 30px auto;
    }
    
    #credits li, #credits .director-container {
        width: 140px;
    }
    
    #credits li img, #credits .director-container img {
        width: 120px;
        height: 120px;
    }
    
    #similar li {
        width: 140px;
    }
    
    #similar li img {
        width: 120px;
        height: 180px;
    }
}

/* Écrans moyens et plus grands */
@media (min-width: 992px) {
    #details, #comments-section, #credits, #similar {
        padding: 30px 40px;
        max-width: 600px;
    }
    
    #details img.poster {
        max-width: 200px;
    }
    
    #similar li {
        width: 160px;
    }
    
    #similar li img {
        width: 140px;
        height: 210px;
    }
    
    #credits li, #credits .director-container {
        width: 160px;
        padding: 15px 10px;
    }
    
    #credits li img, #credits .director-container img {
        width: 140px;
        height: 140px;
    }
}

/* Écrans larges */
@media (min-width: 1200px) {
    #details, #comments-section, #credits, #similar {
        max-width: 675px;
    }
    
    #details img.poster {
        max-width: 200px;
    }
    
    #credits li img, #credits .director-container img {
        width: 160px;
        height: 160px;
    }
}





/* Login Page */

/* Style pour les formulaires et messages d'erreur/succès */
/* Conteneur pour centrer les formulaires */
#form-wrapper {
    display: flex;
    justify-content: center; /* Centre horizontalement */
    align-items: flex-start; /* Aligné en haut plutôt qu'au centre */
    min-height: 80vh;       /* Hauteur minimale pour les petits écrans */
    padding: 30px 15px;     /* Padding sur les côtés pour les petits écrans */
    position: relative;     /* Garde une position locale */
    width: 100%;
    max-width: 100%;        /* Assure que le conteneur n'est pas coupé */
    margin: 0 auto;
}

/* Style partagé entre tous les formulaires */
#register-form, #login-form, #forgot-password-form {
    background-color: #fff;
    padding: 25px 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 360px;       /* Taille adaptée aux mobiles */
    box-sizing: border-box;
    transition: all 0.3s ease;
    margin: 0 auto;
}

/* Titres des formulaires */
#register-form h2, #login-form h2, #forgot-password-form h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
    font-size: 1.8rem;
    position: relative;
    padding-bottom: 10px;
}

#register-form h2:after, #login-form h2:after, #forgot-password-form h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: #4CAF50;
    border-radius: 2px;
}

/* Labels et champs */
#register-form label, #login-form label, #forgot-password-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 0.95rem;
}

#register-form input[type="text"],
#register-form input[type="email"],
#register-form input[type="password"],
#login-form input[type="email"],
#login-form input[type="password"],
#forgot-password-form input[type="email"],
#forgot-password-form input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 18px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
    box-sizing: border-box;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#register-form input:focus,
#login-form input:focus,
#forgot-password-form input:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
    outline: none;
    background-color: #fff;
}

/* Boutons */
#register-form input[type="submit"],
#login-form input[type="submit"],
#forgot-password-form input[type="submit"] {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s, transform 0.2s;
    margin-top: 10px;
}

#register-form input[type="submit"]:hover,
#login-form input[type="submit"]:hover,
#forgot-password-form input[type="submit"]:hover {
    background-color: #45a049;
    transform: translateY(-2px);
}

#register-form input[type="submit"]:active,
#login-form input[type="submit"]:active,
#forgot-password-form input[type="submit"]:active {
    transform: translateY(0);
}

/* Liens sous les formulaires */
#register-form p, #login-form p, #forgot-password-form p {
    text-align: center;
    margin-top: 20px;
    font-size: 15px;
    color: #666;
}

#register-form p a, #login-form p a, #forgot-password-form p a {
    color: #4CAF50;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

#register-form p a:hover, #login-form p a:hover, #forgot-password-form p a:hover {
    color: #367c39;
    text-decoration: underline;
}

/* Lien 'Mot de passe oublié' avec positionnement spécial */
#login-form .forgot-link {
    text-align: right;
    margin-top: -15px;
    margin-bottom: 15px;
}

/* Gestion de l'affichage des formulaires */
.form-container {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s;
}
    
.form-container.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Message de succès */
#success-message-wrapper {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    padding: 30px;
    max-width: 400px;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    position: relative;
    margin: 0 auto 30px;
    animation: fadeIn 0.5s ease; /* Animation d'apparition */
    border-left: 4px solid #4CAF50;
    display: block;
}

.success {
    color: #28a745;
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 20px;
    line-height: 1.4;
}

/* Style du lien Se connecter après inscription réussie */
.login-from-success {
    display: inline-block;
    background-color: #4CAF50;
    color: white;
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: bold;
    margin-top: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.login-from-success:hover {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Style pour les liens de compte (mobile et desktop) */
.account-link {
    text-align: center;
    margin-top: 20px;
    font-size: 15px;
    color: #666;
    line-height: 1.5;
}

/* En mobile, afficher le saut de ligne */
.mobile-break {
    display: inline;
}

/* En desktop, masquer le saut de ligne */
@media (min-width: 768px) {
    .mobile-break {
        display: none;
    }
}

/* Messages d'erreur */
.error-msg {
    color: #dc3545;
    font-weight: 500;
    font-size: 0.9rem;
    margin-top: -15px;
    margin-bottom: 15px;
    display: block;
}

/* Responsive design */
@media (min-width: 480px) {
    #register-form, #login-form, #forgot-password-form {
        padding: 30px 25px;
        max-width: 400px;
    }
}

@media (min-width: 768px) {
    #form-wrapper {
        padding: 40px 20px;
    }
    
    #register-form, #login-form, #forgot-password-form {
        padding: 35px 30px;
        max-width: 450px;
    }
    
    #register-form h2, #login-form h2, #forgot-password-form h2 {
        font-size: 2rem;
    }
}

@media (min-width: 992px) {
    #form-wrapper {
        padding: 50px 20px;
    }
    
    #register-form, #login-form, #forgot-password-form {
        padding: 40px 35px;
        max-width: 500px;
    }
}



/* Profile Page */
.profile-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 500px;
    margin: 30px auto;
    padding: 30px 25px;
    position: relative;
}

.profile-wrapper h2 {
    color: #333;
    font-size: 1.8rem;
    margin-bottom: 25px;
    text-align: center;
    width: 100%;
    position: relative;
    padding-bottom: 10px;
    text-shadow: none;
}

.profile-wrapper h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #4CAF50;
    border-radius: 2px;
}

/* Informations de profil */
.profile-info-section {
    width: 100%;
    margin: 20px 0;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.profile_infos {
    color: #555;
    font-size: 1rem;
    margin: 18px 0;
    padding: 0 10px 12px;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #eee;
}

.profile_infos:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

/* Mise en évidence des libellés en mode mobile */
.profile_infos::before {
    content: attr(data-label);
    font-weight: bold;
    color: #2196F3;
    margin-bottom: 12px;
    font-size: 1.05em;
    display: block;
}

/* En mode mobile, le texte original du libellé est masqué */
.profile_infos .label-text {
    display: none;
}

.profile_infos span {
    font-weight: 600;
    color: #333;
    font-size: 1.1em;
    line-height: 1.5;
    margin-top: 6px;
    word-break: break-word; /* Permettre la coupure des mots pour les emails longs */
    display: block; /* Assure que chaque span est sur sa propre ligne en mobile */
    width: 100%;
}

/* Style spécifique pour les emails longs */
#user_email {
    font-size: 1em;
    word-break: break-all; /* Force la coupure des mots pour les emails longs */
    hyphens: auto; /* Permet l'utilisation de traits d'union si nécessaire */
}

/* Responsive design pour les informations de profil */
@media (min-width: 768px) {
    .profile_infos {
        flex-direction: row;
        justify-content: space-between;
        padding: 0 10px 8px;
        align-items: center;
        margin: 12px 0;
    }
    
    .profile_infos::before {
        display: none; /* Masquer le libellé en mode tablette/desktop */
    }
    
    /* Réafficher le texte du libellé en mode desktop */
    .profile_infos .label-text {
        display: inline;
    }
    
    .profile_infos span {
        margin-top: 0;
        max-width: 60%; /* Limiter la largeur pour maintenir l'alignement */
        text-align: right;
        display: inline; /* Les spans sont en ligne en mode desktop */
        width: auto;
    }
}

/* Boutons d'action */
.profile-action-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    width: 100%;
    margin: 20px 0;
}

#edit_button, .profile_deco {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 160px;
    text-align: center;
}

#edit_button {
    background-color: #2196F3;
    color: white;
}

#edit_button:hover {
    background-color: #0d8bf2;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.3);
}

.profile_deco {
    background-color: #d32f2f;; /* Même vert que le bouton Se connecter */
    color: white;
    width: 100%;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    padding: 14px 20px;
    cursor: pointer;
}

.profile_deco:hover {
    background-color: #43a047; /* Même vert plus foncé que le bouton Se connecter au survol */
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

/* Bouton de suppression de compte */
#delete_account_button {
    background-color: rgb(180, 180, 11);
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
}

#delete_account_button:hover {
    background-color: #757575;
}

/* Message de confirmation pour la suppression */
#confirmation_message {
    display: none;
    background-color: #ffebee;
    border: 1px solid #ffcdd2;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    width: 100%;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.msg-delete-account {
    color: #d32f2f;
    font-size: 1rem;
    margin-bottom: 15px;
    font-weight: 600;
}

#confirm_delete, #cancel_delete {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    margin: 0 5px;
    transition: all 0.2s ease;
}

#confirm_delete {
    background-color: #4CAF50;
    color: white;
}

#confirm_delete:hover {
    background-color: #43a047;
}

#cancel_delete {
    background-color: #f44336;
    color: white;
}

#cancel_delete:hover {
    background-color: #e53935;
}

#cancel_message {
    display: none;
    color: #4CAF50;
    background-color: #e8f5e9;
    border: 1px solid #c8e6c9;
    padding: 10px;
    border-radius: 6px;
    font-size: 0.9rem;
    margin: 10px 0;
    text-align: center;
    width: 100%;
}

/* Formulaire de mise à jour */
#update_form {
    display: none;
    background-color: #f5f5f5;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    width: 100%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.3s ease;
}

#update_form label {
    color: #333;
    font-size: 0.95rem;
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

#update_form select, #update_form input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    background-color: #fff;
    margin-bottom: 15px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#update_form select:focus, #update_form input:focus {
    border-color: #2196F3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
    outline: none;
}

.profile_update {
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.profile_update:hover {
    background-color: #43a047;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

#password_fields {
    display: none;
    margin-top: 5px;
}

/* Messages de succès et d'erreur */
.message, .error {
    padding: 12px 15px;
    border-radius: 6px;
    font-size: 0.9rem;
    margin: 15px 0;
    width: 100%;
    text-align: center;
}

.message {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
    display: none;
}

.error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
    display: none;
}

/* Responsive design */
@media (min-width: 480px) {
    .profile-wrapper {
        padding: 35px 30px;
    }
    
    .profile-wrapper h2 {
        font-size: 2rem;
    }
    
    .profile_infos {
        font-size: 1.1rem;
    }
}

@media (min-width: 768px) {
    .profile-wrapper {
        max-width: 600px;
        padding: 40px 35px;
    }
    
    .profile-action-buttons {
        justify-content: space-around;
    }
    
    #edit_button, .profile_deco {
        min-width: 180px;
        font-size: 1rem;
    }
    
    .profile_infos {
        font-size: 1.2rem;
        padding: 0 15px;
    }
}

@media (min-width: 992px) {
    .profile-wrapper {
        max-width: 700px;
    }
    
    .profile-info-section {
        padding: 20px;
    }
}



/* Reset_password */
.reset_wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 30px 15px;
    margin: 20px 0;
}

#reset-password-form {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    padding: 25px 20px;
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#reset-password-form h2 {
    color: #333;
    font-size: 1.8rem;
    margin-bottom: 15px;
    text-align: center;
    text-shadow: none;
    position: relative;
    padding-bottom: 10px;
}

#reset-password-form h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: #4CAF50;
    border-radius: 2px;
}

#reset-password-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 0.95rem;
}

#reset-password-form input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#reset-password-form input[type="password"]:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
    outline: none;
    background-color: #fff;
}

#reset-password-form input[type="submit"] {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s, transform 0.2s;
    margin-top: 10px;
}

#reset-password-form input[type="submit"]:hover {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

#reset-password-form input[type="submit"]:active {
    transform: translateY(0);
}

.reset_error {
    width: 100%;
    max-width: 400px;
    margin: 15px auto;
    text-align: center;
}

.msgError {
    color: #e53935;
    background-color: #ffebee;
    border: 1px solid #ffcdd2;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 14px;
    margin: 15px 0;
    display: block;
}

.message_confirm {
    color: #2e7d32;
    background-color: #e8f5e9;
    border: 1px solid #c8e6c9;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 14px;
    margin: 15px 0;
    display: block;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

/* Responsive design */
@media (min-width: 480px) {
    #reset-password-form {
        padding: 30px 25px;
    }
}

@media (min-width: 768px) {
    .reset_wrapper {
        padding: 40px 20px;
    }
    
    #reset-password-form {
        padding: 35px 30px;
        max-width: 450px;
    }
    
    #reset-password-form h2 {
        font-size: 2rem;
    }
    
    .message_confirm,
    .reset_error {
        max-width: 450px;
    }
}

@media (min-width: 992px) {
    .reset_wrapper {
        padding: 50px 20px;
    }
    
    #reset-password-form {
        padding: 40px 35px;
        max-width: 500px;
    }
    
    .message_confirm,
    .reset_error {
        max-width: 500px;
        font-size: 16px;
    }
}



/* Favorite pages */

/* Message d'absence de favoris */
.no_favorite{
    text-align: center;
    font-size: 16px;
    color: #666;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 30px auto;
}

/* Liste des favoris */
#favoritesList {
    list-style: none;
    padding: 0;
    margin: 20px auto;
    width: 95%;
    max-width: 1200px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

/* Élément de la liste */
.favorite-item {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    width: 100%;
    max-width: 320px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.favorite-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* Contenu du favori */
.favorite-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex-grow: 1;
    justify-content: space-between;
}

/* Titre du favori */
.favorite-title {
    font-size: 18px;
    color: #333;
    margin: 10px 0;
    font-weight: bold;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Image du favori */
.favorite-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Boutons d'action */
.favorite-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-top: 15px;
}

/* Lien de détail */
.view-detail {
    font-size: 14px;
    color: white;
    background-color: #2196F3;
    border-radius: 8px;
    text-decoration: none;
    padding: 10px 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    width: 100%;
    box-sizing: border-box;
}

.view-detail:hover {
    background-color: #0d8bf2;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.3);
    text-decoration: none;
}

/* Bouton de suppression */
.remove-favorite-btn {
    margin: 0;
    padding: 10px 15px;
    background-color: #f5f5f5;
    color: #e53935;
    border: 1px solid #e53935;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
}

.remove-favorite-btn:hover {
    background-color: #ffebee;
    transform: translateY(-2px);
}

/* Message de confirmation pour suppression de commentaire */
.confirmation-message, [id^="confirmation-"] {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    padding: 15px;
    margin: 10px auto;
    border-radius: 8px;
    text-align: center;
    animation: fadeIn 0.3s ease;
    max-width: 300px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    display: inline-block; /* Change pour mieux s'adapter aux grands écrans */
}

/* Message de confirmation spécifique pour les réponses */
.reply .confirmation-message, .reply [id^="confirmation-reply-"] {
    max-width: 250px;
    margin: 10px auto;
    position: relative;
    left: 0;
    transform: none;
    clear: both;
    display: block;
}

.confirmation-message p, [id^="confirmation-"] p {
    margin-bottom: 15px;
    font-size: 15px;
    color: #555;
    font-weight: 500;
}

.confirmation-message button, [id^="confirmation-"] button {
    margin: 0 5px;
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.confirm-btn {
    background-color: #4CAF50;
    color: white;
}

.confirm-btn:hover {
    background-color: #43a047;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

.cancel-btn {
    background-color: #f44336;
    color: white;
}

.cancel-btn:hover {
    background-color: #e53935;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(244, 67, 54, 0.3);
}

@media (min-width: 768px) {
    .confirmation-message, [id^="confirmation-"] {
        max-width: 320px;
    }
    
    .reply .confirmation-message, .reply [id^="confirmation-reply-"] {
        max-width: 280px;
        margin: 10px auto;
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (min-width: 992px) {
    .confirmation-message, [id^="confirmation-"] {
        max-width: 350px;
        grid-column: 1 / -1; /* Étend sur toutes les colonnes de la grille */
        justify-self: start; /* Aligne à gauche dans la cellule de la grille */
        margin-top: 5px;
        margin-left: 0;
    }

    /* Pour le format grille des commentaires */
    .comment [id^="confirmation-"] {
        grid-area: confirmation; /* Nouvelle zone dans la grille */
    }
    
    /* Modification de la grille pour inclure la zone de confirmation */
    .comment {
        grid-template-areas: 
            "author date"
            "content content"
            "actions actions"
            "confirmation confirmation"
            "replies replies";
    }

    .reply .confirmation-message, .reply [id^="confirmation-reply-"] {
        max-width: 300px;
        display: block;
        margin: 12px auto;
        text-align: center;
        left: 50%;
        transform: translateX(-50%);
        float: none;
        clear: both;
    }
}



                            /* Medias querries */
                               /* If needed */

/* Section commentaires */
#comments-section {
    background-color: white;
    border-radius: 15px;
    width: 90%;
    max-width: 1000px;
    margin: 20px auto;
    padding: 20px 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#comments-section h3 {
    color: #333;
    font-size: 22px;
    margin-bottom: 25px;
    text-align: center;
    position: relative;
    padding-bottom: 12px;
    font-weight: 600;
}

#comments-section h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #4CAF50;
    border-radius: 2px;
}

#comments-list {
    margin-bottom: 30px;
}

.comment {
    background-color: #f9f9f9;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 20px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    border-left: 4px solid #2196F3;
}

.comment:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.comment strong {
    color: #2196F3;
    font-size: 17px;
    display: block;
    margin-bottom: 10px;
}

.comment p {
    color: #444;
    font-size: 16px;
    line-height: 1.6;
    margin: 12px 0;
}

.comment small {
    color: #888;
    font-size: 13px;
    display: block;
    margin-top: 10px;
    font-style: italic;
}

.delete-comment-btn {
    background-color: transparent;
    color: #e53935;
    border: 1px solid #e53935;
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 12px;
    font-weight: 500;
}

.delete-comment-btn:hover {
    background-color: #ffebee;
    color: #c62828;
    transform: translateY(-2px);
}

/* Styles pour les réponses aux commentaires */
.replies-section {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed #ddd;
}

.replies-count {
    font-size: 14px;
    color: #555;
    margin-bottom: 10px;
    font-weight: 500;
}

.replies-list {
    margin-left: 20px;
    padding-left: 15px;
    border-left: 2px solid #e3f2fd;
}

.reply {
    background-color: #f5f5f5;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    border-left: 3px solid #64b5f6;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.reply:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.reply strong {
    color: #1976D2;
    font-size: 15px;
    margin-bottom: 8px;
}

.reply p {
    font-size: 15px;
    margin: 8px 0;
}

.reply small {
    font-size: 12px;
    margin-top: 6px;
}

.delete-reply-btn {
    background-color: transparent;
    color: #e53935;
    border: 1px solid #e53935;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
    font-weight: 500;
    display: inline-block;
}

.delete-reply-btn:hover {
    background-color: #ffebee;
    color: #c62828;
    transform: translateY(-2px);
}

.reply-btn {
    background-color: #2196F3;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 12px;
    font-weight: 500;
    display: inline-block;
}

.reply-btn:hover {
    background-color: #1976D2;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.3);
}

/* Formulaire de réponse */
.reply-form-container {
    margin-top: 15px;
    padding: 15px;
    background-color: #f0f7ff;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.reply-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reply-content {
    width: 100%;
    min-height: 80px;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
    resize: vertical;
    font-family: inherit;
    font-size: 15px;
    transition: border-color 0.3s, box-shadow 0.3s;
    outline: none;
}

.reply-content:focus {
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2);
}

.reply-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.submit-reply-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-reply-btn:hover {
    background-color: #43a047;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

.cancel-reply-btn {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-reply-btn:hover {
    background-color: #e53935;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(244, 67, 54, 0.3);
}

#comment-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

#comment-content {
    width: 100%;
    min-height: 120px;
    padding: 18px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background-color: #fff;
    resize: vertical;
    font-family: inherit;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#comment-content:focus {
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2);
    outline: none;
}

#comment-form button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 14px 25px;
    border-radius: 8px;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
    align-self: flex-end;
    transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s;
    width: 100%;
    max-width: 250px;
}

#comment-form button:hover {
    background-color: #43a047;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(76, 175, 80, 0.3);
}

/* Responsive design pour les commentaires */
@media (min-width: 768px) {
    #comments-section {
        padding: 25px 35px;
    }
    
    .comment {
        padding: 20px;
    }
    
    .comment strong {
        font-size: 17px;
    }
    
    .comment p {
        font-size: 16px;
    }
    
    /* Modification pour le formulaire de commentaire - formulaire en colonne plutôt qu'en ligne */
    #comment-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    /* Adaptation du champ de texte pour qu'il soit moins haut et plus large */
    #comment-content {
        min-height: 80px;
        width: 100%;
    }
    
    /* Bouton centré en dessous du champ */
    #comment-form button {
        width: 100%;
        max-width: 100%;
        margin-top: 15px;
        align-self: center;
    }
    
    .replies-list {
        margin-left: 30px;
    }
    
    .reply-actions {
        flex-direction: row;
    }
}

@media (min-width: 992px) {
    #comments-section {
        padding: 30px 40px;
        max-width: 900px;
    }
    
    #comments-section h3 {
        font-size: 22px;
    }
    
    .comment {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-areas: 
            "author date"
            "content content"
            "actions actions"
            "confirmation confirmation"
            "replies replies";
        gap: 10px;
    }
    
    .comment strong {
        grid-area: author;
    }
    
    .comment small {
        grid-area: date;
        text-align: right;
        margin-top: 0;
    }
    
    .comment p {
        grid-area: content;
    }
    
    .delete-comment-btn, .reply-btn {
        grid-area: actions;
    }
    
    .delete-comment-btn {
        justify-self: flex-start;
    }
    
    .reply-btn {
        justify-self: flex-end;
        margin-left: auto;
    }
    
    .replies-section {
        grid-area: replies;
        margin-top: 15px;
    }
    
    .reply-form {
        flex-direction: column;
    }
    
    .reply-actions {
        justify-content: flex-end;
    }
}

/* Styles for actor and director cards - Increased sizes by 60% */
#credits .credit-item {
    width: 160px; /* Increased from 100px (60% larger) */
    margin: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

#credits .credit-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 16px rgba(0, 0, 0, 0.2);
}

#credits .credit-img {
    width: 160px; /* Increased from 100px (60% larger) */
    height: 160px; /* Increased from 100px (60% larger) */
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
}

#credits .credit-name {
    font-size: 16px; /* Increased from smaller size */
    font-weight: bold;
    margin: 10px 0 5px;
    text-align: center;
    color: #333;
}

#credits .credit-role {
    font-size: 14px; /* Slightly increased */
    color: #666;
    text-align: center;
    margin-bottom: 10px;
}

@media (min-width: 768px) {
    #credits .credit-item {
        width: 200px; /* Increased for tablets */
    }
    
    #credits .credit-img {
        width: 200px; /* Increased for tablets */
        height: 200px; /* Increased for tablets */
    }
    
    #credits .credit-name {
        font-size: 18px;
    }
}

@media (min-width: 992px) {
    #credits .credit-item {
        width: 240px; /* Increased for desktop */
        margin: 20px;
    }
    
    #credits .credit-img {
        width: 240px; /* Increased for desktop */
        height: 240px; /* Increased for desktop */
        border-width: 4px;
    }
    
    #credits .credit-name {
        font-size: 20px;
    }
    
    #credits .credit-role {
        font-size: 16px;
    }
}

/* Boutons des éléments similaires */
.similar-detail-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.3s;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.similar-detail-btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

@media (min-width: 768px) {
    .similar-detail-btn {
        padding: 10px 18px;
        font-size: 15px;
    }
}

@media (min-width: 992px) {
    .similar-detail-btn {
        padding: 12px 20px;
        font-size: 16px;
    }
}

/* Nouvelle classe spécifique pour les messages de confirmation */
.delete-confirm-container {
    display: block !important;
    width: 100% !important;
    max-width: 300px !important;
    margin: 10px 0 !important;
    padding: 15px !important;
    background-color: #f5f5f5 !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    text-align: center !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
    animation: fadeIn 0.3s ease !important;
    clear: both !important;
    position: static !important;
    left: 0 !important;
    transform: none !important;
    float: none !important;
}

.delete-confirm-container p {
    margin-bottom: 15px;
    font-size: 15px;
    color: #555;
    font-weight: 500;
}

.delete-confirm-container button {
    margin: 0 5px;
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.delete-confirm-container .confirm-btn {
    background-color: #4CAF50;
    color: white;
}

.delete-confirm-container .confirm-btn:hover {
    background-color: #43a047;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

.delete-confirm-container .cancel-btn {
    background-color: #f44336;
    color: white;
}

.delete-confirm-container .cancel-btn:hover {
    background-color: #e53935;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(244, 67, 54, 0.3);
}

/* Positionnement spécifique dans les commentaires */
.comment .delete-confirm-container {
    margin-top: 10px;
    margin-left: 0;
}

/* Positionnement spécifique dans les réponses */
.reply .delete-confirm-container {
    margin: 10px 0 !important;
    max-width: 250px !important;
    position: static !important;
    display: block !important;
    left: 0 !important;
    transform: none !important;
}

/* Adaptation responsive */
@media (min-width: 768px) {
    .delete-confirm-container {
        max-width: 320px;
    }
    
    .reply .delete-confirm-container {
        max-width: 280px;
        display: block;
        width: 100%;
        /* Fix pour tablette - positionner sous le bouton de suppression */
        margin-left: 0;
        margin-right: auto;
        position: relative;
        left: 0;
        transform: none;
    }
}

@media (min-width: 992px) {
    .delete-confirm-container {
        max-width: 350px;
    }
    
    .comment .delete-confirm-container {
        grid-column: 1 / -1;
        grid-row: 4;
        justify-self: start;
    }
    
    .reply .delete-confirm-container {
        max-width: 300px;
        display: block;
        width: 100%;
        /* Fix pour desktop - positionnement explicite sous le bouton de suppression */
        margin-left: 0;
        margin-right: auto;
        position: relative;
        left: 0;
        transform: none;
        clear: both;
    }
}

/* Layout de la page de détail - Structure responsive */
.detail-page-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Style par défaut pour les cartes */
.detail-card {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

/* Style du contenu de la carte de détails */
#details {
    background-color: white;
    border-radius: 15px;
    width: 100%;
    max-width: 100%;
    margin: 20px auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#details img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    margin: 0 auto 15px;
}

#details h2 {
    color: #333;
    font-size: 26px;
    text-align: center;
    margin-bottom: 20px;
}

#details p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 15px;
    color: #555;
}

/* Adaptation responsive pour Tablette */
@media (min-width: 768px) {
    .detail-page-container {
        flex-flow: row wrap;
        gap: 20px;
    }
    
    .detail-left-column {
        flex: 0 0 48%;
        max-width: 48%;
    }
    
    .detail-right-column {
        flex: 0 0 48%;
        max-width: 48%;
    }
    
    .detail-bottom-section {
        flex: 0 0 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 20px;
    }
    
    #details {
        margin-top: 0;
        height: calc(100vh - 150px);
        overflow-y: auto;
        position: sticky;
        top: 20px;
    }
    
    #details img {
        max-width: 80%;
        max-height: 300px;
        object-fit: contain;
    }
    
    #credits, #similar {
        flex: 0 0 calc(50% - 10px);
        margin-bottom: 0;
    }
    
    #comments-section {
        margin-top: 0;
        max-height: calc(100vh - 150px);
        overflow-y: auto;
        width: 100%;
        max-width: 100%;
        padding: 20px;
        background-color: white;
        border-radius: 15px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
}

/* Adaptation responsive pour Desktop */
@media (min-width: 992px) {
    .detail-page-container {
        gap: 30px;
    }
    
    .detail-left-column {
        flex: 0 0 42%;
        max-width: 42%;
    }
    
    .detail-right-column {
        flex: 0 0 53%;
        max-width: 53%;
    }
    
    #details {
        padding: 25px;
    }
    
    #details img {
        max-height: 350px;
    }
    
    #credits, #similar {
        flex: 0 0 calc(50% - 15px);
    }
}

/* Adaptation responsive pour grands écrans */
@media (min-width: 1200px) {
    .detail-page-container {
        padding: 0 20px;
    }
    
    .detail-left-column {
        flex: 0 0 38%;
        max-width: 38%;
    }
    
    .detail-right-column {
        flex: 0 0 58%;
        max-width: 58%;
    }
    
    #details img {
        max-height: 400px;
    }
    
    .detail-bottom-section {
        margin-top: 20px;
    }
}

/* Masquer la carte similaire si elle est vide */
#similar:empty {
    display: none;
}