/**
 * Golf Interactive Map Styles
 */

/* Container principal */
.golf-map-wrapper {
    display: flex;
    justify-content: center;
}

.golf-map-container {
    position: relative;
    width: 735px;
    max-width: 100%;
    margin: 0 auto;
}

.golf-map-container img.golf-map-image {
    width: 735px;
    max-width: 100%;
    height: auto;
    display: block;
}

/* Marqueurs des trous */
.golf-marker {
    position: absolute;
    width: 30px;
    height: 30px;
    background-color: #0D5347;
    border: 1px solid #FFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Animation pulse scale */
.golf-marker::before {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 0.5px solid #FFF;
    animation: pulse-scale0 1.3s ease-in-out infinite;
}

.golf-marker::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 0.5px solid #FFF;
    animation: pulse-scale 1.3s ease-in-out infinite;
}

@keyframes pulse-scale0 {
    0% {
        transform: scale(1);
        opacity: 0;
    }
    5% {
        transform: scale(1.25);
        opacity: 0.5;
    }
    10% {
        transform: scale(1.5);
        opacity: 1;
    }
    20% {
        transform: scale(1.48);
        opacity: 1;
    }
    30% {
        transform: scale(1.5);
        opacity: 1;
    }
    40% {
        transform: scale(1.48);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 1;
    }
    60% {
        transform: scale(1.48);
        opacity: 1;
    }
    70% {
        transform: scale(1.5);
        opacity: 1;
    }
    80% {
        transform: scale(1.48);
        opacity: 1;
    }
    88% {
        transform: scale(1.5);
        opacity: 1;
    }
    94% {
        transform: scale(1.25);
        opacity: 0.5;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

@keyframes pulse-scale {
    0% {
        transform: scale(1);
        opacity: 0;
    }
    5% {
        transform: scale(1.5);
        opacity: 0.5;
    }
    10% {
        transform: scale(2);
        opacity: 1;
    }
    20% {
        transform: scale(1.98);
        opacity: 1;
    }
    30% {
        transform: scale(2);
        opacity: 1;
    }
    40% {
        transform: scale(1.98);
        opacity: 1;
    }
    50% {
        transform: scale(2);
        opacity: 1;
    }
    60% {
        transform: scale(1.98);
        opacity: 1;
    }
    70% {
        transform: scale(2);
        opacity: 1;
    }
    80% {
        transform: scale(1.98);
        opacity: 1;
    }
    88% {
        transform: scale(2);
        opacity: 1;
    }
    94% {
        transform: scale(1.5);
        opacity: 0.5;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.golf-marker:hover {
    transform: scale(1.15);
}

.golf-marker:hover::before,
.golf-marker:hover::after {
    animation-play-state: paused;
    opacity: 0;
}

.golf-marker span {
    font-family: 'Arial Rounded MT Bold';
    font-weight: bold;
    font-size: 22px;
    color: #FFF;
    line-height: 1;
    z-index: 1;
}

/* Overlay popup */
.golf-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 25px 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.golf-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Popup */
.golf-popup {
    background-color: #fff;
    max-width: 1100px;
    width: 90%;
    border-radius: 20px;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.golf-popup-overlay.active .golf-popup {
    transform: scale(1);
}

/* Bouton fermer */
.golf-popup-close {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 55px;
    height: 55px;
    background-color: transparent !important;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 10;
    transition: transform 0.2s ease;
}

.golf-popup-close svg {
    width: 20px;
    height: 20px;
    color: #006b3f;
}

/* Header popup */
.golf-popup-header {
    text-align: center;
    padding: 25px 10px 10px;
}

.golf-popup-header h2 {
    font-family: 'Arial Rounded MT Bold', Arial, sans-serif;
    font-size: 36px;
    color: #0D5347;
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.golf-popup-header h2 span {
    margin: 0 18px;
}

.golf-popup-header .btn-trou-prev,
.golf-popup-header .btn-trou-next {
    display: inline-flex;
    cursor: pointer;
}

.golf-popup-header .btn-trou-prev img,
.golf-popup-header .btn-trou-next img {
    width: 36px;
} 

.golf-popup-header .hole-info {
    font-size: 24px;
    color: #414141;
    font-weight: 500;
    letter-spacing: -0.48px;
}

/* Description */
.golf-popup-description {
    padding: 0px 25px 10px;
    text-align: center;
    font-size: 20px;
    color: #414141;
    line-height: 1.6;
    letter-spacing: -0.36px;
    max-width: 992px;
    margin: auto;
}

/* Galerie photos */
.golf-popup-gallery {
    padding: 15px 20px 25px;
}

.golf-gallery-grid {
    display: flex;
    gap: 12px;
}

/* Miniatures à gauche */
.golf-gallery-thumbnails {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 300px;
    flex-shrink: 0;
    max-height: 500px;
    overflow-y: auto;
}

.golf-gallery-thumb {
    width: 100%;
    height: 161px;
    min-height: 161px;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s ease, opacity 0.2s ease;
}

.golf-gallery-thumb:hover {
    opacity: 1;
}

.golf-gallery-thumb.active {
    border-color: #0D5347;
    opacity: 1;
}

.golf-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Image principale à droite */
.golf-gallery-main {
    width: 75%;
    border-radius: 10px;
    overflow: hidden;
    background: #f5f5f5;
}

.golf-gallery-main img {
    width: 100%;
    height: 500px !important;
    object-fit: cover;
    display: block;
    border-radius: 20px !important;
}

/* Responsive */
@media (max-width: 768px) {
    .golf-marker {
        width: 26px;
        height: 26px;
        border-width: 2px;
    }

    .golf-marker span {
        font-size: 12px;
    }

    .golf-popup {
        width: 95%;
        max-height: 85vh;
    }

    .golf-popup-header h2 {
        font-size: 22px;
    }

    .golf-popup-header .hole-info {
        font-size: 14px;
    }

    .golf-gallery-grid {
        flex-direction: column-reverse;
    }

    .golf-gallery-thumbnails {
        flex-direction: row;
        width: 100%;
        max-height: none;
        overflow-x: auto;
    }

    .golf-gallery-thumb {
        width: 60px;
        height: 45px;
        flex-shrink: 0;
    }

    .golf-gallery-main img {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .golf-marker {
        width: 22px;
        height: 22px;
    }

    .golf-marker span {
        font-size: 10px;
    }

    .golf-popup-description {
        font-size: 13px;
        padding: 10px 15px;
    }

    .golf-gallery-main img {
        height: 180px;
    }
}

/* ===================================
   POPUP VIDEO
   =================================== */

.golf-video-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.golf-video-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.golf-video-popup {
    position: relative;
    width: 100%;
    max-width: 100%;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    background-color: #000;
}

.golf-video-popup-overlay.active .golf-video-popup {
    transform: scale(1);
}

.golf-video-popup-close {
    position: absolute;
    top: -5px;
    left: -5px;
    width: 145px;
    height: 145px;
    background-color: transparent !important;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 10;
    transition: transform 0.2s ease;
}

.golf-video-popup-close:hover {
    transform: scale(1.1);
}

.golf-video-popup-close img {
    width: 100%;
    height: auto;
    filter: brightness(0) invert(1);
}

.golf-video-container {
    position: relative;
    overflow: hidden;
    border-radius: 0px;
    background: #000;
}

.golf-video-container iframe,
.golf-video-container video {
    width: 100%;
    height: 100%;
    border: none;
}

.golf-video-container video {
    display: none;
    object-fit: contain;
    background: #000;
}

/* Responsive video popup */
@media (max-width: 768px) {
    .golf-video-popup {
        width: 95%;
    }

    .golf-video-popup-close {
        top: -45px;
        width: 35px;
        height: 35px;
    }

    .golf-video-popup-close img {
        width: 35px;
        height: 35px;
    }
}

/* Spinner chargement vidéo */
.golf-video-spinner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10;
    border-radius: 12px;
}

.golf-video-spinner .spinner-circle {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #0D5347;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Transition pour iframe/video */
.golf-video-container iframe,
.golf-video-container video {
    transition: opacity 0.3s ease;
}
