/*
Theme Name: Kadence Child
Theme URI: https://kadencewp.com/
Description: Thème enfant pour le thème Kadence.
Author: Votre Nom
Author URI: https://jenna-boutique.fr/
Template: kadence
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kadence-child
*/

/* ==========================================================================
   1. LOGO & SLOGAN
   ========================================================================== */
.site-branding .site-description,
.site-tagline,
.header-tagline {
    margin-top: -25px !important;
    padding-top: 0px !important;
}

.titre-serré {
    margin-top: -15px !important;
    padding-top: 0px !important;
}

/* ==========================================================================
   2. ARCHIVES (Catégories) : Transformation en DA Jenna
   ========================================================================== */

/* On cache le hero global et le titre de page */
.single .entry-header,
.page .entry-header,
.archive .entry-hero,
.category .entry-hero,
.archive .page-hero-section {
    display: none !important;
}

/* Correction de l'espace sous le header */
.archive #inner-wrap,
.archive .site-main,
.archive .content-wrap,
.category #inner-wrap,
.category .site-main,
.category .content-wrap {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.archive .content-area,
.category .content-area {
    padding-top: 16px !important; /* Espace contrôlé sous le header */
}

/* La grille globale de la page */
.archive .post-list,
.category .post-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); 
    gap: 1px;
    padding: 0;
    margin: 0;
}

/* 
 * LA CARTE (Le conteneur de chaque article) 
 * Grille à 2 rangées (Image+Titre / Extrait) car on supprime le Footer
 */
.archive .loop-entry,
.category .loop-entry {
    display: grid !important;
    grid-template-rows: auto auto; /* 1: Image+Titre | 2: Extrait */
    background: #FFFFFF;
    border: 1px solid var(--jb-line, #E5E5E5) !important;
    border-radius: 0;
    box-shadow: none !important;
    margin: 0 !important;
    position: relative;
    height: 100%;
    overflow: hidden; 
}

/* On "dissout" le conteneur de Kadence pour que le titre et l'extrait soient des enfants directs de la grille */
.archive .loop-entry .entry-content-wrap,
.category .loop-entry .entry-content-wrap {
    display: contents !important;
}

/* 1. L'IMAGE */
.archive .loop-entry .post-thumbnail {
    grid-row: 1;
    grid-column: 1;
    width: 100%;
    margin: 0 !important;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    position: relative;
}

.archive .loop-entry .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: none !important; 
}

/* Dégradé sombre pour lire le texte sur l'image */
.archive .loop-entry .post-thumbnail::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(17,17,17,0.9) 0%, rgba(17,17,17,0.4) 40%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

/* 2. LE TITRE ET LA CATÉGORIE (Sur la 1ère ligne, superposés à l'image) */
.archive .loop-entry .entry-header {
    grid-row: 1;
    grid-column: 1;
    align-self: end; 
    z-index: 2; 
    padding: 24px;
    margin: 0 !important;
    background: transparent !important;
}

/* Catégorie au-dessus du titre - Couleur Terracotta clair */
.archive .loop-entry .entry-taxonomies {
    display: block !important;
    margin-bottom: 8px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.archive .loop-entry .entry-taxonomies a {
    color: #EBAE96 !important;
    text-decoration: none;
}

/* Le Titre de l'article (Blanc pour ressortir sur l'image) */
.archive .loop-entry .entry-title {
    font-family: 'Cormorant Upright', serif;
    font-size: clamp(1.5rem, 2.5vw, 1.8rem) !important;
    color: #FFFFFF !important;
    line-height: 1.1;
    margin: 0 !important;
}

.archive .loop-entry .entry-title a {
    color: #FFFFFF !important;
    text-decoration: none;
}

/* 3. L'EXTRAIT (Sur la 2ème ligne, sous l'image) */
.archive .loop-entry .entry-summary {
    grid-row: 2;
    grid-column: 1;
    padding: 24px;
    margin: 0 !important;
    color: var(--jb-ink, #171717);
    font-size: 14px;
    line-height: 1.6;
    background: var(--jb-soft, #F8F6F4);
}

.archive .loop-entry .entry-summary p {
    margin: 0;
}

/* 4. SUPPRESSION DU FOOTER / LIRE LA SUITE */
.archive .loop-entry .entry-footer {
    display: none !important;
}

/* 5. METADONNÉES (Auteur & Date) - Terracotta clair */
.archive .loop-entry .entry-meta,
.archive .loop-entry .entry-meta a,
.archive .loop-entry .entry-meta span {
    color: #EBAE96 !important; 
    font-size: 12px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    text-decoration: none;
    margin-top: 12px;
    display: inline-block;
}

/* ==========================================================================
   3. RÉDUCTION DE L'ESPACE SOUS LE HEADER STICKY
   ========================================================================== */
#masthead .site-title,
#mobile-header .site-title,
.site-branding .site-title {
    display: none !important;
}

/* Espace sous le header pour les pages (ex : Inspirations) */
.page .content-area,
.page #inner-wrap {
    margin-top: 0 !important;
    padding-top: 16px !important;
}

/* ==========================================================================
   4. CARTES PÔLES (Images + Textes) - Page d'accueil
   ========================================================================== */
.entry-content .wp-block-image.jb-pole-image {
    margin-bottom: 0 !important;
}

.entry-content .wp-block-image.jb-pole-image + h3.wp-block-heading {
    margin-top: auto !important; 
}

.entry-content .wp-block-image.jb-pole-image + h3.wp-block-heading + p.wp-block-paragraph {
    margin-bottom: auto !important;
    padding-bottom: 12px !important;
}

/* ==========================================================================
   5. FOOTER PERSONNALISÉ
   ========================================================================== */
.site-footer {
    background: #2C2C2C;
    color: #D9D2CD;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    margin-top: 0;
}

.site-footer .wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 48px 28px 24px;
}

.site-footer .cols {
    display: grid;
    grid-template-columns: 1.1fr 1.1fr 1.3fr 1.5fr; 
    gap: 32px;
}

.site-footer h2, 
.site-footer h3 {
    font-family: 'Cormorant Upright', serif;
    font-size: 1.05rem;
    color: #fff;
    margin: 0 0 12px;
    font-weight: 600;
}

.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer li {
    margin-bottom: 8px;
}

.site-footer a {
    color: #D9D2CD;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.site-footer a:hover {
    color: #E8A08B;
    border-color: #E8A08B;
}

.site-footer .brand-slogan {
    color: #A79E98;
    font-size: 13px;
    margin: 0 0 14px;
    max-width: 200px; 
    line-height: 1.5;
}

.site-footer .brand-name {
    font-family: 'Cormorant Upright', serif;
    font-size: 1.3rem;
    color: #fff;
    display: block;
    margin-bottom: 8px;
}

.site-footer .address {
    font-style: normal;
    color: #A79E98;
    line-height: 1.6;
}

.site-footer .col-celebrations a {
    display: inline-block; 
    max-width: 210px;      
    line-height: 1.4;
}

.site-footer .foot-bottom {
    border-top: 1px solid #45403C;
    margin-top: 36px;
    padding-top: 18px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: #A79E98;
}

.site-footer .foot-bottom a {
    color: #A79E98;
}

/* Footer collé en bas de la fenêtre (le footer est DANS #inner-wrap) */
#wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
body.admin-bar #wrapper {
    min-height: calc(100vh - 32px);
}
@media screen and (max-width: 782px) {
    body.admin-bar #wrapper {
        min-height: calc(100vh - 46px);
    }
}
#inner-wrap {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}
#primary {
    flex: 1 0 auto;
}
.site-footer {
    margin-top: auto;
    flex-shrink: 0;
}

/* ==========================================================================
   6. RESPONSIVE FOOTER
   ========================================================================== */
@media (max-width: 820px) {
    .site-footer .cols {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 520px) {
    .site-footer .cols {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   7. THÈME — ANIMATIONS, CURSEUR, PARALLAX
   ========================================================================== */
html:not(.no-js) .kt-inside-inner-col > * { opacity: 0; }
html:not(.no-js) .jenna-visible .kt-inside-inner-col > * { animation: jennaStaggerIn 0.9s cubic-bezier(.22,1,.36,1) both; }
@keyframes jennaStaggerIn {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.wp-block-button__link, .header-button { transition: transform .3s ease, box-shadow .3s ease !important; }
.wp-block-button__link:hover, .header-button:hover { transform: translateY(-4px) scale(1.02) !important; box-shadow: 0 15px 30px rgba(0,0,0,.15) !important; }

.header-navigation.header-navigation-style-underline .primary-menu-container > ul > li.menu-item > a { position: relative !important; }
.header-navigation.header-navigation-style-underline .primary-menu-container > ul > li.menu-item > a::after {
    content: '' !important; display: block !important; position: absolute !important;
    left: calc(2.27em / 2) !important; right: calc(2.27em / 2) !important;
    bottom: 0.35em !important; height: 1px !important; width: auto !important;
    background: var(--global-palette1) !important; transform: scaleX(0) !important;
    transform-origin: center center !important; transition: transform .5s cubic-bezier(.22,1,.36,1) !important;
    pointer-events: none !important;
}
.header-navigation.header-navigation-style-underline .primary-menu-container > ul > li.menu-item > a:hover::after,
.header-navigation.header-navigation-style-underline .primary-menu-container > ul > li.menu-item.current-menu-item > a::after { transform: scaleX(1) !important; }

/* --- CURSEUR PERSONNALISÉ --- */
.jenna-heart {
    position: fixed !important; top: 0; left: 0; width: 22px; height: 22px;
    pointer-events: none !important; z-index: 2147483647 !important;
    transform: translate(-50%, -50%); transition: opacity .25s ease, transform .2s ease; will-change: transform, opacity;
}
.jenna-heart svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 1px 2px rgba(0,0,0,.25)) drop-shadow(0 0 6px rgba(255,255,255,.9)) drop-shadow(0 0 14px rgba(255,255,255,.55)); }
.jenna-heart path { fill: #ffffff; }
.jenna-heart.is-hidden { opacity: 0 !important; transform: translate(-50%, -50%) scale(.4); }
.jenna-heart.is-hover { transform: translate(-50%, -50%) scale(1.4); }

.jenna-trail {
    position: fixed !important; pointer-events: none !important; z-index: 2147483645 !important;
    border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.9) 0%, rgba(255,255,255,.5) 45%, rgba(255,255,255,0) 78%);
    filter: blur(.4px); animation: jennaTrailFade var(--jenna-trail-dur, .6s) ease-out both; will-change: transform, opacity;
}
@keyframes jennaTrailFade {
    0% { opacity: .95; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(calc(-50% + var(--jenna-trail-dx, 0px)), calc(-50% + var(--jenna-trail-dy, 0px))) scale(.3); }
}

/* Curseur natif masqué (hérité par tous les enfants) */
body.jenna-cursor-on { cursor: none; }

/* Zones où la flèche native reste (même liste que EXCLUDED dans le JS) */
body.jenna-cursor-on :is(
    #masthead, #colophon, #mobile-drawer, .popup-drawer,
    .jb-hero, .jb-hero-doors, .jb-hero-intro, .kb-row-layout-id315_e33eee-93
) { cursor: auto; }

/* Éléments cliquables : main (les enfants héritent) */
body.jenna-cursor-on :is(
    a, button, select, summary, [role="button"],
    input[type="checkbox"], input[type="radio"], input[type="submit"],
    .jb-consent-label
) { cursor: pointer; }

/* Saisie de texte */
body.jenna-cursor-on :is(
    input:not([type="checkbox"], [type="radio"], [type="submit"]),
    textarea, [contenteditable="true"]
) { cursor: text; }

.jb-pole-image { overflow: hidden !important; position: relative; }
.jb-pole-image img { display: block; width: 100%; height: auto; transform: translateZ(0); will-change: transform; backface-visibility: hidden; transition: filter .4s ease; filter: brightness(1) saturate(1); }
.jb-pole-image:hover img { filter: brightness(0.92) saturate(0.95); }

/* ==========================================================================
   7. FIX HERO MOBILE : interligne H1 + chevauchements
   ========================================================================== */

/* Annule le line-height: 0 hérité de Kadence sur les H1 des blocs */
h1.wp-block-kadence-advancedheading {
    line-height: 1.3 !important;
}

/* Le paragraphe d'intro (enfant direct du contenu) ne doit plus remonter sur le hero */
.entry-content > p.titre-serré {
    margin-top: 0 !important;
    padding-top: 24px !important;
}

/* Respiration interne des deux colonnes du hero */
.kb-row-layout-id27_6b96f1-d7 .kt-inside-inner-col {
    padding: 24px 16px 32px;
    box-sizing: border-box;
}

/* Sur écrans courts (iPhone en paysage), on évite le min-height trop serré */
@media (max-height: 520px) {
    .kadence-column27_324432-51 > .kt-inside-inner-col,
    .kadence-column27_7c460b-98 > .kt-inside-inner-col {
        min-height: 0;
    }
}

/* ==========================================================================
   8. HERO ACCUEIL : colonnes de même hauteur + contenu centré
   ========================================================================== */

/* Les deux colonnes s'étirent à la hauteur de la plus grande */
.kb-row-layout-id27_6b96f1-d7 > .kt-row-column-wrap {
    align-items: stretch !important;
}
.kb-row-layout-id27_6b96f1-d7 > .kt-row-column-wrap > .wp-block-kadence-column {
    align-self: stretch !important;
}
.kb-row-layout-id27_6b96f1-d7 > .kt-row-column-wrap > .wp-block-kadence-column > .kt-inside-inner-col {
    height: 100%;
    justify-content: flex-start !important;
    align-items: center;
    text-align: center;
}

/* Tout le texte centré, sur toute la largeur de la colonne */
.kb-row-layout-id27_6b96f1-d7 .kt-inside-inner-col > h1,
.kb-row-layout-id27_6b96f1-d7 .kt-inside-inner-col > h2,
.kb-row-layout-id27_6b96f1-d7 .kt-inside-inner-col > p {
    width: 100%;
    text-align: center !important;
}

/* Boutons alignés en bas des deux colonnes */
.kb-row-layout-id27_6b96f1-d7 .kt-inside-inner-col > .wp-block-buttons {
    margin-top: auto !important;
    margin-bottom: 0 !important;
    justify-content: center;
}

/* ==========================================================================
   9. PAGE INSPIRATIONS : Query Loop aligné sur le rendu des archives
   (template : featured-image + groupe .jb-card-head [terms, title, date] + excerpt)
   ========================================================================== */

.wp-block-query.jenna-inspirations-grid {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

/* Grille : le fond fait office de filet de 1px entre les cartes */
.wp-block-query.jenna-inspirations-grid ul.wp-block-post-template {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 400px));
    justify-content: start;
    align-items: stretch;
    gap: 1px;
    width: fit-content;
    max-width: 100%;
    margin: 0;
    padding: 1px;
    list-style: none;
    background: var(--jb-line, #E5E5E5);
}

/* Carte : rangée 1 = image + texte superposés, rangée 2 = extrait */
.wp-block-query.jenna-inspirations-grid ul.wp-block-post-template > li.wp-block-post {
    display: grid !important;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    position: relative;
    margin: 0;
    background: #fff;
    border: 0;
    overflow: hidden;
}

/* 1. Image */
.jenna-inspirations-grid .wp-block-post-featured-image {
    grid-area: 1 / 1;
    position: relative;
    margin: 0;
    aspect-ratio: 3 / 2;
    overflow: hidden;
}
.jenna-inspirations-grid .wp-block-post-featured-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.jenna-inspirations-grid .wp-block-post-featured-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(17,17,17,.9) 0%, rgba(17,17,17,.4) 40%, transparent 100%);
    pointer-events: none;
}

/* 2. Bloc texte (catégorie + titre + date), même cellule que l'image, calé en bas */
.jenna-inspirations-grid .jb-card-head {
    grid-area: 1 / 1;
    align-self: end;
    z-index: 2;
    padding: 24px;
    margin: 0;
}

.jenna-inspirations-grid .wp-block-post-terms {
    margin: 0 0 8px;
    color: #FFF;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .1em;
}
.jenna-inspirations-grid .wp-block-post-terms a {
    color: #FFF !important;
    text-decoration: none;
}

.jenna-inspirations-grid .wp-block-post-title {
    margin: 0;
    font-family: 'Cormorant Upright', serif;
    font-size: clamp(1.5rem, 2.5vw, 1.8rem);
    line-height: 1.1;
    color: #fff !important;
}
.jenna-inspirations-grid .wp-block-post-title a {
    color: #fff !important;
    text-decoration: none;
}

.jenna-inspirations-grid .wp-block-post-date,
.jenna-inspirations-grid .wp-block-post-author-name {
    margin: 12px 0 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 12px;
    color: #EBAE96 !important;
}

/* 3. Extrait */
.jenna-inspirations-grid .wp-block-post-excerpt {
    grid-area: 2 / 1;
    margin: 0;
    padding: 24px;
    background: var(--jb-soft, #F8F6F4);
    font-size: 14px;
    line-height: 1.6;
}
.jenna-inspirations-grid .wp-block-post-excerpt p {
    margin: 0;
    color: var(--jb-ink, #171717);
}

.j-aide .guide-band {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 32px;
  row-gap: 6px;
  padding: 28px 32px;
  background: var(--jb-soft);
  border: 1px solid var(--jb-line);
  border-left: 3px solid var(--jb-terracotta);
  color: inherit;
  text-decoration: none;
  transition: background .3s ease;
}
.j-aide .guide-band-meta {
  grid-column: 1;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--jb-terracotta-dark);
}
.j-aide .guide-band-title {
  grid-column: 1;
  font-family: "Cormorant Upright", serif;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  font-weight: 500;
  line-height: 1.15;
  color: var(--jb-black);
  text-wrap: balance;
}
.j-aide .guide-band-arrow {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--jb-black);
  color: var(--jb-white);
  font-size: 18px;
  transition: background .25s ease, transform .25s ease;
}
.j-aide .guide-band:hover { background: var(--jb-white); }
.j-aide .guide-band:hover .guide-band-arrow {
  background: var(--jb-terracotta);
  transform: translateX(4px);
}
@media (max-width: 700px) {
  .j-aide .guide-band { padding: 22px 20px; column-gap: 16px; }
}