
.missing-page {
    width: min(760px, 100%);
    margin: 0 auto;
    padding: 52px 0 42px;
}

.missing-heading {
    text-align: center;
}

.missing-heading .eyebrow {
    margin: 0 0 15px;
}

.missing-heading h1 {
    font-size: clamp(42px, 6vw, 58px);
    letter-spacing: -2.8px;
}

.missing-heading h1 em {
    color: var(--green);
    font-style: normal;
}

.missing-heading > p:not(.eyebrow) {
    margin: 15px auto 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.6;
}

.season-pill {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 18px;
    padding: 8px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fbfdfb;
}

.season-pill span {
    color: #8a968e;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 1.3px;
}

.season-pill strong {
    color: var(--dark);
    font-size: 13px;
}

.missing-instructions {
    margin: 27px auto 22px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.missing-instructions p {
    margin: 4px 0;
}

.formation-panel {
    overflow: hidden;
    padding: 15px 17px 19px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f8fbf8;
}

.formation-topline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 3px 12px;
    color: #8b978f;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 1.5px;
}

.formation-topline span:first-child {
    color: var(--green);
    font-size: 12px;
}

.formation {
    min-height: 380px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    gap: 10px;
    padding: 17px 7px;
    border: 1px solid #dce9df;
    border-radius: 10px;
    background: linear-gradient(180deg, #eaf5ec 0%, #f1f8f2 100%);
    position: relative;
}

.formation:before {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(39, 163, 90, .16);
    border-radius: 7px;
    pointer-events: none;
}

.formation:after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    top: 50%;
    border-top: 1px solid rgba(39, 163, 90, .16);
    pointer-events: none;
}

.formation-row {
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(12px, 4vw, 36px);
}

.player-slot {
    width: clamp(76px, 15vw, 108px);
    min-height: 83px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 5px;
    border: 1px solid rgba(203, 222, 208, .95);
    border-radius: 9px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 2px 7px rgba(27, 75, 48, .05);
}

.slot-flag {
    width: 31px;
    height: 22px;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .14);
}

.slot-flag-placeholder {
    width: 31px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 3px;
    background: #edf2ee;
    color: #8a968e;
    font-size: 13px;
}

.slot-name {
    max-width: 100%;
    color: var(--dark);
    font-size: 10px;
    font-weight: 800;
    text-align: center;
    line-height: 1.2;
}

.formation-loading {
    z-index: 1;
    margin: auto;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.guess-section {
    margin: 25px auto 0;
    max-width: 520px;
    text-align: center;
}

.guess-section > label {
    display: block;
    margin-bottom: 10px;
    color: var(--dark);
    font-size: 16px;
    font-weight: 800;
}

.club-search-wrap {
    position: relative;
}

#club-search {
    width: 100%;
    height: 48px;
    padding: 0 15px;
    border: 1px solid #dfe8e1;
    border-radius: 9px;
    outline: none;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(23, 75, 50, .03);
}

#club-search:focus {
    border-color: #8bc49e;
    box-shadow: 0 0 0 3px rgba(39, 163, 90, .09);
}

#club-search:disabled {
    background: #f5f8f5;
    color: #8a968e;
}

.club-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 10;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(23, 75, 50, .12);
    text-align: left;
}

.club-suggestion {
    width: 100%;
    min-height: 49px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 13px;
    border: 0;
    border-bottom: 1px solid #f0f3f0;
    border-radius: 0;
    background: #fff;
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    text-align: left;
}

.club-suggestion:last-child {
    border-bottom: 0;
}

.club-suggestion:hover,
.club-suggestion:focus {
    background: #f2f8f3;
    outline: none;
}

.club-suggestion img {
    width: 29px;
    height: 29px;
    object-fit: contain;
    flex: 0 0 29px;
}

.suggestion-fallback {
    width: 29px;
    height: 29px;
    display: grid;
    place-items: center;
    flex: 0 0 29px;
    border-radius: 50%;
    background: #edf7f0;
    color: var(--green);
    font-size: 12px;
    font-weight: 900;
}

.search-message {
    min-height: 18px;
    margin: 7px 0 0;
    color: #8a968e;
    font-size: 11px;
}

.guess-actions {
    display: flex;
    justify-content: center;
    gap: 9px;
    margin-top: 10px;
}

.guess-actions button {
    min-width: 105px;
    min-height: 40px;
    padding: 9px 17px;
    border-radius: 8px;
    font-size: 12px;
}

.guess-actions .primary-action {
    border-color: var(--green);
    background: var(--green);
    color: #fff;
}

.guess-actions .primary-action:hover {
    background: #218d4d;
}

.guess-actions .primary-action:disabled {
    border-color: #b9c9bd;
    background: #b9c9bd;
    cursor: not-allowed;
}

.guess-actions .secondary-action {
    border-color: #dfe8e1;
    background: #fff;
    color: var(--dark);
}

.guess-actions .secondary-action:hover {
    border-color: #a9cfb4;
    background: #f8fcf9;
}

.guess-actions .secondary-action:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.game-message {
    min-height: 22px;
    margin: 13px 0 0;
    font-size: 14px;
    font-weight: 750;
}

.game-message.success {
    color: #218d4d;
}

.game-message.error {
    color: #b45345;
}

.hint-box {
    margin: 10px auto 0;
    padding: 11px 14px;
    border: 1px solid #dcebdd;
    border-radius: 8px;
    background: #f2f8f2;
    color: var(--dark);
    font-size: 13px;
}

.hint-box strong {
    color: var(--green);
}

@media (max-width: 640px) {
    .missing-page {
        padding: 42px 0 32px;
    }

    .missing-heading h1 {
        font-size: 45px;
    }

    .missing-heading > p:not(.eyebrow) {
        font-size: 14px;
    }

    .missing-instructions {
        font-size: 12px;
        margin: 22px auto 18px;
    }

    .formation-panel {
        padding: 11px 9px 13px;
    }

    .formation {
        min-height: 330px;
        padding: 13px 3px;
        gap: 7px;
    }

    .formation-row {
        gap: clamp(7px, 2.4vw, 15px);
    }

    .player-slot {
        width: clamp(68px, 21vw, 91px);
        min-height: 74px;
        padding: 7px 3px;
        gap: 6px;
    }

    .slot-flag {
        width: 28px;
        height: 20px;
    }

    .slot-name {
        font-size: 9px;
    }

    .guess-section {
        margin-top: 21px;
    }
}

@media (max-width: 370px) {
    .formation {
        min-height: 305px;
    }

    .player-slot {
        width: 65px;
        min-height: 69px;
    }

    .slot-name {
        font-size: 8px;
    }

    .formation-row {
        gap: 5px;
    }
}

/* =====================================
   MISSING XI - REALISTIC FOOTBALL PITCH
===================================== */

.formation-panel {
    padding: 15px 17px 19px;
    background: #fff;
    border: 1px solid var(--line);
}

.formation-topline {
    padding-bottom: 15px;
}

.formation {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    gap: 10px;
    padding: 19px 7px;
    border: 2px solid rgba(255,255,255,.8);
    border-radius: 9px;
    background:
        repeating-linear-gradient(
            90deg,
            rgba(255,255,255,.045) 0,
            rgba(255,255,255,.045) 12.5%,
            transparent 12.5%,
            transparent 25%
        ),
        linear-gradient(180deg, #398b51 0%, #267642 100%);
    box-shadow: inset 0 0 25px rgba(0,0,0,.12);
}

/* Lignes extérieures et ligne médiane */

.pitch-markings {
    position: absolute;
    inset: 10px;
    z-index: -1;
    border: 1.5px solid rgba(255,255,255,.8);
    pointer-events: none;
}

.pitch-markings::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    border-top: 1.5px solid rgba(255,255,255,.8);
}

/* Rond central */

.pitch-center-circle {
    position: absolute;
    width: 108px;
    height: 108px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1.5px solid rgba(255,255,255,.8);
    border-radius: 50%;
}

.pitch-center-spot,
.pitch-penalty-spot {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255,255,255,.9);
}

.pitch-center-spot {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Surfaces de réparation */

.pitch-penalty-area {
    position: absolute;
    left: 50%;
    width: 48%;
    height: 16%;
    transform: translateX(-50%);
    border: 1.5px solid rgba(255,255,255,.8);
}

.pitch-penalty-top {
    top: -1px;
    border-top: 0;
}

.pitch-penalty-bottom {
    bottom: -1px;
    border-bottom: 0;
}

/* Surfaces de but */

.pitch-goal-area {
    position: absolute;
    left: 50%;
    width: 23%;
    height: 6%;
    transform: translateX(-50%);
    border: 1.5px solid rgba(255,255,255,.8);
}

.pitch-goal-top {
    top: -1px;
    border-top: 0;
}

.pitch-goal-bottom {
    bottom: -1px;
    border-bottom: 0;
}

/* Points de penalty */

.pitch-spot-top {
    top: 11%;
    left: 50%;
    transform: translateX(-50%);
}

.pitch-spot-bottom {
    bottom: 11%;
    left: 50%;
    transform: translateX(-50%);
}

/* Joueurs */

.formation-row {
    position: relative;
    z-index: 2;
}

.player-slot {
    border: 1px solid rgba(255,255,255,.75);
    background: rgba(255,255,255,.94);
    box-shadow: 0 3px 9px rgba(0,0,0,.16);
    transition: transform .18s ease, box-shadow .18s ease;
}

.player-slot:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 13px rgba(0,0,0,.2);
}

.slot-name {
    color: #174b32;
}

@media (max-width: 640px) {
    .formation {
        min-height: 360px;
        padding: 15px 3px;
    }

    .pitch-center-circle {
        width: 80px;
        height: 80px;
    }

    .formation-topline span:last-child {
        font-size: 8px;
        letter-spacing: 1px;
    }
}

/* Espacement entre la saison et le terrain */
.season-pill {
    margin-bottom: 22px;
}

/* Terrain vertical */
.formation {
    min-height: 650px;
    aspect-ratio: 2 / 3;
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
    gap: 12px;
    padding: 24px 8px;
}

/* Supprimer les deux indications du haut */
.formation-topline {
    justify-content: flex-start;
}

.formation-topline span:first-child {
    display: none;
}

.formation-topline span:last-child {
    font-size: 11px;
    letter-spacing: 1.5px;
}

/* Terrain vertical : conserver les proportions des marquages */
.pitch-center-circle {
    width: 115px;
    height: 115px;
}

.pitch-penalty-area {
    width: 52%;
    height: 17%;
}

.pitch-goal-area {
    width: 25%;
    height: 6%;
}

@media (max-width: 640px) {
    .season-pill {
        margin-bottom: 18px;
    }

    .formation {
        min-height: 570px;
        max-width: 100%;
        padding: 19px 3px;
    }

    .pitch-center-circle {
        width: 85px;
        height: 85px;
    }
}

/* Cases avec uniquement les drapeaux */

.player-slot {
    width: clamp(90px, 17vw, 125px);
    height: 85px;
    min-height: 85px;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.96);
}

/* Drapeaux agrandis */

.slot-flag {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 115px;
    max-height: 75px;
    object-fit: contain;
    border-radius: 5px;
    box-shadow: none;
}

/* Adaptation mobile */

@media (max-width: 640px) {
    .player-slot {
        width: clamp(68px, 20vw, 100px);
        height: 72px;
        min-height: 72px;
        padding: 4px;
    }

    .slot-flag {
        max-width: 90px;
        max-height: 64px;
    }
}

/* Suppression des cases derrière les drapeaux */

.player-slot {
    width: clamp(75px, 12vw, 105px);
    height: 65px;
    min-height: 65px;

    padding: 0;
    border: none;
    border-radius: 0;

    background: transparent;
    box-shadow: none;

    display: flex;
    align-items: center;
    justify-content: center;
}

/* Drapeaux seuls */

.slot-flag {
    width: 76px;
    height: 52px;

    max-width: 100%;
    max-height: 100%;

    object-fit: contain;
    border-radius: 4px;

    box-shadow: 0 2px 5px rgba(0,0,0,.2);
}

/* Aucun effet de survol */

.player-slot:hover {
    transform: none;
    box-shadow: none;
}

@media (max-width: 640px) {
    .player-slot {
        width: 65px;
        height: 48px;
        min-height: 48px;
    }

    .slot-flag {
        width: 60px;
        height: 42px;
    }
}
/* Terrain légèrement réduit */
.formation {
    max-width: 540px;
    min-height: 570px;
    margin: 0 auto;
}

@media (max-width: 640px) {
    .formation {
        max-width: 100%;
        min-height: 510px;
    }
}
/* =========================================
   FOOTER — KICKDLE
========================================= */

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 66px;
    margin-top: 40px;
    padding: 18px 0;
    border-top: 1px solid var(--line);
    color: #9aa39d;
    font-size: 12px;
}

.site-footer .copyright {
    flex: 0 0 auto;
    margin-right: auto;
    white-space: nowrap;
}

.site-footer .copyright b {
    color: #78827b;
    font-weight: 750;
}

.site-footer nav.footer-links {
    position: static;
    left: auto;
    transform: none;
    display: flex;
    flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    width: auto;
    gap: 30px;
    margin: 0 0 0 auto;
    padding: 0;
}

.site-footer .footer-links a {
    display: inline-block;
    flex: 0 0 auto;
    color: #9aa39d;
    font-size: 13px;
    font-weight: 450;
    white-space: nowrap;
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-footer .footer-links a:hover {
    color: var(--dark);
}

/* MOBILE */

@media (max-width: 640px) {
    .site-footer {
        flex-wrap: wrap;
        gap: 16px;
    }

    .site-footer nav.footer-links {
        position: static;
        width: 100%;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 13px 20px;
        margin-left: 0;
    }
}

@media (max-width: 420px) {
    .site-footer nav.footer-links {
        justify-content: flex-start;
        column-gap: 16px;
    }
}