/* ============================================================
   FICHIER 2 : assets/css/course-rating.css
   REMPLACER TOUT LE CONTENU PAR CE CODE
   ============================================================ */

/* ============================================================
   LEARNDASH COURSE RATING - CSS
   ============================================================ */

/* Bouton d'ouverture */
.ldcr-button-container {
    margin: 20px 0;
}

.ldcr-button-primary,
.ldcr-open-modal {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.ldcr-button-primary:hover,
.ldcr-open-modal:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.ldcr-button-primary .dashicons,
.ldcr-open-modal .dashicons {
    font-size: 20px;
}

/* Modal */
.ldcr-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
}

.ldcr-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

.ldcr-modal-wrapper {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.ldcr-modal-content {
    position: relative;
    background: #fff;
    max-width: 550px;
    width: 100%;
    border-radius: 16px;
    padding: 35px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Bouton fermeture */
.ldcr-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.2s ease;
}

.ldcr-modal-close:hover {
    transform: rotate(90deg);
}

.ldcr-modal-close .dashicons {
    font-size: 28px;
    color: #999;
}

.ldcr-modal-close:hover .dashicons {
    color: #333;
}

/* Header */
.ldcr-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.ldcr-modal-header .dashicons {
    font-size: 25px;
    color: #f0ad4e;
}

.ldcr-modal-header h3 {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    color: #1e1e1e;
}

.ldcr-modal-desc {
    color: #666;
    margin: 0 0 25px;
    font-size: 14px;
}

/* Étoiles - TAILLE RÉDUITE */
.ldcr-stars-wrapper {
    text-align: center;
    margin-bottom: 25px;
    padding: 25px 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border-radius: 12px;
}

.ldcr-stars {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 12px;
}

.ldcr-star {
    cursor: pointer;
    font-size: 36px; /* RÉDUIT - était 48-56px */
    color: #ddd;
    transition: all 0.2s ease;
    line-height: 1;
    user-select: none;
}

.ldcr-star:hover,
.ldcr-star.active {
    color: #f0ad4e;
    transform: scale(1.1);
}

.ldcr-rating-text {
    font-size: 15px;
    font-weight: 600;
    color: #667eea;
    margin: 0;
}

/* Commentaire */
.ldcr-comment-wrapper {
    margin-bottom: 25px;
}

.ldcr-comment-wrapper label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #1e1e1e;
    margin-bottom: 10px;
    font-size: 14px;
}

.ldcr-comment-wrapper label .dashicons {
    font-size: 18px;
    color: #667eea;
}

.ldcr-comment-wrapper textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.ldcr-comment-wrapper textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.ldcr-comment-wrapper small {
    display: block;
    text-align: right;
    color: #999;
    font-size: 12px;
    margin-top: 6px;
}

/* Boutons actions */
.ldcr-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.ldcr-btn {
    padding: 10px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ldcr-btn-cancel {
    background: #fff;
    color: #666;
}

.ldcr-btn-cancel:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.ldcr-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: #fff;
}

.ldcr-btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8c 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.ldcr-btn .dashicons {
    font-size: 18px;
}

/* Messages */
#ldcr-message {
    margin-top: 15px;
}

.ldcr-notice {
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
}

.ldcr-notice-success {
    background: #ecf7ed;
    border-left: 4px solid #46b450;
    color: #2c662d;
}

.ldcr-notice-error {
    background: #fef8f8;
    border-left: 4px solid #dc3232;
    color: #a02626;
}

/* Spinner */
.ldcr-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-left-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Scroll du body */
body.ldcr-modal-open {
    overflow: hidden;
}

/* Responsive */
@media (max-width: 768px) {
    .ldcr-modal-content {
        padding: 25px 20px;
        margin: 10px;
    }
    
    .ldcr-modal-header h3 {
        font-size: 22px;
    }
    
    .ldcr-star {
        font-size: 32px; /* Plus petit sur mobile */
    }
    
    .ldcr-actions {
        flex-direction: column;
    }
    
    .ldcr-btn {
        width: 100%;
        justify-content: center;
    }
}