/* ============================================================
   PROMETHEAN OVERRIDES – Leaflet Standard + Panneaux Droite
   ============================================================ */

:root {
    --sidebar-width: 450px;
    --rail-width: 90px;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --accent-color: #4834d4;
}

body {
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    font-family: 'Outfit', sans-serif;
    background: #f0f2f5;
}

/* --- NAVIGATION RAIL (DROITE) --- */
.nav-rail-right {
    position: fixed;
    top: 0;
    right: 0;
    width: var(--rail-width);
    height: 100vh;
    background: white;
    border-left: 1px solid rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 0;
    gap: 20px;
    z-index: 1100;
    box-shadow: -5px 0 15px rgba(0,0,0,0.05);
}

.nav-item {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    border: none;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-item.active { background: var(--accent-color); color: white; }
.nav-item .nav-icon { font-size: 2rem; }
.nav-item .nav-label { font-size: 0.65rem; font-weight: 700; margin-top: 2px; }

/* --- PANNEAUX COULISSANTS (DROITE) --- */
.panels-container-right {
    position: fixed;
    top: 0;
    bottom: 0;
    right: var(--rail-width);
    width: 0;
    z-index: 1050;
    overflow: visible;
    transition: width 0.4s ease;
}

.side-panel {
    position: absolute;
    top: 0;
    bottom: 0;
    right: -550px;
    width: var(--sidebar-width);
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    border-left: 1px solid rgba(0,0,0,0.1);
    transition: right 0.5s ease;
    padding: 25px;
    display: flex;
    flex-direction: column;
}

.side-panel.active { right: 0; }

.panel-content {
    flex: 1;
    overflow-y: auto;
}

.panel-content::-webkit-scrollbar { width: 5px; }
.panel-content::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 10px; }

.section-title {
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: #636e72;
    margin-bottom: 12px;
}

/* --- GRILLE DE TUILES (Panneau Projet) --- */
.tile-grid-panel {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.tile-category-header {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #636e72;
    padding: 12px 0 6px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    margin-bottom: 4px;
}

.tile-category-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

.tile-grid-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.tile-grid-btn:hover { background: #f1f3f5; border-color: rgba(0,0,0,0.15); }

.tile-grid-btn.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.tile-icon { font-size: 1.3rem; flex-shrink: 0; }
.tile-label { font-size: 0.78rem; font-weight: 600; line-height: 1.2; }

/* --- LISTE DES GÉOMÉTRIES (Panneau Figurés) --- */
.geometry-list-panel {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 10px;
    background: white;
    padding: 8px;
}

/* --- ÉDITEUR TEXTE --- */
.text-editor-container {
    background: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 15px;
    min-height: 300px;
    outline: none;
    font-size: 1rem;
    line-height: 1.6;
}

.text-editor-container:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(72, 52, 212, 0.1);
}

/* --- TITRE SUR LA CARTE --- */
.map-title-overlay {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    padding: 10px 25px;
    border-radius: 30px;
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    z-index: 1000;
    display: flex;
    align-items: center;
    font-weight: 700;
    color: var(--accent-color);
    font-size: 1.2rem;
    pointer-events: auto;
    transition: all 0.3s ease;
}

.map-title-overlay .toggle-icon {
    font-size: 0.9rem;
    color: #636e72;
}

/* CARTE */
.map-container-promethean {
    flex: 1;
    height: 85vh !important;
    margin-top: 15vh;
    position: relative;
    z-index: 1;
}