* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --green: #006b28;
    --green-dark: #01461a;
    --blue: #1677ff;
    --blue-light: #3ea6ff;
    --white: #fff;
    --topbar-h: 52px;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #070707;
    font-family: "Inter", sans-serif;
}

/* ══════════ TOPBAR ══════════ */
.topbar {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(100vw, calc(100vh * 0.5625));
    height: var(--topbar-h);
    background: rgba(0, 60, 20, 0.78);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    z-index: 300;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-devices {
    display: flex;
    gap: 5px;
    align-items: center;
}

.topbar-devices .t-device {
    border: 1.8px solid rgba(255, 255, 255, 0.85);
    border-radius: 3px;
    position: relative;
}

.t-laptop {
    width: 28px;
    height: 18px;
}

.t-laptop::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -4px;
    width: 36px;
    height: 2.5px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.85);
}

.t-tablet {
    width: 15px;
    height: 21px;
}

.t-phone {
    width: 10px;
    height: 18px;
}

.t-phone::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 2.5px;
    height: 2.5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
}

.topbar-logo {
    font-size: 0.95rem;
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1;
}

.topbar-logo .tl-g {
    color: #c8f5d8;
}

.topbar-logo .tl-x {
    color: #ea7f33;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 7px;
}

/* Bouton Se connecter — style Magic Maths pill glassmorphism */
.tb-btn-login {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    background: rgba(255, 255, 255, 0.13);
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    border-radius: 100px;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(6px);
    white-space: nowrap;
}

.tb-btn-login:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: #fff;
}

.tb-btn-login svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

.tb-btn-register {
    display: flex;
    align-items: center;
    padding: 7px 14px;
    background: linear-gradient(135deg, #1ec85a, #006b28);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 100px;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 3px 12px rgba(30, 200, 90, 0.4);
    white-space: nowrap;
}

.tb-btn-register:hover {
    box-shadow: 0 5px 18px rgba(30, 200, 90, 0.55);
    transform: translateY(-1px);
}

/* ══════════ SIDE ICONS (left) ══════════ */
.side-icons {
    position: absolute;
    left: 8px;
    top: 20%;
    transform: translateY(-50%);
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.si {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #fff;
    position: relative;
}

.si-credits {
    overflow: visible;
}

.si-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    background: #e82020;
    border: 2px solid rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
    pointer-events: none;
}

.si:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: scale(1.08);
}

.si svg {
    width: 24px;
    height: 24px;
}

.si::after {
    content: attr(data-tip);
    position: absolute;
    left: 46px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 600;
    padding: 3px 7px;
    border-radius: 5px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s;
}

.si:hover::after {
    opacity: 1;
}

/* ══════════ POSTER (original) ══════════ */
.poster {
    position: relative;
    width: min(100vw, calc(100vh * 0.5625));
    height: min(100vh, calc(100vw * 1.7777));
    aspect-ratio: 9/16;
    overflow: hidden;
    background:
        radial-gradient(circle at center,
            rgba(0, 255, 120, 0.18),
            transparent 55%),
        radial-gradient(circle at top,
            rgba(255, 255, 255, 0.08),
            transparent 30%),
        linear-gradient(180deg, #00732a 0%, #01551f 45%, #003d16 100%);
}

.poster::before {
    content: "";
    position: absolute;
    inset: -20%;
    background: repeating-conic-gradient(from 0deg,
            rgba(255, 255, 255, 0.04) 0deg,
            transparent 10deg,
            transparent 18deg);
    opacity: 0.5;
    animation: spin 35s linear infinite;
    margin-top: -200px;
}

.poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center,
            transparent 20%,
            rgba(0, 0, 0, 0.35) 100%);
    pointer-events: none;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.content {
    position: relative;
    z-index: 5;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* TOP original — masqué, remplacé par topbar */
.top {
    display: none;
}

/* LOGO WRAP original — repositionné visible en haut droite */
.logo-wrap {
    position: absolute;
    top: calc(var(--topbar-h) + 6px);
    right: 0;
    width: 136px;
    height: 97px;
    z-index: 60;
    pointer-events: none;
}

.logo-bg {
    position: absolute;
    top: -100px;
    right: -232px;
    width: 351px;
    height: 115px;
    border-radius: 50%;
    background: #f1f1f1;
}

.logo {
    position: absolute;
    right: 10px;
    top: -46px;
    display: flex;
    align-items: center;
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: -2px;
}

.green {
    color: #1f6d3d;
}

.orange {
    color: #ea7f33;
}

/* HERO */
.hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.confetti span {
    position: absolute;
    width: 10px;
    height: 26px;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffe78b, #ffaf00);
    box-shadow: 0 0 10px rgba(255, 196, 0, 0.6);
    animation: float 5s ease-in-out infinite;
}

.confetti span:nth-child(1) {
    top: 6%;
    left: 8%;
    transform: rotate(55deg);
}

.confetti span:nth-child(2) {
    top: 10%;
    right: 14%;
    transform: rotate(-40deg);
}

.confetti span:nth-child(3) {
    top: 18%;
    left: 22%;
    transform: rotate(15deg);
}

.confetti span:nth-child(4) {
    top: 24%;
    right: 22%;
    transform: rotate(80deg);
}

.confetti span:nth-child(5) {
    top: 30%;
    left: 6%;
    transform: rotate(-35deg);
}

.confetti span:nth-child(6) {
    top: 32%;
    right: 8%;
    transform: rotate(25deg);
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.products {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    margin-bottom: 20px;
}

.platform {
    position: absolute;
    bottom: 0;
    height: 90px;
    border-radius: 50%;
    background: radial-gradient(circle at center,
            #39e05d 0%,
            #0d8f35 45%,
            #04521d 100%);
    box-shadow:
        0 0 35px rgba(41, 255, 122, 0.6),
        inset 0 12px 24px rgba(255, 255, 255, 0.15),
        inset 0 -20px 35px rgba(0, 0, 0, 0.35);
}

.platform::after {
    content: "";
    position: absolute;
    left: 4%;
    right: 4%;
    bottom: 8px;
    height: 8px;
    border-radius: 50px;
    background: #68ff8f;
    box-shadow: 0 0 18px #59ff88;
}

.products img {
    position: relative;
    z-index: 3;
    width: 600px;
    object-fit: contain;
}

.texts {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.big {
    font-family: "Anton", sans-serif;
    color: #fff;
    font-size: clamp(3rem, 11vw, 5rem);
    line-height: 0.9;
    transform: skew(-8deg);
    text-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
}

.banner {
    margin-top: 10px;
    padding: clamp(10px, 1.2vh, 16px) clamp(18px, 3vw, 36px);
    background: linear-gradient(90deg, #ff1010 0%, #ff8500 100%);
    transform: skew(-10deg);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

.banner span {
    display: block;
    transform: skew(10deg);
    color: #fff;
    font-family: "Anton", sans-serif;
    font-size: clamp(1.6rem, 5vw, 3rem);
    line-height: 1;
}

.sub {
    margin-top: 18px;
    color: #fff;
    font-family: "Anton", sans-serif;
    font-size: clamp(2rem, 6vw, 3.5rem);
    line-height: 0.95;
    transform: skew(-8deg);
    text-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
}

/* CTA — style Magic Maths "se connecter" : pill glassmorphism blanc */
.cta {
    margin-top: 30px;
    width: min(88%, 420px);
    height: clamp(56px, 9vh, 88px);
    border-radius: 15px;
    border: 3px solid rgba(255, 255, 255, 0.9);
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.16),
            rgba(255, 255, 255, 0.04));
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #fff;
    text-decoration: none;
    font-size: clamp(1.1rem, 3vw, 1.8rem);
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
    box-shadow:
        0 8px 28px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.25s;
}

.cta:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-3px);
    box-shadow:
        0 14px 36px rgba(0, 0, 0, 0.3),
        0 0 18px rgba(100, 255, 140, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.cta:active {
    transform: translateY(0) scale(0.98);
}

.cta-arrow {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cta-arrow svg {
    width: 13px;
    height: 13px;
}

.footer {
    width: 100%;
    background: #f4f4f4;
    border-radius: 36px 36px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    color: #1e6b3a;
    font-weight: 900;
    padding: 0.4rem;
}

.site {
    font-size: clamp(0.95rem, 2.2vw, 1rem);
    cursor: pointer;
}

.badge {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #000;
    border: 6px solid #ff2020;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.divider {
    width: 2px;
    height: 34px;
    background: #b5c6b6;
}

.social {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: clamp(0.7rem, 1.5vw, 1rem);
}

.icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #1e6b3a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

@media (max-height: 760px) {
    .products img {
        width: min(74%, 420px);
    }

    .texts {
        margin-top: -10px;
    }

    .cta {
        margin-top: 20px;
    }
}

@media (max-width: 480px) {
    .logo-bg {
        width: 350px;
        height: 120px;
        top: -110px;
    }

    .products img {
        width: 92%;
    }

    .sub {
        line-height: 1;
    }

    .footer {
        gap: 10px;
    }

    .divider {
        display: none;
    }
}

/* ══════════════════════════════════════════════
         BOTTOM SLIDE-UP (style Magic Maths)
      ══════════════════════════════════════════════ */
.overlay-bg {
    position: fixed;
    inset: 0;
    z-index: 400;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.overlay-bg.open {
    opacity: 1;
    pointer-events: all;
}

.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    width: min(100vw, calc(100vh * 0.5625));
    background: #fff;
    border-radius: 24px 24px 0 0;
    padding: 0 22px 32px;
    z-index: 500;
    transition: transform 0.38s cubic-bezier(0.32, 1, 0.36, 1);
    box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.3);
}

.bottom-sheet.open {
    transform: translateX(-50%) translateY(0);
}

/* handle bar */
.sheet-handle {
    width: 40px;
    height: 4px;
    border-radius: 4px;
    background: #ddd;
    margin: 12px auto 20px;
}

/* ── Étape 0 : Choix connexion/inscription ── */
.step {
    display: none;
}

.step.active {
    display: block;
}

.step0-title {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 800;
    color: #111;
    margin-bottom: 6px;
}

.step0-sub {
    text-align: center;
    font-size: 0.78rem;
    color: #888;
    margin-bottom: 24px;
}

.step0-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}

.step0-logo span {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -1px;
}

.step0-logo .sl-g {
    color: #1f6d3d;
}

.step0-logo .sl-x {
    color: #ea7f33;
}

/* Boutons choix — style Magic Maths */
.choice-btns {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-choice-login {
    width: 100%;
    height: 50px;
    border-radius: 12px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-b);
    font-size: clamp(16px, 4.5vw, 19px);
    font-weight: 800;
    cursor: pointer;
    letter-spacing: 0.2px;
    transition:
        transform 0.1s,
        filter 0.1s;
    position: relative;
    background: #1877f2;
    color: #fff;
    box-shadow:
        0 4px 14px rgba(24, 119, 242, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -3px 0 rgba(0, 0, 0, 0.2);
}

.btn-choice-register {
    width: 100%;
    height: 52px;
    border-radius: 12px;
    border: none;
    background: var(--green);
    color: var(--white);
    font-family: var(--font-h);
    font-size: clamp(16px, 4.5vw, 19px);
    cursor: pointer;
    letter-spacing: 0.5px;
    box-shadow:
        0 4px 18px rgba(30, 154, 72, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -3px 0 rgba(0, 0, 0, 0.2);
    transition:
        transform 0.1s,
        filter 0.1s;
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-choice-register:hover {
    box-shadow: 0 8px 28px rgba(30, 200, 90, 0.55);
    transform: translateY(-1px);
}

.btn-choice-login svg,
.btn-choice-register svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ── Étape 1 : Connexion & Inscription ── */
.sheet-back {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0;
    margin-bottom: 14px;
    transition: color 0.2s;
}

.sheet-back:hover {
    color: #333;
}

.sheet-back svg {
    width: 14px;
    height: 14px;
}

.sheet-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #111;
    margin-bottom: 3px;
}

.sheet-sub {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 18px;
}

.field {
    margin-bottom: 13px;
}

.field label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: #555;
    margin-bottom: 4px;
}

.field input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e4e4e4;
    border-radius: 10px;
    font-size: 0.88rem;
    font-family: "Inter", sans-serif;
    color: #111;
    outline: none;
    transition: border-color 0.2s;
    background: #fafafa;
}

.field input:focus {
    border-color: #006b28;
    background: #fff;
}

/* Phone row */
.phone-row {
    display: flex;
    gap: 8px;
}

.country-sel {
    flex-shrink: 0;
    min-width: 95px;
    padding: 11px 8px;
    border: 1.5px solid #e4e4e4;
    border-radius: 10px;
    font-size: 0.82rem;
    font-family: "Inter", sans-serif;
    color: #111;
    background: #fafafa;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
}

.country-sel:focus {
    border-color: #006b28;
    background: #fff;
}

.phone-row input {
    flex: 1;
}

/* Eye toggle */
.eye-wrap {
    position: relative;
}

.eye-wrap input {
    padding-right: 40px;
}

.eye-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #bbb;
    display: flex;
    align-items: center;
    padding: 0;
    transition: color 0.2s;
}

.eye-btn:hover {
    color: #666;
}

.eye-btn svg {
    width: 17px;
    height: 17px;
}

/* Mot de passe oublié */
.forgot {
    text-align: right;
    margin: -6px 0 10px;
}

.forgot a {
    font-size: 0.7rem;
    color: #006b28;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.forgot a:hover {
    text-decoration: underline;
}

/* Password strength */
.pwd-bars {
    display: flex;
    gap: 4px;
    margin-top: 6px;
}

.pwd-bar {
    flex: 1;
    height: 3px;
    border-radius: 4px;
    background: #ececec;
    transition: background 0.3s;
}

.pwd-bar.w {
    background: #e74c3c;
}

.pwd-bar.f {
    background: #f39c12;
}

.pwd-bar.s {
    background: #006b28;
}

.pwd-hint {
    font-size: 0.65rem;
    color: #bbb;
    margin-top: 4px;
}

/* Submit — même style que btn-choice-register */
.btn-switch {
    width: 100%;
    padding: 11px 16px;
    background: none;
    border: 1.5px solid rgba(0, 107, 40, 0.3);
    border-radius: 10px;
    cursor: pointer;
    font-family: "Inter", sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    color: #006b28;
    transition: all 0.2s;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-switch svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.btn-submit {
    width: 100%;
    padding: 13px;
    margin-top: 4px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #1ec85a, #006b28);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.22s;
    box-shadow: 0 6px 18px rgba(30, 200, 90, 0.4);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 9px 24px rgba(30, 200, 90, 0.5);
}

.btn-submit:active {
    transform: scale(0.98);
}

.switch-link {
    text-align: center;
    margin-top: 12px;
    font-size: 0.74rem;
    color: #888;
}

.switch-link a {
    color: #006b28;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.switch-link a:hover {
    text-decoration: underline;
}

.divider-or {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0;
}

.divider-or::before,
.divider-or::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #ececec;
}

.divider-or span {
    font-size: 0.68rem;
    color: #bbb;
    white-space: nowrap;
}



.player-card {
    position: absolute;
    top: 1%;
    left: 8px;
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.38);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 7px 10px;
}

.player-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    flex-shrink: 0;
    background: linear-gradient(135deg, #1ec85a, #006b28);
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 900;
    color: #fff;
}

.player-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.player-name {
    font-size: 0.9rem;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-stats {
    display: flex;
    align-items: center;
    gap: 5px;
}

.player-pts {
    font-weight: 700;
    color: #ffe066;
}

.player-rank {
    font-size: 0.8rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    padding: 1px 5px;
    color: #c8f5d8;
    white-space: nowrap;
}

/* ══════════════════════════════════════════════
         MODIF 1 : MODAL RÈGLES DE JEU — plein écran
      ══════════════════════════════════════════════ */
.rules-modal {
    position: fixed;
    inset: 0;
    z-index: 600;
    background: #fff;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.32, 1, 0.36, 1);
}

.rules-modal.open {
    transform: translateY(0);
}

.rules-header {
    position: sticky;
    top: 0;
    background: #fff;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.rules-header-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #111;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rules-header-title svg {
    width: 16px;
    height: 16px;
    color: #006b28;
    flex-shrink: 0;
}

.rules-close-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: #f2f2f2;
    cursor: pointer;
    font-size: 0.9rem;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.rules-close-btn:hover {
    background: #e5e5e5;
}

.rules-body {
    flex: 1;
    overflow-y: auto;
    padding: 22px 18px 40px;
    -webkit-overflow-scrolling: touch;
}

.rules-body h1 {
    font-size: 1.15rem;
    font-weight: 900;
    color: #006b28;
    margin-bottom: 4px;
}

.rules-date {
    font-size: 0.72rem;
    color: #aaa;
    margin-bottom: 24px;
}

.rules-section {
    margin-bottom: 22px;
}

.rules-section h2 {
    font-size: 0.88rem;
    font-weight: 800;
    color: #111;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1.5px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sec-num {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #006b28;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rules-section p {
    font-size: 0.8rem;
    color: #444;
    line-height: 1.75;
    margin-bottom: 8px;
}

.rules-section ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 8px;
}

.rules-section ul li {
    font-size: 0.8rem;
    color: #444;
    line-height: 1.6;
    padding-left: 14px;
    position: relative;
}

.rules-section ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #006b28;
    font-weight: 900;
}

.rules-highlight {
    background: rgba(0, 107, 40, 0.07);
    border-left: 3px solid #006b28;
    border-radius: 0 8px 8px 0;
    padding: 10px 12px;
    font-size: 0.78rem;
    color: #333;
    line-height: 1.65;
    margin: 8px 0;
}

.rules-warning {
    background: rgba(232, 32, 32, 0.06);
    border-left: 3px solid #e82020;
    border-radius: 0 8px 8px 0;
    padding: 10px 12px;
    font-size: 0.76rem;
    color: #c0392b;
    line-height: 1.65;
    margin: 8px 0;
}

.rules-footer-note {
    font-size: 0.68rem;
    color: #bbb;
    text-align: center;
    margin-top: 24px;
    line-height: 1.7;
}