body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #0b0e14;
    color: #e9ecef;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* --- HEADER STYLE --- */
.app-header {
    position: relative;
    margin: 0 0 30px 0;
    padding: 15px 25px 0 25px;
    width: 100%;
    box-sizing: border-box;
    transition: background 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

/* --- BOUTON RECTANGULAIRE VERTICAL DROIT --- */
.header-theme-switch-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%) !important;
    width: 32px;
    height: 90px;
    background: linear-gradient(180deg, rgba(22, 33, 62, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
    border: 1.5px solid #4ecca3;
    border-radius: 8px;
    color: #4ecca3;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6), 0 0 10px rgba(78, 204, 163, 0.2);
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    z-index: 100;
}

.header-theme-switch-btn:hover {
    background: linear-gradient(180deg, #16213e 0%, #0f3460 100%);
    color: #ffffff;
    border-color: #5cfbca;
    box-shadow: 0 0 20px rgba(78, 204, 163, 0.6), 0 0 35px rgba(92, 251, 202, 0.35);
    transform: translateY(-50%) !important;
}

.header-theme-switch-btn:active {
    background: #0f3460;
    transform: translateY(-50%) !important;
}

.theme-switch-arrow {
    font-size: 1.3em;
    font-weight: bold;
    line-height: 1;
    text-shadow: 0 0 8px rgba(78, 204, 163, 0.5);
    transform: none !important;
    display: inline-block;
}

/* --- THÈMES PANNEAU DU HEADER (Pleine largeur bord à bord et collé en haut) --- */
.app-header.header-theme-1,
.app-header.header-theme-2 {
    background: transparent;
    border-radius: 0;
    border: none;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.85);
    padding: 0 20px 15px 20px;
    margin-top: 0;
}

/* --- CONTENEUR DES PANNEAUX BOIS (Agrandis de 50% et collés en haut) --- */
.header-board-container {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 850px;
    width: 95%;
    margin: 0 auto;
    animation: fadeIn 0.3s ease-out;
}

.header-board-img {
    max-width: 100%;
    height: auto;
    max-height: 270px;
    object-fit: contain;
    filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.95));
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

.header-demarcation {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, rgba(78, 204, 163, 0) 0%, rgba(78, 204, 163, 0.8) 50%, rgba(78, 204, 163, 0) 100%);
    box-shadow: 0 0 10px rgba(78, 204, 163, 0.4);
    margin-top: 15px;
}

.badge-online {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(22, 33, 62, 0.9);
    color: #4ecca3;
    border: 1px solid rgba(78, 204, 163, 0.4);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.main-header {
    display: flex;
    justify-content: center;
    margin: 5px 0 10px 0;
    padding: 0;
}

.header-frame {
    position: relative;
    padding: 0;
    background: #080a0f;
    border: 2px solid #4ecca3;
    border-radius: 6px;
    box-shadow: 0 0 25px rgba(78, 204, 163, 0.35), 0 8px 25px rgba(0, 0, 0, 0.75);
    text-align: center;
    min-width: 320px;
    max-width: 640px;
    width: 92%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-title-container {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    overflow: hidden;
    border-radius: 4px;
}

.header-title-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.85), inset 0 0 6px rgba(78, 204, 163, 0.25);
    border-radius: 4px;
}

.header-title-img {
    width: 100%;
    height: auto;
    max-height: 165px;
    object-fit: cover;
    display: block;
}

.header-frame h1 {
    margin: 0;
    font-size: 2.2em;
    color: #4ecca3;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    display: block !important;
}

.header-decoration {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border: 2px solid #4ecca3;
    background: #0b0e14;
    z-index: 10;
    cursor: pointer;
}

.header-decoration.left {
    left: -13px;
    transform: translateY(-50%) rotate(45deg);
}

.header-decoration.right {
    right: -13px;
    transform: translateY(-50%) rotate(45deg);
}

.header-frame::before, .header-frame::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: #4ecca3;
    border-radius: 50%;
    box-shadow: 0 0 10px #4ecca3;
    z-index: 12;
}

.header-frame::before { top: -5px; left: -5px; }
.header-frame::after { bottom: -5px; right: -5px; }


.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

/* SAVE/LOAD STYLES */
.host-only-top {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1000;
}

.btn-tiny {
    background: #16213e;
    color: #4ecca3;
    border: 1px solid #4ecca3;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8em;
    cursor: pointer;
    width: auto;
}

.load-section {
    text-align: center;
    margin-bottom: 20px;
}

.btn-load {
    display: inline-block;
    background: #0f3460;
    color: #4ecca3;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    border: 1px dashed #4ecca3;
}

.load-status {
    display: block;
    margin-top: 5px;
    font-size: 0.8em;
    color: #4ecca3;
}

.separator {
    border: 0;
    border-top: 1px solid #0f3460;
    margin: 20px 0;
}

.hidden { display: none !important; }

h1 {
    text-align: center;
    color: #4ecca3;
    text-shadow: 0 0 10px rgba(78, 204, 163, 0.3);
}

.screen {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px 30px 20px;
    box-sizing: border-box;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* LOBBY STYLE */
.lobby-container {
    background: #16213e;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #4ecca3;
    max-width: 500px;
    margin: 40px auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.hint { font-size: 0.9em; color: #4ecca3; opacity: 0.8; margin-top: -10px; margin-bottom: 15px; }

/* GAME STYLE */
.main-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
}

.game-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 20px;
    align-items: start;
}

.player-controls-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.history-box {
    background: #0b0e14;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #0f3460;
    max-height: 400px;
    overflow-y: auto;
    font-size: 0.9em;
}

.action-entry {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #16213e;
}

.action-entry:last-child { border-bottom: none; }
.action-entry strong { color: #4ecca3; display: block; margin-bottom: 4px; }
.action-entry p { margin: 0; font-style: italic; color: #ced4da; line-height: 1.4; }

.npc-list-section {
    margin-bottom: 25px;
}

.npc-box {
    border-color: #8b0000;
    color: #ff9999;
    font-style: italic;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 0, 0, 0.05);
}

.player-list-section {
    background: #16213e;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #4ecca3;
    height: fit-content;
}

/* Sidebar Sections */
.location-section, .pnj-section, .player-list-section, .inventory-section {
    margin-bottom: 25px;
}

.location-box {
    background: #16213e;
    border: 1px solid #4ecca3;
    border-radius: 8px;
    padding: 12px;
    color: #4ecca3;
    font-weight: bold;
    text-align: center;
    font-size: 1.1em;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.time-tag {
    font-size: 0.8em;
    color: #e9ecef;
    font-style: italic;
    font-weight: normal;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 8px;
    border-radius: 10px;
    width: fit-content;
    margin: 0 auto;
}

/* Player Cards */
#playerList {
    padding-left: 10px;
    padding-right: 10px;
    margin: 0;
    list-style: none;
}

.player-card {
    background: #0f3460;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid #16213e;
    list-style: none;
    display: block !important; /* Overriding previous flex */
}

.player-card-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(78, 204, 163, 0.2);
    padding-bottom: 6px;
    width: 100%;
}

.player-card-header strong {
    font-size: 1.05em;
    color: #e9ecef;
    word-break: break-word;
}

.player-card-body {
    margin-bottom: 8px;
}

.player-desc-text {
    color: #ced4da;
    line-height: 1.2;
    display: block;
}

.player-card-footer {
    display: flex;
    justify-content: flex-end;
    font-size: 0.85em;
}

.player-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
}

.player-status-tag {
    background: #e94560;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-style: italic;
}

.status-indicator {
    margin-top: 15px;
    padding: 10px;
    background: rgba(78, 204, 163, 0.1);
    border-left: 3px solid #4ecca3;
    border-radius: 4px;
    font-size: 0.9em;
}

#myStatus {
    color: #e94560;
    font-weight: bold;
    margin-left: 5px;
}

.footer-controls {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

/* GAME SETTINGS MENU */
.settings-menu-container {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
}

.btn-icon {
    background: #16213e;
    color: #4ecca3;
    border: 1px solid rgba(78, 204, 163, 0.5);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 1.5em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    padding: 0;
    line-height: 1;
}

.btn-icon:hover {
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 15px rgba(78, 204, 163, 0.4);
    background: #0f3460;
    border-color: #4ecca3;
}

.dropdown-menu {
    position: absolute;
    top: 55px;
    right: 0;
    background: rgba(22, 33, 62, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(78, 204, 163, 0.3);
    border-radius: 8px;
    padding: 8px;
    width: 260px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    display: flex;
    flex-direction: column;
    gap: 5px;
    animation: fadeInDown 0.2s ease forwards;
    transform-origin: top right;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: scale(0.95) translateY(-10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.dropdown-menu.hidden {
    display: none !important;
}

.dropdown-item {
    background: transparent;
    color: #e9ecef;
    border: 1px solid transparent;
    padding: 12px 15px;
    text-align: left;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95em;
    width: 100%;
    box-shadow: none;
}

.dropdown-item:hover {
    background: rgba(78, 204, 163, 0.15);
    border-color: rgba(78, 204, 163, 0.4);
    color: #4ecca3;
    transform: translateX(5px);
    box-shadow: none;
}

#backToHubFromGameBtn.dropdown-item {
    color: #ff9a9e;
}

#backToHubFromGameBtn.dropdown-item:hover {
    background: rgba(233, 69, 96, 0.15);
    border-color: rgba(233, 69, 96, 0.4);
    color: #ff2e63;
}

.btn-secondary {
    background: #16213e;
    color: #e9ecef;
    border: 1px solid #0f3460;
    padding: 10px 20px;
    width: auto;
}

.player-list-section li {
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 4px;
    background: #0f3460;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
}

.player-info {
    flex-grow: 1;
    margin-right: 10px;
}

.inventory-item {
    background: #1a1a2e;
    padding: 8px 12px;
    margin-bottom: 5px;
    border-radius: 4px;
    border-left: 3px solid #4ecca3;
    font-size: 0.9em;
    animation: slideIn 0.3s ease-out;
}

.inventory-card {
    background: #16213e;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 6px;
    border: 1px solid rgba(78, 204, 163, 0.3);
    font-size: 0.9em;
    color: #e9ecef;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
    border-left: 4px solid #4ecca3;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.status-ready { color: #4ecca3; font-weight: bold; }
.status-waiting { color: #e94560; opacity: 0.7; }

.ready-check-container {
    background: rgba(78, 204, 163, 0.1);
    padding: 15px;
    border-radius: 8px;
    border: 1px dashed #4ecca3;
    margin: 15px 0;
    text-align: center;
}

.ready-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    font-weight: bold;
    color: #4ecca3;
    font-size: 1.1em;
}

.ready-label input[type="checkbox"] {
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: #4ecca3;
}

.waiting-players-msg {
    margin-top: 20px;
    font-size: 0.9em;
    color: #ff2e63;
    font-style: italic;
    animation: pulse-text 2s infinite;
}

@keyframes pulse-text {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.story-prompt-text {
    font-style: italic;
    color: #4ecca3;
    border-left: 3px solid #4ecca3;
    padding-left: 15px;
    margin: 15px 0;
}

#initialStoryBox h3 {
    margin-top: 0;
    color: #4ecca3;
    display: flex;
    align-items: center;
    gap: 10px;
}

.actions-container {
    background: #16213e;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.input-group { margin-bottom: 15px; }
label { display: block; margin-bottom: 8px; font-weight: bold; color: #4ecca3; }

/* --- CONTENEUR CRÉATION & TOOLTIPS D'AIDE ERGONOMIQUES (SURVOL PUR) --- */
#customCreationForm {
    position: relative;
    z-index: 10;
}

.help-tooltip-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 19px;
    height: 19px;
    min-width: 19px;
    min-height: 19px;
    border-radius: 50%;
    background: rgba(78, 204, 163, 0.15);
    border: 1px solid rgba(78, 204, 163, 0.6);
    color: #4ecca3;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 8px;
    cursor: help;
    vertical-align: middle;
    user-select: none;
    line-height: 1;
    box-shadow: 0 0 6px rgba(78, 204, 163, 0.2);
    transition: all 0.2s ease;
    z-index: 100;
}

.help-tooltip-trigger:hover {
    background: #4ecca3;
    color: #0b0e14;
    border-color: #4ecca3;
    box-shadow: 0 0 12px rgba(78, 204, 163, 0.65);
    transform: scale(1.08);
    z-index: 99999;
}

.help-tooltip-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: calc(100% + 9px);
    left: -12px;
    width: 330px;
    max-width: 82vw;
    background: #0f172a;
    color: #f1f5f9;
    font-size: 0.83rem;
    font-weight: 400;
    line-height: 1.45;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(78, 204, 163, 0.5);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.75), 0 0 14px rgba(78, 204, 163, 0.15);
    pointer-events: none; /* Ne capte aucun clic ni survol */
    z-index: 100000;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    transform: translateY(6px);
    white-space: normal;
    text-transform: none;
    letter-spacing: normal;
    text-align: left;
}

.help-tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 16px;
    border-width: 6px;
    border-style: solid;
    border-color: #0f172a transparent transparent transparent;
}

/* Affichage strictement au survol de la souris */
.help-tooltip-trigger:hover .help-tooltip-content {
    visibility: visible;
    opacity: 1;
    pointer-events: none;
    transform: translateY(0);
}

textarea, input[type="text"] {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #0f3460;
    background: #0b0e14;
    color: white;
    box-sizing: border-box;
    font-size: 1em;
    transition: border 0.3s;
}

textarea:focus { border-color: #4ecca3; outline: none; }

button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #4ecca3, #45b393);
    color: #1a1a2e;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 1.1em;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(78, 204, 163, 0.4);
}

button:disabled { opacity: 0.6; cursor: not-allowed; }

.ia-response-section {
    background: #16213e;
    padding: 20px;
    border-radius: 8px;
    border-top: 4px solid #4ecca3;
    position: relative;
}

.output-box {
    background: #0b0e14;
    padding: 20px;
    border-radius: 6px;
    min-height: 100px;
    white-space: pre-wrap;
    line-height: 1.8;
    border: 1px solid #0f3460;
}

.private-box { border-left: 4px solid #e94560; color: #ff9a9e; margin-top: 10px; }

/* ANIMATION CHARGEMENT IA */
.thinking-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px;
    text-align: center;
}

.crystal-ball {
    position: relative;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle at 30% 30%, #4ecca3, #16213e);
    border-radius: 50%;
    box-shadow: 0 0 20px #4ecca3, inset 0 0 15px rgba(255,255,255,0.5);
    animation: float 3s ease-in-out infinite, pulse 2s infinite;
}

.mist {
    position: absolute;
    top: 10%; left: 10%; width: 80%; height: 80%;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    filter: blur(5px);
    animation: rotate 4s linear infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes pulse {
    0% { box-shadow: 0 0 20px #4ecca3; }
    50% { box-shadow: 0 0 40px #4ecca3; }
    100% { box-shadow: 0 0 20px #4ecca3; }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.loader-small {
    border: 3px solid #0f3460;
    border-top: 3px solid #4ecca3;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* HUB STYLES */
.hub-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    margin-top: 50px;
    align-items: start;
}

.hub-left, .hub-right {
    background: rgba(22, 33, 62, 0.7);
    backdrop-filter: blur(12px);
    padding: 40px;
    border-radius: 16px;
    border: 1px solid rgba(78, 204, 163, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 0 20px rgba(78, 204, 163, 0.05);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}

.hub-left {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hub-left:hover, .hub-right:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(78, 204, 163, 0.15);
    border-color: rgba(78, 204, 163, 0.7);
}

.hub-right {
    min-height: 400px;
    position: relative;
}

.hub-right h2 {
    color: #4ecca3;
    margin-top: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 2px solid rgba(78, 204, 163, 0.2);
    padding-bottom: 15px;
    position: relative;
    display: block;
}

.game-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 25px;
}

.game-item {
    background: linear-gradient(145deg, rgba(15, 52, 96, 0.9), rgba(22, 33, 62, 0.9));
    padding: 20px 25px;
    border-radius: 12px;
    border: 1px solid rgba(78, 204, 163, 0.2);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.game-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(78, 204, 163, 0.15), transparent);
    transition: left 0.6s ease;
    transform: skewX(-20deg);
}

.game-item:hover {
    border-color: #4ecca3;
    transform: translateX(8px) scale(1.01);
    box-shadow: -5px 10px 25px rgba(0,0,0,0.4), inset 0 0 15px rgba(78, 204, 163, 0.1);
}

.game-item:hover::before {
    left: 200%;
}

.delete-game-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #e94560;
    color: white;
    border: none;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    z-index: 5;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(233, 69, 96, 0.4);
}

.delete-game-btn:hover {
    transform: scale(1.15) rotate(90deg);
    background: #ff2e63;
    box-shadow: 0 4px 15px rgba(255, 46, 99, 0.6);
}

.game-item h3 { 
    margin: 0 0 10px 0; 
    color: #4ecca3; 
    font-size: 1.4em;
    text-shadow: 0 2px 5px rgba(0,0,0,0.4);
}
.game-item p { margin: 5px 0; font-size: 0.95em; opacity: 0.85; line-height: 1.4; }
.game-info { 
    display: flex; 
    justify-content: space-between; 
    font-size: 0.85em; 
    color: #4ecca3; 
    margin-top: 15px; 
    padding-top: 10px;
    border-top: 1px dashed rgba(78, 204, 163, 0.3);
}

.btn-main {
    background: linear-gradient(135deg, #4ecca3, #45b393);
    font-size: 1.3em;
    padding: 25px;
}

/* --- POLISHED CREATE BUTTON --- */
#showCreateGameBtn {
    background: linear-gradient(180deg, #4ecca3 0%, #45b28e 100%);
    color: #0b0e14;
    border: none;
    padding: 20px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 4px;
    box-shadow: 0 4px 0 #2d8268, 0 0 10px rgba(78, 204, 163, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

#showCreateGameBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #2d8268, 0 0 20px rgba(78, 204, 163, 0.5);
    filter: brightness(1.1);
}

#showCreateGameBtn:active {
    transform: translateY(4px);
    box-shadow: none;
}

#showCreateGameBtn::after {
    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: all 0.5s;
    pointer-events: none;
}

#showCreateGameBtn:hover::after {
    left: 100%;
    top: 100%;
}

/* --- ENERGETIC DANGER BUTTON --- */
#resetServerMemoryBtn {
    margin: 40px auto 0 auto !important;
    background: linear-gradient(180deg, #2a0e0e 0%, #1a0808 100%);
    color: #e94560;
    border: 1px solid #e94560;
    padding: 8px 15px;
    font-size: 0.75em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    box-shadow: 0 2px 0 #1a0808;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    opacity: 0.7;
    width: auto !important;
    display: block;
}

#resetServerMemoryBtn:hover {
    opacity: 1;
    transform: scale(1.05);
    background: #e94560;
    color: #ffffff;
    box-shadow: 0 0 20px #e94560, 0 0 40px rgba(233, 69, 96, 0.4);
    text-shadow: 0 0 5px rgba(255,255,255,0.8);
}

#resetServerMemoryBtn:active {
    transform: scale(0.95);
    box-shadow: none;
}

/* --- COSMIC EFFECTS BUTTON --- */
#showEffectsTestBtn {
    margin-top: 30px !important;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 12px 20px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 50px; /* Style pilule plus moderne */
    box-shadow: 0 4px 15px rgba(106, 17, 203, 0.3);
    transition: all 0.4s ease;
    cursor: pointer;
    width: auto !important;
    display: inline-block;
}

#showEffectsTestBtn:hover {
    transform: translateY(-3px) rotate(-1deg);
    box-shadow: 0 8px 25px rgba(37, 117, 252, 0.5);
    letter-spacing: 2px;
    background: linear-gradient(135deg, #2575fc 0%, #6a11cb 100%);
    border-color: rgba(255, 255, 255, 0.8);
}

#showEffectsTestBtn::before {
    content: '✨';
    margin-right: 8px;
    display: inline-block;
    transition: transform 0.3s ease;
}

#showEffectsTestBtn:hover::before {
    transform: scale(1.4) rotate(20deg);
}

.empty-msg { 
    text-align: center; 
    color: #e9ecef;
    opacity: 0.6; 
    margin-top: 40px; 
    font-style: italic;
    font-size: 1.05em;
    line-height: 1.6;
}

/* CHAR SELECTION STYLES */
.char-tabs-wrapper {
    width: 100%;
    max-width: 800px;
    margin: 0 auto 20px auto;
    border-bottom: 2px solid rgba(78, 204, 163, 0.35);
}

.char-mode-tabs {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    width: 100%;
    margin-bottom: -2px;
}

.char-tab-btn {
    flex: 1 1 0;
    min-width: 130px;
    background: rgba(10, 15, 26, 0.7);
    border: 1px solid rgba(78, 204, 163, 0.22);
    border-bottom: 2px solid rgba(78, 204, 163, 0.35);
    border-radius: 8px 8px 0 0;
    color: #94a3b8;
    padding: 12px 14px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    transition: all 0.2s ease;
    outline: none;
    position: relative;
    user-select: none;
}

.char-tab-btn:hover {
    background: rgba(78, 204, 163, 0.1);
    color: #f1f5f9;
    border-color: rgba(78, 204, 163, 0.45);
}

.char-tab-btn.active {
    background: #16213e;
    color: #4ecca3;
    font-weight: 700;
    border: 1px solid #4ecca3;
    border-bottom: 2px solid #16213e;
    box-shadow: 0 -3px 12px rgba(78, 204, 163, 0.22);
    z-index: 2;
}

.char-tab-btn.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #4ecca3;
    box-shadow: 0 0 8px rgba(78, 204, 163, 0.8);
    border-radius: 8px 8px 0 0;
}

.char-selection-layout {
    display: block;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
}

.char-new, .char-existing {
    background: rgba(22, 33, 62, 0.7);
    backdrop-filter: blur(12px);
    padding: 35px;
    border-radius: 16px;
    border: 1px solid rgba(78, 204, 163, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 0 20px rgba(78, 204, 163, 0.05);
    transition: box-shadow 0.4s ease, border-color 0.4s ease;
    min-height: 300px;
    width: 100%;
    box-sizing: border-box;
}

.char-new.hidden, .char-existing.hidden {
    display: none !important;
}

.char-new:hover, .char-existing:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(78, 204, 163, 0.15);
    border-color: rgba(78, 204, 163, 0.7);
}

.char-new h2, .char-existing h2 {
    color: #4ecca3;
    margin-top: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 2px solid rgba(78, 204, 163, 0.2);
    padding-bottom: 15px;
    position: relative;
    display: block;
}

.char-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 25px;
}

.char-item {
    background: linear-gradient(145deg, rgba(15, 52, 96, 0.9), rgba(22, 33, 62, 0.9));
    padding: 18px 20px;
    border-radius: 12px;
    border: 1px solid rgba(78, 204, 163, 0.2);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.char-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(78, 204, 163, 0.15), transparent);
    transition: left 0.6s ease;
    transform: skewX(-20deg);
}

.char-item:not(.occupied):hover {
    border-color: #4ecca3;
    transform: translateX(8px) scale(1.01);
    box-shadow: -5px 10px 25px rgba(0,0,0,0.4), inset 0 0 15px rgba(78, 204, 163, 0.1);
}

.char-item:not(.occupied):hover::before {
    left: 200%;
}

.char-item.occupied {
    opacity: 0.5;
    cursor: not-allowed;
    background: #0b0e14;
    border-color: transparent;
}

.char-item.occupied::after {
    content: "OCCUPÉ";
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e94560;
    font-size: 0.7em;
    padding: 2px 6px;
    border-radius: 4px;
}

.char-item h4 { margin: 0 0 5px 0; color: #4ecca3; }
.char-item p { margin: 0; font-size: 0.85em; opacity: 0.8; margin-bottom: 8px; }

.char-stats-preview {
    display: flex;
    gap: 15px;
    font-size: 0.8em;
    color: #4ecca3;
    border-top: 1px solid rgba(78, 204, 163, 0.2);
    padding-top: 5px;
}

.mt-20 { margin-top: 20px; }

.top-stats {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 100;
}

.badge-online {
    background: #0f3460;
    color: #4ecca3;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    border: 1px solid #4ecca3;
    box-shadow: 0 0 10px rgba(78,204,163,0.2);
}

.status-offline {
    color: #6c757d;
    font-weight: normal;
    font-style: italic;
}

.char-item {
    position: relative;
}

.delete-char-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #e94560;
    color: white;
    border: none;
    border-radius: 3px;
    width: 20px;
    height: 20px;
    line-height: 18px;
    text-align: center;
    cursor: pointer;
    font-size: 14px;
    z-index: 10;
    opacity: 0.8;
}

.delete-char-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* COMPTE A REBOURS */
.countdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(11, 14, 20, 0.9);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.countdown-circle {
    width: 150px;
    height: 150px;
    border: 8px solid #4ecca3;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 5rem;
    font-weight: bold;
    color: #4ecca3;
    margin-bottom: 20px;
    box-shadow: 0 0 30px rgba(78, 204, 163, 0.5);
    animation: pulse-countdown 1s infinite;
}

@keyframes pulse-countdown {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* --- INVENTAIRE INTERACTIF --- */
.inventory-layout {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 10px;
}

.inventory-zone {
    background: rgba(26, 26, 46, 0.6);
    border: 1px solid #16213e;
    border-radius: 8px;
    padding: 10px;
    transition: all 0.3s ease;
}

.inventory-zone.drag-over {
    border-color: #4ecca3;
    background: rgba(78, 204, 163, 0.1);
    box-shadow: 0 0 10px rgba(78, 204, 163, 0.3);
}

/* Indicateur d'insertion pour le réordonnancement des zones */
.inventory-zone.drop-after {
    border-bottom: 2px solid #4ecca3;
    margin-bottom: 5px;
}
.inventory-zone.drop-before {
    border-top: 2px solid #4ecca3;
    margin-top: 5px;
}

.inventory-zone.dragging-zone {
    opacity: 0.4;
    border: 1px dashed #4ecca3;
}

.zone-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(78, 204, 163, 0.2);
    padding-bottom: 5px;
}

.zone-header h3 {
    margin: 0;
    font-size: 0.6em;
    color: #4ecca3;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.capacity-tag {
    font-size: 0.75em;
    background: #16213e;
    padding: 2px 6px;
    border-radius: 4px;
    color: #4ecca3;
    border: 1px solid rgba(78, 204, 163, 0.3);
}

.zone-content {
    min-height: 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.inventory-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* CARTES D'OBJETS FLOTTANTES */
.inventory-card {
    background: linear-gradient(135deg, #16213e 0%, #0f3460 100%);
    border: 1px solid #4ecca3;
    color: #e9ecef;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85em;
    cursor: grab;
    user-select: none;
    box-shadow: 2px 4px 8px rgba(0,0,0,0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: normal; /* Autorise le retour à la ligne */
    word-break: break-word; /* Coupe les mots trop longs si nécessaire */
    line-height: 1.2;
}

.inventory-card:active {
    cursor: grabbing;
    transform: scale(0.95);
}

.inventory-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.6), 0 0 8px rgba(78, 204, 163, 0.4);
}

.inventory-card.dragging {
    opacity: 0.3;
}

/* Carte fantôme qui suit la souris */
.dragging-ghost {
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    width: auto;
    opacity: 1; /* Totalement opaque */
    transform: none; /* Pas d'inclinaison ni de scale */
    box-shadow: 0 10px 25px rgba(0,0,0,0.6);
    transition: none; /* Mouvement instantané */
}

/* Styles spécifiques par zone */
#zone-poche { border-left: 3px solid #ffcc00; }
#zone-ceinture { border-left: 3px solid #ff9f43; }
#zone-default { border-style: dashed; opacity: 0.9; }

/* Effet "Hardcore" quand plein */
.zone-full {
    border-color: #e94560 !important;
}
.zone-full .capacity-tag {
    background: #e94560;
    color: white;
}

/* Zone Verrouillée */
.zone-locked {
    opacity: 0.6;
    filter: grayscale(0.8);
    cursor: not-allowed !important;
    border-style: double !important;
    border-color: #555 !important;
}

.zone-locked .zone-header h3 {
    color: #888 !important;
}

.zone-locked .zone-content {
    pointer-events: none;
}

/* --- QUICK NAV BAR Joueur --- */
.game-nav-bar {
    display: flex;
    justify-content: center;
    gap: 60px; /* Plus d'espace entre les boutons */
    margin-bottom: 30px;
    padding: 10px;
    background: transparent; /* Supprime le cadre */
    border: none; /* Supprime la bordure */
}

.btn-nav {
    width: auto !important;
    min-width: 160px;
    padding: 12px 25px !important;
    font-size: 0.9em !important;
    background: rgba(22, 33, 62, 0.8) !important; /* Fond semi-transparent pour l'effet flottant */
    color: #4ecca3 !important;
    border: 1px solid rgba(78, 204, 163, 0.4) !important;
    border-radius: 50px; /* Forme plus organique/pilule */
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5); /* Ombre portée pour le flottement */
}

.btn-nav:hover:not(:disabled) {
    background: rgba(78, 204, 163, 0.1) !important;
    border-color: #4ecca3 !important;
    transform: translateY(-5px); /* Flotte plus haut au survol */
    box-shadow: 0 8px 25px rgba(78, 204, 163, 0.3);
    color: #ffffff !important;
}

.btn-nav:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(1);
    border-color: #333 !important;
}

.effects-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9998;
    overflow: hidden;
}

.effects-container-ui {
    background: #16213e;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #4ecca3;
    max-width: 800px;
    margin: 40px auto;
    text-align: center;
}

.button-group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.effect-btn {
    padding: 10px;
    font-size: 0.9em;
    background: #0f3460;
    color: #e9ecef;
    border: 1px solid #16213e;
}

.effect-btn:hover {
    background: #4ecca3;
    color: #1a1a2e;
}

/* --- JDR STYLIZED EXIT BUTTON --- */
#backToHubFromGameBtn {
    background: linear-gradient(135deg, #2a0e0e 0%, #e94560 100%);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 15px 35px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    width: auto !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

#backToHubFromGameBtn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(233, 69, 96, 0.5), 0 0 10px rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, #e94560 0%, #2a0e0e 100%);
    border-color: rgba(255, 255, 255, 0.6);
}

#backToHubFromGameBtn:active {
    transform: translateY(2px) scale(0.98);
    box-shadow: none;
}

/* --- ANIMATIONS DES EFFETS --- */

/* Pluie */
.rain-drop {
    position: absolute;
    background: rgba(174, 194, 224, 0.5);
    width: 2px;
    height: 15px;
    top: -20px;
    animation: fall linear infinite;
}

@keyframes fall {
    to { transform: translateY(105vh); }
}

/* Neige */
.snowflake {
    position: absolute;
    background: white;
    border-radius: 50%;
    top: -10px;
    animation: snowFall linear infinite;
}

@keyframes snowFall {
    0% { transform: translateY(0) translateX(0); }
    25% { transform: translateY(25vh) translateX(15px); }
    50% { transform: translateY(50vh) translateX(-15px); }
    75% { transform: translateY(75vh) translateX(15px); }
    100% { transform: translateY(105vh) translateX(0); }
}

/* Feu / Volcan (Particules) */
.fire-particle {
    position: absolute;
    bottom: -20px;
    background: orange;
    border-radius: 50%;
    filter: blur(2px);
    animation: rise ease-out infinite;
}

@keyframes rise {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    100% { transform: translateY(-100vh) scale(0); opacity: 0; }
}

/* Pluie Diagonale (Tempête) */
.storm-drop {
    position: absolute;
    background: rgba(174, 194, 224, 0.6);
    width: 2px;
    height: 20px;
    top: -20px;
    transform: rotate(20deg); /* Inclinaison pour le vent */
    animation: fallStorm linear infinite;
}

@keyframes fallStorm {
    to { transform: translateY(105vh) translateX(-200px) rotate(20deg); }
}

/* Nouvel Effet Vent (Rafales / Feuilles / Poussière) */
.wind-particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50% 0 50% 0; /* Forme de feuille/poussière */
    filter: blur(1px);
    animation: windSwirl linear infinite;
}

@keyframes windSwirl {
    0% { transform: translate(-10vw, 0) rotate(0deg); opacity: 0; }
    20% { opacity: 0.6; }
    80% { opacity: 0.6; }
    100% { transform: translate(110vw, 20vh) rotate(720deg); opacity: 0; }
}

/* Overlay de couleur (Froid, Chaud, Sombre, Nuit, etc.) */
.color-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    transition: background 1s ease;
}

.overlay-cold { background: rgba(0, 100, 255, 0.08); box-shadow: inset 0 0 100px rgba(0, 50, 255, 0.15); }
.overlay-hot { background: rgba(255, 50, 0, 0.08); box-shadow: inset 0 0 100px rgba(255, 0, 0, 0.15); }
.overlay-dark { background: rgba(0, 0, 0, 0.75); }
.overlay-night { background: rgba(10, 10, 40, 0.65); }
.overlay-cave { background: rgba(0, 0, 0, 0.9); box-shadow: inset 0 0 200px rgba(0,0,0,1); }
.overlay-forest { background: rgba(0, 50, 0, 0.05); }
.overlay-desert { background: rgba(255, 200, 0, 0.05); }

/* Effet Torche */
.flashlight-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
}

/* Halos de Ville */
.city-halo {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0;
    animation: blink-halo linear infinite alternate;
}

@keyframes blink-halo {
    0% { opacity: 0; transform: scale(0.8); }
    100% { opacity: 0.25; transform: scale(1); }
}


/* Éclairs Réalistes (Orage) */
.lightning {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: white;
    opacity: 0;
    pointer-events: none;
}

.lightning-flash-real {
    animation: flashReal 2.5s ease-out; /* S'estompe en 2.5s */
}

@keyframes flashReal {
    0% { opacity: 0.7; }
    10% { opacity: 0.5; }
    100% { opacity: 0; }
}

/* --- SECTION PNJ ACTIFS --- */
.pnj-section {
    background: #16213e;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #4ecca3;
    height: fit-content;
}

.pnj-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pnj-card {
    background: #0f3460;
    border-radius: 8px;
    padding: 10px 12px;
    border: 1px solid #16213e;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    animation: slideIn 0.3s ease-out;
    box-sizing: border-box;
    width: 100%;
}

.pnj-name {
    font-weight: bold;
    color: #e9ecef;
    font-size: 0.95em;
    line-height: 1.3;
    word-break: break-word;
    width: 100%;
}

.pnj-status-tag {
    background: #e94560;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.78em;
    font-style: italic;
    word-break: break-word;
    max-width: 100%;
    display: inline-block;
}

.pnj-empty {
    background: rgba(78, 204, 163, 0.05);
    border: 1px dashed rgba(78, 204, 163, 0.3);
    border-radius: 8px;
    padding: 12px;
    color: #ced4da;
    text-align: center;
    font-style: italic;
    font-size: 0.9em;
}

/* --- TTS NARRATOR STYLES --- */
.play-audio-btn {
    position: absolute;
    top: -15px;
    right: 15px;
    background: linear-gradient(135deg, #4ecca3, #2575fc);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1.2em;
    box-shadow: 0 4px 10px rgba(78, 204, 163, 0.4);
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-audio-btn:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 15px rgba(78, 204, 163, 0.6);
}

.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(11, 14, 20, 0.85);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #16213e;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #4ecca3;
    width: 90%;
    max-width: 450px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
    animation: fadeInDown 0.3s ease;
}

.voice-select {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #0f3460;
    background: #0b0e14;
    color: white;
    font-size: 1em;
    margin-top: 15px;
    outline: none;
    cursor: pointer;
}
.voice-select:focus { border-color: #4ecca3; }

/* --- CODEX MODAL STYLES --- */
.codex-modal {
    max-width: 1000px !important;
    width: 95% !important;
    height: 85vh;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    padding: 20px !important;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #4ecca3;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.modal-header h2 {
    margin: 0;
    color: #4ecca3;
    font-size: 1.5em;
    letter-spacing: 1px;
}

.close-btn {
    background: transparent;
    border: none;
    color: #e9ecef;
    font-size: 2em;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: auto;
    box-shadow: none;
}

.close-btn:hover {
    color: #e94560;
    transform: none;
    box-shadow: none;
}

.codex-body {
    flex-grow: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.codex-add-form {
    background: rgba(22, 33, 62, 0.8);
    padding: 8px 12px;
    border-radius: 6px;
    border-top: 1px solid #4ecca3;
    margin-top: 10px;
}

.codex-add-form h4 {
    margin: 0 0 8px 0;
    color: #4ecca3;
    font-size: 0.95em;
    text-align: center;
}

.codex-inputs {
    display: grid;
    grid-template-columns: 150px 1fr 1fr 2fr 100px;
    gap: 10px;
}

.codex-inputs select, .codex-inputs input {
    background: #0b0e14;
    border: 1px solid #0f3460;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9em;
}

.codex-inputs select:focus, .codex-inputs input:focus {
    border-color: #4ecca3;
    outline: none;
}

.codex-hint {
    font-size: 0.8em;
    color: #6c757d;
    font-style: italic;
    margin-top: 10px;
    margin-bottom: 0;
}

.btn-delete-codex {
    background: transparent;
    border: none;
    color: #ff4d4d;
    cursor: pointer;
    font-size: 1.2em;
    padding: 0;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.btn-delete-codex:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Style pour les entrées non répertoriées (Lore, objets portés) */
.entry-unlisted {
    opacity: 0.7;
    font-style: italic;
}
.entry-unlisted td:nth-child(3) {
    color: #4ecca3; /* Couleur un peu différente pour le texte du lore */
}

.btn-edit-codex {
    background: transparent;
    border: none;
    color: #4ecca3;
    cursor: pointer;
    font-size: 1.2em;
    padding: 0;
    opacity: 0.6;
    transition: opacity 0.2s;
    margin-right: 10px;
}

.btn-edit-codex:hover {
    opacity: 1;
    transform: scale(1.1);
}

@media (max-width: 1000px) {
    .codex-inputs {
        grid-template-columns: 1fr 1fr;
    }
    .codex-inputs button {
        grid-column: span 2;
    }
}

/* --- MAP MODAL STYLES --- */
.map-modal {
    max-width: 900px !important;
    width: 95% !important;
    height: 85vh;
    display: flex;
    flex-direction: column;
    padding: 15px !important;
    background: rgba(11, 14, 20, 0.95) !important;
}

.map-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
    position: relative;
}

.map-canvas-container {
    flex-grow: 1;
    position: relative;
    background: #050508;
    border: 1px solid rgba(78, 204, 163, 0.3);
    border-radius: 4px;
    overflow: hidden;
    cursor: crosshair;
}

#mapCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

.map-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: rgba(22, 33, 62, 0.5);
    border-radius: 4px;
    color: #4ecca3;
    font-family: monospace;
    font-size: 0.9em;
}

/* Flèches de navigation */
.map-nav-arrow {
    position: absolute;
    background: rgba(15, 52, 96, 0.6);
    color: #4ecca3;
    border: 1px solid rgba(78, 204, 163, 0.4);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 1.2em;
}

.map-nav-arrow:hover {
    background: #4ecca3;
    color: #1a1a2e;
    box-shadow: 0 0 15px #4ecca3;
}

/* Annule le mouvement translateY du bouton générique pour garder le centrage fixe */
.map-nav-arrow.up:hover, .map-nav-arrow.down:hover { transform: translateX(-50%) !important; }
.map-nav-arrow.left:hover, .map-nav-arrow.right:hover { transform: translateY(-50%) !important; }

.map-nav-arrow.up { top: 10px; left: 50%; transform: translateX(-50%); }
.map-nav-arrow.down { bottom: 10px; left: 50%; transform: translateX(-50%); }
.map-nav-arrow.left { left: 10px; top: 50%; transform: translateY(-50%); }
.map-nav-arrow.right { right: 10px; top: 50%; transform: translateY(-50%); }

/* Tooltip Contextuel (Menu) */
.map-context-menu {
    position: fixed;
    background: #16213e;
    border: 1px solid #4ecca3;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.8);
    padding: 8px;
    min-width: 150px;
    z-index: 1000;
    border-radius: 2px;
    animation: fadeIn 0.2s ease-out;
}

.context-header {
    font-size: 0.7em;
    text-transform: uppercase;
    color: #4ecca3;
    border-bottom: 1px solid rgba(78, 204, 163, 0.3);
    padding-bottom: 5px;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

#mapTooltipList {
    list-style: none;
    padding: 0;
    margin: 0;
}

#mapTooltipList li {
    padding: 5px 10px;
    color: #e9ecef;
    font-size: 0.9em;
    border-radius: 2px;
    transition: background 0.2s;
}

#mapTooltipList li:hover {
    background: rgba(78, 204, 163, 0.2);
}

.codex-table-container {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    border: 1px solid #0f3460;
    border-radius: 4px;
    background: rgba(11, 14, 20, 0.5);
}

#codexTable {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.8em;
}

#codexTable th, #codexTable td {
    padding: 6px 10px;
    border-bottom: 1px solid #16213e;
}

#codexTable th {
    background: #16213e;
    color: #4ecca3;
    position: sticky;
    top: 0;
    z-index: 1;
    text-transform: uppercase;
    font-size: 0.8em;
    letter-spacing: 1px;
}

#codexTable tbody tr:hover {
    background: rgba(78, 204, 163, 0.05);
}

#codexTable td {
    color: #ced4da;
    line-height: 1.25;
}

#codexTable td:first-child {
    font-weight: bold;
    color: #4ecca3;
    width: 100px;
}

#codexTable td:nth-child(2) {
    font-weight: bold;
    color: #ffffff;
    width: 150px;
}

#codexTable td:nth-child(3) {
    width: 120px;
}

/* Custom Scrollbar for Codex */
.codex-table-container::-webkit-scrollbar {
    width: 8px;
}

.codex-table-container::-webkit-scrollbar-track {
    background: #0b0e14;
}

.codex-table-container::-webkit-scrollbar-thumb {
    background: #0f3460;
    border-radius: 4px;
}

.codex-table-container::-webkit-scrollbar-thumb:hover {
    background: #4ecca3;
}

/* --- CUSTOM ALERT DIALOG STYLES (Anti-doxxing Stream) --- */
.custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 5, 8, 0.85);
    backdrop-filter: blur(6px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 15000; /* Must be above map and codex modals */
    animation: alertFadeIn 0.25s ease-out;
}

.custom-alert-box {
    background: linear-gradient(135deg, #111625 0%, #16213e 100%);
    border: 2px solid #4ecca3;
    border-radius: 8px;
    width: 90%;
    max-width: 450px;
    padding: 25px;
    box-shadow: 0 0 25px rgba(78, 204, 163, 0.25), inset 0 0 15px rgba(0, 0, 0, 0.6);
    text-align: center;
    animation: alertSlideDown 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.custom-alert-header {
    font-size: 0.9em;
    font-weight: bold;
    text-transform: uppercase;
    color: #4ecca3;
    letter-spacing: 2px;
    border-bottom: 1px solid rgba(78, 204, 163, 0.25);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

#customAlertText {
    color: #e9ecef;
    font-size: 1.1em;
    line-height: 1.5;
    margin: 15px 0 25px 0;
    word-break: break-word;
}

#customAlertBtn {
    padding: 10px 30px;
    font-size: 1em;
    font-weight: bold;
    letter-spacing: 1px;
    cursor: pointer;
    background: #4ecca3;
    color: #0b0e14;
    border: none;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(78, 204, 163, 0.2);
    transition: all 0.2s;
}

#customAlertBtn:hover {
    background: #3db892;
    box-shadow: 0 0 15px #4ecca3;
    transform: translateY(-2px);
}

#customAlertBtn:active {
    transform: translateY(0);
}

@keyframes alertFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes alertSlideDown {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* --- AUTOCOMPLETE SUGGESTIONS --- */
.autocomplete-suggestions {
    position: absolute;
    background: rgba(22, 33, 62, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(78, 204, 163, 0.5);
    border-radius: 6px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5), 0 0 15px rgba(78, 204, 163, 0.2);
    max-height: 200px;
    overflow-y: auto;
    z-index: 2000;
    width: 280px;
}

.autocomplete-suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.85em;
    color: #e9ecef;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s, color 0.2s;
}

.autocomplete-suggestion-item:last-child {
    border-bottom: none;
}

.autocomplete-suggestion-item:hover,
.autocomplete-suggestion-item.selected {
    background: rgba(78, 204, 163, 0.2);
    color: #4ecca3;
}

.suggestion-source-tag {
    font-size: 0.75em;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    opacity: 0.7;
    margin-left: 10px;
    white-space: nowrap;
}

/* --- EASTER EGG HEADER DECORATIONS --- */
.header-decoration.left, .header-decoration.right {
    cursor: pointer;
    transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}

.header-decoration.left:hover:not(.header-lightning-strike):not(.header-charging-left),
.header-decoration.right:hover:not(.header-explosion) {
    border-color: #ffffff;
    box-shadow: 0 0 10px #4ecca3;
}

/* Remplissage de droite (Rubis de feu par clics) */
.header-decoration.right.header-ruby-fill-1 {
    background: linear-gradient(to top, #ff2e63 25%, #0b0e14 25%) !important;
    border-color: rgba(233, 69, 96, 0.5) !important;
    box-shadow: 0 0 4px rgba(255, 46, 99, 0.2);
}
.header-decoration.right.header-ruby-fill-2 {
    background: linear-gradient(to top, #ff2e63 50%, #0b0e14 50%) !important;
    border-color: rgba(233, 69, 96, 0.7) !important;
    box-shadow: 0 0 8px rgba(255, 46, 99, 0.4);
}
.header-decoration.right.header-ruby-fill-3 {
    background: linear-gradient(to top, #ff2e63 75%, #0b0e14 75%) !important;
    border-color: rgba(233, 69, 96, 0.9) !important;
    box-shadow: 0 0 12px rgba(255, 46, 99, 0.6);
}
.header-decoration.right.header-ruby-fill-4,
.header-decoration.right.header-ruby {
    background: radial-gradient(circle, #ff2e63 0%, #8b0000 100%) !important;
    border-color: #ff9a9e !important;
    box-shadow: 0 0 15px #ff2e63, inset 0 0 5px #ffffff !important;
    animation: rubyGlow 1.5s infinite ease-in-out;
}

@keyframes rubyGlow {
    0%, 100% { box-shadow: 0 0 10px #ff2e63, inset 0 0 3px #ffffff; filter: brightness(1); }
    50% { box-shadow: 0 0 25px #ff2e63, inset 0 0 8px #ffffff; filter: brightness(1.3); }
}

.header-decoration.right.header-explosion {
    animation: flameExplosion 1.2s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
    border-color: #ff9f43 !important;
    pointer-events: none;
}

@keyframes flameExplosion {
    0% {
        transform: translateY(-50%) rotate(45deg) scale(1);
        background: radial-gradient(circle, #fff 10%, #ff9f43 50%, #ff2e63 80%);
        box-shadow: 0 0 20px #ff9f43, 0 0 40px #ff2e63;
        border-radius: 0%;
        opacity: 1;
    }
    30% {
        transform: translateY(-50%) rotate(120deg) scale(2.8);
        background: radial-gradient(circle, #ff9f43 20%, #ff3838 60%, rgba(255, 46, 99, 0) 100%);
        box-shadow: 0 0 40px #ff9f43, 0 0 80px #ff2e63, 0 0 120px #ff4500;
        border-radius: 50%;
        opacity: 0.9;
    }
    70% {
        transform: translateY(-50%) rotate(240deg) scale(3.5);
        background: radial-gradient(circle, #ff4500 10%, rgba(233, 69, 96, 0.4) 50%, rgba(0, 0, 0, 0) 90%);
        box-shadow: 0 0 30px #ff4500, 0 0 60px rgba(233, 69, 96, 0.2);
        border-radius: 50%;
        opacity: 0.4;
    }
    100% {
        transform: translateY(-50%) rotate(405deg) scale(1);
        background: #0b0e14;
        border-color: #4ecca3;
        box-shadow: none;
        border-radius: 0%;
        opacity: 1;
    }
}

.flame-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    box-shadow: 0 0 10px currentColor;
}

/* --- LIGHTNING EASTER EGG (LEFT) --- */
.header-decoration.left.header-charging-left {
    animation: fillLeft 2s linear forwards;
    pointer-events: none;
}

@keyframes fillLeft {
    0% {
        background: linear-gradient(to top, #00d2ff 0%, #0b0e14 0%);
        border-color: rgba(78, 204, 163, 0.4);
        box-shadow: 0 0 2px rgba(0, 210, 255, 0.2);
    }
    10% { background: linear-gradient(to top, #00d2ff 10%, #0b0e14 10%); }
    20% { background: linear-gradient(to top, #00d2ff 20%, #0b0e14 20%); }
    30% { background: linear-gradient(to top, #00d2ff 30%, #0b0e14 30%); }
    40% { background: linear-gradient(to top, #00d2ff 40%, #0b0e14 40%); }
    50% { background: linear-gradient(to top, #00d2ff 50%, #0b0e14 50%); }
    60% { background: linear-gradient(to top, #00d2ff 60%, #0b0e14 60%); }
    70% { background: linear-gradient(to top, #00d2ff 70%, #0b0e14 70%); }
    80% { background: linear-gradient(to top, #00d2ff 80%, #0b0e14 80%); }
    90% { background: linear-gradient(to top, #00d2ff 90%, #0b0e14 90%); }
    100% {
        background: linear-gradient(to top, #00d2ff 100%, #0b0e14 100%);
        border-color: #e0f7fa;
        box-shadow: 0 0 10px #00d2ff;
    }
}

.header-decoration.left.header-lightning-charge {
    background: radial-gradient(circle, #00d2ff 0%, #0066ff 100%) !important;
    border-color: #e0f7fa !important;
    box-shadow: 0 0 15px #00d2ff, inset 0 0 5px #ffffff !important;
    animation: lightningJitter 0.12s infinite linear;
}

@keyframes lightningJitter {
    0% { transform: translateY(-50%) rotate(45deg) translate(0, 0); filter: brightness(1.2); }
    20% { transform: translateY(-50%) rotate(45deg) translate(-1px, 1px); }
    40% { transform: translateY(-50%) rotate(45deg) translate(1px, -1px); }
    60% { transform: translateY(-50%) rotate(45deg) translate(-1.5px, -0.5px); filter: brightness(1.5); }
    80% { transform: translateY(-50%) rotate(45deg) translate(1px, 1.5px); }
    100% { transform: translateY(-50%) rotate(45deg) translate(-0.5px, -1px); filter: brightness(1.2); }
}

.header-decoration.left.header-lightning-strike {
    animation: lightningBurst 0.6s ease-out forwards;
    border-color: #ffffff !important;
    pointer-events: none;
}

@keyframes lightningBurst {
    0% {
        transform: translateY(-50%) rotate(45deg) scale(1);
        background: #ffffff;
        box-shadow: 0 0 30px #ffffff, 0 0 60px #00d2ff;
    }
    30% {
        transform: translateY(-50%) rotate(180deg) scale(2.2);
        background: #00d2ff;
        box-shadow: 0 0 50px #00d2ff, 0 0 100px #0066ff;
    }
    100% {
        transform: translateY(-50%) rotate(405deg) scale(1);
        background: #0b0e14;
        border-color: #4ecca3;
        box-shadow: none;
    }
}

.header-frame.lightning-strike-flash {
    animation: headerFlash 0.5s ease-out forwards;
}

@keyframes headerFlash {
    0% {
        background: #ffffff;
        border-color: #00d2ff;
        box-shadow: 0 0 50px #00d2ff, inset 0 0 30px #00d2ff;
    }
    15% {
        background: #00d2ff;
        border-color: #ffffff;
        box-shadow: 0 0 60px #00d2ff, inset 0 0 40px #0066ff;
    }
    35% {
        background: #ffffff;
        box-shadow: 0 0 30px #00d2ff;
    }
    100% {
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
        border-color: #4ecca3;
        box-shadow: 0 0 15px rgba(78, 204, 163, 0.2), inset 0 0 10px rgba(0,0,0,0.5);
    }
}

.spark-particle {
    position: absolute;
    border-radius: 2px;
    pointer-events: none;
    z-index: 10000;
    box-shadow: 0 0 8px #00d2ff;
}

/* --- TOP BAR & CONTROLS (En haut à gauche en liste verticale) --- */
.top-bar {
    position: absolute;
    top: 15px;
    left: 20px;
    z-index: 1000;
    margin: 0;
    padding: 0;
}

.top-controls-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    position: relative;
}



/* --- APP FOOTER (Visible uniquement sur Hub) --- */
.app-footer {
    margin-top: 50px;
    background: linear-gradient(180deg, rgba(16, 22, 36, 0.95) 0%, rgba(10, 14, 23, 0.98) 100%);
    border: 1px solid rgba(78, 204, 163, 0.25);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(78, 204, 163, 0.2);
    padding: 35px 30px 20px 30px;
    color: #ced4da;
}

.footer-container {
    width: 100%;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-bottom: 25px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-title {
    color: #4ecca3;
    font-size: 1.05em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 8px 0;
    border-bottom: 1px solid rgba(78, 204, 163, 0.2);
    padding-bottom: 6px;
}

.footer-desc {
    font-size: 0.85em;
    line-height: 1.5;
    opacity: 0.8;
    margin: 0;
}

.footer-version {
    font-size: 0.75em;
    color: #4ecca3;
    opacity: 0.8;
    font-weight: 600;
    margin-top: 5px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-link {
    color: #e9ecef;
    text-decoration: none;
    font-size: 0.88em;
    transition: all 0.2s ease;
    display: inline-block;
    opacity: 0.85;
    cursor: pointer;
}

.footer-link:hover {
    color: #4ecca3;
    transform: translateX(4px);
    opacity: 1;
}

.footer-link.faq-highlight {
    color: #4ecca3;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(78, 204, 163, 0.4);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 15px;
    text-align: center;
    font-size: 0.8em;
    opacity: 0.6;
}

/* --- FAQ SCREEN STYLES --- */
.faq-container {
    max-width: 960px;
    margin: 0 auto 50px auto;
    background: linear-gradient(180deg, rgba(22, 33, 62, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
    border: 2px solid rgba(78, 204, 163, 0.35);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7), inset 0 0 20px rgba(0, 0, 0, 0.5);
    padding: 30px;
}

.faq-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid rgba(78, 204, 163, 0.3);
    padding-bottom: 20px;
    margin-bottom: 30px;
    gap: 20px;
}

.faq-header-bar h2 {
    margin: 0 0 6px 0;
    color: #4ecca3;
    font-size: 1.8em;
    text-shadow: 0 0 12px rgba(78, 204, 163, 0.3);
    text-align: left;
}

.faq-subtitle {
    margin: 0;
    font-size: 0.95em;
    color: #ced4da;
    opacity: 0.85;
}

.faq-section {
    margin-bottom: 35px;
}

.faq-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(78, 204, 163, 0.2);
}

.faq-section-icon {
    font-size: 1.4em;
}

.faq-section-header h3 {
    margin: 0;
    font-size: 1.25em;
    color: #4ecca3;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.faq-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(78, 204, 163, 0.3) 50%, transparent 100%);
    margin: 35px 0;
}

/* --- DIALOGUE ROWS & BUBBLES --- */
.dialogue-row {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 28px;
    animation: fadeIn 0.4s ease-out;
}

.dialogue-adventurer {
    flex-direction: row;
    justify-content: flex-start;
}

.dialogue-neo {
    flex-direction: row;
    justify-content: flex-end;
}

.dialogue-avatar {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 140px;
}

.avatar-img {
    width: 130px;
    height: 130px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.7));
    transition: transform 0.25s ease;
}

.dialogue-row:hover .avatar-img {
    transform: scale(1.06);
}

.avatar-name {
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 6px;
    padding: 3px 10px;
    border-radius: 10px;
}

.dialogue-adventurer .avatar-name {
    color: #ffd166;
    background: rgba(255, 209, 102, 0.15);
    border: 1px solid rgba(255, 209, 102, 0.3);
}

.dialogue-neo .avatar-name {
    color: #4ecca3;
    background: rgba(78, 204, 163, 0.15);
    border: 1px solid rgba(78, 204, 163, 0.3);
}

.dialogue-bubble {
    position: relative;
    padding: 16px 22px;
    border-radius: 12px;
    max-width: 74%;
    font-size: 0.95em;
    line-height: 1.6;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.dialogue-bubble p {
    margin: 0 0 10px 0;
}

.dialogue-bubble p:last-child {
    margin-bottom: 0;
}

/* Bulle Aventurier (Question) */
.adventurer-bubble {
    background: linear-gradient(135deg, rgba(15, 52, 96, 0.95) 0%, rgba(22, 33, 62, 0.95) 100%);
    border: 1.5px solid rgba(255, 209, 102, 0.45);
    color: #f8f9fa;
    border-bottom-left-radius: 2px;
}

.adventurer-bubble p {
    font-size: 1.05em;
    font-weight: 500;
    color: #fff3bf;
}

/* Bulle Neo (Réponse) */
.neo-bubble {
    background: linear-gradient(135deg, rgba(16, 26, 48, 0.95) 0%, rgba(26, 26, 46, 0.98) 100%);
    border: 1.5px solid rgba(78, 204, 163, 0.5);
    color: #e9ecef;
    border-bottom-right-radius: 2px;
}

.neo-bubble strong {
    color: #4ecca3;
    font-weight: 700;
}

.neo-bubble em {
    color: #ffd166;
    font-style: italic;
}

.contact-bubble {
    border-color: #e94560;
    background: linear-gradient(135deg, rgba(30, 20, 40, 0.95) 0%, rgba(22, 33, 62, 0.98) 100%);
}

.contact-bubble strong {
    color: #ff6b81;
}

.faq-footer-actions {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    padding-top: 25px;
    border-top: 1px solid rgba(78, 204, 163, 0.25);
}

/* Responsive Mobile FAQ */
@media (max-width: 768px) {
    .faq-container {
        padding: 18px 12px;
    }

    .faq-header-bar {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .faq-header-bar h2 {
        text-align: center;
        font-size: 1.4em;
    }

    .dialogue-row {
        gap: 10px;
        margin-bottom: 20px;
    }

    .dialogue-avatar {
        width: 65px;
    }

    .avatar-img {
        width: 60px;
        height: 60px;
    }

    .dialogue-bubble {
        max-width: 78%;
        padding: 12px 14px;
        font-size: 0.9em;
    }
}

/* --- BOUTON FAQ DU HUB --- */
.hub-left {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.btn-faq-hub {
    margin-top: 15px !important;
    background: linear-gradient(135deg, rgba(22, 33, 62, 0.95) 0%, rgba(15, 52, 96, 0.9) 100%) !important;
    color: #4ecca3 !important;
    border: 1.5px solid #4ecca3 !important;
    border-radius: 8px;
    padding: 14px 20px;
    font-weight: 700;
    font-size: 1em;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), 0 0 10px rgba(78, 204, 163, 0.15);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-faq-hub:hover {
    background: linear-gradient(135deg, #16213e 0%, #0f3460 100%) !important;
    color: #ffffff !important;
    border-color: #5cfbca !important;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(78, 204, 163, 0.4), 0 0 15px rgba(78, 204, 163, 0.3);
}

.btn-faq-hub:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* --- EFFET DU TITRE : POUSSIÈRES ARCANIQUES FLOTTANTES --- */
.mote {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #4ecca3;
    box-shadow: 0 0 8px #4ecca3, 0 0 12px #5cfbca;
    pointer-events: none;
    opacity: 0;
    z-index: 5;
    animation: floatMote 4.2s ease-in-out infinite;
}

.mote-1 { bottom: 8%; left: 16%; animation-delay: 0s; width: 3px; height: 3px; }
.mote-2 { bottom: 12%; left: 34%; animation-delay: 0.8s; background: #ffd166; box-shadow: 0 0 8px #ffd166; width: 4px; height: 4px; }
.mote-3 { bottom: 6%; left: 54%; animation-delay: 1.6s; width: 4px; height: 4px; }
.mote-4 { bottom: 10%; right: 32%; animation-delay: 2.3s; background: #ffffff; width: 3px; height: 3px; }
.mote-5 { bottom: 7%; right: 15%; animation-delay: 3s; width: 4px; height: 4px; }
.mote-6 { bottom: 15%; left: 72%; animation-delay: 1.2s; background: #5cfbca; width: 3px; height: 3px; }

@keyframes floatMote {
    0% {
        transform: translateY(8px) translateX(0);
        opacity: 0;
    }
    20% {
        opacity: 0.85;
    }
    60% {
        opacity: 0.7;
        transform: translateY(-40px) translateX(8px);
    }
    100% {
        transform: translateY(-80px) translateX(15px);
        opacity: 0;
    }
}

/* ======================================================== */
/* --- STYLES DU SÉLECTEUR D'ONGLETS DU MODE DE CRÉATION --- */
/* ======================================================== */

.creation-header {
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(78, 204, 163, 0.25);
}

.creation-mode-tabs-wrapper {
    width: 100%;
    margin-bottom: 24px;
    border-bottom: 2px solid rgba(78, 204, 163, 0.35);
}

.creation-mode-tabs {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    width: 100%;
    margin-bottom: -2px; /* Assure la continuité avec la bordure inférieure pour l'onglet actif */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(78, 204, 163, 0.4) transparent;
}

.creation-mode-tabs::-webkit-scrollbar {
    height: 4px;
}

.creation-mode-tabs::-webkit-scrollbar-thumb {
    background: rgba(78, 204, 163, 0.4);
    border-radius: 4px;
}

.creation-tab-btn {
    flex: 1 1 0;
    min-width: 140px;
    background: rgba(10, 15, 26, 0.7);
    border: 1px solid rgba(78, 204, 163, 0.22);
    border-bottom: 2px solid rgba(78, 204, 163, 0.35);
    border-radius: 8px 8px 0 0;
    color: #94a3b8;
    padding: 12px 14px;
    font-size: 0.92em;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    transition: all 0.2s ease;
    outline: none;
    position: relative;
    user-select: none;
}

.creation-tab-icon {
    font-size: 1.15em;
    line-height: 1;
}

.creation-tab-text {
    line-height: 1.2;
}

.creation-tab-btn:hover {
    background: rgba(78, 204, 163, 0.1);
    color: #f1f5f9;
    border-color: rgba(78, 204, 163, 0.45);
}

.creation-tab-btn.active {
    background: #16213e; /* Identique au fond du lobby-container */
    color: #4ecca3;
    font-weight: 700;
    border: 1px solid #4ecca3;
    border-bottom: 2px solid #16213e; /* Ouvre l'onglet sur le contenu */
    box-shadow: 0 -3px 12px rgba(78, 204, 163, 0.22);
    z-index: 2;
}

.creation-tab-btn.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #4ecca3;
    box-shadow: 0 0 8px rgba(78, 204, 163, 0.8);
    border-radius: 8px 8px 0 0;
}

@media (max-width: 768px) {
    .creation-tab-btn {
        min-width: 125px;
        padding: 10px 8px;
        font-size: 0.84em;
        gap: 5px;
    }
}

/* Conteneur d'information des modes en préparation */
.coming-soon-mode-box {
    margin: 20px 0;
    padding: 35px 22px;
    background: rgba(13, 17, 23, 0.75);
    border: 1px solid rgba(78, 204, 163, 0.3);
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    animation: fadeInOptions 0.25s ease forwards;
}

.coming-soon-icon {
    font-size: 2.3em;
    margin-bottom: 12px;
}

.coming-soon-discord-link {
    color: #4ecca3;
    text-decoration: underline;
    font-weight: bold;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

.coming-soon-discord-link:hover {
    color: #7ef2cd;
    text-shadow: 0 0 8px rgba(78, 204, 163, 0.6);
}

/* Lignes et conteneurs du Mode Avancé */
.advanced-creation-box {
    margin: 12px 0;
    padding: 14px 16px;
    background: rgba(13, 17, 23, 0.65);
    border: 1px solid rgba(78, 204, 163, 0.25);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: fadeInOptions 0.25s ease forwards;
}

@keyframes fadeInOptions {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.advanced-param-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.advanced-label {
    display: block;
    font-size: 1.02em;
    font-weight: bold;
    color: #4ecca3;
    letter-spacing: 0.3px;
    margin-bottom: 2px;
}

.advanced-row {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 14px;
    align-items: flex-start; /* Collés en haut au même niveau */
}

@media (max-width: 720px) {
    .advanced-row {
        grid-template-columns: 1fr;
    }
}

.advanced-select-col {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.advanced-select {
    width: 100%;
    padding: 7px 10px;
    font-size: 0.86em;
    font-weight: 500;
    background: rgba(22, 27, 34, 0.95);
    color: #fff;
    border: 1px solid rgba(78, 204, 163, 0.4);
    border-radius: 6px;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
    height: 38px;
}

.advanced-select:focus {
    border-color: #4ecca3;
    box-shadow: 0 0 10px rgba(78, 204, 163, 0.3);
}

.advanced-select option {
    background: #161b22;
    color: #fff;
    padding: 8px;
}

.advanced-info-col {
    display: flex;
    align-items: flex-start;
}

.param-info-box {
    width: 100%;
    background: rgba(22, 27, 34, 0.85);
    border: 1px solid rgba(78, 204, 163, 0.2);
    border-left: 3px solid #4ecca3;
    border-radius: 6px;
    padding: 9px 13px;
    font-size: 0.82em;
    line-height: 1.45;
    color: #c9d1d9;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
    margin-top: 0;
}

.param-info-box .info-title {
    font-weight: bold;
    color: #ffd166;
    margin-bottom: 3px;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.param-info-box .info-ideal {
    color: #4ecca3;
    font-weight: 600;
    margin-top: 3px;
}

/* Boutons CTA Portail (FAQ, Ulule, Instagram) */
.portal-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    padding: 12px 24px;
    font-size: 0.98em;
    font-weight: bold;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: all 0.25s ease-in-out;
}

/* 1. FAQ : Orange */
.portal-cta-faq {
    color: #ff9f43;
    background: rgba(22, 27, 34, 0.9);
    border: 1px solid rgba(255, 159, 67, 0.6);
}
.portal-cta-faq:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 159, 67, 0.45) !important;
    background: rgba(255, 159, 67, 0.15) !important;
    color: #ffb86c !important;
}

/* 2. Ulule : Vert clair et blanc */
.portal-cta-ulule {
    color: #ffffff;
    background: rgba(22, 27, 34, 0.9);
    border: 1px solid #2ed573;
    box-shadow: 0 4px 15px rgba(46, 213, 115, 0.25);
}
.portal-cta-ulule .ulule-highlight {
    color: #2ed573;
}
.portal-cta-ulule:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 213, 115, 0.5) !important;
    background: rgba(46, 213, 115, 0.18) !important;
    border-color: #2ed573;
    color: #ffffff !important;
}

/* 3. Instagram : Dégradé violet-rouge-jaune */
.portal-cta-insta {
    color: #ffffff;
    background: linear-gradient(45deg, rgba(240, 148, 51, 0.9) 0%, rgba(230, 104, 60, 0.9) 25%, rgba(220, 39, 67, 0.9) 50%, rgba(204, 35, 102, 0.9) 75%, rgba(188, 24, 136, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 18px rgba(220, 39, 67, 0.35);
}
.portal-cta-insta:hover {
    transform: translateY(-2px);
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%) !important;
    box-shadow: 0 6px 25px rgba(220, 39, 67, 0.6) !important;
    border-color: #ffffff;
    color: #ffffff !important;
}

