/* --- BASE & TYPOGRAPHIE --- */
body {
    margin: 0;
    background-color: #120d16;
    color: #f4e1c1;
    font-family: 'Crimson Text', serif;
    overflow-x: hidden;
}

.interface-royale {
    display: flex;
    height: 100vh;
}

/* --- BARRE LATÉRALE (SIDEBAR) --- */
.sidebar-medievale {
    width: 250px;
    background: #1e141e;
    border-right: 2px solid #ffd700;
    padding: 20px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.logo-royal {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 20px;
}

.nav-link {
    display: block;
    color: #f4e1c1;
    text-decoration: none;
    padding: 12px;
    margin-bottom: 5px;
    border-left: 3px solid transparent;
    transition: 0.3s;
    cursor: pointer;
}

.nav-link:hover, .nav-link.active {
    background: rgba(255, 215, 0, 0.1);
    color: #ffd700;
    border-left: 3px solid #ffd700;
}

.separateur-menu {
    margin: 20px 0 10px;
    color: #8d6e63;
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* --- ZONE D'AFFICHAGE --- */
.zone-affichage {
    flex-grow: 1;
    overflow-y: auto;
    padding: 40px;
    background: linear-gradient(rgba(0,0,0,0.85), rgba(0,0,0,0.85)), url('fond.png') center/cover fixed;
}

/* Gestion des onglets */
.onglet-section {
    display: none; /* Caché par défaut */
}

.onglet-section.active {
    display: block; /* Affiché uniquement si actif */
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- PARCHEMIN (Accueil & Architecture) --- */
.parchemin-texte {
    background: #f4e4bc;
    color: #3e2723;
    padding: 30px;
    border-radius: 5px;
    max-width: 850px;
    margin: 0 auto 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid #d4b483;
}

.parchemin-texte h1, .parchemin-texte h2 {
    text-align: center;
    border-bottom: 2px dotted #8d6e63;
    padding-bottom: 10px;
}

/* --- TABLEAUX --- */
.table-wrapper {
    background: rgba(30, 20, 30, 0.8);
    border: 1px solid #ffd700;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 20px;
}

.table-donnees, .table-lois {
    width: 100%;
    border-collapse: collapse;
}

.table-donnees th, .table-lois th {
    background: #2c1e30;
    color: #ffd700;
    padding: 15px;
    border-bottom: 2px solid #ffd700;
}

.table-donnees td, .table-lois td {
    padding: 12px;
    border-bottom: 1px solid rgba(255,215,0,0.1);
    text-align: center;
}

/* --- ENCART ÉVÉNEMENT & ANIMATIONS --- */
.encart-annonce {
    background: rgba(44, 30, 48, 0.95);
    border: 2px solid #ffd700;
    border-radius: 10px;
    padding: 20px;
    margin: 20px auto;
    max-width: 800px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.sceau { font-size: 3rem; }

/* Cas Malus : Danger / Tempête */
.event-danger {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both infinite;
    border-color: #ff4d4d !important;
    box-shadow: 0 0 15px rgba(255, 77, 77, 0.5);
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* Cas Bonus : Succès / Prospérité */
.event-success {
    animation: glow-gold 2s infinite ease-in-out;
    border-color: #ffd700 !important;
}

@keyframes glow-gold {
    0%, 100% { box-shadow: 0 0 5px #ffd700; }
    50% { box-shadow: 0 0 25px #ffd700; }
}

/* --- COULEURS DES CONTINENTS --- */
.continent-sylvica { color: #2ecc71; font-weight: bold; }
.continent-lithera { color: #95a5a6; font-weight: bold; }
.continent-tempere { color: #3498db; font-weight: bold; }
.continent-forestia { color: #a67c52; font-weight: bold; }

/* --- FOOTER --- */
.legende-footer {
    position: fixed;
    bottom: 0;
    left: 250px;
    right: 0;
    background: #1e141e;
    padding: 10px;
    text-align: center;
    border-top: 1px solid #ffd700;
    color: #ffd700;
    font-size: 0.9rem;
}