/* =========================================================
   GY CODING — accueil avec film motion design + index des services
   Reste dans le thème d'origine (variables de style.css, clair / sombre)
   ========================================================= */

/* ---- Héros plein écran avec vidéo (toujours sombre, quel que soit le thème) ---- */
.hero.hero-film {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(86vh, 820px); display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0; background: #07080a; color: #f4f5f7;
}
/* thème sombre : texte clair par-dessus la vidéo sombre */
:root:not([data-theme="light"]) .hero.hero-film {
  --text: #f4f5f7; --text-muted: #c9cdd5; --text-dim: #9aa0ac;
  --border: rgba(255,255,255,.18); --border-light: rgba(255,255,255,.28); --bg-alt-2: rgba(255,255,255,.08);
}
/* thème clair : vidéo claire, texte du thème */
:root[data-theme="light"] .hero.hero-film { background: #f6f7f9; color: var(--text); }
.hero-film .hf-vid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 82% 50%; z-index: -3; }
.hero-film .hf-shade { position: absolute; inset: 0; z-index: -2; }
:root[data-theme="light"] .hero-film .hf-shade {
  background:
    linear-gradient(90deg, rgba(246,247,249,.95) 0%, rgba(246,247,249,.8) 38%, rgba(246,247,249,.08) 76%),
    linear-gradient(0deg, rgba(246,247,249,.96) 0%, rgba(246,247,249,0) 40%);
}
:root:not([data-theme="light"]) .hero-film .hf-shade {
  position: absolute; inset: 0; z-index: -2;
  background:
    linear-gradient(90deg, rgba(7,8,10,.93) 0%, rgba(7,8,10,.74) 38%, rgba(7,8,10,.1) 76%),
    linear-gradient(0deg, rgba(7,8,10,.95) 0%, rgba(7,8,10,0) 40%);
}
.hero-film .hf-in { padding-top: clamp(3.5rem, 8vw, 6.5rem); padding-bottom: 3.5rem; }
.hero-film h1 { color: var(--text); }
:root:not([data-theme="light"]) .hero-film h1 { color: #fff; }
.hero-film .btn-outline { color: var(--text); }
:root:not([data-theme="light"]) .hero-film .btn-outline { color: #fff; border-color: rgba(255,255,255,.4); }
:root:not([data-theme="light"]) .hero-film .btn-outline:hover { background: rgba(255,255,255,.12); border-color: #fff; }

.hf-play { display: inline-flex; align-items: center; gap: .9rem; font-family: var(--font-head); font-weight: 600; font-size: .92rem; color: var(--text); cursor: pointer; background: none; border: 0; padding: 0; }
.hf-play small { display: block; font-weight: 400; font-size: .72rem; opacity: .65; margin-top: .1rem; }
.hf-play-ic { width: 3.1rem; height: 3.1rem; border-radius: 50%; border: 1.5px solid var(--text); display: grid; place-items: center; transition: all .25s ease; }
.hf-play-ic svg { margin-left: 2px; }
.hf-play:hover .hf-play-ic { background: var(--accent); border-color: var(--accent); color: #fff; transform: scale(1.08); box-shadow: 0 10px 28px -8px var(--accent-glow); }

.hf-rail { border-top: 1px solid var(--border); background: rgba(7,8,10,.55); backdrop-filter: blur(6px); }
:root[data-theme="light"] .hf-rail { background: rgba(255,255,255,.72); }
.hf-rail-g { display: grid; grid-template-columns: repeat(5, 1fr); }
.hf-rail-i { display: grid; gap: .3rem; padding: 1.1rem 1rem 1.2rem; border-left: 1px solid var(--border); transition: background .25s ease; color: var(--text); }
.hf-rail-i:first-child { border-left: 0; padding-left: 0; }
.hf-rail-i:hover { background: rgba(226,16,42,.14); }
.hf-rail-i i { font-style: normal; font-size: .7rem; letter-spacing: .08em; color: var(--text-dim); font-family: ui-monospace, Consolas, monospace; }
.hf-rail-i b { display: flex; justify-content: space-between; align-items: center; gap: .6rem; font-family: var(--font-head); font-weight: 700; font-size: 1.02rem; }
.hf-rail-i b svg { color: var(--accent); flex: none; transition: transform .25s ease; }
.hf-rail-i:hover b svg { transform: translateX(5px); }
.hf-rail-i > span { font-size: .76rem; color: var(--text-dim); }
@media (max-width: 900px) {
  .hf-rail-g { grid-template-columns: 1fr 1fr; }
  .hf-rail-i { border-bottom: 1px solid var(--border); padding-left: 1rem; }
  .hf-rail-i:nth-child(odd) { border-left: 0; padding-left: 0; }
  .hf-rail-i:last-child { grid-column: 1 / -1; border-bottom: 0; padding-left: 0; }
}
@media (max-width: 767px) {
  :root:not([data-theme="light"]) .hero-film .hf-shade { background: linear-gradient(0deg, rgba(7,8,10,.96) 0%, rgba(7,8,10,.58) 55%, rgba(7,8,10,.4) 100%); }
  :root[data-theme="light"] .hero-film .hf-shade { background: linear-gradient(0deg, rgba(246,247,249,.97) 0%, rgba(246,247,249,.6) 55%, rgba(246,247,249,.4) 100%); }
  .hero-film .hf-vid { object-position: 50% 50%; }
}

/* ---- Section film ---- */
.film-chap { margin-top: 1.6rem; border-top: 1px solid var(--border); list-style: none; padding: 0; }
.film-chap li { display: grid; grid-template-columns: 4.2rem 1fr auto; padding: .7rem 0; border-bottom: 1px solid var(--border); font-size: .92rem; color: var(--text-muted); }
.film-chap li i { font-style: normal; font-size: .75rem; color: var(--text-dim); font-family: ui-monospace, Consolas, monospace; padding-top: .15rem; }
.film-chap li span:last-child { font-size: .72rem; color: var(--text-dim); font-family: ui-monospace, Consolas, monospace; }
.film-poster { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); cursor: pointer; background: #000; box-shadow: 0 30px 60px -30px var(--shadow-soft); }
.film-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.film-poster:hover img { transform: scale(1.03); }
.film-poster-play { position: absolute; left: 50%; top: 50%; width: 5rem; height: 5rem; margin: -2.5rem 0 0 -2.5rem; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; box-shadow: 0 14px 40px -8px var(--accent-glow); transition: transform .25s ease; }
.film-poster-play svg { margin-left: 4px; width: 20px; height: 22px; }
.film-poster:hover .film-poster-play { transform: scale(1.1); }
.film-poster-tag { position: absolute; left: 1rem; bottom: .8rem; color: #fff; font-size: .72rem; letter-spacing: .06em; font-family: ui-monospace, Consolas, monospace; text-transform: uppercase; text-shadow: 0 1px 6px rgba(0,0,0,.6); }

/* ---- Modale film ---- */
.film-modal { position: fixed; inset: 0; z-index: 200; background: rgba(5,6,8,.96); display: grid; place-items: center; padding: clamp(.8rem, 3vw, 2.5rem); opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s ease; }
.film-modal.open { opacity: 1; visibility: visible; }
.film-box { width: min(1400px, 100%); }
.film-bar { display: flex; justify-content: space-between; align-items: center; color: #9aa0ac; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .8rem; font-family: ui-monospace, Consolas, monospace; }
.film-bar button { color: #fff; cursor: pointer; background: none; border: 0; font: inherit; }
.film-modal video { width: 100%; max-height: 80vh; background: #000; display: block; margin-inline: auto; aspect-ratio: 16 / 9; border-radius: var(--radius-sm); }
.film-modal.is-v video { aspect-ratio: 9 / 16; max-height: 82vh; width: auto; }

/* ---- Index des services (liste numérotée + aperçu photo) ---- */
.svc-idx { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.svc-idx-list { border-top: 1px solid var(--border); }
.svc-idx-r { display: grid; grid-template-columns: 3.2rem 1fr 2rem; gap: .2rem .4rem; align-items: center; padding: 1.15rem 0; border-bottom: 1px solid var(--border); transition: padding .35s ease; cursor: pointer; }
.svc-idx-r i { font-style: normal; font-size: .78rem; color: var(--text-dim); font-family: ui-monospace, Consolas, monospace; }
.svc-idx-r h3 { font-family: var(--font-head); font-weight: 700; font-size: clamp(1.35rem, 2.5vw, 2.15rem); line-height: 1.12; letter-spacing: -.01em; transition: color .2s ease, transform .35s ease; }
.svc-idx-r svg { justify-self: end; color: var(--text-dim); transition: all .3s ease; grid-column: 3; grid-row: 1; }
.svc-idx-r p { grid-column: 2; font-size: .9rem; color: var(--text-muted); max-height: 0; overflow: hidden; opacity: 0; transition: max-height .4s ease, opacity .3s ease; max-width: 52ch; }
.svc-idx-r:hover, .svc-idx-r.on { padding-left: .8rem; }
.svc-idx-r:hover h3, .svc-idx-r.on h3 { color: var(--accent); }
.svc-idx-r:hover svg, .svc-idx-r.on svg { color: var(--accent); transform: translateX(6px); }
.svc-idx-r:hover p, .svc-idx-r.on p { max-height: 5rem; opacity: 1; margin-top: .35rem; }
.svc-idx-pv { position: sticky; top: 7rem; margin: 0; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--bg-alt-2); box-shadow: 0 30px 60px -34px var(--shadow-soft); }
.svc-idx-pv img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.05); transition: opacity .5s ease, transform 1.1s ease; }
.svc-idx-pv img.on { opacity: 1; transform: none; }
.svc-idx-pv::after { content: ""; position: absolute; left: 14px; top: 14px; width: 28px; height: 28px; border-left: 2px solid var(--accent); border-top: 2px solid var(--accent); border-radius: 3px 0 0 0; }
.svc-idx-pv figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 3rem 1.1rem .9rem; background: linear-gradient(0deg, rgba(8,9,12,.85), transparent); color: #d7dbe2; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; display: flex; justify-content: space-between; font-family: ui-monospace, Consolas, monospace; }
@media (max-width: 1020px) {
  .svc-idx { grid-template-columns: 1fr; }
  .svc-idx-pv { display: none; }
  .svc-idx-r p { max-height: none; opacity: 1; margin-top: .2rem; }
}
@media (max-width: 767px) { .svc-idx-r { grid-template-columns: 2.4rem 1fr 1.6rem; } }
.hero-film .text-gradient { background: linear-gradient(90deg, #ff3a47, #ff7a59); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }

/* tablette en portrait : même traitement que le téléphone (vidéo verticale, texte en bas) */
@media (orientation: portrait) and (max-width: 1100px) {
  :root:not([data-theme="light"]) .hero-film .hf-shade { background: linear-gradient(0deg, rgba(7,8,10,.96) 0%, rgba(7,8,10,.6) 55%, rgba(7,8,10,.35) 100%); }
  :root[data-theme="light"] .hero-film .hf-shade { background: linear-gradient(0deg, rgba(246,247,249,.97) 0%, rgba(246,247,249,.62) 55%, rgba(246,247,249,.4) 100%); }
  .hero-film .hf-vid { object-position: 50% 50%; }
  .hero.hero-film { min-height: min(80vh, 900px); }
}
@media (max-width: 767px) { .hero.hero-film { min-height: 92svh; } }
/* grand écran : le texte ne s'étire pas trop */
@media (min-width: 1700px) { .hero-film .max-w-2xl { max-width: 44rem; } }

/* tablette en portrait : on réserve la place de l'interface animée au-dessus du texte */
@media (orientation: portrait) and (min-width: 600px) and (max-width: 1100px) {
  .hero.hero-film { min-height: min(140vw, 1500px); }
  .hero-film .hf-vid { object-position: 50% 0%; }
}

/* ===== Téléphone et tablette en portrait : la vidéo devient un bandeau au-dessus du texte (rien ne se chevauche) ===== */
@media (max-width: 767px), (orientation: portrait) and (max-width: 1100px) {
  .hero.hero-film { display: block; min-height: 0; }
  .hero-film .hf-vid {
    position: relative; inset: auto; display: block; width: 100%; height: auto; z-index: auto;
    aspect-ratio: 4 / 5; max-height: 64svh; object-fit: cover; object-position: 50% 22%;
    -webkit-mask-image: linear-gradient(#000 78%, transparent); mask-image: linear-gradient(#000 78%, transparent);
  }
  .hero-film .hf-shade { display: none; }
  .hero-film .hf-in { padding-top: 0; padding-bottom: 2.75rem; margin-top: -1.5rem; position: relative; z-index: 2; }
}
@media (min-width: 600px) and (max-width: 1100px) and (orientation: portrait) { .hero-film .hf-vid { aspect-ratio: 1 / 1; max-height: 56svh; } }
@media (max-width: 767px) { .hero.hero-film h1 { font-size: clamp(1.7rem, 8.2vw, 2.35rem); line-height: 1.1; } }
@media (min-width: 1024px) and (max-width: 1279px) and (orientation: landscape) { .hero-film .max-w-2xl { max-width: min(34rem, 50vw); } }

/* ===== Téléphone / tablette en portrait : ordre = badges, TITRE, puis le motion design, puis le reste ===== */
@media (max-width: 767px), (orientation: portrait) and (max-width: 1100px) {
  .hero.hero-film { display: flex; flex-direction: column; padding: clamp(1.5rem, 5vw, 2.75rem) 0 2.75rem; }
  .hero-film .hf-in, .hero-film .hf-in > div, .hero-film .hf-in .reveal { display: contents; }
  .hero-film .reveal > * { order: 1; margin-left: 1.25rem; margin-right: 1.25rem; align-self: flex-start; max-width: calc(100% - 2.5rem); }
  .hero-film .reveal > h1 { order: 2; align-self: stretch; max-width: none; }
  .hero-film .reveal > h1 ~ * { order: 4; }
  .hero-film .reveal > p, .hero-film .reveal > div:not(#home-available-badge):not(#home-closure-note) { align-self: stretch; max-width: none; }
  .hero-film .hf-vid {
    order: 3; width: 100%; margin: 1.25rem 0 .5rem;
    -webkit-mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent);
  }
}
@media (min-width: 768px) and (max-width: 1100px) and (orientation: portrait) {
  .hero-film .reveal > * { margin-left: 2rem; margin-right: 2rem; max-width: calc(100% - 4rem); }
}
@media (min-width: 600px) and (max-width: 1100px) and (orientation: portrait) { .hero-film .hf-vid { width: min(100%, 560px); align-self: center; aspect-ratio: 4 / 5; max-height: none; } }

/* ordinateur / paysage : le texte est calé en haut à gauche, aéré, au lieu d'être collé en bas */
.hero.hero-film { justify-content: flex-start; }
.hero-film .hf-in { padding-top: clamp(3.25rem, 10vh, 6rem); padding-bottom: 3rem; }
