/* ================= GLOBAL ================= */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f9fafb;
    color: #111827;
}
.container {
    width: 94%;
    max-width: 1400px;
    margin: auto;
}

/* ================= NAVBAR ================= */
.navbar {
    background: #4f46e5;
    padding: 18px 0;
    position: relative;
    z-index: 2000;
}
.nav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-weight: 900;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: -1px;
    font-size: 24px;
    color: white;
}
.nav-buttons {
    display: flex;
    gap: 18px;
    align-items: center;
}
.btn-link {
    color: #c7d2fe;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
}
.btn-link:hover { color: white; }
.btn-register {
    background: white;
    color: #4f46e5;
    padding: 8px 24px;
    border-radius: 40px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: 0.3s;
}
.btn-register:hover {
    background: #4f46e5;
    color: white;
    transform: scale(1.05);
}

/* ================= HERO ================= */
.hero {
    background: linear-gradient(135deg,#312e81,#4f46e5);
    padding: 70px 0;
    color: white;
}
.hero-inner { display: flex; flex-direction: column; gap: 40px; }
.hero-text h2 { font-size: 38px; font-weight: 900; }
.hero-text p { color: #c7d2fe; margin-top: 10px; }
.hero-badge {
    background: rgba(99,102,241,0.3);
    border: 1px solid rgba(165,180,252,0.4);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 800;
    display: inline-block;
    margin-bottom: 18px;
}

/* ================= SEARCH ================= */
.search-bar {
    display: flex;
    flex: 1;
    gap: 12px;
    background: white;
    padding: 8px;
    border-radius: 50px;
}
.search-bar input {
    flex: 1;
    border: none;
    padding: 12px 18px;
    border-radius: 30px;
    font-weight: 700;
    background: #f3f4f6;
}
.search-bar button {
    background: #4f46e5;
    color: white;
    border: none;
    padding: 12px 26px;
    border-radius: 30px;
    font-weight: 900;
    cursor: pointer;
}

/* ================= MAIN ================= */
.main-layout { display: flex; gap: 50px; margin-top: 60px; }
.sessions { flex: 2; display: flex; flex-direction: column; gap: 28px; }
.section-title { font-size: 20px; font-weight: 800; }

/* ================= CARD ================= */
.card {
    background: white;
    border-radius: 16px;
    padding: 22px;
    display: flex;
    gap: 18px;
    border: 1px solid #f1f5f9;
    position: relative;
}
.card:hover {     border: 1px solid #a5b4fc;
 }
.card-icon {
    font-size: 32px; 
    width: 48px; /* Ajoute une largeur fixe */
    height: 48px; /* Ajoute une hauteur fixe */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; /* Empêche l'icône de s'écraser si le titre est long */
}
/* Card Icon (logo de la session) */
.card-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Vibe Tag */
.vibe-tag {
    background-color: #f3f4f6; /* Gray 100 */
    color: #4b5563; /* Gray 600 */
    padding: 2px 6px;
    border-radius: 12px; /* arrondi style pill */
    font-size: 0.75rem;
    font-weight: 500;
}

/* Date Tag */
.date-tag {
    background-color: #eef2ff; /* Indigo 50 */
    color: #4f46e5; /* Indigo 600 */
    padding: 2px 6px;
    border-radius: 12px; /* arrondi style pill */
    font-size: 0.75rem;
    font-weight: 500;
}

.card-body { flex: 1; }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; }
.card-top h3 { color :#111827;}
.badge-places { background: #fde68a; color: #92400e; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 800; }
/* Game Name */
.game-name {
    color: #4f46e5; /* Indigo 600 */
    font-weight: 700; margin: 6px 0;
}
.host-row { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.host-avatar { background: #e5e7eb; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.host-label {
    color: #6b7280; /* Gray 500 */
    font-weight: 500;
    margin-right: 4px;
}
/* Organizer (ID ou Nom) */
.host-name {
    color: #6b7280; /* Gray 500 */
    font-size: 0.75rem;
    text-decoration: underline;
    cursor: pointer;
}
/* Fiabilité de l'organisateur */
.host-reliability {
    color: #eab308; /* Amber 500 */
    font-size: 0.75rem;
    margin-left: 4px;
}
.blur { filter: blur(4px); }
.tease { color: #4f46e5; font-size: 11px; font-weight: 700; margin-left: 6px; }
.card-bottom { display: flex; justify-content: space-between; align-items: center; }
.date-tag { background: #f3f4f6; padding: 5px 10px; border-radius: 6px; font-size: 11px; font-weight: 800; }
.join-btn { background: #f3f4f6; border: none; padding: 6px 14px; border-radius: 8px; font-weight: 800; }
.join-btn:hover { background: #4f46e5; color: white; }

/* Card Bottom Actions */

.btn-view-details:hover{
    background:#e2e8f0;
    color:#1f2937;
}

/* ================= SIGNUP TEASER ================= */
.teaser-icon {
    width: 48px; /* Plus grand que 10px pour être visible ! */
    height: 48px;
    margin: 0 auto; /* Pour centrer dans le teaser */
    display: flex;
    align-items: center;
    justify-content: center;
}

.teaser-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.signup-teaser {
    background: linear-gradient(to right,#eef2ff,#f5f3ff);
    border: 2px dashed #c7d2fe;
    padding: 30px;
    border-radius: 18px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.signup-teaser .btn-register.big { margin-top: 12px; padding: 12px 28px; font-size: 16px; display: inline-block; }

/* ================= SIDEBAR ================= */
.sidebar { flex: 1; }
.map-box { position: relative; border-radius: 18px; overflow: hidden; margin-bottom: 30px; }
.map-box iframe { width: 100%; height: 350px; border: none; }
.map-overlay { position: absolute; inset: 0; background: rgba(49,46,129,0.5); display: flex; justify-content: center; align-items: center; padding: 12px; }
.map-card { background: white; padding: 20px; border-radius: 14px; text-align: center; max-width: 260px; display: flex; flex-direction: column; gap: 8px; }
.map-card .btn-register.full { margin-top: 8px; width: 100%; padding: 10px 0; font-size: 14px; display: block; }

/* ================= LIVE BOX ================= */
.live-box { background: white; padding: 24px; border-radius: 16px; border: 1px solid #f1f5f9; }
.live-dot { width: 10px; height: 10px; background: #22c55e; border-radius: 50%; display: inline-block; margin-right: 8px; animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.6); } 70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } }
.highlight { color: #4f46e5; font-style: italic; }
.time { font-size: 11px; color: #9ca3af; }

/* ================= AVATAR DROPDOWN ================= */
.avatar-container {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.7);
    cursor: pointer;
    object-fit: cover;
    transition: 0.25s ease;
}

.avatar:hover {
    transform: scale(1.08);
    box-shadow: 0 0 0 4px rgba(255,255,255,0.2);
}

/* Dropdown */
.dropdown-content {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 260px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.4);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    overflow: hidden;
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    pointer-events: none;
    transition: 0.25s ease;
    z-index: 4000;
}

/* Petite flèche */
.dropdown-content::before {
    content: "";
    position: absolute;
    top: -6px;
    right: 18px;
    width: 12px;
    height: 12px;
    background: rgba(255,255,255,0.95);
    transform: rotate(45deg);
    border-left: 1px solid rgba(255,255,255,0.4);
    border-top: 1px solid rgba(255,255,255,0.4);
}

/* Visible */
.dropdown-content.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Header */
.dropdown-header {
    padding: 18px;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: white;
}

.dropdown-header h3 {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 4px;
}

.dropdown-header p {
    font-size: 12px;
    opacity: 0.85;
}

/* Menu */
.dropdown-menu {
    list-style: none;
    padding: 8px;
    margin: 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    transition: 0.2s ease;
}

.dropdown-item i {
    width: 18px;
    text-align: center;
    color: #6b7280;
    transition: 0.2s;
}

.dropdown-item:hover {
    background: #eef2ff;
    color: #4f46e5;
}

.dropdown-item:hover i {
    color: #4f46e5;
}

/* Séparateur logout */
.dropdown-item.logout {
    margin-top: 6px;
    border-top: 1px solid #f1f5f9;
    padding-top: 14px;
    color: #dc2626;
}

.dropdown-item.logout i {
    color: #dc2626;
}

.dropdown-item.logout:hover {
    background: #fee2e2;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 992px) {
    .main-layout { flex-direction: column; }
    .hero-inner { flex-direction: column; }
    .search-bar { flex-direction: column; }
}



.oauth-buttons { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.btn-oauth { width: 100%; padding: 12px; border-radius: 12px; font-weight: 700; font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; border: none; transition: 0.2s; }
.btn-oauth.discord { background: #5865F2; color: white; }
.btn-oauth.discord:hover { background: #4752C4; }
.btn-oauth.google { background: white; border: 1px solid #e5e7eb; color: #374151; }
.btn-oauth.google:hover { background: #f9fafb; }

.divider { display: flex; align-items: center; text-align: center; margin-bottom: 24px; }
.divider::before, .divider::after { content: ''; flex: 1; border-bottom: 1px solid #e5e7eb; }
.divider span { padding: 0 12px; font-size: 12px; font-weight: 700; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.05em; }

.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-form input[type="text"], .login-form input[type="email"], .login-form input[type="password"] { width: 100%; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 12px; padding: 12px 16px; outline: none; font-size: 14px; transition: 0.2s; }
.login-form input:focus { border-color: #4f46e5; background: white; box-shadow: 0 0 0 3px rgba(79,70,229,0.1); }

.form-options { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.form-options label { color: #6b7280; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.form-options a { color: #4f46e5; font-weight: 700; text-decoration: none; }
.form-options a:hover { text-decoration: underline; }

.btn-submit { width: 100%; background: #4f46e5; color: white; border: none; padding: 12px; border-radius: 12px; font-weight: 900; text-transform: uppercase; font-size: 14px; cursor: pointer; transition: 0.2s; margin-top: 8px; }
.btn-submit:hover { background: #4338ca; transform: scale(0.98); }

.modal-footer { background: #f9fafb; padding: 20px 32px; text-align: center; border-top: 1px solid #f3f4f6; font-size: 14px; color: #4b5563; }
.modal-footer a { color: #4f46e5; font-weight: 700; text-decoration: none; margin-left: 4px; }
.modal-footer a:hover { text-decoration: underline; }

@keyframes popIn {
    0% { opacity: 0; transform: scale(0.95) translateY(10px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* ================= BOTTOM NAVIGATION (MOBILE) ================= */

/* Par défaut (sur ordinateur), on cache la barre du bas */
.mobile-bottom-nav {
    display: none;
}

/* Sur écran mobile (moins de 992px) */
@media (max-width: 992px) {
    /* 1. On cache les boutons de la barre du haut */
    .desktop-only {
        display: none !important;
    }
    
    /* 2. On affiche la barre du bas */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: #ffffff;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
        justify-content: space-around;
        align-items: center;
        padding: 8px 0;
        padding-bottom: env(safe-area-inset-bottom); /* Support des iPhone sans bouton */
        z-index: 2000;
    }

    /* 3. Style des icônes et textes */
    .mobile-bottom-nav .nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        color: #6b7280; /* Texte Muted */
        font-size: 10px;
        font-weight: 600;
        transition: color 0.2s;
        flex: 1;
    }

    .mobile-bottom-nav .nav-item i {
        font-size: 20px;
        margin-bottom: 4px;
    }

    .mobile-bottom-nav .nav-item:hover,
    .mobile-bottom-nav .nav-item:active {
        color: #4f46e5; /* Couleur Primary */
    }

    /* 4. Le bouton central "Flottant" (FAB - Floating Action Button) */
    .mobile-bottom-nav .cta-fab {
        position: relative;
    }

    .mobile-bottom-nav .cta-fab .fab-circle {
        width: 50px;
        height: 50px;
        background: linear-gradient(135deg, #4f46e5, #4338ca);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        margin-top: -24px; /* Fait dépasser le bouton vers le haut */
        margin-bottom: 4px;
        box-shadow: 0 4px 10px rgba(79, 70, 229, 0.4);
        border: 4px solid #f9fafb; /* Bordure couleur de fond du site */
    }

    .mobile-bottom-nav .cta-fab .fab-circle i {
        margin: 0; /* Override du margin-bottom générique */
        font-size: 20px;
    }
    
    /* 5. Marge supplémentaire pour le body pour ne pas que le contenu passe sous la barre */
    body {
        padding-bottom: 70px; 
    }
    /* Par défaut sur ordinateur : collé en bas de l'écran */
.form-actions-bar {
    bottom: 0;
}
.vibe-tag, 
.date-tag, 
.location-tag {
    white-space: nowrap; /* Empêche le texte de se couper sur 2 lignes */
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
/* Sur mobile : on le remonte pour ne pas écraser la Bottom Nav Bar */
@media (max-width: 992px) {
    .form-actions-bar {
        bottom: 66px; /* Ajuste cette valeur selon la hauteur exacte de ta barre de navigation mobile */
    }
}
}