/* Core Group — scène de la fiche d'opération sur écran pliable (2.3.103).
   Tailles de fenêtre données par Safari sur un iPhone Duo (WebKit, Safari 27.1) :
   fermé 382 × 580-618 ; fermé en paysage 594 × 368-406 ; déplié « livre ouvert » 951 × 585-620 ;
   déplié tourné en portrait 669 × 867-902. Aucune détection d'appareil : seules la largeur et la
   hauteur réellement disponibles décident, ce qui sert aussi les autres téléphones et tablettes.
   Cette feuille complète modules/107-ai-seo-operations.css sans la modifier. */

/* Photo de scène : décorative, affichée (donc chargée) dans le seul livre ouvert. */
.op-scene-photo{display:none;margin:0}
.op-dock{display:none}

/* ── 1. Jusqu'à 900 px : le bâtiment d'abord, puis les repères, puis le récit ───────────── */
@media(max-width:900px){
  .op-hero{padding-top:0;gap:20px}
  .op-hero-media{order:-1;width:auto;max-width:none;margin-inline:calc(-1*var(--gutter))}
  .op-hero-media img{max-height:none;aspect-ratio:16/9}
  .op-hero-media>figcaption{padding:10px var(--gutter);font-size:.7rem}
  .op-hero .op-breadcrumb{margin-bottom:6px}
  .op-kicker{margin-bottom:16px}
  .op-hero h1{margin-bottom:16px}
  .op-actions{margin-top:24px;gap:14px}
  .op-content{gap:30px}
  .op-facts-panel{order:-1}
  .op-facts-panel dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:22px}
  .op-fact{display:block;padding:13px 0}
  .op-fact dt{margin-bottom:3px}
}

/* ── 1 bis. Téléphone fermé à l'écran court (382 × 580) ──────────────────────────────────────
   La photo, le titre et la phrase qui dit ce que Core Group a fait tiennent dans le premier
   écran, au-dessus de la barre de contact. La légende reste lue par les lecteurs d'écran ;
   le fil d'Ariane passe après les boutons. */
@media(max-width:599px) and (max-height:700px) and (orientation:portrait){
  .op-hero{gap:10px}
  /* Retouche du 24 novembre : la photo et les marges cèdent quelques pixels pour que la phrase du rôle
     de Core Group tienne au-dessus de la barre de contact, même avec un titre sur deux lignes. */
  .op-hero-media img{aspect-ratio:auto;width:100%;height:min(56.25vw,29svh)}
  .op-hero-media>figcaption{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  .op-hero-copy{display:flex;flex-direction:column}
  .op-hero .op-breadcrumb{order:9;margin:18px 0 0}
  .op-kicker{gap:12px;margin-bottom:8px}
  .op-kicker>span{width:30px;height:30px}
  .op-hero h1{font-size:1.875rem;margin-bottom:8px}
  .op-hero h1 em{margin-top:6px}
  .op-lead{line-height:1.5}
  .op-actions{margin-top:18px}
}

/* ── 2. Écran déplié tourné en portrait (669 × 867) et tablettes en portrait ───────────────
   La photo occupe le volet du haut, jusqu'à la pliure ; le titre et le fait marquant se
   répondent en dessous ; les repères tiennent sur une ligne de trois. */
@media(min-width:600px) and (max-width:900px) and (min-height:700px){
  .op-hero-media img{aspect-ratio:auto;width:100%;height:clamp(300px,calc(50svh - var(--nav-h)),460px)}
  .op-hero-copy{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:clamp(24px,5vw,44px);align-items:start}
  .op-hero-copy>.op-breadcrumb,.op-hero-copy>.op-actions{grid-column:1/-1}
  .op-hero-copy>.op-kicker,.op-hero-copy>h1{grid-column:1}
  .op-hero-copy>.op-lead{grid-column:2;grid-row:2/span 2;align-self:center;max-width:none}
  .op-facts-panel dl{grid-template-columns:repeat(3,minmax(0,1fr))}
  .op-press-card{display:grid}
  .op-press-card>*{margin-bottom:0}
  .op-gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}
  .op-gallery-item:first-child{grid-column:1/-1}
  .op-gallery-item:first-child img{aspect-ratio:16/8}
  .op-related-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:26px}
}

/* ── 3. Téléphone tenu en paysage (594 × 368) : photo et texte côte à côte ──────────────── */
@media(max-width:900px) and (max-height:480px) and (orientation:landscape){
  .op-hero{grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);column-gap:22px;align-items:start}
  .op-hero-media{align-self:start;margin-inline:calc(-1*var(--gutter)) 0}
  .op-hero-media img{aspect-ratio:auto;width:100%;height:calc(100svh - var(--nav-h) - 40px)}
  .op-hero-copy{padding-top:12px}
  .op-facts-panel dl{grid-template-columns:repeat(3,minmax(0,1fr))}
}

/* ── 3 bis. Paysage, premier écran : très peu de hauteur. Le titre et la phrase du rôle passent
   avant le fil d'Ariane (qui suit les boutons, comme sur l'écran court) et se resserrent, pour
   que l'on comprenne l'opération sans faire défiler. */
@media(max-width:900px) and (max-height:480px) and (orientation:landscape){
  .op-hero-copy{display:flex;flex-direction:column}
  .op-hero .op-breadcrumb{order:9;margin:14px 0 0}
  .op-kicker{gap:12px;margin-bottom:10px}
  .op-kicker>span{width:34px;height:34px}
  .op-hero h1{font-size:1.7rem;margin-bottom:10px}
  .op-hero h1 em{margin-top:6px}
  .op-lead{font-size:.9rem;line-height:1.6}
  .op-actions{margin-top:14px;gap:10px}
}

/* ── 3 ter. Garde-fou des poses du téléphone pliable (fermé, paysage, déplié en portrait) : le
   film de la photo de couverture, posé par son script, ne doit jamais élargir la page. */
@media(max-width:599px) and (max-height:700px) and (orientation:portrait),(min-width:600px) and (max-width:900px) and (min-height:700px),(max-width:900px) and (max-height:480px) and (orientation:landscape){
  .op-hero-media{overflow:hidden}
}

/* ── 4. Écran déplié, livre ouvert (951 × 585) ──────────────────────────────────────────────
   Deux volets égaux : la gouttière tombe sur la pliure, au centre. À gauche le titre puis le
   récit ; à droite la grande photo, puis une seconde vue du site et les repères, qui restent
   en place pendant la lecture. */
@media(min-width:901px) and (max-width:1100px) and (max-height:700px){
  .op-hero{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:clamp(28px,5vw,56px);align-items:stretch;padding-block:0;min-height:calc(100svh - var(--nav-h))}
  .op-hero-copy{align-self:center;padding-block:18px}
  .op-hero .op-breadcrumb{margin-bottom:8px}
  .op-kicker{margin-bottom:14px}
  .op-kicker>span{width:36px;height:36px}
  .op-hero h1{font-size:clamp(1.9rem,3.5vw,2.35rem);margin-bottom:14px}
  .op-hero h1 em{margin-top:10px}
  .op-lead{font-size:.94rem;line-height:1.65}
  .op-actions{margin-top:20px;gap:12px}
  .op-actions>a{min-height:48px;padding-block:11px}
  .op-hero-media{position:relative;display:grid;grid-template-rows:minmax(0,1fr);align-self:stretch;height:calc(100svh - var(--nav-h));margin-right:calc(-1*var(--gutter))}
  .op-hero-media>.photo-depth-wrap{height:100%}
  .op-hero-media img{width:100%;height:100%;max-height:none;aspect-ratio:auto}
  .op-hero-media>figcaption{position:absolute;z-index:2;inset:auto 0 0;padding:34px 20px 14px;background:linear-gradient(180deg,transparent,rgba(13,15,13,.78));color:#f1eee6;pointer-events:none}
  .op-content{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:clamp(28px,5vw,56px);align-items:start}
  .op-facts-panel{position:sticky;top:calc(var(--nav-h) + 14px);border-top:0}
  .op-scene-photo{display:block}
  .op-scene-photo img{width:100%;height:clamp(140px,27svh,190px);object-fit:cover}
  .op-facts-title{padding:14px 0 6px}
  .op-facts-panel dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:22px}
  .op-fact{display:block;padding:9px 0}
  .op-fact dt{margin-bottom:2px}
}

/* ── 4 bis. Livre ouvert, de haut en bas : deux écrans, deux rôles ──────────────────────────
   Le volet gauche se lit et se touche, le volet droit se regarde. Chaque bloc de la fiche est
   une composition en deux volets égaux ; la gouttière (--pli) est centrée sur la pliure, si bien
   qu'aucun texte ni bouton ne s'en approche à moins d'une demi-gouttière. Un visuel seul dans
   son volet (photo de couverture, panneau des repères, film) va de la pliure au bord de l'écran ;
   une grande photo peut s'étendre en double page.
   Hauteur minimale exigée : en dessous, un volet ne contient plus le panneau des repères. */
@media(min-width:901px) and (max-width:1100px) and (min-height:521px) and (max-height:700px){
  .op-page{--pli:clamp(28px,5vw,56px)}

  /* Premier écran : la photo de couverture occupe tout le volet droit, de la pliure au bord.
     Le volet rogne ce qui en dépasse : le film de la photo est posé au pixel entier par son script,
     et parfois mesuré pendant l'effet de relief ; il ne doit ni élargir la page ni toucher le texte. */
  .op-hero-media{margin-left:calc(-.5*var(--pli));overflow:hidden}
  .op-hero-media>figcaption{padding-left:calc(.5*var(--pli))}
  /* Cadrage : le volet est presque carré, la photo est large. Par défaut le centre ; là où le
     bâtiment n'est pas au centre de la prise de vue, le cadre le suit (repère : nom du fichier) ; le film de la photo reprend ce cadre. */
  .op-hero-media img[src*="/operation-10-"]{object-position:62% 50%}
  .op-hero-media img[src*="/operation-13-"]{object-position:40% 50%}
  .op-hero-media img[src*="/operation-14-"]{object-position:42% 50%}
  .op-hero-media img[src*="/operation-15-"]{object-position:58% 50%}
  .op-hero-media img[src*="/operation-18-"]{object-position:40% 50%}
  .op-hero-media img[src*="/operation-02-"]{object-position:100% 50%}
  .op-hero-media img[src*="/operation-03-"]{object-position:70% 50%}
  .op-hero-media img[src*="/operation-04-"]{object-position:30% 50%}

  /* Récit à gauche ; à droite, le panneau (seconde vue, puis repères) tient exactement dans un
     volet et reste en place : la photo prend la hauteur que les repères lui laissent. */
  .op-content{padding-block:0}
  .op-story{padding-block:clamp(32px,4vw,56px)}
  .op-story .op-all-link+.op-all-link{margin-top:12px}
  .op-facts-panel{top:var(--nav-h);display:flex;flex-direction:column;min-height:calc(100svh - var(--nav-h));margin:0 calc(-1*var(--gutter)) 0 calc(-.5*var(--pli));padding-bottom:16px}
  .op-scene-photo{position:relative;flex:1 1 0;min-height:76px;overflow:hidden}
  .op-scene-photo img{position:absolute;inset:0;height:100%}
  .op-facts-title,.op-facts-panel dl{margin-inline:calc(.5*var(--pli)) var(--gutter)}
  .op-facts-title{padding:12px 0 4px}
  .op-facts-panel .op-fact{padding:7px 0}
  .op-facts-panel .op-fact dt{font-size:.74rem;line-height:1.4}
  .op-facts-panel .op-fact dd{font-size:.86rem;line-height:1.4}
  .op-facts-panel .op-fact:last-child:nth-child(odd){grid-column:1/-1}
  .op-facts-panel dl:has(>.op-fact:nth-child(10)) .op-fact{padding:5px 0}

  /* Presse : à gauche la source et le titre de l'article, à droite ce qu'il établit et le lien. */
  .op-press>h2{max-width:calc(50% - .5*var(--pli));margin-inline:0}
  .op-press-card{column-gap:var(--pli);row-gap:0;padding-top:24px}
  .op-press-card+.op-press-card{margin-top:14px}
  .op-press-card>*{grid-column:2;margin-bottom:12px}
  .op-press-card>.press-head{grid-column:1}
  .op-press-card>.op-press-title{position:sticky;top:calc(var(--nav-h) + 24px);grid-column:1;grid-row:span 6;align-self:start;margin-bottom:0}
  .op-press-card>.op-press-link{display:flex;flex-wrap:wrap;align-items:center;column-gap:16px;margin-bottom:4px;text-decoration:none}

  /* Film : titre à gauche, lecteur dans le volet droit, de la pliure au bord. */
  .op-video-section{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:1fr auto auto 1fr;column-gap:var(--pli)}
  .op-video-section>*{grid-column:1;margin-inline:0}
  .op-video-section>.sec-eyebrow{grid-row:2;margin-bottom:14px}
  .op-video-section>h2{grid-row:3;margin-bottom:0}
  .op-video-section>.op-source-note{grid-row:4;align-self:end;margin-top:18px}
  .op-video-section>.video-embed{grid-column:2;grid-row:1/-1;align-self:center;width:auto;margin:0 calc(-1*var(--gutter)) 0 calc(-.5*var(--pli))}
  .op-video-section .video-fallback{padding-left:calc(.5*var(--pli))}

  /* Galerie : le titre à gauche, sa note à droite, puis les photos par paires, une par volet.
     Nombre impair : la première vue s'étend en double page, comme dans un magazine — une grande
     photo peut traverser la pliure, pas une ligne de texte. */
  .op-gallery-section:not(.op-video-section){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:var(--pli);align-items:start}
  .op-gallery-section:not(.op-video-section)>*{grid-column:1;margin-inline:0}
  .op-gallery-section:not(.op-video-section)>.sec-eyebrow{margin-bottom:14px}
  .op-gallery-section:not(.op-video-section)>h2{margin-bottom:24px}
  .op-gallery-section:not(.op-video-section)>.op-source-note{grid-column:2;grid-row:2;align-self:end;margin:0 0 24px}
  .op-gallery-section>.op-gallery{grid-column:1/-1;gap:calc(.5*var(--pli)) var(--pli)}
  .op-gallery-item:first-child:nth-last-child(even){grid-column:auto}
  .op-gallery-item:first-child:nth-last-child(even) img{aspect-ratio:4/3;max-height:none}

  /* À poursuivre : l'opération précédente sur le volet gauche, la suivante sur le volet droit,
     comme on tourne les pages ; les liens se rangent en dessous, un par volet. */
  .op-related{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:var(--pli)}
  .op-related>*{grid-column:1;margin-inline:0}
  .op-page>.op-related>h2{max-width:none;margin-bottom:26px}
  .op-related>.op-related-grid{grid-column:1/-1;column-gap:var(--pli)}
  .op-related>.op-all-link{grid-column:auto;margin-top:18px}

  /* Approfondir : la question à gauche, la réponse et son lien à droite. */
  .op-deepen-inner{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:var(--pli);max-width:none}
  .op-deepen-inner>*{grid-column:1}
  .op-deepen-inner>h2{margin:0 0 12px}
  .op-deepen-inner>p:not(.sec-eyebrow){grid-column:2;max-width:none;margin:0 0 12px}

  /* Appel final : le propos à gauche, le bouton seul sur le volet droit. */
  .op-cta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:var(--pli);align-items:center}
  .op-cta>*{margin-inline:0}
  .op-cta p{max-width:none}
  .op-cta>.btn{justify-self:start;margin-top:0}

  /* Gabarit éditorial : premier écran en deux volets — titre et propos à gauche ; à droite le
     film, sa légende et les trois chiffres de l'opération. */
  .op-editorial-hero{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:auto 1fr auto;column-gap:var(--pli);min-height:calc(100svh - var(--nav-h));padding-top:0}
  .op-editorial-hero>.op-breadcrumb{grid-column:1;grid-row:1;margin:8px 0 0}
  .op-editorial-heading{grid-column:1;grid-row:2/4;display:block;align-self:center;margin:0;padding-block:10px 22px}
  .op-editorial-heading h1{font-size:clamp(2.1rem,4vw,2.6rem);max-width:none}
  .op-editorial-subtitle{margin-top:10px}
  .op-editorial-intro{max-width:none;margin-top:18px;padding:0}
  .op-editorial-intro>p{font-size:.94rem;line-height:1.7}
  .op-editorial-jump{margin-top:12px}
  .op-editorial-media{grid-column:2;grid-row:1/3;margin:0 calc(-1*var(--gutter)) 0 calc(-.5*var(--pli))}
  .op-editorial-media>figcaption{display:block;padding:10px var(--gutter) 0 calc(.5*var(--pli))}
  .op-editorial-media>figcaption>span:last-child{display:block;margin-top:3px}
  .op-editorial-metrics{grid-column:2;grid-row:3;margin:0;padding:14px 0 18px;border-bottom:0}
  .op-editorial-metrics>div{justify-content:flex-end;gap:6px;padding:0 0 0 14px}
  .op-editorial-metrics dd{font-size:clamp(1.45rem,2.7vw,1.75rem)}
  .op-editorial-metrics dt{font-size:.66rem;line-height:1.45}
  /* Gabarit éditorial, suite : toutes les grilles en deux volets égaux, gouttière sur la pliure. */
  .op-editorial-opening-grid,.op-editorial-voices-head,.op-editorial-quote-grid,.op-editorial-gallery-grid,.op-editorial-facts,.op-editorial-social-grid{column-gap:var(--pli)}
  .op-editorial-chapter{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:auto 1fr;gap:10px var(--pli)}
  .op-editorial-chapter-number{grid-column:1;grid-row:1;margin-bottom:0}
  .op-editorial-chapter h2{grid-column:1;grid-row:2;max-width:none}
  .op-editorial-chapter>p:last-child{grid-column:2;grid-row:1/-1}
  .op-editorial-details-heading{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:var(--pli)}
  .op-editorial-details-heading h2{max-width:none}
  .op-editorial-details .op-source-note{columns:2;column-gap:var(--pli)}
}

/* ── 5. Contact d'une main : barre basse sur un téléphone tenu en portrait ─────────────────
   Hauteur minimale exigée : en paysage, l'écran est trop court pour lui céder une bande. */
@media(max-width:700px) and (min-height:481px){
  .op-dock{position:fixed;z-index:120;inset:auto 0 0;display:grid;grid-template-columns:auto minmax(0,1fr);gap:10px;padding:10px max(14px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left));background:var(--bg);background:color-mix(in srgb,var(--bg) 93%,transparent);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-top:1px solid var(--line);transition:transform .26s var(--ease),opacity .2s linear,visibility 0s}
  .op-dock>a{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:48px;padding:0 16px;border-radius:var(--glass-radius);font-size:13px;font-weight:600;line-height:1.3;text-align:center}
  .op-dock-call{border:1px solid var(--gold);color:var(--ink)}
  .op-dock-call svg{flex:0 0 18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linejoin:round}
  .op-dock-talk{background:var(--action);background-image:linear-gradient(125deg,rgba(255,255,255,.5),transparent 38%,rgba(114,80,31,.09) 72%,rgba(255,255,255,.22));border:1px solid rgba(255,235,192,.5);color:#17231e;--focus-ring:var(--ink)}
  .op-dock>a:focus-visible{outline-offset:2px}
  .op-dock[data-state="retiree"]{transform:translateY(110%);opacity:0;visibility:hidden;pointer-events:none;transition:transform .26s var(--ease),opacity .2s linear,visibility 0s .26s}
  .menu-open .op-dock{display:none}
  html:has(.op-dock:not([data-state="retiree"])){scroll-padding-bottom:calc(78px + env(safe-area-inset-bottom,0px))}   /* le focus clavier ne s'arrête pas sous la barre */
  /* Le bouton de relief des photos, flottant en bas à droite, prend place dans la barre au lieu de
     recouvrir le texte : la barre lui réserve une case tant qu'il est affiché. */
  body:has(.photo-depth-controls:not([hidden]):not(.is-idle)) .op-dock:not([data-state="retiree"]){padding-right:calc(max(14px,env(safe-area-inset-right)) + 54px)}
  body:has(.op-dock:not([data-state="retiree"])) .photo-depth-controls{z-index:121;right:max(14px,env(safe-area-inset-right));bottom:calc(max(10px,env(safe-area-inset-bottom)) + 2px)}
  /* La barre ne recouvre jamais la fin de la page, même sans JavaScript. */
  main:has(>.op-dock)~footer{padding-bottom:calc(32px + 78px + env(safe-area-inset-bottom,0px))}
}
@media(prefers-reduced-motion:reduce){.op-dock,.op-dock[data-state="retiree"]{transition:none}}
@media(prefers-reduced-transparency:reduce){.op-dock{background:var(--bg);-webkit-backdrop-filter:none;backdrop-filter:none}}
@media print{.op-dock{display:none!important}}
