/* =====================================================
   Quizz Interactif Laho — Thème principal
   ===================================================== */

:root {
    --gold: #be9b61;
    --gold-light: #d4b483;
    --gold-dark: #9a7a44;
    --navy: #1d262d;
    --navy-light: #2c3a45;
    --navy-lighter: #3d4f5e;
    --white: #ffffff;
    --off-white: #f5f0e8;
    --gray-light: #e8e0d0;
    --gray: #8a8a8a;

    /* Couleurs réponses style Kahoot */
    --answer-red: #e74c3c;
    --answer-blue: #2980b9;
    --answer-yellow: #f39c12;
    --answer-green: #27ae60;

    --answer-red-dark: #c0392b;
    --answer-blue-dark: #1a6fa0;
    --answer-yellow-dark: #d68910;
    --answer-green-dark: #1e8449;

    --border-radius: 12px;
    --border-radius-lg: 20px;
    --shadow: 0 4px 20px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.25);
    --transition: all 0.3s ease;

    --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--navy);
    color: var(--white);
    min-height: 100vh;
    line-height: 1.5;
}

/* ===== Typography ===== */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: clamp(1.8rem, 5vw, 3rem); }
h2 { font-size: clamp(1.4rem, 4vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 3vw, 1.6rem); }

a {
    color: var(--gold);
    text-decoration: none;
}
a:hover { color: var(--gold-light); }

/* ===== Layout ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.container-sm {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ===== Header ===== */
.header {
    background: var(--navy-light);
    border-bottom: 3px solid var(--gold);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.logo {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 0.05em;
}

.nav-links {
    display: flex;
    gap: 1rem;
    list-style: none;
}

.nav-links a {
    color: var(--white);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    transition: var(--transition);
    font-size: 0.9rem;
}

.nav-links a:hover {
    background: var(--gold);
    color: var(--navy);
}

/* ===== Hero / Landing ===== */
.hero {
    text-align: center;
    padding: 4rem 1rem;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
}

.hero-logo {
    width: min(250px, 60vw);
    margin-bottom: 2rem;
    border-radius: 12px;
    background: white;
    padding: 1rem;
}

.hero h1 {
    color: var(--gold);
    margin-bottom: 1rem;
}

.hero p {
    color: var(--gray-light);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto 2.5rem;
}

/* ===== Cards ===== */
.card {
    background: var(--navy-light);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--navy-lighter);
}

.card-gold {
    border-color: var(--gold);
    border-width: 2px;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    font-family: var(--font-main);
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    border-radius: var(--border-radius-lg);
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
}

.btn-gold {
    background: var(--gold);
    color: var(--navy);
}
.btn-gold:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(190,155,97,0.4);
}

.btn-navy {
    background: var(--navy-lighter);
    color: var(--white);
    border: 2px solid var(--navy-lighter);
}
.btn-navy:hover {
    background: var(--navy-light);
    border-color: var(--gold);
    color: var(--gold);
}

.btn-danger {
    background: var(--answer-red);
    color: var(--white);
}
.btn-danger:hover {
    background: var(--answer-red-dark);
}

.btn-success {
    background: var(--answer-green);
    color: var(--white);
}
.btn-success:hover {
    background: var(--answer-green-dark);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--gold);
    color: var(--gold);
}
.btn-outline:hover {
    background: var(--gold);
    color: var(--navy);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--gold-light);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--navy);
    border: 2px solid var(--navy-lighter);
    border-radius: var(--border-radius);
    color: var(--white);
    font-size: 1rem;
    font-family: var(--font-main);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--gold);
    background: var(--navy-light);
}

.form-control::placeholder {
    color: var(--gray);
}

select.form-control option {
    background: var(--navy);
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* ===== Answer Buttons (Kahoot style) ===== */
.answer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

.answer-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem 1rem;
    border: none;
    border-radius: var(--border-radius-lg);
    font-size: clamp(1rem, 3vw, 1.3rem);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    min-height: 80px;
    font-family: var(--font-main);
    color: var(--white);
    box-shadow: 0 4px 0 rgba(0,0,0,0.3);
    position: relative;
}

.answer-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 rgba(0,0,0,0.3);
}

.answer-btn.red    { background: var(--answer-red); }
.answer-btn.blue   { background: var(--answer-blue); }
.answer-btn.yellow { background: var(--answer-yellow); }
.answer-btn.green  { background: var(--answer-green); }

.answer-btn.red:hover    { background: var(--answer-red-dark); }
.answer-btn.blue:hover   { background: var(--answer-blue-dark); }
.answer-btn.yellow:hover { background: var(--answer-yellow-dark); }
.answer-btn.green:hover  { background: var(--answer-green-dark); }

.answer-btn .answer-icon {
    font-size: 1.5em;
    flex-shrink: 0;
}

.answer-btn.selected {
    opacity: 0.7;
    transform: scale(0.97);
}

.answer-btn.correct {
    background: var(--answer-green) !important;
    animation: pulse 0.6s ease;
}

.answer-btn.wrong {
    background: #555 !important;
    opacity: 0.5;
}

.answer-btn.wrong.selected-wrong {
    background: var(--answer-red) !important;
    opacity: 0.7;
}

/* Vrai/Faux */
.truefalse-grid {
    grid-template-columns: 1fr 1fr;
}

/* ===== Timer ===== */
.timer-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem 0;
}

.timer-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--navy-lighter);
    border: 4px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold);
    transition: border-color 0.5s;
    position: relative;
}

.timer-circle.urgent {
    border-color: var(--answer-red);
    color: var(--answer-red);
    animation: pulse 1s infinite;
}

.timer-bar {
    height: 8px;
    background: var(--navy-lighter);
    border-radius: 4px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.timer-bar-fill {
    height: 100%;
    background: var(--gold);
    border-radius: 4px;
    transition: width 1s linear, background 0.5s;
}

.timer-bar-fill.urgent {
    background: var(--answer-red);
}

/* ===== Progress bar (answers count) ===== */
.progress-bar {
    height: 10px;
    background: var(--navy-lighter);
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold));
    border-radius: 5px;
    transition: width 0.5s ease;
}

/* ===== Question display ===== */
.question-box {
    background: var(--navy-lighter);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
    border-top: 4px solid var(--gold);
}

.question-number {
    font-size: 0.85rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
}

.question-text {
    font-size: clamp(1.2rem, 4vw, 2rem);
    font-weight: 700;
    color: var(--white);
}

/* ===== Lobby ===== */
.pin-display {
    text-align: center;
    padding: 1.5rem 1rem;
    background: var(--navy-lighter);
    border-radius: var(--border-radius-lg);
    border: 2px solid var(--gold);
    overflow: hidden;
}

.pin-label {
    font-size: 0.9rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
}

.pin-number {
    font-size: clamp(2.2rem, 7vw, 3.5rem);
    font-weight: 900;
    color: var(--white);
    letter-spacing: 0.12em;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    word-break: break-all;
}

.qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: var(--border-radius-lg);
    width: fit-content;
    margin: 0 auto;
}

.qr-label {
    color: var(--navy);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ===== Players grid (lobby) ===== */
.players-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    min-height: 100px;
    padding: 1rem;
}

.player-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.player-nickname {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--white);
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

/* ===== Leaderboard ===== */
.leaderboard {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--navy-lighter);
    border-radius: var(--border-radius);
    animation: slideInLeft 0.5s ease both;
}

.leaderboard-item:nth-child(1) {
    background: linear-gradient(90deg, #c9a227, #be9b61);
    color: var(--navy);
    font-size: 1.1rem;
    animation-delay: 0.4s;
}

.leaderboard-item:nth-child(2) {
    background: linear-gradient(90deg, #8e9eab, #a0b0bc);
    animation-delay: 0.3s;
}

.leaderboard-item:nth-child(3) {
    background: linear-gradient(90deg, #a0522d, #cd7f32);
    animation-delay: 0.2s;
}

.leaderboard-rank {
    font-size: 1.5rem;
    font-weight: 900;
    min-width: 2rem;
    text-align: center;
}

.leaderboard-info {
    flex: 1;
}

.leaderboard-name {
    font-weight: 700;
    font-size: 1rem;
}

.leaderboard-score {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gold);
}

.leaderboard-item:nth-child(1) .leaderboard-score { color: var(--navy); }

/* ===== Feedback overlay ===== */
.feedback-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.feedback-overlay.correct-bg {
    background: rgba(39,174,96,0.95);
}

.feedback-overlay.wrong-bg {
    background: rgba(231,76,60,0.95);
}

.feedback-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.feedback-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
}

.feedback-points {
    font-size: 1.5rem;
    opacity: 0.9;
}

/* ===== Answer stats (admin reveal) ===== */
.answer-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.stat-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stat-label {
    flex: 0 0 30%;
    font-size: 0.9rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stat-fill {
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
    font-weight: 700;
    color: white;
    transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    min-width: 40px;
    font-size: 0.9rem;
}

/* ===== Page-specific: admin game ===== */
.game-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
}

.game-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    background: var(--navy-light);
    border-radius: var(--border-radius);
    border-bottom: 2px solid var(--gold);
}

.game-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
}

/* ===== Waiting screen ===== */
.waiting-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    gap: 2rem;
}

.pulse-ring {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    animation: pulse 2s infinite;
    margin: 0 auto;
}

/* ===== Quiz list ===== */
.quiz-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.quiz-item {
    background: var(--navy-light);
    border-radius: var(--border-radius);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid var(--navy-lighter);
    transition: var(--transition);
}

.quiz-item:hover {
    border-color: var(--gold);
    transform: translateX(4px);
}

.quiz-item-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--white);
}

.quiz-item-meta {
    font-size: 0.85rem;
    color: var(--gray);
    margin-top: 0.25rem;
}

.quiz-item-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* ===== Question editor ===== */
.question-editor {
    background: var(--navy-light);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--navy-lighter);
    transition: var(--transition);
}

.question-editor:hover {
    border-color: var(--gold-dark);
}

.question-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    gap: 1rem;
}

.question-handle {
    cursor: grab;
    color: var(--gray);
    font-size: 1.2rem;
    padding: 0.25rem;
}

.answer-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.answer-input-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.answer-input-row input[type="checkbox"],
.answer-input-row input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--gold);
    cursor: pointer;
}

.answer-color-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ===== Badges & Tags ===== */
.badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-gold { background: var(--gold); color: var(--navy); }
.badge-navy { background: var(--navy-lighter); color: var(--white); }
.badge-green { background: var(--answer-green); color: white; }
.badge-red { background: var(--answer-red); color: white; }

/* ===== Alerts ===== */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.alert-success { background: rgba(39,174,96,0.2); border: 1px solid var(--answer-green); color: #a8e6c3; }
.alert-error   { background: rgba(231,76,60,0.2); border: 1px solid var(--answer-red); color: #f5a9a3; }
.alert-info    { background: rgba(190,155,97,0.2); border: 1px solid var(--gold); color: var(--gold-light); }

/* ===== Responsive counter ===== */
.answer-counter {
    text-align: center;
    padding: 1rem;
    background: var(--navy-lighter);
    border-radius: var(--border-radius);
}

.answer-counter .count {
    font-size: 3rem;
    font-weight: 900;
    color: var(--gold);
}

.answer-counter .label {
    font-size: 0.9rem;
    color: var(--gray);
}

/* ===== PIN input (player join) ===== */
.pin-input {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.pin-input input {
    width: 50px;
    height: 70px;
    text-align: center;
    font-size: 2rem;
    font-weight: 900;
    background: var(--navy-lighter);
    border: 3px solid var(--navy-lighter);
    border-radius: var(--border-radius);
    color: var(--white);
    font-family: var(--font-main);
    transition: var(--transition);
}

.pin-input input:focus {
    border-color: var(--gold);
    outline: none;
    background: var(--navy-light);
}

/* ===== Avatar picker ===== */
.avatar-picker {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.avatar-preview {
    cursor: pointer;
    transition: transform 0.2s;
}

.avatar-preview:hover {
    transform: scale(1.05);
}

.avatar-preview svg {
    display: block;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
}

/* ===== Confetti canvas ===== */
#confetti-canvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 999;
}

/* ===== Podium ===== */
.podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.podium-place {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    animation: riseUp 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.podium-place:nth-child(1) { animation-delay: 0.6s; }
.podium-place:nth-child(2) { animation-delay: 0.3s; }
.podium-place:nth-child(3) { animation-delay: 0.0s; }

.podium-block {
    width: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 1rem 0.5rem;
    border-radius: 8px 8px 0 0;
    font-size: 2rem;
    font-weight: 900;
}

.podium-block.first  { height: 120px; background: linear-gradient(180deg, #c9a227, #be9b61); color: var(--navy); }
.podium-block.second { height: 90px;  background: linear-gradient(180deg, #8e9eab, #7f8c8d); color: white; }
.podium-block.third  { height: 70px;  background: linear-gradient(180deg, #cd7f32, #a0522d); color: white; }

.podium-name {
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.podium-score {
    font-size: 0.9rem;
    color: var(--gold-light);
}

/* ===== Reveal animation ===== */
.reveal-answer {
    text-align: center;
    padding: 1.5rem;
    background: rgba(39,174,96,0.2);
    border: 2px solid var(--answer-green);
    border-radius: var(--border-radius-lg);
    margin-top: 1rem;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ===== Loading spinner ===== */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--navy-lighter);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

/* ===== Utility ===== */
.text-gold  { color: var(--gold); }
.text-gray  { color: var(--gray); }
.text-white { color: var(--white); }
.text-center { text-align: center; }
.text-small  { font-size: 0.85rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.hidden { display: none !important; }
.w-full { width: 100%; }

/* ===== Animations ===== */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

@keyframes popIn {
    from { transform: scale(0.5); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes slideInLeft {
    from { transform: translateX(-30px); opacity: 0; }
    to   { transform: translateX(0);     opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(30px); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

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

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

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes countdown {
    from { stroke-dashoffset: 0; }
    to   { stroke-dashoffset: 283; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

/* ===== Mobile ===== */
@media (max-width: 600px) {
    .answer-grid {
        grid-template-columns: 1fr;
    }

    .answer-inputs {
        grid-template-columns: 1fr;
    }

    .podium-block { width: 80px; }

    .hero { padding: 2rem 1rem; }

    .card { padding: 1.25rem; }

    .pin-number { letter-spacing: 0.05em; font-size: 2.2rem; }

    .nav-links { display: none; }
}

@media (min-width: 768px) {
    .answer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1024px) {
    .game-screen {
        padding: 1.5rem;
    }
}

/* ===== Print / TV mode ===== */
@media (min-width: 1200px) {
    .question-text {
        font-size: 2.5rem;
    }
    .answer-btn {
        font-size: 1.5rem;
        min-height: 120px;
        padding: 2rem;
    }
}

/* ===== Motifs de marque Laho ===== */
.brand-motifs {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.brand-motifs img {
    position: absolute;
    opacity: 0.08;
    width: 200px;
    height: auto;
}

.brand-motifs .m-tl { top: -20px; left: -20px; }
.brand-motifs .m-tr { top: -20px; right: -20px; transform: scaleX(-1); }
.brand-motifs .m-bl { bottom: -20px; left: -20px; transform: scaleY(-1); }
.brand-motifs .m-br { bottom: -20px; right: -20px; transform: scale(-1); }

/* Ensure page content sits above motifs */
body > *:not(.brand-motifs) {
    position: relative;
    z-index: 1;
}
