/* Minorités Page Styles */
.minorites-page-container {
    background-color: rgba(10, 9, 8, 0.2);
    /* Très léger voile pour laisser passer la couleur de l'atmosphère */
    color: #f2f2f2;
    min-height: 100vh;
    padding-top: 100px;
}

.minorites-header {
    text-align: center;
    padding: 2rem 0;
    position: relative;
    z-index: 2;
}

.minorites-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3.5rem;
    color: #d4a574;
    /* Gold */
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 300;
}

.minorites-subtitle {
    font-size: 1.1rem;
    color: #888;
    max-width: 600px;
    margin: 0 auto;
    font-style: italic;
}

/* Map Container */
.china-map-container {
    width: 100%;
    max-width: 1000px;
    margin: 2rem auto;
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    padding-bottom: 4rem;
}

.china-map-svg,
.kabuki-china-map svg {
    width: 100%;
    max-width: 900px;
    height: auto;
    max-height: 80vh;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 0 20px rgba(0, 0, 0, 0.8));
    overflow: visible;
}

/* Target paths inside our container specifically */
.kabuki-china-map svg path {
    fill: #5c5c5c;
    /* Éclairci radicalement (était #3a3a3a) */
    stroke: #777;
    /* Bordure plus claire */
    stroke-width: 0.6;
    transition: all 0.4s ease;
    cursor: pointer;
    vector-effect: non-scaling-stroke;
}

.kabuki-china-map svg path:hover,
.kabuki-china-map svg path.active,
.kabuki-china-map svg path.hovered {
    fill: #2a3a30;
    /* Dark Jade */
    stroke: #d4a574;
    /* Gold */
    /* Removed stroke-width: 2 which caused jitter/layout shift */
    stroke-width: 1;
    filter: drop-shadow(0 0 10px rgba(212, 165, 116, 0.3));
    z-index: 10;
}

.province-path:hover,
.province-path.active {
    fill: #2a3a30;
    /* Dark Jade */
    stroke: #d4a574;
    /* Gold */
    stroke-width: 2;
    filter: drop-shadow(0 0 10px rgba(212, 165, 116, 0.3));
}

/* Specific styling for mapped provinces (Guizhou pilot) */
/* Specific styling for mapped provinces (Guizhou pilot - now dynamic) */
/* Old ID removed as we use generic paths now */


/* Sidebar / Drawer for Details */
.minorites-drawer {
    position: fixed;
    top: 0;
    right: -480px;
    width: 450px;
    height: 100vh;
    background: rgba(10, 9, 8, 0.4);
    /* Très transparent */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-left: 1px solid rgba(212, 165, 116, 0.3);
    z-index: 999999;
    /* Ensure it's above everything */
    transition: right 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 2rem;
    padding-bottom: 120px;
    /* Extra padding to prevent cutoff */
    overflow-y: auto;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8);
    box-sizing: border-box;
}

.minorites-drawer.open {
    right: 0;
}

.drawer-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: #d4a574;
    font-size: 1.5rem;
    cursor: pointer;
}

.drawer-header {
    margin-top: 3rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #333;
    padding-bottom: 1rem;
}

.drawer-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.5rem;
    color: #e0e0e0;
    margin-bottom: 0.5rem;
}

.drawer-subtitle {
    color: #d4a574;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.8rem;
}

.ethnie-list-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.ethnie-card {
    display: flex;
    align-items: center;
    padding: 15px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #ccc;
    position: relative;
    overflow: hidden;
}

.ethnie-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: #d4a574;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.ethnie-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
    color: #fff;
}

/* White text on hover */

.ethnie-card:hover::before {
    transform: scaleY(1);
}

.ethnie-thumb {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 1.5rem;
    border: 1px solid #444;
}

.ethnie-info h3 {
    margin: 0;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    color: #e0e0e0;
}

.ethnie-info p {
    margin: 2px 0 0 0;
    font-size: 0.85rem;
    color: #888;
}

/* Tooltip for map */
/* Info Box (replaces Tooltip) */
.map-tooltip {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(10, 9, 8, 0.9);
    color: #d4a574;
    padding: 15px 25px;
    border-radius: 2px;
    pointer-events: none;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    z-index: 20;
    display: none;
    /* Shown by JS */
    border: 1px solid #d4a574;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    min-width: 150px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

@media (max-width: 768px) {
    .china-map-container {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    .minorites-drawer {
        width: 90%;
        /* Wider on mobile */
        max-width: none;
        right: -100%;
        /* Fully hide */
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.9);
    }

    .minorites-drawer.open {
        right: 0;
    }

    /* Adjust Close Button */
    .drawer-close {
        top: 15px;
        right: 15px;
        font-size: 2rem;
        padding: 10px;
        /* Larger touch target */
    }

    /* Move Info Box */
    .map-tooltip {
        top: auto;
        bottom: 20px;
        right: 50%;
        transform: translateX(50%);
        width: 80%;
        text-align: center;
    }
}