/* ============================================================
   Bego Racing RC Raceway - Styles personnalisés
   ============================================================ */

/* ---- Variables ---- */
:root {
    --rc-bg:     #0f0f0f;
    --rc-dark:   #1a1a1a;
    --rc-card:   #1e1e1e;
    --rc-border: #2a2a2a;
    --rc-orange: #FF6600;
    --rc-silver: #A8B8C8;
    --rc-white:  #FFFFFF;
}

/* ---- Scrollbar personnalisée ---- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--rc-dark); }
::-webkit-scrollbar-thumb { background: var(--rc-border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #3a3a3a; }

/* ---- Fonts ---- */
body { font-family: 'Inter', sans-serif; }
h1, h2, h3, h4, h5, h6, .font-heading { font-family: 'Oswald', sans-serif; }

/* ============================================================
   EFFETS DÉCORATIFS
   ============================================================ */

/* Logo avec effet chrome/argent */
.logo-text {
    background: linear-gradient(135deg, #ffffff 0%, #A8B8C8 30%, #ffffff 50%, #A8B8C8 70%, #e0e0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Lueur orange au survol */
.orange-glow:hover {
    box-shadow: 0 0 20px rgba(255, 102, 0, 0.4), 0 0 40px rgba(255, 102, 0, 0.2);
}

/* Lignes de vitesse (hero) */
.speed-lines {
    background-image:
        linear-gradient(90deg, transparent 0%, rgba(255,102,0,0.03) 50%, transparent 100%),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 4px,
            rgba(255,102,0,0.02) 4px,
            rgba(255,102,0,0.02) 5px
        );
    background-size: 100% 100%, 30px 30px;
}

/* ============================================================
   NAVIGATION
   ============================================================ */

.nav-link {
    @apply px-3 py-2 rounded-lg text-sm font-medium text-gray-300 hover:text-white hover:bg-rc-border transition-all duration-200 relative;
    font-family: 'Oswald', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.nav-link.active,
.nav-link:hover {
    color: #FF6600;
    background-color: rgba(255, 102, 0, 0.08);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: #FF6600;
    border-radius: 2px;
}

.mobile-nav-link {
    @apply block px-4 py-3 rounded-xl text-gray-300 hover:text-white hover:bg-rc-border transition-colors;
    font-family: 'Oswald', sans-serif;
    letter-spacing: 0.05em;
}

.mobile-nav-link.active {
    color: #FF6600;
    background-color: rgba(255, 102, 0, 0.1);
}

/* Footer links */
.footer-link {
    @apply text-gray-400 hover:text-rc-orange transition-colors duration-200;
}

/* ============================================================
   BOUTONS
   ============================================================ */

.btn-primary {
    @apply inline-flex items-center gap-2 px-6 py-3 bg-rc-orange hover:bg-orange-500 text-white font-semibold rounded-xl transition-all duration-200;
    font-family: 'Oswald', sans-serif;
    letter-spacing: 0.05em;
}

.btn-secondary {
    @apply inline-flex items-center gap-2 px-5 py-2.5 bg-transparent border border-rc-border hover:border-rc-orange text-gray-300 hover:text-white font-medium rounded-xl transition-all duration-200;
}

.btn-outline-sm {
    @apply inline-flex items-center gap-1.5 px-4 py-2 text-sm font-medium text-rc-orange border border-rc-orange/40 hover:bg-rc-orange hover:text-white rounded-lg transition-all duration-200;
}

/* ============================================================
   SECTIONS & LAYOUT
   ============================================================ */

.section-tag {
    @apply inline-block text-rc-orange text-xs font-medium uppercase tracking-[0.2em] px-3 py-1 bg-rc-orange/10 border border-rc-orange/20 rounded-full;
}

.section-title {
    @apply font-heading font-bold text-3xl md:text-5xl text-white leading-tight;
}

.section-header {
    @apply text-center;
}

/* ============================================================
   CARDS ÉVÉNEMENTS
   ============================================================ */

.event-card {
    @apply bg-rc-card border border-rc-border rounded-2xl p-6 hover:border-rc-orange/50 transition-all duration-300 flex flex-col;
}

.event-card:hover {
    box-shadow: 0 8px 32px rgba(255, 102, 0, 0.1);
    transform: translateY(-2px);
}

.date-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(255,102,0,0.2), rgba(255,102,0,0.1));
    border: 1px solid rgba(255, 102, 0, 0.4);
    border-radius: 12px;
    flex-shrink: 0;
}

.date-badge-day {
    font-family: 'Oswald', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #FF6600;
    line-height: 1;
}

.date-badge-month {
    font-size: 0.6rem;
    color: #A8B8C8;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    line-height: 1;
    margin-top: 2px;
}

.date-badge-sm {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    flex-shrink: 0;
}

/* ============================================================
   CARDS NOUVELLES
   ============================================================ */

.news-card {
    @apply bg-rc-card border border-rc-border rounded-2xl overflow-hidden hover:border-rc-orange/40 transition-all duration-300;
}

.news-card:hover {
    box-shadow: 0 8px 32px rgba(255, 102, 0, 0.08);
    transform: translateY(-2px);
}

/* ============================================================
   GALERIES
   ============================================================ */

.gallery-card {
    @apply bg-rc-card border border-rc-border rounded-2xl overflow-hidden hover:border-rc-orange/50 transition-all duration-300;
}

.gallery-card:hover {
    box-shadow: 0 8px 32px rgba(255, 102, 0, 0.1);
    transform: translateY(-2px);
}

.gallery-card-image {
    @apply relative overflow-hidden;
}

.gallery-overlay {
    @apply absolute inset-0 bg-black/60 flex flex-col items-center justify-center gap-2 opacity-0 group-hover:opacity-100 transition-opacity duration-300;
}

.gallery-placeholder {
    background: linear-gradient(135deg, #1e1e1e, #252525);
    border-bottom: 1px solid var(--rc-border);
}

/* Grille de photos (page galerie) */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

@media (min-width: 640px) {
    .photo-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}

@media (min-width: 1024px) {
    .photo-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
}

.photo-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 1 / 1;
    border: 1px solid var(--rc-border);
    background: var(--rc-card);
}

.photo-item-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.photo-item:hover .photo-item-overlay { opacity: 1; }

.photo-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 20px 12px 10px;
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.photo-item:hover .photo-caption { opacity: 1; }

/* ============================================================
   LIGHTBOX
   ============================================================ */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.lightbox.hidden { display: none !important; }

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    cursor: pointer;
}

.lightbox-container {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 60px;
    pointer-events: none;
}

.lightbox-image-wrap {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    pointer-events: auto;
}

.lightbox-image {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    display: block;
    box-shadow: 0 25px 80px rgba(0,0,0,0.8);
}

.lightbox-caption {
    text-align: center;
    color: rgba(255,255,255,0.7);
    font-size: 0.875rem;
    margin-top: 12px;
    min-height: 20px;
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
    pointer-events: auto;
}

.lightbox-close:hover { background: rgba(255, 102, 0, 0.6); }

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    pointer-events: auto;
}

.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }
.lightbox-nav:hover { background: rgba(255, 102, 0, 0.6); border-color: #FF6600; }

.lightbox-counter {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.5);
    font-size: 0.8rem;
    pointer-events: auto;
}

/* ============================================================
   FORMULAIRES (pages publiques)
   ============================================================ */

.form-label {
    @apply block text-gray-300 text-sm font-medium mb-2;
}

.form-input {
    @apply w-full bg-rc-dark border border-rc-border rounded-xl px-4 py-3 text-white placeholder-gray-600 focus:outline-none focus:border-rc-orange transition-colors;
}

.form-input-error {
    border-color: #ef4444 !important;
}

.form-input:focus { border-color: #FF6600; }

.form-error {
    @apply text-red-400 text-sm mt-1.5;
}

/* Messages flash publics */
.flash-message {
    @apply rounded-xl p-4 flex items-center gap-3 text-sm font-medium;
    animation: slideDown 0.3s ease;
}

.flash-success { @apply bg-green-500/10 border border-green-500/30 text-green-400; }
.flash-error   { @apply bg-red-500/10 border border-red-500/30 text-red-400; }

/* Feature cards (à propos) */
.feature-card {
    @apply bg-rc-card border border-rc-border rounded-2xl p-6 hover:border-rc-orange/40 transition-all duration-300;
}

.feature-icon {
    @apply w-14 h-14 rounded-2xl flex items-center justify-center;
    background: linear-gradient(135deg, rgba(255,102,0,0.2), rgba(255,102,0,0.05));
    border: 1px solid rgba(255, 102, 0, 0.3);
    color: #FF6600;
}

/* Article content */
.article-content p {
    @apply mb-4;
}

/* ============================================================
   ADMIN STYLES — tous les boutons sont définis dans admin-header.php
   (l'@apply Tailwind ne fonctionne pas sur les fichiers CSS externes avec CDN)
   ============================================================ */

/* ============================================================
   ANIMATIONS
   ============================================================ */

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

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}

.animate-fade-in    { animation: fadeIn 0.3s ease; }
.animate-scale-in   { animation: scaleIn 0.3s ease; }

/* Transition douce pour l'image du lightbox */
.lightbox-image { animation: scaleIn 0.2s ease; }

/* ============================================================
   HERO SECTION
   ============================================================ */

.hero-section {
    background: linear-gradient(
        135deg,
        #0f0f0f 0%,
        #1a0a00 30%,
        #0f0f0f 60%,
        #0a0a12 100%
    );
}

/* ============================================================
   CURSEUR PERSONNALISÉ
   ============================================================ */

/* Le cercle curseur interceptait tous les clics (z-index: 10000000/10000001 sans pointer-events: none) */
.cursor-outer,
.cursor-inner {
    pointer-events: none;
}

/* Éléments décoratifs : jamais cibles de clics
   - .gt-sub-title : texte rotatif (opacity:0.04) qui déborde hors de sa section à >1899px
   - formes décoratives hero/sections */
.gt-event-section-2 .gt-sub-title,
.gt-hero-2 .gt-line-shape,
.gt-hero-2 .gt-line-shape-animation,
.gt-left-shape,
.gt-bg-shape,
.gt-dot-shape,
.gt-about-shape {
    pointer-events: none;
}

/* ============================================================
   BOUTONS
   ============================================================ */

/* Empêche le bouton de rétrécir dans un conteneur flex (évite le clip du texte) */
.gt-title-item .gt-theme-btn,
.gt-title-item .gt-theme-btn.style-2 {
    flex-shrink: 0;
}

/* ============================================================
   IMAGES DÉCORATIVES
   ============================================================ */

/* bg-shape section À propos : s'étire sur toute la largeur à >1920px */
.gt-about-section-2 .gt-bg-shape img {
    width: 100%;
    height: auto;
}

/* ============================================================
   BOITES STATISTIQUES (section événements accueil)
   ============================================================ */

/* Hauteur égale et contenu centré */
.gt-event-wrapper-21 .row.g-4 {
    align-items: stretch;
}
.gt-event-wrapper-21 .gt-counter-box-items {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
}
.gt-event-wrapper-21 .gt-counter-box-items h2 {
    text-align: center;
}
.gt-event-wrapper-21 .gt-counter-box-items h4 {
    text-align: center;
    max-width: none;
}

/* ============================================================
   COUNTDOWN TIMER
   ============================================================ */

/* Espacement minimum entre les 3 éléments flex (titre, timer, bouton) */
.event-ride-time-wrapper {
    gap: 30px;
}

/* Le titre s'étire pour pousser le timer loin de la forme décorative gauche */
.event-ride-time-wrapper .gt-title {
    flex: 1 0 310px;
    max-width: 400px;
}

/* Timer : taille fixe, ne grandit pas */
.event-ride-time-wrapper .gt-coming-soon-timer {
    flex: 0 0 auto;
    gap: 8px;
}

/* Blocs chiffres plus compacts (était 100px) */
.event-ride-time-wrapper .gt-coming-soon-timer .gt-timer-content {
    min-width: 75px;
    text-align: center !important;
}

/* Sur écrans ≤1199px où les éléments passent à la ligne : centrer */
@media (max-width: 1199px) {
    .event-ride-time-wrapper {
        justify-content: center;
    }
    .event-ride-time-wrapper .gt-coming-soon-timer {
        justify-content: center;
    }
}

/* ============================================================
   UTILITAIRES
   ============================================================ */

/* Ligne de dégradé décorative */
.gradient-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, #FF6600, transparent);
}

/* Texte dégradé orange */
.text-gradient {
    background: linear-gradient(135deg, #FF6600, #ff8533);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Responsive image galleries */
@media (max-width: 640px) {
    .photo-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .lightbox-container { padding: 10px 50px; }
}

/* Print */
@media print {
    header, footer, .no-print { display: none !important; }
    body { background: white; color: black; }
}

/* .gt-line-shape-2 du footer déborde vers le haut (top:-52%) et bloque les clics
   sur les éléments de la section précédente (ex: bouton Facebook). */
.gt-footer-section .gt-line-shape-2 {
    pointer-events: none;
}
