/*
 * WihdaTec Pro - Modèle commun des annonces.
 * Version : 1.0.30.
 * Référence inchangée : bloc « Plus qu’un excellent choix » (version 1.0.27).
 * Création / modification : 2026-10-12 15:14:25 (heure de Montréal).
 * Portée : uniquement les cartes hors de la section de référence.
 * Ne change PAS les colonnes, la grille Masonry, Owl, l'AJAX, les favoris
 * ou le contenu des annonces.
 * La police native de DWT Listing est conservée : mêmes composants HTML.
 */

/* :not() exclut systématiquement la section centrale de référence. */
body .switcher-item:not(.wih-milieu-section .switcher-item) > .gird_with_list {
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
}
/* Même comportement photographique que la section de référence. */
body .switcher-item:not(.wih-milieu-section .switcher-item) > .gird_with_list > .switcher-image-box {
    position: relative;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}
body .switcher-item:not(.wih-milieu-section .switcher-item) > .gird_with_list > .switcher-image-box img.list-grid-switcher-image {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: clamp(140px, 19vw, 215px) !important;
    object-fit: contain !important;
    object-position: center !important;
    background: #f6f6f6;
}
/* Polices natives, texte sur le même nombre de lignes, sans étirement forcé. */
body .switcher-item:not(.wih-milieu-section .switcher-item) > .gird_with_list > .caption {
    flex: 0 1 auto !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    box-sizing: border-box !important;
}
body .switcher-item:not(.wih-milieu-section .switcher-item) > .gird_with_list > .caption h4.list-grid-switcher-item-heading {
    font-size: 15px !important;
    line-height: 1.4 !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2;
    overflow: hidden !important;
    overflow-wrap: anywhere;
}
body .switcher-item:not(.wih-milieu-section .switcher-item) > .gird_with_list > .caption p.list-grid-switcher-item-text {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    overflow: hidden !important;
    overflow-wrap: anywhere;
}
body .switcher-item:not(.wih-milieu-section .switcher-item) > .gird_with_list > .caption .venue {
    white-space: normal !important;
    overflow-wrap: anywhere;
}
/* Le pied ne doit jamais être rogné, même avec plusieurs lignes. */
body .switcher-item:not(.wih-milieu-section .switcher-item) > .gird_with_list > .authorz {
    flex: 0 0 auto !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}
body .switcher-item:not(.wih-milieu-section .switcher-item) > .gird_with_list > .authorz .author-info {
    min-width: 0 !important;
    overflow-wrap: anywhere;
}
body .switcher-item:not(.wih-milieu-section .switcher-item) > .gird_with_list > .authorz .author-info a {
    white-space: normal !important;
    overflow-wrap: anywhere;
}
/* Uniquement le rail Premium de l'accueil : ne pas étirer les cartes à la
   hauteur d'un voisin ni à la hauteur calculée avant le chargement AJAX. */
body.home .wih-premium-accueil-rail,
body.front-page .wih-premium-accueil-rail {
    align-items: flex-start !important;
}
/* Sur mobile, même hauteur compacte que le modèle de référence. */
@media (max-width: 767px) {
    body .switcher-item:not(.wih-milieu-section .switcher-item) > .gird_with_list > .switcher-image-box img.list-grid-switcher-image {
        height: 135px !important;
    }
    body .switcher-item:not(.wih-milieu-section .switcher-item) > .gird_with_list > .caption h4.list-grid-switcher-item-heading {
        font-size: 12px !important;
    }
}
