/* ============================================================
   Skipper Map — main.css
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

:root {
    --color-bg: #0a1628;
    --color-water: #1a3a5c;
    --color-accent: #e8a020;
    --color-text: #ffffff;
    --color-text-muted: rgba(255, 255, 255, 0.6);
    --ui-padding: 1.5rem;
    --border-radius: 6px;
}

html, body { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; background: #000408; color: var(--color-text); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; }

.template_home { position: relative; width: 100vw; height: 100vh; height: 100dvh; }

/* ---- Carte plein écran ---- */

.map_fullscreen { position: absolute; inset: 0; width: 100%; height: 100%; background: var(--color-bg); z-index: 0; }

/* Masquer les contrôles Cesium natifs */
.cesium-viewer-toolbar,
.cesium-viewer-animationContainer,
.cesium-viewer-timelineContainer,
.cesium-viewer-bottom,
.cesium-widget-credits { display: none !important; }

/* ---- Navbar ---- */

.navbar { position: absolute; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 0 36px; height: 72px; background: linear-gradient(to bottom, rgba(0,4,12,0.65) 0%, rgba(0,4,12,0.0) 100%); pointer-events: auto; }

.navbar_logo { display: flex; align-items: center; gap: 12px; }

.navbar_logo_icon { width: 16px; height: 16px; flex-shrink: 0; }

.navbar_logo_name { font-size: 0.86rem; font-weight: 400; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.8); }

.navbar_nav { display: flex; align-items: center; gap: 40px; }

.navbar_link { font-size: 0.83rem; font-weight: 300; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.45); text-decoration: none; transition: color 0.2s; padding-bottom: 2px; }
.navbar_link:hover { color: rgba(255,255,255,0.85); }
.navbar_link--active { color: rgba(255,255,255,0.9); border-bottom: 1px solid rgba(255,255,255,0.5); }

.navbar_burger { display: flex; flex-direction: column; justify-content: center; gap: 6px; background: none; border: none; cursor: pointer; padding: 4px; margin-left: 8px; }
.navbar_burger span { display: block; width: 20px; height: 2px; border-radius: 3px; background: rgba(255,255,255,0.5); transition: background 0.2s; }
.navbar_burger:hover span { background: rgba(255,255,255,0.9); }

/* ---- UI overlay ---- */

.map_ui { position: absolute; inset: 0; z-index: 10; pointer-events: none; }

/* ---- Contrôles zoom ---- */

.map_zoom_controls { position: absolute; top: 50%; transform: translateY(-50%); right: var(--ui-padding); display: flex; flex-direction: column; gap: 2px; pointer-events: auto; }

.map_zoom_in,
.map_zoom_out { width: 36px; height: 36px; background: rgba(120,125,150,0.2); border: 1px solid rgba(255,255,255,0.1); border-radius: 20px; color: rgba(255,255,255,0.6); font-size: 1.1rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s, color 0.2s; backdrop-filter: blur(4px); }
.map_zoom_in:hover,
.map_zoom_out:hover { background: rgba(120,125,150,0.4); color: #ffffff; }

/* ---- Toolbar calques (gauche) ---- */

.map_layers_toolbar { position: absolute; top: 50%; left: var(--ui-padding); transform: translateY(-50%); display: flex; flex-direction: column; gap: 6px; pointer-events: auto; }

.map_layer_btn { visibility: hidden; width: 40px; height: 40px; background: rgba(0,4,8,0.55); border: 1px solid rgba(255,255,255,0.12); border-radius: 10px; color: rgba(255,255,255,0.5); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; backdrop-filter: blur(6px); transition: background 0.2s, border-color 0.2s, color 0.2s; padding: 0; }
.map_layer_btn:hover { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.85); border-color: rgba(255,255,255,0.25); }
.map_layer_btn.is-active { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.4); color: #ffffff; }

.map_layer_btn_label { font-size: 0.52rem; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1; }

/* ---- Timeline ---- */

.timeline { position: absolute; bottom: 0; left: 0; right: 0; z-index: 20; height: 146px; background: linear-gradient(to top, rgba(0,4,8,0.9) 0%, transparent 100%); pointer-events: auto; }

.timeline_arc_wrap { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 851px; height: 100%; pointer-events: auto; }

.timeline_arc_wrap .timeline_arrow { position: absolute; bottom: 52px; z-index: 2; }
.timeline_arc_wrap .timeline_arrow#tl_prev { left: calc(50% - 72px); }
.timeline_arc_wrap .timeline_arrow#tl_next { left: calc(50% + 32px); }

.timeline_svg { width: 100%; height: 100%; overflow: visible; pointer-events: auto; }

.timeline_arrow { position: relative; z-index: 2; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.35); border-radius: 50%; color: rgba(255,255,255,0.85); width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; font-size: 1rem; cursor: pointer; flex-shrink: 0; backdrop-filter: blur(4px); transition: background 0.2s, border-color 0.2s, color 0.2s; }
.timeline_arrow:hover { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.7); color: #ffffff; }

/* ---- HUD voyage (bas droite) ---- */

.voyage_hud { position: absolute; bottom: 40px; right: 32px; z-index: 20; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; pointer-events: auto; }

.voyage_hud_timer { display: flex; align-items: baseline; gap: 6px; line-height: 1; }

.voyage_hud_prefix { font-family: 'Helvetica Neue', monospace; font-size: 0.83rem; font-weight: 300; color: rgba(255,255,255,0.45); letter-spacing: 0.05em; }

.voyage_hud_days { font-family: 'Helvetica Neue', monospace; font-size: 2.64rem; font-weight: 200; color: #ffffff; letter-spacing: 0.06em; line-height: 1; }

.voyage_hud_unit { font-family: 'Helvetica Neue', monospace; font-size: 0.66rem; font-weight: 400; letter-spacing: 0.2em; color: rgba(255,255,255,0.35); text-transform: uppercase; align-self: flex-end; padding-bottom: 4px; }

.voyage_hud_sub { font-family: 'Helvetica Neue', monospace; font-size: 0.85rem; letter-spacing: 0.1em; color: rgba(255,255,255,0.7); text-transform: uppercase; }

/* ---- Compteur miles ---- */

.miles_gauge { position: absolute; bottom: 20px; left: 60px; z-index: 20; width: 157px; height: 157px; pointer-events: none; }

.miles_gauge_svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(150deg); }

.miles_gauge_track { fill: none; stroke: rgba(255,255,255,0.08); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 209.4 314.2; }

.miles_gauge_fill { fill: none; stroke: rgba(255,255,255,0.75); stroke-width: 6; stroke-linecap: round; }

.miles_gauge_inner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }

.miles_gauge_label { font-size: 0.52rem; letter-spacing: 0.18em; color: rgba(255,255,255,0.4); text-transform: uppercase; margin-bottom: 2px; }

.miles_gauge_value { font-size: 2rem; font-weight: 200; letter-spacing: 0.04em; color: #ffffff; line-height: 1; }

.miles_gauge_unit { font-size: 0.55rem; letter-spacing: 0.15em; color: rgba(255,255,255,0.4); text-transform: uppercase; margin-top: 3px; }

/* ---- Tooltip point actif ---- */

@keyframes hud_in { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: translateX(0); } }

.point_hud { position: fixed; z-index: 25; pointer-events: none; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; width: 280px; transform: translate(32px, -50%); opacity: 0; visibility: hidden; }
.point_hud.is-visible { opacity: 1; visibility: visible; }
.point_hud.is-visible .point_hud_date   { animation: hud_in 0.18s cubic-bezier(0.2,0,0,1) 0ms   both; }
.point_hud.is-visible .point_hud_title  { animation: hud_in 0.22s cubic-bezier(0.2,0,0,1) 60ms  both; }
.point_hud.is-visible .point_hud_coords { animation: hud_in 0.22s cubic-bezier(0.2,0,0,1) 120ms both; }
.point_hud_date { font-size: 1rem; font-weight: 300; letter-spacing: 0.1em; color: #ffffff; text-transform: uppercase; }
.point_hud_title { font-size: 2rem; font-weight: 400; color: #ffffff; line-height: 1.2; max-width: 420px; }
.point_hud_coords { font-size: 1rem; font-family: 'Helvetica Neue', monospace; letter-spacing: 0.08em; color: rgba(255,255,255,0.45); }

/* ---- Panel actu ---- */

.actu_panel { position: fixed; top: 80px; right: 80px; width: 380px; height: auto; max-height: calc(100vh - 240px); z-index: 31; background: rgba(255, 255, 255, 1); backdrop-filter: blur(24px); border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; display: flex; flex-direction: column; transform: translateX(calc(100% + 40px)); transition: transform 0.45s cubic-bezier(0.4,0,0.2,1), opacity 0.45s; opacity: 0; pointer-events: auto; }
.actu_panel.is-open { transform: translateX(0); opacity: 1; }

.actu_panel_close { position: absolute; top: 20px; right: 20px; background: none; border: none; color: rgba(0,0,0,0.3); font-size: 1.4rem; cursor: pointer; line-height: 1; padding: 4px; transition: color 0.15s; z-index: 2; }
.actu_panel_close:hover { color: rgba(0,0,0,0.8); }

.actu_panel_inner { overflow-y: auto; padding: 48px 32px 32px; display: flex; flex-direction: column; gap: 14px; }

.actu_panel_backdrop { position: fixed; inset: 0; z-index: 28; background: transparent; display: none; }
.actu_panel_backdrop.is-open { display: block; }

.actu_panel_title { font-size: 1.35rem; font-weight: 500; color: #0a0f1a; line-height: 1.3; margin: 0; }

.actu_panel_meta { display: flex; flex-direction: column; gap: 3px; }
.actu_panel_lieu { font-size: 0.78rem; color: rgba(0,0,0,0.45); letter-spacing: 0.05em; }
.actu_panel_date { font-size: 0.88rem; font-weight: 500; color: rgba(0,0,0,0.55); letter-spacing: 0.04em; }

.actu_panel_desc { font-size: 0.88rem; color: rgba(0,0,0,0.6); line-height: 1.65; margin-top: 4px; }
.actu_panel_espece { font-size: 1rem; font-weight: 500; color: #3a8ab0; margin-top: 4px; }

.actu_panel_video { position: relative; width: 100%; border-radius: 10px; overflow: hidden; margin-top: 8px; }

/* ---- Galerie panel ---- */
.actu_panel_gallery { margin-top: 8px; }
.actu_panel_gallery .swiper { border-radius: 10px; overflow: hidden; }
.actu_panel_gallery .swiper-slide img { width: 100%; height: 220px; object-fit: cover; display: block; cursor: zoom-in; }
.actu_panel_gallery .swiper-button-prev,
.actu_panel_gallery .swiper-button-next { --swiper-navigation-color: #fff; --swiper-navigation-size: 18px; }
.actu_panel_gallery .swiper-pagination-bullet-active { background: #0a0f1a; }
.panel_gallery_fullscreen { position: absolute; bottom: 10px; right: 10px; z-index: 10; background: rgba(0,0,0,0.45); border: none; color: #fff; font-size: 1rem; width: 32px; height: 32px; border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); transition: background 0.15s; }
.panel_gallery_fullscreen:hover { background: rgba(0,0,0,0.75); }

/* Plyr customisation */
.actu_panel_video .plyr { --plyr-color-main: #0a0f1a; --plyr-control-radius: 6px; --plyr-video-control-color: #ffffff; border-radius: 10px; }
.actu_panel_video .plyr__control--overlaid { background: rgba(10,15,26,0.75); border: 1px solid rgba(255,255,255,0.2); backdrop-filter: blur(8px); width: 56px; height: 56px; }
.actu_panel_video .plyr__control--overlaid svg { width: 20px; height: 20px; }
.actu_panel_video .plyr__control--overlaid:hover { background: rgba(10,15,26,0.95); }


/* Mobile — bottom sheet */
@media (max-width: 768px) {
    .navbar { background: none; padding: 0; height: auto; pointer-events: none; }
    .miles_gauge { display: none; }
    .voyage_hud { display: none; }
    .map_zoom_controls { display: none; }
    .navbar_logo { display: none; }
    .navbar_nav { gap: 0; }
    .navbar_link { display: none; }
    .navbar_burger { position: fixed; top: 20px; right: 20px; z-index: 100; padding: 8px; pointer-events: auto; }

    .actu_panel { top: auto; right: 0; left: 0; bottom: 0; width: 100%; height: 70vh; border: none; border-top: 1px solid rgba(255,255,255,0.1); border-radius: 20px 20px 0 0; transform: translateY(calc(100% + 40px)); }
    .actu_panel.is-open { transform: translateY(0); }
    .actu_panel_inner { padding: 48px 24px 120px; }
}
