/* =====================================================
   TIBA – Correctifs ciblés (Chrome / responsive)
   ===================================================== */

/* ── 1. SLIDER : forcer la hauteur dans Chrome ──────── */
/* Le bug Chrome : avec fade:true sur Slick, le .slide-item en position:absolute
   n'a pas de hauteur calculée → les sections suivantes remontent dans le slider */

.slider,
.slider .slick-carousel,
.slider .slick-list,
.slider .slick-track {
    display: block !important;
    width: 100%;
}

/* Forcer le conteneur Slick à avoir la même hauteur que le slide actif */
.slider .slick-list {
    overflow: hidden;
}

.slider .slick-slide {
    display: block !important;
}

/* Slide item : position relative + hauteur min pour que Chrome le reconnaisse */
.slider .slide-item,
.slide-item.align-v-h {
    position: relative !important;
    min-height: 500px;
    display: flex !important;
    align-items: center;
    overflow: hidden;
}

/* Image de fond : couvre tout le slide */
.slide-item .bg-img {
    position: absolute !important;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.slide-item .bg-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Contenu au-dessus de l'image */
.slide-item>.container,
.slide-item>.container-fluid {
    position: relative;
    z-index: 2;
}

/* La section slider ne doit jamais déborder vers le bas */
section.slider {
    position: relative;
    z-index: 1;
    overflow: hidden;
}

/* Sections suivantes */
section.contact-info,
section.about-layout2,
section.team-layout2,
section.work-process,
section.blog-grid,
section.services-layout1 {
    position: relative;
    z-index: 1;
    background: #fff;
}

section.work-process,
section.services-layout1 {
    background: inherit;
}

/* ── 1.b Home page vertical rhythm ── */
.home-sections-stack>section:not(.slider),
.home-sections-stack>div>section {
    padding-top: clamp(24px, 3.5vw, 46px) !important;
    padding-bottom: clamp(24px, 3.5vw, 46px) !important;
}

.home-sections-stack>section.contact-info {
    padding-top: 0 !important;
    padding-bottom: clamp(4px, 1.2vw, 12px) !important;
}

.home-sections-stack>section.contact-info+section.team-layout2 {
    padding-top: clamp(8px, 1.6vw, 20px) !important;
}

.home-sections-stack>section.team-layout2+section.about-layout2 {
    padding-top: clamp(8px, 1.4vw, 18px) !important;
}

.home-sections-stack>section.team-layout2 .heading {
    margin-bottom: 22px !important;
}

/* ── 2. Contact info boxes ── */
.contact-info .boxes-wrapper {
    margin-left: 0;
    margin-right: 0;
}

.contact-info .contact-box {
    padding: 25px 20px;
    height: 100%;
    box-sizing: border-box;
}

/* ── 3. Services carousel – heading text visible on dark bg ── */
.services-layout1 .heading-light .heading__title,
.services-layout1 .heading-light .heading__desc {
    color: #ffffff;
}

.services-layout1 .heading-light .heading__subtitle {
    color: #f0f0f0;
}

/* ── 4. Images responsive partout ── */
img {
    max-width: 100%;
    height: auto;
}

/* ── 5. Photo médecin cadrée ── */
.member__img img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: top center;
    display: block;
}

/* ── 6. Image activité / article cadrée ── */
.post__img img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

/* ── 7. About section layout ── */
.about-layout2 .video-banner-layout2 {
    position: relative;
    overflow: hidden;
}

.about-layout2 .video-banner-layout2 img {
    width: 100%;
    height: auto;
    display: block;
}

/* ── 8. Uniformiser la taille des cards (Accueil) ── */
.home-sections-stack .team-layout2 .slick-track {
    display: flex !important;
}

.home-sections-stack .team-layout2 .slick-slide {
    height: auto !important;
}

.home-sections-stack .team-layout2 .slick-slide>div {
    height: 100%;
}

.home-sections-stack .team-layout2 .member {
    width: 100%;
    height: 100%;
    min-height: 510px;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}

.home-sections-stack .team-layout2 .member__info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.home-sections-stack .team-layout2 .member__job {
    min-height: 44px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.home-sections-stack .team-layout2 .member__desc {
    min-height: 66px;
    margin-bottom: 16px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.home-sections-stack .team-layout2 .member__info .btn {
    margin-top: auto;
}

.home-sections-stack .blog-grid .row>[class*=col-] {
    display: flex;
}

.home-sections-stack .blog-grid .post-item {
    width: 100%;
    height: 100%;
    min-height: 540px;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}

.home-sections-stack .blog-grid .post-item .post__body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.home-sections-stack .blog-grid .post-item .post__title {
    min-height: 54px;
    margin-bottom: 14px;
}

.home-sections-stack .blog-grid .post-item .post__title a {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.home-sections-stack .blog-grid .post-item .post__desc {
    min-height: 72px;
    margin-bottom: 16px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.home-sections-stack .blog-grid .post-item .btn {
    margin-top: auto;
}

/* ── 9.b Responsive language switch ── */
.mobile-lang-inline,
.nav__item-mobile-lang {
    display: none;
}

@media (min-width: 992px) and (max-width: 1199px) {
    .nav__item-mobile-lang {
        display: block;
    }

    .navbar .mobile-lang-switch {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 10px 15px 12px;
        border-top: 1px solid #f0f0f0;
        margin-top: 6px;
        color: #8393b2;
        font-size: 13px;
        letter-spacing: 0.3px;
    }

    .navbar .mobile-lang-switch a {
        color: #213360;
        font-weight: 600;
    }

    .navbar .mobile-lang-switch a.is-active {
        color: #6440fb;
    }
}

@media (max-width: 991px) {
    .nav__item-mobile-lang {
        display: none !important;
    }

    .navbar .mobile-lang-inline {
        position: absolute;
        right: 64px;
        top: 50%;
        transform: translateY(-50%);
        display: flex;
        align-items: center;
        gap: 6px;
        color: #8393b2;
        font-size: 13px;
        letter-spacing: 0.3px;
        z-index: 5;
    }

    .navbar .mobile-lang-inline a {
        color: #213360;
        font-weight: 700;
    }

    .navbar .mobile-lang-inline a.is-active {
        color: #6440fb;
    }
}

/* ── 9. Footer compact ── */
.footer .footer-primary {
    padding-top: 48px;
    padding-bottom: 28px;
}

.footer .footer-secondary {
    padding: 18px 0;
}

.footer [class*=footer-widget] {
    margin-bottom: 12px;
}

.footer .footer-widget__title {
    margin-bottom: 10px;
}

.footer .footer-primary .row {
    row-gap: 10px;
}

.footer .footer-primary .row>[class*=col-] {
    display: flex;
}

.footer .footer-primary .row>[class*=col-]>[class*=footer-widget] {
    width: 100%;
}

.footer .footer-widget-nav,
.footer .footer-widget-about,
.footer .footer-widget-contact {
    margin-top: 0 !important;
}

.footer .footer-widget-about img {
    margin-bottom: 16px !important;
}

.footer .footer-widget-about p {
    margin-bottom: 12px;
}

.footer .footer-widget-contact {
    padding: 24px;
}

.footer .footer-widget-contact:after {
    top: 24px;
    bottom: 24px;
}

.footer .footer-widget-nav li a {
    margin-bottom: 5px;
    line-height: 1.35;
}

.footer .footer-widget-contact .contact-list {
    margin-bottom: 8px;
}

.footer .footer-widget-contact .contact-list li {
    line-height: 1.45;
}

.footer .footer-widget-contact .d-flex {
    margin-top: 8px;
}

.footer .phone__number {
    margin: 12px 0;
    font-size: 18px;
}

@media (max-width: 1200px) {
    .footer .footer-primary {
        padding-top: 28px;
        padding-bottom: 16px;
    }

    .footer .footer-secondary {
        padding: 14px 0;
    }

    .footer [class*=footer-widget] {
        margin-bottom: 14px;
    }

    .footer .footer-widget__title {
        margin-bottom: 8px;
    }

    .footer .footer-primary .row {
        row-gap: 8px;
    }

    .footer .footer-widget-contact {
        padding: 18px;
    }

    .footer .footer-widget-contact:after {
        top: 18px;
        bottom: 18px;
    }

    .footer .phone__number {
        margin: 8px 0;
        font-size: 17px;
    }
}

@media (max-width: 767px) {
    .footer .footer-primary .row>[class*=col-] {
        display: block;
    }

    .footer .footer-primary {
        padding-top: 22px;
        padding-bottom: 10px;
    }

    .footer .footer-secondary {
        padding: 10px 0;
    }

    .footer .footer-secondary:after {
        height: 2px;
    }
}

/* ── 8. Mobile responsive ── */
@media (max-width: 991px) {
    .navbar-collapse {
        background: #fff;
        padding: 15px;
        border-top: 1px solid #eee;
    }

    .navbar-nav .nav__item {
        border-bottom: 1px solid #f0f0f0;
    }

    .slide-item.align-v-h {
        min-height: 360px;
    }

    /* Slider text must wrap on mobile/tablet and never overflow horizontally */
    .slider .slide-item .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .slider .slide-item .row {
        margin-left: 0;
        margin-right: 0;
    }

    .slider .slide-item [class*=col-] {
        padding-left: 0;
        padding-right: 0;
        flex: 0 0 72%;
        max-width: 72%;
    }

    .slider .slide__content {
        max-width: 100%;
        margin-right: auto;
    }

    .slider .slide__title,
    .slider .slide__desc {
        white-space: normal !important;
        overflow-wrap: anywhere;
        word-break: break-word;
        hyphens: auto;
    }

    .slider .slide__title {
        font-size: clamp(22px, 4.4vw, 34px) !important;
        line-height: 1.24;
        margin-bottom: 12px;
    }

    .slider .slide__desc {
        font-size: clamp(13px, 2.1vw, 15px);
        line-height: 1.38;
        max-width: 100%;
        margin-right: 0;
        margin-bottom: 18px;
    }

    .slider .features-list {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: min(320px, 100%);
    }

    .slider .features-list .feature-item {
        margin-right: 0;
        min-width: 0;
        padding: 8px 6px;
        border-radius: 10px;
        background-color: rgba(255, 255, 255, 0.88);
    }

    .slider .features-list .feature-item .feature__icon {
        width: 34px;
        height: 34px;
        font-size: 16px;
        margin: 0 auto 5px;
    }

    .slider .features-list .feature-item .feature__title {
        margin: 0;
        font-size: 11px !important;
        line-height: 1.2;
        color: #213360;
        white-space: normal !important;
        overflow-wrap: normal;
        word-break: normal;
        hyphens: none;
    }

    /* Contact boxes stacked */
    .contact-info .contact-box {
        margin-bottom: 0;
    }

    /* About section */
    .about-layout2 .col-lg-5,
    .about-layout2 .col-lg-7 {
        margin-bottom: 30px;
    }

    .home-sections-stack>section:not(.slider),
    .home-sections-stack>div>section {
        padding-top: 26px !important;
        padding-bottom: 26px !important;
    }

    .home-sections-stack>section.contact-info {
        padding-top: 0 !important;
        padding-bottom: 6px !important;
    }

    .home-sections-stack>section.contact-info+section.team-layout2 {
        padding-top: 14px !important;
    }

    .home-sections-stack>section.team-layout2 .heading {
        margin-bottom: 18px !important;
    }

    .home-sections-stack .team-layout2 .member {
        min-height: 490px;
    }

    .home-sections-stack .blog-grid .post-item {
        min-height: 510px;
    }
}

@media (max-width: 767px) {
    .slide-item.align-v-h {
        min-height: 300px;
    }

    .slider .slide-item [class*=col-] {
        flex: 0 0 70%;
        max-width: 70%;
    }

    .slider .slide__title {
        font-size: clamp(20px, 5.8vw, 28px) !important;
        line-height: 1.22;
    }

    .slider .slide__desc {
        font-size: 13px;
        line-height: 1.35;
    }

    .slider .features-list {
        width: min(290px, 100%);
        gap: 6px;
    }

    .slider .features-list .feature-item {
        padding: 7px 5px;
    }

    .slider .features-list .feature-item .feature__icon {
        width: 30px;
        height: 30px;
        font-size: 14px;
        margin-bottom: 4px;
    }

    .slider .features-list .feature-item .feature__title {
        font-size: 10px !important;
    }

    /* Contact boxes: full width on mobile */
    .contact-info .col-sm-12 {
        margin-bottom: 0;
    }

    .post-item {
        margin-bottom: 24px;
    }

    .member {
        margin-bottom: 24px;
    }

    /* Services carousel heading */
    .services-layout1 .heading {
        padding: 0 15px;
    }

    /* Work process section */
    .work-process.pt-130 {
        padding-top: 30px;
    }

    .home-sections-stack>section:not(.slider),
    .home-sections-stack>div>section {
        padding-top: 22px !important;
        padding-bottom: 22px !important;
    }

    .home-sections-stack>section.contact-info {
        padding-bottom: 5px !important;
    }

    .home-sections-stack>section.contact-info+section.team-layout2 {
        padding-top: 12px !important;
    }

    .home-sections-stack>section.team-layout2 .heading {
        margin-bottom: 16px !important;
    }

    .home-sections-stack .blog-grid .row>[class*=col-] {
        display: block;
    }

    .home-sections-stack .team-layout2 .member,
    .home-sections-stack .blog-grid .post-item {
        min-height: 0;
    }

    .home-sections-stack .team-layout2 .member__job,
    .home-sections-stack .team-layout2 .member__desc,
    .home-sections-stack .blog-grid .post-item .post__title,
    .home-sections-stack .blog-grid .post-item .post__desc {
        min-height: 0;
    }
}

@media (max-width: 575px) {
    .slide-item.align-v-h {
        min-height: 280px;
    }

    .slider .slide-item [class*=col-] {
        flex: 0 0 62%;
        max-width: 62%;
    }

    .slide__title {
        font-size: 19px !important;
        line-height: 1.2;
    }

    .slide__desc {
        font-size: 12.5px;
        line-height: 1.4;
    }

    .slider .features-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: min(200px, 100%);
        gap: 4px;
    }

    .slider .features-list .feature-item {
        display: block;
        text-align: center;
        padding: 5px 4px;
        margin-bottom: 0 !important;
    }

    .slider .features-list .feature-item .feature__icon {
        margin: 0 auto 3px;
        width: 22px;
        height: 22px;
        font-size: 11px;
    }

    .slider .features-list .feature-item .feature__title {
        font-size: 9.5px !important;
        line-height: 1.15;
    }

    /* Feature items wrap properly */
    .features-list .feature-item {
        margin-bottom: 10px;
    }

    .home-sections-stack>section:not(.slider),
    .home-sections-stack>div>section {
        padding-top: 18px !important;
        padding-bottom: 18px !important;
    }

    .home-sections-stack>section.contact-info {
        padding-bottom: 4px !important;
    }

    .home-sections-stack>section.contact-info+section.team-layout2 {
        padding-top: 10px !important;
    }

    .home-sections-stack>section.team-layout2 .heading {
        margin-bottom: 12px !important;
    }
}