/* ========== Chiffres : forcer les chiffres alignés (lining) ==========
   Raleway rend des chiffres "old-style" par défaut (certains montent/descendent
   hors de la ligne de base). On force les chiffres alignés sur tout le site. */
body,
input,
button,
select,
textarea {
    font-variant-numeric: lining-nums;
    -moz-font-feature-settings: "lnum" 1;
    -webkit-font-feature-settings: "lnum" 1;
    font-feature-settings: "lnum" 1;
}

/* ========== Header redesign (barre utilitaire + menu principal) ========== */
.header-redesign {
    background: #fff;
}

.dropdown-menu {
    min-width: 16rem !important;
}

.header-utility-bar {
    font-size: 0.75rem;
    padding-right: 8rem;
    line-height: 1.2;
    min-height: 0;
}

.header-utility-inner {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    gap: 1rem;
}

.header-utility-link {
    color: #495057;
    text-decoration: none;
    white-space: nowrap;
}

.header-utility-link:hover {
    color: #328fb6;
    text-decoration: none;
}

/* Mobile : liens utilitaires sous le trait, en petit */
@media (max-width: 1269px) {
    .header-utility-mobile {
        font-size: 0.7rem;
        color: #495057;
        text-align: center;
    }

    .header-utility-mobile-link {
        color: inherit;
        text-decoration: none;
        white-space: nowrap;
    }

    .header-utility-mobile-link:hover {
        color: #328fb6;
        text-decoration: none;
    }
}

.header-utility-right {
    gap: 1rem;
}

.header-search-form {
    display: flex;
    align-items: center;
    background: #f1f3f5;
    border-radius: 6px;
    overflow: hidden;
}

.header-search-input {
    border: none;
    background: transparent;
    padding: 0.4rem 0.75rem;
    width: 220px;
    font-size: 0.875rem;
}

.header-search-input::placeholder {
    color: #6c757d;
}

.header-search-input:focus {
    outline: none;
}

.header-search-btn {
    background: #e9ecef;
    border: none;
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    color: #495057;
}

.header-lang-utility a,
.header-lang-nav a,
.header-lang-mobile a {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #328fb6 !important;
    border: 1px solid #328fb6;
    border-radius: 4px;
    padding: 0.1rem 0.8rem !important;
    text-decoration: none !important;
    transition: background 0.2s ease, color 0.2s ease;
}

/* Survol : fond bleu clair, texte bleu foncé pour rester lisible */
.header-lang-utility a:hover,
.header-lang-nav a:hover,
.header-lang-mobile a:hover,
.header-main-bar .header-lang-utility a.nav-link:hover,
.header-main-bar .header-lang-nav a.nav-link:hover,
.header-main-bar .header-lang-mobile a.nav-link:hover {
    background: #e8f4f8 !important;
    color: #1a5276 !important;
    border-color: #328fb6;
}

.header-lang-mobile {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.header-main-bar {
    background: #fff;
}

.header-main-bar .navbar {
    background: transparent !important;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
    min-height: 4.5rem;
    /* ~72px, compromis de base, s’adapte aux préférences de taille de police */
    max-height: 6rem;

}

@media (min-width: 1270px) {

    /* Bordure fine sur toute la largeur du header desktop */
    .header-main-bar {
        border-bottom: 1px solid #d0d0d0;
    }
}

.header-main-bar .navbar .container {
    padding-top: 0;
    padding-bottom: 0;
    min-height: 100%;
}

.hero-section {
    margin-top: -20px;
}

.header-logo-wrap {
    display: flex;
    align-items: center;
    height: 100%;
    min-height: 0;
    /* permet au flex child de respecter max-height */
}

.header-logo {
    max-height: 7rem;
    /* reste dans la barre 8rem avec padding */
    height: auto;
    padding-top: 10px;
    width: auto;
    object-fit: contain;
}

.header-partner-logo {
    max-height: 28px;
    width: auto;
    filter: grayscale(100%);
    opacity: 0.8;
    margin-left: 0.5rem !important;
}

.header-nav-links .nav-link {
    color: #1a5276 !important;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    /* padding: 0.35rem 0.5rem !important; */
}

.header-nav-links .nav-link:hover {
    color: #328fb6 !important;
    border-bottom: 1px solid #328fb6;
}

.header-nav-cta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0;
    margin-bottom: 10px;
}

@media (min-width: 1270px) {
    .header-nav-cta {
        flex-basis: 100%;
        /* border-top: 1px solid #e9ecef; */
        justify-content: flex-end;
        margin-left: auto;
    }
}

@media (max-width: 1269px) {
    .header-nav-cta {
        margin-left: auto;
        background: #273a41;
        padding: 0.4rem 0.75rem;
        border-radius: 4px;
    }

    /* Bouton « Demander une intervention » : texte sur plusieurs lignes, pas de débordement */
    .header-btn-schedule {
        font-size: 0.65rem;
        white-space: normal;
        line-height: 1.2;
        padding: 0.4rem 0.35rem;
        text-align: center;
    }

    /* Mobile : CTA pleine largeur, empilés */
    .header-mobile-cta {
        padding: 0 30px;
    }

    .header-mobile-cta .header-btn-schedule,
    .header-mobile-cta .header-btn-phone {
        display: block;
        width: 100%;
        text-align: center;
    }

    /* Mobile : menu aligné à gauche */
    .header-nav-links {
        align-items: flex-start !important;
    }

    .header-nav-links .nav-link {
        width: 100%;
        text-align: left !important;
    }
}

.header-btn-schedule {
    background: #328fb6;
    color: #fff !important;
    padding: 0.35rem 0.65rem;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.header-btn-schedule:hover {
    background: #2a7a9e;
    color: #fff !important;
}

.text-white {
    color: #fff !important;
}

.header-btn-phone {
    background: #25b59e;
    color: #fff !important;
    padding: 0.35rem 0.65rem;
    border-radius: 4px;
    margin-right: 5rem;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.header-btn-phone:hover {
    background: #16A34A;
    color: #fff !important;
}

@media (min-width: 1270px) {
    .header-main-bar .navbar-collapse {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .header-nav-links {
        flex-direction: row;
        align-items: center;
    }
}

/* Titre principal "Areas We Serve" */
.areas-main-title {
    color: #328fb6;
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

@media (min-width: 1270px) {
    .header-main-bar {
        border-bottom: 1px solid #d0d0d0;
    }
}

/* Carte de région */
.region-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 10px 32px;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
}

/* Barre verticale teal-blue sur le bord gauche */
.region-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 10px;
    background: #328fb6;
}

/* En-tête de région avec icône */
.region-header {
    display: flex;
    align-items: center;
    gap: 12px;

    padding-left: 8px;
}

/* Icône de pin rouge */
.map-pin-icon {
    font-size: 24px;
    line-height: 1;
}

/* Titre de la région */
.region-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #212529;
    text-decoration: none;
    transition: color 0.3s ease;
}

.region-title:hover {
    color: #328fb6;
    text-decoration: none;
}

/* Grille des villes en 4 colonnes */
.cities-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);

    padding-left: 8px;
}

/* Lien de ville */
.city-link {
    color: #212529;
    font-size: 15px;
    line-height: 1.6;
    text-decoration: none;
    transition: color 0.3s ease, padding-left 0.3s ease;
    display: block;
}

.city-link:hover {
    color: #328fb6;
    text-decoration: none;
    padding-left: 4px;
}

/* Responsive - 3 colonnes sur tablette */
@media (max-width: 992px) {
    .cities-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px 20px;
    }

    .areas-main-title {
        font-size: 2rem;
    }

    .region-title {
        font-size: 1.5rem;
    }
}

/* Responsive - 2 colonnes sur mobile */
@media (max-width: 768px) {
    .cities-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px 16px;
    }

    .region-card {
        padding: 20px 24px;
    }

    .region-card::before {
        width: 6px;
    }

    .areas-main-title {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }

    .region-title {
        font-size: 1.25rem;
    }

    .city-link {
        font-size: 14px;
    }

    .map-pin-icon {
        font-size: 20px;
    }
}

/* Responsive - 1 colonne sur très petit mobile */
@media (max-width: 480px) {
    .cities-grid {
        grid-template-columns: 1fr;
    }
}



.text a {
    text-decoration: underline;
}

.text a:hover,
.text a:focus {
    color: #003366;
    text-decoration-thickness: 2px;
}

.dropdown-menu {
    right: 0;
    left: auto;
    max-width: 100%;
    overflow-wrap: break-word;
}

.dropdown-menu .dropdown-item,
.dropdown-menu .nav-link {
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
}

.dropleft .dropdown-menu {
    background-color: #e5e5e5;
}

/* Garder le sous-menu ouvert au survol du panneau (éviter la fermeture en déplaçant la souris vers le sous-sous-menu) */
@media (min-width: 992px) {

    .dropdown:hover>.dropdown-menu,
    .dropdown>.dropdown-menu:hover,
    .dropleft:hover>.dropdown-menu,
    .dropleft>.dropdown-menu:hover {
        display: block;
    }
}

.logo-design {
    width: 95%;
}

.logo-size {
    width: 57%
}


@media only screen and (max-width: 990px) {
    .logo-design {
        width: 75%;
    }

    .logo-size {
        width: 42%
    }
}

.close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    visibility: hidden;
    /* Hide the button by default */
}

body.fixed-nav {
    padding-top: 110px;
    /* barre utilitaire + menu principal */
}

body {
    overflow-x: hidden;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    transform-origin: right center;
}

/* Quand le menu mobile est ouvert : bloquer le scroll du fond */
body.menu-open {
    overflow: hidden;
    height: 100%;
}

body.navbar-collapse.show {
    transform: translateX(-80%);
    opacity: 0.7;
}

@media (max-width: 1269px) {
    .navbar-collapse {
        position: fixed;
        top: 0;
        right: -80%;
        width: 80%;
        height: 100%;
        max-height: 100vh;
        transition: right 0.3s ease-in-out;
        background-color: #fff;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        z-index: 1050;
        display: flex;
        flex-direction: column;
    }

    .navbar-collapse.show {
        right: 0;
        display: flex !important;
        flex-direction: column;
    }

    .sideways-toggle {
        transition: transform 0.3s ease-in-out;
    }

    .navbar-toggler[aria-expanded="true"] {
        transform: none;
    }

    .close-button {
        visibility: visible;
        position: absolute;
        top: 25px;
        right: 30px;
    }

    .close-button .close {
        font-size: 1.5rem;
        color: #000;
        background: transparent;
        border: none;
        cursor: pointer;
    }

    body.navbar-collapse.show+.page-content {
        margin-right: 80%;
    }

    body.navbar-collapse.show {
        opacity: 0.7;
    }

    .navbar-nav {
        padding: 0px 30px 30px;
        width: 100%;
    }

    /* Dropdowns en mobile : affichage en flux (scroll dans le panneau) */
    .navbar-collapse .dropdown-menu {
        position: static !important;
        float: none;
        width: 100%;
        max-width: 100%;
        margin: 0.25rem 0;
        border: none;
        box-shadow: none;
        background-color: rgba(0, 0, 0, 0.04);
        overflow-wrap: break-word;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .navbar-collapse .dropdown-menu .dropdown-item,
    .navbar-collapse .dropdown-menu .nav-link {
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
        max-width: 100%;
    }

    .navbar-collapse .dropdown .dropdown-menu {
        padding-left: 1rem;
        box-sizing: border-box;
    }

    /* Sous-sous-menu : ne pas dépasser le cadre du parent (largeur = parent moins la marge) */
    .navbar-collapse .dropleft .dropdown-menu {
        margin-left: 1rem;
        max-width: calc(100% - 1rem);
        width: 100%;
        box-sizing: border-box;
    }

    .lang-btn>a {
        font-size: 1rem;
        color: #212529;
        background: #dee2e6;
        border-color: #dee2e6;
        text-transform: uppercase;
        padding: 5px 30px;
        margin-right: 2rem;
    }

    .custom-toggler {
        display: flex;
        align-items: center;
        border: none;
        /* Optional: To remove the border */
        outline: none;
        /* Optional: To remove the outline */
    }

    .menu-font {
        font-size: 1rem;
    }

    .navbar {
        flex-wrap: nowrap;
    }
}

/* ========== Blog listing (cartes articles) ========== */
.blog-card-inner {
    border-radius: 10px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.blog-card-inner:hover {
    box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.1) !important;
}

.blog-card-title a:hover {
    color: #328fb6 !important;
    text-decoration: underline !important;
}

.blog-card-image-link {
    line-height: 0;
    background: #f0f0f0;
    overflow: hidden;
    display: block;
}

.blog-card-image-link img {
    transition: transform 0.25s ease;
    transform-origin: center center;
}

.blog-card-inner:hover .blog-card-image-link img {
    transform: scale(1.02);
}

.blog-card-link {
    color: #328fb6;
    font-weight: 600;
    text-decoration: none;
}

.blog-card-link:hover {
    color: #22607a;
    text-decoration: underline;
}

.blog-card-date {
    font-size: 0.85rem;
}

.blog-card-date-wrap {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding-bottom: 0.35rem;
    margin-bottom: 0.5rem;
    margin-top: 0.15rem;
}

.blog-card-body {
    padding: 0.75rem 1rem;
}

.blog-card-body .card-title {
    margin-bottom: 0.25rem;
}

.blog-card-body .custom-summary,
.blog-card-body .blog-card-preview {
    font-size: 0.95rem;
    line-height: 1.45;
    margin-top: 0.25rem;
}

.blog-card-body .custom-summary+.blog-card-link {
    margin-top: 0.5rem;
}

/* ========== Blog hero (bannière haut de page blog) ========== */
.blog-hero {
    position: relative;
    min-height: 180px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
}

.blog-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(39, 58, 65, 0.75) 0%, rgba(39, 58, 65, 0.5) 100%);
}

.blog-hero-inner {
    position: relative;
    z-index: 1;
    padding: 1.5rem 0;
    color: #fff;
}

.blog-hero-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: #fff;
}

.blog-hero-tagline {
    font-size: 1rem;
    opacity: 0.9;
}

@media (min-width: 768px) {
    .blog-hero {
        min-height: 220px;
    }

    .blog-hero-title {
        font-size: 2rem;
    }

    .blog-hero-tagline {
        font-size: 1.1rem;
    }
}

/* Showcase sidebar : centrée sur mobile */
.showcase-sidebar-box {
    max-width: 420px;
    width: auto !important;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 992px) {
    .showcase-sidebar-box {
        max-width: none;
        width: 100% !important;
    }
}