/*
Theme Name: Victoire Vitrine
Theme URI: https://victoire-digital.fr
Description: Thème enfant vitrine pour les démos prospects générées par le CRM Victoire Digital. Basé sur Twenty Twenty-Five (blocs natifs / FSE). Les couleurs et la typographie sont pilotées par theme.json ; le contenu est injecté par le connecteur CRM via des patterns de blocs natifs. Aucun code en dur, aucune dépendance à un page builder.
Author: Victoire Digital
Template: twentytwentyfive
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: victoire-vitrine
*/

/* ------------------------------------------------------------------
   Styles spécifiques au thème vitrine.
   Le gros du style (couleurs, typo, espacements) passe par theme.json
   (façon native WordPress). Ici, uniquement les retouches fines qui
   ne sont pas exprimables en theme.json.
   ------------------------------------------------------------------ */

/* Boutons : transition douce au survol (cohérent sur tout le site) */
.wp-block-button__link {
    transition: transform 0.15s ease, opacity 0.15s ease;
}
.wp-block-button__link:hover {
    transform: translateY(-1px);
    opacity: 0.92;
}

/* Défilement fluide vers les ancres (nav header) */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px; /* compense le header sticky */
}

/* ==================================================================
   HEADER PREMIUM — sticky translucide, nav d'ancres raffinée
   ================================================================== */
.vitrine-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid rgba(17, 24, 39, 0.06);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}
.vitrine-header:hover {
    box-shadow: 0 4px 24px rgba(17, 24, 39, 0.06);
}
/* Liens de nav : soulignement animé qui apparaît au survol */
.vitrine-nav .wp-block-navigation-item__content {
    position: relative;
    padding-bottom: 3px;
    transition: color 0.2s ease;
}
.vitrine-nav .wp-block-navigation-item__content::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1.5px;
    background: var(--wp--preset--color--accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.vitrine-nav .wp-block-navigation-item__content:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}
/* Petit séparateur décoratif (étoile) entre les liens, façon premium */
.vitrine-nav .wp-block-navigation-item + .wp-block-navigation-item .wp-block-navigation-item__content::before {
    content: "✦";
    position: absolute;
    left: -1.15rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.55em;
    color: var(--wp--preset--color--accent);
    opacity: 0.55;
}

/* --- VARIANTE HEADER 1 : transparent sur le hero, texte clair (façon omai) --- */
.vitrine-header-style-1 .vitrine-header {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom-color: transparent;
    position: absolute;
    left: 0;
    right: 0;
}
.vitrine-header-style-1 .vitrine-header .wp-block-site-title a,
.vitrine-header-style-1 .vitrine-header .wp-block-navigation-item__content {
    color: #fff;
}
.vitrine-header-style-1 .vitrine-header .wp-block-button__link {
    background: #fff;
    color: var(--wp--preset--color--primary);
}
/* main remonte sous le header transparent */
.vitrine-header-style-1 main { margin-top: -84px; }

/* --- VARIANTE HEADER 2 : logo centré, nav répartie (façon thebendclub) --- */
.vitrine-header-style-2 .vitrine-header .alignwide {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem 2rem;
}
.vitrine-header-style-2 .vitrine-header .wp-block-site-title {
    width: 100%;
    text-align: center;
    order: -1;
    font-size: 1.5rem;
}
.vitrine-header-style-2 .vitrine-header .wp-block-site-title a {
    font-family: var(--wp--preset--font-family--serif);
}

/* Cartes "service" : fond blanc, ombre douce, coins arrondis, survol léger */
.is-style-vitrine-card {
    background: #ffffff;
    border: 1px solid rgba(17, 24, 39, 0.06);
    border-radius: 18px;
    padding: clamp(1.5rem, 3vw, 2.25rem);
    height: 100%;
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04), 0 8px 24px rgba(17, 24, 39, 0.05);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
/* Le texte des cartes reste TOUJOURS sombre et lisible, même quand la section
   parente est sur fond charte (sinon le texte hérite du blanc → invisible). */
.is-style-vitrine-card,
.is-style-vitrine-card .wp-block-heading {
    color: #1a1a1a;
}
.is-style-vitrine-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 2px 4px rgba(17, 24, 39, 0.06), 0 16px 36px rgba(17, 24, 39, 0.09);
}
/* Le numéro de la carte service */
.is-style-vitrine-card > .wp-block-paragraph:first-child {
    margin: 0 0 0.5rem;
    opacity: 0.85;
}

/* Cover hero : image bien recadrée, titre lisible */
.wp-block-cover.alignfull {
    align-items: center;
}
.wp-block-cover__image-background {
    object-fit: cover;
}

/* En-tête de page secondaire (À propos / Contact) : respiration */
.vitrine-page-header {
    padding-block: clamp(3rem, 8vw, 6rem);
}

/* ==================================================================
   FINITIONS LUXE
   Typo raffinée, apparition au scroll, micro-détails premium.
   ================================================================== */

/* Apparition douce au scroll (premium, discret).
   IMPORTANT : on ne masque les sections QUE si le JS a confirmé qu'il prend le
   relais (classe `js-reveal` posée sur <html> par reveal.js). Sans JS, ou si le
   JS échoue, le contenu reste visible — jamais de page blanche. */
.js-reveal .vitrine-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}
.js-reveal .vitrine-reveal.is-visible {
    opacity: 1;
    transform: none;
}
@media (prefers-reduced-motion: reduce) {
    .js-reveal .vitrine-reveal { opacity: 1; transform: none; transition: none; }
}

/* Titres Playfair : rendu net + ligatures (élégance) */
h1, h2, h3, .wp-block-heading {
    font-feature-settings: "liga" 1, "kern" 1;
    text-rendering: optimizeLegibility;
}

/* Le titre du hero (h1) : très haut contraste, légèrement plus serré */
.wp-block-cover h1,
.wp-block-column h1 {
    letter-spacing: -0.015em;
}

/* Sur-titres (eyebrow) : trait fin avant le label pour une touche éditoriale */
.wp-block-cover .has-small-font-size[style*="letter-spacing"],
section .has-small-font-size[style*="letter-spacing"] {
    position: relative;
}

/* Boutons : transition + ombre subtile premium */
.wp-block-button__link {
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.wp-block-button__link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);
    opacity: 1;
}

/* Images : coins doux + ombre portée délicate (cadres premium) */
.wp-block-image img {
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(17, 24, 39, 0.12);
}

/* Liste de services éditoriale (façon agence) : grand titre, survol vivant. */
.vitrine-service-row {
    transition: padding-left 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.vitrine-service-row:last-child {
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}
.vitrine-row-title {
    font-size: clamp(1.6rem, 3.5vw, 2.75rem) !important;
    line-height: 1.05;
    transition: color 0.3s ease, transform 0.3s ease;
}
.vitrine-row-num {
    margin: 0 !important;
    letter-spacing: 0.08em;
    opacity: 0.65;
}
.vitrine-row-arrow {
    opacity: 0;
    transform: translateX(-12px);
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.vitrine-service-row:hover {
    padding-left: 0.75rem;
}
.vitrine-service-row:hover .vitrine-row-title {
    color: var(--wp--preset--color--accent);
}
.vitrine-service-row:hover .vitrine-row-arrow {
    opacity: 1;
    transform: translateX(0);
}
/* sur fond charte, le titre reste clair, l'accent devient blanc atténué */
.has-primary-background-color .vitrine-service-row { border-color: rgba(255,255,255,0.18) !important; }
.has-primary-background-color .vitrine-service-row:hover .vitrine-row-title { color: #fff; opacity: 0.85; }

/* Cartes services : numéro en filigrane plus grand pour la touche magazine */
.is-style-vitrine-card > .wp-block-paragraph:first-child {
    font-size: 1.4rem;
    letter-spacing: 0.02em;
}

/* ==================================================================
   EFFET "WOW" — 100% CSS (compatible usine à démos)
   Parallax, hero cinématique, marquee, typo débordante, hovers.
   ================================================================== */

/* HERO CINÉMATIQUE : l'image de fond est fixée (parallax) + zoom lent infini.
   On cible les covers en pleine largeur (les heros image). */
.wp-block-cover.alignfull .wp-block-cover__image-background {
    animation: vitrine-kenburns 22s ease-in-out infinite alternate;
}
@keyframes vitrine-kenburns {
    from { transform: scale(1); }
    to   { transform: scale(1.12); }
}
@media (prefers-reduced-motion: reduce) {
    .wp-block-cover.alignfull .wp-block-cover__image-background { animation: none; }
}

/* PARALLAX léger : le fond des covers défile plus lentement que le contenu.
   `background-attachment: fixed` sur desktop = profondeur immédiate, zéro JS. */
@media (min-width: 782px) and (prefers-reduced-motion: no-preference) {
    .wp-block-cover.alignfull {
        background-attachment: fixed;
    }
}

/* TITRE HÉRO XXL : on le laisse respirer très grand et serré (signature edito). */
.wp-block-cover h1,
.wp-block-column h1 {
    line-height: 0.98;
    letter-spacing: -0.03em;
}

/* CALIBRAGE de la taille du titre hero selon la longueur de l'accroche.
   Accroche courte → très grande (impact max). Longue → mesurée (anti-débordement,
   reste équilibré dans le cadre). */
.vitrine-hero-len-s .wp-block-cover h1,
.vitrine-hero-len-s .wp-block-column h1 {
    font-size: clamp(3.5rem, 9vw, 7rem) !important;
    line-height: 0.95;
}
.vitrine-hero-len-m .wp-block-cover h1,
.vitrine-hero-len-m .wp-block-column h1 {
    font-size: clamp(2.75rem, 6.5vw, 5rem) !important;
    line-height: 1.0;
}
.vitrine-hero-len-l .wp-block-cover h1,
.vitrine-hero-len-l .wp-block-column h1 {
    font-size: clamp(2.25rem, 4.8vw, 3.6rem) !important;
    line-height: 1.08;
}

/* MARQUEE : bandeau de mots qui défile en boucle (signature Awwwards). */
.vitrine-marquee {
    overflow: hidden;
    white-space: nowrap;
    border-top: 1px solid rgba(0,0,0,0.08);
    border-bottom: 1px solid rgba(0,0,0,0.08);
    padding-block: clamp(1rem, 2.5vw, 1.75rem);
}
.vitrine-marquee__track {
    display: inline-block;
    will-change: transform;
    animation: vitrine-marquee 26s linear infinite;
}
.vitrine-marquee__track span {
    font-family: var(--wp--preset--font-family--serif);
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-weight: 600;
    letter-spacing: -0.01em;
    padding: 0 1.25rem;
    opacity: 0.92;
}
.vitrine-marquee__track span::after {
    content: "•";
    color: var(--wp--preset--color--accent);
    margin-left: 2.5rem;
}
@keyframes vitrine-marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
.vitrine-marquee:hover .vitrine-marquee__track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
    .vitrine-marquee__track { animation: none; }
}

/* IMAGES : zoom doux au survol dans un cadre qui masque le débordement. */
.wp-block-image {
    overflow: hidden;
    border-radius: 16px;
}
.wp-block-image img {
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 16px;
}
.wp-block-image:hover img {
    transform: scale(1.04);
}

/* REVEALS chorégraphiés : on décale légèrement les enfants directs d'une
   section révélée pour un effet "cascade" premium. */
.js-reveal .vitrine-reveal.is-visible > * {
    animation: vitrine-rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.vitrine-reveal.is-visible > *:nth-child(2) { animation-delay: 0.08s; }
.vitrine-reveal.is-visible > *:nth-child(3) { animation-delay: 0.16s; }
.vitrine-reveal.is-visible > *:nth-child(4) { animation-delay: 0.24s; }
@keyframes vitrine-rise {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    .vitrine-reveal.is-visible > * { animation: none; }
}

/* CARTES services : élévation plus marquée + numéro accent en filigrane géant. */
.is-style-vitrine-card {
    position: relative;
    overflow: hidden;
}
.is-style-vitrine-card > .wp-block-paragraph:first-child {
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1;
    opacity: 0.9;
}

/* ==================================================================
   CARTES SERVICES PREMIUM (façon agence Awwwards)
   Numéro en haut, flèche, grand titre en bas, hover éditorial.
   ================================================================== */
.vitrine-svc-card {
    position: relative;
    min-height: 210px;
    display: flex !important;
    flex-direction: column;
    justify-content: space-between;
    gap: 2.5rem;
    padding: clamp(1.6rem, 3vw, 2.25rem);
    border-radius: 20px;
    background: #fff;
    border: 1px solid rgba(17, 24, 39, 0.08);
    color: #1a1a1a;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}
.vitrine-svc-card::after {
    /* trait d'accent qui se déploie en bas au survol */
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 100%;
    background: var(--wp--preset--color--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.vitrine-svc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 50px rgba(17, 24, 39, 0.12);
    border-color: transparent;
}
.vitrine-svc-card:hover::after { transform: scaleX(1); }

.vitrine-svc-card__top {
    width: 100%;
    align-items: center;
}
.vitrine-svc-num {
    margin: 0 !important;
    font-size: 1.05rem !important;
    letter-spacing: 0.08em;
    font-weight: 700;
}
.vitrine-svc-arrow {
    margin: 0 !important;
    line-height: 1;
    opacity: 0;
    transform: translate(-6px, 0);
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.vitrine-svc-card:hover .vitrine-svc-arrow {
    opacity: 1;
    transform: translate(0, 0);
}
.vitrine-svc-title {
    font-size: clamp(1.35rem, 2.2vw, 1.9rem) !important;
    line-height: 1.15;
    color: #1a1a1a;
}
/* Variante sur fond charte : cartes restent blanches, texte sombre (lisible) */
.has-primary-background-color .vitrine-svc-card,
.has-primary-background-color .vitrine-svc-card .vitrine-svc-title { color: #1a1a1a; }

/* Aucun titre ne se coupe en plein mot (fini "Gara/ntie"). */
h1, h2, h3, .wp-block-heading {
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: none;
}
.vitrine-stat {
    white-space: nowrap;
    font-size: clamp(1.75rem, 3.5vw, 2.5rem) !important;
}

/* PREUVE SOCIALE — note Google géante + étoiles dorées */
.vitrine-avis-note {
    font-size: clamp(3.5rem, 9vw, 6.5rem) !important;
    font-weight: 600;
}
.vitrine-avis-note .vitrine-avis-sur {
    font-size: 0.4em;
    opacity: 0.6;
    font-weight: 400;
}
.vitrine-avis-stars {
    letter-spacing: 0.25em;
    color: #f5b301;
    font-size: clamp(1.5rem, 3vw, 2.25rem) !important;
}
/* sur fond charte, les étoiles restent dorées et lisibles */
.has-primary-background-color .vitrine-avis-stars { color: #ffd76a; }
