/* =========================================
   HOW TO PLAY — KICKDLE
========================================= */

.how-page {
    padding-bottom: 60px;
}

/* HERO */

.how-hero {
    text-align: center;
    padding: 82px 0 75px;
    max-width: 100%;
    margin: 0 auto;
}

.how-hero h1 {
    margin: 0;
    color: var(--dark);
    font-size: clamp(42px, 6vw, 65px);
    line-height: 1.08;
    letter-spacing: -3px;
    font-weight: 850;
}

.how-hero h1 em {
    color: var(--dark);
    font-style: normal;
}

.how-hero h1 .title-line,
.how-hero h1 .title-second-line {
    display: block;
}

.how-hero > p {
    max-width: 650px;
    margin: 23px auto 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.8;
}

.how-hero-tags {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.how-hero-tags span {
    background: var(--soft);
    color: var(--dark);
    border: 1px solid #dceee2;
    border-radius: 30px;
    padding: 8px 14px;
    font-size: 0.83rem;
    font-weight: 600;
}

/* SECTION HEADINGS */

.section-heading {
    text-align: center;
    margin-bottom: 28px;
}

/* Suppression de CHOOSE YOUR CHALLENGE */
.section-heading .eyebrow {
    display: none;
}

.section-heading h2 {
    margin: 10px 0 0;
    color: var(--dark);
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    letter-spacing: -0.8px;
}

/* GAME NAVIGATION */

.game-navigation {
    padding: 25px 0 65px;
}

.game-navigation-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.game-nav-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 23px 12px 20px;
    transition: transform 0.2s ease, border-color 0.2s ease,
                box-shadow 0.2s ease;
}

.game-nav-card:hover {
    transform: translateY(-4px);
    border-color: #b7dfc4;
    box-shadow: 0 9px 24px rgba(23, 75, 50, 0.07);
}

.game-nav-card img {
    width: 65px;
    height: 65px;
    object-fit: contain;
    margin-bottom: 13px;
}

.game-nav-card span {
    font-weight: 750;
    font-size: 0.98rem;
}

.game-nav-card small {
    margin-top: 5px;
    color: var(--muted);
    font-size: 0.78rem;
}

/* GAME GUIDE */

.game-guide {
    padding: 38px;
    margin-bottom: 30px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    scroll-margin-top: 30px;
}

.game-guide-header {
    display: flex;
    align-items: center;
    gap: 22px;
    padding-bottom: 27px;
    border-bottom: 1px solid var(--line);
}

.game-guide-icon {
    width: 86px;
    height: 86px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--soft);
    border-radius: 18px;
}

.game-guide-icon img {
    width: 65px;
    height: 65px;
    object-fit: contain;
}

.game-guide-header h2 {
    margin: 5px 0 7px;
    color: var(--dark);
    font-size: 1.8rem;
    letter-spacing: -0.7px;
}

.game-guide-header p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.game-guide-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 245px;
    gap: 38px;
    padding-top: 30px;
}

.game-guide-main h3 {
    color: var(--dark);
    font-size: 1.08rem;
    margin: 0 0 10px;
}

.game-guide-main h3:not(:first-child) {
    margin-top: 27px;
}

.game-guide-main p {
    color: #647169;
    line-height: 1.75;
    font-size: 0.94rem;
    margin: 0;
}

/* CONNECTION TYPES */

.connection-types {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.connection-type {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.connection-number {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    background: var(--soft);
    color: var(--dark);
    border-radius: 9px;
    font-weight: 750;
    font-size: 0.8rem;
}

.connection-type h4 {
    margin: 1px 0 5px;
    color: var(--dark);
    font-size: 0.94rem;
}

.connection-type p {
    font-size: 0.86rem;
    line-height: 1.55;
}

/* MAGIC SQUARE SCORING */

.scoring-explanation {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 16px;
    margin-top: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.scoring-icon {
    width: 45px;
    height: 45px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--soft);
    color: var(--dark);
    border-radius: 10px;
    font-weight: 800;
}

.scoring-explanation h4 {
    color: var(--dark);
    font-size: 0.93rem;
    margin: 1px 0 5px;
}

.scoring-explanation p {
    font-size: 0.86rem;
    line-height: 1.55;
}

.guide-emphasis {
    margin-top: 22px !important;
    padding: 15px 17px;
    background: var(--soft);
    border-left: 3px solid var(--green);
    border-radius: 0 10px 10px 0;
    color: var(--dark) !important;
    font-weight: 600;
}

/* RULES CARD */

.game-rules-card {
    align-self: start;
    padding: 22px;
    background: #f8fbf9;
    border: 1px solid #e3eee6;
    border-radius: 15px;
}

.game-rules-card h3 {
    margin: 0 0 18px;
    color: var(--dark);
    font-size: 1rem;
}

.rule-stat {
    display: flex;
    flex-direction: column;
    padding: 13px 0;
    border-bottom: 1px solid #e5eee8;
}

.rule-stat strong {
    color: var(--dark);
    font-size: 1.45rem;
    line-height: 1.2;
    font-weight: 800;
}

.rule-stat span {
    color: var(--muted);
    font-size: 0.82rem;
    margin-top: 4px;
}

.rule-note {
    color: #647169;
    font-size: 0.83rem;
    line-height: 1.6;
    margin: 17px 0;
}

.guide-play-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 43px;
    padding: 11px 15px;
    background: var(--green);
    color: #fff;
    border: 1px solid var(--green);
    border-radius: 9px;
    text-decoration: none;
    text-align: center;
    font-weight: 700;
    font-size: 0.88rem;
    transition: background 0.2s ease, transform 0.2s ease;
}

.guide-play-button:hover {
    background: var(--dark);
    border-color: var(--dark);
    transform: translateY(-2px);
}

/* FINAL CTA */

.how-final-cta {
    text-align: center;
    margin-top: 65px;
    padding: 55px 25px;
    background: var(--soft);
    border: 1px solid #dceee2;
    border-radius: 20px;
}

.how-final-cta h2 {
    max-width: 600px;
    margin: 12px auto;
    color: var(--dark);
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    line-height: 1.2;
    letter-spacing: -0.8px;
}

.how-final-cta p {
    margin: 0 auto 23px;
    color: var(--muted);
    line-height: 1.6;
}

.how-final-cta .guide-play-button {
    width: auto;
    min-width: 190px;
}

/* HEADER */

.site-header {
    position: relative;
}

.site-header nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 42px;
}

.site-header nav a[href="about.html"],
.site-header nav a[href="how-to-play.html"] {
    display: none;
}

/* FOOTER */

.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 {
    display: block;
    flex: 0 0 auto;
    margin: 0;
    white-space: nowrap;
}

.site-footer .copyright b {
    color: #78827b;
    font-weight: 750;
}

.site-footer .footer-links {
    position: static;
    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-flex;
    flex: 0 0 auto;
    color: #9aa39d;
    font-size: 13px;
    font-weight: 450;
    line-height: 1.4;
    white-space: nowrap;
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-footer .footer-links a:hover {
    color: var(--dark);
}

/* RESPONSIVE */

@media (max-width: 850px) {

    .game-navigation-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .game-guide-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .game-rules-card {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        column-gap: 15px;
    }

    .game-rules-card h3,
    .game-rules-card .rule-note,
    .game-rules-card .guide-play-button {
        grid-column: 1 / -1;
    }

    .game-rules-card h3 {
        margin-bottom: 5px;
    }

    .rule-stat {
        border-bottom: none;
    }
}

@media (max-width: 700px) {

    .how-hero {
        padding: 59px 0 52px;
    }

    .how-hero h1 {
        font-size: clamp(36px, 9vw, 49px);
        letter-spacing: -2px;
    }

    .how-hero > p {
        max-width: 450px;
        margin-top: 18px;
        font-size: 14px;
        line-height: 1.7;
    }

    .game-navigation {
        padding-bottom: 45px;
    }

    .game-navigation-grid {
        gap: 10px;
    }

    .game-nav-card {
        padding: 17px 8px;
    }

    .game-nav-card img {
        width: 53px;
        height: 53px;
    }

    .game-nav-card span {
        font-size: 0.88rem;
    }

    .game-nav-card small {
        font-size: 0.72rem;
    }

    .game-guide {
        padding: 22px 17px;
        border-radius: 15px;
    }

    .game-guide-header {
        gap: 14px;
        align-items: flex-start;
    }

    .game-guide-icon {
        width: 61px;
        height: 61px;
        border-radius: 13px;
    }

    .game-guide-icon img {
        width: 47px;
        height: 47px;
    }

    .game-guide-header h2 {
        font-size: 1.4rem;
    }

    .game-guide-header p {
        font-size: 0.85rem;
    }

    .game-guide-content {
        padding-top: 23px;
    }

    .game-rules-card {
        display: block;
    }

    .game-rules-card h3 {
        margin-bottom: 12px;
    }

    .rule-stat {
        border-bottom: 1px solid #e5eee8;
    }

    .how-final-cta {
        margin-top: 45px;
        padding: 40px 18px;
    }

    .site-header nav {
        position: static;
        transform: none;
        width: 100%;
        justify-content: center;
        gap: 34px;
    }

    .site-footer {
        flex-wrap: wrap;
        gap: 16px;
    }

    .site-footer .footer-links {
        flex: 1 1 100%;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 13px 20px;
        margin-left: 0;
    }
}

@media (max-width: 420px) {

    .site-footer .footer-links {
        justify-content: flex-start;
        column-gap: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .how-page * {
        transition: none !important;
    }
}