/* =========================================================
   Color Jump Challenge
   Fichier : assets/style.css
   Mobile-first
   ========================================================= */

:root {
    --bg: #f6f7fb;
    --card: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --border: #e5e7eb;

    --orange: #ff8a00;
    --green: #138a36;
    --white-box: #ffffff;

    --primary: #111827;
    --primary-light: #1f2937;
    --danger: #dc2626;
    --success: #16a34a;
    --warning: #f59e0b;

    --radius: 18px;
    --shadow: 0 14px 35px rgba(15, 23, 42, 0.12);
}

/* =========================================================
   Reset mobile / anti débordement horizontal
   ========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
    max-width: 100%;
}

img,
video,
iframe {
    max-width: 100%;
}

img {
    display: block;
}

button {
    touch-action: manipulation;
}

/* =========================================================
   Layout général
   ========================================================= */

.app {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    padding-bottom: 90px;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 16px;
    overflow-x: hidden;
}

.page-section {
    margin-top: 18px;
}

.card {
    width: 100%;
    max-width: 100%;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
    overflow: hidden;
}

.card + .card {
    margin-top: 14px;
}

/* =========================================================
   Header public
   ========================================================= */

.hero {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, #111827 0%, #1f2937 55%, #000000 100%);
    color: #ffffff;
    padding: 28px 16px 22px;
    border-bottom-left-radius: 28px;
    border-bottom-right-radius: 28px;
}

.hero-inner {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 14px;
}

.hero h1 {
    margin: 0;
    font-size: clamp(30px, 9vw, 52px);
    line-height: 0.98;
    letter-spacing: -1.4px;
    overflow-wrap: break-word;
}

.hero p {
    margin: 14px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 16px;
}

.color-row {
    width: 100%;
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.color-pill {
    flex: 1;
    min-width: 0;
    height: 54px;
    border-radius: 16px;
    border: 3px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    letter-spacing: 0.5px;
    font-size: 13px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.color-orange {
    background: var(--orange);
    color: #111827;
}

.color-white {
    background: #ffffff;
    color: #111827;
}

.color-green {
    background: var(--green);
    color: #ffffff;
}

/* =========================================================
   Cagnotte
   ========================================================= */

.pot-card {
    width: 100%;
    max-width: 100%;
    margin-top: -18px;
    position: relative;
    z-index: 2;
    background: #ffffff;
    border-radius: 24px;
    padding: 18px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
}

.pot-label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.pot-amount {
    margin-top: 4px;
    font-size: clamp(34px, 11vw, 64px);
    font-weight: 950;
    line-height: 1;
    letter-spacing: -1.5px;
    overflow-wrap: break-word;
}

.pot-info {
    margin-top: 8px;
    color: var(--muted);
    font-size: 14px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 14px;
}

.stat-box {
    min-width: 0;
    border: 1px solid var(--border);
    background: #f9fafb;
    border-radius: 16px;
    padding: 14px;
}

.stat-value {
    display: block;
    font-size: 22px;
    font-weight: 900;
}

.stat-label {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 13px;
}

/* =========================================================
   Vidéo de démonstration
   ========================================================= */

.video-demo-box {
    width: 100%;
    max-width: 100%;
    margin: 14px auto 0;
    border-radius: 18px;
    overflow: hidden;
    background: #000000;
    border: 1px solid var(--border);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
}

.video-demo-box video {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    aspect-ratio: 9 / 16;
    object-fit: cover;
    background: #000000;
}

/* =========================================================
   Boutons
   ========================================================= */

.btn {
    width: 100%;
    max-width: 100%;
    border: 0;
    border-radius: 16px;
    padding: 15px 18px;
    font-weight: 900;
    font-size: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.15s ease, opacity 0.15s ease;
    text-align: center;
    white-space: normal;
}

.btn:active {
    transform: scale(0.98);
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
}

.btn-secondary {
    background: #ffffff;
    color: var(--primary);
    border: 1px solid var(--border);
}

.btn-success {
    background: var(--success);
    color: #ffffff;
}

.btn-danger {
    background: var(--danger);
    color: #ffffff;
}

.btn-warning {
    background: var(--warning);
    color: #111827;
}

.btn-small {
    width: auto;
    padding: 9px 12px;
    border-radius: 12px;
    font-size: 13px;
}

.actions {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

/* =========================================================
   Formulaires
   ========================================================= */

.form {
    display: grid;
    gap: 14px;
}

.form-group {
    display: grid;
    gap: 7px;
}

.form-label {
    font-size: 14px;
    font-weight: 800;
}

.form-control {
    width: 100%;
    max-width: 100%;
    border: 1px solid var(--border);
    background: #ffffff;
    border-radius: 14px;
    padding: 14px 13px;
    color: var(--text);
    outline: none;
}

.form-control:focus {
    border-color: #111827;
    box-shadow: 0 0 0 4px rgba(17, 24, 39, 0.08);
}

.form-help {
    color: var(--muted);
    font-size: 13px;
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #f9fafb;
    border: 1px solid var(--border);
    padding: 13px;
    border-radius: 14px;
}

.checkbox-row input {
    margin-top: 4px;
    min-width: 18px;
    min-height: 18px;
}

.error-box,
.success-box,
.warning-box {
    max-width: 100%;
    border-radius: 16px;
    padding: 13px 14px;
    font-size: 14px;
    font-weight: 700;
    overflow-wrap: break-word;
}

.error-box {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.success-box {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.warning-box {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* =========================================================
   Blocs info
   ========================================================= */

.info-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.info-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
    min-width: 0;
}

.info-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #111827;
    color: #ffffff;
    flex-shrink: 0;
}

.info-title {
    font-weight: 900;
    margin: 0;
}

.info-text {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 14px;
    overflow-wrap: anywhere;
}

/* =========================================================
   Page merci / paiement Interac
   ========================================================= */

.payment-box {
    display: grid;
    gap: 12px;
}

.payment-line {
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 13px;
    min-width: 0;
}

.payment-label {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.payment-value {
    display: block;
    margin-top: 2px;
    font-size: 18px;
    font-weight: 950;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.code-box {
    background: #111827;
    color: #ffffff;
    padding: 16px;
    border-radius: 18px;
    text-align: center;
    overflow: hidden;
}

.code-box span {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 700;
}

.code-box strong {
    display: block;
    margin-top: 4px;
    font-size: 28px;
    letter-spacing: 1px;
    overflow-wrap: anywhere;
}

/* =========================================================
   Bottom navigation
   ========================================================= */

.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    width: calc(100% - 24px);
    max-width: 720px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--border);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.2);
    backdrop-filter: blur(12px);
    border-radius: 22px;
    padding: 8px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    z-index: 50;
}

.nav-link {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border-radius: 16px;
    padding: 9px 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-align: center;
}

.nav-link.active {
    background: #111827;
    color: #ffffff;
}

.nav-icon {
    font-size: 18px;
    line-height: 1;
}

/* =========================================================
   Admin
   ========================================================= */

.admin-header {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    background: #111827;
    color: #ffffff;
    padding: 18px 16px;
}

.admin-header-inner {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.admin-header h1 {
    margin: 0;
    font-size: 22px;
}

.admin-header p {
    margin: 4px 0 0;
    color: rgba(255, 255, 255, 0.72);
}

.admin-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px;
    overflow-x: hidden;
}

.admin-grid {
    display: grid;
    gap: 14px;
}

.admin-stat {
    min-width: 0;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.admin-stat-value {
    font-size: 28px;
    font-weight: 950;
    line-height: 1;
    overflow-wrap: anywhere;
}

.admin-stat-label {
    color: var(--muted);
    margin-top: 5px;
    font-size: 13px;
    font-weight: 800;
}

.admin-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #ffffff;
    -webkit-overflow-scrolling: touch;
}

.admin-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    vertical-align: middle;
}

.admin-table th {
    background: #f9fafb;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.admin-table tr:last-child td {
    border-bottom: 0;
}

.admin-actions {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.badge-pending,
.badge-waiting_payment {
    background: #fffbeb;
    color: #92400e;
}

.badge-paid,
.badge-confirmed,
.badge-qualified {
    background: #f0fdf4;
    color: #166534;
}

.badge-cancelled,
.badge-refunded,
.badge-eliminated,
.badge-absent {
    background: #fef2f2;
    color: #991b1b;
}

.badge-winner {
    background: #111827;
    color: #ffffff;
}

.admin-menu {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
}

.admin-menu a {
    min-width: 0;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px;
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
    overflow-wrap: anywhere;
}

/* =========================================================
   Règlement
   ========================================================= */

.rules {
    display: grid;
    gap: 12px;
}

.rule {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px;
    border-radius: 14px;
    background: #f9fafb;
    border: 1px solid var(--border);
    min-width: 0;
}

.rule-number {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: #111827;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    flex-shrink: 0;
}

.rule p {
    margin: 3px 0 0;
    overflow-wrap: anywhere;
}

/* =========================================================
   Desktop léger
   ========================================================= */

@media (min-width: 600px) {
    .video-demo-box {
        max-width: 380px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (min-width: 760px) {
    .container {
        padding: 22px;
    }

    .hero {
        padding: 42px 22px 34px;
    }

    .actions {
        grid-template-columns: 1fr 1fr;
    }

    .admin-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .bottom-nav {
        display: none;
    }

    .app {
        padding-bottom: 20px;
    }
}

/* =========================================================
   Très petits écrans
   ========================================================= */

@media (max-width: 360px) {
    .container,
    .admin-container {
        padding: 12px;
    }

    .card,
    .pot-card {
        padding: 14px;
    }

    .color-row {
        gap: 7px;
    }

    .color-pill {
        height: 48px;
        font-size: 11px;
        border-radius: 13px;
    }

    .pot-amount {
        font-size: 34px;
    }

    .btn {
        padding: 13px 14px;
        font-size: 15px;
    }
}
/* =========================================================
   CORRECTION FORTE — vidéo mobile + suppression scroll horizontal
   À placer tout à la fin du fichier style.css
   ========================================================= */

html,
body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
}

.app,
.container,
.card,
.page-section {
    max-width: 100% !important;
    overflow-x: hidden !important;
}

.container {
    width: 100% !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
}

/* La carte ne doit jamais laisser sortir la vidéo */
.card {
    overflow: hidden !important;
}

/* Bloc vidéo centré et limité */
.video-demo-box {
    width: 100% !important;
    max-width: 340px !important;
    margin: 14px auto 0 auto !important;
    border-radius: 18px !important;
    overflow: hidden !important;
    background: #000000 !important;
    border: 1px solid var(--border) !important;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16) !important;
}

/* La vidéo ne peut plus dépasser */
.video-demo-box video {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 auto !important;
    object-fit: contain !important;
    background: #000000 !important;
}

/* Sur très petit téléphone */
@media (max-width: 380px) {
    .video-demo-box {
        max-width: 100% !important;
    }
}

/* Sur écran large, on garde une taille propre */
@media (min-width: 600px) {
    .video-demo-box {
        max-width: 380px !important;
    }
}