/* ==========================================================================
   B2V - Couche motion & profondeur
   Cree le 31/08/2026. Section 7 ajoutee le meme jour (pages individuelles).

   Principe : purement additif. Aucune regle ne redefinit une couleur, une
   police ou une mise en page existante. On ajoute uniquement de l'ombre,
   du relief et du mouvement.

   Desactive automatiquement si prefers-reduced-motion est demande.
   ========================================================================== */

:root{
  --b2v-ease: cubic-bezier(.22,.61,.36,1);
  --b2v-fast: .22s;
  --b2v-slow: .55s;

  --b2v-sh-1: 0 1px 2px rgba(17,24,39,.04), 0 2px 8px rgba(17,24,39,.05);
  --b2v-sh-2: 0 2px 4px rgba(17,24,39,.05), 0 8px 24px rgba(17,24,39,.08);
  --b2v-sh-3: 0 4px 8px rgba(96,34,45,.07), 0 16px 40px rgba(96,34,45,.13);
}

/* 1. REVELATION AU DEFILEMENT ---------------------------------------------- */
.b2v-rv{
  opacity:0;
  transform:translateY(18px);
  transition:opacity var(--b2v-slow) var(--b2v-ease),
             transform var(--b2v-slow) var(--b2v-ease);
  will-change:opacity,transform;
}
.b2v-rv.is-in{ opacity:1; transform:none; }
.b2v-rv[style*="--d"]{ transition-delay:var(--d); }

/* 2. CARTES DE GRILLE ------------------------------------------------------- */
.ev-card,
.im-card{
  box-shadow:var(--b2v-sh-1);
  transition:transform var(--b2v-fast) var(--b2v-ease),
             box-shadow var(--b2v-fast) var(--b2v-ease);
}
.ev-card:hover, .im-card:hover,
.ev-card:focus-within, .im-card:focus-within{
  transform:translateY(-4px);
  box-shadow:var(--b2v-sh-2);
}
.ev-card img, .im-card img{ transition:transform .7s var(--b2v-ease); }
.ev-card:hover img, .im-card:hover img{ transform:scale(1.045); }
.ev-card .ev-media, .ev-card figure,
.im-card .im-media, .im-card figure{ overflow:hidden; }

/* 3. BOUTONS ET LIENS ------------------------------------------------------- */
.wp-block-button__link, .ev-btn, .im-btn, button, input[type="submit"]{
  transition:background-color var(--b2v-fast) var(--b2v-ease),
             color var(--b2v-fast) var(--b2v-ease),
             transform var(--b2v-fast) var(--b2v-ease),
             box-shadow var(--b2v-fast) var(--b2v-ease);
}
.wp-block-button__link:hover, .ev-btn:hover, .im-btn:hover{
  transform:translateY(-1px);
  box-shadow:var(--b2v-sh-2);
}
.wp-block-button__link:active, .ev-btn:active, .im-btn:active{ transform:translateY(0); }

a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible{
  outline:2px solid var(--wp--preset--color--bordeaux, #60222D);
  outline-offset:3px;
  border-radius:4px;
}

/* 4. FILTRES ---------------------------------------------------------------- */
.ev-reg, .ev-block label{
  transition:color var(--b2v-fast) var(--b2v-ease),
             background-color var(--b2v-fast) var(--b2v-ease);
  border-radius:6px;
}
.ev-reg:hover{ color:var(--wp--preset--color--bordeaux, #60222D); }
.b2v-busy{ opacity:.45; pointer-events:none; transition:opacity .2s var(--b2v-ease); }

/* 5. IMAGES ----------------------------------------------------------------- */
.ev-card img, .im-card img{
  background:linear-gradient(180deg,#FFFBF2 0%,#F3ECDC 100%);
}

/* ==========================================================================
   7. PAGES INDIVIDUELLES (entreprise / immeuble / courtier / cours)
   Selecteurs releves sur le HTML rendu - aucune classe inventee.
   ========================================================================== */

/* Cartes secondaires : autres offres, mandats, cours relies */
.ep-ocard, .pc-ocard, .cp-card, .cs-rc{
  box-shadow:var(--b2v-sh-1);
  transition:transform var(--b2v-fast) var(--b2v-ease),
             box-shadow var(--b2v-fast) var(--b2v-ease);
}
.ep-ocard:hover, .pc-ocard:hover, .cp-card:hover, .cs-rc:hover,
.ep-ocard:focus-within, .pc-ocard:focus-within,
.cp-card:focus-within, .cs-rc:focus-within{
  transform:translateY(-4px);
  box-shadow:var(--b2v-sh-2);
}

.ep-ocard-img, .pc-ophoto, .cp-card-img, .cs-rc-th{
  overflow:hidden;
  transition:transform .7s var(--b2v-ease);
}
.ep-ocard:hover .ep-ocard-img,
.pc-ocard:hover .pc-ophoto,
.cp-card:hover .cp-card-img,
.cs-rc:hover .cs-rc-th{ transform:scale(1.04); }

/* Tuiles de caracteristiques et KPI */
.ep-carac-i, .pc-tile, .cp-kpi, .cp-whyc, .ep-stat{
  transition:transform var(--b2v-fast) var(--b2v-ease),
             box-shadow var(--b2v-fast) var(--b2v-ease),
             border-color var(--b2v-fast) var(--b2v-ease);
}
.pc-tile:hover, .cp-kpi:hover, .cp-whyc:hover, .ep-stat:hover{
  transform:translateY(-2px);
  box-shadow:var(--b2v-sh-1);
}

/* Colonnes laterales : relief */
.epb-side, .pc-side, .cs-card{ box-shadow:var(--b2v-sh-2); }

/* Miniatures de galerie */
.ep-gal-thumb, .pc-gal-thumb{
  transition:opacity var(--b2v-fast) var(--b2v-ease),
             transform var(--b2v-fast) var(--b2v-ease);
  cursor:pointer;
}
.ep-gal-thumb:hover, .pc-gal-thumb:hover{ transform:translateY(-2px); opacity:.9; }

/* Image principale de galerie */
.ep-gal-main, .pc-gmain{ overflow:hidden; box-shadow:var(--b2v-sh-2); }

/* Avatars courtier */
.epb-ava, .pc-bava, .cp-av{
  transition:transform var(--b2v-fast) var(--b2v-ease),
             box-shadow var(--b2v-fast) var(--b2v-ease);
}
.epb-person:hover .epb-ava,
.pc-broker-person:hover .pc-bava{ transform:scale(1.04); }

/* Boutons propres aux gabarits */
.epb-wa, .pc-wa, .cp-wa, .cp-mail, .pc-obtn, .ep-ocard-b, .cs-btn{
  transition:transform var(--b2v-fast) var(--b2v-ease),
             box-shadow var(--b2v-fast) var(--b2v-ease),
             background-color var(--b2v-fast) var(--b2v-ease);
}
.epb-wa:hover, .pc-wa:hover, .cp-wa:hover, .cp-mail:hover,
.pc-obtn:hover, .ep-ocard-b:hover, .cs-btn:hover{
  transform:translateY(-1px);
  box-shadow:var(--b2v-sh-2);
}

/* Champs de formulaire : focus a la marque */
.epb-side input, .epb-side select, .epb-side textarea,
.pc-side input, .pc-side select, .pc-side textarea,
.cp-form input, .cp-form select, .cp-form textarea{
  transition:border-color var(--b2v-fast) var(--b2v-ease),
             box-shadow var(--b2v-fast) var(--b2v-ease);
}
.epb-side input:focus, .epb-side select:focus, .epb-side textarea:focus,
.pc-side input:focus, .pc-side select:focus, .pc-side textarea:focus,
.cp-form input:focus, .cp-form select:focus, .cp-form textarea:focus{
  border-color:var(--wp--preset--color--bordeaux, #60222D);
  box-shadow:0 0 0 3px rgba(96,34,45,.10);
  outline:none;
}

/* Modules de cours */
.cs-mod{
  transition:background-color var(--b2v-fast) var(--b2v-ease),
             transform var(--b2v-fast) var(--b2v-ease);
}
.cs-mod:hover{ transform:translateX(3px); }

/* 8. RESPECT DES PREFERENCES UTILISATEUR ------------------------------------ */
@media (prefers-reduced-motion: reduce){
  .b2v-rv{ opacity:1 !important; transform:none !important; transition:none !important; }
  .ev-card, .im-card, .ev-card img, .im-card img,
  .wp-block-button__link, .ev-btn, .im-btn,
  .ep-ocard, .pc-ocard, .cp-card, .cs-rc,
  .ep-ocard-img, .pc-ophoto, .cp-card-img, .cs-rc-th,
  .pc-tile, .cp-kpi, .cp-whyc, .ep-stat,
  .epb-ava, .pc-bava, .cp-av, .cs-mod{
    transition:none !important;
    transform:none !important;
  }
}
