/* ---------- Carte de visite 3D : elle flotte, suit le curseur, se retourne au clic ---------- */
.cdv { --w: clamp(280px, 60vw, 640px); --ease: cubic-bezier(.2, .8, .2, 1);
  position: relative; display: grid; justify-items: center; padding: clamp(36px, 6vw, 90px) 0 clamp(20px, 3vw, 40px); perspective: 1500px; }
.cdv::before { content: ""; position: absolute; left: 50%; top: 46%; width: min(92%, 980px); aspect-ratio: 2 / 1; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(214, 160, 110, .20), rgba(138, 97, 146, .10) 55%, transparent 78%); filter: blur(10px); }
.cdv-flotte, .cdv-carte, .cdv-inclinaison, .cdv-tourne { transform-style: preserve-3d; }
.cdv-flotte { animation: cdv-flotte 8s ease-in-out infinite; }
.cdv-carte { position: relative; width: var(--w); aspect-ratio: 1134 / 684; cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.cdv-carte.vire { animation: cdv-saut 1.05s var(--ease); }
.cdv-inclinaison { position: absolute; inset: 0; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s var(--ease); }
.cdv-tourne { position: absolute; inset: 0; transform: rotateY(0deg); transition: transform 1.05s cubic-bezier(.3, .9, .2, 1); }
.cdv-carte[aria-pressed="true"] .cdv-tourne { transform: rotateY(180deg); }
.cdv-face { position: absolute; inset: 0; overflow: hidden; border-radius: 2.2%/3.6%; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: #1b2a3f;
  box-shadow: 0 0 0 1px rgba(214, 160, 110, .22); }
.cdv-face img { display: block; width: 100%; height: 100%; object-fit: cover; border: 0; border-radius: 0; background: none; scale: 1; translate: none; }
.cdv-recto { transform: translateZ(1.5px); }
.cdv-verso { transform: rotateY(180deg) translateZ(1.5px); }
/* épaisseur : quelques feuillets dorés derrière les faces, visibles seulement de profil */
.cdv-feuillet { position: absolute; inset: 0; border-radius: 2.2%/3.6%; background: #7a5a3a; }
.cdv-feuillet:nth-child(1) { transform: translateZ(-.5px); }
.cdv-feuillet:nth-child(2) { transform: translateZ(-1px); background: #8a6844; }
.cdv-feuillet:nth-child(3) { transform: translateZ(-1.5px); }
/* reflet qui suit le curseur */
.cdv-face::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: var(--reflet, 0); transition: opacity .4s;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 30%), rgba(255, 236, 205, .42), rgba(255, 236, 205, 0) 52%); mix-blend-mode: soft-light; }
.cdv-ombre { width: calc(var(--w) * .78); height: 26px; margin-top: clamp(26px, 4vw, 54px); border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .5), transparent 72%); filter: blur(7px); animation: cdv-ombre 8s ease-in-out infinite; }
.cdv-indice { margin: clamp(18px, 2.4vw, 28px) 0 0; font: 11px/1.6 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--brume); display: inline-flex; align-items: center; gap: 12px; min-height: 44px; }
.cdv-indice-icone { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--ligne); border-radius: 50%; color: var(--peche); transition: transform .8s var(--ease); }
.cdv[data-retourne="true"] .cdv-indice-icone { transform: rotate(180deg); }
.cdv-carte:focus-visible .cdv-face { box-shadow: 0 0 0 2px var(--peche); }
@keyframes cdv-flotte { 0%, 100% { transform: translate3d(0, 6px, 0) rotateX(3deg) rotateY(-4deg) rotateZ(-.6deg); } 50% { transform: translate3d(0, -14px, 0) rotateX(-2deg) rotateY(4deg) rotateZ(.6deg); } }
@keyframes cdv-ombre { 0%, 100% { transform: scale(1.04); opacity: .9; } 50% { transform: scale(.84); opacity: .55; } }
@keyframes cdv-saut { 0% { translate: 0 0 0; } 38% { translate: 0 -12px 110px; } 100% { translate: 0 0 0; } }
html[data-theme="light"] .cdv::before { background: radial-gradient(closest-side, rgba(214, 160, 110, .28), rgba(78, 60, 144, .10) 55%, transparent 78%); }
html[data-theme="light"] .cdv-ombre { background: radial-gradient(closest-side, rgba(40, 30, 70, .42), transparent 72%); }
@media (prefers-reduced-motion: reduce) {
  .cdv-flotte, .cdv-ombre, .cdv-carte.vire { animation: none; }
  .cdv-tourne { transition-duration: .01s; }
}
