.hero-maroc {
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    min-height: 720px;
    display: flex;
    flex-direction: column;
}
.flat-slider{
    animation: heroImageReveal 0.6s ease-out forwards;
}
@keyframes heroImageReveal {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
.hero-maroc .container {
    display: flex;
    flex-direction: column;
    flex: 1;
}
.hero-maroc .row {
    flex: 1;
}
.hero-maroc .slider-content {
    height: 116%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 130px 0 50px;
}
.hero-maroc .heading {
    margin-bottom: 0;
}
/* Titre + texte + recherche groupes au centre du hero, avec un petit espace entre le texte et la recherche
   (styles.css ajoute 108px sous le titre sur grand ecran et repousse la recherche tout en bas) */
.hero-maroc.flat-slider.home-1 .slider-content {
    justify-content: center;
    gap: 32px;
}
.hero-maroc.flat-slider.home-1:not(.flat-slider-video) .slider-content .heading {
    margin-bottom: 0;
}
/* Texte sous le titre : plus large (2 lignes maximum sur ordinateur) */
.hero-maroc.flat-slider.home-1 .slider-content .subtitle {
    padding: 0;
    max-width: 940px;
    margin-left: auto;
    margin-right: auto;
}
.hero-maroc .overlay {
    background: #161e2d;
    opacity: 0.45;
}
@media (max-width: 767px) {
    .hero-maroc {
        min-height: 620px;
    }
    .hero-maroc .slider-content {
        padding: 100px 0 30px;
    }
}
.hero-search-box {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0px 10px 40px rgba(0, 0, 0, 0.15);
}
.hero-search-row {
    display: grid;
    gap: 16px;
    margin-bottom: 16px;
}
.hero-search-row.row-bottom {
    margin-bottom: 0;
}
.hero-search-row.row-top {
    grid-template-columns: 1.4fr 1fr;
}
.hero-search-row.row-bottom {
    grid-template-columns: 1fr 1fr 1.3fr;
}
.hero-search-field {
    background: #ffffff;
    border: 1px solid #e4e4e4;
    border-radius: 10px;
    padding: 4px 18px;
    display: flex;
    align-items: center;
}
.hero-search-field .form-control {
    border: 0;
    padding: 12px 0;
    font-size: 15px;
}
.hero-search-field .nice-select {
    border: 0;
    width: 100%;
    height: auto;
    line-height: 22px;
    padding: 12px 30px 12px 0;
}
.hero-search-field .nice-select::after {
    right: 0;
}
.btn-hero-search {
    width: 100%;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #8b3033;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 16px;
}
.btn-hero-search:hover {
    background-color: #76292b;
    color: #ffffff;
}
@media (max-width: 767px) {
    .hero-search-row.row-top,
    .hero-search-row.row-bottom {
        grid-template-columns: 1fr;
    }
}

/* Featured Properties */
.section-title-block {
    margin-bottom: 40px;
}
.section-title-block .title {
    font-size: 40px;
    line-height: 1.25;
    font-weight: 700;
    color: #161e2d;
}
.section-title-block .subtitle {
    color: #6b7280;
    font-size: 18px;
    line-height: 1.6;
    max-width: 760px;
    margin: 14px auto 0;
}
@media (max-width: 767px) {
    .section-title-block .title {
        font-size: 28px;
    }
    .section-title-block .subtitle {
        font-size: 16px;
    }
}

/* Espace entre le hero et la 1re section */
.flat-recommended {
    margin-top: 60px;
}
@media (max-width: 767px) {
    .flat-recommended {
        margin-top: 30px;
    }
}
.properties-carousel-wrap {
    position: relative;
}
.properties-nav {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 8px;
    background-color: #8b3033;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    z-index: 2;
    cursor: pointer;
}
.properties-nav:hover {
    background-color: #76292b;
}
.properties-nav.prev {
    left: -64px;
}
.properties-nav.next {
    right: -64px;
}
.property-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
    height: 100%;
    display: flex;
    flex-direction: column;
}
.property-card-media {
    position: relative;
}
.property-card-media > a {
    display: block;
}
.property-card-media img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}
.property-card-badges {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    gap: 8px;
}
.property-card-badges span {
    background-color: #8b3033;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}
.property-card-actions {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    gap: 8px;
}
.property-card-actions button {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #161e2d;
    cursor: pointer;
}
.property-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
}
.property-card-category {
    font-size: 13px;
    color: #8a939b;
}
.property-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #161e2d;
    margin: 0;
}
.property-card-price {
    font-size: 17px;
    font-weight: 700;
    color: #8b3033;
    margin: 0;
}
.property-card-desc {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.property-card-meta {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin: 4px 0 0;
    padding: 0;
}
.property-card-meta li {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #161e2d;
    font-weight: 600;
}
.property-card-meta li .icon {
    font-size: 16px;
    color: #8a939b;
}
.property-card-buttons {
    margin-top: auto;
    display: flex;
    gap: 10px;
    padding-top: 6px;
}
.btn-property-action {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background-color: #5fc5be;
    color: #ffffff;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 600;
}
.btn-property-action:hover {
    background-color: #51a7a2;
    color: #ffffff;
}
.btn-property-action.icon-only {
    flex: 0 0 44px;
}
.btn-discover-properties {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #8b3033;
    color: #ffffff;
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 700;
}
.btn-discover-properties:hover {
    background-color: #76292b;
    color: #ffffff;
}
.sw-pagination-properties {
    margin-top: 24px;
}
/* Entre 992 et 1299 px la marge de la page est plus etroite que 64 px : fleches rapprochees */
@media (max-width: 1299px) {
    .properties-nav.prev {
        left: -16px;
    }
    .properties-nav.next {
        right: -16px;
    }
}
@media (max-width: 991px) {
    .properties-nav.prev {
        left: -8px;
    }
    .properties-nav.next {
        right: -8px;
    }
}
@media (max-width: 575px) {
    .properties-nav {
        display: none;
    }
}

/* Cities */
.cities-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.city-card {
    position: relative;
    display: block;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}
.city-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease, opacity 0.6s ease;
}
/* Au survol, la 2e photo apparaît en fondu par-dessus la 1re */
.city-card .city-card-img-hover {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.08);
}
.city-card:hover .city-card-img-hover,
.city-card:focus-visible .city-card-img-hover {
    opacity: 1;
    transform: scale(1);
}
.city-card:hover .city-card-img:not(.city-card-img-hover) {
    transform: scale(1.05);
}
.city-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.28);
    pointer-events: none;
}
.city-card-name {
    position: absolute;
    top: 16px;
    left: 16px;
    color: #ffffff;
    font-weight: 700;
    font-size: 16px;
    z-index: 1;
}
.city-card-count {
    position: absolute;
    bottom: 16px;
    left: 16px;
    color: #ffffff;
    font-size: 13px;
    z-index: 1;
}
@media (max-width: 991px) {
    .cities-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .cities-grid {
        gap: 14px;
    }
}

/* Property categories */
.categories-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}
.category-card {
    display: flex;
    align-items: center;
    border: 1px solid #e4e4e4;
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.category-card:hover {
    border-color: transparent;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}
.category-card img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}
.category-card-info {
    padding: 0 16px;
}
.category-card-name {
    font-weight: 700;
    color: #161e2d;
    font-size: 15px;
}
.category-card-count {
    font-size: 13px;
    color: #8a939b;
    margin-top: 4px;
}
@media (max-width: 991px) {
    .categories-row {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 575px) {
    .categories-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Property categories - v2 (image tiles) */
.category-tiles {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}
.category-tile {
    position: relative;
    display: block;
    height: 280px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 26px rgba(22, 30, 45, 0.1);
}
.category-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.category-tile-overlay {
    position: absolute;
    inset: 0;
    background: rgba(22, 30, 45, 0.45);
    transition: background-color 0.3s ease;
}
.category-tile-info {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.category-tile-name {
    color: #ffffff;
    font-weight: 700;
    font-size: 17px;
}
.category-tile-count {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
}
.category-tile-count::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--color-turquoise);
    margin-right: 6px;
}
.category-tile:hover img {
    transform: scale(1.08);
}
.category-tile:hover .category-tile-overlay {
    background: rgba(22, 30, 45, 0.6);
}
@media (max-width: 991px) {
    .category-tiles {
        grid-template-columns: repeat(3, 1fr);
    }
    .category-tile {
        height: 220px;
    }
}
@media (max-width: 575px) {
    .category-tiles {
        grid-template-columns: repeat(2, 1fr);
    }
    .category-tile {
        height: 180px;
    }
}

/* About */
.flat-about-wave {
    display: block;
    width: 100%;
    height: 20px;
}
.flat-about .content-left img {
    border-radius: 20px;
}
@media only screen and (min-width: 992px) {
    .flat-about .content-left {
        /* padding-left: 60px; */
    }
}
.flat-about .content-right img {
   border-radius: 20px;

}
.flat-about .box-title .title {
    text-transform: none;
    font-size: 40px;
    line-height: 1.25;
    font-weight: 700;
}
.flat-testimonial .box-title .title {
    text-transform: none;
    font-size: 40px;
    line-height: 1.25;
    font-weight: 700;
}
/* styles.css limite .box-title a 645px : titre et texte sur 1 ou 2 lignes maximum */
.flat-testimonial .box-title {
    max-width: 1200px;
}
.flat-testimonial .box-title .desc {
    color: #6b7280;
    font-size: 18px;
    line-height: 1.6;
    max-width: 1000px; /* 2 lignes maximum sur ordinateur */
    margin: 14px auto 0;
}
@media (max-width: 767px) {
    .flat-testimonial .box-title .title {
        font-size: 28px;
    }
    .flat-testimonial .box-title .desc {
        font-size: 16px;
    }
}
.badge-pill-teal {
    display: inline-block;
    background-color: #e2f2f0;
    color: #5fc5be;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 16px;
}
.about-checklist {
    list-style: none;
    margin: 24px 0 32px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.about-checklist li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: #161e2d;
}
.about-checklist li .icon {
    font-size: 22px;
    color: #5fc5be;
    flex-shrink: 0;
}
.btn-about {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #8b3033;
    color: #ffffff;
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 700;
}
.btn-about:hover {
    background-color: #76292b;
    color: #ffffff;
}

/* Steps - "Votre projet immobilier en quelques étapes" */
.flat-steps-modern {
    padding-bottom: 60px;
}
.steps-modern-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    margin-top: 50px;
    position: relative;
}
.steps-modern-row::before {
    content: "";
    position: absolute;
    top: 54px;
    left: 12.5%;
    right: 12.5%;
    height: 2px;
    border-top: 2px dashed #e4e4e4;
    z-index: 0;
}
.step-card {
    position: relative;
    z-index: 1;
    background: #ffffff;
    border-radius: 18px;
    padding: 36px 26px 30px;
    text-align: center;
    box-shadow: 0 4px 18px rgba(22, 30, 45, 0.06);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.step-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 36px rgba(22, 30, 45, 0.12);
}
.step-card-number {
    position: absolute;
    top: 14px;
    right: 18px;
    z-index: -1;
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
    color: #f1f2f2;
}
.step-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    margin-bottom: 20px;
    background-color: #8b3033;
    transition: transform 0.35s ease;
}
.step-card-icon .icon {
    font-size: 28px;
    color: #ffffff;
}
.step-card:hover .step-card-icon {
    transform: scale(1.1) rotate(-6deg);
}
.step-card-title {
    font-size: 17px;
    font-weight: 700;
    color: #161e2d;
    margin-bottom: 10px;
}
.step-card-desc {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

/* Animation d'apparition au scroll (activée en JS, dégradation propre sans JS) */
.steps-modern-row.js-ready .step-card {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.35s ease;
}
.steps-modern-row.js-ready .step-card.in-view {
    opacity: 1;
    transform: translateY(0);
}
.steps-modern-row.js-ready .step-card:hover {
    transform: translateY(-8px);
}
.steps-modern-row.js-ready .step-card:nth-child(1) { transition-delay: 0s; }
.steps-modern-row.js-ready .step-card:nth-child(2) { transition-delay: 0.12s; }
.steps-modern-row.js-ready .step-card:nth-child(3) { transition-delay: 0.24s; }
.steps-modern-row.js-ready .step-card:nth-child(4) { transition-delay: 0.36s; }
@media (prefers-reduced-motion: reduce) {
    .steps-modern-row.js-ready .step-card {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

@media (max-width: 991px) {
    .steps-modern-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    .steps-modern-row::before {
        display: none;
    }
}
@media (max-width: 575px) {
    .steps-modern-row {
        grid-template-columns: 1fr;
    }
}

/* Stats */
.flat-stats-red {
    background-color: #8b3033;
    padding: 50px 0;
}
.stats-title {
    color: #ffffff;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 40px;
}
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}
.stat-item {
    border-left: 1px solid rgba(255, 255, 255, 0.25);
    padding-left: 32px;
}
.stat-item:first-child {
    border-left: none;
    padding-left: 0;
}
.stat-number {
    color: #ffffff;
    font-size: 34px;
    font-weight: 800;
    margin-bottom: 10px;
}
.stat-label {
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    opacity: 0.9;
}
@media (max-width: 767px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    .stat-item {
        border-left: none;
        padding-left: 0;
    }
}

/* Header */
/* Default (interior pages, no hero behind it): always solid & branded */
#header.chrijdid-header {
    background-color: #5fc5be;
    box-shadow: 0px 4px 18px 0px rgba(0, 0, 0, 0.08);
    min-height: 100px;
}
/* Homepage hero variant: transparent overlay until the page is scrolled */
#header.chrijdid-header.has-hero {
    background-color: transparent;
    box-shadow: none;
    border-bottom: none;

    margin-bottom: -78px;
    min-height: auto;

    margin-bottom: -85px;

    transition: background-color 0.3s ease;
}
#header.chrijdid-header.has-hero.is-fixed {
    background-color: #5fc5be;
    box-shadow: 0px 4px 18px 0px rgba(0, 0, 0, 0.08);
    min-height: 100px;
}
#header.chrijdid-header .logo-box .logo img {
    min-height: 100px;
    min-width: 120px;
}
/* Sur l'accueil, le header est transparent au-dessus de la photo : on
   affiche la variante blanche du logo (lisible sur fond sombre) plutot
   que la variante foncee utilisee par defaut sur les autres pages. */
#header.chrijdid-header .logo-img-default {
    display: none;
}
#header.chrijdid-header .logo-img-light {
    display: block;
}
.mobile-menu .nav-logo img {
    max-height: 36px;
    width: auto;
}
#header.chrijdid-header .main-menu .navigation {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}
#header.chrijdid-header .main-menu .navigation > li > a {
    color: #ffffff;
    white-space: nowrap;
    text-transform: none;
}
/* Actions rapides du header (langue, connexion) : la version claire de ces
   boutons n'est pas assez lisible sur la photo du hero, donc on reprend le
   meme traitement blanc que les liens du menu ci-dessus, propre a l'accueil. */
#header.chrijdid-header .lang-switcher-toggle {
    color: #ffffff;
}
#header.chrijdid-header .lang-switcher-toggle svg path {
    stroke: #ffffff;
}
#header.chrijdid-header .lang-switcher-toggle .icon {
    color: #ffffff;
}
#header.chrijdid-header .account-menu-toggle svg {
    border-color: rgba(255, 255, 255, 0.5);
}
#header.chrijdid-header .account-menu-toggle svg path {
    stroke: #ffffff;
}
#header.chrijdid-header .btn-login-icon {
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
}
#header.chrijdid-header .lang-switcher-toggle:hover {
    background-color: rgba(255, 255, 255, 0.15);
}
#header.chrijdid-header .btn-login-header {
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
}
#header.chrijdid-header .btn-login-header:hover {
    border-color: #ffffff;
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.15);
}
#header.chrijdid-header .header-divider {
    background-color: rgba(255, 255, 255, 0.35);
}
#header.chrijdid-header .header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #e4e4e4;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
#header.chrijdid-header .mobile-nav-toggler::before,
#header.chrijdid-header .mobile-nav-toggler::after,
#header.chrijdid-header .mobile-nav-toggler span {
    background-color: #ffffff;
}

/* Nos conseils et actualités : toutes les images à la même taille */
.tf-sw-latest .flat-blog-item .img-style {
    overflow: hidden;
}
.tf-sw-latest .flat-blog-item .img-style img {
    width: 100%;
    aspect-ratio: 16 / 10;
    height: auto;
    object-fit: cover;
    display: block;
}

/* ===== Nos offres du moment : badge "Offre speciale" et chrono sur les cartes projet ===== */
.property-card-badges .badge-offer {
    background-color: #d32f2f;
    font-weight: 700;
}
.property-card-timer {
    position: absolute;
    left: 14px;
    bottom: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(22, 30, 45, 0.82);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
}
.property-card-timer b {
    font-size: 14px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.property-card-timer.is-urgent {
    background: #d32f2f;
}
.property-card-price-old {
    margin-left: 6px;
    color: #8a939b;
    font-size: 14px;
    font-weight: 500;
}
