/* ==========================================================================
   LCV — harmonisation design (prototype 29/11/2026)
   Charte : nuit #0e1e2f · or #e5c58a (fond sombre) · or foncé #b8893b (fond clair)
            crème #f6f3ec · titres Georgia · texte system-ui
   Amélioration progressive : chaque nouveauté est derrière @supports ou
   ignorée sans dommage par les anciens Safari iOS.
   Tous les mouvements sont sous prefers-reduced-motion: no-preference.
   ========================================================================== */

:root{
  --lcvd-nuit:#0e1e2f;
  --lcvd-or:#e5c58a;
  --lcvd-or-fonce:#b8893b;
  --lcvd-creme:#f6f3ec;
  --lcvd-serif:Georgia,"Times New Roman",serif;
  --lcvd-sans:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --lcvd-ease:cubic-bezier(.22,.7,.2,1);
}

/* --------------------------------------------------------------------------
   1. Couleurs : on remplace les teintes parasites à la source (variables)
   -------------------------------------------------------------------------- */
/* Gabarit « royal » (contact, villes) : #ffda82 → or, #13304f / #102b4a → nuit */
html:not(#lcvd) body.lcv-site{
  --cv-or:#e5c58a;
  --cv-nuit:#0e1e2f;
  --cv-cadre:rgba(14,30,47,.92);
}
/* Gabarit « lcv » (urgence, métiers, blog) : #0c1f3f → nuit, or clair → or,
   Playfair/Inter → Georgia/system-ui (le logo garde sa police, voir plus bas) */
html body .lcv{
  --nuit:#0e1e2f;
  --or-clair:#e5c58a;
  --serif:var(--lcvd-serif);
  --sans:var(--lcvd-sans);
}
html body .lcv .marque{--serif:"Playfair Display","Playfair Secours",Georgia,serif}
/* Urgence : #1e2a3a → nuit, #e4bf80 → or */
html body :is(.lcv-urg,.lcv-mesh){--lcv-dark:#0e1e2f}
html body.page-id-2514{--urgence-or:#e5c58a}
/* Accueil : #e4bf80 → or, #13283d conservé (ton de fond du film) */
html body.lcv-boutique{--gold:#e5c58a}
/* Elementor : texte « #111 » des titres métiers → nuit */
html body .elementor-kit-6{--e-global-color-text:#0e1e2f}

/* Teintes codées en dur (pas de variable) */
html body .lcv.lcv-reseaux,
html body .lcv-reseaux h2{color:#0e1e2f}
html body .lcv-reseaux .reseaux-liens a,
html body #lcv-choix-travaux a{background-color:#0e1e2f;border-color:#0e1e2f}
html body :is(.eyebrow,.brand small,.city-promise,.city-hero figcaption,.signature,.nav a.active,
  .city-directory summary,.more-services summary,.lcv-city-guide h3,.footer h4){color:#e5c58a}
html body.lcv-royal .service-list h3,
html body.lcv-royal .page-title h1 em,
html body.lcv-royal .entry-content .footer .lcv-footer-title{color:#e5c58a !important}
html body.lcv-royal .form .retour-form{border-color:#e5c58a}
html body.lcv-fond-ecuries-global.lcv-boutique :is(#savoir-faire,#zones,#boutique) :is(address,p) a:not(.button),
html body #savoir-faire .services article[data-service] .lcv-service-link{color:#e5c58a}
/* Blog : #1e2a3a → nuit */
html body .lcv-blog,
html body .lcv-blog :is(h2,h3,strong,.lcv-blog-essentiel-title,.lcv-blog-table caption),
html body .lcv-blog-essentiel-list li,
html body .lcv-blog-faq-item summary,
html body :is(.lcv-quiz-title,.lcv-quiz-q,.lcv-quiz-opt,.lcv-quiz-cta-tel,.lcv-quiz-reco-budget,.lcv-quiz-reco-tuile){color:#0e1e2f}
html body :is(.lcv-blog-table thead,.lcv-blog-cta){background-color:#0e1e2f}
html body.single-post.lcv-site #primary article p a.lcv-blog-cta-tel{background-color:#0e1e2f}
/* Bandeau cookies : #142b43 → nuit (texte uniquement, mise en page intacte) */
html body #cmplz-cookiebanner-container .cmplz-cookiebanner{color:#0e1e2f}
/* Titre du héros métier (span or foncé posé sur photo sombre) → or clair, AA */
html body:not(#lcvd) h1.elementskit-section-title > span{color:#e5c58a !important}
/* Titres noirs repérés par le script (#000 / #111 sur fond clair) */
html body .lcvd-encre{color:#0e1e2f !important}

/* --------------------------------------------------------------------------
   2. Typographie : titres en Georgia partout (logo, en-tête et cookies exclus)
   -------------------------------------------------------------------------- */
:is(h1,h2,h3):not(header *,.cmplz-cookiebanner *,.marque *,.brand *,.site-title){
  font-family:var(--lcvd-serif) !important;
}
:is(h1,h2,h3):not(header *,.cmplz-cookiebanner *) > :is(span,em,strong,b):not([class*="lcv-lys"],[class*="icon"],[class*="fa-"]){
  font-family:inherit !important;
}
:is(h1,h2,h3){text-wrap:balance}
:is(p,li,figcaption,blockquote){text-wrap:pretty}

/* --------------------------------------------------------------------------
   3. Formulaires : bouton d'envoi du devis en or, cases et curseurs or
   -------------------------------------------------------------------------- */
html body.lcv-site #page #form-devis :is(button.button,button[type="submit"],input[type="submit"]):not(.lcv-quote-back){
  background:#e5c58a !important;
  color:#0e1e2f !important;
  border:1px solid #e5c58a !important;
  -webkit-text-fill-color:#0e1e2f;
  text-shadow:none !important;
  font-weight:700;
}
html body.lcv-site #page #form-devis :is(button.button,button[type="submit"],input[type="submit"]):not(.lcv-quote-back):is(:hover,:focus-visible){
  background:#f0d9a8 !important;border-color:#f0d9a8 !important;
}
/* Bouton « Retour » : secondaire, filet or sur nuit */
html body.lcv-site #page #form-devis button.lcv-quote-back{background:transparent !important;border:1px solid rgba(229,197,138,.6) !important;color:#e5c58a !important}
:where(input[type="checkbox"],input[type="radio"],input[type="range"],progress){accent-color:#b8893b}
html body.lcv-site #page #form-devis :is(input[type="radio"],input[type="checkbox"]){accent-color:#e5c58a}

/* Focus clavier soigné : or foncé, lisible sur clair (3,2:1) comme sur nuit (5,3:1) */
:where(a,button,input,select,textarea,summary,[tabindex]):focus-visible{
  outline:2px solid #b8893b;
  outline-offset:3px;
}
/* Barre de défilement aux couleurs de la charte (Chrome 121+, Firefox) */
html{scrollbar-color:#b8893b #0e1e2f}

/* --------------------------------------------------------------------------
   4. Cartes de services (accueil, villes) : survol doux, filet or
   -------------------------------------------------------------------------- */
html body #savoir-faire .services > article,
html body .lcv-city-guide .lcv-info-grid > article,
html body .lcv-urg .lcv-card{
  position:relative;
}
html body #savoir-faire .services > article::before,
html body .lcv-city-guide .lcv-info-grid > article::before{
  content:"";position:absolute;left:0;top:-1px;height:1px;width:100%;
  background:linear-gradient(90deg,#e5c58a,rgba(229,197,138,0));
  transform:scaleX(0);transform-origin:0 50%;pointer-events:none;
}
@media (hover:hover){
  html body #savoir-faire .services > article:hover::before,
  html body .lcv-city-guide .lcv-info-grid > article:hover::before{transform:scaleX(1)}
  html body .lcv-urg .lcv-card:hover{box-shadow:0 10px 28px -18px rgba(14,30,47,.45),inset 0 2px 0 #b8893b}
}
html body #savoir-faire .services > article:focus-within::before{transform:scaleX(1)}

/* --------------------------------------------------------------------------
   5. Liens « Découvrir… » : soulignement doré qui se dessine
   -------------------------------------------------------------------------- */
a.lcvd-lien{
  text-decoration:none !important;
  background-image:linear-gradient(currentColor,currentColor),linear-gradient(var(--lcvd-trait,#b8893b),var(--lcvd-trait,#b8893b));
  background-size:100% 1px,0 2px;
  background-position:0 100%,0 100%;
  background-repeat:no-repeat;
  padding-bottom:2px;
}
a.lcvd-lien.lcvd-sombre{--lcvd-trait:#e5c58a}
/* lien en bloc (cible tactile 44 px, texte centré) : le trait suit la ligne de texte */
a.lcvd-lien.lcvd-bloc{padding-bottom:0;background-position:0 calc(50% + .78em),0 calc(50% + .78em)}
a.lcvd-lien:is(:hover,:focus-visible){background-size:100% 0,100% 2px}

/* --------------------------------------------------------------------------
   6. Émojis remplacés par des icônes au trait or (le script pose .lcvd-ico)
   -------------------------------------------------------------------------- */
.lcvd-ico{font-size:0 !important;line-height:0 !important;color:transparent}
.lcvd-ico > img.emoji{display:none !important}
.lcvd-ico::before{
  content:"";display:inline-block;vertical-align:middle;
  width:var(--lcvd-taille,28px);height:var(--lcvd-taille,28px);
  background-color:var(--lcvd-teinte,#b8893b);
  -webkit-mask:var(--lcvd-i) center/contain no-repeat;
          mask:var(--lcvd-i) center/contain no-repeat;
}
.lcv-trust-icon.lcvd-ico{display:flex;align-items:center;justify-content:center}
.lcv-radio-emoji.lcvd-ico{display:block;margin:0 auto 6px;--lcvd-taille:26px}
.lcv-card-icon.lcvd-ico{--lcvd-taille:28px}
.lcvd-ico[data-lcvd-ico="shield"]{--lcvd-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l7 3v5c0 4.6-3 8.4-7 10-4-1.6-7-5.4-7-10V6z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E")}
.lcvd-ico[data-lcvd-ico="bolt"]{--lcvd-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 2.5L5 13.5h6l-1 8 8-11h-6z'/%3E%3C/svg%3E")}
.lcvd-ico[data-lcvd-ico="check"]{--lcvd-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M8 12.5l2.7 2.7L16.2 9.6'/%3E%3C/svg%3E")}
.lcvd-ico[data-lcvd-ico="house"]{--lcvd-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11.5L12 4l9 7.5'/%3E%3Cpath d='M5.5 10v10h13V10'/%3E%3Cpath d='M10 20v-5.5h4V20'/%3E%3C/svg%3E")}
.lcvd-ico[data-lcvd-ico="drop"]{--lcvd-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.5s-6 7-6 11a6 6 0 0012 0c0-4-6-11-6-11z'/%3E%3Cpath d='M9.2 15a2.8 2.8 0 002.8 2.6'/%3E%3C/svg%3E")}
.lcvd-ico[data-lcvd-ico="sinistre"]{--lcvd-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11.5L12 4l9 7.5'/%3E%3Cpath d='M5.5 10v10h13V10'/%3E%3Cpath d='M12.5 8.5l-2 3.5 2.5 2-2 3.5'/%3E%3C/svg%3E")}
.lcvd-ico[data-lcvd-ico="vent"]{--lcvd-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8.5h10.5a2.8 2.8 0 10-2.8-2.8'/%3E%3Cpath d='M3 12.5h15a2.8 2.8 0 11-2.8 2.8'/%3E%3Cpath d='M3 16.5h7'/%3E%3C/svg%3E")}
.lcvd-ico[data-lcvd-ico="cle"]{--lcvd-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.5 3.6a5 5 0 00-4.4 7.2L3.8 17.1a1.9 1.9 0 002.7 2.7l6.3-6.3a5 5 0 007.2-4.4l-3 1.2-2.4-1.6-.4-2.9z'/%3E%3C/svg%3E")}
.lcvd-ico[data-lcvd-ico="charpente"]{--lcvd-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 19L12 5l9.5 14z'/%3E%3Cpath d='M12 5v14M7.2 19L12 12l4.8 7'/%3E%3C/svg%3E")}
.lcvd-ico[data-lcvd-ico="marteau"]{--lcvd-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13.5 3.5l7 7-2.3 2.3-7-7z'/%3E%3Cpath d='M12.4 8.9L3.8 17.5a1.7 1.7 0 002.4 2.4l8.6-8.6'/%3E%3C/svg%3E")}
.lcvd-ico[data-lcvd-ico="devis"]{--lcvd-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='4' width='14' height='17' rx='1.5'/%3E%3Cpath d='M9 4V2.8h6V4M8.5 10h7M8.5 13.5h7M8.5 17h4'/%3E%3C/svg%3E")}


/* --------------------------------------------------------------------------
   7. Mouvements (uniquement si l'utilisateur n'a pas demandé moins d'animations)
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference){

  /* 7a. Titres h1/h2 : l'encre se dépose de gauche à droite (script lcv-design.js).
     Aucun changement de mise en page : seul un masque et une translation. */
  .lcvd-t{
    -webkit-mask-image:linear-gradient(90deg,#000 0 40%,transparent 60% 100%);
            mask-image:linear-gradient(90deg,#000 0 40%,transparent 60% 100%);
    -webkit-mask-size:250% 100%;mask-size:250% 100%;
    -webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;
    -webkit-mask-position:100% 0;mask-position:100% 0;
    transform:translateY(.16em);
  }
  html.lcv-anim-ready .lcv-anim.lcvd-t{opacity:1 !important;transition:none}
  .lcvd-t.lcvd-in,
  html.lcv-anim-ready .lcv-anim.lcvd-t.lcvd-in{
    -webkit-mask-position:0 0;mask-position:0 0;
    transform:none;
    transition:-webkit-mask-position .85s var(--lcvd-ease),mask-position .85s var(--lcvd-ease),transform .85s var(--lcvd-ease);
  }

  /* 7b. Cartes : montée de 2 px et filet or (transform, indépendant du
     « translate » déjà utilisé par l'entrée au défilement du site) */
  html body #savoir-faire .services > article,
  html body .lcv-city-guide .lcv-info-grid > article,
  html body .lcv-urg .lcv-card{transition:transform .35s var(--lcvd-ease),box-shadow .35s var(--lcvd-ease)}
  html body #savoir-faire .services > article::before,
  html body .lcv-city-guide .lcv-info-grid > article::before{transition:transform .5s var(--lcvd-ease)}
  @media (hover:hover){
    html body #savoir-faire .services > article:hover,
    html body .lcv-city-guide .lcv-info-grid > article:hover,
    html body .lcv-urg .lcv-card:hover{transform:translateY(-2px)}
  }

  /* 7c. Soulignement doré */
  a.lcvd-lien{transition:background-size .45s var(--lcvd-ease)}

  /* 7d. Apparition douce des réponses de FAQ (@starting-style, Chrome 117+ / Safari 17.5+) */
  :is(.lcv-blog-faq-item,.lcv-urg details,.lcv details)[open] > :not(summary){
    transition:opacity .35s var(--lcvd-ease),transform .35s var(--lcvd-ease);
  }
  @starting-style{
    :is(.lcv-blog-faq-item,.lcv-urg details,.lcv details)[open] > :not(summary){opacity:0;transform:translateY(-4px)}
  }
  /* et des icônes au trait */
  .lcvd-ico::before{transition:opacity .6s var(--lcvd-ease),transform .6s var(--lcvd-ease)}
  @starting-style{ .lcvd-ico::before{opacity:0;transform:scale(.85)} }

  /* 7e. Article de blog : fil d'or de lecture lié au défilement (aucun JS) */
  @supports (animation-timeline: scroll()){
    body.single-post::after{
      content:"";position:fixed;left:0;right:0;top:0;height:2px;z-index:9990;
      background:linear-gradient(90deg,#b8893b,#e5c58a);
      transform-origin:0 50%;transform:scaleX(0);pointer-events:none;
      animation:lcvd-lecture linear both;animation-timeline:scroll(root block);
    }
    @keyframes lcvd-lecture{to{transform:scaleX(1)}}
  }

  /* 7f. Icônes de confiance (urgence) : légère entrée liée à la vue */
  @supports (animation-timeline: view()){
    .lcv-trust-item .lcvd-ico::before{
      animation:lcvd-ico-entree linear both;animation-timeline:view();animation-range:entry 10% entry 70%;
    }
    @keyframes lcvd-ico-entree{from{opacity:.2;transform:scale(.8)}to{opacity:1;transform:none}}
  }

  /* 7g. Transition entre pages (même site, Chrome 126+ / Safari 18.2+) :
     fondu très court vers le bleu nuit, pas d'écran d'attente */
  @view-transition{navigation:auto}
  ::view-transition{background-color:#0e1e2f}
  ::view-transition-old(root){animation:lcvd-vt-sortie .16s ease-in both}
  ::view-transition-new(root){animation:lcvd-vt-entree .24s .06s ease-out both}
  @keyframes lcvd-vt-sortie{to{opacity:0}}
  @keyframes lcvd-vt-entree{from{opacity:0}}
}

/* --------------------------------------------------------------------------
   8. Réseaux sociaux : tuiles nettes, léger relief, inclinaison 3D au survol
   -------------------------------------------------------------------------- */
/* Doublon d'icône dans le pied de page (logo PNG 128 px + icône SVG ajoutée
   par un second script) : on garde une seule icône par lien. */
#lcv-profils-publics a .lcv-social-logo-frame ~ .network-icon{display:none !important}
/* Cibles tactiles ≥ 44 px */
:is(#lcv-profils-publics,.reseaux-liens,.social-ribbon,.footer-grid) a{min-height:44px}
.footer-grid a.with-network-icon{display:inline-flex;align-items:center;gap:10px}
/* Relief doux : dégradé ivoire, filet or, ombre portée */
.lcv-social-logo-frame{
  background:linear-gradient(160deg,#ffffff 0%,#f3ede1 100%) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9),0 0 0 1px rgba(229,197,138,.45),0 8px 16px -8px rgba(0,0,0,.6),0 2px 4px -2px rgba(0,0,0,.35);
}
.social-ribbon a.with-network-icon{
  background:linear-gradient(180deg,#152a40 0%,#0e1e2f 100%) !important;
  border-color:rgba(229,197,138,.28) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06),0 10px 20px -14px rgba(0,0,0,.8);
}
:is(.social-ribbon,.footer-grid) .network-icon{
  border-radius:9px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 6px 12px -6px rgba(0,0,0,.65);
}
@media (prefers-reduced-motion: no-preference){
  .lcv-social-logo-frame,:is(.social-ribbon,.footer-grid) .network-icon,.social-ribbon a.with-network-icon{
    transition:transform .2s ease-out,box-shadow .2s ease-out,border-color .2s ease-out;
  }
  @media (hover:hover){
    :is(#lcv-profils-publics,.reseaux-liens) a:hover .lcv-social-logo-frame,
    :is(.social-ribbon,.footer-grid) a:hover .network-icon{
      transform:perspective(320px) rotateX(10deg) rotateY(-12deg) translateY(-2px);
      box-shadow:inset 0 1px 0 rgba(255,255,255,.9),0 0 0 1px #e5c58a,0 14px 22px -10px rgba(0,0,0,.7);
    }
    .social-ribbon a.with-network-icon:hover{transform:perspective(600px) rotateX(6deg) translateY(-2px);border-color:rgba(229,197,138,.7) !important}
  }
}
