.almarai-light {
  font-family: "Almarai", sans-serif;
  font-weight: 300;
  font-style: normal;
}

.almarai-regular {
  font-family: "Almarai", sans-serif;
  font-weight: 400;
  font-style: normal;
}

.almarai-bold {
  font-family: "Almarai", sans-serif;
  font-weight: 700;
  font-style: normal;
}

.almarai-extrabold {
  font-family: "Almarai", sans-serif;
  font-weight: 800;
  font-style: normal;
}

/* ==========================================================
 * Police du site (arabe + latin)
 * Pour changer de police : modifier --app-font ici
 * et le lien Google Fonts dans frontend/views/layouts/main.php
 * ========================================================== */
:root {
  --app-font: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
}

/* Le thème impose Roboto / Rubik / Montserrat (latin uniquement) sur de nombreux éléments :
   on les remplace partout, sauf sur les icônes (Font Awesome, Remixicon), dont les polices
   sont portées par <i>, .fa* ou les pseudo-éléments ::before / ::after (non concernés ici). */
body,
body *:not(i):not(.fa):not(.fas):not(.far):not(.fab):not([class*="fa-"]):not([class^="ri-"]):not([class*=" ri-"]) {
  font-family: var(--app-font) !important;
}

/* Classes Almarai existantes : même police, graisses conservées */
.almarai-light { font-weight: 300; }
.almarai-regular { font-weight: 400; }
.almarai-bold { font-weight: 700; }
.almarai-extrabold { font-weight: 700; }

/* L'arabe se lit mieux avec un interligne un peu plus grand */
body { line-height: 1.7; }
h1, h2, h3, h4, h5, h6 { line-height: 1.4; }

/* ==========================================================
 * Identité Loge.ma
 * Les couleurs du thème sont définies dans color1.css (:root) :
 * marine #012859, cyan #00a3c9, cyan foncé #0091b8, anthracite #272626
 * ========================================================== */
:root {
  --brand-navy: #012859;
  --brand-cyan: #00a3c9;
  --brand-cyan-dark: #0091b8;
  --brand-ink: #272626;
}

/* Logo de l'en-tête (fichier en 2x : 501×120) */
header .menu .brand-logo { flex-shrink: 0; }
header .menu .brand-logo img { height: 52px; width: auto; max-width: 100%; }
@media (max-width: 767px) { header .menu .brand-logo img { height: 34px; } }

/* Logo du pied de page (version blanche) */
.footer-bg .footer-details img { height: 56px; width: auto; }

::selection { background: var(--brand-cyan); color: #fff; }

/* Étiquettes de contrat (cartes et fiche) : vente = marine, location = cyan */
.label.label-shadow { background-color: var(--brand-navy); box-shadow: 0 0 9px 3px rgba(1, 40, 89, .2); }
.label.label-shadow.label-location { background-color: var(--brand-cyan-dark); box-shadow: 0 0 9px 3px rgba(0, 145, 184, .2); }

/* Bandeau titre des pages intérieures : réduit (thème : 500px) pour laisser voir le contenu */
.breadcrumb-section.breadcrumb-compact,
.breadcrumb-section.breadcrumb-compact .breadcrumb-content { height: 280px; }
.breadcrumb-section.breadcrumb-compact .breadcrumb-content { padding-top: 90px; }
/* image centrée (le thème l'aligne en haut à gauche, ce qui coupe le sujet sur mobile) */
.breadcrumb-section.breadcrumb-compact { background-position: center center !important; }
/* moins d'espace blanc entre le bandeau et le contenu */
.breadcrumb-section.breadcrumb-compact + section { padding-top: 50px; }
.breadcrumb-section.breadcrumb-compact .breadcrumb-content div h2 { font-size: calc(24px + 10 * (100vw - 320px) / 1600); margin-bottom: 6px; }
/* voile marine pour garder le titre lisible quelle que soit la photo */
.breadcrumb-section.breadcrumb-compact::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to left, rgba(1, 40, 89, .55), rgba(1, 40, 89, .15)); z-index: -1; }
@media (max-width: 991px) {
  .breadcrumb-section.breadcrumb-compact,
  .breadcrumb-section.breadcrumb-compact .breadcrumb-content { height: 220px; }
  .breadcrumb-section.breadcrumb-compact .breadcrumb-content { padding-top: 75px; }
}

/* Témoignages : pastille d'initiales quand il n'y a pas de photo */
.avatar-initiales { width: 70px; height: 70px; background: var(--brand-navy); color: #fff; box-shadow: 0 0 0 4px rgba(0, 163, 201, .25); }

/* ==========================================================
 * Accueil : « Laissez-nous votre recherche » et « Confiez-nous votre bien »
 * ========================================================== */
.bloc-surtitre { display: inline-block; font-size: 13px; font-weight: 600; color: var(--brand-cyan-dark); background: rgba(0, 163, 201, .1); padding: 4px 12px; border-radius: 50px; }
.bloc-recherche { background: linear-gradient(135deg, rgba(0, 163, 201, .08), rgba(1, 40, 89, .05)); border: 1px solid rgba(1, 40, 89, .08); border-radius: 16px; padding: 40px; }
.bloc-recherche h2 { color: var(--brand-navy); }
.bloc-etapes li { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; font-weight: 500; color: var(--brand-ink); }
.bloc-etapes li span { flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--brand-navy); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; }
.bloc-confier { padding: 80px 0; background: linear-gradient(135deg, #012859 0%, #01407a 60%, #0091b8 100%); color: #fff; }
.bloc-confier h2, .bloc-confier p { color: #fff; }
.bloc-confier p { opacity: .85; }
.bloc-confier .bloc-surtitre { color: #fff; background: rgba(255, 255, 255, .15); }
.bloc-atouts li { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; font-weight: 500; }
.bloc-atouts li i { width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; background: rgba(255, 255, 255, .12); color: #5fd3ef; display: inline-flex; align-items: center; justify-content: center; }
.bloc-confier-carte { background: #fff; color: var(--brand-ink); border-radius: 16px; padding: 30px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.bloc-confier-carte h4 { color: var(--brand-navy); }
@media (max-width: 767px) {
  .bloc-recherche { padding: 24px 18px; }
  .bloc-confier { padding: 50px 0; }
  .bloc-confier-carte { padding: 20px; }
}

/* Bouton WhatsApp flottant (côté gauche en RTL, à l'opposé du bouton « haut de page ») */
.whatsapp-flottant { position: fixed; bottom: 24px; left: 24px; z-index: 1000; display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 16px 0 0; border-radius: 50px; background: #25d366; color: #fff !important; box-shadow: 0 8px 24px rgba(37, 211, 102, .45); transition: transform .2s; }
.whatsapp-flottant i { width: 56px; height: 56px; display: inline-flex; align-items: center; justify-content: center; font-size: 30px; }
.whatsapp-flottant-texte { font-weight: 600; font-size: 14px; white-space: nowrap; padding-inline-end: 18px; }
.whatsapp-flottant:hover { transform: translateY(-3px); }
body.ltr .whatsapp-flottant { left: auto; right: 24px; }
@media (max-width: 767px) {
  .whatsapp-flottant { bottom: 16px; left: 16px; padding: 0; }
  .whatsapp-flottant-texte { display: none; }
}

/* Choix en pastilles (vente / location…) : le choix sélectionné doit se voir */
.btn-check:checked + .btn.btn-dashed,
.btn-check:checked + .btn.btn-dashed:hover { background: var(--brand-navy); border-color: var(--brand-navy); border-style: solid; color: #fff !important; }
.btn-check:focus-visible + .btn.btn-dashed { box-shadow: 0 0 0 3px rgba(0, 163, 201, .35); }


/* Messages d'erreur des formulaires (ActiveForm : .help-block / .has-error) */
.has-error .help-block, .help-block-error, .invalid-feedback { color: #cc0000; font-size: 13px; margin-top: 4px; }
.has-error .form-control, .has-error .form-select { border-color: #cc0000; }
.has-error .form-control:focus, .has-error .form-select:focus { box-shadow: 0 0 0 3px rgba(204, 0, 0, .15); }
.has-error label, .has-error .control-label { color: #cc0000; }

/* ==========================================================
 * Accueil : bannière compacte (remplace la bannière vidéo plein écran)
 * ========================================================== */
.hero-accueil { position: relative; z-index: 1; background-size: cover; background-position: center; padding: 150px 0 50px; }
.hero-accueil::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to left, rgba(1, 40, 89, .88) 0%, rgba(1, 40, 89, .6) 55%, rgba(1, 40, 89, .35) 100%); }
.hero-accueil-texte { max-width: 720px; margin-bottom: 24px; }
.hero-accueil h1 { color: #fff; font-size: calc(26px + 14 * (100vw - 320px) / 1600); line-height: 1.35; margin-bottom: 8px; }
.hero-accueil-texte p { color: rgba(255, 255, 255, .85); font-size: 16px; margin: 0; }
.hero-recherche { background: #fff; border-radius: 14px; padding: 20px 22px; box-shadow: 0 18px 40px rgba(0, 0, 0, .18); }
.hero-recherche .form-label { font-size: 13px; margin-bottom: 4px; color: var(--brand-ink); }
.hero-recherche .btn-gradient { height: 46px; white-space: nowrap; }
@media (max-width: 991px) { .hero-accueil { padding: 110px 0 30px; } }
@media (max-width: 575px) { .hero-recherche { padding: 16px; } .hero-accueil-texte p { font-size: 14px; } }
/* Le bootstrap du thème déclare .col-lg avant .col-6 : on rétablit la ligne unique sur ordinateur */
@media (min-width: 992px) {
  .hero-recherche .col-lg { flex: 1 0 0%; width: auto; }
  .hero-recherche .col-lg-auto { flex: 0 0 auto; width: auto; }
}
/* Moins d'espace blanc entre la bannière et les derniers biens */
.hero-accueil + section { padding-top: 60px; }
.hero-recherche .form-select, .hero-recherche .form-control { height: 46px; }

/* Menus « Vente » et « Location » (près du bord gauche en RTL) : leur sous-menu, même masqué,
   dépassait l'écran de ~37px et créait un défilement horizontal sur toutes les pages. On l'ouvre vers la droite. */
@media (min-width: 1200px) {
  body.rtl header .main-navbar .nav-menu > li.sous-menu-vers-droite .nav-submenu { right: auto !important; left: 0 !important; }
}

/* Pied de page (fond sombre) : coordonnées et titres lisibles */
.footer-bg .footer-details ul li { color: #d2d2d2; }
.footer-bg .footer-details ul li a { color: #fff; }
.footer-bg .footer-details ul li i, .footer-bg .footer-links h6 + * i { color: #5fd3ef; }
.footer-bg .footer-links h6 { color: #fff; }
.footer-bg .footer-links .footer-content a:hover, .footer-bg .footer-details ul li a:hover { color: #5fd3ef; }

/* Page d'erreur */
.page-erreur { max-width: 640px; margin: 0 auto; padding: 20px 0 40px; }
.page-erreur-code { font-size: 110px; font-weight: 800; line-height: 1; color: var(--brand-navy); background: linear-gradient(135deg, var(--brand-navy), var(--brand-cyan)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 10px; }

/* Fiche d'un bien : flèches de la galerie. Comme les miniatures (slick force le sens LTR), « suivante » reste à droite. */
.gallery-main { position: relative; }
.gallery-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: rgba(1, 40, 89, .65); color: #fff; cursor: pointer; transition: background .2s; }
.gallery-arrow:hover, .gallery-arrow:focus-visible { background: var(--brand-cyan-dark); }
.gallery-arrow:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }
@media (max-width: 575px) { .gallery-arrow { width: 36px; height: 36px; } .gallery-prev { left: 8px; } .gallery-next { right: 8px; } }
@media print { .gallery-arrow { display: none; } }
