/* =============================================
   Cabinet de Psychiatrie - Dr Benani Kaoutar
   Surcouche du template Calmind (FR + AR / RTL)
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800&display=swap');

/* couleurs reprises du logo (bleu / rose) */
:root {
  --primary-color: #d9518c;
  --primary-color-rgb: 217, 81, 140;
  --secondary-color: #2f3e9e;
  --secondary-color-rgb: 47, 62, 158;
  --cab-blue: #2f3e9e;
  --cab-pink: #d9518c;
  --cab-soft: #f4f1f8;
}

/* ---------- logo dans le header ---------- */
.cab-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.cab-brand img {
  height: 54px;
  width: auto;
  max-width: none !important;
  background: #fff;
  border-radius: 10px;
  padding: 4px 6px;
}

.cab-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  color: #fff;
}

.cab-brand-text strong {
  font-family: var(--heading-font);
  font-size: 20px;
  font-weight: 500;
  white-space: nowrap;
}

.cab-brand-text small {
  font-size: 13px;
  opacity: .8;
  white-space: nowrap;
}

footer .cab-brand-text strong { font-size: 22px; }

@media (max-width: 767px) {
  .cab-brand img { height: 44px; }
  .cab-brand-text strong { font-size: 17px; }
  .cab-brand-text small { font-size: 12px; }
}

/* lien de changement de langue */
#mainmenu li a.lang-switch {
  color: var(--primary-color);
  font-weight: 700;
}

/* sur mobile, recadrer les photos du slider sur la partie intéressante */
@media (max-width: 767px) {
  .swiper-inner { background-position: 72% center !important; }
}

/* ---------- domaines de soin ---------- */
.cab-care {
  background: #fff;
  border-radius: 20px;
  padding: 36px 28px;
  height: 100%;
  box-shadow: 0 10px 30px rgba(47, 62, 158, .07);
  transition: transform .3s, box-shadow .3s;
}

.cab-care:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(47, 62, 158, .13);
}

.cab-care-icon {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: #fff;
  background: linear-gradient(135deg, var(--cab-blue), var(--cab-pink));
  margin-bottom: 22px;
}

.cab-care h3 { font-size: 22px; }

.cab-care p { margin-bottom: 0; }

a.cab-care,
a.cab-care:hover { color: var(--body-font-color); }

.cab-more {
  display: inline-block;
  margin-top: 16px;
  font-weight: 600;
  color: var(--cab-pink);
}

.cab-more::after { content: " →"; }
.rtl .cab-more::after { content: " ←"; }

/* ---------- pathologies (page dédiée) ---------- */
.cab-patho {
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  height: 100%;
  border-top: solid 4px var(--cab-pink);
  box-shadow: 0 10px 30px rgba(47, 62, 158, .06);
}

.bg-color-op-1 .cab-patho { border-top-color: var(--cab-blue); }

.cab-patho h3 { font-size: 20px; }

.cab-photo-wide {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* ---------- blocs de contact (icône + texte) ---------- */
.cab-info {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.cab-info i {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cab-info > div { min-width: 0; overflow-wrap: anywhere; }

/* flèches entre les étapes, inversées en arabe */
.rtl .de-step-arrow::after {
  content: "←";
  right: auto;
  left: -25px;
}

/* ---------- diplômes ---------- */
.cab-diplomas {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cab-diplomas li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: solid 1px rgba(0, 0, 0, .07);
}

.cab-diplomas li:last-child { border-bottom: none; }

.cab-diplomas i {
  color: var(--cab-pink);
  font-size: 18px;
  margin-top: 6px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.cab-photo-doc {
  border-radius: 20px;
  width: 100%;
  object-fit: cover;
}

/* ---------- pathologies ---------- */
.cab-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cab-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: solid 1px rgba(47, 62, 158, .12);
  border-radius: 40px;
  padding: 8px 20px;
  font-weight: 500;
  color: var(--heading-font-color);
}

.cab-chip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cab-pink);
  flex-shrink: 0;
}

.cab-chips.kids .cab-chip::before { background: var(--cab-blue); }

.cab-panel {
  background: var(--cab-soft);
  border-radius: 20px;
  padding: 36px;
  height: 100%;
}

@media (max-width: 767px) {
  .cab-panel { padding: 24px; }
}

/* ---------- galerie du cabinet ---------- */
.cab-gallery a {
  display: block;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}

.cab-gallery img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform .5s;
}

.cab-gallery a:hover img { transform: scale(1.06); }

.cab-gallery span {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 40px 18px 14px;
  color: #fff;
  font-weight: 500;
  background: linear-gradient(to top, rgba(0, 0, 0, .65), transparent);
}

/* ---------- horaires ---------- */
.cab-hours {
  width: 100%;
  border-collapse: collapse;
}

.cab-hours td {
  padding: 12px 0;
  border-bottom: solid 1px rgba(255, 255, 255, .15);
}

.cab-hours td:last-child {
  text-align: end;
  font-weight: 600;
  color: #fff;
}

.cab-hours tr.closed td:last-child { color: var(--cab-pink); }

/* ---------- prise de rendez-vous ---------- */
.cab-rdv {
  background: #fff;
  border-radius: 20px;
  padding: 32px 28px;
  height: 100%;
  text-align: center;
  box-shadow: 0 10px 30px rgba(47, 62, 158, .07);
}

.cab-rdv i {
  font-size: 34px;
  color: var(--cab-blue);
  margin-bottom: 18px;
}

.cab-rdv a.cab-tel {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: var(--heading-font-color);
  direction: ltr;
  unicode-bidi: isolate;
}

.cab-form {
  background: #fff;
  border-radius: 20px;
  padding: 36px;
  box-shadow: 0 10px 30px rgba(47, 62, 158, .07);
}

.cab-form .form-control {
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.cab-form .note {
  font-size: 14px;
  opacity: .75;
}

/* numéros de téléphone toujours écrits de gauche à droite */
.ltr-num {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}

/* =============================================
   Version arabe (RTL)
   ============================================= */
html[lang="ar"] {
  --body-font: "Tajawal", Helvetica, Arial, sans-serif;
  --heading-font: "Tajawal", Helvetica, Arial, sans-serif;
  --alt-font: "Tajawal", Helvetica, Arial, sans-serif;
  --h1-letter-spacing: 0;
  --h2-letter-spacing: 0;
}

html[lang="ar"] body,
html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] h4,
html[lang="ar"] h5,
html[lang="ar"] h6,
html[lang="ar"] .subtitle,
html[lang="ar"] #mainmenu a,
html[lang="ar"] .btn-main {
  font-family: "Tajawal", Helvetica, Arial, sans-serif;
  letter-spacing: 0 !important;
}

html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3 { font-weight: 700; line-height: 1.4em; }

html[lang="ar"] body { line-height: 1.9; }

/* les sous-titres du template sont petits et espacés : illisible en arabe */
html[lang="ar"] .subtitle {
  font-size: 16px;
  font-weight: 700;
  text-transform: none;
}

.rtl .topbar-widget i { margin-left: 8px; margin-right: 0; }

.rtl .ul-check li:before { margin-left: 15px; margin-right: 0; }

/* Menu arabe : lecture de droite à gauche.
   Le float:left du template inversait l'ordre des liens. */
@media (min-width: 993px) {
  html[dir="rtl"] #mainmenu {
    display: flex;
    direction: rtl;
    justify-content: flex-start;
  }

  html[dir="rtl"] #mainmenu > li {
    float: none;
    margin-right: 0;
    margin-left: 30px;
  }

  html[dir="rtl"] #mainmenu > li:last-child {
    margin-left: 0;
  }

  html[dir="rtl"] #mainmenu li ul {
    left: auto;
    right: 0;
  }
}

html[dir="rtl"] #mainmenu > li.has-child:after {
  padding-left: 0;
  padding-right: 5px;
}

html[dir="rtl"] #mainmenu li li a {
  text-align: right;
}

/* Icônes des listes de soins : plus de positionnement absolu en arabe,
   l'icône reste à droite du texte. */
html[dir="rtl"] .relative:has(> span.w-70px.circle) {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

html[dir="rtl"] .relative:has(> span.w-70px.circle) > .ps-90 {
  padding-left: 0;
}

html[dir="rtl"] span.w-70px.circle {
  flex-shrink: 0;
}

html[dir="rtl"] #menu-btn {
  float: left;
  margin-left: 0;
  margin-right: 20px;
}

@media (max-width: 992px) {
  html[dir="rtl"] #mainmenu,
  html[dir="rtl"] #mainmenu a.menu-item,
  html[dir="rtl"] header.header-mobile #mainmenu a.menu-item {
    direction: rtl;
    text-align: right;
  }

  html[dir="rtl"] #mainmenu li ul li,
  html[dir="rtl"] header.header-mobile #mainmenu li ul li {
    padding-left: 0;
    padding-right: 40px;
  }

  /* flèches du sous-menu mobile (visibles même sans images/ui) */
  header.header-mobile #mainmenu > li > span,
  header.header-mobile #mainmenu li > ul > li > span {
    background-image: none !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    line-height: 1;
  }

  header.header-mobile #mainmenu > li > span::before,
  header.header-mobile #mainmenu li > ul > li > span::before {
    content: "▾";
  }

  header.header-mobile #mainmenu > li > span.active::before,
  header.header-mobile #mainmenu li > ul > li > span.active::before {
    content: "▴";
  }

  html[dir="rtl"] header.header-mobile #mainmenu > li > span,
  html[dir="rtl"] header.header-mobile #mainmenu li > ul > li > span {
    right: auto;
    left: 0;
  }

  /* ouvrir le sous-menu aussi en tapant le titre Soins / Patients */
  header.header-mobile #mainmenu > li.has-child > a.menu-item {
    padding-right: 44px;
  }

  html[dir="rtl"] header.header-mobile #mainmenu > li.has-child > a.menu-item {
    padding-right: 0;
    padding-left: 44px;
  }
}

/* ---------- carte Google (contact + accueil) ---------- */
.cab-map {
  display: block;
  width: 100%;
  height: 450px;
  border: 0;
}

.cab-map-card {
  height: 320px;
  margin-top: 24px;
  border-radius: 12px;
}

@media (max-width: 767px) {
  .cab-map { height: 320px; }
}

/* bouton + téléphone du bandeau, l'un sous l'autre sur mobile */
@media (max-width: 767px) {
  .jarallax .de-flex.justify-content-start {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    justify-content: stretch;
    align-items: start;
  }

  .jarallax .de-flex.justify-content-start > .d-flex {
    margin: 0 !important;
  }

  .jarallax .de-flex.justify-content-start .btn-main {
    display: block;
    width: 100%;
    text-align: center;
  }
}

/* ---------- bouton WhatsApp fixe, en bas à gauche ---------- */
.cab-wa {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 1030;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
  transition: transform .2s ease;
}

.cab-wa:hover {
  color: #fff;
  transform: scale(1.06);
}
