/* Keep the tablet header on one line without colliding with the hero. */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .header-area .header-top-content { flex-wrap: nowrap; gap: 12px; }
  .header-area .header-top-content .topbar-text,
  .header-area .header-top-content .header-info { font-size: 12px; }
  .header-area .header-top-content .topbar-text { white-space: nowrap; }
  .header-area .header-top-content .header-info { flex-wrap: nowrap; white-space: nowrap; }
  .header-area .header-top-content .header-info .info-item { padding-inline: 8px; }
  .tj-banner-section .banner-img-area { margin-inline-start: 35px; }

  /* Photo complète sans masque SVG ni ratio forcé sur tablette */
  .tj-banner-section .banner-img-area .banner-img {
    aspect-ratio: auto !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
    border-radius: 16px;
    overflow: hidden;
    height: auto !important;
  }
  .tj-banner-section .banner-img-area .banner-img > img {
    width: 100%;
    height: auto !important;
    display: block;
    object-fit: unset !important;
  }

  /* Descendre le badge nom vers le bas de la photo */
  .tj-banner-section .banner-img-area .trusted {
    top: auto;
    bottom: 20px;
    inset-inline-start: -35px;
    max-width: 185px;
    padding: 16px;
  }
  /* Masquer le bloc Google Rating sur tablette */
  .tj-banner-section .banner-img-area .customers-box {
    display: none !important;
  }
}

/* Desktop (≥1200px) : aspect-ratio original rétabli + padding-top supprimé */
@media (min-width: 1200px) {
  .tj-banner-section .banner-img-area .banner-img {
    aspect-ratio: 502 / 562 !important;
  }
  /* Supprimer le padding-top résiduel des avatars supprimés */
  .tj-banner-section .banner-img-area .customers-box .rating-area {
    padding-top: 0 !important;
  }
}

/* Use the same centered portrait layout throughout the mobile breakpoint. */
@media (max-width: 767.98px) {
  .tj-banner-section .banner-img-area {
    width: 100%; max-width: 502px; margin-inline: auto;
  }
  .tj-banner-section .banner-img-area .banner-img {
    max-width: none; width: 100%;
  }
  .tj-banner-section .banner-img-area .trusted {
    inset-inline-start: 0; max-width: 195px; padding: 15px; top: 35%;
  }
  .tj-banner-section .banner-img-area .customers-box {
    position: static; width: 100%; max-width: none; margin-top: 15px;
  }
}

/* ==========================================================================
   KM Legal — Section "L'étude" : tablette & mobile
   Masquage des 2 cartes du bas + image format carte identique au panneau droit
   ========================================================================== */

/* Tablette (768px–1199px) ET mobile (<768px) */
@media (max-width: 1199.98px) {

  /* 1. Masquer les 2 cartes du bas de la colonne gauche */
  .tj-about-section .about-left-bottom {
    display: none !important;
  }

  /* 2. La colonne gauche s'étire pour aligner sa hauteur avec la droite */
  .tj-about-section .about-left {
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  /* 3. L'image remplit tout l'espace disponible et adopte le style de la carte de droite */
  .tj-about-section .about-img {
    flex: 1;
    border-radius: 16px;
    overflow: hidden;
    background: #f6f7f7;
    min-height: 340px;
  }

  .tj-about-section .about-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;   /* le radius est porté par le parent */
  }

  /* 4. Anti-orphelin sur le titre */
  .tj-about-section .sec-heading h2,
  .tj-about-section .sec-heading .sec-title {
    font-size: clamp(28px, 3.2vw, 36px);
    text-wrap: balance;
    -webkit-hyphens: none;
    hyphens: none;
  }
}

/* Mobile uniquement (<768px) */
@media (max-width: 767.98px) {
  .tj-about-section .sec-heading h2,
  .tj-about-section .sec-heading .sec-title {
    font-size: clamp(26px, 6vw, 34px);
    text-wrap: balance;
    -webkit-hyphens: none;
    hyphens: none;
  }
}


/* ==========================================================================
   KM Legal - Footer Responsive & Anti-Collision Scroll-Top Rules
   ========================================================================== */

/* Structure propre des liens téléphone / email */
.footer-contact-info .contact-item a {
  display: block;
}

/* Version Tablette (768px - 1199.98px) : 3 colonnes optimisées */
@media (min-width: 768px) and (max-width: 1199.98px) {
  /* Masquer les actualités récentes pour libérer l'espace */
  .footer-1 .widget-recent-posts {
    display: none !important;
  }

  .footer-1 .footer_widget_wrapper {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    gap: 24px !important;
  }

  .footer-1 .footer_widget_wrapper .footer-widget {
    margin-bottom: 0 !important;
  }

  /* Colonne 1 : Présentation Cabinet (réduite de 10% : 42% -> 32%) */
  .footer-1 .footer_widget_wrapper .footer-col-1 {
    flex: 0 0 32% !important;
    max-width: 32% !important;
  }

  /* Colonne 2 : Expertises (décalée vers la gauche : 24% -> 20%) */
  .footer-1 .footer_widget_wrapper .widget-nav-menu {
    flex: 0 0 20% !important;
    max-width: 20% !important;
  }

  /* Colonne 3 : Contact & Horaires (élargie : 28% -> 42% avec débridage des 230px) */
  .footer-1 .footer_widget_wrapper .widget-contact {
    flex: 0 0 42% !important;
    max-width: 42% !important;
    padding-inline-end: 45px !important;
  }

  /* Débridage de la boîte de contact pour éviter les retours à la ligne étriqués */
  .footer-1 .widget-contact,
  .footer-1 .footer-contact-info {
    max-width: none !important;
    width: 100% !important;
  }

  /* Horaires sur une seule ligne propre sans cassure */
  .footer-1 .footer-contact-info .contact-item:last-child span {
    white-space: nowrap !important;
  }

  .footer-1 .footer-text p {
    text-align: start !important;
    font-size: 14px !important;
    line-height: 1.65 !important;
  }

  .tj-copyright-area .copyright-menu {
    padding-inline-end: 45px !important;
  }
}

/* Mobile (< 768px) */
@media (max-width: 767.98px) {
  .footer-1 .footer-text p {
    text-align: start !important;
  }
  .footer-1 .footer_widget_wrapper .widget-contact {
    padding-inline-end: 45px !important;
  }
}

/* Compteurs section "L'étude" : sans retour à la ligne */
.about-funfact .countup-item {
  max-width: none !important;
  width: auto !important;
}
.about-funfact .count-text {
  white-space: nowrap !important;
}

/* ==========================================================================
   KM Legal — Sélecteur de Langue Dropdown (1 ligne par langue, propre)
   ========================================================================== */
.header-top-content .header-info .info-item .tj-language ul {
  min-width: 140px !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08) !important;
  border-radius: 8px !important;
  padding: 8px 0 !important;
}
.header-top-content .header-info .info-item .tj-language ul li {
  white-space: nowrap !important;
  padding: 8px 18px !important;
}
.header-top-content .header-info .info-item .tj-language ul li a {
  white-space: nowrap !important;
  display: block !important;
  width: 100% !important;
}


/* Functional card links: preserve the existing composition and hover styles. */
.tj-service-section .service-item > .km-card-link {
  position: absolute; inset: 0; z-index: 5; border-radius: 10px;
}
.tj-service-section .service-item:focus-within {
  outline: 2px solid var(--tj-color-theme-primary); outline-offset: 4px;
}

/* The portrait fills the cut-out previously reserved for the Google rating. */
.tj-banner-section .banner-img-area .banner-img {
  -webkit-mask-image: none !important;
  mask-image: none !important;
  border-radius: 16px;
}

/* Preserve the shared RDV animation and keep the label above the expanding disc. */
#contact-form .submit-btn .tj-primary-btn .btn-text span,
#contact-form-2 .submit-btn .tj-primary-btn .btn-text span {
  text-shadow: 0 30px 0 #f6f7f7 !important;
}
#contact-form .submit-btn .tj-primary-btn .btn-text,
#contact-form-2 .submit-btn .tj-primary-btn .btn-text {
  position: relative;
  z-index: 2;
}
#contact-form .submit-btn .tj-primary-btn:focus-visible .btn-icon::before,
#contact-form-2 .submit-btn .tj-primary-btn:focus-visible .btn-icon::before {
  width: calc(100% - 10px) !important;
}
#contact-form .submit-btn .tj-primary-btn:focus-visible .btn-text span,
#contact-form-2 .submit-btn .tj-primary-btn:focus-visible .btn-text span {
  transform: translateY(-30px) !important;
}
#contact-form .submit-btn .tj-primary-btn:focus-visible .btn-icon i,
#contact-form-2 .submit-btn .tj-primary-btn:focus-visible .btn-icon i {
  transform: rotate(0deg) !important;
}
#contact-form .submit-btn .tj-primary-btn:focus-visible,
#contact-form-2 .submit-btn .tj-primary-btn:focus-visible {
  outline: 2px solid #191a18; outline-offset: 3px;
}

/* Luxembourg photo replaces both lower cards and fills its column. */
/* Compact, balanced previous/next navigation on small screens only. */
@media (max-width: 767.98px) {
  .tj-navigation-post {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
    gap: 10px;
    padding: 16px 12px !important;
  }
  .tj-navigation-post > .prev-post,
  .tj-navigation-post > .next-post { min-width: 0; align-self: start; }
  .tj-navigation-post small {
    display: block;
    font-size: 11px;
    line-height: 1.4;
    margin-bottom: 5px;
  }
  .tj-navigation-post h6 {
    font-size: 14px;
    line-height: 1.4;
    font-weight: 500;
    letter-spacing: -0.01em;
  }
  .tj-navigation-post h6 a {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    overflow-wrap: anywhere;
  }
  .tj-navigation-post .km-all-articles {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
  }
  .tj-navigation-post .km-all-articles svg { width: 22px; height: 22px; }
}
@media (max-width: 359.98px) {
  .tj-navigation-post small { min-height: 2.8em; }
}
.km-about-photo-only .about-content-area::before {
  -webkit-mask-image: none;
  mask-image: none;
}
.km-about-photo-only .about-left {
  height: 100%; max-width: none; display: flex; flex-direction: column;
}
.km-about-photo-only .about-img {
  flex: 1; min-height: 340px; border-radius: 16px; overflow: hidden;
  -webkit-mask-image: none; mask-image: none;
}
.km-about-photo-only .about-img img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  aspect-ratio: auto !important; object-fit: cover; border-radius: 0;
}
@media (max-width: 991.98px) {
  .km-about-photo-only .about-img { min-height: 0; }
  .km-about-photo-only .about-img img { position: static; height: auto; aspect-ratio: 968 / 734 !important; }
}

/* Keep the original portrait size and align its frame after removing Google reviews. */
@media (min-width: 992px) {
  .tj-banner-section .banner-img-area {
    max-width: 502px;
    margin-inline-start: auto;
    margin-inline-end: 0;
  }
}
@media (min-width: 992px) and (max-width: 1599.98px) {
  .tj-banner-section .banner-img-area { max-width: 480px; }
}
@media (min-width: 992px) and (max-width: 1199.98px) {
  .tj-banner-section .banner-img-area { width: calc(100% - 35px); }
}
@media (min-width: 768px) and (max-width: 991.98px) {
  .tj-banner-section .banner-img-area { max-width: 460px; margin-inline: auto; }
}
.tj-banner-section .banner-img-area .trusted {
  top: auto;
  bottom: 20px;
  inset-inline-start: 20px;
  inset-inline-end: auto;
}

