/************************************
*       World Map Page
************************************/
/* Hauteurs réduites depuis A3 : la carte partage désormais l'écran avec le
   CTA au-dessus et le bandeau des dernières photos en dessous. */
#worldmap { height: 340px; overflow: visible; position: relative; }
@media(max-width:767px) { #worldmap { height: 220px; } }
@media(min-width:1200px) { #worldmap { height: 480px; } }

/************************************
*       A3 — En-tête d'accueil
************************************/
.home-hero { padding: 1.5rem 0 1rem; }
.home-hero__title {
    font-weight: 700;
    letter-spacing: -.02em;
    margin-bottom: .25rem;
}
.home-hero__subtitle {
    color: var(--bs-secondary-color, #6c757d);
    margin-bottom: 1.25rem;
}
.home-hero__cta {
    font-size: 1.15rem;
    font-weight: 600;
    padding: .75rem 2rem;
    border-radius: 999px;
    box-shadow: 0 .35rem 1rem rgba(0, 0, 0, .18);
}
@media(max-width:575px) {
    .home-hero__cta { width: 100%; font-size: 1.05rem; }
}

/************************************
*       A3/A4 — Surimpression carte
************************************/
.map-wrap { position: relative; }
.map-overlay {
    position: absolute;
    left: 0;
    bottom: 0;
    z-index: 5;
    max-width: min(320px, 92%);
    padding: .6rem .9rem;
    border-radius: .5rem;
    text-align: left;
    /* La carte passe dessous : fond translucide plutôt qu'opaque. */
    background: rgba(255, 255, 255, .82);
    backdrop-filter: blur(4px);
    pointer-events: none;   /* ne vole jamais un clic destiné à un pays */
}
.map-overlay__counter { font-size: .95rem; line-height: 1.35; }
.map-overlay__dot { opacity: .45; margin: 0 .25rem; }
.map-overlay__local {
    margin-top: .3rem;
    font-size: .85rem;
    font-style: italic;
    color: #b45309;
}
@media(max-width:767px) {
    .map-overlay { position: static; max-width: none; text-align: center;
                   background: none; backdrop-filter: none; padding: .75rem 0 0; }
}

/************************************
*       A3 — Bandeau dernières photos
************************************/
.recent-strip { margin: 1.75rem 0 2rem; }
.recent-strip__title {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--bs-secondary-color, #6c757d);
    margin-bottom: .6rem;
}
/* Grille sur écran large, défilement horizontal sur mobile : cinq vignettes
   côte à côte deviennent illisibles sous 576 px. */
.recent-strip__row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: .6rem;
}
@media(max-width:575px) {
    .recent-strip__row {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    .recent-strip__item { flex: 0 0 45%; scroll-snap-align: start; }
}
.recent-strip__item {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: .5rem;
    text-decoration: none;
}
.recent-strip__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}
.recent-strip__item:hover img { transform: scale(1.06); }
/* Nom du contributeur en semi-transparent sur la photo. Le dégradé garantit
   la lisibilité quelle que soit la photo dessous. */
.recent-strip__user {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1.5rem .5rem .4rem;
    font-size: .8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, .85);
    text-shadow: 0 1px 3px rgba(0, 0, 0, .6);
    background: linear-gradient(to top, rgba(0, 0, 0, .55), transparent);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* ── Datamaps overrides (shared with profile map) ── */
.datamaps-hoverover {
    z-index: 1000;
    pointer-events: none;
    max-width: min(280px, 90vw);   /* never overflow viewport on small screens */
}
.datamaps-hoverover .hoverinfo { border: none !important; padding: 0 !important; box-shadow: none !important; }
/* Ensure the hoverinfo itself wraps correctly on narrow screens */
.datamaps-hoverover .hoverinfo table { width: 100%; }
/* Keep tooltip inside viewport on the right edge */
@media(max-width:991px) {
    .datamaps-hoverover { left: auto !important; right: 8px; }
}
/* ── Mobile country panel ── */
#mobile-country-panel { display: none; }
#mobile-country-panel.active { display: block; }
@media(min-width:768px) { #mobile-country-panel { display: none !important; } }
/* ── Dark mode ── */
[data-bs-theme="dark"] .datamaps-hoverover .hoverinfo { color: var(--hs-text); }
[data-bs-theme="dark"] .map-overlay { background: rgba(24, 24, 27, .82); }
[data-bs-theme="dark"] .map-overlay__local { color: #fbbf24; }
@media(max-width:767px) {
    [data-bs-theme="dark"] .map-overlay { background: none; }
}
