/* Tailles d'écran : les dimensions suivent la hauteur de la fenêtre autant que sa largeur (24 pouces, portables, mise à l'échelle Windows 125-150 %).
   Le 27 pouces (2560×1300) sert de référence et reste identique. Chargé en dernier : ne touche qu'aux tailles et aux espacements. */

/* Premier écran : barre du haut + accueil + bande noire du chapitre suivant (« Un seul geste. Six postes au courant. ») tiennent dans la fenêtre.
   La bande garde au moins 130 px pour que son texte reste au-dessus de la flèche « la suite ». */
@media(min-width:761px){
  :root{--nav-h:clamp(76px,12svh,120px);--band:clamp(130px,14svh,180px)}
  .nav{height:var(--nav-h)}
  .hero{--hero-h:max(360px,calc(100svh - var(--nav-h) - var(--band)));--hz:1;--ring:min(660px,calc(var(--hero-h)*.8));min-height:var(--hero-h)}
  .hero .floating-card{zoom:var(--hz)}
  .orbit-ring{width:var(--ring);left:calc(50% - var(--ring)/2);top:calc(50% - var(--ring)/2)}
}
/* Titre : aussi grand que la largeur le permet, sans descendre sur le texte du bas (≈ 80 px + 12 px d'écart) ni monter sur la légende (≈ 50 px) */
@media(min-width:1101px){
  .hero{--hb:clamp(20px,3.5svh,45px);--hf:min(clamp(80px,8.7vw,195px),calc(var(--hero-h)*.195),calc((var(--hero-h) - var(--hb) - 158px)/2.2))}
  .hero h1{font-size:var(--hf);top:min(36%,calc(var(--hero-h) - var(--hb) - 108px - var(--hf)*2.2))}
  .hero-foot{bottom:var(--hb)}
}
@media(min-width:761px) and (max-width:1100px){.hero{--ring:min(590px,calc(var(--hero-h)*.72))}}
/* Tablette à l'horizontale : les cartes du haut croisent le titre, il passe donc dessous ; le texte et le bouton du bas se mettent côte à côte */
@media(min-width:761px) and (max-width:1100px) and (max-height:899px){
  .hero{--hb:clamp(20px,3.5svh,45px);--hf:min(80px,calc((var(--hero-h) - 235px*var(--hz) - var(--hb) - 110px)/2.2))}
  .hero h1{font-size:var(--hf);top:calc(235px*var(--hz) + 10px)}
  .hero-foot{flex-direction:row;align-items:flex-end;gap:24px;right:calc(5% + 200px);bottom:var(--hb)}
  .hero-foot p{font-size:16px;max-width:300px}
  .stock-card{bottom:var(--hb)}
}
@media(min-width:1800px){.hero{--ring:min(850px,calc(var(--hero-h)*.85))}}
/* Cartes de l'accueil : réduites par paliers selon la hauteur (plus grandes au-delà de 1800 px de large, d'où leurs paliers propres) */
@media(min-width:761px) and (max-height:999px){.hero{--hz:.85}}
@media(min-width:761px) and (max-height:799px){.hero{--hz:.75}}
@media(min-width:761px) and (max-height:699px){.hero{--hz:.7}}
@media(min-width:1800px) and (max-height:1199px){.hero{--hz:.85}}
@media(min-width:1800px) and (max-height:999px){.hero{--hz:.75}}
@media(min-width:1800px) and (max-height:849px){.hero{--hz:.7}}

/* Chapitres à étape fixe : le contenu s'arrête au-dessus du sommaire flottant (≈ 84 px en bas) et rétrécit par paliers sur les écrans bas. « Votre maison » (#site) gère ses propres tailles dans sites.css */
@media(min-width:900px){
  :root{--som:84px;--sz:1}
  .signal-network{bottom:max(13%,calc(var(--som) + 46px))}
  .signal-bottom{bottom:var(--som)}
  .service-inner,.handheld-stage{padding-bottom:var(--som)}
  .operations-grid{top:min(max(20px,calc((100svh - var(--som) + 20px - var(--operations-height,760px))/2)),calc(100svh - var(--operations-height,760px) - var(--som)))}
  .signal-network>*,.service-inner>*,.handheld-copy,.delivery-panel>*,.customer-panel{zoom:var(--sz)}
  /* Le téléphone se règle déjà sur la hauteur : on lui laisse la place au-dessus du sommaire */
  .handheld-stage .iphone{height:min(690px,78svh,calc(100svh - 180px))}
}
@media(min-width:900px) and (max-height:999px){:root{--sz:.92}}
@media(min-width:900px) and (max-height:849px){:root{--sz:.86}}
@media(min-width:900px) and (max-height:749px){:root{--sz:.8}}
@media(min-width:900px) and (max-height:679px){:root{--sz:.74}}
/* Tablette et téléphone : la pastille du sommaire (≈ 78 px en bas) ne recouvre plus la légende du chapitre noir ni la note du service */
@media(max-width:899px){
  .signal-bottom{bottom:78px}
  .service-inner{padding-bottom:78px!important}
}
@media(max-width:760px){
  .signal-detail{bottom:166px;max-height:calc(100% - max(64px,8svh) - 96vw - 176px)}
}
@media(max-width:599px){.service-inner>*{zoom:.9}}

/* La soirée : titre sur deux lignes et maquette dans le même écran */
@media(min-width:900px){
  .soiree-section{--sp:clamp(24px,4svh,90px);--sf:min(126px,7.2vw,10svh);padding-top:var(--sp)}
  .soiree-section .section-heading h2{font-size:var(--sf);max-width:none}
  .soiree-frame{height:max(480px,min(900px,calc(100svh - var(--sp) - var(--sf)*1.92 - 36px)));min-height:0;max-height:none}
}
