/*
 Theme Name:   Charitywp Child
 Theme URI:    http://charitywp.thimpress.com/
 Description:  Charitywp Child Theme
 Author:       ThimPress
 Author URI:   http://thimpress.com
 Template:     charitywp
 Version:      1.0.0
 Text Domain:  charitywp-child
*/

/* =============================================
   BLOG — Images et cartes de même taille
   ============================================= */

/* Hauteur fixe des images blog */
.blog .post-thumbnail,
.archive .post-thumbnail,
.blog .thim-post-thumbnail,
.archive .thim-post-thumbnail,
.blog .entry-thumbnail,
.archive .entry-thumbnail {
    height: 220px;
    overflow: hidden;
    display: block;
}

.blog .post-thumbnail img,
.archive .post-thumbnail img,
.blog .thim-post-thumbnail img,
.archive .thim-post-thumbnail img,
.blog .entry-thumbnail img,
.archive .entry-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

/* Cartes articles même hauteur */
.blog article.post,
.archive article.post {
    display: flex;
    flex-direction: column;
}

.blog article.post .entry-content,
.archive article.post .entry-content,
.blog article.post .post-content,
.archive article.post .post-content,
.blog article.post .entry-body,
.archive article.post .entry-body {
    flex: 1;
}

/* Extraits tronqués à 4 lignes sur les CARTES uniquement */
.blog article.post .entry-content p,
.archive article.post .entry-content p,
.blog article.post .post-content p,
.archive article.post .post-content p,
.blog article.post .entry-body p,
.archive article.post .entry-body p,
.blog article.post .entry-summary p,
.archive article.post .entry-summary p,
.blog article.post .excerpt p,
.archive article.post .excerpt p {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 6.4em;
    line-height: 1.6em;
}

/* Extraits complets sur la PAGE ARTICLE */
.single article.post .entry-content p,
.single-post .entry-content p {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
    max-height: none;
}

/* Thumbnails sidebar uniformes */
.widget .post-thumbnail img,
.widget .thim-post-thumbnail img {
    width: 100%;
    height: 70px;
    object-fit: cover;
    object-position: center;
}

/* Titres articles en orange et 2 lignes max */
.blog h2.entry-title a,
.archive h2.entry-title a,
.single .entry-title,
.entry-title a,
.single-post h1.entry-title {
    color: #f36621 !important;
}

/* Titres tronqués à 2 lignes sur les CARTES uniquement */
.blog article.post .entry-title,
.archive article.post .entry-title,
.blog article.post h2.entry-title,
.archive article.post h2.entry-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 3.2em;
    line-height: 1.6em;
}

/* Titres complets sur la PAGE ARTICLE */
.single article.post .entry-title,
.single-post .entry-title {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
    max-height: none;
}

@media (max-width: 767px) {
    .blog .post-thumbnail,
    .archive .post-thumbnail,
    .blog .entry-thumbnail,
    .archive .entry-thumbnail {
        height: 180px;
    }
}

/* =============================================
   HEADER MOBILE — logo trop grand / mal placé
   ============================================= */
@media (max-width: 767px) {

    /* 1) RÉDUIRE le logo */
    .site-header .thim-logo img,
    .site-header .thim-logo .logo,
    .site-header .thim-logo .mobile-logo,
    .site-header .thim-logo .sticky-logo {
        max-height: 58px !important;
        width: auto !important;
        height: auto !important;
        max-width: 110px !important;
    }

    /* 2) Barre FINE + 3 éléments répartis (hamburger | logo | don) */
    .site-header .top-header,
    .site-header .top-header .container {
        padding-top: 6px !important;
        padding-bottom: 6px !important;
    }
    .site-header .top-header .container {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: nowrap !important;
        min-height: 0 !important;
    }

    /* Cacher SEULEMENT le menu desktop (le hamburger ouvre le vrai menu) */
    .site-header .top-header .container > .thim-menu {
        position: absolute !important;
        left: -9999px !important;
        order: 9 !important;
    }

    /* 1) Hamburger : à gauche, remonté pour s'aligner */
    .site-header .thim-toggle-mobile-menu {
        order: 1 !important;
        flex: 0 0 auto !important;
        margin: 0 !important;
        position: relative !important;
        top: -2px !important;
    }

    /* 2) Logo : au centre */
    .site-header .thim-logo {
        order: 2 !important;
        flex: 1 1 auto !important;
        position: static !important;
        transform: none !important;
        text-align: center !important;
        margin: 0 8px !important;
        padding: 0 !important;
        line-height: 1 !important;
    }
    .site-header .thim-logo a {
        display: inline-block !important;
    }

    /* 3) top-sidebar (contient le bouton DON) : à droite, visible */
    .site-header .top-header .container > .top-sidebar {
        order: 3 !important;
        flex: 0 0 auto !important;
        position: static !important;
        left: auto !important;
        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .site-header .donate_button_title.thim-button {
        padding: 7px 13px !important;
        font-size: 13px !important;
        white-space: nowrap !important;
    }
}

/* =============================================
   TOP BAR ORANGE — afficher adresse + tél sur mobile
   ============================================= */
@media (max-width: 767px) {

    /* Réafficher le bloc contact masqué par Elementor */
    .elementor-element-354c747.elementor-hidden-mobile {
        display: block !important;
    }

    /* Compacter le texte pour qu'il tienne à gauche */
    .elementor-element-354c747 ul {
        margin: 0 !important;
        padding: 0 !important;
        list-style: none !important;
    }
    .elementor-element-354c747 li {
        font-size: 11px !important;
        line-height: 1.5 !important;
        margin: 0 !important;
        color: #fff !important;
    }
    .elementor-element-354c747 li a {
        color: #fff !important;
    }
    .elementor-element-354c747 i {
        margin-right: 4px !important;
    }
}

/* =============================================
   FORMULAIRE BÉNÉVOLE — texte en blanc (fond orange)
   ============================================= */
#wpcf7-f6926-p5724-o1 label,
#wpcf7-f6926-p5724-o1 .wpcf7-list-item-label,
#wpcf7-f6926-p5724-o1 p,
#wpcf7-f6926-p5724-o1 h1,
#wpcf7-f6926-p5724-o1 h2,
#wpcf7-f6926-p5724-o1 h3,
#wpcf7-f6926-p5724-o1 .wpcf7-form-control-wrap {
    color: #fff !important;
}
#wpcf7-f6926-p5724-o1 a {
    color: #fff !important;
    text-decoration: underline !important;
}

/* =============================================
   ACCUEIL — masquer le bandeau de titre "Accueil"
   (fait doublon avec le slider, inutile sur la home)
   ============================================= */
.home .top_site_main.thim-parallax-image,
.page-id-5588 .top_site_main.thim-parallax-image {
    display: none !important;
}
