/* ============================================
   RACING KART 79 - STYLES
   ============================================ */

:root {
    --cursor-size: 20px;
    --rk-red: #ff0000;
    --rk-dark: #050505;
    --rk-grey: #111111;
    --cal-libre: transparent;
    --cal-ferme: #ef4444;
    --cal-challenge: #22c55e;
    --cal-reserve: #eab308;
}

/* ============================================
   BASE
   ============================================ */
body {
    background-color: var(--rk-dark);
    color: #ffffff;
    overflow-x: hidden;
    cursor: none;
}

/* ============================================
   MOBILE: NO CURSOR
   ============================================ */
@media (max-width: 768px) {
    body {
        cursor: auto;
    }

    .cursor {
        display: none !important;
    }
}

/* ============================================
   CUSTOM CURSOR
   ============================================ */
.cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--cursor-size);
    height: var(--cursor-size);
    border: 2px solid var(--rk-red);
    background: rgba(255, 0, 0, 0.1);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10005;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background 0.3s, opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cursor.hovered {
    width: 80px;
    height: 80px;
    background: var(--rk-red);
    opacity: 0.9;
    border: none;
}

.cursor-text {
    font-family: 'Rajdhani', sans-serif;
    font-size: 10px;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 0.3s;
    text-align: center;
    line-height: 1.2;
}

.cursor.hovered .cursor-text {
    opacity: 1;
}

/* ============================================
   LOADER
   ============================================ */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--rk-dark);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.loader-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.5;
}

.loader-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.loader-logo {
    width: 300px;
    height: auto;
    margin-bottom: 50px;
    filter: drop-shadow(0 0 25px rgba(255, 0, 0, 0.3));
    display: block;
    margin: 0 auto 50px auto;
}

/* Start Lights */
.start-lights {
    display: flex;
    gap: 20px;
    background: #111;
    padding: 15px 25px;
    border-radius: 50px;
    border: 1px solid #333;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    width: fit-content;
    margin: 0 auto;
}

.light {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #222;
    box-shadow: inset 0 0 10px #000;
    transition: background-color 0.05s, box-shadow 0.05s;
}

/* ============================================
   NAVBAR
   ============================================ */
nav {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

nav.nav-visible {
    transform: translate(-50%, 0) !important;
}

nav.nav-hidden {
    transform: translate(-50%, -200%) !important;
}

.nav-logo-container {
    position: relative;
}

.nav-logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    filter: blur(15px);
    z-index: -1;
    pointer-events: none;
}

.nav-link {
    position: relative;
    padding-bottom: 4px;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--rk-red);
    transition: width 0.3s ease, left 0.3s ease;
    box-shadow: 0 0 10px var(--rk-red);
}

.nav-link:hover {
    color: #ffffff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.nav-link:hover::after {
    width: 100%;
    left: 0;
}

/* ============================================
   MOBILE MENU
   ============================================ */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--rk-dark);
    z-index: 49;
    transform: translateY(-100%);
    transition: transform 0.6s cubic-bezier(0.83, 0, 0.17, 1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.mobile-menu.active {
    transform: translateY(0);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
.text-outline-red {
    color: transparent;
    -webkit-text-stroke: 1px var(--rk-red);
}

.text-race-font {
    font-family: 'Oswald', sans-serif;
    font-style: italic;
    font-weight: 900;
    letter-spacing: 1px;
}

/* ============================================
   GRAIN EFFECT
   ============================================ */
.grain-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.5'/%3E%3C/svg%3E");
    opacity: 0.15;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 2;
}

/* ============================================
   HORIZONTAL SCROLL GALLERY
   ============================================ */
.horizontal-container {
    display: flex;
    flex-wrap: nowrap;
    width: 500%;
    height: 100vh;
}

.h-panel {
    width: 100vw;
    height: 100vh;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    .horizontal-container {
        width: 100%;
        flex-direction: column;
        height: auto;
    }

    .h-panel {
        width: 100%;
        height: 70vh;
    }

    .animate-marquee {
        animation-duration: 15s;
    }
}

/* ============================================
   STACKING CARDS (Tarifs)
   ============================================ */
.stacking-cards {
    position: relative;
}

.card-panel {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: sticky;
    top: 0;
    background: var(--rk-dark);
    transform-origin: center top;
}

@media (max-width: 768px) {
    .card-panel {
        height: auto;
        min-height: 70vh;
        position: relative;
        top: auto;
        padding: 2rem 0;
    }
}

/* ============================================
   INPUTS
   ============================================ */
.input-group {
    position: relative;
    margin-bottom: 2rem;
}

.input-field {
    width: 100%;
    padding: 10px 0;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.1rem;
    color: #fff;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    outline: none;
    transition: border-color 0.3s;
}

.input-label {
    position: absolute;
    top: 10px;
    left: 0;
    font-family: 'Rajdhani', sans-serif;
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
    transition: 0.3s ease all;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
}

.input-field:focus~.input-label,
.input-field:valid~.input-label {
    top: -20px;
    font-size: 0.75rem;
    color: var(--rk-red);
}

.input-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--rk-red);
    transition: width 0.4s ease;
}

.input-field:focus~.input-bar {
    width: 100%;
}

/* ============================================
   MARQUEE ANIMATIONS
   ============================================ */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@keyframes marquee-reverse {
    0% {
        transform: translateX(-50%);
    }

    100% {
        transform: translateX(0);
    }
}

.animate-marquee {
    animation: marquee 80s linear infinite;
    display: flex;
    width: max-content;
}

.animate-marquee-reverse {
    animation: marquee-reverse 90s linear infinite;
    display: flex;
    width: max-content;
}

/* ============================================
   THREE.JS CANVAS
   ============================================ */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.2;
    pointer-events: none;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #000;
}

::-webkit-scrollbar-thumb {
    background: var(--rk-red);
    border-radius: 3px;
}

/* ============================================
   BUTTON SHINE
   ============================================ */
.btn-shine {
    position: relative;
    overflow: hidden;
}

.btn-shine::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn-shine:hover::after {
    left: 100%;
}

/* ============================================
   WEATHER WIDGET
   ============================================ */
.weather-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    width: fit-content;
    margin: 0 auto;
}

.weather-container iframe {
    pointer-events: none;
}

/* ============================================
   MODALS
   ============================================ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 10004;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content-box {
    transform: translateY(50px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.2, 1, 0.3, 1);
}

.modal.active .modal-content-box {
    transform: translateY(0);
    opacity: 1;
}

/* ============================================
   REVIEWS
   ============================================ */
.review-card {
    min-width: 300px;
    max-width: 300px;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
    margin-right: 16px;
    padding: 20px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.review-card:hover {
    transform: scale(1.02);
    border-color: var(--rk-red);
    box-shadow: 0 10px 30px rgba(255, 0, 0, 0.2);
}

@media (min-width: 769px) {
    .review-card {
        min-width: 350px;
        max-width: 350px;
        margin-right: 20px;
        padding: 25px;
        border-radius: 20px;
    }
}

/* ============================================
   HOURS TABLE
   ============================================ */
.hours-row {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 0;
    font-family: 'Rajdhani', sans-serif;
}

.hours-row:last-child {
    border-bottom: none;
}

/* ============================================
   FULLCALENDAR - DARK THEME + 3 COULEURS
   ============================================ */

/* Grid & Borders */
.fc-theme-standard .fc-scrollgrid,
.fc-theme-standard th,
.fc-theme-standard td {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* Toolbar buttons */
.fc .fc-button-primary {
    background-color: var(--rk-red) !important;
    border-color: var(--rk-red) !important;
    color: white !important;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    font-weight: bold;
    border-radius: 6px !important;
    font-size: 0.75rem;
    padding: 6px 12px;
    transition: all 0.3s;
}

.fc .fc-button-primary:hover {
    background-color: white !important;
    border-color: white !important;
    color: black !important;
}

.fc .fc-button-primary:disabled {
    background-color: #333 !important;
    border-color: #333 !important;
    color: #666 !important;
}

.fc .fc-button-primary:not(:disabled).fc-button-active {
    background-color: white !important;
    border-color: white !important;
    color: black !important;
}

/* Title */
.fc .fc-toolbar-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.3rem;
    text-transform: uppercase;
    font-style: italic;
    color: white;
}

/* Day numbers */
.fc-daygrid-day-number {
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    text-decoration: none !important;
    padding: 6px 8px;
}

/* Day header (Mon, Tue...) */
.fc-col-header-cell-cushion {
    color: var(--rk-red) !important;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none !important;
    font-size: 0.85rem;
    padding: 8px 4px;
}

/* Today highlight */
.fc-day-today {
    background: rgba(255, 0, 0, 0.08) !important;
}

.fc-day-today .fc-daygrid-day-number {
    background: var(--rk-red);
    color: white !important;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.85rem;
}

/* Disabled / other month days */
.fc-day-other .fc-daygrid-day-number {
    color: rgba(255, 255, 255, 0.2);
}

.fc-cell-shaded,
.fc-day-disabled {
    background: rgba(255, 255, 255, 0.02) !important;
}

/* Events: 3 Couleurs */
.fc-event {
    border: none !important;
    border-radius: 4px !important;
    padding: 2px 6px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin: 1px 2px;
}

.fc-event:hover {
    transform: scale(1.03);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Libre - Transparent */
.fc-event.event-libre {
    background-color: var(--cal-libre) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

/* Prise/Fermé - Rouge */
.fc-event.event-ferme {
    background-color: var(--cal-ferme) !important;
    color: white !important;
}

/* Challenge - Vert */
.fc-event.event-challenge {
    background-color: var(--cal-challenge) !important;
    color: white !important;
}

/* Réservé - Jaune */
.fc-event.event-reserve {
    background-color: var(--cal-reserve) !important;
    color: black !important;
}

/* List View */
.fc-list-day-cushion {
    background: rgba(255, 255, 255, 0.05) !important;
}

.fc-list-day-cushion .fc-list-day-text,
.fc-list-day-cushion .fc-list-day-side-text {
    color: white;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
}

.fc-list-event:hover td {
    background: rgba(255, 0, 0, 0.08) !important;
}

.fc-list-event-title,
.fc-list-event-time {
    color: white !important;
    font-family: 'Rajdhani', sans-serif;
}

.fc-list-event-dot {
    border-radius: 50%;
}

.fc .fc-list-empty-cushion {
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Rajdhani', sans-serif;
}

/* ============================================
   FULLCALENDAR MOBILE RESPONSIVENESS
   ============================================ */
@media (max-width: 768px) {
    .fc .fc-toolbar {
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }

    .fc .fc-toolbar-title {
        font-size: 1.1rem;
        order: -1;
    }

    .fc .fc-button-primary {
        font-size: 0.65rem;
        padding: 5px 8px;
    }

    .fc-daygrid-day-number {
        font-size: 0.8rem;
        padding: 4px 5px;
    }

    .fc-col-header-cell-cushion {
        font-size: 0.7rem;
        letter-spacing: 0;
        padding: 6px 2px;
    }

    .fc-event {
        font-size: 0.65rem;
        padding: 1px 3px;
    }

    .fc-day-today .fc-daygrid-day-number {
        width: 22px;
        height: 22px;
        font-size: 0.7rem;
    }

    .fc-daygrid-event-harness {
        margin: 0 1px;
    }
}

/* ============================================
   CONTACT HOURS CARDS
   ============================================ */
.hours-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    transition: all 0.3s;
}

.hours-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 0, 0, 0.2);
}

.hours-day {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
}

.hours-time {
    font-family: 'Rajdhani', sans-serif;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.hours-time.closed {
    color: var(--rk-red);
    font-weight: 700;
}

/* ============================================
   RECORD GLOW ANIMATION
   ============================================ */
.record-time-glow {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3), 0 0 60px rgba(255, 0, 0, 0.2);
    animation: recordPulse 3s ease-in-out infinite;
}

@keyframes recordPulse {

    0%,
    100% {
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.3), 0 0 60px rgba(255, 0, 0, 0.2);
    }

    50% {
        text-shadow: 0 0 30px rgba(255, 255, 255, 0.5), 0 0 80px rgba(255, 0, 0, 0.4);
    }
}

.record-card {
    animation: recordCardGlow 4s ease-in-out infinite;
}

@keyframes recordCardGlow {

    0%,
    100% {
        box-shadow: 0 0 40px rgba(255, 0, 0, 0.3);
    }

    50% {
        box-shadow: 0 0 60px rgba(255, 0, 0, 0.5), 0 0 100px rgba(255, 0, 0, 0.2);
    }
}

/* ============================================
   WEATHER WIDGET MOBILE
   ============================================ */
@media (max-width: 768px) {
    .weather-widget-overlay {
        top: 2px !important;
        right: 2px !important;
    }

    .weather-widget-overlay>div {
        padding: 4px !important;
    }

    .weather-iframe {
        width: 110px !important;
        height: 80px !important;
        transform: scale(0.7) !important;
    }
}

/* ============================================
   STAT CARD ANIMATIONS
   ============================================ */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 0, 0, 0.05), transparent);
    transition: left 0.6s;
}

.stat-card:hover::before {
    left: 100%;
}

/* ============================================
   OPEN/CLOSED STATUS
   ============================================ */
.status-open {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-closed {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ============================================
   GLOBAL MOBILE RESPONSIVENESS FIXES
   ============================================ */

/* Gallery panels: vertical stack on mobile */
@media (max-width: 768px) {
    .horizontal-container {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: auto !important;
        transform: none !important;
    }

    .h-panel {
        width: 100% !important;
        height: auto !important;
        min-height: 80vh;
        flex-shrink: 0;
    }

    .h-panel:nth-child(3) {
        min-height: 100vh;
    }

    .victoire-panel {
        height: 60vh !important;
        min-height: 60vh !important;
    }

    .h-panel:nth-child(3) .space-y-6 {
        gap: 12px !important;
    }

    .h-panel:nth-child(3) h3 {
        font-size: 2.5rem !important;
    }

    /* Tarif cards mobile */
    .card-panel {
        height: auto !important;
        min-height: auto;
        padding: 30px 16px !important;
    }

    .card-panel .grid {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
        text-align: center;
    }

    .card-panel .text-right {
        text-align: center !important;
    }
}

@media (max-width: 480px) {
    .loader-logo {
        width: 200px;
    }

    .start-lights {
        gap: 12px;
        padding: 10px 18px;
    }

    .light {
        width: 28px;
        height: 28px;
    }

    /* Gallery text */
    .h-panel h2 {
        font-size: 15vw !important;
    }

    .h-panel h3 {
        font-size: 2rem !important;
    }

    .h-panel p {
        font-size: 1rem !important;
    }

    /* Contact form mobile */
    #contactForm {
        padding: 20px !important;
    }

    /* Footer mobile */
    .grid-cols-1.md\\:grid-cols-4 {
        gap: 24px !important;
    }
}