
/* ================================
   KICKDLE - CONNECTIONS
================================ */

.connections-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 55px 0 70px;
}

.connections-heading {
    text-align: center;
    margin-bottom: 30px;
}

.connections-heading .eyebrow {
    color: #27a35a;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 3px;
    margin-bottom: 15px;
}

.connections-heading h1 {
    color: #174b32;
    font-size: clamp(36px, 6vw, 52px);
    margin: 0;
    letter-spacing: -2px;
}

.connections-heading > p:last-child {
    color: #78827b;
    font-size: 16px;
    margin-top: 12px;
}

.game-instructions {
    text-align: center;
    color: #78827b;
    line-height: 1.6;
    margin-bottom: 25px;
}

.game-instructions p {
    margin: 5px 0;
}

.game-instructions strong {
    color: #174b32;
}

.game-status {
    display: flex;
    justify-content: center;
    gap: 55px;
    margin: 25px 0;
    padding: 15px;
    border-top: 1px solid #e7ece8;
    border-bottom: 1px solid #e7ece8;
}

.game-status div {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.game-status span {
    color: #78827b;
    font-size: 13px;
}

.game-status strong {
    color: #174b32;
    font-size: 19px;
}

.players-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 20px 0;
}

.player-card {
    min-height: 105px;
    padding: 10px 5px;
    border: 1px solid #e7ece8;
    border-radius: 9px;
    background: white;
    color: #202923;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    transition: 0.15s ease;
    font-family: inherit;
    font-weight: 700;
    font-size: 13px;
    text-align: center;
}

.player-card:hover {
    border-color: #27a35a;
    background: #f5fbf7;
    transform: translateY(-2px);
}

.player-card.selected {
    background: #174b32;
    color: white;
    border-color: #174b32;
}

.player-card:disabled {
    cursor: default;
}

.player-card img {
    width: 43px;
    height: 43px;
    border-radius: 50%;
    object-fit: cover;
}

.solved-groups {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.solved-group {
    padding: 17px;
    border-radius: 9px;
    text-align: center;
    background: #eaf5ed;
    color: #174b32;
}

.solved-group strong {
    display: block;
    margin-bottom: 7px;
    font-size: 15px;
}

.solved-group span {
    font-size: 13px;
}

.game-message {
    min-height: 24px;
    text-align: center;
    color: #174b32;
    font-weight: 700;
    margin: 15px 0;
}

.game-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.game-actions button {
    cursor: pointer;
    padding: 12px 19px;
    border-radius: 7px;
    font-family: inherit;
    font-weight: 700;
    font-size: 14px;
    transition: 0.15s ease;
}

#shuffle-button,
#deselect-button {
    background: white;
    color: #174b32;
    border: 1px solid #e7ece8;
}

#submit-button {
    background: #27a35a;
    color: white;
    border: 1px solid #27a35a;
}

#submit-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.game-actions button:not(:disabled):hover {
    transform: translateY(-2px);
}

@media (max-width: 640px) {
    .connections-page {
        padding: 35px 0 45px;
    }

    .players-grid {
        gap: 7px;
    }

    .player-card {
        min-height: 88px;
        font-size: 11px;
    }

    .player-card img {
        width: 36px;
        height: 36px;
    }

    .game-status {
        gap: 35px;
    }
}


/* =================================
   KICKDLE - DESIGN IMPROVEMENTS
================================= */

/* Écritures plus grandes */
.connections-heading h1 {
    font-size: clamp(40px, 6vw, 56px);
}

.connections-heading > p:last-child {
    font-size: 18px;
}

.game-instructions {
    font-size: 16px;
}

.game-status span {
    font-size: 14px;
}

.game-status strong {
    font-size: 21px;
}

/* Cœurs des erreurs */
#mistakes {
    display: flex;
    flex-direction: row;
    gap: 7px;
    font-size: 25px !important;
    line-height: 1;
}

.heart {
    color: #27a35a;
    transition: color 0.2s ease, transform 0.2s ease;
}

.heart.lost {
    color: #d9dfda;
}

/* Cartes des joueurs */
.player-card {
    min-height: 120px;
    padding: 13px 8px;
    border: 1px solid #e1ebe4;
    border-radius: 12px;
    background: linear-gradient(145deg, #ffffff, #f7fbf8);
    box-shadow: 0 2px 6px rgba(23, 75, 50, 0.05);
    font-size: 15px;
    font-weight: 750;
    gap: 10px;
}

.player-card:hover {
    border-color: #27a35a;
    background: #eff8f1;
    box-shadow: 0 5px 14px rgba(23, 75, 50, 0.10);
    transform: translateY(-3px);
}

/* Photos des joueurs */
.player-card img {
    width: 49px;
    height: 49px;
    border: 2px solid #e4eee7;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

/* Carte sélectionnée */
.player-card.selected {
    background: #174b32;
    color: white;
    border: 2px solid #27a35a;
    box-shadow: 0 3px 10px rgba(23, 75, 50, 0.18);
}

/* Boutons */
.game-actions button {
    font-size: 15px;
    padding: 13px 22px;
    border-radius: 9px;
}

/* Mobile */
@media (max-width: 640px) {
    .player-card {
        min-height: 100px;
        font-size: 12px;
        padding: 9px 4px;
    }

    .player-card img {
        width: 40px;
        height: 40px;
    }

    #mistakes {
        font-size: 22px !important;
    }
}
/* Masquer la phrase sur les 3 erreurs */
.game-instructions p:last-child {
    display: none;
}

/* Titre des vies restantes */
.game-status span {
    font-size: 15px;
    font-weight: 600;
}

/* Cœurs */
#mistakes {
    display: flex;
    gap: 9px;
    font-size: 32px !important;
    line-height: 1;
}

.heart {
    color: #174b32;
    font-size: 32px;
}

.heart.lost {
    color: #dce5df;
}

/* Supprimer toutes les instructions au-dessus des statistiques */
.game-instructions {
    display: none !important;
}

/* Cœurs verts foncés */
#mistakes .heart {
    color: #174b32 !important;
    font-size: 36px !important;
}

/* Cœurs perdus */
#mistakes .heart.lost {
    color: #dce5df !important;
}

/* Espacement des cœurs */
#mistakes {
    gap: 10px;
    justify-content: center;
}



/* =====================================
   KICKDLE - PLAYER CARDS DESIGN
===================================== */

/* Grille */
.players-grid {
    gap: 13px;
    margin-top: 25px;
}

/* Cartes */
.player-card {
    position: relative;
    min-height: 135px;
    padding: 15px 8px;
    border: 1px solid #e3ece5;
    border-radius: 14px;
    background: #f9fcfa;
    box-shadow: 0 3px 8px rgba(23, 75, 50, 0.045);
    gap: 11px;
    font-size: 15px;
    font-weight: 750;
    transition: all 0.2s ease;
}

/* Survol */
.player-card:hover:not(:disabled) {
    background: #eff7f1;
    border-color: #83b99a;
    box-shadow: 0 6px 15px rgba(23, 75, 50, 0.10);
    transform: translateY(-3px);
}

/* Photos */
.player-card img {
    width: 55px;
    height: 55px;
    padding: 3px;
    border-radius: 50%;
    object-fit: cover;
    background: white;
    border: 2px solid #e1ece4;
    box-shadow: 0 2px 6px rgba(23, 75, 50, 0.08);
}

/* Noms */
.player-card span {
    line-height: 1.3;
}

/* Carte sélectionnée */
.player-card.selected {
    background: #174b32;
    color: white;
    border: 2px solid #174b32;
    box-shadow: 0 4px 12px rgba(23, 75, 50, 0.20);
    transform: translateY(-2px);
}

/* Photo sélectionnée */
.player-card.selected img {
    border-color: rgba(255, 255, 255, 0.7);
}

/* Focus clavier */
.player-card:focus-visible {
    outline: 3px solid #83b99a;
    outline-offset: 3px;
}

/* Adaptation mobile */
@media (max-width: 640px) {
    .players-grid {
        gap: 8px;
    }

    .player-card {
        min-height: 108px;
        padding: 9px 4px;
        font-size: 12px;
        border-radius: 11px;
    }

    .player-card img {
        width: 43px;
        height: 43px;
    }
}

/* STATISTIQUES */

.statistics-section {
    margin: 55px auto 30px;
    max-width: 650px;
    padding: 25px;
    background: #f7faf7;
    border: 1px solid #e3ebe3;
    border-radius: 18px;
    text-align: center;
}

.statistics-section h2 {
    color: #173f2b;
    font-size: 25px;
    margin-bottom: 8px;
}

.statistics-section > p {
    color: #718078;
    font-size: 15px;
    margin-bottom: 30px;
}

.results-chart {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.chart-row {
    display: grid;
    grid-template-columns: 150px 1fr 55px;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.chart-label {
    color: #294536;
    font-size: 14px;
    font-weight: 600;
}

.chart-bar-background {
    height: 18px;
    background: #e5ece6;
    border-radius: 20px;
    overflow: hidden;
}

.chart-bar {
    height: 100%;
    width: 0%;
    background: #25834c;
    border-radius: 20px;
    transition: width 0.5s ease;
}

.chart-percentage {
    color: #173f2b;
    font-weight: 700;
    text-align: right;
}

@media (max-width: 500px) {
    .chart-row {
        grid-template-columns: 110px 1fr 45px;
        gap: 8px;
    }

    .chart-label {
        font-size: 12px;
    }
}
/* Groupes non trouvés : rouge */
.solved-group.revealed-group {
    background: #fce8e8 !important;
    border: 1px solid #e8aaaa !important;
    color: #922b2b !important;
    opacity: 1;
}

/* Texte des groupes non trouvés */
.revealed-group strong,
.revealed-group span {
    color: #922b2b;
}

/* Statut non trouvé */
.revealed-group small {
    display: block;
    margin-top: 10px;
    color: #c0392b;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 12px;
}
/* Groupes trouvés : vert */
.solved-group:not(.revealed-group) {
    background: #e4f4e8;
    border: 1px solid #a8d5b5;
    color: #174b32;
}

.solved-group:not(.revealed-group) small {
    display: block;
    margin-top: 10px;
    color: #25834c;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.solved-group span {
    display: block;
    margin-top: 10px;
    line-height: 1.5;
}

.solved-group small {
    display: block;
    margin-top: 10px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Bandeau de fin de partie */
.game-message {
    text-align: center;
    padding: 15px;
    border-radius: 12px;
    font-weight: 700;
}

/* Victoire */
.victory-banner {
    background: #e4f4e8;
    color: #207a3d;
    animation: bannerAppear 0.5s ease-out;
}

/* Défaite */
.defeat-banner {
    background: #fbe8e8;
    color: #b83232;
    animation: bannerAppear 0.5s ease-out;
}

/* Animation d'apparition */
@keyframes bannerAppear {
    from {
        opacity: 0;
        transform: scale(0.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}
/* Animation d'apparition des groupes */
.solved-group {
    animation: groupAppear 0.45s ease-out both;
}

.solved-group:nth-child(1) {
    animation-delay: 0.05s;
}

.solved-group:nth-child(2) {
    animation-delay: 0.15s;
}

.solved-group:nth-child(3) {
    animation-delay: 0.25s;
}

.solved-group:nth-child(4) {
    animation-delay: 0.35s;
}

@keyframes groupAppear {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Agrandir les petits titres verts */
/* Agrandir les petits titres verts */
.connections-heading .eyebrow {
    font-size: 18px !important;
    letter-spacing: 0.16em;
    font-weight: 900;
}
/* Résultat de la combinaison */
.game-message.correct-combination {
    color: #15803d;
    font-weight: 700;
    font-size: 17px;
}

.game-message.wrong-combination {
    color: #dc2626;
    font-weight: 700;
    font-size: 17px;
}
/* Rapprocher les statistiques et le footer du jeu */
.connections-page {
    padding-bottom: 15px !important;
}

.statistics-section {
    margin-top: 20px !important;
    margin-bottom: 15px !important;
}

/* Réduire l'espace avant le footer */
footer {
    margin-top: 10px !important;
}
/* =========================================
   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;
    }
}