/* ========================================
   Manga Report System - Frontend Styles
   Bouton de signalement et modal
   ======================================== */

/* ========== Bouton de signalement ========== */
#manga-report-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

#manga-report-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

#manga-report-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

#manga-report-button i {
    font-size: 16px;
}

/* ========== Modal ========== */
#manga-report-modal {
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

#manga-report-modal-content {
    background-color: #ffffff;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease-out;
    position: relative;
}

/* ========== Bouton de fermeture ========== */
#manga-report-modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    color: #999;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    line-height: 1;
    z-index: 10;
}

#manga-report-modal-close:hover,
#manga-report-modal-close:focus {
    color: #333;
    transform: rotate(90deg);
}

/* ========== Formulaire ========== */
#manga-report-form {
    padding: 30px;
}

#manga-report-form h2 {
    margin: 0 0 25px 0;
    color: #2c3e50;
    font-size: 24px;
    font-weight: 700;
    border-bottom: 3px solid #667eea;
    padding-bottom: 15px;
}

#manga-report-form label {
    display: block;
    margin-bottom: 8px;
    color: #34495e;
    font-weight: 600;
    font-size: 14px;
}

#manga-report-form select,
#manga-report-form textarea {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    box-sizing: border-box;
}

#manga-report-form select:focus,
#manga-report-form textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#manga-report-form textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

#manga-report-form small {
    display: block;
    margin-top: -10px;
    margin-bottom: 15px;
    color: #7f8c8d;
    font-size: 12px;
}

/* ========== Groupe "Autre" ========== */
#manga-report-other-group {
    animation: slideDown 0.3s ease-out;
}

/* ========== Bouton d'envoi ========== */
.submit-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    margin-top: 10px;
    justify-content: center;
}

.submit-button:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

.submit-button:active {
    transform: translateY(0);
}

.submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

.submit-button i {
    font-size: 16px;
}

/* ========== Messages ========== */
#manga-report-message {
    padding: 15px 20px;
    margin: 20px 30px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    animation: slideDown 0.3s ease-out;
}

#manga-report-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#manga-report-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ========== Animations ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== Responsive ========== */
@media screen and (max-width: 768px) {
    #manga-report-modal-content {
        margin: 10% auto;
        width: 95%;
    }

    #manga-report-form {
        padding: 20px;
    }

    #manga-report-form h2 {
        font-size: 20px;
    }

    #manga-report-button {
        width: 100%;
        justify-content: center;
    }
}

/* ========== États de chargement ========== */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* ========== Accessibilité ========== */
#manga-report-button:focus,
.submit-button:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

#manga-report-form select:focus,
#manga-report-form textarea:focus {
    outline: none;
}

/* ========== Support pour les icônes sans Font Awesome ========== */
#manga-report-button::before {
    content: "🐛";
    font-style: normal;
}

.submit-button::before {
    content: "📤";
    font-style: normal;
}

/* Si Font Awesome est chargé, cacher les emojis */
.fa-bug,
.fa-paper-plane {
    display: inline;
}

#manga-report-button:has(.fa-bug)::before,
.submit-button:has(.fa-paper-plane)::before {
    content: none;
}
