/* ESSAI 02/11/2026 — téléphone fidèle à la structure du PC.
   Yoann : « je veux qu'on garde la structure et design de la version pc
   mais qu'on puisse la rendre whoa sur mobile ». Chargée en DERNIER. */
@media (max-width:767px){

  /* 1. TRAVAUX : la photo nette au centre, ses voisines floues de part
     et d'autre, comme au PC (carrousel.js : FRANC retiré). */
  #carrousel .vue{ padding-inline:5% !important; }
  #carrousel .carrousel__scene{ --h:min(70svh, calc(100vw * .9 * .75 + 24px)) !important; }
  #travaux{ padding-block:28px 32px !important; }

  /* 2. POURQUOI / MÉTHODE : la grille de cartes du PC, en deux colonnes. */
  #pourquoi .raisons,
  #methode .parcours{
    display:grid !important; align-items:stretch !important;
    grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
    gap:12px !important;
    overflow:visible !important;
    scroll-snap-type:none !important;
    padding:0 !important;
    margin:22px 0 0 !important;
    width:100% !important; box-sizing:border-box !important;
  }
  #pourquoi .raison,
  #methode .etape{
    width:auto !important; min-width:0 !important; max-width:none !important;
    flex:none !important;
    padding:16px 14px 18px !important;
    gap:8px !important;
    min-height:0 !important; height:auto !important;
  }
  #pourquoi .raison__icone,
  #methode .etape__icone{ width:32px !important; height:32px !important; }
  #pourquoi .raison__icone svg,
  #methode .etape__icone svg{ width:15px !important; height:15px !important; }
  #pourquoi .raison__lab{ font-size:8.5px !important; letter-spacing:.16em !important; }
  #pourquoi .raison__titre,
  #methode .etape__titre{ font-size:16px !important; line-height:1.2 !important; margin:0 !important; text-wrap:balance; }
  #pourquoi .raison__texte,
  #methode .etape__texte{ font-size:13px !important; line-height:1.5 !important; margin:0 !important; color:rgba(224,237,237,.78) !important; }
  #pourquoi .glisser,
  #methode .glisser{ display:none !important; }

  /* 3. MÉTIER : un carrousel comme celui des photos (Yoann, 02/11 :
     « en mode carrousel comme pour les photos »). La carte nette au
     centre, ses voisines plus petites et voilées de part et d'autre,
     flèches en verre sous la carte (metier-car.js). */
  #metier .carrousel__piste{
    display:flex !important; gap:12px !important;
    margin:22px calc(-1 * var(--marge, 24px)) 0 !important;
    padding:6px 13vw !important; scroll-padding-inline:13vw !important;
    overflow-x:auto !important; overflow-y:hidden !important;
    scroll-snap-type:x mandatory !important; overscroll-behavior-x:contain;
    scrollbar-width:none; justify-content:flex-start !important;
    width:auto !important; transform:none !important;
  }
  #metier .carrousel__piste::-webkit-scrollbar{ display:none; }
  #metier .metier-vue{
    flex:0 0 74vw !important; scroll-snap-align:center !important; scroll-snap-stop:always;
    width:auto !important; min-width:0 !important; margin:0 !important;
    padding:20px 18px 22px !important; min-height:0 !important; height:auto !important;
    transform:none !important;
    scale:.92; opacity:.45;
    transition:scale 620ms cubic-bezier(.16,1,.3,1), opacity 620ms cubic-bezier(.16,1,.3,1);
  }
  #metier .metier-vue.est-centre{ scale:1; opacity:1; }
  /* Là où le navigateur sait lier une animation au défilement (Chrome,
     Safari 26) : la carte grandit et s'éclaire EN SUIVANT le doigt, pas
     après coup. Ailleurs, la classe est-centre ci-dessus prend le relais. */
  @supports (animation-timeline: view(inline)){
    #metier .metier-vue{
      transition:none; scale:1; opacity:1;
      animation:metierFoyer linear both;
      animation-timeline:view(inline);
      animation-range:cover 0% cover 100%;
    }
  }
  #metier .metier-nav{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:16px; }
  #metier .metier-nav .glisser{ margin:0 !important; }
  #metier .metier-nav .carrousel__fleche{
    display:grid !important; position:relative !important; inset:auto !important;
    transform:none !important; width:44px !important; height:44px !important; margin:0 !important;
  }
  @media (prefers-reduced-motion:reduce){ #metier .metier-vue{ transition:none !important; animation:none !important; scale:1; opacity:1; } }

  /* 4. COLLECTIONS : le grand titre AU-DESSUS de la photo, comme au PC. */
  #collections .dossier-poster--scene .dossier-heading{
    position:relative !important; bottom:auto !important; top:auto !important;
    padding:0 var(--marge, 24px) 14px !important;
  }
  #collections .dossier-poster--scene .dossier-heading h3{
    font-size:clamp(34px, 10.5vw, 46px) !important; line-height:.95 !important;
    text-shadow:none !important;
  }

  /* 5. STUDIO : le titre se pose sur le logotype en laiton, comme au PC. */
  #studio .fig-marque{ aspect-ratio:4 / 3 !important; }
  #studio .fig-marque .incrust__img{ object-position:62% 50% !important; }
  #studio .company-story__inside > .company-story__text{
    grid-row:1 / span 2 !important; padding-top:52vw !important; position:relative; z-index:1;
  }
  #studio .company-story__inside > .studio-questions{ grid-row:3 !important; }
}

/* 6. MOINS DE NOIR ENTRE LES COLLECTIONS (02/11). */
@media (max-width:767px){
  #collections .cinema-selection .dossier:has(.dossier-poster--scene){ padding:8px 0 52px !important; }
  #collections .cinema-selection .dossier:has(.dossier-poster--scene):last-child{ padding-bottom:72px !important; }
  #collections .dossier-poster--scene .dossier-heading{ padding-bottom:10px !important; }
}

/* 7. MOUVEMENT AU TÉLÉPHONE, DEUXIÈME VERSION (apparition.js, 02/11).
   Yoann : « tu peux faire encore mieux sur les animations, fluidité,
   interaction ». Trois règles pour la fluidité :
   · on n'anime que ce que la carte graphique déplace seule : opacity,
     translate, scale. Plus de clip-path (repeint à chaque image : la
     première version saccadait sur les titres) ;
   · les titres montent mot par mot, le dessin maison `.leve`/`.leve__mot`
     du PC (suite.css), débranché jusqu'ici ;
   · les photos suivent le doigt (animation liée au défilement) au lieu
     de jouer une fois : plus de « saut » si on défile vite.
   Rien n'est caché sans le script : .ap et .leve ne sont posées que par lui. */
@keyframes metierFoyer{
  0%  { scale:.9;  opacity:.38; }
  50% { scale:1;   opacity:1; }
  100%{ scale:.9;  opacity:.38; }
}
@keyframes photoEntre{
  from{ opacity:.15; scale:1.06; translate:0 34px; }
  to  { opacity:1;   scale:1;    translate:0 0; }
}
@media (max-width:767px) and (prefers-reduced-motion:no-preference){
  .ap{ opacity:0; translate:0 18px; }
  .ap.ap--carte{ scale:.965; translate:0 26px; }
  .ap.ap-vu{
    opacity:1; translate:0 0; scale:1;
    transition:opacity 900ms cubic-bezier(.16,1,.3,1),
               translate 1000ms cubic-bezier(.16,1,.3,1),
               scale 1000ms cubic-bezier(.16,1,.3,1);
    transition-delay:var(--ap-d, 0ms);
  }
  /* Titres mot par mot : même courbe que .raisons__titre.levee au PC. */
  .ap-leve .leve__mot{ transition-delay:calc(var(--mot, 0) * 70ms + var(--ap-d, 0ms)); }
  .ap-leve.levee .leve__mot{ transform:translateY(0); opacity:1; }

  /* Photos : liées au défilement quand le navigateur le sait. */
  @supports (animation-timeline: view()){
    .ph-defile{
      animation:photoEntre linear both;
      animation-timeline:view();
      animation-range:entry 0% cover 38%;
    }
  }
  /* Sinon : un fondu à un coup, avec le même filet que le reste. */
  @supports not (animation-timeline: view()){
    .ph-defile.ap{ translate:0 0; scale:1.04; }
    .ph-defile.ap.ap-vu{ scale:1; transition:opacity 1100ms cubic-bezier(.16,1,.3,1), scale 1500ms cubic-bezier(.16,1,.3,1); }
  }
}

/* 8. AU TOUCHER (apparition.js). Au PC, la carte en verre s'éclaire sous
   la souris (raisons.css : lueur à --mx/--my, liseré laiton). Au doigt,
   rien ne répondait : la même lumière naît maintenant sous le doigt, la
   carte s'enfonce à peine, puis tout s'éteint sur la courbe du PC. */
@media (max-width:767px){
  .contour.est-touche::before{ opacity:1 !important; transition-duration:160ms !important; }
  .raison.contour.est-touche,
  .etape.contour.est-touche{ border-color:rgba(194,161,109,.42) !important; background-color:rgba(224,237,237,.05) !important; }
  .contour.est-touche .raison__icone,
  .contour.est-touche .etape__icone{ border-color:rgba(194,161,109,.5) !important; background-color:rgba(194,161,109,.08) !important; }
  .appui{ transition:scale 420ms cubic-bezier(.16,1,.3,1); }
  .appui.est-touche{ scale:.985; transition-duration:140ms; }
  .carrousel__fleche:active, .story-link:active, .contact__actions a:active{ scale:.94; }
  .carrousel__fleche, .story-link, .contact__actions a{ transition:scale 320ms cubic-bezier(.16,1,.3,1); -webkit-tap-highlight-color:transparent; }
}

/* 9. L'OUVERTURE RÉAGIT AU PREMIER GESTE (02/11). Un plan de cinéma :
   au premier glissé, l'emblème avance d'un rien et s'enfonce dans le
   noir, le logotype monte et s'efface, « Défiler » s'éteint d'abord.
   On anime les ENVELOPPES (picture, h1, pied) : l'image et la signature
   portent déjà leurs animations d'entrée (hfxDezoom, hfxLeveLogotype),
   qu'une seconde animation sur le même élément annulerait. */
@keyframes ouvPhoto{ to{ scale:1.1; translate:0 14svh; } }
@keyframes ouvVoile{ from{ opacity:0; } to{ opacity:.74; } }
@keyframes ouvTitre{ to{ opacity:0; translate:0 -52px; } }
@keyframes ouvPied { to{ opacity:0; } }
@media (max-width:767px) and (prefers-reduced-motion:no-preference){
  .accueil-image__fond picture{ position:relative; }
  .accueil-image__fond picture::after{
    content:""; position:absolute; inset:0; pointer-events:none;
    background:#050807; opacity:calc(.74 * var(--sortie, 0));
  }
  @supports (animation-timeline: scroll()){
    .accueil-image__fond picture{ animation:ouvPhoto linear both; animation-timeline:scroll(root); animation-range:0 100svh; }
    .accueil-image__fond picture::after{ animation:ouvVoile linear both; animation-timeline:scroll(root); animation-range:0 90svh; }
    .accueil-image h1{ animation:ouvTitre linear both; animation-timeline:scroll(root); animation-range:0 55svh; }
    .accueil-image__pied{ animation:ouvPied linear both; animation-timeline:scroll(root); animation-range:0 20svh; }
  }
  /* Navigateurs sans animation liée au défilement : apparition.js pose
     --sortie (0 en haut, 1 un écran plus bas) et ces formules suivent. */
  @supports not (animation-timeline: scroll()){
    .accueil-image__fond picture{ scale:calc(1 + .1 * var(--sortie, 0)); translate:0 calc(14svh * var(--sortie, 0)); }
    .accueil-image h1{ opacity:calc(1 - 1.8 * var(--sortie, 0)); translate:0 calc(-95px * var(--sortie, 0)); }
    .accueil-image__pied{ opacity:calc(1 - 5 * var(--sortie, 0)); }
  }
}

/* 10. LES PHOTOS DE COLLECTIONS ET DE STUDIO (02/11). `overflow:hidden`
   (suite.css sur #studio, fondu-cover.css sur .dossier-cover[data-fondu])
   fait du bloc une boîte défilante : view() suit alors ce bloc, qui ne
   défile jamais, et la photo restait figée à son état final. `clip`
   coupe pareil sans créer de boîte défilante. Un navigateur qui ignore
   `clip` garde `hidden` : la photo s'affiche, comme avant. */
@media (max-width:767px){
  #studio.company-story,
  #collections .dossier-cover[data-fondu]{ overflow:clip; }
}

/* 09/11/2026 — TÉLÉPHONE : le bouton Entrer ne lance jamais de défilement ni de zoom
   au doigt ; le toucher arrive entier au bouton (accueil-ouverture.js part au lever du doigt).
   Aucun changement visuel. Rien au-dessus de 767 px. */
@media (max-width:767px){
  .a-ouv .av-ouv__cta{ touch-action:none; }
}
