/* --- VARIABLES DE DESIGN --- */
:root {
    --bg-body: #f4f7f6;
    --panel-bg: #ffffff;
    --text-main: #333333;
    --border-radius: 8px;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
    
    /* Couleurs thématiques AFJD (Nations) */
    --germany: #CEB087;
    --italy: #A8EDA5;
    --france: #98E4ED;
    --austria: #EDA89E;
    --england: #83B9CC;
    --sea: #BBD9DC;
    --neutral-grey: #EDEDED;
}

/* --- BASE --- */
body {
    font-size: 14px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    margin: 0;
    padding: 20px;
}

h1 {
    text-align: center;
    font-size: 24px;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 30px;
    border-bottom: 3px solid var(--england);
    display: inline-block;
    width: 100%;
}

/* --- BOUTONS --- */
.btn-menu, .btn-inside {
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.1);
    padding: 10px 15px;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-menu {
    background-color: var(--france);
    color: #000;
    margin-bottom: 10px;
}

.btn-menu:hover {
    background-color: var(--england);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-inside {
    background-color: #ffffff;
    font-size: 11px;
}

.btn-inside:hover {
    background-color: var(--neutral-grey);
}

/* --- GRILLE DE JEU --- */
#grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

/* --- MESSAGES ET ANNONCES --- */
.text, .text_announce, .season, .replacement, .information, .instruction, .note, .important {
    padding: 12px 18px;
    margin: 10px 0;
    border-radius: var(--border-radius);
    border-left: 6px solid rgba(0,0,0,0.1);
    box-shadow: 2px 2px 5px rgba(0,0,0,0.05);
}

.season {
    background-color: var(--france);
    font-weight: bold;
    font-family: 'Georgia', serif;
}

.important {
    background-color: var(--austria);
    font-weight: bold;
    border-left-color: #c0392b;
}

.instruction {
    background-color: var(--italy);
    border-left-color: #27ae60;
}

.note {
    background-color: var(--france);
}

/* --- CONSOLE / CODES --- */
[class^="code_"] {
    font-family: 'Consolas', 'Monaco', monospace;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
}

.code_success { color: #27ae60; border: 1px solid #27ae60; }
.code_failed { color: #e74c3c; border: 1px solid #e74c3c; }
.code_info { color: #2980b9; border: 1px solid #2980b9; }

/* --- TOOLTIP --- */
.tooltip {
    position: relative;
    border-bottom: 1px dotted #333;
    cursor: help;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 150px;
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 8px;
    border-radius: 6px;
    position: absolute;
    z-index: 10;
    bottom: 125%; 
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    border: 1px solid #eee;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* --- TABLEAUX --- */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
    border: 1px solid #eee;
}

thead {
    background-color: var(--england);
    color: white;
}

thead th {
    border-color: rgba(255, 255, 255, 0.3);
}

tr:hover {
    background-color: #f9f9f9;
}

/* --- SECTIONS SPÉCIFIQUES --- */
#page, #home, #login, #create {
    background: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    max-width: 1000px;
    margin: 20px auto;
}

legend {
    background-color: var(--germany);
    padding: 5px 15px;
    border-radius: 4px;
    font-weight: bold;
    color: #5d4037;
}

/* Animation de chargement */
.load {
    font-style: italic;
    color: var(--england);
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}
