/* ═══════════════════════════════════════════════════════════════
   COBEFF — EFFETS PREMIUM (curseur, transitions, reveals)
   Fichier séparé, aucun impact sur le thème principal.
═══════════════════════════════════════════════════════════════ */

/* ── 1. CURSEUR — anneau dégradé fin qui tourne + aura douce au survol ── */
/* Actif uniquement sur souris (pas sur tactile) */
@media (hover:hover) and (pointer:fine){
  /* Anneau : dégradé bordeaux→doré, gardé FIN via un masque (le centre reste vide) */
  .cbf-cursor{
    position:fixed;top:0;left:0;width:40px;height:40px;border-radius:50%;
    pointer-events:none;z-index:99999;
    transform:translate(-50%,-50%);
    background:conic-gradient(from 0deg,#9B1A2E,#C4A882,#C0364A,#EDE0C0,#9B1A2E);
    -webkit-mask:radial-gradient(circle,transparent 0 16.5px,#000 18px);
            mask:radial-gradient(circle,transparent 0 16.5px,#000 18px);
    animation:cbfSpin 5s linear infinite;
    transition:width .45s cubic-bezier(.22,1,.36,1),
               height .45s cubic-bezier(.22,1,.36,1),
               opacity .4s ease,-webkit-mask .45s ease,mask .45s ease;
    will-change:transform;opacity:0;
    filter:drop-shadow(0 1px 4px rgba(28,16,8,.25));
  }
  .cbf-cursor.ready{opacity:1}
  @keyframes cbfSpin{to{transform:translate(-50%,-50%) rotate(360deg)}}
  /* Point central bicolore : visible sur tout fond */
  .cbf-dot{
    position:fixed;top:0;left:0;width:9px;height:9px;
    background:var(--crimson,#9B1A2E);border-radius:50%;
    pointer-events:none;z-index:99999;
    transform:translate(-50%,-50%);opacity:0;
    box-shadow:0 0 0 2px rgba(245,237,214,.9), 0 2px 8px rgba(28,16,8,.3);
    transition:opacity .4s ease,width .35s cubic-bezier(.22,1,.36,1),
               height .35s cubic-bezier(.22,1,.36,1),background .35s ease,box-shadow .35s ease;
  }
  .cbf-dot.ready{opacity:1}
  /* Survol : l'anneau grandit MAIS le masque s'ajuste → reste fin ; le point devient aura douce (B) */
  .cbf-cursor.hovering{
    width:58px;height:58px;
    -webkit-mask:radial-gradient(circle,transparent 0 25px,#000 26.5px);
            mask:radial-gradient(circle,transparent 0 25px,#000 26.5px);
    animation-duration:2.4s;
  }
  .cbf-dot.hovering{
    width:40px;height:40px;background:rgba(155,26,46,.10);
    box-shadow:none;
  }
  /* Survol champ texte : fin trait vertical net */
  .cbf-cursor.texting{
    width:3px;height:28px;border-radius:3px;
    background:var(--crimson,#9B1A2E);
    -webkit-mask:none;mask:none;animation:none;
  }
  .cbf-dot.texting{opacity:0}
  /* Cache le vrai curseur */
  body.cbf-cursor-on,
  body.cbf-cursor-on a,
  body.cbf-cursor-on button,
  body.cbf-cursor-on .btn,
  body.cbf-cursor-on .fc,
  body.cbf-cursor-on .hpc,
  body.cbf-cursor-on input,
  body.cbf-cursor-on textarea,
  body.cbf-cursor-on select{cursor:none}
}

/* ── 2. LOADER COBEFF (à chaque changement de page) ── */
.cbf-loader{
  position:fixed;inset:0;z-index:99998;pointer-events:none;overflow:hidden;
  display:flex;align-items:center;justify-content:center;
  background:
    radial-gradient(60vh 60vh at 50% 42%,rgba(196,168,130,.30) 0%,rgba(196,168,130,.06) 34%,transparent 60%),
    repeating-radial-gradient(circle at 50% 42%,transparent 0 46px,rgba(237,224,192,.045) 47px 48px),
    radial-gradient(120vh 120vh at 50% 45%,#A82236 0%,#7A1225 46%,#560D1A 78%,#3E0912 100%);
  opacity:0;visibility:hidden;
  transition:opacity .45s ease,visibility .45s ease;
}
/* Grain doré discret par-dessus le bordeaux */
.cbf-loader::before{
  content:'';position:absolute;inset:0;pointer-events:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  background-size:160px 160px;opacity:.10;mix-blend-mode:soft-light;
}
.cbf-loader.show{opacity:1;visibility:visible;pointer-events:all;transition:opacity .3s ease}
.cbf-loader-inner{position:relative;z-index:2;display:flex;flex-direction:column;align-items:center;gap:26px}
/* Spirale qui se dessine et s'efface en boucle, en rotation lente */
.cbf-ld-spiral{
  filter:drop-shadow(0 0 10px rgba(237,224,192,.5)) drop-shadow(0 0 20px rgba(196,168,130,.3));
  transform-origin:50% 50%;
  animation:cbfSpiralRot 6s linear infinite;
}
.cbf-ld-spiral path{
  stroke-dasharray:200;
  animation:cbfLdDash 1.9s cubic-bezier(.45,.05,.55,.95) infinite;
}
@keyframes cbfLdDash{
  0%{stroke-dashoffset:200}
  52%{stroke-dashoffset:0}
  100%{stroke-dashoffset:-200}
}
.cbf-load-name{
  font-family:'Cormorant Garamond',serif;font-size:21px;font-weight:700;
  letter-spacing:.32em;text-transform:uppercase;
  background:linear-gradient(120deg,#EDE0C0,#FFF7E6 45%,#E3A06A 80%,#EDE0C0);
  -webkit-background-clip:text;background-clip:text;
  -webkit-text-fill-color:transparent;color:transparent;
  padding-left:.32em;
  animation:cbfLoadFade 1.6s ease-in-out infinite;
}
@keyframes cbfLoadFade{0%,100%{opacity:.6}50%{opacity:1}}
/* Barre de progression lumineuse */
.cbf-ld-bar{
  width:190px;height:2px;border-radius:2px;overflow:hidden;
  background:rgba(245,237,214,.14);
}
.cbf-ld-bar span{
  display:block;height:100%;width:45%;
  background:linear-gradient(90deg,transparent,#E3A06A 35%,#FFF7E6 50%,#E3A06A 65%,transparent);
  animation:cbfLdBar 1.15s ease-in-out infinite;
}
@keyframes cbfLdBar{from{transform:translateX(-110%)}to{transform:translateX(320%)}}

/* ── Respect des préférences d'accessibilité ── */
/* ── 0. PRÉLOADER (premier chargement) ── */
#cbf-preload{
  position:fixed;inset:0;z-index:100000;overflow:hidden;
  display:flex;align-items:center;justify-content:center;
}
.cbf-pl-curtain{
  position:absolute;top:0;bottom:0;width:50.5%;z-index:1;overflow:hidden;
}
/* Grain doré discret sur chaque moitié */
.cbf-pl-curtain::before{
  content:'';position:absolute;inset:0;pointer-events:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  background-size:160px 160px;opacity:.10;mix-blend-mode:soft-light;
}
/* Fonds bordeaux + lueur dorée, symétriques au centre (la couture est invisible) */
.cbf-pl-left{left:0;
  background:
    radial-gradient(70vh 70vh at right 42%,rgba(196,168,130,.32) 0%,rgba(196,168,130,.07) 34%,transparent 60%),
    repeating-radial-gradient(circle at right 42%,transparent 0 46px,rgba(237,224,192,.05) 47px 48px),
    radial-gradient(130vh 130vh at right 45%,#A82236 0%,#7A1225 46%,#560D1A 80%,#3E0912 100%);
  animation:cbfCurtainL .75s cubic-bezier(.76,0,.24,1) 1.75s forwards}
.cbf-pl-right{right:0;
  background:
    radial-gradient(70vh 70vh at left 42%,rgba(196,168,130,.32) 0%,rgba(196,168,130,.07) 34%,transparent 60%),
    repeating-radial-gradient(circle at left 42%,transparent 0 46px,rgba(237,224,192,.05) 47px 48px),
    radial-gradient(130vh 130vh at left 45%,#A82236 0%,#7A1225 46%,#560D1A 80%,#3E0912 100%);
  animation:cbfCurtainR .75s cubic-bezier(.76,0,.24,1) 1.75s forwards}
@keyframes cbfCurtainL{to{transform:translateX(-100%)}}
@keyframes cbfCurtainR{to{transform:translateX(100%)}}
.cbf-pl-inner{
  position:relative;z-index:2;display:flex;flex-direction:column;align-items:center;gap:18px;
  animation:cbfInnerOut .5s ease 1.75s forwards;
}
@keyframes cbfInnerOut{to{opacity:0;transform:scale(1.06)}}
#cbf-preload{animation:cbfPlGone 0s linear 2.55s forwards}
@keyframes cbfPlGone{to{visibility:hidden;pointer-events:none}}
.cbf-pl-spiral{
  filter:drop-shadow(0 0 10px rgba(237,224,192,.55)) drop-shadow(0 0 22px rgba(196,168,130,.35));
  transform-origin:50% 50%;
  animation:cbfSpiralRot 7s linear infinite;
}
.cbf-pl-spiral path{
  stroke-dasharray:200;stroke-dashoffset:200;
  animation:cbfDraw 1.25s cubic-bezier(.45,.05,.25,1) forwards;
}
@keyframes cbfDraw{to{stroke-dashoffset:0}}
@keyframes cbfSpiralRot{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}
/* Nom : lettres qui apparaissent en cascade (flou → net, remontée) */
.cbf-pl-name{
  font-family:'Cormorant Garamond',serif;font-size:32px;font-weight:700;
  letter-spacing:.34em;text-transform:uppercase;padding-left:.34em;
  display:flex;
}
.cbf-pl-name span{
  display:inline-block;
  background:linear-gradient(120deg,#EDE0C0 0%,#FFF7E6 45%,#E3A06A 80%,#EDE0C0 100%);
  -webkit-background-clip:text;background-clip:text;
  -webkit-text-fill-color:transparent;color:transparent;
  opacity:0;transform:translateY(16px);filter:blur(7px);
  animation:cbfLetter .65s cubic-bezier(.22,1,.36,1) forwards;
}
.cbf-pl-name span:nth-child(1){animation-delay:.40s}
.cbf-pl-name span:nth-child(2){animation-delay:.48s}
.cbf-pl-name span:nth-child(3){animation-delay:.56s}
.cbf-pl-name span:nth-child(4){animation-delay:.64s}
.cbf-pl-name span:nth-child(5){animation-delay:.72s}
.cbf-pl-name span:nth-child(6){animation-delay:.80s}
@keyframes cbfLetter{to{opacity:1;transform:none;filter:blur(0)}}
/* Filet doré qui s'étire sous le nom */
.cbf-pl-line{
  width:0;height:1px;margin-top:-4px;
  background:linear-gradient(90deg,transparent,#E3A06A 30%,#FFF7E6 50%,#E3A06A 70%,transparent);
  animation:cbfLineGrow .8s cubic-bezier(.22,1,.36,1) 1s forwards;
}
@keyframes cbfLineGrow{to{width:230px}}
/* Signature discrète */
.cbf-pl-tag{
  font-family:'DM Sans',sans-serif;font-size:11px;font-weight:500;
  letter-spacing:.3em;text-transform:uppercase;color:rgba(245,237,214,.55);
  opacity:0;transform:translateY(6px);
  animation:cbfTagIn .7s ease 1.2s forwards;
}
@keyframes cbfTagIn{to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){
  #cbf-preload{display:none!important}
}

/* ── 4. BOUTONS EFFET LIQUIDE ── */
/* Une onde de couleur se propage depuis le point de survol */
.cbf-liquid{position:relative;overflow:hidden;isolation:isolate}
.cbf-liquid > *{position:relative;z-index:2}
.cbf-liquid .cbf-blob{
  position:absolute;top:0;left:0;width:0;height:0;border-radius:50%;
  transform:translate(-50%,-50%);pointer-events:none;z-index:1;
  background:radial-gradient(circle,rgba(245,237,214,.28) 0%,rgba(245,237,214,.12) 55%,transparent 72%);
  transition:width .55s cubic-bezier(.22,1,.36,1),height .55s cubic-bezier(.22,1,.36,1),opacity .5s ease;
  opacity:0;
}
/* Boutons clairs (bordeaux) : l'onde est beige claire */
.cbf-liquid.cbf-liquid-dark .cbf-blob{
  background:radial-gradient(circle,rgba(155,26,46,.20) 0%,rgba(155,26,46,.08) 55%,transparent 72%);
}
.cbf-liquid.cbf-blob-on .cbf-blob{opacity:1}

/* ── 5. TILT 3D SUR LES CARTES FORMATION ── */
.cbf-tilt{
  transform-style:preserve-3d;
  transition:transform .2s ease, box-shadow .3s ease;
  will-change:transform;
}
/* Reflet de lumière qui suit la souris sur la carte */
.cbf-tilt .cbf-glare{
  position:absolute;inset:0;border-radius:inherit;pointer-events:none;z-index:3;
  background:radial-gradient(circle at var(--gx,50%) var(--gy,50%),rgba(245,237,214,.28) 0%,transparent 42%);
  opacity:0;transition:opacity .3s ease;
}
.cbf-tilt.cbf-tilting .cbf-glare{opacity:1}

/* ── 6. BLOBS ORGANIQUES ANIMÉS (fonds de section clairs) ── */
.cbf-blobs{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:0}
.cbf-blob-shape{
  position:absolute;border-radius:50%;filter:blur(60px);opacity:.5;
  will-change:transform;
}
.cbf-blob-a{width:360px;height:360px;top:-80px;left:-60px;
  background:radial-gradient(circle,rgba(155,26,46,.20),transparent 70%);
  animation:cbfBlobA 22s ease-in-out infinite}
.cbf-blob-b{width:300px;height:300px;bottom:-70px;right:-40px;
  background:radial-gradient(circle,rgba(196,168,130,.28),transparent 70%);
  animation:cbfBlobB 26s ease-in-out infinite}
.cbf-blob-c{width:240px;height:240px;top:40%;right:20%;
  background:radial-gradient(circle,rgba(192,54,74,.14),transparent 70%);
  animation:cbfBlobC 30s ease-in-out infinite}
@keyframes cbfBlobA{0%,100%{transform:translate(0,0) scale(1)}33%{transform:translate(60px,40px) scale(1.15)}66%{transform:translate(30px,80px) scale(.9)}}
@keyframes cbfBlobB{0%,100%{transform:translate(0,0) scale(1)}33%{transform:translate(-50px,-30px) scale(1.12)}66%{transform:translate(-80px,20px) scale(.95)}}
@keyframes cbfBlobC{0%,100%{transform:translate(0,0) scale(1)}50%{transform:translate(-40px,-50px) scale(1.2)}}
/* La section hôte doit être en position relative et son contenu au-dessus */
.cbf-blob-host{position:relative}
.cbf-blob-host > *:not(.cbf-blobs){position:relative;z-index:1}

/* ── 7. SÉPARATEURS COURBES SVG ── */
/* On dégage de l'espace vertical pour que les vagues ne mordent pas sur les logos */
.lp-ticker{padding-top:50px!important;padding-bottom:50px!important}
.cbf-wave{position:absolute;left:0;width:100%;line-height:0;z-index:3;pointer-events:none}
.cbf-wave svg{display:block;width:100%}
.cbf-wave-top{top:-1px}
.cbf-wave-bottom{bottom:-1px}
.cbf-wave-top svg{height:30px}
.cbf-wave-bottom svg{height:30px}
@media(min-width:901px){
  .lp-ticker{padding-top:58px!important;padding-bottom:58px!important}
  .cbf-wave-top svg,.cbf-wave-bottom svg{height:42px}
}

/* ── 8. GRAIN ÉDITORIAL SUR LES PHOTOS ── */
/* Uniquement les conteneurs déjà positionnés — on ne touche PAS à hero-bg-img ni resto-img
   (ils sont en position:absolute dans leur layout, les forcer en relative casse la page) */
.fc-img, .detail-img, .about-frame{position:relative}
.fc-img::after, .detail-img::after, .about-frame::after, .resto-img::after, .hero-bg-img::after,
.ph.ph-img::after{
  content:'';position:absolute;inset:0;z-index:2;pointer-events:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  background-size:140px 140px;
  opacity:.07;mix-blend-mode:soft-light;
}
/* Le voile de lisibilité du bandeau titre doit rester au-dessus du grain */
.ph.ph-img::before{z-index:3}
.ph.ph-img .ph-t,.ph.ph-img .ph-s,.ph.ph-img .ph-ey{z-index:4}

/* ── 9. THÈME SAISONNIER (particules qui tombent) ── */
#cbf-season{position:fixed;inset:0;pointer-events:none;z-index:9400;overflow:hidden}
.cbf-flake{position:absolute;top:-24px;will-change:transform;opacity:0;
  animation:cbfFall linear infinite}
/* Chute avec oscillation latérale (comme de vrais flocons portés par l'air) */
@keyframes cbfFall{
  0%{transform:translateY(-3vh) translateX(0);opacity:0}
  8%{opacity:var(--op,.9)}
  25%{transform:translateY(25vh) translateX(var(--sway,24px))}
  50%{transform:translateY(50vh) translateX(calc(var(--sway,24px) * -1))}
  75%{transform:translateY(75vh) translateX(var(--sway,24px))}
  92%{opacity:var(--op,.9)}
  100%{transform:translateY(104vh) translateX(0);opacity:0}
}
/* Flocon réaliste : vrai cristal à 6 branches, qui tourne lentement */
.cbf-flake.snow > i{
  display:block;width:100%;height:100%;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.1' stroke-linecap='round'%3E%3Cg%3E%3Cpath d='M12,12 L12,2 M12,6 L9.5,3.5 M12,6 L14.5,3.5 M12,9 L10.4,7.2 M12,9 L13.6,7.2'/%3E%3C/g%3E%3Cg transform='rotate(60 12 12)'%3E%3Cpath d='M12,12 L12,2 M12,6 L9.5,3.5 M12,6 L14.5,3.5 M12,9 L10.4,7.2 M12,9 L13.6,7.2'/%3E%3C/g%3E%3Cg transform='rotate(120 12 12)'%3E%3Cpath d='M12,12 L12,2 M12,6 L9.5,3.5 M12,6 L14.5,3.5 M12,9 L10.4,7.2 M12,9 L13.6,7.2'/%3E%3C/g%3E%3Cg transform='rotate(180 12 12)'%3E%3Cpath d='M12,12 L12,2 M12,6 L9.5,3.5 M12,6 L14.5,3.5 M12,9 L10.4,7.2 M12,9 L13.6,7.2'/%3E%3C/g%3E%3Cg transform='rotate(240 12 12)'%3E%3Cpath d='M12,12 L12,2 M12,6 L9.5,3.5 M12,6 L14.5,3.5 M12,9 L10.4,7.2 M12,9 L13.6,7.2'/%3E%3C/g%3E%3Cg transform='rotate(300 12 12)'%3E%3Cpath d='M12,12 L12,2 M12,6 L9.5,3.5 M12,6 L14.5,3.5 M12,9 L10.4,7.2 M12,9 L13.6,7.2'/%3E%3C/g%3E%3C/svg%3E") center/contain no-repeat;
  filter:blur(var(--blur,0px)) drop-shadow(0 0 1px rgba(255,255,255,.5));
  animation:cbfFlakeSpin linear infinite;
  animation-duration:var(--spin,9s);
}
.cbf-flake.snow.ccw > i{animation-direction:reverse}
@keyframes cbfFlakeSpin{to{transform:rotate(360deg)}}
/* Illustrations festives dans les coins bas */
.cbf-xmas{position:fixed;bottom:0;z-index:9350;pointer-events:none;filter:drop-shadow(0 2px 6px rgba(28,16,8,.25))}
.cbf-xmas-l{left:0}
.cbf-xmas-r{right:0;transform:scaleX(-1)}
@media(max-width:640px){.cbf-xmas{width:82px;height:130px}}

@media (prefers-reduced-motion:reduce){
  #cbf-season{display:none!important}
  .cbf-blobs{display:none!important}
  .cbf-cursor,.cbf-dot{display:none!important}
  .cbf-loader{display:none!important}
  .cbf-liquid .cbf-blob{display:none!important}
  .cbf-tilt{transform:none!important}
  .cbf-tilt .cbf-glare{display:none!important}
}
