/* Styles de base communs à toute l'application */

/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

/* Centrage global de tout le contenu */
.main-container, 
section, 
.section {
    text-align: center;
    margin: 0 auto;
}

/* Les éléments doivent s'adapter à toutes les tailles d'écran */
* {
    box-sizing: border-box;
}

/* ===== STYLES COMPACTS POUR TOUS LES CARRÉS DE MATCHS ===== */

/* Carrés de matchs - COMPACT pour tous les formats */
.match-card {
    background: #ffffff;
    border: 3px solid #2c3e50;
    border-radius: 15px;
    padding: 15px;
    width: 280px;
    min-height: 180px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    margin: 10px 0;
}

.match-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 12px 35px rgba(0,0,0,0.2);
    border-color: #3498db;
}

.match-card.completed {
    border-color: #27ae60;
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
}

/* En-tête du match - Compact */
.match-header {
    background: linear-gradient(135deg, #34495e, #2c3e50);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    text-align: center;
    font-size: 1.0em;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Équipes dans chaque match - Plus compact */
.team {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 8px 12px;
    margin: 3px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    min-height: 35px;
}

.team.winner {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border-color: #28a745;
    color: #155724;
    font-weight: bold;
    box-shadow: 0 3px 8px rgba(40,167,69,0.25);
}

.team-name {
    font-size: 0.9em;
    font-weight: 600;
    color: #2c3e50;
    flex: 1;
    text-align: left;
}

.team.winner .team-name {
    color: #155724;
}

.team-score {
    background: linear-gradient(135deg, #e9ecef, #f8f9fa);
    border: 1px solid #ced4da;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.9em;
    font-weight: bold;
    color: #495057;
    min-width: 40px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.team.winner .team-score {
    background: linear-gradient(135deg, #28a745, #20c997);
    border-color: #1e7e34;
    color: white;
    box-shadow: 0 2px 6px rgba(40,167,69,0.3);
}

/* Contrôles du match - Compact */
.match-controls {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid #dee2e6;
    border-radius: 10px;
    padding: 10px;
    margin-top: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.score-input {
    margin-bottom: 8px;
}

.score-input label {
    display: block;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 4px;
    font-size: 0.9em;
}

.score-input input {
    width: 100%;
    padding: 6px 10px;
    border: 2px solid #ced4da;
    border-radius: 6px;
    font-size: 0.9em;
    transition: all 0.3s ease;
    background: white;
}

.score-input input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52,152,219,0.1);
    outline: none;
}

.winner-select {
    width: 100%;
    padding: 6px 10px;
    border: 2px solid #ced4da;
    border-radius: 6px;
    font-size: 0.9em;
    background: white;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.winner-select:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52,152,219,0.1);
    outline: none;
}

.match-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.match-actions button {
    padding: 6px 12px;
    font-size: 0.9em;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #27ae60;
    color: white;
}

.match-actions button:hover {
    background: #229954;
}

/* ===== FIN DES STYLES COMPACTS ===== */

/* Header commun */
header {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
}

.header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header-center {
    flex: 1;
    text-align: center;
}

.header-center h1 {
    color: #2c3e50;
    font-size: 2.5em;
    margin-bottom: 10px;
    margin: 0;
}

.header-center p {
    color: #7f8c8d;
    font-size: 1.2em;
    margin: 10px 0 0 0;
}

/* Boutons communs */
.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 5px;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

.btn-reset {
    background: #e74c3c;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-reset:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.btn-home {
    background: #27ae60;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-home:hover {
    background: #229954;
    transform: translateY(-2px);
}

.btn-auto {
    background: #e74c3c;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 5px;
}

.btn-auto:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

/* Sections communes */
.section {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.section:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.hidden {
    display: none;
}

/* Utilitaires communs */
.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .header-center {
        order: -1;
    }
    
    .header-center h1 {
        font-size: 2em;
    }
    
    .btn-home, .btn-reset {
        font-size: 12px;
        padding: 8px 16px;
    }
    
    .btn-auto {
        font-size: 14px;
        padding: 10px 20px;
    }
}
