/* ========================================
   FANTAISIE THEME - Clairval
   Thème fantaisie pour les pages déconnectées
   ======================================== */

/* Variables CSS pour le thème fantaisie */
:root {
    --primary-color: #f4a261;
    --secondary-color: #e76f51;
    --accent-color: #e9c46a;
    --success-color: #51cf66;
    --error-color: #ff6b6b;
    --warning-color: #ffc107;
    --background-primary: #1a1a2e;
    --background-secondary: #16213e;
    --text-primary: #e2e2e2;
    --text-secondary: #a0a0a0;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.3);
    --glass-bg: rgba(26, 26, 46, 0.95);
    --glass-border: rgba(255, 255, 255, 0.1);
}

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100vh;
    min-height: 100vh;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Ubuntu, Cantarell, 'Noto Sans', Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, var(--background-primary) 0%, var(--background-secondary) 100%);
    color: var(--text-primary);
    overflow: hidden;
    position: relative;
}

/* Overlay sombre pour assombrir les images de fond */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 46, 0.6);
    z-index: 0;
    pointer-events: none;
}

/* S'assurer que le contenu est au-dessus de l'overlay */
body > * {
    position: relative;
    z-index: 1;
}

/* Scrollbar universelle */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
    background: rgba(26, 26, 46, 0.3);
}
::-webkit-scrollbar-thumb {
    background: rgba(244, 162, 97, 0.8);
    border-radius: 6px;
    border: 2px solid rgba(26, 26, 46, 0.3);
    min-height: 20px;
    min-width: 20px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(244, 162, 97, 1);
}
::-webkit-scrollbar-track {
    background: rgba(26, 26, 46, 0.3);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(244, 162, 97, 0.8) rgba(26, 26, 46, 0.3);
}

/* Header */
.header {
    background: var(--glass-bg);
    padding: 10px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

.header-content {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

.site-title {
    color: var(--primary-color);
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.site-title:hover {
    color: var(--secondary-color);
}

.nav-menu {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-shrink: 0;
}

/* === NOUVELLES CLASSES DE BOUTONS === */

/* .btn-header : Boutons du header (style actuel des menu-btn) */
.btn-header {
    padding: 0 14px;
    height: 32px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(244, 162, 97, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(244, 162, 97, 0.2);
    position: relative;
    transition: all 0.2s;
    white-space: nowrap;
    line-height: 1;
    box-sizing: border-box;
}

.btn-header:hover {
    background: rgba(244, 162, 97, 0.2);
    color: var(--primary-color);
}

.btn-header.active {
    background: var(--primary-color);
    color: var(--background-primary);
}

/* .btn-primary : Boutons dans le body (même style que btn-header) */
.btn-primary {
    padding: 0 14px;
    height: 32px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(244, 162, 97, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(244, 162, 97, 0.2);
    transition: all 0.2s;
    white-space: nowrap;
    line-height: 1;
    box-sizing: border-box;
    cursor: pointer;
}

.btn-primary:hover {
    background: rgba(244, 162, 97, 0.2);
    color: var(--primary-color);
}

/* .btn-tabs-primary : Boutons de filtres/onglets (même dimensions que btn-primary) */
.btn-tabs-primary {
    padding: 0 14px;
    height: 32px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(244, 162, 97, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(244, 162, 97, 0.2);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    line-height: 1;
    box-sizing: border-box;
}

.btn-tabs-primary:hover {
    background: rgba(244, 162, 97, 0.2);
    color: var(--primary-color);
}

.btn-tabs-primary.active {
    background: var(--primary-color);
    color: var(--background-primary);
}

/* Styles spéciaux pour les onglets connectés */
.btn-tabs-primary:first-child {
    border-radius: 6px 0 0 6px;
}

.btn-tabs-primary:last-child {
    border-radius: 0 6px 6px 0;
}

.btn-tabs-primary:not(:first-child):not(:last-child) {
    border-radius: 0;
    border-left: none;
}

.btn-tabs-primary:not(:first-child) {
    border-left: none;
}


/* === ANCIENNES CLASSES (à supprimer progressivement) === */
.menu-btn {
    /* Hérite du style btn-header */
    padding: 8px 16px;
    height: 20px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 1em;
    font-family: 'Crimson Pro', serif;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(244, 162, 97, 0.1);
    color: #f4a261;
    border: 1px solid rgba(244, 162, 97, 0.2);
    position: relative;
}

.menu-btn.active {
    background: #f4a261;
    color: #1a1a2e;
}

.btn-logout {
    background: transparent;
    color: #e76f51;
    border: 1px solid #e76f51;
    margin-left: 20px;
}

.hamburger span {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background: var(--primary-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger span:first-child { top: 0; }
.hamburger span:nth-child(2) { top: 9px; }
.hamburger span:last-child { top: 18px; }

.hamburger.active span:first-child {
    transform: rotate(45deg);
    top: 9px;
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:last-child {
    transform: rotate(-45deg);
    top: 9px;
}

/* Conteneurs améliorés */
.container {
    width: 100%;
    max-width: 400px;
    padding: 24px;
    background: var(--glass-bg);
    border-radius: 12px;
    box-shadow: 0 8px 32px var(--shadow-color);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    margin: 0;
    position: absolute;
    top: 50%;
    left: 25%;
    transform: translate(-50%, -50%);
    box-sizing: border-box;
}

.container-large {
    max-width: 600px;
    left: 50%;
}

.container-full {
    max-width: 800px;
    left: 50%;
}

/* Main content pour les pages connectées */
.main-content {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    box-shadow: none;
}

.top-panels-container {
    display: flex;
    gap: 10px;
    margin-bottom: 5px;
    margin-top: 5px;
}

.progression-section {
    flex: 1;
    min-width: 320px;
}

.quests-section {
    flex: 2;
    min-width: 320px;
}

@media (max-width: 1100px) {
    .top-panels-container {
        flex-direction: column;
        gap: 5px;
        margin-top: 5px;
        margin-bottom: 5px;
    }
    .progression-section, .quests-section {
        width: 100%;
    }
}

/* Sections de jeux et cartes */
.games-section {
    background: rgba(26, 26, 46, 0.8);
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.actions-section {
    background: rgba(26, 26, 46, 0.8);
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    margin-top: -5px;
    box-sizing: border-box;
}

.games-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
}

.games-tab {
    padding: 0 14px;
    height: 32px;
    cursor: pointer;
    color: var(--primary-color);
    background: rgba(244, 162, 97, 0.1);
    border: 1px solid rgba(244, 162, 97, 0.2);
    transition: all 0.2s;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.games-tab:first-child {
    border-radius: 6px 0 0 6px;
}

.games-tab:last-child {
    border-radius: 0 6px 6px 0;
}

.games-tab:not(:first-child) {
    border-left: none;
}

.games-tab.active {
    background: #f4a261;
    color: #1a1a2e;
}

.games-tab:hover {
    background: rgba(244, 162, 97, 0.2);
}

.games-content {
    display: none;
    flex: 1;
    overflow-y: auto;
}

.games-content.active {
    display: block;
}

.games-grid {
    max-height: 420px;
    overflow-y: auto;
}

.game-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: relative;
}

.games-grid .game-card:first-child {
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}

.games-grid .game-card:last-child {
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
}

.game-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.game-name {
    font-size: 1.1em;
    color: #f4a261;
    font-family: 'Crimson Pro', serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-status {
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 0.82em;
    font-family: 'Crimson Pro', serif;
    white-space: nowrap;
}

.game-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #888;
    font-size: 0.88em;
    font-family: 'Crimson Pro', serif;
    white-space: nowrap;
}

.game-actions {
    display: flex;
    gap: 8px;
    min-width: 120px;
    justify-content: flex-end;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.game-card:hover .game-actions {
    opacity: 1;
    pointer-events: auto;
}

.game-btn {
    padding: 0 12px;
    height: 32px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-sizing: border-box;
}

.game-btn-join {
    background: rgba(244, 162, 97, 0.1);
    color: #f4a261;
    border: 1px solid rgba(244, 162, 97, 0.2);
}

.game-btn-spectate {
    background: transparent;
    color: #f4a261;
    border: 1px solid rgba(244, 162, 97, 0.2);
}

/* Titres améliorés */
h1 {
    font-size: 2.5em;
    margin-bottom: 30px;
    color: var(--primary-color);
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: var(--primary-color);
    text-align: center;
}

h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.section-title, .level-title, .quests-title {
    font-size: 1.5em;
    color: #f4a261;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-family: 'Crimson Pro', serif;
    font-weight: 600;
}

.level-title {
    margin-bottom: 16px;
}

/* Barres de progression et quêtes */
.xp-bar {
    width: 100%;
    height: 22px;
    background: transparent;
    border-radius: 12px;
    overflow: hidden;
    margin: 10px 0 6px 0;
    border: 1.5px solid rgba(244, 162, 97, 0.10);
    box-shadow: 0 2px 8px rgba(244, 162, 97, 0.04);
    position: relative;
}

.xp-progress {
    height: 100%;
    background: rgba(244, 162, 97, 0.1);
    border-radius: 12px;
    transition: width 1s cubic-bezier(.4,1.4,.6,1);
    position: relative;
}

.xp-text {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #f4a261;
    font-size: 0.95em;
    font-weight: 600;
    z-index: 2;
    text-shadow: 0 1px 2px rgba(26, 26, 46, 0.5);
}

.level-info {
    width: 100%;
    transition: opacity 0.3s ease;
}

.quest-card {
    background: rgba(26, 26, 46, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    position: relative;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
    box-sizing: border-box;
}

.quest-card:hover {
    box-shadow: 0 4px 12px rgba(244, 162, 97, 0.1);
    border-color: rgba(244, 162, 97, 0.2);
}

.quest-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 10px;
}

.quest-title {
    color: #f4a261;
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quest-reward {
    color: #e9c46a;
    font-size: 0.9em;
    font-weight: 600;
    white-space: nowrap;
}

.quest-description {
    color: #e2e2e2;
    margin: 0 0 15px 0;
    font-size: 0.95em;
    opacity: 0.9;
    line-height: 1.4;
}

.quest-progress {
    width: 100%;
    height: 8px;
    background: rgba(244, 162, 97, 0.05);
    border-radius: 4px;
    overflow: hidden;
    margin: 0;
    border: none;
    box-shadow: none;
    position: relative;
}

.progress-bar {
    width: 100%;
    height: 100%;
    position: relative;
}

.progress-bar .progress {
    height: 100%;
    background: rgba(244, 162, 97, 0.3);
    border-radius: 4px;
    transition: width 0.7s cubic-bezier(.4,1.4,.6,1);
}

.progress-text {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85em;
    color: rgba(244, 162, 97, 0.8);
    z-index: 2;
    padding-right: 8px;
    text-shadow: 0 1px 2px rgba(26, 26, 46, 0.5);
}

.quests-container {
    display: grid;
    gap: 16px;
}

#account-quests .quests-container {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 5px 5px 20px 5px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(244, 162, 97, 0.3) transparent;
}

.quests-container::-webkit-scrollbar {
    height: 8px;
}

.quests-container::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 4px;
}

.quests-container::-webkit-scrollbar-thumb {
    background-color: rgba(244, 162, 97, 0.3);
    border-radius: 4px;
}

.quests-container::-webkit-scrollbar-thumb:hover {
    background-color: rgba(244, 162, 97, 0.5);
}

.quest-pin-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    color: rgba(244, 162, 97, 0.5);
    cursor: pointer;
    padding: 5px;
    font-size: 1.2em;
    transition: color 0.3s ease;
}

.quest-pin-btn:hover {
    color: #f4a261;
}

.quest-pin-btn.pinned {
    color: #f4a261;
}

/* Formulaires */
.form-group {
    margin-bottom: 10px;
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 0 12px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    transition: all 0.2s;
    margin-bottom: 10px;
    outline: none;
    box-sizing: border-box;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(244, 162, 97, 0.2);
}

/* Styles pour les éléments select (droplistes) */
select {
    width: 100%;
    padding: 0 12px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    transition: all 0.2s;
    margin-bottom: 10px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f4a261' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
    outline: none;
    box-sizing: border-box;
}

select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(244, 162, 97, 0.2);
}

select:hover {
    border-color: rgba(244, 162, 97, 0.3);
}

/* Styles pour les options dans le select */
select option {
    background: var(--background-primary);
    color: var(--text-primary);
    padding: 8px 12px;
    border: none;
}

select option:hover {
    background: rgba(244, 162, 97, 0.1);
}

select option:checked {
    background: rgba(244, 162, 97, 0.2);
    color: var(--primary-color);
}

/* Boutons */
.btn {
    display: inline-flex;
    padding: 0 14px;
    height: 32px;
    background: rgba(244, 162, 97, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(244, 162, 97, 0.2);
    border-radius: 6px;
    text-decoration: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    white-space: nowrap;
    line-height: 1;
    box-sizing: border-box;
}


.btn-secondary {
    padding: 0 14px;
    height: 32px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary, #a0a0a0);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    line-height: 1;
    box-sizing: border-box;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary, #e2e2e2);
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-secondary.active,
.btn-secondary:active {
    background: var(--error-color, #ff6b6b);
    color: white;
    border-color: var(--error-color, #ff6b6b);
}

/* Messages */
.error {
    background: rgba(220, 53, 69, 0.2);
    color: var(--error-color);
    padding: 0 20px;
    min-height: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    text-align: center;
    border: 1px solid rgba(220, 53, 69, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.4;
    font-size: 0.9em;
}

.success {
    background: rgba(40, 167, 69, 0.2);
    color: var(--success-color);
    padding: 0 20px;
    min-height: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    text-align: center;
    border: 1px solid rgba(40, 167, 69, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.4;
    font-size: 0.9em;
}

.validation-status.error {
    background: rgba(220, 53, 69, 0.2);
    color: var(--error-color);
    padding: 0 20px;
    min-height: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    text-align: center;
    border: 1px solid rgba(220, 53, 69, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.4;
    font-size: 0.9em;
}

.warning {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.warning h4 {
    color: var(--warning-color);
    margin-bottom: 10px;
}

.warning p {
    color: var(--text-primary);
    margin: 0;
}

/* Éléments supplémentaires */
.pseudo {
    font-size: 1.2em;
    color: #f4a261;
}

.role-badge {
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9em;
    background: #e76f51;
    color: white;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.user-info .user-pseudo {
    white-space: nowrap;
    font-weight: 500;
}

.user-info .role-badge {
    flex-shrink: 0;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 60vh;
}

.actions-card {
    background: rgba(26, 26, 46, 0.8);
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    margin-top: auto;
    flex: 0 0 auto;
    box-sizing: border-box;
}

.unread-badge {
    position: absolute;
    right: -5px;
    top: -5px;
    background: #e76f51;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    border: 2px solid #1a1a2e;
    animation: badge-pulse 2s infinite;
}

.total-unread-badge {
    position: absolute;
    right: -8px;
    top: -8px;
    background: #e76f51;
    color: white;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    border: 2px solid #1a1a2e;
    padding: 0 4px;
    animation: badge-pulse 2s infinite;
    z-index: 2;
}

@keyframes badge-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 2px #1a1a2e, 0 0 0 0 rgba(231, 111, 81, 0.7);
    }
    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 2px #1a1a2e, 0 0 0 10px rgba(231, 111, 81, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 2px #1a1a2e, 0 0 0 0 rgba(231, 111, 81, 0);
    }
}

.user-pseudo {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    font-size: 1em;
    color: #e2e2e2;
}

.user-pseudo:hover {
    color: #f4a261;
    text-decoration: underline;
    text-decoration-color: #f4a261;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.rejoin-banner {
    background: rgba(26, 26, 46, 0.95);
    color: #f4a261;
    padding: 12px 24px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1.1em;
    margin-bottom: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.10);
    gap: 16px;
    min-height: 48px;
    border: 1px solid rgba(244, 162, 97, 0.2);
    font-family: 'Crimson Pro', serif;
}

.rejoin-banner-btn {
    background: rgba(244, 162, 97, 0.1);
    color: #f4a261;
    border: 1px solid rgba(244, 162, 97, 0.2);
    border-radius: 20px;
    padding: 6px 14px;
    height: 20px;
    font-size: 0.95em;
    font-family: 'Crimson Pro', serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Liens */
.links {
    text-align: center;
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.links a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.links a.btn-primary {
    color: #f4a261 !important;
}

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

/* Radio buttons */
.radio-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Checkboxes */
.checkbox-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 10px;
}

.checkbox-option input[type="checkbox"] {
    margin-top: 4px;
}

.checkbox-option label {
    font-size: 0.9em;
    line-height: 1.4;
}

.checkbox-option a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.checkbox-option a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.status-indicator.success {
    background: rgba(40, 167, 69, 0.2);
    color: var(--success-color);
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.status-indicator.error {
    background: rgba(220, 53, 69, 0.2);
    color: var(--error-color);
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.status-indicator.loading {
    background: rgba(255, 193, 7, 0.2);
    color: var(--warning-color);
    border: 1px solid rgba(255, 193, 7, 0.3);
}

/* Exigences de mot de passe */
.password-requirements {
    margin-top: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.requirement {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.requirement:last-child {
    margin-bottom: 0;
}

.requirement-icon {
    font-size: 0.8em;
    transition: all 0.3s ease;
}

.requirement.valid .requirement-icon {
    color: var(--success-color);
}

.requirement.invalid .requirement-icon {
    color: var(--error-color);
}

.requirement.valid .requirement-text {
    color: var(--success-color);
}

.requirement.invalid .requirement-text {
    color: var(--error-color);
}

/* Système multi-étapes */
.step-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    text-align: center;
}

#step-indicator-text {
    color: var(--primary-color);
    font-size: 1.1em;
    font-weight: 600;
    font-family: 'Crimson Pro', serif;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.step.active {
    opacity: 1;
}

.step.completed {
    opacity: 0.8;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(244, 162, 97, 0.2);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 2px solid rgba(244, 162, 97, 0.3);
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: var(--primary-color);
    color: var(--background-primary);
    border-color: var(--primary-color);
}

.step.completed .step-number {
    background: var(--success-color);
    color: var(--background-primary);
    border-color: var(--success-color);
}

.step-label {
    font-size: 0.9em;
    color: var(--accent-color);
    text-align: center;
}

.form-step {
    display: none;
    animation: fadeIn 0.5s ease;
}

.form-step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-description {
    color: var(--text-secondary);
    margin-bottom: 25px;
    text-align: center;
    font-style: italic;
}

.step-buttons {
    display: flex;
    gap: 15px;
    justify-content: space-between;
    margin-top: 30px;
}

.step-buttons button,
.step-buttons .btn-primary {
    flex: 1;
}

/* Documents légaux */
.legal-documents-simple {
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.document-container {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.legal-document {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.legal-document.active {
    opacity: 1;
    transform: translateX(0);
}

.legal-document.prev {
    transform: translateX(-100%);
}

.document-title {
    color: var(--primary-color);
    font-size: 1.2em;
    margin-bottom: 15px;
    text-align: center;
}

.document-content {
    background: rgba(31, 26, 15, 0.8);
    border: 1px solid rgba(244, 162, 97, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    flex: 1;
    overflow-y: auto;
    line-height: 1.6;
    font-size: 0.9em;
    color: var(--text-primary);
}

.accept-document-btn {
    width: 100%;
    padding: 12px 20px;
    font-size: 1.1em;
    font-weight: 600;
}

.document-acceptance {
    text-align: center;
    padding: 10px;
    background: rgba(244, 162, 97, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(244, 162, 97, 0.1);
}

.age-verification {
    margin-top: 20px;
    padding: 15px;
    background: rgba(126, 217, 87, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(126, 217, 87, 0.1);
    text-align: center;
}

.age-verification .checkbox-option {
    justify-content: center;
    font-weight: 600;
    color: #7ed957;
}

/* Sections spéciales */
.info-section {
    background: rgba(244, 162, 97, 0.1);
    border: 1px solid rgba(244, 162, 97, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
}

.info-section h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.3em;
}

.info-section p {
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 15px;
}

.email-highlight {
    background: rgba(244, 162, 97, 0.2);
    padding: 8px 12px;
    border-radius: 5px;
    font-weight: bold;
    color: var(--primary-color);
}

.steps {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: left;
}

.steps h3 {
    color: var(--accent-color);
    margin-bottom: 15px;
    text-align: center;
}

.step {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--background-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
}

.step-text {
    color: var(--text-primary);
    flex: 1;
}

/* Icônes */
.icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    vertical-align: middle;
}

.icon-success {
    background: var(--success-color);
    border-radius: 50%;
    position: relative;
}

.icon-success::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 5px;
    width: 6px;
    height: 3px;
    border: 2px solid white;
    border-top: none;
    border-right: none;
    transform: rotate(-45deg);
}

.icon-error {
    background: var(--error-color);
    border-radius: 50%;
    position: relative;
}

.icon-error::before {
    content: '';
    position: absolute;
    top: 7px;
    left: 3px;
    width: 10px;
    height: 2px;
    background: white;
    transform: rotate(45deg);
}

.icon-error::after {
    content: '';
    position: absolute;
    top: 7px;
    left: 3px;
    width: 10px;
    height: 2px;
    background: white;
    transform: rotate(-45deg);
}

.icon-warning {
    background: var(--warning-color);
    border-radius: 50%;
    position: relative;
}

.icon-warning::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 7px;
    width: 2px;
    height: 8px;
    background: white;
    border-radius: 1px;
}

.icon-warning::after {
    content: '';
    position: absolute;
    top: 12px;
    left: 5px;
    width: 6px;
    height: 2px;
    background: white;
    border-radius: 1px;
}

.icon-email {
    background: var(--accent-color);
    border-radius: 3px;
    position: relative;
}

.icon-email::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    border: 1px solid white;
    border-radius: 1px;
}

.icon-email::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 6px;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 1px;
}

.icon-key {
    background: var(--primary-color);
    border-radius: 2px;
    position: relative;
}

.icon-key::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 2px;
    width: 8px;
    height: 6px;
    border: 1px solid white;
    border-radius: 1px;
}

.icon-key::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 8px;
    width: 4px;
    height: 2px;
    background: white;
    border-radius: 1px;
}

.icon-target {
    background: var(--secondary-color);
    border-radius: 50%;
    position: relative;
}

.icon-target::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 10px;
    height: 10px;
    border: 2px solid white;
    border-radius: 50%;
}

.icon-target::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 6px;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
}

.icon-check {
    background: var(--success-color);
    border-radius: 50%;
    position: relative;
}

.icon-check::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 5px;
    width: 6px;
    height: 3px;
    border: 2px solid white;
    border-top: none;
    border-right: none;
    transform: rotate(-45deg);
}

/* Scroll area */
.scroll-area {
    position: absolute;
    top: 50px;
    left: 0; 
    right: 0; 
    bottom: 0;
    height: calc(100vh - 50px);
    overflow-y: auto;
    width: 100%;
    padding-bottom: 10px;
}

/* Styles responsifs améliorés */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 10px 15px;
    }

    .header-content {
        padding: 0 10px;
    }

    .main-content {
        padding: 15px;
        margin-top: 80px;
        display: flex;
        flex-direction: column;
    }

    .sidebar {
        display: flex;
        flex-direction: column;
        gap: 15px;
        margin: 0;
    }

    .stats-card {
        margin-bottom: 15px !important;
    }

    .actions-card {
        margin-bottom: 15px !important;
    }

    .games-section {
        margin: 0;
    }

    .stats-card, 
    .actions-card,
    .games-section {
        padding: 20px;
        background: rgba(26, 26, 46, 0.8);
        border-radius: 15px;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .section-title {
        font-size: 1.5em;
        margin-bottom: 15px;
        color: #f4a261;
    }

    .games-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .hamburger {
        display: block;
    }

    .nav-menu {
        display: none;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: rgba(26, 26, 46, 0.98);
        padding: 15px;
        flex-direction: column;
        gap: 15px;
        backdrop-filter: blur(10px);
        z-index: 1000;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

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

    .menu-btn, .btn-logout {
        width: 100%;
        text-align: center;
        padding: 12px 20px;
    }

    .btn-logout {
        margin-left: 0;
    }

    .game-card {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .game-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .game-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* Utilitaires */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }

.p-10 { padding: 10px; }
.p-20 { padding: 20px; }
.p-30 { padding: 30px; }

.hidden { display: none; }
.visible { display: block; }

.flex { display: flex; }
.flex-column { flex-direction: column; }
.flex-center { justify-content: center; align-items: center; }
.flex-between { justify-content: space-between; }
.flex-around { justify-content: space-around; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.rounded { border-radius: 8px; }
.rounded-lg { border-radius: 15px; }
.rounded-full { border-radius: 50%; }

.shadow { box-shadow: 0 4px 16px var(--shadow-color); }
.shadow-lg { box-shadow: 0 8px 32px var(--shadow-color); }

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
}

/* Game container - layout de partie */
.game-container {
    flex: 1;
    display: grid;
    grid-template-columns: 260px 1fr 300px;
    gap: 10px;
    align-items: stretch;
    min-height: 0;
}

.game-container .actions-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}
