/* ===== LAYOUT - HEADER, NAVIGATION, SYSTÈME DE VUES ===== */

/* ===== MODE PLEIN ÉCRAN ===== */

.fullscreen-mode {
    background: var(--bg-primary) !important;
    overflow: hidden;
}

.fullscreen-mode .app-header {
    z-index: 9999;
}

.fullscreen-mode .container {
    height: 100vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.fullscreen-mode #gameView .container {
    padding: var(--spacing-lg);
}

.fullscreen-mode .word-display {
    font-size: 3.5rem;
}

.fullscreen-mode .hangman-container {
    padding: var(--spacing-xl);
}

.fullscreen-mode #hangman {
    max-width: 350px;
    max-height: 400px;
}

/* Animation d'entrée en plein écran */
@keyframes fullscreenEnter {
    from {
        transform: scale(0.95);
        opacity: 0.8;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.fullscreen-mode .view.active {
    animation: fullscreenEnter 0.3s ease-out;
}

/* Header avec menu hamburger */
.app-header {
    background: var(--bg-secondary);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-primary);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-xl); /* Réduit de ~20% (md → sm) */
    max-width: 1200px;
    margin: 0 auto;
    position: relative; /* Pour permettre le centrage absolu */
}

/* Actions à gauche du hamburger */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex: 1; /* Prend l'espace disponible à gauche */
}

/* Zone centrale du header */
.header-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
}

.header-btn {
    background: rgba(243, 156, 18, 0.1);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-round);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.header-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.4);
}

.header-btn:active {
    transform: translateY(0);
}

/* Bouton centré spécial */
.header-btn-center {
    background: rgba(243, 156, 18, 0.2);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
    width: auto;
    height: auto;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-lg);
    min-width: 90px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.header-btn-center:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(243, 156, 18, 0.4);
}

/* Boutons conditionnels cachés par défaut, visibles seulement en jeu */
#restartGameHeaderBtn,
#nextWordHeaderBtn {
    display: none;
}

/* Menu hamburger */
.hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

.hamburger-menu span {
    width: 30px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
    transition: all var(--transition-normal) linear;
    position: relative;
    transform-origin: 1px;
}

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

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg);
}

/* Menu de navigation */
.nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(60, 60, 60, 0.98);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-primary);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.nav-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.nav-menu li {
    border-bottom: 1px solid rgba(95, 99, 104, 0.2);
}

.nav-menu li:last-child {
    border-bottom: none;
}

/* Séparateur dans le menu */
.nav-separator {
    height: 1px;
    background: var(--border-primary);
    margin: var(--spacing-xs) var(--spacing-lg);
    border: none;
}

.nav-link {
    display: block;
    padding: var(--spacing-md) var(--spacing-xl);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.1rem;
    transition: all var(--transition-normal);
}

.nav-link:hover,
.nav-link.active {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

/* Version discrète en bas du menu */
.nav-version {
    padding: var(--spacing-sm) var(--spacing-lg);
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.6;
    border-top: 1px solid rgba(95, 99, 104, 0.1);
    margin-top: auto;
}

/* ===== SYSTÈME DE VUES ===== */

/* Conteneur principal des vues */
.view {
    display: none;
    min-height: calc(100vh - 80px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Pour un scroll fluide sur iOS */
}

.view.active {
    display: block;
    animation: fadeIn var(--transition-normal) ease;
}

.container {
    background: transparent;
    backdrop-filter: none;
    border-radius: 0;
    padding: var(--spacing-xl);
    box-shadow: none;
    border: none;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

/* Responsive géré dans responsive.css */