/* =========================================
   KARTING PORTAL STYLES
   ========================================= */

/* Hero Section */
#karting_hero {
    position: relative;
    height: 50vh; /* Moins haut que l'accueil pour entrer vite dans le contenu */
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.overlay-hero-karting {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* Dégradé violet sombre vers fond noir */
    background: linear-gradient(to bottom, rgba(63, 42, 86, 0.6) 0%, var(--dark-bg) 100%);
    z-index: 2;
}

/* S'assurer que l'image de fond couvre tout sans gêner le flexbox */
.bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* Forcer le contenu à se centrer */
.karting-hero-content {
    position: relative;
    z-index: 3;
    width: 100%; /* Ajoute ceci pour forcer la pleine largeur */
    text-align: center;
    padding-top: 80px; 
}

.portal-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 1rem;
    text-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.portal-subtitle {
    font-size: 1.3rem;
    color: var(--text-muted);
}

/* Quick Navigation Cards */
#karting_quick_nav {
    padding: 2rem 4rem;
    background-color: var(--dark-bg);
    margin-top: -80px; /* Remonte légèrement sur le hero */
    position: relative;
    z-index: 10;
}

.nav-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.portal-card {
    position: relative;
    height: 350px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.card-bg {
    transition: transform 0.6s ease;
}

.card-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(12, 10, 16, 0.95) 0%, rgba(63, 42, 86, 0.4) 100%);
    transition: background 0.4s ease;
    z-index: 2;
}

.portal-card:hover .card-bg {
    transform: scale(1.08);
}

.portal-card:hover .card-overlay {
    background: linear-gradient(to top, rgba(12, 10, 16, 0.9) 0%, rgba(107, 69, 150, 0.6) 100%);
}

.card-content {
    position: absolute;
    bottom: 0; left: 0; width: 100%;
    padding: 2.5rem;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
}

.card-content h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--text-main);
}

.card-content p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.5;
}

.btn-card {
    margin-top: 1rem;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.4s ease;
}

/* Le bouton apparaît au survol de la carte */
.portal-card:hover .btn-card {
    opacity: 1;
    transform: translateY(0);
}

/* Detailed Presentation Section */
#karting_presentation {
    padding: 5rem 4rem;
    background-color: var(--surface-bg);
}

.section-title-centered {
    text-align: center;
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--accent-kart);
    margin-bottom: 5rem;
    text-transform: uppercase;
}

.presentation-row {
    display: flex;
    align-items: center;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto 6rem auto;
}

.reverse-row {
    flex-direction: row-reverse;
}

.presentation-image {
    flex: 1;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.presentation-text {
    flex: 1;
}

.presentation-text h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.presentation-text p {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.format-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.format-features li {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.format-features li::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--accent-kart);
    border-radius: 50%;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .portal-title { font-size: 2.5rem; }
    #karting_quick_nav { padding: 2rem 1.5rem; margin-top: -40px; }
    #karting_presentation { padding: 4rem 1.5rem; }
    .presentation-row, .reverse-row { flex-direction: column; gap: 2rem; }
    .presentation-image { height: 250px; width: 100%; }
    .btn-card { opacity: 1; transform: translateY(0); } /* Boutons toujours visibles sur mobile */
}

/* =========================================
   HERO LOGO PATTERN ANIMATION
   ========================================= */
/* =========================================
   HERO LOGO PATTERN ANIMATION (TILTED)
   ========================================= */
.logo-pattern-bg {
    position: absolute;
    /* On rend la div géante et on la centre pour que la rotation ne crée pas de "trous" dans les coins */
    top: -50%; 
    left: -50%; 
    width: 200%; 
    height: 200%;
    
    background-image: url('/assets/logos/rkj_id_white.webp');
    /* Garde cette taille en tête, on s'en sert pour la boucle d'animation */
    background-size: 300px auto; 
    background-repeat: repeat;
    opacity: 0.1; 
    
    /* L'inclinaison dynamique (tu peux ajuster les degrés : -15deg, -20deg...) */
    transform: rotate(-18deg); 
    
    /* On anime maintenant le fond, plus la div elle-même */
    animation: scroll_pattern_bg 15s linear infinite;
    z-index: 1;
}

/* La boucle magique et invisible */
@keyframes scroll_pattern_bg {
    0% { background-position: 0 0; }
    /* On déplace exactement de la largeur d'un logo (300px) pour une boucle parfaite */
    100% { background-position: -300px 0; } 
}
