/* ========================================
   GDC LIVE - STYLE UNIFIÉ
   Compatible avec les 2 pages existantes
   ======================================== */

/* Import de police */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Variables CSS */
:root {
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-hover: #2d3748;
    --border: #334155;
    --primary: #3b82f6;
    --secondary: #8b5cf6;
    --accent: #f59e0b;
    --text-light: #f1f5f9;
    --text-muted: #94a3b8;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
}

/* Reset de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    min-height: 100vh;
    padding: 0;
}

/* Container principal */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    overflow-x: hidden;
}

/* Header principal */
.header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Navigation */
.nav {
    background: var(--bg-card);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    position: relative;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 0.8rem;
    z-index: 1001;
}

.nav ul {
    display: flex;
    list-style: none;
    justify-content: center;
    gap: 1rem;
    margin: 0;
    padding: 0;
}

.nav li {
    display: inline-block;
}

.nav a {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    color: var(--text-light);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.nav a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.nav a.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

/* Contenu principal */
.content {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    min-height: 500px;
    overflow-x: hidden;
}

/* Messages d'erreur */
.error {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin: 2rem 0;
    text-align: center;
}

.error h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

/* ==================== PAGE CLAN ==================== */

/* En-tête du clan */
.clan-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
    flex-wrap: wrap;
}

.clan-badge-large {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 4px solid var(--border);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.clan-info-main {
    flex: 1;
    min-width: 300px;
}

.clan-name {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.clan-tag {
    font-size: 1.2rem;
    color: var(--text-muted);
    font-family: monospace;
    margin-bottom: 1rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    display: inline-block;
}

.clan-level {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.level-value {
    color: var(--accent);
    font-weight: 700;
}

/* Grille de statistiques */
.clan-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.stat-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Description du clan */
.clan-description-section {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    border: 1px solid var(--border);
}

.section-title {
    font-size: 1.8rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.description-text {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.clan-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.feature-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.discord-feature {
    background: linear-gradient(135deg, #5865F2, #4752c4);
    border-color: transparent;
}

.discord-feature a {
    color: white;
    text-decoration: none;
    font-weight: 600;
}

/* Tableau des membres */
.members-section {
    margin: 3rem 0;
}

.table-wrapper {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    width: 100%;
    overflow-x: auto;
}

.members-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1200px; /* Largeur minimale pour garder tout visible */
}

.members-table thead {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.members-table th {
    padding: 1.2rem 1rem;
    text-align: left;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.members-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background-color 0.3s ease;
}

.members-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.members-table td {
    padding: 1rem;
    color: var(--text-light);
    vertical-align: middle;
}

/* Styles spécifiques pour les cellules */
.rank-cell {
    text-align: center;
    font-weight: 700;
    color: var(--text-muted);
}

.league-cell {
    text-align: center;
}

.league-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.1rem;
}

.legend { background: linear-gradient(135deg, #f59e0b, #d97706); }
.titan { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.champion { background: linear-gradient(135deg, #10b981, #059669); }
.master { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.crystal { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.gold { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.silver { background: linear-gradient(135deg, #94a3b8, #64748b); }
.bronze { background: linear-gradient(135deg, #92400e, #78350f); }

.exp-cell {
    text-align: center;
}

.exp-level {
    display: inline-block;
    background: var(--bg-hover);
    color: var(--text-light);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.name-cell {
    min-width: 200px;
}

.player-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.player-name {
    font-weight: 600;
    color: var(--text-light);
}

.player-role {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    width: fit-content;
}

.role-leader { background: linear-gradient(135deg, #f59e0b, #d97706); color: var(--bg-dark); }
.role-coleader { background: linear-gradient(135deg, #3b82f6, #1d4ed8); color: white; }
.role-elder { background: linear-gradient(135deg, #10b981, #059669); color: white; }
.role-member { background: linear-gradient(135deg, #64748b, #475569); color: white; }

.tag-cell {
    font-family: monospace;
    color: var(--text-muted);
}

.player-tag-link {
    color: #60a5fa;
    text-decoration: none;
    transition: color 0.3s ease;
}

.player-tag-link:hover {
    color: #3b82f6;
    text-decoration: underline;
}

.donation-cell, .received-cell, .trophies-cell {
    text-align: center;
    font-weight: 600;
}

.donation-epic { color: #8b5cf6; }
.donation-high { color: #10b981; }
.donation-normal { color: #60a5fa; }

.trophies-count {
    color: var(--accent);
    font-weight: 700;
}

/* ========================================
   STYLES PAGE GUERRE - VERSION MOBILE OPTIMISÉE
   Remplacez TOUTE la section "PAGE GUERRE" dans main.css
   ======================================== */

/* ==================== PAGE GUERRE ==================== */

/* Statistiques de guerre supérieures */
.war-stats-overview {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin: 2rem 0;
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: block;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    display: block;
}

/* Conteneur de guerre PRINCIPAL */
.war-page .war-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 2rem 0;
}

/* Section des équipes (Notre clan + VS + Adversaire) */
.war-page .teams-section {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: start;
    width: 100%;
    max-width: 100%;
}

/* Cartes équipe (Notre clan / Adversaire) */
.war-page .team-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 2rem;
    border: 2px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.war-page .team-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.war-page .team-card .team-header {
    width: 100%;
    margin-bottom: 1.5rem;
    min-width: 0;
}

.war-page .team-card .team-header h3 {
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 0.75rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
    font-weight: 700;
}

.war-page .team-card .team-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-light);
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
    max-width: 100%;
    padding: 0 0.5rem;
}

/* Badge */
.war-page .team-card .team-badge {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 1.5rem auto;
    border: 4px solid var(--border);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    max-width: 100%;
    transition: transform 0.3s ease;
}

.war-page .team-card:hover .team-badge {
    transform: scale(1.05);
}

/* Statistiques dans les cartes */
.war-page .team-card .team-stats {
    width: 100%;
    min-width: 0;
    margin-top: 1rem;
}

.war-page .team-card .stars {
    font-size: 2.5rem;
    font-weight: 900;
    margin: 1rem 0;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.war-page .team-card .destruction {
    font-size: 1.2rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-top: 0.75rem;
    font-weight: 500;
}

/* VS Container */
.war-page .vs-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    height: 100%;
}

.war-page .vs {
    background: linear-gradient(135deg, var(--accent), #d97706);
    color: var(--bg-dark);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 900;
    box-shadow: 0 6px 12px rgba(245, 158, 11, 0.4);
    flex-shrink: 0;
}

/* Conteneur des tableaux de membres */
.war-page .members-section {
    margin: 3rem 0 2rem;
}

.war-page .members-section > h3 {
    font-size: 1.8rem;
    color: var(--accent);
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 700;
}

.war-page .members-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0;
}

/* Tableaux individuels */
.war-page .war-table {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--border);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    min-height: 350px;
}

.war-page .war-table .table-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 1.25rem;
    text-align: center;
    font-weight: 700;
    color: white;
    font-size: 1.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.war-page .war-table .table-list {
    flex: 1;
    overflow-y: auto;
    max-height: 550px;
    padding: 0.5rem;
}

/* Lignes des membres */
.war-page .member-row {
    display: grid;
    grid-template-columns: 60px 1fr 80px;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.2s ease;
    border-radius: 6px;
    margin-bottom: 0.25rem;
}

.war-page .member-row:hover {
    background: rgba(255, 255, 255, 0.08);
}

.war-page .member-row:last-child {
    border-bottom: none;
}

.war-page .member-position {
    font-weight: 700;
    color: var(--text-muted);
    text-align: center;
    min-width: 50px;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem;
    border-radius: 6px;
}

.war-page .member-name {
    font-weight: 500;
    color: var(--text-light);
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
    min-width: 0;
    font-size: 1rem;
}

.war-page .member-stars {
    text-align: center;
    font-weight: 700;
    min-width: 70px;
    font-size: 1.1rem;
    padding: 0.5rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
}

/* Classes pour les étoiles */
.stars-0 { color: #94a3b8; }
.stars-1 { color: #f59e0b; }
.stars-2 { color: #3b82f6; }
.stars-3 { color: #10b981; }

/* Détails de guerre */
.war-details {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 3rem;
    border: 2px solid var(--border);
    width: 100%;
}

.war-details h4 {
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 700;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}

.detail-item {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid var(--border);
}

.detail-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    display: block;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.detail-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-light);
    display: block;
}

/* ==================== RESPONSIVE MOBILE ==================== */

/* Tablette (769px - 1024px) */
@media screen and (max-width: 1024px) {
    .war-stats-overview {
        grid-template-columns: repeat(3, 1fr);
        padding: 1.25rem;
        gap: 0.875rem;
    }
    
    .war-page .team-card {
        padding: 1.5rem;
    }
    
    .war-page .team-card .team-badge {
        width: 100px;
        height: 100px;
    }
}

/* MOBILE : 768px et moins */
@media screen and (max-width: 768px) {
    /* Stats : 2 colonnes sur mobile */
    .war-stats-overview {
        grid-template-columns: repeat(2, 1fr) !important;
        padding: 1rem !important;
        gap: 0.75rem !important;
    }
    
    .stat-item {
        padding: 0.875rem !important;
    }
    
    .stat-label {
        font-size: 0.8rem !important;
    }
    
    .stat-value {
        font-size: 1.3rem !important;
    }
    
    /* Section équipes : PASSER EN COLONNE */
    .war-page .teams-section {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem !important;
    }
    
    /* Ordre des éléments */
    .war-page .team-card.our-clan {
        order: 1;
    }
    
    .war-page .vs-container {
        order: 2;
        padding: 1rem 0 !important;
    }
    
    .war-page .team-card.opponent {
        order: 3;
    }
    
    /* Cartes équipe : pleine largeur */
    .war-page .team-card {
        width: 100% !important;
        max-width: 100% !important;
        padding: 1.5rem !important;
        margin: 0 !important;
    }
    
    .war-page .team-card .team-header h3 {
        font-size: 1.25rem !important;
    }
    
    .war-page .team-card .team-name {
        font-size: 1.1rem !important;
    }
    
    .war-page .team-card .team-badge {
        width: 100px !important;
        height: 100px !important;
    }
    
    .war-page .team-card .stars {
        font-size: 2.2rem !important;
    }
    
    .war-page .team-card .destruction {
        font-size: 1.1rem !important;
    }
    
    .war-page .vs {
        width: 80px !important;
        height: 80px !important;
        font-size: 1.8rem !important;
    }
    
    /* Tableaux : UNE SEULE COLONNE */
    .war-page .members-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    .war-page .war-table {
        min-height: 300px !important;
    }
    
    .war-page .war-table .table-header {
        font-size: 1.1rem !important;
        padding: 1rem !important;
    }
    
    .war-page .member-row {
        grid-template-columns: 50px 1fr 70px !important;
        padding: 0.875rem !important;
        gap: 0.75rem !important;
    }
    
    .war-page .member-position {
        font-size: 1rem !important;
        padding: 0.375rem !important;
    }
    
    .war-page .member-name {
        font-size: 0.95rem !important;
    }
    
    .war-page .member-stars {
        font-size: 1rem !important;
        padding: 0.375rem !important;
    }
    
    /* Détails : 2 colonnes */
    .details-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }
    
    .detail-item {
        padding: 1rem !important;
    }
    
    .detail-value {
        font-size: 1.15rem !important;
    }
}

/* PETIT MOBILE : 480px et moins */
@media screen and (max-width: 480px) {
    /* Stats : 1 colonne */
    .war-stats-overview {
        grid-template-columns: 1fr !important;
        padding: 0.875rem !important;
        gap: 0.625rem !important;
    }
    
    .war-stats-overview .stat-item {
        padding: 0.75rem !important;
    }
    
    /* Cartes plus compactes */
    .war-page .team-card {
        padding: 1.25rem !important;
    }
    
    .war-page .team-card .team-header h3 {
        font-size: 1.15rem !important;
    }
    
    .war-page .team-card .team-name {
        font-size: 1rem !important;
    }
    
    .war-page .team-card .team-badge {
        width: 85px !important;
        height: 85px !important;
        border-width: 3px !important;
    }
    
    .war-page .team-card .stars {
        font-size: 2rem !important;
        margin: 0.75rem 0 !important;
    }
    
    .war-page .team-card .destruction {
        font-size: 1rem !important;
    }
    
    .war-page .vs {
        width: 70px !important;
        height: 70px !important;
        font-size: 1.6rem !important;
    }
    
    /* Tableaux ultra-compacts */
    .war-page .war-table {
        min-height: 280px !important;
    }
    
    .war-page .war-table .table-header {
        font-size: 1rem !important;
        padding: 0.875rem !important;
    }
    
    .war-page .member-row {
        grid-template-columns: 45px 1fr 65px !important;
        padding: 0.75rem 0.625rem !important;
        gap: 0.625rem !important;
    }
    
    .war-page .member-position {
        font-size: 0.95rem !important;
        padding: 0.3rem !important;
    }
    
    .war-page .member-name {
        font-size: 0.9rem !important;
    }
    
    .war-page .member-stars {
        font-size: 0.95rem !important;
        padding: 0.3rem !important;
    }
    
    /* Détails : 1 colonne */
    .details-grid {
        grid-template-columns: 1fr !important;
        gap: 0.875rem !important;
    }
    
    .detail-item {
        padding: 0.875rem !important;
    }
    
    .detail-label {
        font-size: 0.8rem !important;
    }
    
    .detail-value {
        font-size: 1.1rem !important;
    }
    
    .war-details {
        padding: 1.5rem !important;
        margin-top: 2rem !important;
    }
    
    .war-details h4 {
        font-size: 1.3rem !important;
        margin-bottom: 1.5rem !important;
    }
}

/* Scrollbar personnalisée */
.war-page .war-table .table-list::-webkit-scrollbar {
    width: 8px;
}

.war-page .war-table .table-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.war-page .war-table .table-list::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

/* Empêcher les débordements */
.war-page * {
    max-width: 100%;
}

.war-page .container,
.war-page .content,
.war-page .war-container {
    overflow-x: hidden;
}

/* ==================== FORMULAIRES ==================== */

.form-container {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 12px;
    margin: 3rem 0 1rem;
    border: 1px solid var(--border);
}

.form-container h2 {
    margin-bottom: 1.5rem;
    color: var(--accent);
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-light);
    font-weight: 600;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.form-button {
    flex: 1;
    min-width: 150px;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.form-button {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.form-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

.form-button.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

.form-button.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ==================== FOOTER ==================== */

.footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-muted);
    margin-top: 2rem;
    border-top: 1px solid var(--border);
}

.footer p {
    margin: 0.5rem 0;
}

/* ==================== RESPONSIVE ==================== */

/* Tablette (768px - 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 15px;
    }
    
    .header {
        padding: 1.5rem;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .content {
        padding: 1.5rem;
    }
    
    /* Correction pour les cartes équipe */
    .war-page .teams-section {
        grid-template-columns: 1fr auto 1fr;
        gap: 1.5rem;
    }
    
    .war-page .team-card {
        padding: 1.2rem;
    }
    
    .war-page .team-card .team-header h3 {
        font-size: 1.2rem;
    }
    
    .war-page .team-card .team-name {
        font-size: 1.1rem;
    }
    
    .war-page .team-card .team-badge {
        width: 90px;
        height: 90px;
    }
    
    .war-page .team-card .stars {
        font-size: 2rem;
    }
    
    .war-page .vs {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .war-page .members-grid {
        gap: 1.5rem;
    }
    
    .war-page .member-row {
        grid-template-columns: 45px 1fr 65px;
        gap: 0.75rem;
        padding: 0.75rem;
    }
    
    .war-page .member-name {
        font-size: 0.9rem;
    }
    
    .clan-header {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .clan-info-main {
        min-width: auto;
    }
    
    .clan-badge-large {
        width: 120px;
        height: 120px;
    }
    
    .clan-name {
        font-size: 2rem;
    }
}

/* Mobile (768px et moins) */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header {
        padding: 1.5rem 1rem;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .content {
        padding: 1.25rem;
    }
    
    /* Menu hamburger */
    .menu-toggle {
        display: block;
    }
    
    .nav ul {
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-card);
        padding: 1rem;
        border-radius: 8px;
        margin-top: 0.5rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        display: none;
        z-index: 1000;
    }
    
    .nav ul.show {
        display: flex;
    }
    
    .nav li {
        width: 100%;
    }
    
    .nav a {
        width: 100%;
        text-align: center;
    }
    
    /* Correction IMPORTANTE pour les cartes équipe sur mobile */
    .war-page .teams-section {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
    }
    
    .war-page .team-card {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .war-page .vs-container {
        order: 0;
        margin: 0.5rem 0;
        padding: 0;
    }
    
    .war-page .vs {
        width: 70px;
        height: 70px;
        font-size: 1.7rem;
    }
    
    .war-page .members-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .war-page .war-table {
        min-height: 250px;
    }
    
    .war-page .member-row {
        grid-template-columns: 40px 1fr 60px;
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .war-page .member-name {
        font-size: 0.9rem;
    }
    
    .war-stats-overview,
    .clan-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 1rem;
    }
    
    /* Cacher certaines colonnes sur mobile */
    .members-table th:nth-child(2),
    .members-table td:nth-child(2),
    .members-table th:nth-child(3),
    .members-table td:nth-child(3),
    .members-table th:nth-child(7),
    .members-table td:nth-child(7) {
        display: none;
    }
    
    /* Formulaire */
    .form-buttons {
        flex-direction: column;
    }
    
    .form-button {
        width: 100%;
    }
    
    .clan-header {
        padding: 1.25rem;
    }
    
    .clan-badge-large {
        width: 100px;
        height: 100px;
    }
    
    .clan-name {
        font-size: 1.8rem;
    }
}

/* Petit mobile (480px et moins) */
@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5rem;
    }
    
    .header p {
        font-size: 0.9rem;
    }
    
    .war-stats-overview,
    .clan-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .war-page .team-card {
        padding: 1rem;
    }
    
    .war-page .team-card .team-header h3 {
        font-size: 1.1rem;
    }
    
    .war-page .team-card .team-name {
        font-size: 1rem;
    }
    
    .war-page .team-card .team-badge {
        width: 80px;
        height: 80px;
    }
    
    .war-page .team-card .stars {
        font-size: 1.8rem;
    }
    
    .war-page .team-card .destruction {
        font-size: 1rem;
    }
    
    .war-page .vs {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .war-page .member-row {
        grid-template-columns: 35px 1fr 55px;
        padding: 0.625rem;
        gap: 0.625rem;
        font-size: 0.85rem;
    }
    
    .war-page .war-table .table-header {
        font-size: 1rem;
        padding: 0.875rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    /* Cacher plus de colonnes sur très petit mobile */
    .members-table th:nth-child(5),
    .members-table td:nth-child(5) {
        display: none;
    }
    
    .members-table th,
    .members-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }
}

/* ==================== ANIMATIONS POUR JS ==================== */

/* Animation de fade-in pour le JS existant */
[style*="opacity: 0"] {
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Animation pour le menu */
.nav ul {
    transition: all 0.3s ease;
}

/* ==================== SCROLLBAR ==================== */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

.war-page .war-table .table-list::-webkit-scrollbar {
    width: 6px;
}

/* ========================================
   CORRECTION STRUCTURELLE HTML
   ======================================== */

/* Pour s'assurer que tout s'affiche correctement */
.war-page * {
    max-width: 100%;
}

/* Empêcher les débordements horizontaux */
.war-page .container,
.war-page .content,
.war-page .war-container {
    overflow-x: hidden;
}