/*
 * Fondazione / Couture R12 — raccordement au site réel (candidat local, non publié).
 * Chargée APRÈS fc-couture-r12.css. Toutes les règles sont bornées à html[data-fc12="on"] :
 * data-fc12="off" restitue le rendu R10 ; le retrait complet suit DELTA_R12.md.
 * Conteneurs et jetons relevés dans MAPPING_ACTUEL.tsv. Aucune police ni teinte nouvelle :
 * --obsidienne, --carrara, --or-clair (thème R10). L'annonce Népal « Veille » a sa propre feuille (fc-nepal-announcement.css).
 * Aucun effet sur une photographie : le relief vit dans le seuil, hors image.
 */

/* 01 · Jetons de raccord */
html[data-fc12="on"]{
  --fc12-cadre:clamp(.8rem,1.25vw,1.4rem); /* même encart que le héros couture R10 */
  --fc12-socle:calc(clamp(3rem,11.5svh,7.25rem) + env(safe-area-inset-bottom,0px));
}

/* 02 · Passe-partout de la scène d'entrée.
 * La photographie est recadrée par son conteneur : ni filtre, ni masque, ni déplacement de l'image. */
html[data-fc12="on"] .fc-seuil__scene,
html[data-fc12="on"] .fc-seuil__veil,
html[data-fc12="on"] .fc-active-stage__field{inset:var(--fc12-cadre) var(--fc12-cadre) var(--fc12-socle)}
html[data-fc12="on"] .fc-seuil__scene{clip-path:inset(0)}
html[data-fc12="on"] .fc-seuil__veil{outline:1px solid color-mix(in oklab,var(--carrara) 9%,transparent);outline-offset:-1px}
/* Conteneur racine R10 à l'échelle 1,08 : la découpe compense exactement l'échelle. */
html[data-fc12="on"] .fc-seuil--root .fc-seuil__scene{clip-path:inset(3.7037%);transition:filter 1.4s var(--ease-doux),transform 1.8s var(--ease-camera),clip-path 1.8s var(--ease-camera)}
html[data-fc12="on"] .fc-seuil.est-ouverture .fc-seuil__scene{clip-path:inset(1.2671%);transition:transform 1.35s var(--ease-camera),filter 1.25s var(--ease-doux),clip-path 1.35s var(--ease-camera)}
html[data-fc12="on"] .fc-active-stage__dust{clip-path:inset(var(--fc12-cadre) var(--fc12-cadre) var(--fc12-socle))}

/* 03 · Seuil sculpté : modules relief/lumière R12 sur une surface de pierre dédiée, sous le texte.
 * Les masques R12 n'ont pas de proportion intrinsèque (preserveAspectRatio="none") :
 * leur taille est donc explicite, pour ne montrer que la tranche basse, en cannelures calmes
 * placées entre la devise et l'heure. */
html[data-fc12="on"] .fc-seuil>.fc12-socle{
  inset:auto 0 0;block-size:var(--fc12-socle);
  background:var(--obsidienne);
  box-shadow:inset 0 1px 0 color-mix(in oklab,var(--carrara) 14%,transparent);
  --fc12-light:var(--carrara);--fc12-shadow:var(--obsidienne);
  --fc12-relief-strength:.26;--fc12-light-strength:.28;--fc12-shade-strength:.5;
}
html[data-fc12="on"] .fc-seuil>.fc12-socle>span{-webkit-mask-size:125vw 78.125vw;mask-size:125vw 78.125vw;-webkit-mask-position:35% 100%;mask-position:35% 100%}
@media (max-width:760px){
  html[data-fc12="on"] .fc-seuil>.fc12-socle{--fc12-relief-strength:.17;--fc12-light-strength:.24;--fc12-shade-strength:.36} /* valeurs mobiles R12 */
  html[data-fc12="on"] .fc-seuil>.fc12-socle>.fc12-optics__relief{-webkit-mask-size:125vw 214.29vw;mask-size:125vw 214.29vw;-webkit-mask-position:100% 100%;mask-position:100% 100%}
  html[data-fc12="on"] .fc-seuil>.fc12-socle>.fc12-optics__light{-webkit-mask-position:100% 100%;mask-position:100% 100%}
}

/* 04 · Le bandeau bas du seuil remonte au-dessus du bouton de préférences (inchangé). */
html[data-fc12="on"] .fc-seuil{padding-bottom:max(3.4rem,calc(var(--fc12-socle) - 3.1rem))}

/* 05 · Hiérarchie de l'entrée : familles, tailles, graisses et couleurs R10 conservées. */
html[data-fc12="on"] .fc-seuil__hint[data-fc12-lead]{max-inline-size:min(39rem,100%)}
html[data-fc12="on"] .fc-seuil.est-pret .fc-seuil__progress{opacity:.26}
html[data-fc12="on"] .fc-seuil__entrer[data-fc12-action]{padding-inline:0}
html[data-fc12="on"] .fc-seuil__entrer[data-fc12-action]:focus-visible{outline:1px solid var(--or-clair);outline-offset:8px}

/* 06 · Accueil : pied du héros en 60/40 ; l'action rejoint son texte, loin de la conciergerie.
 * Trait R10 conservé : le filet effilé R12 ne se lisait qu'en tiret isolé sur la vidéo (module omis). */
@media (min-width:761px){
  html[data-fc12="on"] .fc-heros__pied[data-fc12-editorial]>.fc-bouton{justify-self:start}
}

/* 07 · Direction : réserve et filet À L'EXTÉRIEUR du portrait ; image, voiles et ombre R10 intacts. */
html[data-fc12="on"] .fc-home-direction__portrait[data-fc12-plate]{
  --fc12-mat:clamp(.65rem,1.5vw,1.4rem);
  padding:0;background:none;outline-color:transparent;outline-offset:var(--fc12-mat);
  box-shadow:0 0 0 var(--fc12-mat) color-mix(in oklab,currentColor 3.5%,transparent),0 42px 120px oklch(.015 0 0 / .32);
}
@supports (color:color-mix(in srgb,currentColor 20%,transparent)){
  html[data-fc12="on"] .fc-home-direction__portrait[data-fc12-plate]{outline-color:color-mix(in oklab,currentColor 18%,transparent)}
}

/* 09 · Paysage court : titre sur deux lignes, commandes d'entrée visibles sans défilement.
 * Le seuil y est trop bas pour porter un relief lisible : il reste une pierre lisse. */
@media (max-height:480px) and (orientation:landscape){
  html[data-fc12="on"] .fc-seuil{padding-top:.7rem;padding-bottom:.85rem}
  html[data-fc12="on"] .fc-seuil>.fc12-socle>:is(.fc12-optics__relief,.fc12-optics__light){display:none}
  html[data-fc12="on"] .fc-seuil__geo{flex-direction:row;align-items:center;gap:.7rem}
  html[data-fc12="on"] .fc-seuil__bottom{justify-content:flex-end;gap:1.25rem}
  /* Les commandes restent au-dessus du bouton de préférences fixé en bas à gauche. */
  html[data-fc12="on"] .fc-seuil__centre{margin-bottom:clamp(1.4rem,7svh,2rem);gap:.45rem}
  html[data-fc12="on"] .fc-seuil__mot[data-fc12-heading]{margin-block:0;line-height:.88}
  html[data-fc12="on"] .fc-seuil__hint[data-fc12-lead]{margin-block:0}
  html[data-fc12="on"] .fc-seuil.est-pret .fc-seuil__progress{display:none}
  html[data-fc12="on"] .fc-seuil__actions{flex-direction:row;flex-wrap:wrap;column-gap:1.6rem}
  /* Racine : langues et entrées sur une ligne ; l'état de phase reste lu (région live), hors de la vue. */
  html[data-fc12="on"] .fc-seuil--root .fc-seuil__actions{display:flex;flex-wrap:wrap;align-items:center;column-gap:1.4rem;row-gap:.2rem}
  html[data-fc12="on"] .fc-seuil--root .fc-active-stage__phase{position:absolute;inline-size:1px;block-size:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
}
