/*
Theme Name: La Tanière de l'Ouest
Theme URI: https://latanieredelouest.fr
Author: Crabi
Description: Thème WordPress FSE pour La Tanière de l'Ouest.
Version: 1.0
Requires at least: 6.8
Tested up to: 6.9
Requires PHP: 8.2
Text Domain: la_taniere_de_l_ouest
*/

/* -------------------------------------------------------------------- */
/* Header                                                               */
/* -------------------------------------------------------------------- */
.site-header {
    position: fixed;
    top: 30px;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    width: calc(100% - 40px);
    max-width: 1500px;
    z-index: 999;
}

/* Compensation du header fixe */
.wp-site-blocks {
    padding-top: 140px;
}

/* Quand la barre admin WordPress est visible */
.admin-bar .wp-site-blocks {
    padding-top: 108px;
}

/* Logo du Header */

.la_taniere_de_l_ouest-header-logo {
    flex-shrink: 0;
}

.la_taniere_de_l_ouest-header-logo img {
    width: 220px;
    height: auto;
}

/* ===========================
   HERO - Bandeau d'accueil
=========================== */

.la_taniere_de_l_ouest-hero {
    position: relative;
    z-index: 1;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.la_taniere_de_l_ouest-hero .wp-block-cover__inner-container {
    max-width: 1100px;
    padding: 2rem;

    text-align: center;

    background: rgba(0,0,0,.12);
    border-radius: 24px;
}

.la_taniere_de_l_ouest-hero h1 {
    font-size: clamp(3rem, 6vw, 6rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
    text-shadow:
        0 4px 10px rgba(0,0,0,.6),
        0 0 30px rgba(0,0,0,.3);
}

.la_taniere_de_l_ouest-hero p {
    max-width: 850px;
    margin: 0 auto;
    color: #f5efe6;
    text-shadow: 0 2px 6px rgba(0,0,0,.8);
    font-size: clamp(1.2rem, 1.6vw, 1.8rem);
    line-height: 1.6;
    text-align: center !important;
}

.la_taniere_de_l_ouest-hero .wp-block-cover__background {
    background-color: rgba(0,0,0,.55) !important;
}

.la_taniere_de_l_ouest-hero .wp-block-buttons {
    justify-content: center;
}

.la_taniere_de_l_ouest-hero h1,
.la_taniere_de_l_ouest-hero p {
    user-select: none;
}

.la_taniere_de_l_ouest-hero img {
    pointer-events: none;
}

/* ===========================
   Boutons
=========================== */

.wp-block-button__link {
    transition: all .25s ease;
}

.wp-block-button__link:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}
/* -------------------------------------------------------------------- */
/* Barre de  Navigation                                                               */
/* -------------------------------------------------------------------- */

.la_taniere_de_l_ouest-navbar {
    position: relative;
    background: transparent;
    box-shadow:
        0 10px 40px rgba(0,0,0,.12),
        0 2px 10px rgba(0,0,0,.05);
    border-radius: 50px;
    row-gap: .4rem;
}

.la_taniere_de_l_ouest-navbar::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(255,255,255,.6);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
    border-radius: inherit;
    z-index: -1;
}

.la_taniere_de_l_ouest-navbar .wp-block-navigation {
    flex-grow: 1;
    justify-content: center;
}

.la_taniere_de_l_ouest-navbar .wp-block-navigation__responsive-container-open {
    color: var(--wp--preset--color--brun-fonce);
}

.la_taniere_de_l_ouest-nav .wp-block-navigation-item__content {
    padding: .45rem 1.1rem;
    border-radius: 999px;
    transition: background-color .2s ease, color .2s ease;
}

.la_taniere_de_l_ouest-nav .wp-block-navigation-item__content:hover {
    background-color: rgba(46,31,22,.1);
}

.la_taniere_de_l_ouest-nav .current-menu-item > .wp-block-navigation-item__content,
.la_taniere_de_l_ouest-nav .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content {
    background-color: #1e140c !important;
    color: #f5efe6 !important;
}

/* Force la pastille active sur "ACTIVITÉS" pour toutes les pages liées aux événements */
body.single-tribe_events .la_taniere_de_l_ouest-nav a[href="/event"],
body.tax-tribe_events_cat .la_taniere_de_l_ouest-nav a[href="/event"],
body.post-type-archive-tribe_events .la_taniere_de_l_ouest-nav a[href="/event"] {
	background-color: #1E140C !important;
	color: #F5EFE6 !important;
}

/* Réseaux Sociaux */

.la_taniere_de_l_ouest-header-socials.wp-block-social-links {
    gap: .6rem;
}

.la_taniere_de_l_ouest-header-socials .wp-social-link {
    background: none;
    width: 2rem;
    height: 2rem;
}

.la_taniere_de_l_ouest-header-socials .wp-social-link a {
    color: var(--wp--preset--color--brun-fonce);
}

.la_taniere_de_l_ouest-header-socials .wp-social-link svg {
    width: 1.4rem;
    height: 1.4rem;
    fill: var(--wp--preset--color--brun-fonce);
    transition: fill .2s ease;
}

.la_taniere_de_l_ouest-header-socials .wp-social-link:hover svg {
    fill: var(--wp--preset--color--ocre);
}

/* -------------------------------------------------------------------- */
/* Footer                                                               */
/* -------------------------------------------------------------------- */

footer.wp-block-group {
    margin-top: 0 !important;
}

/* -------------------------------------------------------------------- */
/* Pages                                                                */
/* -------------------------------------------------------------------- */

.wp-block-post-title {
    display: none;
}

/* Traitement si on n'est pas sur la page d'accueil */
body:not(.home) .wp-block-post-title,
body:not(.home) h1.wp-block-heading:first-child {
    text-align: center;
    font-size: clamp(2.2rem, 3vw, 3.8rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--wp--preset--color--brun-fonce);
    max-width: 1000px;
    margin: 2rem auto;
}

body:not(.home) .wp-site-blocks main {
    max-width: 1300px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

body:not(.home) .wp-site-blocks main p {
    text-align: justify;
}

body:not(.home) .wp-site-blocks main li {
    text-align: justify;
}

body:not(.home) .wp-site-blocks main p.has-drop-cap {
    text-align: justify;
    line-height: 1.8;
}

body:not(.home) .wp-site-blocks main .wp-block-image {
    text-align: center;
}

body:not(.home) .wp-site-blocks main .wp-block-image img {
    margin-left: auto;
    margin-right: auto;
}

/* Page d'accueil pleine largeur */

.home .wp-site-blocks main {
    max-width: none;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
}

/* ===========================
   CTA ADHESION
=========================== */

.cta-adhesion {
    max-width: 1400px;
    background: #ececec;
    border-radius: 24px;
    padding: 3rem;
    margin: 4rem auto;
}

.cta-adhesion h2,
.cta-adhesion h3 {
    color: #333;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-adhesion p {
    color: #444;
    font-size: 1.25rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    text-align: left !important;
}

.cta-adhesion .wp-block-buttons {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    justify-content: flex-start;
}

.cta-adhesion .wp-block-button:first-child .wp-element-button {
    background: #7a4300;
    color: #fff;
    border-radius: 999px;
    padding: 1rem 2rem;
    font-weight: 600;
    border: none;
}

.cta-adhesion .wp-block-button:nth-child(2) .wp-element-button {
    background: transparent;
    color: #7a4300;
    border: 1px solid #cfcfcf;
    border-radius: 999px;
    padding: 1rem 2rem;
}

.cta-adhesion .wp-element-button {
    transition: all .25s ease;
}

.cta-adhesion .wp-element-button:hover {
    transform: translateY(-2px);
}


/* ===========================
   Actualités , On parle de Nous
=========================== */

.link-preview-card-image {
  object-fit: contain !important;
  width: 100% !important;
  height: 400px !important;
}
.link-preview-card,
.link-preview-card * {
  color: #fff !important;
}
.link-preview-card {
  background-color: #937b65 !important;
  padding-top: 30px !important;
}

/* -------------------------------------------------------------------- */
/* Responsive                                                           */
/* -------------------------------------------------------------------- */

@media (max-width: 782px) {

    .la_taniere_de_l_ouest-navbar {
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
        border-radius: 24px;
    }

    /* Logo */
    .la_taniere_de_l_ouest-header-logo img {
        width: 140px;
    }

    /* Header */
    .site-header {
        top: 10px;
        width: calc(100% - 20px);
    }

    .wp-site-blocks {
        padding-top: 90px !important;
    }

    .admin-bar .wp-site-blocks {
        padding-top: 130px !important;
    }

    /* Menu mobile */
    .la_taniere_de_l_ouest-navbar .wp-block-navigation__responsive-container.is-menu-open {
        background-color: #ffffff !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    .la_taniere_de_l_ouest-nav .wp-block-navigation-item__content {
        font-size: 1.1rem;
        padding: 0.75rem 1rem;
        display: block;
        text-align: center;
    }

    /* Hero */
    .la_taniere_de_l_ouest-hero .wp-block-cover__inner-container {
        padding: 1.25rem;
        border-radius: 16px;
    }

	/* Masquer les réseaux sociaux sur smartphone */
    .la_taniere_de_l_ouest-header-socials {
        display: none !important;
    }

    /* CTA */
    .cta-adhesion {
        padding: 1.5rem;
    }

    .cta-adhesion .wp-block-buttons {
        flex-direction: column;
    }

    .cta-adhesion .wp-block-button {
        width: 100%;
    }

    .cta-adhesion .wp-element-button {
        width: 100%;
        text-align: center;
    }

    /* ==========================
       FOOTER MOBILE
    ========================== */

    footer .wp-block-columns {
        flex-direction: column !important;
        gap: 2rem !important;
    }

    footer .wp-block-column {
        width: 100% !important;
        text-align: center !important;
    }

    footer .wp-block-heading,
    footer p {
        text-align: center !important;
    }

    footer .wp-block-navigation {
        justify-content: center !important;
    }

    footer .wp-block-navigation-item__content {
        justify-content: center !important;
        text-align: center !important;
    }

    footer.wp-block-template-part .wp-block-group {
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
        box-sizing: border-box !important;
    }
}