:root {
    color-scheme: dark;
    font-family: "Baloo 2", "Nunito", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #0d1424;
    color: #e8f2ff;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: radial-gradient(circle at top, rgba(110, 170, 255, 0.35), transparent 55%) #0d1424;
    color: #e8f2ff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(102, 192, 255, 0.2) 0, transparent 55%),
        radial-gradient(circle at 80% 0, rgba(80, 166, 255, 0.18) 0, transparent 45%),
        radial-gradient(circle at 10% 80%, rgba(126, 215, 255, 0.18) 0, transparent 45%),
        radial-gradient(circle at 80% 80%, rgba(76, 238, 227, 0.15) 0, transparent 50%);
}

a {
    color: #77d0ff;
}

.container {
    width: min(1600px, 95vw);
    margin: 0 auto;
    padding: 1.75rem 0;
}

.container.daily-member-container {
    width: 100%;
    max-width: 100%;
    padding: 0.75rem 0.5rem 1.75rem;
    margin: 0;
}

.container.admin-container {
    width: 100% !important;
    max-width: 100% !important;
}

.app-header,
.app-footer {
    background: rgba(6, 9, 18, 0.9);
    border-bottom: 2px solid rgba(119, 208, 255, 0.25);
    position: relative;
}

.app-header::after {
    content: "";
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 100%;
    height: 12px;
    background-image: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 10px,
        rgba(119, 208, 255, 0.18) 10px,
        rgba(119, 208, 255, 0.18) 20px
    );
}

.app-footer {
    border-bottom: none;
    border-top: 2px solid rgba(119, 208, 255, 0.25);
    margin-top: auto;
    text-align: center;
}

.app-header h1 {
    font-family: "Baloo 2", cursive;
    font-size: 2.8rem;
    color: #9de1ff;
    margin-bottom: 0.2rem;
    text-align: center;
}

.app-header p {
    color: #b7cbff;
    font-size: 1.1rem;
    text-align: center;
    max-width: 720px;
    margin: 0.35rem auto 0;
}

.app-header__title-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    margin-bottom: 10px;
    gap: 0.5rem;
}

.app-header__title {
    margin: 0;
    text-align: center;
    min-width: 0;
}

.app-header__gouv-wrap {
    text-align: right;
    min-width: 0;
}

.app-header__gouv {
    font-size: 0.75em;
    color: #9de1ff;
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

.app-header__gouv:hover,
.app-header__gouv:focus-visible {
    opacity: 1;
    text-decoration: underline;
    outline: none;
}

.app-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    margin-top: 1.25rem;
    font-weight: 600;
    font-size: 1rem;
}

/* Libellés courts : visibles uniquement sur petit écran (voir media query) */
.app-nav__compact {
    display: none;
}

.app-nav a {
    color: #f0f9ff;
    text-decoration: none;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(125, 211, 252, 0.5);
    background: rgba(14, 116, 144, 0.35);
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease;
    flex-shrink: 0;
}

.app-nav a:hover,
.app-nav a:focus-visible {
    color: #ffffff;
    background: rgba(56, 189, 248, 0.35);
    border-color: rgba(186, 230, 253, 0.85);
    box-shadow:
        0 0 0 2px rgba(56, 189, 248, 0.25),
        0 2px 8px rgba(0, 0, 0, 0.25);
    outline: none;
}

.app-nav--terrier {
    padding-bottom: 2px;
}

/* Deuxième rangée : teinte distincte (lisible sur fond sombre) */
.app-nav-pokemon {
    margin-top: 0.75rem;
    font-size: 0.9em;
}

.app-nav-pokemon a {
    font-size: 0.9em;
    padding: 0.3rem 0.75rem;
    color: #faf5ff;
    border-color: rgba(196, 181, 253, 0.55);
    background: rgba(91, 33, 182, 0.35);
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.app-nav-pokemon a:hover,
.app-nav-pokemon a:focus-visible {
    color: #ffffff;
    background: rgba(124, 58, 237, 0.45);
    border-color: rgba(221, 214, 254, 0.9);
    box-shadow:
        0 0 0 2px rgba(167, 139, 250, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.25);
}

.guess-panel {
    margin-top: 2rem;
    background: rgba(15, 23, 44, 0.9);
    border-radius: 18px;
    padding: 1.5rem;
    border: 2px solid rgba(119, 208, 255, 0.35);
    box-shadow: 0 25px 50px rgba(2, 9, 24, 0.65);
}

.input-group {
    display: flex;
    gap: 0.75rem;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="time"],
input[type="date"],
select,
textarea {
    flex: 1;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    border: 2px solid rgba(119, 208, 255, 0.35);
    background: rgba(9, 13, 28, 0.9);
    color: inherit;
    font-size: 1rem;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    font-family: inherit;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #77d0ff;
    box-shadow: 0 0 0 3px rgba(119, 208, 255, 0.35);
}

button,
.button-secondary {
    background: linear-gradient(135deg, #4cb8ff, #2d53ff);
    color: #eef6ff;
    border: none;
    border-radius: 14px;
    padding: 0.85rem 1.6rem;
    cursor: pointer;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: linear-gradient(135deg, #48ffe0, #51a2ff);
    color: #08212b;
}

button:hover,
.button-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(18, 93, 255, 0.35);
}

.suggestions {
    margin-top: 0.75rem;
    background: rgba(7, 10, 22, 0.95);
    border: 2px solid rgba(119, 208, 255, 0.35);
    border-radius: 18px;
    box-shadow: 0 15px 35px rgba(1, 4, 12, 0.55);
    max-height: 250px;
    overflow-y: auto;
    display: none;
}

.suggestions.visible {
    display: block;
}

.suggestion-item {
    width: 100%;
    background: transparent;
    border: none;
    color: inherit;
    padding: 0.85rem 1rem;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.suggestion-item + .suggestion-item {
    border-top: 1px dashed rgba(119, 208, 255, 0.25);
}

.suggestion-item:hover,
.suggestion-item.selected {
    background: rgba(119, 208, 255, 0.15);
}

.suggestion-item.selected {
    background: rgba(119, 208, 255, 0.25);
    outline: 2px solid rgba(119, 208, 255, 0.5);
    outline-offset: -2px;
}

.suggestion-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(119, 208, 255, 0.6);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.75rem;
    background: rgba(6, 9, 22, 0.95);
    border-radius: 20px;
    overflow: hidden;
    border: 3px solid rgba(119, 208, 255, 0.25);
    box-shadow: 0 30px 55px rgba(0, 0, 0, 0.6);
}

th,
td {
    padding: 0.85rem 0.7rem;
    text-align: center;
    border-bottom: 1px dashed rgba(119, 208, 255, 0.2);
    transition: opacity 0.3s ease, transform 0.3s ease;
    font-size: 0.92rem;
}

th {
    background: linear-gradient(135deg, rgba(119, 208, 255, 0.18), transparent);
    font-weight: 600;
    color: #e8f2ff;
    letter-spacing: 0.03em;
}

tr:last-child td {
    border-bottom: none;
}

.table-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(119, 208, 255, 0.4);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.match {
    background: rgba(66, 213, 198, 0.22);
    color: #86f5df;
}

.diff {
    background: rgba(255, 99, 132, 0.2);
    color: #ff9fb4;
}

.higher,
.lower {
    background: rgba(255, 99, 132, 0.2);
    color: #ff9fb4;
}

.unknown {
    background: rgba(63, 83, 124, 0.4);
    color: #c1d3ff;
}

.status-hint {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(226, 237, 255, 0.65);
    margin-top: 0.35rem;
}

.cell-hidden {
    opacity: 0;
    transform: scale(0.95);
}

.alert {
    padding: 1rem 1.4rem;
    border-radius: 16px;
    margin-top: 1rem;
    border: 2px solid transparent;
}

.alert-error {
    background: rgba(80, 143, 255, 0.15);
    border-color: rgba(80, 143, 255, 0.6);
    color: #c7dcff;
}

.alert-success {
    background: rgba(66, 213, 198, 0.22);
    border-color: rgba(66, 213, 198, 0.6);
    color: #d3fff5;
}

#victory-message {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 40px rgba(66, 213, 198, 0.4);
    animation: slideDown 0.5s ease-out;
}

#guess-form-wrapper.hidden {
    display: none;
}

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

.hidden {
    display: none;
}

.hint {
    font-size: 0.95rem;
    color: #b7cbff;
}

.admin-body {
    background: radial-gradient(circle at top, rgba(29, 50, 99, 0.6), rgba(6, 9, 18, 0.95));
}

.admin-container {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 1.75rem;
    padding-right: 1.75rem;
}

.admin-layout {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 2rem;
    align-items: start;
    width: 100%;
    max-width: 100%;
}

@media (max-width: 1200px) {
    .admin-layout {
        grid-template-columns: 1fr !important;
    }
    
    .admin-stats-column {
        order: -1; /* Afficher les stats en premier sur mobile */
    }
}

@media (max-width: 1000px) {
    .admin-layout {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 900px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }
}

.admin-column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.admin-stats-column {
    position: sticky;
    top: 2rem;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.stat-box {
    background: rgba(15, 23, 44, 0.9);
    padding: 1rem;
    border-radius: 12px;
    border: 2px solid rgba(119, 208, 255, 0.25);
    text-align: center;
}

.stat-box h3 {
    margin: 0 0 0.5rem 0;
    font-size: 0.85rem;
    color: #9de1ff;
    font-weight: 600;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #77d0ff;
    margin: 0;
}

.stat-value.stat-success {
    color: #5fe7a5;
}

.stats-lists {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 1200px) {
    .stats-lists {
        grid-template-columns: 1fr;
    }
}

.stats-list-item h3 {
    color: #9de1ff;
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.stats-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.stats-list li {
    background: rgba(15, 23, 44, 0.9);
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    border: 1px solid rgba(119, 208, 255, 0.25);
}

.stats-list li strong {
    color: #9de1ff;
    display: block;
    margin-bottom: 0.25rem;
}

.stats-list li small {
    color: #b7cbff;
    font-size: 0.85rem;
}

.card {
    background: rgba(8, 12, 26, 0.95);
    border: 2px solid rgba(119, 208, 255, 0.25);
    border-radius: 20px;
    padding: 1.75rem;
    margin-bottom: 2rem;
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.55);
}

.card form {
    display: grid;
    gap: 1rem;
}

.table-wrapper {
    overflow-x: auto;
    margin-top: 1.75rem;
    border-radius: 20px;
    width: 100%;
}

@media (min-width: 1400px) {
    .table-wrapper {
        overflow-x: visible;
    }
    
    th,
    td {
        padding: 0.9rem 0.8rem;
        font-size: 0.95rem;
    }
}

.table-wrapper table {
    margin-top: 0;
}

.table-actions {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.table-actions form {
    margin: 0;
}

.danger {
    background: linear-gradient(135deg, #ff5e7e, #2d53ff);
    color: #ffeef3;
}

.preview img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(119, 208, 255, 0.35);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
}

.auth-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
    min-height: 100vh;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Styles pour le mode Description */
.description-display {
    background: rgba(15, 23, 44, 0.9);
    border-radius: 18px;
    padding: 1.5rem;
    border: 2px solid rgba(119, 208, 255, 0.35);
    margin-bottom: 1.5rem;
    box-shadow: 0 20px 40px rgba(2, 9, 24, 0.65);
}

.description-display h2 {
    color: #9de1ff;
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.description-text {
    color: #b7cbff;
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
}

.guess-results-description {
    margin-top: 2rem;
}

.guess-results-description h3 {
    color: #9de1ff;
    margin-bottom: 1rem;
}

#wrong-guesses-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.wrong-guess-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(15, 23, 44, 0.9);
    border: 2px solid rgba(255, 105, 132, 0.35);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    color: #ff97b0;
}

.wrong-guess-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 105, 132, 0.5);
}

.wrong-guess-pseudo {
    font-weight: 600;
}

.correct-guess-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(15, 23, 44, 0.9);
    border: 2px solid rgba(66, 213, 198, 0.6);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    color: #5fe7a5;
}

.correct-guess-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(66, 213, 198, 0.8);
}

.correct-guess-pseudo {
    font-weight: 600;
}

/* Styles pour le mode Image */
.image-display {
    background: rgba(15, 23, 44, 0.9);
    border-radius: 18px;
    padding: 1.5rem;
    border: 2px solid rgba(119, 208, 255, 0.35);
    margin-bottom: 1.5rem;
    box-shadow: 0 20px 40px rgba(2, 9, 24, 0.65);
    text-align: center;
}

.image-display h2 {
    color: #9de1ff;
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.blurred-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    max-width: 500px;
    border-radius: 18px;
    overflow: hidden;
    border: 3px solid rgba(119, 208, 255, 0.35);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    background: rgba(8, 12, 26, 0.5);
}

.blurred-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    filter: blur(50px);
    transition: filter 0.5s ease-out;
}

.guess-results-image {
    margin-top: 2rem;
}

.guess-results-image h3 {
    color: #9de1ff;
    margin-bottom: 1rem;
}

.guess-results,
.guess-results-description,
.guess-results-image {
    margin-bottom: 3rem;
}

/* Styles pour le mode Daily Member */
.member-game-panel {
    margin-top: 0.5rem;
    margin-left: 0;
    margin-right: 0;
    background: rgba(15, 23, 44, 0.9);
    border-radius: 18px;
    padding: 1rem 1.5rem;
    border: 2px solid rgba(119, 208, 255, 0.35);
    box-shadow: 0 25px 50px rgba(2, 9, 24, 0.65);
    text-align: center;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.start-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    gap: 0.75rem;
    position: relative;
    padding: 0.5rem 0;
    margin-top: 0;
}

.start-screen .game-header.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.start-screen .game-header:not(.hidden) {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: fadeIn 0.5s ease-in;
    display: flex !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.question-mark {
    font-size: 5rem;
    color: #9de1ff;
    font-weight: bold;
    text-shadow: 0 0 30px rgba(157, 225, 255, 0.5);
    animation: pulse 2s ease-in-out infinite;
    margin: 0;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.start-button {
    background: linear-gradient(135deg, #4cb8ff, #2d53ff);
    color: #eef6ff;
    border: none;
    border-radius: 14px;
    padding: 0.9rem 2rem;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0;
}

.start-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(18, 93, 255, 0.4);
}

.game-screen {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.game-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 1rem 1.5rem;
    background: rgba(15, 23, 44, 0.6);
    border-radius: 14px;
    border: 2px solid rgba(119, 208, 255, 0.25);
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.member-avatar-container-small {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(119, 208, 255, 0.5);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.member-avatar-small {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-pseudo-small {
    font-size: 1.2rem;
    color: #9de1ff;
    margin: 0;
    font-weight: 600;
    flex-shrink: 0;
}

.timer-container-inline {
    text-align: center;
    flex-shrink: 0;
}

.timer-container {
    text-align: center;
    margin-bottom: 1rem;
}

.timer {
    font-size: 2rem;
    font-weight: bold;
    color: #9de1ff;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 20px rgba(157, 225, 255, 0.5);
    white-space: nowrap;
}

.timer-warning {
    color: #ff6b6b;
    animation: blink 1s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.member-reveal {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.member-reveal.hidden {
    display: none !important;
}

.start-screen .game-header {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    z-index: 10;
}

.start-screen .game-header.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.start-screen .game-header:not(.hidden) {
    display: flex !important;
    animation: fadeIn 0.5s ease-in;
}

.member-avatar-container {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(119, 208, 255, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.member-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-pseudo {
    font-size: 2rem;
    color: #9de1ff;
    margin: 0;
    font-weight: 600;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.info-card {
    background: rgba(9, 13, 28, 0.9);
    border: 2px solid rgba(119, 208, 255, 0.3);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    min-height: 140px;
    justify-content: center;
}

.info-card:hover {
    border-color: rgba(119, 208, 255, 0.6);
    box-shadow: 0 8px 20px rgba(119, 208, 255, 0.2);
}

.info-card.discovered {
    background: rgba(66, 213, 198, 0.15);
    border-color: rgba(66, 213, 198, 0.6);
}

.info-card.incorrect {
    background: rgba(255, 99, 132, 0.15);
    border-color: rgba(255, 99, 132, 0.6);
}

.info-icon {
    font-size: 2rem;
}

.info-label {
    font-size: 0.9rem;
    color: #b7cbff;
    font-weight: 600;
    text-align: center;
}

.info-select {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    border: 2px solid rgba(119, 208, 255, 0.35);
    background: rgba(6, 9, 22, 0.9);
    color: #e8f2ff;
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.info-select:focus {
    outline: none;
    border-color: #77d0ff;
    box-shadow: 0 0 0 3px rgba(119, 208, 255, 0.35);
}

.info-select:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

.info-select option {
    background: rgba(6, 9, 22, 0.95);
    color: #e8f2ff;
    padding: 0.5rem;
}

.validate-container {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.global-validate-button {
    padding: 1rem 3rem;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #4cb8ff, #2d53ff);
    color: #eef6ff;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.global-validate-button:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(18, 93, 255, 0.4);
}

.global-validate-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(76, 184, 255, 0.3);
}

.end-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    order: -1; /* Afficher en haut */
}

.end-screen .global-validate-button {
    margin: 0;
}

.end-message {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    padding: 1.5rem;
    border-radius: 16px;
}

.end-message.success {
    color: #5fe7a5;
    background: rgba(66, 213, 198, 0.2);
    border: 2px solid rgba(66, 213, 198, 0.6);
}

.end-message.timeout {
    color: #ff9fb4;
    background: rgba(255, 99, 132, 0.2);
    border: 2px solid rgba(255, 99, 132, 0.6);
}

.results-summary {
    text-align: center;
    color: #b7cbff;
    font-size: 1.2rem;
}

.results-summary strong {
    color: #9de1ff;
}

.share-discord-button {
    background: linear-gradient(135deg, #5865F2, #4752C4);
    color: #ffffff;
    border: none;
    border-radius: 14px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.share-discord-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(88, 101, 242, 0.4);
}

@media (max-width: 760px) {
    .question-mark {
        font-size: 5rem;
    }
    
    .start-button {
        padding: 1rem 2rem;
        font-size: 1.2rem;
    }
    
    .timer {
        font-size: 1.8rem;
    }
    
    .game-header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .member-avatar-container-small {
        width: 60px;
        height: 60px;
    }
    
    .member-pseudo-small {
        font-size: 1.2rem;
    }
    
    .member-avatar-container {
        width: 150px;
        height: 150px;
    }
    
    .member-pseudo {
        font-size: 1.5rem;
    }
    
    .info-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.75rem;
    }
    
    .info-card {
        padding: 1rem 0.75rem;
        min-height: 100px;
    }
    
    .end-message {
        font-size: 1.5rem;
    }
}

@media (max-width: 900px) {
    .app-header h1,
    .app-header__title {
        font-size: 2.2rem;
    }

    .app-header p {
        font-size: 1rem;
    }
}

@media (max-width: 760px) {
    body {
        font-size: 15px;
    }

    .container {
        width: 100%;
        padding: 1.25rem;
    }

    .app-header__title-row {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .app-header__title-spacer {
        display: none;
    }

    .app-header__gouv-wrap {
        text-align: center;
        order: 3;
    }

    .app-header__title {
        order: 2;
    }

    /* Lien secondaire : une ligne, pas de débordement horizontal */
    .app-header__gouv {
        white-space: normal;
        font-size: 0.72rem;
        line-height: 1.3;
        display: inline-block;
        max-width: 100%;
    }

    /* Navigation : bandeau encadré + pills contrastées (scroll horizontal) */
    .app-nav {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        scroll-snap-type: x proximity;
        gap: 0.45rem;
        margin-top: 0.65rem;
        margin-left: 0;
        margin-right: 0;
        padding: 0.55rem 0.5rem;
        font-size: 0.82rem;
        scrollbar-width: thin;
        background: rgba(2, 6, 23, 0.55);
        border: 1px solid rgba(148, 163, 184, 0.4);
        border-radius: 14px;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    }

    .app-nav__sep {
        display: none;
    }

    .app-nav__full {
        display: none;
    }

    .app-nav__compact {
        display: inline;
    }

    .app-nav a {
        padding: 0.48rem 0.7rem;
        scroll-snap-align: start;
        font-size: 0.8rem;
        font-weight: 700;
    }

    .app-nav-pokemon {
        margin-top: 0.45rem;
        font-size: 0.78rem;
        background: rgba(15, 23, 42, 0.65);
        border: 1px solid rgba(167, 139, 250, 0.35);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
        border-radius: 14px;
        padding: 0.55rem 0.5rem;
    }

    .app-nav-pokemon a {
        font-size: 0.76rem;
        font-weight: 700;
    }

    .guess-panel,
    .description-display,
    .image-display {
        padding: 1.25rem;
    }

    .input-group {
        flex-direction: column;
    }

    .input-group input,
    .input-group button {
        width: 100%;
    }

    button,
    .button-secondary {
        padding: 0.85rem 1.1rem;
    }

    table {
        min-width: 900px;
    }

    th,
    td {
        padding: 0.6rem 0.4rem;
        font-size: 0.85rem;
    }

    #wrong-guesses-list {
        flex-direction: column;
    }

    .wrong-guess-item,
    .correct-guess-item {
        width: 100%;
    }

    .blurred-image-container {
        max-width: 100%;
    }
}

/* Styles pour le mode Quiz */
.quiz-panel {
    margin-top: 2rem;
    background: rgba(15, 23, 44, 0.9);
    border-radius: 18px;
    padding: 2rem;
    border: 2px solid rgba(119, 208, 255, 0.35);
    box-shadow: 0 25px 50px rgba(2, 9, 24, 0.65);
}

.global-input-container {
    margin-bottom: 2rem;
}

.guess-input-container {
    position: relative;
    margin-bottom: 2rem;
}

.guess-input {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    background: rgba(15, 23, 44, 0.8);
    border: 2px solid rgba(119, 208, 255, 0.3);
    border-radius: 12px;
    color: #e8f2ff;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.guess-input:focus {
    outline: none;
    border-color: rgba(119, 208, 255, 0.6);
}

.guess-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(15, 23, 44, 0.95);
    border: 2px solid rgba(119, 208, 255, 0.3);
    border-radius: 12px;
    margin-top: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.autocomplete-suggestions.visible {
    display: block;
}

.autocomplete-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: background-color 0.2s ease;
}

.autocomplete-item:hover {
    background: rgba(119, 208, 255, 0.1);
}

.autocomplete-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.questions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.question-card {
    background: rgba(15, 23, 44, 0.6);
    border: 2px solid rgba(119, 208, 255, 0.25);
    border-radius: 14px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.question-card .guess-input-container {
    position: relative;
    margin: 1rem 0;
}

.question-card .guess-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    background: rgba(15, 23, 44, 0.8);
    border: 2px solid rgba(119, 208, 255, 0.3);
    border-radius: 10px;
    color: #e8f2ff;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.question-card .guess-input:focus {
    outline: none;
    border-color: rgba(119, 208, 255, 0.6);
}

.question-card .guess-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.question-card .autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(15, 23, 44, 0.95);
    border: 2px solid rgba(119, 208, 255, 0.3);
    border-radius: 10px;
    margin-top: 0.5rem;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.question-card .autocomplete-suggestions.visible {
    display: block;
}

.question-card.completed {
    border-color: rgba(66, 213, 198, 0.6);
    background: rgba(66, 213, 198, 0.1);
}

.question-header {
    text-align: center;
}

.question-text {
    font-size: 1.3rem;
    color: #9de1ff;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.people-count {
    font-size: 0.9rem;
    color: #77d0ff;
    font-style: italic;
    margin-bottom: 0.5rem;
}

.progress-count {
    font-size: 1rem;
    color: #b7cbff;
    font-weight: 500;
}

.complete-badge {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: rgba(66, 213, 198, 0.2);
    border: 1px solid rgba(66, 213, 198, 0.5);
    border-radius: 8px;
    color: #42d5c6;
    font-size: 0.85rem;
    font-weight: 600;
}

.found-people-section,
.attempts-section {
    margin-top: 1rem;
}

.found-people-section h4,
.attempts-section h4 {
    color: #9de1ff;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.found-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 60px;
}

.found-person {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: rgba(66, 213, 198, 0.15);
    border: 1px solid rgba(66, 213, 198, 0.4);
    border-radius: 8px;
    color: #42d5c6;
    font-weight: 500;
    font-size: 0.9rem;
}

.found-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.attempts-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
}

.no-attempts {
    color: #6b7a99;
    font-size: 0.85rem;
    font-style: italic;
    text-align: center;
    padding: 1rem;
}

.attempt-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
    border: 1px solid;
}

.attempt-item.correct {
    background: rgba(66, 213, 198, 0.1);
    border-color: rgba(66, 213, 198, 0.3);
    color: #42d5c6;
}

.attempt-item.incorrect {
    background: rgba(255, 99, 132, 0.1);
    border-color: rgba(255, 99, 132, 0.3);
    color: #ff6384;
}

.attempt-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.attempt-status {
    margin-left: auto;
    font-weight: bold;
    font-size: 1.1rem;
}

.quiz-results {
    text-align: center;
    margin-top: 2rem;
    padding: 2rem;
    background: rgba(66, 213, 198, 0.1);
    border: 2px solid rgba(66, 213, 198, 0.4);
    border-radius: 12px;
}

.quiz-results.hidden {
    display: none;
}

.results-title {
    font-size: 2rem;
    color: #42d5c6;
    margin-bottom: 1rem;
}

.results-summary {
    color: #b7cbff;
    font-size: 1.1rem;
}

@media (max-width: 1200px) {
    .questions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .questions-grid {
        grid-template-columns: 1fr;
    }
    
    .question-text {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .app-header h1,
    .app-header__title {
        font-size: 1.85rem;
    }

    .guess-panel,
    .description-display,
    .image-display {
        border-radius: 16px;
    }

    .app-nav {
        gap: 0.35rem;
    }

    .app-nav a {
        padding: 0.38rem 0.55rem;
    }
}

/* Styles pour le mode Inversé */
.inverse-main-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.guess-panel {
    background: rgba(15, 23, 44, 0.9);
    border-radius: 18px;
    padding: 2rem;
    border: 2px solid rgba(119, 208, 255, 0.35);
    box-shadow: 0 25px 50px rgba(2, 9, 24, 0.65);
}

.people-list-section {
    background: rgba(15, 23, 44, 0.9);
    border-radius: 18px;
    padding: 2rem;
    border: 2px solid rgba(119, 208, 255, 0.35);
    box-shadow: 0 25px 50px rgba(2, 9, 24, 0.65);
}

.people-list-section h3 {
    color: #77d0ff;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    text-align: center;
}

.people-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.person-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(15, 23, 44, 0.6);
    border: 1px solid rgba(119, 208, 255, 0.2);
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
}

.person-card:hover {
    background: rgba(15, 23, 44, 0.8);
    border-color: rgba(119, 208, 255, 0.4);
    transform: translateY(-2px);
}

.person-card.revealed {
    animation: revealCard 0.5s ease;
}

@keyframes revealCard {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.person-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(119, 208, 255, 0.3);
}

.person-pseudo {
    color: #e8f2ff;
    font-size: 0.9rem;
    text-align: center;
    font-weight: 500;
}

.person-characteristic-result {
    margin-top: 0.5rem;
    padding: 0.5rem;
    border-radius: 8px;
    font-size: 0.85rem;
    text-align: center;
    width: 100%;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.person-characteristic-result.cell-hidden {
    opacity: 0;
    transform: scale(0.8);
}

.person-characteristic-result.match {
    background: rgba(76, 175, 80, 0.25);
    border: 1px solid rgba(76, 175, 80, 0.6);
    color: #81c784;
}

.person-characteristic-result.diff {
    background: rgba(255, 82, 82, 0.2);
    border: 1px solid rgba(255, 82, 82, 0.5);
    color: #ff5252;
}

.person-characteristic-result .result-icon {
    font-size: 1.2rem;
    font-weight: bold;
}

.person-characteristic-result .result-text {
    font-size: 0.75rem;
    opacity: 0.9;
}

/* Styles pour le select dans le mode inversé */
#guess-form label[for="characteristic-select"] {
    display: block;
    color: #77d0ff;
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    text-align: center;
}

#characteristic-select {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    background: rgba(15, 23, 44, 0.8);
    border: 2px solid rgba(119, 208, 255, 0.3);
    border-radius: 12px;
    color: #e8f2ff;
    font-family: inherit;
    transition: border-color 0.2s ease;
    cursor: pointer;
}

#characteristic-select:focus {
    outline: none;
    border-color: rgba(119, 208, 255, 0.6);
}

#characteristic-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#characteristic-select option {
    background: rgba(15, 23, 44, 0.95);
    color: #e8f2ff;
    padding: 0.5rem;
}

#characteristic-select optgroup {
    font-weight: bold;
    color: #77d0ff;
}

/* Styles pour la section des tentatives */
.attempts-section {
    margin-top: 2rem;
    background: rgba(15, 23, 44, 0.9);
    border-radius: 18px;
    padding: 2rem;
    border: 2px solid rgba(119, 208, 255, 0.35);
    box-shadow: 0 25px 50px rgba(2, 9, 24, 0.65);
    width: 50%;
    margin-left: 0;
    margin-right: auto;
}

.attempts-section h3 {
    color: #77d0ff;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    text-align: center;
}

.attempts-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.no-attempts {
    text-align: center;
    color: rgba(232, 242, 255, 0.6);
    font-style: italic;
    padding: 1rem;
}

.attempt-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(15, 23, 44, 0.6);
    border: 1px solid rgba(255, 82, 82, 0.3);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.attempt-item:hover {
    background: rgba(15, 23, 44, 0.8);
    border-color: rgba(255, 82, 82, 0.5);
}

.attempt-label {
    color: #e8f2ff;
    font-weight: 500;
    flex: 1;
}

.attempt-value {
    color: #ff5252;
    font-weight: 600;
    margin: 0 1rem;
    flex: 1;
    text-align: center;
}

.attempt-icon {
    color: #ff5252;
    font-size: 1.2rem;
    font-weight: bold;
}

/* Collapse du formulaire sur mobile */
#guess-form-wrapper.collapsed {
    display: none;
}

#guess-form-wrapper {
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    #guess-form-wrapper.collapsed {
        display: none;
    }
    
    #guess-form-wrapper:not(.collapsed) {
        display: block;
    }
}

.toggle-form-btn {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    background: rgba(119, 208, 255, 0.2);
    border: 2px solid rgba(119, 208, 255, 0.4);
    border-radius: 12px;
    color: #77d0ff;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.toggle-form-btn:hover {
    background: rgba(119, 208, 255, 0.3);
    border-color: rgba(119, 208, 255, 0.6);
}

.toggle-form-btn.hidden {
    display: none;
}

@media (max-width: 768px) {
    .inverse-main-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .people-list {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.75rem;
    }
    
    .person-card {
        padding: 0.75rem;
    }
    
    .person-avatar {
        width: 50px;
        height: 50px;
    }
    
    .attempt-item {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .attempt-value {
        margin: 0;
    }
    
    .attempts-section {
        padding: 1.5rem;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    
    .guess-panel {
        padding: 1.5rem;
    }
    
    .people-list-section {
        padding: 1.5rem;
    }
}

/* Styles pour la popup d'image */
.image-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.image-popup.visible {
    opacity: 1;
}

.image-popup.fade-out {
    opacity: 0;
}

.image-popup-content {
    position: relative;
    background-color: #1a2332;
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 600px;
    max-height: 80vh;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    animation: popupSlideIn 0.3s ease-out;
}

@keyframes popupSlideIn {
    from {
        transform: scale(0.9) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.image-popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #e8f2ff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.5rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.image-popup-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.image-popup-message {
    font-size: 1.25rem;
    font-weight: bold;
    color: #e8f2ff;
    text-align: center;
}

.image-popup-img {
    max-width: 100%;
    max-height: 60vh;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    object-fit: contain;
}

@media (max-width: 768px) {
    .image-popup-content {
        padding: 1rem;
        max-width: 90vw;
    }
    
    .image-popup-message {
        font-size: 1.1rem;
    }
    
    .image-popup-img {
        max-height: 50vh;
    }
}
