@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;1,300&family=Inter:wght@300;400;500&display=swap');

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

body {
    margin: 0;
    overflow: hidden;
    background: radial-gradient(circle, #1a1f2c 0%, #050505 100%);
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    overscroll-behavior: none;
}

canvas {
    position: fixed !important;
    top: 0 !important; left: 0 !important;
    width: 100% !important; height: 100% !important;
    z-index: 1;
}

/* ============================================================
   LOGO
   ============================================================ */

/* ============================================================
   CONTENEUR
   ============================================================ */
.login-page {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100vh;
    pointer-events: none;
    z-index: 10;
}

/* ============================================================
   BOUTON DISCOVER
   ============================================================ */
#btn-Go {
    pointer-events: auto;
    position: fixed;
    bottom: 50px;
    width: 200px;
    padding: 16px 48px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 2px;
    background: transparent;
    color: rgba(255,255,255,0.85);
    cursor: pointer;
    transition: border-color 0.3s ease, color 0.3s ease;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 4px;
    text-transform: uppercase;
    z-index: 15;
    opacity: 1;
}
#btn-Go:hover {
    border-color: rgba(74,158,255,0.6);
    color: #ffffff;
}

/* ============================================================
   SOUS-TITRE DISCOVER
   ============================================================ */
#discover-subtitle {
    position: fixed;
    bottom: 18px;
    width: 100%;
    text-align: center;
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    letter-spacing: 3px;
    color: rgba(255,255,255,0.15);
    text-transform: uppercase;
    pointer-events: none;
    z-index: 15;
    transition: opacity 0.4s ease;
}

/* ============================================================
   BOUTON MES DESTINATIONS — haut droite
   ============================================================ */
#destinations-btn {
    pointer-events: auto;
    position: fixed;
    top: 20px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 7px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.25);
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    padding: 8px 4px;
    z-index: 30;
    transition: color 0.2s;
}
#destinations-btn:hover { color: rgba(74,158,255,0.7); }
#destinations-btn svg { flex-shrink: 0; transition: fill 0.2s, stroke 0.2s; }
#destinations-btn.has-favs { color: rgba(255,255,255,0.4); }
#destinations-btn.has-favs svg {
    fill: rgba(74,158,255,0.5);
    stroke: rgba(74,158,255,0.8);
}
#destinations-btn.has-favs:hover { color: rgba(74,158,255,0.9); }
#destinations-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px; height: 18px;
    background: rgba(74,158,255,0.15);
    border: 1px solid rgba(74,158,255,0.3);
    border-radius: 50%;
    font-size: 10px;
    color: rgba(74,158,255,0.9);
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1;
}

/* ============================================================
   BOUTON AUTRE DESTINATION
   ============================================================ */
#retry-btn {
    display: block;
    width: 100%;
    background: none;
    border: none;
    color: rgba(255,255,255,0.2);
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    padding: 14px 0 4px;
    text-align: center;
    transition: color 0.2s;
    pointer-events: auto;
}
#retry-btn:hover { color: rgba(74,158,255,0.55); }

/* ============================================================
   BOUTON FERMER × DESKTOP
   ============================================================ */
#close-panel {
    position: sticky;
    top: 16px;
    display: block;
    width: 36px; height: 36px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    color: rgba(255,255,255,0.5);
    font-size: 18px;
    line-height: 36px;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    z-index: 25;
    margin: 16px 16px 0 auto;
    pointer-events: auto;
}
#close-panel:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* ============================================================
   PANNEAU D'INFOS — DESKTOP
   ============================================================ */
#info-box {
    position: fixed;
    top: 0; right: -50%;
    height: 100vh; width: 45%;
    background: rgba(8,10,20,0.97);
    border-left: 1px solid rgba(255,255,255,0.07);
    overflow-y: auto;
    scrollbar-width: none;
    z-index: 20;
    pointer-events: auto;
}
#info-box::-webkit-scrollbar { display: none; }

/* ============================================================
   EN-TÊTE
   ============================================================ */
.info-header {
    padding: 36px 32px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
#info-region {
    font-family: 'Inter', sans-serif;
    font-size: 10px; letter-spacing: 3px;
    color: rgba(74,158,255,0.6);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
#info-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3rem;
    font-weight: 300;
    letter-spacing: 1px;
    color: #ffffff;
    line-height: 1.1;
    margin: 0;
    flex: 1;
}

/* Groupe des boutons d'action (cœur + partage) */
.title-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-top: 6px;
}

/* Style commun pour cœur et partage */
#fav-btn,
#share-btn {
    width: 36px; height: 36px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    color: rgba(255,255,255,0.4);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    pointer-events: auto;
}
#fav-btn:hover,
#share-btn:hover {
    background: rgba(74,158,255,0.12);
    border-color: rgba(74,158,255,0.3);
    color: rgba(74,158,255,0.8);
}

/* État actif (favori sauvegardé) */
#fav-btn.active {
    background: rgba(74,158,255,0.12);
    border-color: rgba(74,158,255,0.35);
    color: rgba(74,158,255,0.9);
}
#fav-btn.active svg {
    fill: rgba(74,158,255,0.7);
}
#fav-btn svg { transition: fill 0.2s; }

#info-desc {
    font-family: 'Inter', sans-serif;
    font-size: 13px; line-height: 1.8;
    color: rgba(255,255,255,0.45);
    font-weight: 300;
    margin-bottom: 20px;
}

/* ============================================================
   TOAST "Lien copié"
   ============================================================ */
#share-toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(74,158,255,0.15);
    border: 1px solid rgba(74,158,255,0.3);
    color: rgba(74,158,255,0.9);
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    letter-spacing: 1px;
    padding: 10px 20px;
    border-radius: 50px;
    z-index: 50;
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
}

/* ============================================================
   STATS
   ============================================================ */
.info-stats {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 1px; background: rgba(255,255,255,0.05);
}
.stat {
    padding: 16px 20px; background: rgba(8,10,20,0.95);
    display: flex; flex-direction: column; gap: 5px;
}
.stat-label { font-size: 9px; letter-spacing: 2px; color: rgba(255,255,255,0.3); text-transform: uppercase; }
.stat-value { font-size: 14px; color: #ffffff; }

/* ============================================================
   SITES
   ============================================================ */
.info-section { padding: 24px 32px; }
.section-title { font-size: 9px; letter-spacing: 3px; color: rgba(74,158,255,0.5); text-transform: uppercase; margin-bottom: 16px; }
.site-photo { width: 100%; height: 220px; object-fit: cover; object-position: center; border-radius: 8px; margin-bottom: 10px; }
.site-card { padding: 16px 18px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.06); margin-bottom: 10px; transition: border-color 0.2s; overflow: hidden; }
.site-card:hover { border-color: rgba(74,158,255,0.3); }
.site-name { font-family: 'Cormorant Garamond', serif; font-size: 16px; color: #ffffff; margin-bottom: 6px; }
.site-desc { font-size: 12px; line-height: 1.6; color: rgba(255,255,255,0.4); font-weight: 300; }

/* ============================================================
   FOOTER STUDIO
   ============================================================ */
.studio-footer {
    margin: 8px 32px 32px;
    padding: 20px 24px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
    background: rgba(255,255,255,0.02);
    display: flex; flex-direction: column; gap: 10px;
}
.studio-footer-top { display: flex; align-items: center; gap: 10px; }
.studio-footer-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 14px; font-style: italic;
    color: rgba(255,255,255,0.5); letter-spacing: 1px;
}
.studio-footer-tagline { font-size: 10px; color: rgba(255,255,255,0.2); line-height: 1.5; }
.studio-footer-links { display: flex; gap: 16px; }
.studio-footer-links a {
    font-size: 10px; letter-spacing: 1.5px;
    color: rgba(74,158,255,0.4); text-decoration: none;
    text-transform: uppercase; transition: color 0.2s;
}
.studio-footer-links a:hover { color: rgba(74,158,255,0.8); }

/* ============================================================
   BARRE STICKY FERMER + PARTAGER + CŒUR — mobile
   ============================================================ */
#close-bar {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 62px;
    background: rgba(8,10,20,0.98);
    border-top: 1px solid rgba(255,255,255,0.08);
    align-items: center;
    justify-content: center;
    gap: 10px;
    z-index: 25;
    pointer-events: auto;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
#close-bar button {
    display: flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 50px;
    color: rgba(255,255,255,0.6);
    font-family: 'Inter', sans-serif;
    font-size: 12px; letter-spacing: 1px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
#close-bar button:active { background: rgba(255,255,255,0.12); color: #fff; }

#fav-bar-btn {
    border-color: rgba(74,158,255,0.2) !important;
    color: rgba(74,158,255,0.6) !important;
}
#fav-bar-btn:active {
    background: rgba(74,158,255,0.12) !important;
    color: rgba(74,158,255,1) !important;
}
#fav-bar-btn.active {
    background: rgba(74,158,255,0.1) !important;
    border-color: rgba(74,158,255,0.35) !important;
    color: rgba(74,158,255,0.9) !important;
}
#fav-bar-btn.active svg { fill: rgba(74,158,255,0.6); }
#fav-bar-btn svg { transition: fill 0.2s; }

#share-bar-btn {
    border-color: rgba(74,158,255,0.2) !important;
    color: rgba(74,158,255,0.7) !important;
}
#share-bar-btn:active {
    background: rgba(74,158,255,0.12) !important;
    color: rgba(74,158,255,1) !important;
}

/* ============================================================
   BOUTON REVOIR
   ============================================================ */
#revoir-btn {
    pointer-events: auto;
    position: fixed;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    background: none;
    border: none;
    color: rgba(255,255,255,0.25);
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    cursor: pointer;
    padding: 8px 16px;
    z-index: 15;
    transition: color 0.2s;
    white-space: nowrap;
}
#revoir-btn:hover { color: rgba(74,158,255,0.6); }

/* ============================================================
   OVERLAY FAVORIS
   ============================================================ */
#favorites-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(5,7,15,0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 45;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    padding: 24px;
}

#favorites-modal {
    width: 100%;
    max-width: 480px;
    max-height: 80vh;
    background: rgba(10,13,26,0.98);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#favorites-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}

#favorites-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

#favorites-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    font-weight: 300;
    color: #ffffff;
    letter-spacing: 0.5px;
    margin: 0;
}

#favorites-close-btn {
    width: 32px; height: 32px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    color: rgba(255,255,255,0.4);
    font-size: 18px;
    line-height: 1;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    pointer-events: auto;
}
#favorites-close-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }

#fav-list {
    overflow-y: auto;
    scrollbar-width: none;
    padding: 8px 0 16px;
    flex: 1;
}
#fav-list::-webkit-scrollbar { display: none; }

/* État vide */
.fav-empty {
    padding: 48px 32px;
    text-align: center;
}
.fav-empty p {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    line-height: 1.8;
    color: rgba(255,255,255,0.2);
    font-weight: 300;
    margin: 0;
    font-style: italic;
}

/* Item favori */
.fav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 28px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    cursor: pointer;
    transition: background 0.2s;
}
.fav-item:last-child { border-bottom: none; }
.fav-item:hover { background: rgba(255,255,255,0.03); }
.fav-item:hover .fav-item-name { color: rgba(74,158,255,0.9); }

.fav-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}
.fav-item-region {
    font-family: 'Inter', sans-serif;
    font-size: 9px;
    letter-spacing: 2.5px;
    color: rgba(74,158,255,0.5);
    text-transform: uppercase;
}
.fav-item-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    font-weight: 300;
    color: rgba(255,255,255,0.85);
    letter-spacing: 0.5px;
    transition: color 0.2s;
}

.fav-item-remove {
    width: 28px; height: 28px;
    background: none;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 50%;
    color: rgba(255,255,255,0.2);
    font-size: 16px;
    line-height: 1;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    flex-shrink: 0;
    margin-left: 12px;
    pointer-events: auto;
}
.fav-item-remove:hover {
    background: rgba(255,80,80,0.1);
    border-color: rgba(255,80,80,0.3);
    color: rgba(255,100,100,0.8);
}

/* ============================================================
   MOBILE < 768px
   ============================================================ */
@media (max-width: 767px) {

        
    #destinations-btn {
        top: 14px;
        right: 16px;
    }
    #destinations-label { display: none; }

    #btn-Go {
        left: 50% !important;
        transform: translateX(-50%);
        bottom: auto; top: 72%;
        width: 160px; padding: 13px 28px;
        font-size: 11px; border-radius: 2px;
    }
    #btn-Go:hover { transform: translateX(-50%); border-color: rgba(74,158,255,0.6); color: #fff; }

    #discover-subtitle {
        top: calc(72% + 52px);
        bottom: auto;
    }

    #retry-btn { font-size: 10px; padding: 12px 0 4px; }

    #info-box {
        top: auto !important; right: 0 !important; left: 0 !important;
        bottom: -100%;
        width: 100% !important; height: 72vh;
        border-left: none;
        border-top: 1px solid rgba(255,255,255,0.1);
        border-radius: 24px 24px 0 0;
        padding-bottom: 70px;
    }
    #info-box::before {
        content: ''; display: block;
        width: 36px; height: 4px;
        background: rgba(255,255,255,0.15);
        border-radius: 2px; margin: 10px auto 0;
    }

    #close-panel { display: none; }
    #close-bar { display: flex; }

    #info-title   { font-size: 1.9rem; }
    .info-header  { padding: 16px 20px; }
    #info-desc    { font-size: 12px; margin-bottom: 14px; }
    .stat         { padding: 12px 16px; }
    .stat-value   { font-size: 13px; }
    .info-section { padding: 14px 20px 20px; }
    .site-photo   { height: 160px; }
    .site-card    { padding: 12px 14px; margin-bottom: 8px; }
    .site-name    { font-size: 14px; }
    .site-desc    { font-size: 11px; }
    .studio-footer { margin: 8px 20px 16px; padding: 16px 18px; }

    #share-toast { bottom: 80px; }

    #favorites-overlay { padding: 0; align-items: flex-end; }
    #favorites-modal {
        max-width: 100%;
        max-height: 70vh;
        border-radius: 24px 24px 0 0;
    }
    #favorites-header { padding: 20px 24px 16px; }
    .fav-item { padding: 14px 24px; }
}

@media (max-width: 374px) {
    #btn-Go   { width: 140px; font-size: 12px; }
    #info-box { height: 75vh; }
    #info-title { font-size: 1.6rem; }
}

#share-nudge {
    pointer-events: auto;
    position: fixed;
    bottom: 88px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(8,10,20,0.82);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50px;
    padding: 10px 18px 10px 20px;
    z-index: 15;
    white-space: nowrap;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
#share-nudge span {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.45);
}
#nudge-share-btn {
    background: none;
    border: 1px solid rgba(74,158,255,0.35);
    border-radius: 50px;
    color: rgba(74,158,255,0.8);
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 5px 12px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    pointer-events: auto;
}
#nudge-share-btn:hover {
    background: rgba(74,158,255,0.1);
    color: rgba(74,158,255,1);
}

@media (max-width: 767px) {
    #share-nudge { bottom: 78px; }
}

.stat-value-budget {
    color: rgba(74,158,255,0.85);
}

#filter-btn {
    pointer-events: auto;
    position: fixed;
    top: 20px;
    left: 24px;
    z-index: 30;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    color: rgba(255,255,255,0.45);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    position: fixed;
}
#filter-btn:hover {
    background: rgba(74,158,255,0.1);
    border-color: rgba(74,158,255,0.35);
    color: rgba(74,158,255,0.8);
}
#filter-btn.has-filter {
    background: rgba(74,158,255,0.1);
    border-color: rgba(74,158,255,0.4);
    color: rgba(74,158,255,0.9);
}
#filter-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 7px;
    height: 7px;
    background: rgba(74,158,255,0.9);
    border-radius: 50%;
    border: 1.5px solid rgba(8,10,20,0.9);
}

#filter-panel {
    pointer-events: auto;
    position: fixed;
    top: 72px;
    left: 20px;
    z-index: 30;
    background: rgba(10,13,26,0.97);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    padding: 8px 6px;
    min-width: 200px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
#filter-panel-title {
    font-family: 'Inter', sans-serif;
    font-size: 9px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: rgba(74,158,255,0.5);
    margin: 4px 12px 8px;
}
.filter-option {
    display: block;
    width: 100%;
    background: none;
    border: none;
    border-radius: 8px;
    color: rgba(255,255,255,0.45);
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    letter-spacing: 0.5px;
    padding: 10px 12px;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.filter-option:hover {
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.75);
}
.filter-option.active {
    background: rgba(74,158,255,0.12);
    color: rgba(74,158,255,0.9);
    font-weight: 500;
}

@media (max-width: 767px) {
    #filter-btn { top: 14px; left: 16px; width: 38px; height: 38px; }
    #filter-panel { top: 62px; left: 12px; }
}

#guide-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 15px 20px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    color: rgba(255,255,255,0.8);
    font-family: 'Inter', sans-serif;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.25s, border-color 0.25s;
    margin-bottom: 0;
}
#guide-btn:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.22);
}
#guide-btn.unavailable {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
}
.guide-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.07);
    border-radius: 8px;
    flex-shrink: 0;
    color: rgba(255,255,255,0.7);
}
.guide-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.guide-label-main {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
    color: rgba(255,255,255,0.85);
}
.guide-label-sub {
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
}

@media (max-width: 767px) {
    #guide-btn { padding: 13px 16px; }
    .guide-label-main { font-size: 12px; }
}