/* 🏠 HOME PAGE CSS - Page d'accueil avec design oriental */

/* ================================
   🌟 HERO SECTION
   ================================ */
.hero-section {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, 
        var(--color-primary) 0%, 
        var(--color-primary-dark) 50%,
        var(--color-secondary) 100%);
    color: white;
    padding: 3rem 0;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    z-index: 1;
}

.hero-pattern {
    height: 100%;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(212, 175, 55, 0.3) 2px, transparent 2px),
        radial-gradient(circle at 75% 75%, rgba(212, 175, 55, 0.2) 1px, transparent 1px),
        linear-gradient(45deg, transparent 40%, rgba(212, 175, 55, 0.1) 40%, rgba(212, 175, 55, 0.1) 60%, transparent 60%);
    background-size: 60px 60px, 30px 30px, 120px 120px;
    background-position: 0 0, 30px 30px, 0 0;
    animation: hero-pattern-move 30s linear infinite;
}

@keyframes hero-pattern-move {
    0% { background-position: 0 0, 30px 30px, 0 0; }
    100% { background-position: 60px 60px, 90px 90px, 120px 120px; }
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xxxl);
    align-items: center;
    width: 100%;
}

.hero-text {
    text-align: left;
}

.hero-title {
    margin-bottom: var(--spacing-xl);
}

.title-main {
    display: block;
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: var(--font-weight-bold);
    font-family: 'Playfair Display', 'Times New Roman', serif;
    line-height: 1.1;
    margin-bottom: var(--spacing-sm);
    background: linear-gradient(45deg, #fff, var(--color-accent));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: title-glow 3s ease-in-out infinite alternate;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.title-arabic {
    display: block;
    font-family: var(--font-family-arabic);
    font-size: clamp(1.2rem, 4vw, 2rem);
    color: var(--color-accent);
    font-weight: var(--font-weight-medium);
    direction: rtl;
    text-align: right;
}

@keyframes title-glow {
    0% { text-shadow: 0 0 10px rgba(212, 175, 55, 0.5); }
    100% { text-shadow: 0 0 20px rgba(212, 175, 55, 0.8), 0 0 30px rgba(212, 175, 55, 0.3); }
}

.hero-subtitle {
    font-size: var(--font-size-lg);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--spacing-xl);
    opacity: 0.9;
    max-width: 500px;
}

.hero-stats {
    display: flex;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xxl);
}

.hero-stats .stat-item {
    text-align: center;
}

.hero-stats .stat-number {
    display: block;
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-accent);
    line-height: 1;
}

.hero-stats .stat-label {
    display: block;
    font-size: var(--font-size-sm);
    opacity: 0.8;
    margin-top: var(--spacing-xs);
}

.hero-actions {
    display: flex;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

/* Hero Image */
.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-mosque {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    color: var(--color-accent);
    z-index: 2;
}

.mosque-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.2), transparent);
    border-radius: 50%;
    animation: mosque-pulse 4s ease-in-out infinite;
}

@keyframes mosque-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.8; }
}

.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.floating-star {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--color-accent);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    animation: float-star 6s ease-in-out infinite;
    animation-delay: var(--delay);
}

.floating-star:nth-child(1) { top: 20%; left: 10%; }
.floating-star:nth-child(2) { top: 60%; right: 20%; }
.floating-star:nth-child(3) { bottom: 30%; left: 30%; }

.floating-crescent {
    position: absolute;
    top: 10%;
    right: 10%;
    width: 30px;
    height: 30px;
    background: var(--color-accent);
    border-radius: 50%;
    position: relative;
    animation: float-crescent 8s ease-in-out infinite;
}

.floating-crescent::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 4px;
    width: 26px;
    height: 26px;
    background: var(--color-primary);
    border-radius: 50%;
}

@keyframes float-star {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.6; }
    50% { transform: translateY(-20px) rotate(180deg); opacity: 1; }
}

@keyframes float-crescent {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(180deg); }
}

/* ================================
   🎮 GAMES SECTION
   ================================ */
.games-section {
    background: var(--color-bg);
    padding: var(--spacing-xxxl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xxxl);
}

.section-title {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
}

.section-subtitle {
    font-size: var(--font-size-lg);
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: var(--line-height-relaxed);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
}

.game-card {
    position: relative;
    padding: var(--spacing-xl);
    text-align: center;
    transition: var(--transition-normal);
    overflow: hidden;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    transition: var(--transition-normal);
}

.game-card:hover::before {
    height: 6px;
    box-shadow: 0 2px 10px rgba(0, 166, 147, 0.3);
}

.game-card.featured {
    border: 2px solid var(--color-accent);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.05), rgba(0, 166, 147, 0.05));
}

.featured-badge {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: var(--color-accent);
    color: white;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-full);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.game-card-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    border-radius: var(--border-radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: var(--font-size-3xl);
    margin: 0 auto var(--spacing-lg);
    position: relative;
    overflow: hidden;
}

.game-card-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(-45deg);
    transition: var(--transition-normal);
}

.game-card:hover .game-card-icon::before {
    animation: icon-shine 1s ease-in-out;
}

@keyframes icon-shine {
    0% { transform: translateX(-200%) rotate(-45deg); }
    100% { transform: translateX(200%) rotate(-45deg); }
}

.game-card-content {
    margin-bottom: var(--spacing-lg);
}

.game-card-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
}

.game-card-description {
    color: var(--color-text-muted);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--spacing-md);
}

.game-card-stats {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.game-stat {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.game-card-actions {
    margin-top: var(--spacing-lg);
}

/* ================================
   👥 COMMUNITY SECTION
   ================================ */
.community-section {
    background: linear-gradient(135deg, var(--color-surface), var(--color-surface-alt));
    padding: var(--spacing-xxxl) 0;
}

.community-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xxxl);
    align-items: center;
}

.community-text {
    text-align: left;
}

.section-description {
    font-size: var(--font-size-lg);
    color: var(--color-text-muted);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--spacing-xl);
}

.community-features {
    margin-bottom: var(--spacing-xl);
}

.feature-item {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--color-secondary), var(--color-secondary-dark));
    border-radius: var(--border-radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: var(--font-size-xl);
    flex-shrink: 0;
}

.feature-content h4 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--color-primary);
    margin-bottom: var(--spacing-xs);
}

.feature-content p {
    color: var(--color-text-muted);
    margin: 0;
}

.community-actions {
    display: flex;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

/* Community Visual */
.community-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.community-circle {
    position: relative;
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    animation: community-rotate 20s linear infinite;
}

.circle-content {
    text-align: center;
    z-index: 2;
}

.circle-number {
    display: block;
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    line-height: 1;
}

.circle-label {
    display: block;
    font-size: var(--font-size-lg);
    opacity: 0.9;
}

.orbit-items {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.orbit-item {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    background: var(--color-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: var(--font-size-lg);
    transform-origin: 0 0;
    transform: translate(-50%, -50%) rotate(var(--angle)) translateX(150px) rotate(calc(-1 * var(--angle)));
    animation: orbit-float 3s ease-in-out infinite;
    animation-delay: calc(var(--angle) / 60deg * 0.5s);
}

@keyframes community-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes orbit-float {
    0%, 100% { transform: translate(-50%, -50%) rotate(var(--angle)) translateX(150px) rotate(calc(-1 * var(--angle))) scale(1); }
    50% { transform: translate(-50%, -50%) rotate(var(--angle)) translateX(160px) rotate(calc(-1 * var(--angle))) scale(1.1); }
}

/* ================================
   ⭐ FEATURES SECTION
   ================================ */
.features-section {
    background: var(--color-bg);
    padding: var(--spacing-xxxl) 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
}

.feature-card {
    text-align: center;
    padding: var(--spacing-xl);
    transition: var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.feature-card .feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
    border-radius: var(--border-radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: var(--font-size-2xl);
    margin: 0 auto var(--spacing-lg);
}

.feature-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
}

.feature-description {
    color: var(--color-text-muted);
    line-height: var(--line-height-relaxed);
    margin: 0;
}

/* ================================
   🎯 CTA SECTION
   ================================ */
.cta-section {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: white;
    text-align: center;
    padding: var(--spacing-xxxl) 0;
    position: relative;
    overflow: hidden;
}

.cta-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    z-index: 1;
}

.cta-content {
    position: relative;
    z-index: 2;
}

.cta-title {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-lg);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-description {
    font-size: var(--font-size-lg);
    opacity: 0.9;
    margin-bottom: var(--spacing-xxl);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    line-height: var(--line-height-relaxed);
}

.cta-actions {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

/* ================================
   ⚡ ANIMATIONS
   ================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animations d'entrée */
.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

/* Scroll animations */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Games section always visible */
.games-visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.games-visible .game-card,
.games-visible .feature-card {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Stagger animations */
.stagger-animate:nth-child(1) { animation-delay: 0.1s; }
.stagger-animate:nth-child(2) { animation-delay: 0.2s; }
.stagger-animate:nth-child(3) { animation-delay: 0.3s; }
.stagger-animate:nth-child(4) { animation-delay: 0.4s; }
.stagger-animate:nth-child(5) { animation-delay: 0.5s; }

/* ================================
   📱 RESPONSIVE DESIGN
   ================================ */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--spacing-xl);
    }
    
    .hero-text {
        text-align: center;
    }
    
    .community-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--spacing-xl);
    }
    
    .community-text {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .hero-section {
        min-height: 80vh;
        padding: var(--spacing-xl) 0;
    }
    
    .title-main {
        font-size: 3rem;
    }
    
    .hero-stats {
        justify-content: center;
        gap: var(--spacing-lg);
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-mosque {
        width: 150px;
        height: 150px;
        font-size: 6rem;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: var(--spacing-lg);
    }
    
    .community-circle {
        width: 200px;
        height: 200px;
    }
    
    .orbit-item {
        transform: translate(-50%, -50%) rotate(var(--angle)) translateX(120px) rotate(calc(-1 * var(--angle)));
    }
    
    .cta-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .section-title {
        font-size: var(--font-size-2xl);
        flex-direction: column;
        gap: var(--spacing-sm);
    }
}

@media (max-width: 480px) {
    .title-main {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: var(--spacing-md);
        align-items: center;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-actions .btn {
        width: 100%;
        max-width: 280px;
    }
    
    .community-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .community-actions .btn {
        width: 100%;
        max-width: 280px;
    }
    
    .cta-actions .btn {
        width: 100%;
        max-width: 280px;
    }
    
    .feature-item {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .floating-star {
        display: none;
    }
    
    .floating-crescent {
        display: none;
    }
}
