/* =========================================================
   KINÉPÉYI — PAGE DES COMMUNES
   ========================================================= */


/* ---------------------------------------------------------
   PAGE
   --------------------------------------------------------- */

.kp-communes-page {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 70px 30px 90px;
}


/* ---------------------------------------------------------
   INTRODUCTION
   --------------------------------------------------------- */

.kp-communes-intro {
    max-width: 850px;
    margin-bottom: 55px;
}

.kp-communes-eyebrow {
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #7a6b55;
}

.kp-communes-intro h1 {
    margin: 0 0 20px;
}

.kp-communes-description {
    max-width: 800px;
    margin: 0;
    font-size: 18px;
    line-height: 1.65;
    color: #6f665b;
}

.kp-communes-description strong {
    color: #27231e;
    font-weight: 600;
}


/* ---------------------------------------------------------
   OUTILS : RECHERCHE + FILTRES
   --------------------------------------------------------- */

.kp-communes-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 18px;
}


/* Recherche */

.kp-communes-search {
    width: 100%;
    max-width: 420px;
}

#kp-commune-search {
    width: 100%;
    height: 52px;
    padding: 0 20px;
    border: 1px solid #e3ddd2;
    border-radius: 30px;
    background: #ffffff;
    color: #27231e;
    font-size: 15px;
    outline: none;
    box-shadow: 0 3px 12px rgba(45, 38, 28, 0.04);
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

#kp-commune-search::placeholder {
    color: #9a9389;
}

#kp-commune-search:focus {
    border-color: #e6bd3c;
    box-shadow: 0 0 0 3px rgba(230, 189, 60, 0.12);
}


/* ---------------------------------------------------------
   FILTRES
   --------------------------------------------------------- */

.kp-zone-filters {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.kp-zone-filter {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 42px;
    padding: 9px 16px;
    border: 1px solid #e3ddd2;
    border-radius: 999px;
    background: #ffffff;
    color: #625a50;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease,
        color 0.2s ease;
}

.kp-zone-filter span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 23px;
    height: 23px;
    padding: 0 6px;
    border-radius: 50px;
    background: #f4f0e7;
    color: #6f665b;
    font-size: 11px;
    font-weight: 700;
}

.kp-zone-filter:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(45, 38, 28, 0.08);
}

.kp-zone-filter.is-active {
    border-color: #27231e;
    background: #27231e;
    color: #ffffff;
}

.kp-zone-filter.is-active span {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}


/* ---------------------------------------------------------
   NOMBRE DE RÉSULTATS
   --------------------------------------------------------- */

.kp-communes-results-info {
    margin: 0 0 28px;
    color: #857b70;
    font-size: 14px;
    font-weight: 500;
}


/* ---------------------------------------------------------
   GRILLE
   --------------------------------------------------------- */

.kp-communes-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}


/* ---------------------------------------------------------
   CARTE COMMUNE
   --------------------------------------------------------- */

.kp-commune-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 205px;
    padding: 25px;
    border: 1px solid #e9e3d8;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 5px 18px rgba(55, 45, 30, 0.045);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

.kp-commune-card:hover {
    transform: translateY(-5px);
    border-color: #ded5c6;
    box-shadow: 0 12px 28px rgba(55, 45, 30, 0.10);
}


/* ---------------------------------------------------------
   HAUT DE CARTE
   --------------------------------------------------------- */

.kp-commune-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
}

.kp-commune-title-wrapper {
    min-width: 0;
}

.kp-commune-name {
    margin: 0 0 8px !important;
    color: #27231e;
    font-size: 21px !important;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.kp-commune-postal {
    position: relative;
    padding-left: 18px;
    color: #81786d;
    font-size: 14px;
    line-height: 1.4;
}

/* Petit repère de localisation sans bibliothèque d'icônes */

.kp-commune-postal::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 1px;
    width: 8px;
    height: 8px;
    border: 2px solid #9a9185;
    border-radius: 50%;
}

.kp-commune-postal::after {
    content: "";
    position: absolute;
    top: 12px;
    left: 5px;
    width: 4px;
    height: 4px;
    border-right: 2px solid #9a9185;
    border-bottom: 2px solid #9a9185;
    transform: rotate(45deg);
}


/* ---------------------------------------------------------
   BADGES DE ZONE
   --------------------------------------------------------- */

.kp-commune-zone {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding: 6px 11px;
    border-radius: 999px;
    background: #f7f0d7;
    color: #6f5d22;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

/* Différenciation très légère par zone */

.kp-commune-card[data-zone="nord-atlantique"] .kp-commune-zone {
    background: #edf5ec;
    color: #557052;
}

.kp-commune-card[data-zone="nord-caraibes"] .kp-commune-zone {
    background: #edf2f7;
    color: #526a7d;
}

.kp-commune-card[data-zone="centre"] .kp-commune-zone {
    background: #f7f0d7;
    color: #79631e;
}

.kp-commune-card[data-zone="sud"] .kp-commune-zone {
    background: #faeee5;
    color: #9a6545;
}


/* ---------------------------------------------------------
   BAS DE CARTE
   --------------------------------------------------------- */

.kp-commune-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: 35px;
    padding-top: 18px;
    border-top: 1px solid #f0ece5;
}


/* Nombre de kinés */

.kp-commune-kines {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #4e473f;
    font-size: 14px;
    font-weight: 600;
}

.kp-commune-kines-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff6d9;
    color: #d8a91c;
    font-size: 12px;
}


/* ---------------------------------------------------------
   BOUTON VOIR LES KINÉS
   --------------------------------------------------------- */

.kp-commune-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    flex-shrink: 0;
    min-height: 38px;
    padding: 8px 15px;
    border: 1px solid #e7dfce;
    border-radius: 999px;
    background: #fff9e8;
    color: #332d25 !important;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none !important;
    transition:
        transform 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.kp-commune-link:hover {
    transform: translateY(-2px);
    background: #f4c842;
    color: #27231e !important;
    box-shadow: 0 5px 12px rgba(55, 45, 30, 0.10);
}

.kp-commune-link span {
    font-size: 17px;
    line-height: 1;
}


/* ---------------------------------------------------------
   COMMUNES SANS KINÉ
   --------------------------------------------------------- */

.kp-commune-card.no-kines .kp-commune-kines {
    color: #91897e;
}


/* ---------------------------------------------------------
   ÉLÉMENTS MASQUÉS PAR LES FILTRES
   --------------------------------------------------------- */

.kp-commune-card[hidden] {
    display: none !important;
}


/* =========================================================
   TABLETTE
   ========================================================= */

@media (max-width: 1024px) {

    .kp-communes-page {
        padding: 55px 24px 75px;
    }

    .kp-communes-tools {
        align-items: flex-start;
        flex-direction: column;
    }

    .kp-communes-search {
        max-width: 100%;
    }

    .kp-zone-filters {
        justify-content: flex-start;
    }

    .kp-communes-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 650px) {

    .kp-communes-page {
        padding: 38px 18px 60px;
    }

    .kp-communes-intro {
        margin-bottom: 38px;
    }

    .kp-communes-intro h1 {
    margin-bottom: 16px;
    }   

    .kp-communes-description {
        font-size: 16px;
        line-height: 1.6;
    }

    .kp-communes-tools {
        gap: 18px;
    }

    /*
     * Les filtres restent accessibles horizontalement
     * sans créer 5 énormes boutons sur plusieurs lignes.
     */
    .kp-zone-filters {
        width: calc(100% + 18px);
        margin-right: -18px;
        padding-right: 18px;
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .kp-zone-filters::-webkit-scrollbar {
        display: none;
    }

    .kp-zone-filter {
        flex: 0 0 auto;
    }

    .kp-communes-results-info {
        margin-bottom: 20px;
    }

    .kp-communes-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .kp-commune-card {
        min-height: 185px;
        padding: 21px;
        border-radius: 20px;
    }

    .kp-commune-name {
        font-size: 20px !important;
    }

    .kp-commune-card-footer {
        margin-top: 28px;
    }

}


/* =========================================================
   TRÈS PETITS ÉCRANS
   ========================================================= */

@media (max-width: 390px) {

    .kp-commune-card-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .kp-commune-link {
        width: 100%;
    }

}

/* =========================================================
   AJUSTEMENTS DA KINÉPÉYI
   ========================================================= */

/* Accent jaune dans l'introduction */

.kp-communes-eyebrow {
    color: #D59E00;
}


/* Recherche */

#kp-commune-search {
    border-color: #eadcae;
    box-shadow: 0 4px 16px rgba(224, 174, 25, 0.08);
}

#kp-commune-search:focus {
    border-color: #E9B928;
    box-shadow: 0 0 0 4px rgba(233, 185, 40, 0.14);
}


/* Boutons filtres */

.kp-zone-filter {
    border-color: #eadfbd;
    background: #fffdf7;
}

.kp-zone-filter:hover {
    border-color: #E9B928;
}

.kp-zone-filter.is-active {
    border-color: #E9B928;
    background: #E9B928;
    color: #2d281f;
    box-shadow: 0 5px 15px rgba(220, 168, 17, 0.20);
}

.kp-zone-filter.is-active span {
    background: rgba(255, 255, 255, 0.55);
    color: #443914;
}


/* Cartes */

.kp-commune-card {
    border-color: #eee3c5;
    box-shadow: 0 5px 18px rgba(114, 85, 16, 0.055);
}

.kp-commune-card:hover {
    border-color: #E9C95E;
    box-shadow: 0 13px 30px rgba(130, 94, 10, 0.13);
}


/* Code postal */

.kp-commune-postal {
    display: flex;
    align-items: center;
    gap: 6px;

    padding-left: 0;

    color: #817765;
}

.kp-commune-postal::before,
.kp-commune-postal::after {
    display: none;
}


/* SVG */

.kp-icon {
    display: block;
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}


/* Icône localisation */

.kp-commune-postal .kp-icon {
    color: #B9972E;
}


/* Séparation de carte */

.kp-commune-card-footer {
    border-top-color: #f1e8d1;
}


/* Icône kiné */

.kp-commune-kines-icon {
    width: 30px;
    height: 30px;

    background: #FFF3C7;
    color: #D29C00;
}

.kp-commune-kines-icon .kp-icon {
    width: 16px;
    height: 16px;
}


/* Nombre de kinés */

.kp-commune-kines {
    color: #544a39;
}


/* Bouton */

.kp-commune-link {
    border-color: #ead89d;
    background: #FFF7D9;
    color: #332b18 !important;
}

.kp-commune-link:hover {
    border-color: #E9B928;
    background: #E9B928;
    color: #2a2416 !important;

    box-shadow: 0 6px 15px rgba(211, 159, 7, 0.20);
}

/* =========================================================
   BADGES DE ZONE CLIQUABLES
   ========================================================= */

.kp-commune-zone {
    border: 0;
    font-family: inherit;
    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

.kp-commune-zone:hover {
    transform: translateY(-2px);
    filter: saturate(1.15);
    box-shadow: 0 4px 10px rgba(50, 40, 20, 0.10);
}

.kp-commune-zone:focus-visible {
    outline: 2px solid #E9B928;
    outline-offset: 3px;
}

/* =========================================================
   FINITIONS DESKTOP — PAGE COMMUNES
   ========================================================= */


/* ---------------------------------------------------------
   1. FILTRES : TOUJOURS SUR UNE SEULE LIGNE
   --------------------------------------------------------- */

.kp-zone-filters {
    flex-wrap: nowrap;
    gap: 8px;
}

.kp-zone-filter {
    flex: 0 0 auto;
    white-space: nowrap;
    
    /* Légèrement plus compact pour faire tenir les 5 */
    padding: 9px 13px;
    font-size: 13px;
}


/* ---------------------------------------------------------
   2. SUPPRESSION DU ROUGE AU SURVOL
   --------------------------------------------------------- */

.kp-zone-filter:hover {
    border-color: #E9B928;
    background: #FFF7D9;
    color: #332B18;
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(211, 159, 7, 0.12);
}


/* Le bouton actif reste jaune même au survol */

.kp-zone-filter.is-active,
.kp-zone-filter.is-active:hover {
    border-color: #E9B928;
    background: #E9B928;
    color: #2A2416;
    box-shadow: 0 5px 15px rgba(220, 168, 17, 0.20);
}


/* Compteur à l'intérieur du bouton actif */

.kp-zone-filter.is-active span,
.kp-zone-filter.is-active:hover span {
    background: rgba(255, 255, 255, 0.55);
    color: #443914;
}


/* ---------------------------------------------------------
   3. RÉDUCTION DE L'ESPACE SOUS LE MENU
   --------------------------------------------------------- */

.kp-communes-page {
    padding-top: 45px;
}


/* =========================================================
   TABLETTE
   ========================================================= */

@media (max-width: 1024px) {

    .kp-communes-page {
        padding-top: 40px;
    }

}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 650px) {

    .kp-communes-page {
        padding-top: 30px;
    }

}

/* =========================================================
   TYPOGRAPHIE KINÉPÉYI
   ========================================================= */

/* Police générale de la page */
.kp-communes-page {
    font-family: "Inter", sans-serif !important;
}


/* Titres */
.kp-communes-intro h1,
.kp-commune-name {
    font-family: "Sora", sans-serif !important;
    font-weight: 700 !important;
}


/* On s'assure que les éléments interactifs héritent bien d'Inter */
.kp-communes-page button,
.kp-communes-page input,
.kp-communes-page a {
    font-family: "Inter", sans-serif;
}