/* ===========================================
   CSS POUR LE TEMPLATE DE COMMENTAIRES
   =========================================== */

.overlay-section-content {
    padding: 0 60px 0 0;
    overflow-y: auto;
    overflow-x: hidden;
}


/* ========================================
   FORMULAIRE DE COMMENTAIRE (layout)
======================================== */

.overlay-section-content .comment-form{
    display:flex;
    justify-content: space-between;
}

.overlay-section-content .comment-form-header{
    width:28%;
}

.overlay-section-content .comment-form {
    background: #f8f9fa;
    padding: 40px;
    border-radius: 8px;
    margin-bottom: 25px;
    margin-top: 75px;
    border: 1px solid #e9ecef;
}



.overlay-section-content .comment-form h3 {
    color: #000;
    margin-bottom: 15px;
    font-size: 1.3em;
    background-image: url("../assets/icons/black-comments-icon.svg");
    background-position: left center;
    background-repeat: no-repeat;
    background-size: 40px;
    padding-left: 60px;
}

.overlay-section-content .comment-form .form-row {
    margin-bottom: 15px;
}

.overlay-section-content .comment-form label {
    display: block;
    font-weight: bold;
    color: #000;
    font-size: 14px;
    margin-bottom: 10px;
}

.overlay-section-content .comment-form input[type="text"],
.overlay-section-content .comment-form input[type="email"],
.overlay-section-content .comment-form textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 0.95em;
    border: 1px solid #000;
    background: #FFF;
    box-shadow: none;
}

.overlay-section-content .comment-form input[type="text"]:focus,
.overlay-section-content .comment-form input[type="email"]:focus,
.overlay-section-content .comment-form textarea:focus {
    border: 1px solid #000;
    background: #FFF;
    box-shadow: none;
}

.overlay-section-content .comment-form textarea {
    min-height: 100px;
    resize: vertical;
}

.overlay-section-content .comment-form input[type="submit"]{
    border: 1px solid #000;
    background-color: #000;
    color: #FFF;
}

.overlay-section-content .comment-form input[type="submit"]:hover{
    border: 1px solid #000;
    background-color: #FFF;
    color: #000;
}


.overlay-section-content .comment-form .submit {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.overlay-section-content .comment-form .submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}



/* ========================================
   LISTE DES COMMENTAIRES
======================================== */
.overlay-section-content .comments-list {
    margin-top: 25px;
}

/* ========================================
   PAGINATION (bouton "Charger plus")
======================================== */
.comments-pagination {
    display: flex;
    justify-content: flex-end;
    margin-top: 15px;
}

.comments-load-more {
    border: 1px solid #000;
    background: #fff;
    color: #000;
    padding: 10px 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    font-size: 12px;
}

.comments-load-more:hover:not(:disabled) {
    background: #000;
    color: #fff;
}

.comments-load-more:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}


.overlay-section-content .comment {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.overlay-section-content .comment .comment-header{
    display:flex;
    justify-content: space-between;
    margin-bottom:10px;
}

.overlay-section-content .comment .comment-author {
    font-weight: 600;
    color: #495057;
    
}

.overlay-section-content .comment .comment-meta {
    color: #6c757d;
    font-size: 0.85em;
}

.overlay-section-content .comment .comment-content {
    color: #495057;
    line-height: 1.6;
}

.overlay-section-content .comment .comment-content p {
    margin-bottom: 10px;
}

.overlay-section-content .comment .comment-content p:last-child {
    margin-bottom: 0;
}


/* Message quand pas de commentaires */

.overlay-section-content .no-comments {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 30px 20px;
    background: #f8f9fa;
    border-radius: 8px;
}




/* Styles pour les commentaires générés par wp_list_comments */
.comments-list .comment {
    background: #FFF;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    position: relative;
}

/* Style spécial pour les commentaires admin */
.comments-list .comment.admin-comment {
    background: #f1f1f1;
    margin-left: 10%;
}

/* .comments-list .comment.admin-comment::before {
    content: '👑';
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.2em;
    opacity: 0.7;
} */

.comments-list .comment .comment-author {
    font-weight: 600;
    color: #777;
    font-size: 0.7em;
    text-transform: capitalize;
}

.comments-list .comment.admin-comment .comment-author {
    color: #000;
    font-weight: 700;
}

.comments-list .comment .comment-meta {
    color: #777777;
    font-size: 0.7em;
    padding-left:20px;
}

.comments-list .comment .comment-content {
    color: #495057;
    line-height: 1.6;
    font-size: 0.9em;
    font-weight: 600;   
}

.comments-list .comment .comment-content p {
    margin-bottom: 10px;
}

.comments-list .comment .comment-content p:last-child {
    margin-bottom: 0;
}

/* S'assurer que tous les éléments restent dans le conteneur */
.overlay-section-content .comments-list,
.overlay-section-content .comment-form,
.overlay-section-content p {
    position: relative;
    z-index: 1;
}

/* ========================================
   FORMULAIRE AJAX (comment-form-ajax)
======================================== */
.comment-form-ajax {
    display:flex;
    flex-direction: column;
    width:70%;
}


.comment-form-ajax .form-group {
    margin-bottom: 15px;
}

.comment-form-ajax label {
    display: block;
    margin-bottom: 5px;
    color: #495057;
    font-weight: 500;
    font-size: 0.9em;
}

.comment-form-ajax input[type="text"],
.comment-form-ajax input[type="email"],
.comment-form-ajax textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #000;
    font-size: 0.95em;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.comment-form-ajax input[type="text"]:focus,
.comment-form-ajax input[type="email"]:focus,
.comment-form-ajax textarea:focus {
    outline: none;
    border-color: #27ae60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

.comment-form-ajax textarea {
    min-height: 80px;
    resize: vertical;
}

.comment-form-ajax .required {
    color: #e74c3c;
    font-weight: bold;
}

.comment-form-ajax .form-actions {
    margin-top: 20px;
    text-align: right;
}

.comment-form-ajax #submit {
    padding: 12px 24px;
    border: 1px solid #000;
    background-color: #000;
    color: #FFF;
}

.comment-form-ajax #submit:hover:not(:disabled) {
    border: 1px solid #000;
    background-color: #FFF;
    color: #000;
}

.comment-form-ajax #submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

#comment-status {
    margin-top: 15px;
}

.comment-status-message{
    width: fit-content;
    padding: 15px 20px;
    margin: 0 auto;
    margin-top: 15px;
    font-weight: bold;
    background: #fff;
    border: 1px solid #dee2e6;
    color: #000;
}

.comment-status-message.is-success{
    background: #d4edda;
    border: 1px solid #d4edda;
    color: #155724;
}

.comment-status-message.is-error{
    background: #f8d7da;
    border: 1px solid #f8d7da;
    color: #721c24;
}

.comment-status-message.is-warning{
    background: #fff3cd;
    border: 1px solid #fff3cd;
    color: #856404;
}

/* Info utilisateur */
.user-info {
    background: #ecf0f1;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    width: 90%;
}




/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 1400px){}
@media (max-width: 1200px){

    .product-info-overlay .overlay-gradient{width:15%;background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.7) 50%, rgb(255, 255, 255) 100%);}
    .product-info-overlay .overlay-panel-content{width:85%;}

    .product-info-overlay .overlay-header{padding: 0 0px 0 100px!important;}

    .overlay-section-content {padding: 0 30px 0 0;}

}

@media (max-width: 768px){

    /* IMPORTANT: ne pas mettre height:auto (sinon l'overlay semble "pas assez haut") */
    .product-info-overlay{height:100vh;height:100dvh;padding:0px 0px 0px 0px!important;}

    .product-info-overlay .overlay-header{height:60px;}
    .product-info-overlay .overlay-close{width:60px;height:60px;}


    .product-info-overlay .overlay-gradient{width:0%;display:none;}

    .product-info-overlay .overlay-panel-content{width:100%;}

    .product-info-overlay .overlay-header{
        width:100%;
        padding: 0px 0px 0px 10px!important;
        margin: 0 auto;
        background:#000;
    }

    .product-info-overlay .overlay-header h3{
        color:#FFF;
        font-size:1em;
        background-size: 30px;
        padding-left: 50px;
    }

    /* L'overlay sert pour "infos" ET "commentaires" : ne pas forcer l'icône ici */
    .product-info-overlay.is-comments .overlay-header h3{
        background-image: url("../assets/icons/white-comments-icon.svg");
    }

    .product-info-overlay .overlay-body{padding:7%;}

    .overlay-section-content .comment-form{flex-direction: column;}

    .overlay-section-content .comment-form-header{width:100%;}


    .comment-form-ajax{width:100%;}

    .comments-list .comment .comment-content{font-size:14px;}

    .overlay-section-content .info-section h4 {font-size: 1.2em;}
    .overlay-section-content .info-section li strong {min-width: 100px;font-size: 0.9em;}

}

@media (max-width: 480px){

    .product-info-overlay .overlay-header{width:100%;padding: 0px 0px 0px 10px!important;margin: 0 auto;}

}