/* ==========================================================================
   INDEX.CSS — Page d'accueil — Style Épique / Futuriste
   Dépend de : global.css
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700&family=Rajdhani:wght@400;500;600;700&display=swap');

/* === PAGE BASE === */
.home-page {
    background: #060b14;
    color: #e2e8f0;
    font-family: 'Rajdhani', Arial, sans-serif;
}

/* Grille en fond (global sur toute la page) */
.home-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(251,191,36,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(251,191,36,0.025) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
    position: relative;
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    z-index: 1;
}

/* Image de fond avec overlay sombre */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('bg.jpg') no-repeat center/cover;
    filter: brightness(0.25) saturate(0.6);
    z-index: 0;
}

/* Halo or central */
.hero::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: 300px;
    background: radial-gradient(ellipse, rgba(251,191,36,0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 24px;
}

.hero-content h2 {
    font-family: 'Cinzel', serif;
    font-size: clamp(2.2rem, 6vw, 4.5rem);
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 4px;
    line-height: 1.1;
    margin: 0 0 20px;
    text-shadow: 0 0 40px rgba(251,191,36,0.3);
}

/* Trait décoratif sous le titre */
.hero-content h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 18px auto 0;
}

.hero-content p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: #94a3b8;
    letter-spacing: 1px;
    margin: 0 0 36px;
    line-height: 1.6;
}

/* === INFOS JOUEURS EN LIGNE === */
.online-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 36px;
}

.player-count {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(34,197,94,0.3);
    border-radius: 999px;
    padding: 8px 20px;
    font-size: 1rem;
    font-weight: 600;
    color: #4ade80;
    letter-spacing: 1px;
}

.player-count::before {
    content: '';
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 8px #4ade80;
    animation: pulse-dot 1.8s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(1.4); }
}

.online-top {
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(251,191,36,0.15);
    border-radius: 12px;
    padding: 14px 20px;
    min-width: 260px;
    max-width: 340px;
}

.online-top h4 {
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    letter-spacing: 4px;
    color: var(--gold);
    text-transform: uppercase;
    margin: 0 0 10px;
}

.online-top ul {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.online-top ul li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #cbd5e1;
}

.online-top ul li .job-icon {
    width: 22px; height: 22px;
    border-radius: 4px;
    object-fit: cover;
}

/* === BOUTON CTA === */
.cta {
    display: inline-block;
    position: relative;
    padding: 16px 44px;
    font-family: 'Cinzel', serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #000;
    background: var(--gold);
    border-radius: 4px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 3px;
    cursor: pointer;
    overflow: hidden;
    transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
    box-shadow: 0 0 20px rgba(251,191,36,0.3), 0 0 40px rgba(251,191,36,0.1);
}

/* Reflet animé */
.cta::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    transform: skewX(-20deg);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%   { left: -100%; }
    60%  { left: 160%; }
    100% { left: 160%; }
}

.cta:hover {
    background: #f59e0b;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 0 30px rgba(251,191,36,0.5), 0 0 60px rgba(251,191,36,0.2);
    color: #000;
    text-decoration: none;
}

.cta.pulse { animation: hero-pulse 2.5s ease-in-out infinite; }

@keyframes hero-pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(251,191,36,0.3), 0 0 40px rgba(251,191,36,0.1); }
    50%       { box-shadow: 0 0 35px rgba(251,191,36,0.55), 0 0 70px rgba(251,191,36,0.2); }
}

/* ==========================================================================
   USP (points forts)
   ========================================================================== */
.usp {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 36px 24px;
    max-width: 900px;
    margin: 0 auto;
}

.usp-item {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(251,191,36,0.12);
    border-radius: 10px;
    padding: 14px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #cbd5e1;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: border-color 0.3s, background 0.3s, transform 0.2s;
}

.usp-item:hover {
    border-color: rgba(251,191,36,0.35);
    background: rgba(251,191,36,0.05);
    transform: translateY(-2px);
    color: #f1f5f9;
}

/* ==========================================================================
   DONATION GOAL
   ========================================================================== */
.donation-goal {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 auto 20px;
    padding: 24px 28px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(251,191,36,0.15);
    border-radius: 14px;
    
}

/* Coin décoratif (même style que credits) */
.donation-goal::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 40px; height: 40px;
    border-top: 2px solid rgba(251,191,36,0.4);
    border-right: 2px solid rgba(251,191,36,0.4);
    border-radius: 0 14px 0 0;
}

.donation-goal h3 {
    font-family: 'Cinzel', serif;
    font-size: 0.78rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--gold);
    margin: 0 0 14px;
}

.donation-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 14px;
    letter-spacing: 0.5px;
}

.donation-meta b { color: #f1f5f9; font-weight: 600; }

/* Barre de progression */
.goal-bar {
    position: relative;
    height: 8px;
    background: rgba(255,255,255,0.06);
    border-radius: 999px;
    overflow: visible;
    margin-bottom: 8px;
}

.goal-fill {
    height: 100%;
    background: linear-gradient(90deg, #b45309, var(--gold), #fde68a);
    border-radius: 999px;
    transition: width 1s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 0 10px rgba(251,191,36,0.4);
}

.goal-percent {
    position: absolute;
    right: 0;
    top: -22px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 1px;
}

.goal-cta {
    margin-top: 16px;
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
}

.goal-cta a.btn {
    display: inline-block;
    padding: 9px 20px;
    border-radius: 6px;
    background: var(--gold);
    color: #000;
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}

.goal-cta a.btn:hover {
    background: #f59e0b;
    transform: translateY(-1px);
}

.goal-cta small {
    color: #475569;
    font-size: 0.85rem;
}

/* ==========================================================================
   CARROUSEL YOUTUBE
   ========================================================================== */
.yt-section {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 24px 80px;
}

.yt-section__header {
    text-align: center;
    margin-bottom: 40px;
}

.yt-section__title {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 700;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin: 0 0 10px;
    text-shadow: 0 0 20px rgba(251,191,36,0.3);
}

.yt-section__header::after {
    content: '';
    display: block;
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 16px auto 0;
}

.yt-section__sub {
    color: #64748b;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 8px 0 0;
}

/* Carrousel track */
.yt-carousel {
    position: relative;
    overflow: hidden;
}

.yt-track {
    display: flex;
    gap: 20px;
    transition: transform 0.5s cubic-bezier(.4,0,.2,1);
    will-change: transform;
}

/* Carte vidéo */
.yt-card {
    flex: 0 0 calc(33.333% - 14px);
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(251,191,36,0.1);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.3s, transform 0.25s;
    position: relative;
}

.yt-card:hover {
    border-color: rgba(251,191,36,0.35);
    transform: translateY(-4px);
}

/* Thumbnail + overlay play */
.yt-thumb {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #0d1117;
    overflow: hidden;
}

.yt-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
    filter: brightness(0.85);
}

.yt-card:hover .yt-thumb img {
    transform: scale(1.05);
    filter: brightness(1);
}

/* Bouton play central */
.yt-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    transition: background 0.3s;
}

.yt-card:hover .yt-play { background: rgba(0,0,0,0.15); }

.yt-play-btn {
    width: 54px; height: 54px;
    border-radius: 50%;
    background: rgba(251,191,36,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
}

.yt-card:hover .yt-play-btn {
    background: var(--gold);
    transform: scale(1.12);
}

/* Triangle play */
.yt-play-btn::after {
    content: '';
    width: 0; height: 0;
    border-style: solid;
    border-width: 9px 0 9px 18px;
    border-color: transparent transparent transparent #000;
    margin-left: 4px;
}

/* Durée */
.yt-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

/* Infos de la carte */
.yt-info {
    padding: 14px 16px 16px;
}

.yt-info__channel {
    font-size: 0.72rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 5px;
    font-weight: 600;
}

.yt-info__title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #e2e8f0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Lightbox embed */
.yt-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.88);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.yt-lightbox.open { display: flex; }

.yt-lightbox__inner {
    position: relative;
    width: min(860px, 92vw);
    aspect-ratio: 16/9;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(251,191,36,0.2);
    box-shadow: 0 0 60px rgba(0,0,0,0.8);
}

.yt-lightbox__inner iframe {
    width: 100%; height: 100%;
    border: none;
}

.yt-lightbox__close {
    position: absolute;
    top: -44px; right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
    padding: 4px 10px;
    line-height: 1;
    transition: color 0.2s;
}

.yt-lightbox__close:hover { color: var(--gold); }

/* Navigation carrousel */
.yt-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 28px;
}

.yt-nav-btn {
    width: 42px; height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(251,191,36,0.3);
    background: rgba(255,255,255,0.03);
    color: var(--gold);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.yt-nav-btn:hover {
    background: rgba(251,191,36,0.1);
    border-color: var(--gold);
    transform: scale(1.08);
}

.yt-nav-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
    transform: none;
}

.yt-dots {
    display: flex;
    gap: 8px;
}

.yt-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: rgba(251,191,36,0.25);
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    padding: 0;
}

.yt-dot.active {
    background: var(--gold);
    transform: scale(1.3);
}

/* ==========================================================================
   ANIMATIONS D'ENTRÉE
   ========================================================================== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards;
}

.fade-in-delay {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease 0.25s forwards;
}

@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}

.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 900px) {
    .yt-card { flex: 0 0 calc(50% - 10px); }
}

@media (max-width: 600px) {
    .yt-card { flex: 0 0 calc(100% - 0px); }
    .hero-content h2 { letter-spacing: 2px; }
    .usp { gap: 10px; }
    .usp-item { font-size: 0.85rem; padding: 10px 18px; }
    .donation-goal { padding: 18px 16px; }
    .goal-percent { display: none; }
}

/* ==========================================================================
   OVERRIDES DE SÉCURITÉ
   Force l'affichage correct même si home.css / style.css anciens sont chargés
   ========================================================================== */

/* La donation goal est toujours visible — reveal ne s'applique pas */
.home-page .donation-goal.reveal,
.home-page .donation-goal {
    opacity: 1 !important;
    transform: none !important;
    background: rgba(255,255,255,0.02) !important;
    border: 1px solid rgba(251,191,36,0.15) !important;
    box-shadow: none !important;
    color: #e2e8f0 !important;
    display: block !important;
}

.home-page .donation-goal h3 {
    color: var(--gold) !important;
    font-family: 'Cinzel', serif !important;
    font-size: 0.78rem !important;
    letter-spacing: 4px !important;
    text-transform: uppercase !important;
}

.home-page .donation-meta {
    display: flex !important;
    color: #64748b !important;
    font-size: 0.9rem !important;
}

.home-page .donation-meta b {
    color: #f1f5f9 !important;
}

.home-page .goal-bar {
    display: block !important;
    height: 8px !important;
    background: rgba(255,255,255,0.08) !important;
    border-radius: 999px !important;
    overflow: hidden !important;
}

.home-page .goal-fill {
    display: block !important;
    height: 100% !important;
    background: linear-gradient(90deg, #b45309, #fbbf24, #fde68a) !important;
    border-radius: 999px !important;
    box-shadow: 0 0 10px rgba(251,191,36,0.4) !important;
}

.home-page .goal-percent {
    color: var(--gold) !important;
}

.home-page .goal-cta {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    margin-top: 16px !important;
}

.home-page .goal-cta a.btn {
    background: var(--gold) !important;
    color: #000 !important;
    padding: 9px 20px !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    display: inline-block !important;
}

.home-page .goal-cta small {
    color: #475569 !important;
}

/* Donation goal : animation d'entrée CSS pure, sans JS */
@keyframes donReveal {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: none; }
}

.home-page .donation-goal.reveal,
.home-page section.donation-goal {
    animation: donReveal 0.6s ease 0.2s both !important;
}

