/* ===================================
   JeuDeYams.com - Styles Communs
   =================================== */

:root {
    --primary: #FF6B35;
    --primary-dark: #E85A2A;
    --secondary: #4ECDC4;
    --accent: #FFE66D;
    --dark: #2C3E50;
    --darker: #1a252f;
    --light: #F7F9FC;
    --white: #FFFFFF;
    --gradient-fun: linear-gradient(135deg, #FF6B35 0%, #FFE66D 50%, #4ECDC4 100%);
    --gradient-hero: linear-gradient(180deg, #1a252f 0%, #2C3E50 100%);
    --shadow-soft: 0 4px 20px rgba(0,0,0,0.1);
    --shadow-card: 0 10px 40px rgba(0,0,0,0.15);
    --shadow-glow: 0 0 40px rgba(78, 205, 196, 0.3);
    --success: #27ae60;
    --warning: #f39c12;
    --danger: #e74c3c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.7;
    overflow-x: hidden;
}

/* ===================================
   Navigation
   =================================== */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 2rem;
    background: rgba(26, 37, 47, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 3px solid var(--primary);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Bangers', cursive;
    font-size: 2rem;
    color: var(--white);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-dice {
    font-size: 2.5rem;
    animation: rollDice 3s infinite;
}

@keyframes rollDice {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(15deg); }
    75% { transform: rotate(-15deg); }
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--accent);
    background: rgba(255, 230, 109, 0.1);
}

.nav-links a.btn-play {
    background: var(--primary);
    color: var(--white);
}

.nav-links a.btn-play:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 107, 53, 0.4);
}

/* Dropdown Autres Jeux */
.nav-dropdown {
    position: relative;
}

.nav-dropdown > a {
    cursor: pointer;
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--darker);
    border: 2px solid var(--primary);
    border-radius: 15px;
    padding: 0.8rem 0;
    min-width: 220px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    z-index: 1001;
    margin-top: 0.5rem;
}

.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 14px;
    background: var(--darker);
    border-left: 2px solid var(--primary);
    border-top: 2px solid var(--primary);
    transform: translateX(-50%) rotate(45deg);
}

.nav-dropdown:hover .nav-dropdown-menu {
    display: block;
}

.nav-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border-radius: 0;
    white-space: nowrap;
}

.nav-dropdown-menu a:hover {
    background: rgba(255, 107, 53, 0.15);
    color: var(--accent);
    padding-left: 2rem;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--white);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--darker);
    padding: 1rem;
    flex-direction: column;
    gap: 0.5rem;
    border-bottom: 3px solid var(--primary);
    z-index: 999;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu a {
    color: var(--white);
    text-decoration: none;
    padding: 1rem;
    font-weight: 700;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.mobile-menu a:first-child {
    background: var(--primary);
    text-align: center;
}

.mobile-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mobile-menu-separator {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 0.5rem 0;
}

.mobile-menu-label {
    color: var(--accent);
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.5rem 1rem 0;
}

.mobile-menu .submenu-link {
    padding-left: 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
}

.mobile-menu .submenu-link:first-of-type {
    background: transparent;
    text-align: left;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
}

/* ===================================
   Buttons
   =================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 800;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 5px 20px rgba(255, 107, 53, 0.4);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 107, 53, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--dark);
}

.btn-cta {
    background: var(--white);
    color: var(--primary);
    font-size: 1.3rem;
    padding: 1.2rem 3rem;
}

.btn-cta:hover {
    background: var(--dark);
    color: var(--white);
}

.btn-large {
    padding: 1.2rem 3rem;
    font-size: 1.2rem;
}

/* ===================================
   Page Hero (for subpages)
   =================================== */
.page-hero {
    background: var(--gradient-hero);
    padding: 140px 2rem 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    position: absolute;
    font-size: 20rem;
    opacity: 0.05;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.page-title {
    font-family: 'Bangers', cursive;
    font-size: 4rem;
    color: var(--white);
    text-shadow: 4px 4px 0 var(--primary);
    margin-bottom: 1rem;
}

.page-subtitle {
    font-size: 1.3rem;
    color: rgba(255,255,255,0.8);
    max-width: 600px;
    margin: 0 auto;
}

/* ===================================
   Section Titles
   =================================== */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-family: 'Bangers', cursive;
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--dark);
}

.section-title span {
    color: var(--primary);
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 3rem;
}

/* ===================================
   Content Wrapper (for subpages)
   =================================== */
.content-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

/* ===================================
   Tip / Warning Boxes
   =================================== */
.tip-box {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.1), rgba(255, 230, 109, 0.1));
    border: 2px solid var(--secondary);
    border-radius: 15px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.tip-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.tip-content {
    color: #555;
}

.warning-box {
    background: rgba(231, 76, 60, 0.1);
    border: 2px solid var(--danger);
    border-radius: 15px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.warning-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    color: var(--danger);
    margin-bottom: 0.5rem;
}

/* ===================================
   CTA Section
   =================================== */
.cta-section {
    background: var(--gradient-fun);
    padding: 5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    font-size: 15rem;
    opacity: 0.1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-title {
    font-family: 'Bangers', cursive;
    font-size: 3.5rem;
    color: var(--white);
    text-shadow: 3px 3px 0 rgba(0,0,0,0.2);
    margin-bottom: 1rem;
}

.cta-text {
    font-size: 1.3rem;
    color: var(--white);
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Subpage CTA */
.rules-cta {
    background: var(--gradient-fun);
    padding: 4rem 2rem;
    text-align: center;
    border-radius: 20px;
    margin-top: 3rem;
}

.rules-cta .cta-title {
    font-size: 2.5rem;
}

.rules-cta .btn {
    background: var(--white);
    color: var(--primary);
}

.rules-cta .btn:hover {
    background: var(--dark);
    color: var(--white);
    transform: translateY(-3px);
}

/* ===================================
   Footer
   =================================== */
footer {
    background: var(--darker);
    color: var(--white);
    padding: 4rem 2rem 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    font-family: 'Bangers', cursive;
    font-size: 2rem;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.footer-description {
    opacity: 0.7;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.footer-column h4 {
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--accent);
}

.footer-links-list {
    list-style: none;
}

.footer-links-list li {
    margin-bottom: 0.75rem;
}

.footer-links-list a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links-list a:hover {
    color: var(--primary);
}

.footer-bottom {
    max-width: 1200px;
    margin: 3rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    opacity: 0.6;
    font-size: 0.9rem;
}

.footer-bottom a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
}

.footer-bottom a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* ===================================
   Animations
   =================================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================
   Responsive
   =================================== */
@media (max-width: 1024px) {
    .nav-links {
        gap: 1rem;
    }

    .nav-links a {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    nav {
        padding: 1rem;
    }

    .page-title {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .cta-title {
        font-size: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }

    .rules-cta, .cta-section {
        padding: 3rem 1.5rem;
    }

    .btn-large {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .cta-title {
        font-size: 1.8rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .btn-large {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
}
