:root {
    --pt-green: #046A38;
    --pt-red: #DA291C;
    --bg-light: #f4f6f8;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-light);
    color: #333;
}

/* Bandeau supérieur */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #046A38;
    color: white;
    padding: 10px 25px;
    position: relative;
    overflow: visible; /* Laisse dépasser le drapeau en relief */
}

/* Effet de mouvement flottant sur le drapeau portugais */
/* Conteneur et drapeau avec effet de vague */
.flag-container {
    position: relative;
    perspective: 600px;
}

.floating-flag {
    width: 75px;
    height: auto;
    border-radius: 4px;
    /* Ombre portée intense pour faire ressortir le drapeau du fond vert */
    box-shadow: 0 10px 20px rgba(0,0,0,0.4), 0 2px 5px rgba(0,0,0,0.3);
    /* Animation combinée : flottement + effet de vague 3D */
    animation: waveMotion 4s ease-in-out infinite;
    transform-origin: left center;
}

/* Animation effet de vent / vague 3D */
@keyframes waveMotion {
    0% {
        transform: rotateY(0deg) translateY(0px) skewY(0deg);
    }
    25% {
        transform: rotateY(-12deg) translateY(-5px) skewY(2deg);
    }
    50% {
        transform: rotateY(0deg) translateY(-8px) skewY(0deg);
    }
    75% {
        transform: rotateY(12deg) translateY(-3px) skewY(-2deg);
    }
    100% {
        transform: rotateY(0deg) translateY(0px) skewY(0deg);
    }
}

.container {
    padding: 15px;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.map-section {
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.svg-map-wrapper svg {
    width: 100%;
    max-height: 500px;
}

.jurisdictions path, .islands circle {
    fill: #e0e0e0;
    stroke: #ffffff;
    stroke-width: 2;
    transition: fill 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

.jurisdictions path:hover, .islands circle:hover {
    fill: var(--pt-red);
}

.info-box {
    margin-top: 15px;
    padding: 12px;
    background-color: #eef2f5;
    border-radius: 8px;
    font-weight: 500;
}
/* Overlay plein écran */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    display: none;
}

/* Carte du Pop-up */
.modal-content {
    background: #ffffff;
    width: 90%;
    max-width: 420px;
    border-radius: 12px;
    padding: 20px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 15px;
    border: none;
    background: none;
    font-size: 24px;
    cursor: pointer;
    color: #777;
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.modal-badge {
    background: var(--pt-green, #046A38);
    color: #fff;
    font-weight: bold;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
}

.modal-body {
    min-height: 80px;
    font-size: 14px;
    color: #444;
}

.btn-primary {
    width: 100%;
    background: var(--pt-green, #046A38);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
}

.btn-primary:active {
    background: #034b28;
}