/* ===== STYLES POUR LE SITE ON4RSX - OPTIMISÉ 4K ===== */

/* Reset et base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    background: #e9ecef; /* Même gris que zone 1 */
    line-height: 1.6;
    font-size: 16px;
}

html {
    background: #e9ecef; /* Même gris que zone 1 */
}

/* ===== LAYOUT PRINCIPAL - 2800PX ===== */

.home-layout {
    display: flex;
    gap: 20px;
    margin-top: 0;
    min-height: 600px;
    align-items: flex-start;
    max-width: 2800px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 30px;
    background: transparent; /* Transparent pour laisser voir le gris du body */
}

.content-separator {
    width: 2px;
    background: linear-gradient(to bottom, transparent, #ddd, transparent);
    flex-shrink: 0;
    min-height: 25px;
}
}

/* ===== CONTENU PRINCIPAL - 66% ===== */

.main-content-home {
    width: 66%;
    background: white; /* Fond blanc pour contraster avec le gris */
    padding: 35px;
    border-radius: 15px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
    border: 1px solid #e3e6f0;
}

.main-content-home h1 {
    color: #2c3e50;
    font-size: 2em;
    margin-bottom: 40px;
    border-bottom: 4px solid #3498db;
    padding-bottom: 25px;
    font-weight: 600;
}

.main-content-home p {
    color: #5a6c7d;
    font-size: 1.2em;
    line-height: 1.8;
    margin-bottom: 30px;
    text-align: justify;
}

/* ===== NEWS SIDEBAR - 33% ===== */

.news-sidebar {
    width: 33%;
}

.news-box {
    background: white; /* Fond blanc pour contraster avec le gris */
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
    margin-bottom: 25px;
    border: 1px solid #e3e6f0;
}

.news-box:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    transition: box-shadow 0.3s ease;
}

.news-box h2 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 1.4em;
    border-bottom: 3px solid #3498db;
    padding-bottom: 12px;
    font-weight: 600;
    text-align: center;
}

/* ===== NEWS ITEMS ===== */

.news-item {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 15px;
    margin: 15px 0;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    font-size: 1em;
    transition: all 0.2s ease;
}

.news-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.news-item.member-news {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border-left-color: #f39c12;
}

.news-date {
    font-weight: bold;
    color: #7f8c8d;
    font-size: 0.9em;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.news-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 1.1em;
    line-height: 1.4;
}

.news-content {
    color: #5a6c7d;
    font-size: 0.95em;
    line-height: 1.5;
}

/* ===== INDICATEURS ET BOUTONS ===== */

.member-indicator {
    background: #3498db;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 12px;
}

.btn-news {
    background: #3498db;
    color: white;
    padding: 6px 12px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-news:hover {
    background: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(52, 152, 219, 0.3);
}

/* ===== BOUTONS GÉNÉRIQUES ===== */

.btn {
    display: inline-block;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9em;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-weight: 500;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.3);
}

/* ===== OVERRIDE POUR LE CONTAINER PRINCIPAL ===== */
/* S'assurer que le header n'écrase pas le fond gris */

.main-content .container {
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    border: none !important;
    margin-top: 0 !important;
}

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

/* Écrans 2K */
@media (max-width: 2560px) {
    .home-layout {
        max-width: 2400px;
        padding: 0 25px;
        gap: 18px;
    }
    
    .main-content-home {
        padding: 30px;
    }
    
    .main-content-home h1 {
        font-size: 1.8em;
    }
    
    .main-content-home p {
        font-size: 1.1em;
    }
    
    .news-box {
        padding: 20px;
    }
}

/* Écrans Full HD */
@media (max-width: 1920px) {
    .home-layout {
        max-width: 1800px;
        padding: 0 20px;
        gap: 15px;
    }
    
    .main-content-home {
        padding: 25px;
    }
    
    .main-content-home h1 {
        font-size: 1.6em;
    }
    
    .main-content-home p {
        font-size: 1em;
    }
    
    .news-box {
        padding: 18px;
    }
    
    .news-box h2 {
        font-size: 1.2em;
    }
}

/* Tablettes */
@media (max-width: 1200px) {
    .home-layout {
        max-width: 100%;
        padding: 0 15px;
        gap: 15px;
    }
    
    .main-content-home {
        padding: 25px;
    }
    
    .main-content-home h1 {
        font-size: 1.6em;
    }
    
    .main-content-home p {
        font-size: 1em;
    }
    
    .news-box {
        padding: 15px;
    }
}

/* Layout vertical pour tablettes portrait */
@media (max-width: 968px) {
    .home-layout {
        flex-direction: column;
        gap: 20px;
        padding: 0 10px;
    }
    
    .main-content-home,
    .news-sidebar {
        width: 100%;
    }
    
    .main-content-home {
        padding: 25px;
    }
    
    .main-content-home h1 {
        font-size: 1.8em;
    }
    
    .main-content-home p {
        font-size: 1.1em;
    }
    
    .news-box {
        padding: 15px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .home-layout {
        padding: 0 8px;
        gap: 15px;
    }
    
    .main-content-home {
        padding: 20px;
    }
    
    .main-content-home h1 {
        font-size: 1.6em;
        margin-bottom: 25px;
    }
    
    .main-content-home p {
        font-size: 1em;
        margin-bottom: 20px;
    }
    
    .news-box {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .news-box h2 {
        font-size: 1.1em;
    }
    
    .news-title {
        font-size: 1em;
    }
    
    .news-content {
        font-size: 0.9em;
    }
    
    .btn-news {
        font-size: 14px;
        padding: 5px 10px;
    }
}

/* Mobile très petit */
@media (max-width: 480px) {
    .home-layout {
        padding: 0 5px;
        gap: 10px;
    }
    
    .main-content-home {
        padding: 15px;
    }
    
    .main-content-home h1 {
        font-size: 1.4em;
        margin-bottom: 20px;
    }
    
    .main-content-home p {
        font-size: 0.95em;
        margin-bottom: 18px;
    }
    
    .news-box {
        padding: 12px;
    }
    
    .news-item {
        padding: 12px;
        margin: 10px 0;
    }
    
    .news-title {
        font-size: 0.95em;
    }
    
    .news-content {
        font-size: 0.85em;
    }
}

/* ===== ANIMATIONS ET EFFETS ===== */

.main-content-home {
    transition: box-shadow 0.3s ease;
}

.main-content-home:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* États de focus pour l'accessibilité */
.btn:focus,
.btn-news:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Réduction des animations pour ceux qui le préfèrent */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== UTILITAIRES ===== */

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none;
}

.visible {
    display: block;
}

/* ===== STYLES POUR LE FORUM ===== */

/* Textarea redimensionnable pour les réponses du forum */
.forum-textarea {
    resize: both !important;
    min-height: 150px !important;
    max-height: 500px !important;
    min-width: 100% !important;
    max-width: 100% !important;
    font-family: inherit !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    padding: 12px !important;
    border: 2px solid #ddd !important;
    border-radius: 8px !important;
    transition: border-color 0.3s ease !important;
    background-color: #fafafa !important;
}

.forum-textarea:focus {
    border-color: #3498db !important;
    background-color: white !important;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1) !important;
    outline: none !important;
}

/* Style pour les formulaires de réponse */
.reply-form {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 20px 0;
    border: 1px solid #e1e5e9;
}

.reply-form h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.reply-form .form-group {
    margin-bottom: 20px;
}

.reply-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.reply-form .form-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* Styles pour les messages du forum */
.topic-message {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 15px 0;
    border-left: 4px solid #3498db;
}

.topic-message.original-post {
    border-left-color: #2c3e50;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e1e5e9;
}

.message-author {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1em;
}

.message-date {
    color: #6c757d;
    font-size: 0.9em;
}

.message-content {
    color: #2c3e50;
    line-height: 1.7;
    font-size: 1em;
    word-wrap: break-word;
}

/* Boutons du forum */
.forum-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.forum-btn:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.forum-btn-secondary {
    background-color: #95a5a6;
}

.forum-btn-secondary:hover {
    background-color: #7f8c8d;
}

/* Navigation du forum */
.forum-breadcrumb {
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 14px;
}

.forum-breadcrumb a {
    color: #3498db;
    text-decoration: none;
}

.forum-breadcrumb a:hover {
    text-decoration: underline;
}

/* Responsive pour les formulaires du forum */
@media (max-width: 768px) {
    .forum-textarea {
        min-height: 120px !important;
        max-height: 300px !important;
    }
    
    .reply-form {
        padding: 15px;
        margin: 15px 0;
    }
    
    .reply-form .form-footer {
        flex-direction: column;
    }
    
    .forum-btn {
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
    }
    
    .topic-message {
        padding: 15px;
        margin: 10px 0;
    }
    
    .message-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* Animation pour les formulaires */
.reply-form {
    animation: slideIn 0.3s ease-out;
}

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

/* Amélioration de l'accessibilité */
.forum-textarea:focus,
.forum-btn:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Indicateur de caractères pour les textareas */
.char-counter {
    text-align: right;
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

.char-counter.warning {
    color: #f39c12;
}

.char-counter.error {
    color: #e74c3c;
}