/* =====================================================================
   SECTION #contact (footer plein écran, « hero de fin ») — propriétaire : footer.js
   §15 : cadre en dégradé rose qui se remplit depuis le haut, grande carte noire
   (silhouette d'appareil : bosse de viseur en haut qui accueille la règle de
   focale, « dock » en bas qui accueille la pilule), courbes de niveau qui
   dérivent, titre géant + logo signé rose, Mervan derrière son appareil qui
   monte au défilement et suit la souris, colonnes Pages / Suivez-nous, bandeau
   de logos clients, CTA rose magnétique, mentions dans le cadre.
   La forme de la carte est un clip-path: path() calculé en JS (redimensionnement).
   ===================================================================== */
.footer {
  --fr: 12px;                 /* épaisseur du cadre (côtés) */
  --top: var(--hd-h);         /* haut de la carte (sous l'en-tête) */
  --tab-h: 62px;              /* hauteur de la bosse (viseur) */
  --bot: 48px;                /* bande basse du cadre (mentions) */
  --glow: min(34vh, 300px);   /* lueur rose au-dessus du footer (fondu du cadre) */
  position: relative; z-index: 2;
  height: 100vh; height: 100svh; min-height: 660px;
  padding: calc(var(--top) - var(--tab-h)) var(--fr) var(--fr);
  color: var(--mrv-white);
}

/* ---------------------------------------------------------- cadre : le rose se déverse depuis le haut
   Une seule couche (dégradé #DE3163 -> #FF4D7E -> transparent) qui descend (transform) dans un conteneur
   qui déborde au-dessus du footer (--glow) ; le haut du conteneur est fondu par un masque statique :
   aucune arête, ni pendant l'arrivée, ni à l'arrêt. */
.ft-frame { position: absolute; left: 0; right: 0; bottom: 0; top: calc(-1 * var(--glow)); overflow: hidden; pointer-events: none; -webkit-mask: linear-gradient(180deg, transparent 0, rgba(0, 0, 0, .22) calc(var(--glow) * .45), rgba(0, 0, 0, .78) calc(var(--glow) * .82), #000 var(--glow)); mask: linear-gradient(180deg, transparent 0, rgba(0, 0, 0, .22) calc(var(--glow) * .45), rgba(0, 0, 0, .78) calc(var(--glow) * .82), #000 var(--glow)); }
.ft-frame-in { position: absolute; left: 0; right: 0; top: 0; height: 200%; background: linear-gradient(180deg, var(--mrv-pink-2) 0, var(--mrv-pink-2) calc(var(--glow) + 2%), #EC4274 calc(var(--glow) + 16%), var(--mrv-pink) 49%, rgba(222, 49, 99, .7) 53%, rgba(222, 49, 99, .3) 59%, rgba(222, 49, 99, .08) 64%, rgba(222, 49, 99, 0) 68%); will-change: transform; }
.ft-sheen { position: absolute; top: 0; bottom: 0; left: -50%; width: 200%; background: linear-gradient(100deg, transparent 42%, rgba(255, 255, 255, .2) 50%, transparent 58%); transform: translate3d(-40%, 0, 0); animation: ftSheen 9s var(--ease-io) infinite; will-change: transform; }
@keyframes ftSheen { 0% { transform: translate3d(-40%, 0, 0); } 55%, 100% { transform: translate3d(40%, 0, 0); } }
.footer:not(.is-vis) .ft-sheen, .footer:not(.is-vis) .topo-layer-in { animation-play-state: paused; }

/* ---------------------------------------------------------- la carte */
.ft-card { position: relative; height: 100%; background: var(--mrv-black); border-radius: var(--r-xl); overflow: hidden; isolation: isolate; transform-origin: 50% 40%; }
.ft-card.is-shaped { border-radius: 0; }
.ft-topo { opacity: .95; }
.ft-rim { position: absolute; left: 0; top: 0; z-index: 5; overflow: visible; pointer-events: none; }
.ft-rim path { fill: none; stroke: url(#ftRimGrad); stroke-width: 2.5; }
/* halo rose derrière Mervan */
.ft-halo { position: absolute; z-index: 0; left: 50%; bottom: -34vh; width: 96vh; height: 96vh; margin-left: -48vh; border-radius: 50%; background: radial-gradient(closest-side, rgba(222, 49, 99, .46), rgba(222, 49, 99, .16) 52%, rgba(222, 49, 99, 0)); pointer-events: none; will-change: transform, opacity; }

/* titre géant + logo signé */
.ft-title { position: absolute; z-index: 0; left: 0; right: 0; top: calc(var(--tab-h) + clamp(46px, 8.6vh, 96px)); display: grid; justify-items: center; text-align: center; pointer-events: none; --fs: clamp(3.3rem, min(7.8vw, 13.5vh), 9rem); }
.ft-h { position: relative; display: grid; justify-items: center; font-size: var(--fs); line-height: .86; }
.ft-l { display: block; overflow: hidden; padding: .06em .08em .1em; margin: -.06em -.08em -.1em; }
.ft-l2 { color: var(--mrv-pink); font-size: 1.05em; }
.ft-sign { position: absolute; z-index: 2; left: calc(50% + var(--fs) * 2.42); top: calc(var(--fs) * -.2); width: calc(var(--fs) * 1.62); max-width: 210px; color: var(--mrv-pink); transform: rotate(-12deg); transform-origin: 0 50%; }
.ft-sign .logo { width: 100%; }
.ft-info { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 0; margin-top: clamp(14px, 2.6vh, 28px); font: 750 11.5px/1.3 var(--sans); font-stretch: 100%; letter-spacing: .08em; text-transform: uppercase; color: rgba(243, 240, 234, .7); pointer-events: auto; }
.ft-info li { display: flex; align-items: center; }
.ft-info li + li::before { content: ''; width: 4px; height: 4px; margin: 0 14px; border-radius: 50%; background: var(--mrv-pink); }
.ft-info a { transition: color .3s; }
.ft-info a:hover { color: var(--mrv-pink-2); }

/* Mervan derrière son appareil (monte au défilement, suit la souris) */
.ft-pic { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; height: var(--ft-pic-h, min(77%, 80vw)); display: flex; justify-content: center; margin: 0; pointer-events: none; will-change: transform; }
.ft-pic-in { position: relative; height: 100%; aspect-ratio: 1 / 1; translate: 0 0; pointer-events: auto; will-change: transform; }
.ft-img { width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; -webkit-user-drag: none; user-select: none; }

/* colonnes Pages / Suivez-nous (conservées telles quelles sur ordinateur) */
.ft-cols { position: absolute; z-index: 3; left: 0; right: 0; top: 54%; display: flex; justify-content: space-between; padding: 0 clamp(40px, 13.5vw, 250px); pointer-events: none; }
.ft-col { display: grid; justify-items: center; align-content: start; text-align: center; pointer-events: auto; }
.ft-k { margin-bottom: 12px; font-size: 10px; color: rgba(243, 240, 234, .46); }
/* logos posés au-dessus des deux colonnes : MRVprod au-dessus de « Pages », AIPS au-dessus de « Suivez-nous » */
.ft-brand { display: block; margin-top: calc(-1 * clamp(64px, 12vh, 140px)); margin-bottom: clamp(18px, 3vh, 32px); color: var(--mrv-white); opacity: .95; }
.ft-brand svg { display: block; height: clamp(52px, 5.2vw, 78px); width: auto; }
.ft-aips { display: block; margin-top: calc(-1 * clamp(64px, 12vh, 140px)); margin-bottom: clamp(18px, 3vh, 32px); height: clamp(46px, 4.6vw, 70px); width: auto; opacity: .95; }
.ft-links { display: grid; justify-items: center; }
.ft-a { position: relative; display: inline-block; padding: 1px 6px; font: 900 clamp(1.3rem, 2.05vw, 2.05rem)/1.04 var(--sans); font-stretch: var(--wdth-tight); letter-spacing: -.005em; text-transform: uppercase; color: var(--mrv-white); transition: color .35s; }
.ft-a:hover, .ft-a:focus-visible { color: #fff; }
.ft-strike { position: absolute; left: -6%; top: 50%; width: 112%; height: .5em; margin-top: -.22em; overflow: visible; pointer-events: none; clip-path: inset(-220% 108% -220% -8%); transform: translateZ(0); backface-visibility: hidden; }
.ft-strike path { fill: none; stroke: var(--mrv-pink); stroke-width: 3.5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ft-links:hover .ft-a:not(:hover) { color: rgba(243, 240, 234, .42); }

/* CTA central */
.ft-act { position: absolute; z-index: 4; left: 0; right: 0; bottom: 62px; display: flex; justify-content: center; pointer-events: none; }
.ft-cta { pointer-events: auto; height: 58px; padding: 0 30px; border-radius: 14px; font-size: 14px; letter-spacing: .03em; box-shadow: 0 22px 50px -16px rgba(222, 49, 99, .85); }
.ft-cta .ico-arrow { width: 15px; height: 15px; }

/* bandeau de logos clients (passe derrière Mervan et le CTA) */
.ft-mq { position: absolute; z-index: 0; left: 0; right: 0; bottom: 64px; height: 40px; overflow: hidden; -webkit-mask: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%); mask: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%); }
.ft-track { display: flex; align-items: center; gap: clamp(40px, 4.6vw, 76px); width: max-content; height: 100%; padding-right: clamp(40px, 4.6vw, 76px); will-change: transform; }
.ft-item { flex: none; display: flex; align-items: center; height: 100%; }
.ft-logo { display: flex; align-items: center; height: 100%; }
.ft-logo img { display: block; width: auto; height: var(--lh, 24px); filter: brightness(0) invert(1); opacity: .6; transition: opacity .35s, transform .5s var(--ease); }
a.ft-logo:hover img, .ft-logo:hover img { opacity: 1; transform: scale(1.08); }
.ft-client { font: 900 clamp(15px, 1.35vw, 20px)/1 var(--sans); font-stretch: var(--wdth-tight); text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; color: var(--mrv-white); transition: color .3s; }
.ft-logo:hover .ft-client { color: rgba(243, 240, 234, 1); }
/* petite icône Instagram : affichée quand le client a un site ET un Instagram (le nom mène au site) */
.ft-ig { display: inline-flex; align-items: center; margin-left: .55em; color: var(--mrv-pink); opacity: 1; transition: opacity .3s, transform .45s var(--ease); }
/* viewBox padding de 1.5/24 : le logo garde de l'air autour de lui, son trait du bas n'est plus à ras du cadre */
.ft-ig svg { width: clamp(12.5px, 1.2vw, 17px); height: clamp(12.5px, 1.2vw, 17px); fill: currentColor; overflow: visible; }
.ft-ig:hover { opacity: 1; transform: scale(1.15); }

/* mentions, dans le cadre rose */
.ft-bar { position: absolute; z-index: 2; left: var(--fr); right: var(--fr); bottom: 0; height: var(--bot); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 22px 2px; font: 750 11px/1.2 var(--sans); font-stretch: 100%; letter-spacing: .06em; text-transform: uppercase; color: #fff; }
.ft-legal { display: flex; align-items: center; gap: 10px; }
.ft-legal i { opacity: .7; }
.ft-legal a { position: relative; transition: opacity .3s; }
.ft-legal a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -3px; height: 1.5px; background: currentColor; transform: scaleX(0); transform-origin: 100% 50%; transition: transform .5s var(--ease); }
.ft-legal a:hover::after { transform: scaleX(1); transform-origin: 0 50%; }

/* ---------------------------------------------------------- tablette étroite */
@media (min-width: 861px) and (max-width: 1100px) {
  .ft-cols { padding: 0 6vw; }
  .ft-pic { height: var(--ft-pic-h, min(76%, 80vw)); }
}

/* ---------------------------------------------------------- mobile : flux vertical, cadre plus épais en bas (« menton » rose) */
@media (max-width: 860px) {
  .footer { --fr: 8px; --top: 70px; --tab-h: 52px; --bot: 136px; height: auto; min-height: 100svh; padding-bottom: var(--bot); }
  .ft-card { height: auto; min-height: calc(100svh - var(--top) + var(--tab-h) - var(--bot)); display: flex; flex-direction: column; align-items: center; padding: calc(var(--tab-h) + 26px) 18px 18px; border-radius: 22px; }
  .ft-card { --m-pad: calc(var(--tab-h) + 26px); --m-fs: clamp(2.4rem, 12.6vw, 4.4rem); padding-top: var(--m-pad); }
  .ft-title { order: 1; position: relative; top: auto; z-index: 3; --fs: var(--m-fs); }
  .ft-h { row-gap: .1em; }
  .ft-l2 { font-size: 1em; }
  .ft-sign { left: auto; right: -2px; top: calc(var(--fs) * -.46); width: calc(var(--fs) * 1.3); transform: rotate(-12deg); transform-origin: 100% 50%; }
  .ft-info { max-width: 320px; font-size: 10.5px; gap: 8px 0; }
  .ft-info li + li::before { margin: 0 10px; }
  .ft-info li:nth-child(n+3) { width: 100%; justify-content: center; }
  .ft-info li:nth-child(n+3)::before { display: none; }
  .ft-pic { order: 3; }
  .ft-act { order: 4; }
  .ft-mq { order: 5; }
  /* téléphones : les rubriques « Pages » et « Suivez-nous » disparaissent, les logos restent posés au-dessus du bouton */
  .ft-cols { position: static; }
  .ft-col { display: contents; }
  .ft-k, .ft-links { display: none; }
  .ft-brand, .ft-aips { position: absolute; z-index: 4; bottom: 128px; margin: 0; }
  .ft-brand { right: calc(50% + 14px); }
  .ft-aips { left: calc(50% + 14px); height: 36px; }
  .ft-brand svg { height: 40px; }
  /* photo du slogan jusqu'à la ligne du bas : la tête arrive juste sous « notre mission », le polo touche la ligne à gauche, à droite et en bas */
  .ft-pic { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; top: calc(var(--m-pad) + var(--m-fs) * 1.64 - var(--m-fs) * .12); height: auto; width: auto; margin: 0; }
  .ft-pic-in { height: 100%; width: 100%; margin: 0; translate: 0 0; aspect-ratio: auto; overflow: hidden; border-radius: 0 0 22px 22px; }
  .ft-pic-in .ft-img { object-fit: cover; object-position: 50% 0; -webkit-mask-image: none; mask-image: none; transform: translateX(1.2%); }
  .ft-halo { width: 120vw; height: 120vw; margin-left: -60vw; bottom: 0; }
  .ft-act { position: absolute; z-index: 4; left: 0; right: 0; bottom: 60px; margin: 0; }
  .ft-cta { height: 54px; padding: 0 24px; font-size: 13px; }
  .ft-mq { position: absolute; z-index: 5; left: 0; right: 0; bottom: 10px; width: auto; margin: 0; height: 34px; -webkit-mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
  .ft-bar { height: auto; bottom: 86px; flex-direction: column; justify-content: center; gap: 8px; padding: 0 12px; font-size: 10px; text-align: center; }
}

/* ---------------------------------------------------------- tablette : colonnes « Pages » / « Suivez-nous »
   de chaque côté de la photo, comme sur ordinateur (la photo ne change pas) */
@media (min-width: 600px) and (max-width: 860px) {
  .ft-cols { position: absolute; z-index: 3; left: 0; right: 0; top: 50%; display: flex; justify-content: space-between; padding: 0 62px; pointer-events: none; }
  /* colonnes de largeur identique : même distance à gauche et à droite de la photo */
  .ft-col { display: grid; justify-items: center; align-content: start; text-align: center; pointer-events: auto; width: 150px; }
  .ft-k { display: block; margin-bottom: 10px; font-size: 9.5px; color: rgba(243, 240, 234, .46); }
  .ft-links { display: grid; justify-items: center; }
  .ft-a { font-size: clamp(1.05rem, 3.4vw, 1.45rem); }
  /* logos au-dessus de leur colonne, remontés comme sur ordinateur */
  .ft-brand, .ft-aips { position: static; margin: -104px 0 16px; }
  .ft-brand svg { height: 42px; }
  .ft-aips { height: 38px; }
  /* bandeau des noms d'entreprises masqué sur tablette */
  .ft-mq { display: none; }
}

/* ---------------------------------------------------------- téléphone : bandeau clients retiré,
   logos MRVprod / AIPS en plus petit sous le bouton « Demander un devis » */
@media (max-width: 599px) {
  .ft-mq { display: none; }
  .ft-brand, .ft-aips { bottom: 16px; }
  .ft-brand svg { height: 30px; }
  .ft-aips { height: 27px; }
}

/* écrans bas (barre du navigateur visible) : titre plus compact et marge du haut réduite,
   pour que la photo carrée tienne sous le slogan sans le recouvrir */
@media (max-width: 860px) and (max-height: 720px) {
  .ft-card { --m-pad: calc(var(--tab-h) + 2px); --m-fs: clamp(2.05rem, 10.6vw, 3.05rem); }
}


/* logo signé de fin de page retiré à la demande */
.ft-sign { display: none !important; }

/* photo de pied de page : immobile et fondue dans le décor (aucun contour visible) */
.ft-pic, .ft-pic-in { transform: none !important; will-change: auto; }
.ft-img { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 .5%, #000 99.5%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 .5%, #000 99.5%, transparent 100%); filter: brightness(.94) contrast(1.02); }
