/* ===== CSS OPTIMISÉ KITELOVER - UX MOBILE PREMIUM ===== */

/* ===== CORRECTIONS ASTRA THEME ===== */
#primary.content-area,
.entry-title,
.site-main,
.ast-article-single {
    margin-top: 0;
    padding-top: 0;
}

body.ast-page-builder-template .page.entry-header {
    margin-top: 20px;
    padding-top: 20px;
}

.ast-container {
    padding-top: 0;
}

.ast-single-post .entry-content,
.ast-page-builder-template .entry-content {
    margin-top: 0;
    padding-top: 0;
}

.ast-article-single .entry-header {
    margin-bottom: 1.5em;
}

.page .entry-header {
    margin-bottom: 0 !important;
    margin-top:0 !important
}

.page.site-branding{
    margin-bottom: 0 !important;
    margin-top:0!important;
   
}
/* Cible la div complète avec ses deux classes */
.site-branding.ast-site-identity {
    padding: 0 !important;
    margin: 0 !important;
}
 #primary.site-main {
  padding: 0; /* ou ce que tu souhaites */
  margin: 0;
}

p:empty,
#primary p:empty,
#content p:empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}



/* ===== PAGE PRINCIPALE SPOTS ===== */
.spot-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.infos-photo-wrapper {
    display: flex;
    gap: 40px;
    margin-bottom: 50px;
    background: #ffffff;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    align-items: flex-start;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.infos-photo-wrapper:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.photo-spot-wrapper {
    flex: 0 0 350px;
    height: fit-content;
}

.photo-spot {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    display: block;
    object-fit: cover;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.photo-spot:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* ===== CONTAINER PRINCIPAL DE LA CARTE ===== */
.kite-map-container {
    display: flex;
    height: 100vh;
    width: 100%;
    min-height: 600px;
    position: relative;
    font-family: "Quicksand", sans-serif;
    margin: 0;
    padding: 0;
    animation: fadeIn 0.6s ease-out;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    visibility: visible;
    opacity: 1;
}

.entry-content {
    height: 100vh;
    min-height: 600px;
    margin: 0;
    padding: 0;
}

/* ===== LÉGENDE COMPACTE DESKTOP ===== */
.kite-legend {
    flex: 0 0 240px;
    width: 240px;
    max-width: 240px;
    background: linear-gradient(135deg, #e0f0ff 0%, #d4e8ff 100%);
    padding: 10px;
    overflow-y: auto;
    z-index: 1;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border-right: 3px solid #4ABDAC;
}

.legend-content {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

/* ===== TITRES COMPACTS ===== */
.kite-legend h2 {
    font-size: 12px;
    margin: 0 0 4px 0;
    padding: 6px 10px;
    color: white;
    text-align: center;
    font-family: "Raleway", sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    background: linear-gradient(45deg, #E6B94F, #d4a843);
    border-radius: 5px;
    letter-spacing: 0.8px;
}

.kite-legend h3 {
    font-size: 10px;
    margin: 0 0 2px 0;
    padding: 0;
    color: #2B4C66;
    font-family: "Raleway", sans-serif;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.4px;
}

/* ===== CARTE ÉLÉGANTE ===== */
.kite-map {
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 0 12px 12px 0;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    background: transparent;
    border: none;
    display: block;
    visibility: visible;
    opacity: 1;
}

.kite-map #map {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    border: none;
}

/* ===== GROUPES COMPACTS ===== */
.filter-group,
.form-group {
    margin-bottom: 0px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 5px;
    border: 1px solid rgba(74, 189, 172, 0.2);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.filter-group:hover,
.form-group:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(74, 189, 172, 0.4);
    transform: translateY(-1px);
}

/* ===== LABELS COMPACTS ===== */
.kite-legend label,
.entry-content .kite-legend label {
    display: block;
    font-size: 10px;
    margin-bottom: 0px;
    color: #2B4C66;
    font-weight: 600;
    font-family: "Raleway", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ===== CONTRÔLES COMPACTS ===== */
.kite-legend select,
.kite-legend button,
body.page .entry-content .kite-legend select,
body.page .entry-content .kite-legend button {
    width: 100%;
    padding: 5px 8px;
    border: 1px solid #4ABDAC;
    border-radius: 4px;
    font-size: 10px;
    font-family: "Raleway", sans-serif;
    text-transform: uppercase;
    font-weight: 600;
    background: #ffffff;
    color: #2B4C66;
    transition: all 0.2s ease;
    cursor: pointer;
    box-sizing: border-box;
}

.kite-legend select:hover,
.kite-legend button:hover {
    border-color: #379F93;
    background: #f8f9fa;
    transform: translateY(-1px);
}

.kite-legend select:focus,
.kite-legend button:focus {
    outline: none;
    border-color: #379F93;
    box-shadow: 0 0 0 2px rgba(55, 159, 147, 0.2);
}

/* ===== BOUTON RESET COMPACT ===== */
/* ===== BOUTON RESET VISIBLE - DESKTOP ===== */
#resetFilters {
    background: linear-gradient(45deg, #4ABDAC, #379F93);
    color: white;
    font-weight: 600;
    border: 1px solid #4ABDAC;
    margin-top: 4px;
    padding: 8px 12px;
    font-size: 11px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(230, 185, 79, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#resetFilters:hover {
    background: linear-gradient(45deg, #379F93, #379F93);
    border-color: #379F93;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 185, 79, 0.4);
}



/* ===== SLIDERS ULTRA-COMPACTS ===== */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
    margin: 2px 0;
    height: 4px;
    border-radius: 2px;
    outline: none;
    position: relative;
    background: linear-gradient(to right, #FFD369 0%, #FFD369 0%, #e5e7eb 0%, #e5e7eb 100%);
}

input[type="range"]::-webkit-slider-runnable-track {
    height: 4px;
    background: transparent;
    border-radius: 2px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 14px;
    width: 14px;
    background: linear-gradient(45deg, #4ABDAC, #379F93);
    border: 1px solid white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
    margin-top: -5px;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

input[type="range"]::-moz-range-track {
    height: 4px;
    background: #e5e7eb;
    border: none;
    border-radius: 2px;
}

input[type="range"]::-moz-range-progress {
    height: 4px;
    background: #FFD369;
    border-radius: 2px;
}

input[type="range"]::-moz-range-thumb {
    height: 14px;
    width: 14px;
    background: linear-gradient(45deg, #4ABDAC, #379F93);
    border: 1px solid white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    border: none;
}

/* ===== ÉTOILES MINIMALISTES ===== */
.range-value {
    text-align: center;
    margin-top: 3px;
    padding: 0;
    background: transparent;
    border: none;
    min-height: auto;
    display: block;
    font-size: 10px;
    color: #4ABDAC;
    line-height: 1;
}

.range-value span {
    margin: 0;
    cursor: default;
    display: inline-block;
}

/* Animation des étoiles */
.range-value span[style*="color: #FFD700"] {
    animation: twinkle 2s infinite alternate;
}

.range-value span[style*="color: #4ABDAC"] {
    animation: pulse 2s infinite alternate;
}

@keyframes twinkle {
    0% { opacity: 0.8; }
    100% { opacity: 1; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

.range-value span[style*="color: #ccc"] {
    font-style: italic;
    font-weight: 500;
}

/* ===== LOADING ÉLÉGANT ===== */
.map-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.5s ease-out;
}

.map-loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.map-loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(74, 189, 172, 0.2);
    border-top: 3px solid #4ABDAC;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.map-loading-text {
    color: #4ABDAC;
    font-family: "Raleway", sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.map-loading-dots {
    display: flex;
    gap: 3px;
}

.map-loading-dot {
    width: 6px;
    height: 6px;
    background: #4ABDAC;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out;
}

.map-loading-dot:nth-child(1) { animation-delay: -0.32s; }
.map-loading-dot:nth-child(2) { animation-delay: -0.16s; }
.map-loading-dot:nth-child(3) { animation-delay: 0s; }

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.map-loading-waves {
    display: flex;
    gap: 2px;
    margin-top: 8px;
}

.map-loading-wave {
    width: 3px;
    height: 15px;
    background: linear-gradient(to top, #4ABDAC, #E6B94F);
    border-radius: 2px;
    animation: wave 1.2s infinite ease-in-out;
}

.map-loading-wave:nth-child(1) { animation-delay: 0s; }
.map-loading-wave:nth-child(2) { animation-delay: 0.1s; }
.map-loading-wave:nth-child(3) { animation-delay: 0.2s; }
.map-loading-wave:nth-child(4) { animation-delay: 0.3s; }
.map-loading-wave:nth-child(5) { animation-delay: 0.4s; }

@keyframes wave {
    0%, 40%, 100% {
        transform: scaleY(0.4);
        opacity: 0.7;
    }
    20% {
        transform: scaleY(1);
        opacity: 1;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px);
    }
    to { 
        opacity: 1; 
        transform: translateY(0);
    }
}

/* ===== LEAFLET CUSTOMISATION ===== */
.leaflet-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    font-family: "Quicksand", sans-serif;
}

.leaflet-control-zoom {
    border: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    overflow: hidden;
}

.leaflet-control-zoom a {
    background: #4ABDAC;
    color: white;
    border: none;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-weight: bold;
}

.leaflet-control-zoom a:hover {
    background: #379F93;
    transform: scale(1.05);
}

/* ===== POPUP LEAFLET ===== */
.leaflet-popup-content-wrapper {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 2px solid #4ABDAC;
    padding: 0;
    overflow: hidden;
    min-width: 280px;
    max-width: 350px;
    font-family: "Quicksand", sans-serif;
}

.leaflet-popup-content {
    margin: 0;
    padding: 20px;
    line-height: 1.6;
    color: #2B4C66;
    font-size: 14px;
}

.leaflet-popup-tip {
    background: #4ABDAC;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.leaflet-popup-content b {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #E6B94F;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #E6B94F;
    font-family: "Raleway", sans-serif;
    text-transform: uppercase;
    text-align: center;
}

/* Classes pour les couleurs par type */
.spot-title-flat {
    color: #4ABDAC;
    border-bottom-color: #4ABDAC;
}

.spot-title-mixte {
    color: #E6B94F;
    border-bottom-color: #E6B94F;
}

.spot-title-vagues {
    color: #FF0000;
    border-bottom-color: #FF0000;
}

.type-text-flat {
    color: #4ABDAC;
    font-weight: 600;
}

.type-text-mixte {
    color: #E6B94F;
    font-weight: 600;
}

.type-text-vagues {
    color: #FF0000;
    font-weight: 600;
}

.popup-spot-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin: 10px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.spot-type-icon {
    font-size: 18px;
    margin-right: 6px;
    vertical-align: middle;
}

.spot-title-icon {
    font-size: 22px;
    margin-right: 8px;
    vertical-align: middle;
}

.leaflet-popup-content a {
    display: inline-block;
    background: linear-gradient(45deg, #E6B94F, #d4a843);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 12px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-transform: uppercase;
    font-size: 12px;
    box-shadow: 0 4px 12px rgba(230, 185, 79, 0.3);
}

.leaflet-popup-content a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(230, 185, 79, 0.4);
    background: linear-gradient(45deg, #d4a843, #c19a3a);
}

.leaflet-popup-close-button {
    background: #E6B94F;
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    line-height: 24px;
    top: 8px;
    right: 8px;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.leaflet-popup-close-button:hover {
    background: #d4a843;
    transform: scale(1.1);
}

.leaflet-popup {
    animation: popupFadeIn 0.3s ease-out;
}



@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== MARQUEURS COLORÉS ===== */
.custom-spot-marker {
    background: transparent;
    border: none;
    box-shadow: none;
}

.spot-marker {
    transition: transform 0.2s ease;
}

.spot-marker:hover {
    transform: scale(1.1);
}

/* ===== TOOLTIP PERSONNALISÉ ===== */
.custom-spot-tooltip {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

.custom-spot-tooltip .leaflet-tooltip-content {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
}

.leaflet-tooltip {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

.leaflet-tooltip-content {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
}

.leaflet-tooltip {
    animation: tooltipFadeIn 0.2s ease-out;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ===== ANIMATIONS POPUP DÉTAILLÉ ===== */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateX(100px) scale(0.9);
    }
}

/* Popup détaillé responsive */
@media (max-width: 768px) {
    #spot-details {
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        bottom: 0;
        width: 100%;
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        border-left: none;
        border-top: 5px solid #4ABDAC;
        animation: slideInUp 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* === Desktop : on ne touche à rien === */
/* Exemple : tu as sûrement déjà */
.kite-map-container {
  display: flex;
  flex-direction: row;
  gap: 0px;
}

@media (max-width: 768px) {
    
  .kite-map-container {
    flex-direction: column;
  }

  .kite-map {
    order: 1;
    width: 100%;
    height: 300px;
  }

  #primary {
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
  }
  
  .kite-legend {
    width: 100% !important;
    max-width: 100% !important;
    order:2;
    padding-left: 16px;  /* si besoin */
    padding-right: 16px; /* si besoin */
    box-sizing: border-box;
  }
  
  #primary, #content, .site-main, .kite-map-container, .kite-legend {
    max-width: 100% !important;
    width: 100% !important;
  }



  .spotSelect {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 10px;
  }

  /* Lignes des filtres : flex-wrap ligne par ligne */
  .legend-content {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
  }

  .legend-content h2,
  .legend-content h3 {
    display: none;
  }

  .legend-content .filter-group {
    flex: 1 1 30%;
    min-width: 100px;
  }

  /* Deuxième ligne : Vent + KiteLover */
  #autresfiltres .range,
  #autresfiltres .form-group > .form-group {
    display: flex;
    flex-direction: column;
    flex: 1 1 48%;
    min-width: 140px;
  }

  .filters-left {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  #autresfiltres > h2,
  #autresfiltres label {
    display: none;
  }

  /* Troisième ligne : Type + Mois */
  .label {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .label .form-group {
    flex: 1 1 48%;
    min-width: 140px;
  }

  /* Quatrième ligne : bouton reset centré */
  #resetFilters {
    display: block;
    margin: 10px auto 0 auto;
    padding: 10px 20px;
    font-size: 1rem;
    border: none;
    border-radius: 6px;
    background-color: #eee;
  }

  /* Champs */
  select,
  input[type="range"] {
    width: 100%;
    font-size: 1rem;
  }

  .range-value {
    font-size: 0.9rem;
    text-align: right;
  }
}




