/* =====================================================================
   KREME K.O — REMASTER "Maison de confiance"
   Chargée en dernier : ne redéfinit que ce qui doit changer, s'appuie
   sur les variables déjà en place (--kreme / --kreme-dark / --kk-font-*)
   pour que tout le site (26 pages) hérite du même passage en une fois.

   Direction : sobriété de "banque privée" plutôt que promo immobilière.
   Or utilisé en accent rare (liseré, hover) jamais en aplat généralisé.
   Un empattement éditorial pour les titres (autorité, patrimoine),
   une linéale nette pour tout le reste (clarté, exécution).
   ===================================================================== */

:root{
  /* Typographie : titres en serif éditorial, corps en linéale déjà en place */
  --kk-font-display: 'Fraunces', 'Georgia', 'Times New Roman', serif;
  --kk-font-body: 'Inter', -apple-system, 'Segoe UI', sans-serif;

  /* Palette étendue — dérivée de la charte existante, rien d'importé */
  --kreme-ink:#1B1710;              /* texte principal, un ton sous kreme-dark */
  --kreme-pine:#1F3A2E;             /* vert profond : sceau de confiance / entreprise */
  --kreme-pine-light:#2E5745;
  --kreme-hairline: rgba(201,162,39,.35);
  --kreme-hairline-soft: rgba(201,162,39,.18);
  --kk-radius: 3px;                 /* angles nets, pas de "carte SaaS" arrondie partout */
  --kk-shadow-rest: 0 1px 0 rgba(20,17,10,.06);
  --kk-shadow-lift: 0 18px 40px rgba(20,17,10,.14);
}

/* ---------------------------------------------------------------------
   0) Typographie éditoriale
   --------------------------------------------------------------------- */
h1, h2, h3, .kreme-hero__title, .section-title span, .kreme-scard__title{
  font-weight: 600;
  letter-spacing: -0.015em;
}
.kreme-hero__title{ font-weight: 500; }
.kreme-hero__title span{ font-style: italic; font-weight: 500; }

body{ color: var(--kreme-ink); }

/* Les libellés "eyebrow" restent en petites capitales fines, pas du gras criard */
.kreme-eyebrow, .kreme-hero__eyebrow{
  font-family: var(--kk-font-body);
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: .06em;
}

/* ---------------------------------------------------------------------
   1) En-tête — liseré fin plutôt qu'ombre floue générique
   --------------------------------------------------------------------- */
.nexity-header{
  background:#fff;
  box-shadow:none;
  border-bottom:1px solid rgba(20,17,10,.08);
}
.sticky.nexity-header{ box-shadow: var(--kk-shadow-lift); border-bottom-color: transparent; }
.nexity-nav a{ font-weight:600; }
.nexity-nav-item__link::after{ background: var(--kreme) !important; height:1.5px !important; }
.nexity-utils__badge{ border-radius: 2px; }

/* ---------------------------------------------------------------------
   2) Boutons — angle net, liseré or, pas de pilule générique
   --------------------------------------------------------------------- */
.theme-btn{
  border-radius: var(--kk-radius) !important;
  font-weight: 600 !important;
  letter-spacing: .01em;
}
.theme-btn:not(.kreme-btn-ghost){
  background: linear-gradient(135deg, var(--kreme-light) 0%, var(--kreme) 55%, var(--kreme-bronze) 100%) !important;
  color: var(--kreme-ink) !important;
  border: 1px solid transparent !important;
}
.theme-btn:not(.kreme-btn-ghost):hover{
  box-shadow: 0 14px 30px rgba(201,162,39,.4) !important;
}
.kreme-btn-ghost{ border-width:1.5px !important; }
.kreme-btn-ghost-dark{ border-radius: var(--kk-radius) !important; }

/* ---------------------------------------------------------------------
   3) Hero — plus de contraste, un signal or discret sous les stats
   --------------------------------------------------------------------- */
.kreme-hero__overlay{
  background: linear-gradient(180deg, rgba(20,17,10,.78) 0%, rgba(20,17,10,.62) 45%, rgba(20,17,10,.88) 100%) !important;
}
.kreme-hero__stats{ border-top-color: var(--kreme-hairline) !important; }
.kreme-hero__stats strong{ font-family: var(--kk-font-display); font-weight:500; }

/* ---------------------------------------------------------------------
   4) Cartes — un seul geste : liseré or qui apparaît au survol,
   pas d'ombre grise identique sur tout
   --------------------------------------------------------------------- */
.kreme-scard, .kreme-collection-card, .house-card, .house-card-v2{
  border-radius: 6px !important;
  box-shadow: var(--kk-shadow-rest) !important;
  border: 1px solid rgba(20,17,10,.08);
  position: relative;
}
.kreme-scard::before, .kreme-collection-card::before, .house-card::before, .house-card-v2::before{
  content:"";
  position:absolute; top:0; left:0; right:0; height:2px;
  background: var(--kreme);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s ease;
}
.kreme-scard:hover::before, .kreme-collection-card:hover::before,
.house-card:hover::before, .house-card-v2:hover::before{ transform: scaleX(1); }

.kreme-scard:hover, .kreme-collection-card:hover, .house-card:hover, .house-card-v2:hover{
  box-shadow: var(--kk-shadow-lift) !important;
  transform: translateY(-4px) !important;
}
.kreme-scard__num{ border-radius: 3px !important; }

/* ---------------------------------------------------------------------
   5) Trame de confiance — bande "entreprise" discrète (pin profond),
   utilisée si présente sur la page (voir .kk-trust-strip plus bas)
   --------------------------------------------------------------------- */
.kk-trust-strip{
  background: var(--kreme-pine);
  color: #EDEFEC;
  padding: 18px 0;
}
.kk-trust-strip .container{
  display:flex; flex-wrap:wrap; gap:10px 32px; align-items:center; justify-content:center;
}
.kk-trust-strip span{ font-size:14px; letter-spacing:.01em; opacity:.92; }
.kk-trust-strip strong{ font-family: var(--kk-font-display); font-weight:500; color:#fff; }

/* ---------------------------------------------------------------------
   6) Marque alternative discrète (footer) — rattache "Kremeko" au
   nom principal sans jamais dupliquer le lien
   --------------------------------------------------------------------- */
.kk-alt-brand{
  color: var(--kreme-light);
  font-size: .92em;
  font-style: italic;
  opacity: .85;
}

/* ---------------------------------------------------------------------
   7) Section titles — hairline discret au lieu d'un simple espace vide
   --------------------------------------------------------------------- */
.section-title{ position:relative; }

/* ---------------------------------------------------------------------
   8) Une seule mise en scène animée : l'entrée du hero (pas de fade
   répété sur chaque carte au scroll)
   --------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference){
  .kreme-hero__eyebrow, .kreme-hero__title, .kreme-hero__text, .kreme-hero__cta, .kreme-hero__stats{
    animation: kkHeroReveal .7s cubic-bezier(.2,.7,.2,1) both;
  }
  .kreme-hero__title{ animation-delay:.08s; }
  .kreme-hero__text{ animation-delay:.16s; }
  .kreme-hero__cta{ animation-delay:.24s; }
  .kreme-hero__stats{ animation-delay:.32s; }
}
@keyframes kkHeroReveal{
  from{ opacity:0; transform:translateY(14px); }
  to{ opacity:1; transform:translateY(0); }
}

/* ---------------------------------------------------------------------
   8bis) Drapeau fin sous le logo (façon Swiss UMEF) — largeur du logo
   uniquement, statique, aucune animation ni popup.
   --------------------------------------------------------------------- */
.nexity-header__logo{ display:flex; flex-direction:column; }
.nexity-header .site-logo{ height:96px !important; width:auto; }
.sticky.nexity-header .site-logo{ height:68px !important; }
.kk-logo-stripe{
  display:flex;
  width:100%;
  height:5px;
  margin-top:8px;
}
.kk-logo-stripe span{ flex:1 1 0; }
.kk-logo-stripe span:nth-child(1){ background:#F77F00; }
.kk-logo-stripe span:nth-child(2){ background:#FFFFFF; border-top:1px solid rgba(20,17,10,.1); border-bottom:1px solid rgba(20,17,10,.1); }
.kk-logo-stripe span:nth-child(3){ background:#009E60; }

.footer-logo-link{ display:inline-flex; flex-direction:column; }
.kk-logo-stripe--footer{ margin-top:10px; width:100%; }
.kk-logo-stripe--footer span:nth-child(2){ border-color:rgba(255,255,255,.15); }

/* Bandeau tricolore pleine largeur, sous l'en-tête (en plus de celui sous le logo) */
.kk-flag-stripe-full{
  display:flex;
  width:100%;
  height:4px;
  position:relative;
  z-index:5;
}
.kk-flag-stripe-full span{ flex:1 1 0; }
.kk-flag-stripe-full span:nth-child(1){ background:#F77F00; }
.kk-flag-stripe-full span:nth-child(2){ background:#FFFFFF; }
.kk-flag-stripe-full span:nth-child(3){ background:#009E60; }

/* ---------------------------------------------------------------------
   9) Focus clavier visible (accessibilité), sobre et cohérent avec la charte
   --------------------------------------------------------------------- */
a:focus-visible, button:focus-visible, .theme-btn:focus-visible{
  outline: 2px solid var(--kreme);
  outline-offset: 2px;
}

@media (max-width: 991px){
  .kreme-hero__title{ font-weight:600; }
}

/* =====================================================================
   10) RESPONSIVE — chaque élément garde sa place du header au footer
   Filet de sécurité anti-débordement + alignement propre sur petit écran.
   ===================================================================== */
html{ overflow-x:hidden; }
body{ overflow-x:hidden; }
img{ max-width:100%; height:auto; }
*{ box-sizing:border-box; }

@media (max-width: 767px){
  .container, .container-fluid{ max-width:100%; }
  /* En-tête : logo + burger toujours alignés, jamais de chevauchement */
  .nexity-header__row{ flex-wrap:nowrap; gap:12px; }
  .nexity-header .site-logo{ height:58px !important; }
  .offcanvas__info{ max-width:88vw; }

  /* Hero : espacement resserré, tout reste centré et lisible */
  .kreme-hero__inner{ padding:32px 0; }
  .kreme-hero__stats{ gap:22px; justify-content:center; }
}

/* =====================================================================
   11) FOOTER — version compacte sur mobile (le footer d'origine
   empile 3 blocs de contact + 4 colonnes avec ~100px de marge chacun,
   d'où la hauteur excessive). On resserre sans rien supprimer.
   ===================================================================== */
@media (max-width: 991px){
  .contact-info-area{ padding-top:36px !important; }
  .contact-info-area .contact-info-items{
    padding-bottom:22px !important;
    gap:16px !important;
    justify-content:flex-start !important;
  }
  .contact-info-area .contact-info-items:not(:last-child){
    border-bottom:1px solid rgba(255,255,255,.12);
  }

  .footer-widgets-wrapper{ padding:36px 0 16px !important; }
  .footer-widgets-wrapper .single-footer-widget{ margin-top:22px !important; }
  .footer-widgets-wrapper .shape-1,
  .footer-widgets-wrapper .shape-2{ display:none !important; } /* formes décoratives = source du côté "dispersé" */

  .recent-post-items .thumb{ display:none !important; } /* gagne ~100px de hauteur, contenu toujours lisible */
  .recent-post-items{ margin-bottom:14px !important; }

  .footer-bottom{ padding:14px 0 !important; }
  .footer-bottom .footer-wrapper{
    margin-top:0 !important;
    gap:8px !important;
    text-align:center;
  }
  .footer-bottom .footer-menu{ justify-content:center; flex-wrap:wrap; gap:12px !important; }
}

/* =====================================================================
   12) GALERIE DE BIENS — garde la même disposition en grille sur petit
   écran (2 colonnes minimum partout, comme sur desktop), cartes
   resserrées pour rester lisibles.
   ===================================================================== */
#houses-grid.row, .row.g-0, [id*="houses"].row{ --bs-gutter-x: 14px; }

@media (max-width: 767px){
  .house-card-v2 .hc-badge{ font-size:9.5px; padding:4px 9px; top:8px; left:8px; }
  .hc-image{ height:130px !important; }
  .hc-tags{ padding:0 10px; margin-top:-14px; gap:4px; }
  .hc-tag{ font-size:8.5px; padding:3px 7px; }
  .hc-body{ padding:8px 10px 12px !important; }
  .hc-location{ font-size:9px; margin-bottom:4px; }
  .hc-body h4{ font-size:12.5px; margin-bottom:6px; line-height:1.25; }
  .hc-features{ font-size:10px; gap:7px; margin-bottom:9px; }
  .hc-price{ font-size:11.5px; }
  .hc-link{ font-size:10.5px; }
  .hc-footer{ padding-top:8px; }
}

@media (max-width: 575px){
  .hc-image{ height:110px !important; }
  .hc-body h4{ font-size:11.5px; }
  .hc-price{ font-size:10.5px; }
}
