/* Florska V2 — Accueil (maquette Main.dc.html, itération 2 + lot 1). */

.fl-home__h2 { margin-bottom: 48px; }

/* Hero : trois colonnes d'images en parallaxe (principe de grille de colonnes), voile sombre, texte au-dessus. */
.fl-hero { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: flex-end; min-height: min(100svh, 940px); padding-top: 112px; padding-bottom: clamp(40px, 4vw, 64px); }
.fl-hero > .wrap { width: 100%; position: relative; z-index: 2; }
.fl-hero__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(12px, 2vw, 32px); align-items: end; }
.fl-hero__txt { grid-column: 1 / 9; grid-row: 1; position: relative; z-index: 1; }
.fl-hero__kicker { color: var(--fl-text-2); }
.fl-hero__h1 { font-size: clamp(34px, 4.2vw, 64px); }
.fl-hero__loc { font-size: clamp(22px, 2.2vw, 34px); margin-top: 20px; }
.fl-hero__zone { margin: 16px 0 0; font-size: 16px; line-height: 1.5; color: var(--fl-text-2); max-width: 52ch; }
.fl-hero__btns { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 32px; }
.fl-hero__meta { margin: 32px 0 0; color: var(--fl-text-2); line-height: 1.9; }

/* Colonnes d'images du hero : décor derrière le texte. Défilement vertical automatique en boucle (marquee) :
   colonnes 1 et 3 vers le haut, colonne 2 vers le bas, vitesses légèrement différentes. */
.fl-hero__deco { position: absolute; inset: 0; z-index: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--fl-hero-gap); padding-inline: var(--fl-hero-gap); pointer-events: none; overflow: hidden; --fl-hero-gap: clamp(6px, .8vw, 12px); }
.fl-hero__col--1 { --fl-loop: 20s; }
.fl-hero__col--2 { --fl-loop: 25s; translate: 0 -7%; }
.fl-hero__col--3 { --fl-loop: 22s; }
/* flow-root : la marge basse de la dernière image reste dans la piste, donc -50 % = exactement une série (boucle sans saut). */
.fl-hero__track { display: flow-root; }
.fl-hero__tile { position: relative; overflow: hidden; background: var(--fl-surface); margin-bottom: var(--fl-hero-gap); }
.fl-hero__tile > .ph, .fl-hero__tile > img { display: block; width: 100%; }
.fl-hero__tile > img { height: auto; object-fit: cover; }
.fl-hero__overlay { position: absolute; inset: 0; background:
  linear-gradient(to right, color-mix(in srgb, var(--fl-bg) 90%, transparent) 0%, color-mix(in srgb, var(--fl-bg) 66%, transparent) 55%, color-mix(in srgb, var(--fl-bg) 48%, transparent) 100%),
  linear-gradient(to top, var(--fl-bg) 0%, transparent 38%); }

@keyframes fl-unveil { to { transform: scaleY(0); } }
@keyframes fl-marquee-up { to { transform: translate3d(0, -50%, 0); } }
@keyframes fl-marquee-down { from { transform: translate3d(0, -50%, 0); } to { transform: translate3d(0, 0, 0); } }

@media (prefers-reduced-motion: no-preference) {
  /* Révélation au chargement : un voile par image qui se retire, en cascade. */
  .fl-hero__tile::after { content: ""; position: absolute; inset: 0; z-index: 1; background: var(--fl-bg); transform-origin: top; animation: fl-unveil .9s var(--fl-ease-out) both; animation-delay: calc(var(--k, 0) * 90ms); }
  .fl-hero__col--1 .fl-hero__tile:nth-child(1) { --k: 0; } .fl-hero__col--2 .fl-hero__tile:nth-child(1) { --k: 1; } .fl-hero__col--3 .fl-hero__tile:nth-child(1) { --k: 2; }
  .fl-hero__col--1 .fl-hero__tile:nth-child(2) { --k: 3; } .fl-hero__col--2 .fl-hero__tile:nth-child(2) { --k: 4; } .fl-hero__col--3 .fl-hero__tile:nth-child(2) { --k: 5; }
  .fl-hero__tile:nth-child(n+3) { --k: 6; }

  /* html.fl-marquee : posé par florska.js après mélange et duplication des images (la boucle exige deux séries identiques : -50 % = une série). */
  html.fl-marquee .fl-hero__col--2 { translate: none; }
  html.fl-marquee .fl-hero__track { animation: fl-marquee-up var(--fl-loop) linear infinite; will-change: transform; }
  html.fl-marquee .fl-hero__col--2 .fl-hero__track { animation-name: fl-marquee-down; }
  /* Pause : hero hors écran (économie de CPU), ou survol / focus clavier d'un lien ou d'un bouton du hero. */
  html.fl-marquee .fl-hero__deco.is-off .fl-hero__track,
  html.fl-marquee .fl-hero:has(a:hover, a:focus-visible, button:hover, button:focus-visible) .fl-hero__track { animation-play-state: paused; }
}

/* Deux portes */
.fl-doors { align-items: start; }
.door-media > .ph, .door-media > img { aspect-ratio: 3 / 2; height: auto; object-fit: cover; }
.door { display: block; text-decoration: none; color: var(--fl-text); }
.door:hover { color: var(--fl-text); }
.door-media { overflow: clip; background: var(--fl-surface); }
.door-media > .ph, .door-media > img { display: block; width: 100%; transition: scale var(--fl-t-s) var(--fl-ease-out); }
.door:is(:hover, :focus-visible) .door-media > * { scale: 1.03; transition: scale var(--fl-t-l) var(--fl-ease-out); }
.door-title { margin: 16px 0 8px; }
.door-name { display: inline; font-size: clamp(28px, 3.2vw, 48px); }
.door:hover .door-name { box-shadow: inset 0 -2px 0 var(--fl-accent); }

/* Services 01–04 */
.row { display: grid; grid-template-columns: 72px minmax(0, 2fr) minmax(0, 7fr); gap: clamp(20px, 3vw, 48px); align-items: center; padding: 32px 0; border-top: 1px solid var(--fl-line); text-decoration: none; color: var(--fl-text); }
.row:hover { color: var(--fl-text); }
.row-media { overflow: clip; background: var(--fl-surface); }
.row-media > .ph, .row-media > img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.row-title { margin: 0 0 16px; }
.row-name { display: inline; font-size: clamp(28px, 4.4vw, 68px); }
.row:is(:hover, :focus-visible) .row-name { box-shadow: inset 0 -2px 0 var(--fl-accent); }
.row-line { margin: 0 0 12px; }

/* Références (texte seul) */
.fl-refs { list-style: none; margin: 0; padding: 0; }
.ref { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 20px 0; border-top: 1px solid var(--fl-line); }
.ref-name { font-size: clamp(24px, 3vw, 44px); }

/* Instagram : 3 × 2 en 4:5, légende qui glisse au survol */
.fl-insta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(8px, 1.2vw, 16px); list-style: none; margin: 0; padding: 0; }
.fl-insta a { position: relative; display: block; overflow: clip; color: inherit; text-decoration: none; background: var(--fl-surface); }
.fl-insta a > .ph, .fl-insta a > img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: scale var(--fl-t-s) var(--fl-ease-out); }
.fl-insta__cap { position: absolute; inset: auto 0 0 0; padding: 10px 12px; background: var(--fl-scrim); font: 400 12px/1.4 var(--fl-mono); color: var(--fl-text); translate: 0 101%; transition: translate var(--fl-t-s) var(--fl-ease-in); }
@media (hover: hover) and (pointer: fine) {
  .fl-insta a:is(:hover, :focus-visible) > :is(.ph, img) { scale: 1.03; transition: scale var(--fl-t-l) var(--fl-ease-out); }
  .fl-insta a:is(:hover, :focus-visible) .fl-insta__cap { translate: 0 0; transition: translate var(--fl-t-m) var(--fl-ease-out); }
}
@media (hover: none) {
  .fl-insta a { overflow: visible; background: none; }
  .fl-insta__cap { position: static; translate: none; background: none; padding: 8px 0 0; color: var(--fl-muted); }
}

/* Instagram via plugin : cadres réservés (pas de CLS) jusqu'au consentement */
.fl-ig__consent { position: relative; }
.fl-ig__frame { aspect-ratio: 4 / 5; background: var(--fl-surface); }
.fl-ig__ask { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 24px; }
.fl-ig__ask p { margin: 0; color: var(--fl-text-2); }

/* À propos court */
.fl-about { align-items: center; }
.fl-about > .fl-reveal { overflow: clip; background: var(--fl-surface); }
.fl-about > .fl-reveal > :is(.ph, img) { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.fl-about__txt { padding-left: clamp(0px, 4vw, 64px); }
.fl-about__h2 { margin-bottom: 28px; }
.fl-about__txt .lead { margin-bottom: 16px; }
.fl-about__txt .lead + .lead { margin-bottom: 24px; }

/* Mobile */
@media (max-width: 899px) {
  .fl-hero { padding-top: 96px; padding-bottom: 40px; min-height: 100svh; }
  .fl-hero__grid { display: block; }
  .fl-hero__overlay { background: linear-gradient(to top, var(--fl-bg) 0%, color-mix(in srgb, var(--fl-bg) 78%, transparent) 45%, color-mix(in srgb, var(--fl-bg) 70%, transparent) 100%); }
  .fl-hero__h1 { font-size: clamp(22px, 6.2vw, 40px); }
  .row { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 599px) {
  .fl-insta { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 72vw; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; padding-bottom: 8px; }
  .fl-insta > * { scroll-snap-align: start; }
  .ref { flex-direction: column; gap: 4px; }
}

/* 320 px : « Institutionnel » tient dans la colonne */
@media (max-width: 379px) { .row-name { font-size: 24px; } }

/* Avis (messages Instagram) : défilement horizontal continu, boucle sans saut (deux séries identiques, -50 %). */
.fl-avis__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
.fl-avis__toggle { min-height: 44px; padding: 0 20px; background: transparent; color: var(--fl-text-2); border: 1px solid var(--fl-line); cursor: pointer; text-transform: uppercase; letter-spacing: .08em; }
.fl-avis__toggle:is(:hover, :focus-visible) { color: var(--fl-text); border-color: var(--fl-line-strong); }
.fl-avis__marquee { overflow: hidden; -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent); }
.fl-avis__marquee:focus-visible { outline-offset: -2px; }
.fl-avis__track { display: flex; width: max-content; }
.fl-avis__group { display: flex; flex: none; gap: clamp(12px, 1.6vw, 24px); margin: 0; padding: 0 clamp(12px, 1.6vw, 24px) 0 0; list-style: none; }
.fl-avis__card { flex: none; width: clamp(260px, 26vw, 380px); display: flex; padding: clamp(20px, 2vw, 32px); background: var(--fl-surface); border: 1px solid var(--fl-line); }
.fl-avis__card figure { margin: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 20px; width: 100%; }
.fl-avis__card blockquote { margin: 0; font-size: clamp(17px, 1.3vw, 20px); line-height: 1.45; color: var(--fl-text); }
.fl-avis__card blockquote p { margin: 0; }
.fl-avis__card figcaption { color: var(--fl-muted); }
.fl-avis__src { margin: 24px 0 0; }
@keyframes fl-avis-scroll { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }
@media (prefers-reduced-motion: no-preference) {
  .fl-avis__track { animation: fl-avis-scroll 70s linear infinite; will-change: transform; }
  .fl-avis__marquee:is(:hover, :focus-within) .fl-avis__track,
  .fl-avis.is-paused .fl-avis__track { animation-play-state: paused; }
  @media (hover: none) { .fl-avis__marquee:active .fl-avis__track { animation-play-state: paused; } }
}
@media (prefers-reduced-motion: reduce) {
  .fl-avis__marquee { overflow-x: auto; scroll-snap-type: x proximity; -webkit-mask-image: none; mask-image: none; }
  .fl-avis__group[data-fl-avis-clone] { display: none; }
  .fl-avis__card { scroll-snap-align: start; }
  .fl-avis__toggle { display: none; }
}
@media (max-width: 599px) { .fl-avis__track { animation-duration: 55s; } .fl-avis__card { width: min(78vw, 320px); } }

/* Travaux choisis : grille régulière, couvertures 3:4, titres et légendes alignés. */
.fl-works { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(24px, 3vw, 48px) clamp(12px, 2vw, 32px); align-items: start; }
.fl-works .fl-card__media > img, .fl-works .fl-card__media > .ph { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; }
@media (max-width: 899px) { .fl-works { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 12px; } }
