/* ===============================================
   PAGE TORRENT - STYLES MODERNES
   =============================================== */

.torrent-page {
    margin-top: 30px;
    margin-bottom: 50px;
}

/* ==================== HÉRO SECTION ==================== */
.torrent-hero {
    position: relative;
    margin-bottom: 50px;
    border: 2px solid var(--border);
    border-radius: 0;
    overflow: hidden;
    background-color: var(--secondary);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(2px);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 40px;
    padding: 40px;
    background: linear-gradient(135deg, rgba(20, 20, 30, 0.95), rgba(30, 30, 50, 0.9));
}

.hero-cover {
    flex: 0 0 220px;
    min-height: 320px;
    background-color: var(--primary);
    border: 2px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.hero-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
}

.torrent-title {
    font-size: 36px;
    font-weight: bold;
    color: var(--accent);
    margin: 0;
    line-height: 1.2;
    word-wrap: break-word;
}

.hero-metadata {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(var(--accent-rgb), 0.3);
    border-radius: 4px;
    font-size: 13px;
    color: #ccc;
    transition: all 0.2s ease;
}

.meta-item:hover {
    background-color: rgba(var(--accent-rgb), 0.15);
    color: var(--accent);
    border-color: rgba(var(--accent-rgb), 0.5);
}

/* ==================== STATS HÉRO ==================== */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.stat-box {
    padding: 16px;
    border-radius: 4px;
    text-align: center;
    border: 1px solid var(--border);
    background-color: rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.stat-box.seeders {
    border-left: 4px solid #2ecc71;
}

.stat-box.seeders:hover {
    border-color: #2ecc71;
    background-color: rgba(46, 204, 113, 0.1);
}

.stat-box.leechers {
    border-left: 4px solid #e74c3c;
}

.stat-box.leechers:hover {
    border-color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.1);
}

.stat-box.completed {
    border-left: 4px solid #3498db;
}

.stat-box.completed:hover {
    border-color: #3498db;
    background-color: rgba(52, 152, 219, 0.1);
}

.stat-number {
    display: block;
    font-size: 28px;
    font-weight: bold;
    color: var(--accent);
    margin-bottom: 4px;
}

.stat-name {
    display: block;
    font-size: 12px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==================== ACTIONS HÉRO ==================== */
.hero-actions {
    display: flex;
    gap: 15px;
}

.btn-primary-download {
    flex: 1;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--accent), rgba(var(--accent-rgb), 0.8));
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.3);
}

.btn-primary-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.4);
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.95), var(--accent));
}

.action-warning {
    flex: 1;
    padding: 16px 24px;
    background-color: rgba(231, 76, 60, 0.15);
    border: 1px solid rgba(231, 76, 60, 0.4);
    border-radius: 4px;
    color: #e74c3c;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.action-warning a {
    color: var(--accent);
    text-decoration: underline;
}

.action-warning a:hover {
    color: #fff;
}

/* ==================== SECTION PRÉSENTATION ==================== */
.torrent-description-section {
    background-color: var(--secondary);
    border: 1px solid var(--border);
    padding: 40px;
    margin-bottom: 40px;
    border-radius: 0;
}

.section-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--accent);
    margin: 0 0 30px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border);
}

.description-content {
    color: #ddd;
    line-height: 1.8;
    font-size: 15px;
}

.description-content p {
    margin: 0 0 20px 0;
}

.description-content strong,
.description-content b {
    color: var(--accent);
    font-weight: bold;
}

.description-content em,
.description-content i {
    color: #ccc;
    font-style: italic;
}

.description-content a {
    color: var(--blue);
    text-decoration: none;
}

.description-content a:hover {
    text-decoration: underline;
    color: var(--accent);
}

.description-content h1,
.description-content h2,
.description-content h3,
.description-content h4,
.description-content h5,
.description-content h6 {
    color: var(--accent);
    margin: 20px 0 10px 0;
    line-height: 1.3;
}

.description-content ul,
.description-content ol {
    margin: 15px 0;
    padding-left: 25px;
}

.description-content li {
    margin-bottom: 8px;
}

/* ==================== DESCRIPTION STRUCTURÉE ==================== */
.description-structured {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.desc-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--accent);
    padding: 15px 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 10px;
}

.desc-metadata-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
    background-color: var(--primary);
    border: 1px solid var(--border);
    border-radius: 4px;
}

.metadata-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background-color: rgba(0, 0, 0, 0.2);
    border-left: 4px solid var(--accent);
    border-radius: 4px;
}

.metadata-key {
    font-size: 12px;
    font-weight: bold;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.metadata-value {
    font-size: 14px;
    color: #ddd;
    line-height: 1.6;
}

.metadata-value a {
    color: var(--blue);
    text-decoration: none;
    transition: all 0.2s ease;
}

.metadata-value a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.desc-synopsis {
    padding: 25px;
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.05), rgba(var(--accent-rgb), 0.02));
    border: 1px solid rgba(var(--accent-rgb), 0.2);
    border-left: 4px solid var(--accent);
    border-radius: 4px;
    color: #ddd;
    line-height: 1.8;
    font-size: 15px;
}

.desc-synopsis strong,
.desc-synopsis b {
    color: var(--accent);
    font-weight: bold;
}

.desc-synopsis em,
.desc-synopsis i {
    color: #bbb;
    font-style: italic;
}

.desc-synopsis a {
    color: var(--blue);
    text-decoration: none;
}

.desc-synopsis a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.no-description {
    color: #888;
    font-style: italic;
    text-align: center;
    padding: 30px;
}

/* ==================== SECTION COMMENTAIRES ==================== */
.torrent-comments-section {
    background-color: var(--secondary);
    border: 1px solid var(--border);
    padding: 40px;
    border-radius: 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border);
}

.btn-report {
    padding: 10px 20px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.btn-report:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

/* ==================== FORMULAIRE COMMENTAIRE ==================== */
.add-comment-form {
    margin-bottom: 40px;
    padding: 25px;
    background-color: var(--primary);
    border: 1px solid var(--border);
    border-radius: 4px;
}

.add-comment-form textarea {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    background-color: var(--secondary);
    border: 1px solid var(--border);
    color: #ddd;
    font-size: 14px;
    font-family: inherit;
    border-radius: 4px;
    resize: vertical;
    margin-bottom: 15px;
}

.add-comment-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    background-color: rgba(var(--secondary), 1);
}

.btn-submit-comment {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--accent), rgba(var(--accent-rgb), 0.8));
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.2s ease;
}

.btn-submit-comment:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.3);
}

/* ==================== LOGIN PROMPT ==================== */
.login-prompt {
    padding: 20px;
    background-color: rgba(231, 76, 60, 0.15);
    border: 1px solid rgba(231, 76, 60, 0.4);
    border-radius: 4px;
    color: #e74c3c;
    text-align: center;
    margin-bottom: 30px;
}

.login-prompt a {
    color: var(--accent);
    text-decoration: underline;
    font-weight: bold;
}

.login-prompt a:hover {
    color: #fff;
}

/* ==================== COMMENTAIRES ==================== */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comment-item {
    padding: 20px;
    background-color: var(--primary);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.comment-item:hover {
    border-left-color: #fff;
    background-color: rgba(0, 0, 0, 0.3);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.comment-author {
    font-weight: bold;
    color: var(--accent);
    font-size: 14px;
}

.comment-date {
    font-size: 12px;
    color: #888;
}

.comment-body {
    color: #ddd;
    line-height: 1.6;
    font-size: 14px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.no-comments {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 30px;
}

/* ==================== MODAL SIGNALEMENT ==================== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: var(--secondary);
    margin: 5% auto;
    padding: 30px;
    border: 1px solid var(--border);
    width: 90%;
    max-width: 500px;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    margin: 0;
    font-size: 22px;
    color: var(--accent);
}

.close {
    font-size: 28px;
    font-weight: bold;
    color: #888;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close:hover {
    color: var(--accent);
}

/* ==================== FORMULAIRE SIGNALEMENT ==================== */
.report-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: bold;
    color: var(--accent);
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    padding: 12px;
    background-color: var(--primary);
    border: 1px solid var(--border);
    color: #ddd;
    font-size: 14px;
    font-family: inherit;
    border-radius: 4px;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    background-color: rgba(var(--primary), 1);
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.btn-submit-report,
.btn-cancel-report {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.2s ease;
}

.btn-submit-report {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
}

.btn-submit-report:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

.btn-cancel-report {
    background-color: #555;
    color: white;
}

.btn-cancel-report:hover {
    background-color: #444;
}

/* ==================== MESSAGES ==================== */
.message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: bold;
    text-align: center;
}

.message.success {
    background-color: rgba(46, 204, 113, 0.2);
    border: 1px solid #2ecc71;
    color: #2ecc71;
}

.message.error {
    background-color: rgba(231, 76, 60, 0.2);
    border: 1px solid #e74c3c;
    color: #e74c3c;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 900px) {
    .hero-content {
        flex-direction: column;
        gap: 30px;
        padding: 30px;
    }

    .hero-cover {
        flex: 0 0 auto;
        max-width: 300px;
        margin: 0 auto;
    }

    .torrent-title {
        font-size: 28px;
    }

    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-content {
        padding: 20px;
    }

    .hero-cover {
        max-width: 180px;
    }

    .torrent-title {
        font-size: 24px;
    }

    .hero-metadata {
        gap: 10px;
    }

    .meta-item {
        font-size: 12px;
        padding: 6px 12px;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .btn-report {
        width: 100%;
    }

    .modal-content {
        width: 95%;
        margin: 50% auto;
    }

    .torrent-description-section,
    .torrent-comments-section {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .hero-content {
        padding: 15px;
    }

    .hero-cover {
        display: none;
    }

    .torrent-title {
        font-size: 20px;
    }

    .hero-metadata {
        flex-direction: column;
    }

    .meta-item {
        width: 100%;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .section-title {
        font-size: 20px;
    }
}
