/* ============================================================
   Ouverture « ciel » (12/11/2026) : reprise de la première vue d'amaterasu.ai
   (fiche Refero « Celestial teal sanctuary »). Photo plein écran éclairée de
   turquoise, titre très fin et serré, une seule encre violette (#1b2978),
   petites capitales très espacées pour la navigation.
   Chargé après style.css et clair.css. Classes préfixées « ciel- ».
   ============================================================ */
:root {
  --ciel-violet: #1b2978;
  --ciel-indigo: #19366c;
  --ciel-teal: #75cdd6;
  --ciel-blanc: #ffffff;
  --ciel-font: "Inter Tight", "Albert Sans", system-ui, sans-serif;
  --ciel-ease: cubic-bezier(.16, 1, .3, 1);
}

/* L'en-tête du site reste caché sur l'ouverture : la marque et « Menu » de l'image le remplacent. */
.accueil-ciel .header { transition: background .3s, border-color .3s, opacity .4s var(--ciel-ease); }
.accueil-ciel .header:not(.is-stuck):not(.is-open):not(.montre) { opacity: 0; pointer-events: none; }
.accueil-ciel .header.montre { background: rgba(251, 248, 241, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); --text: #13231e; --muted: #55645e; --line-strong: rgba(19, 35, 30, .24); --surface-2: rgba(19, 35, 30, .07); border-bottom-color: var(--line); }

.ciel {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  margin-top: calc(-1 * var(--header-h));
  overflow: hidden;
  background: linear-gradient(90deg, #08324b 0%, #0b4262 40%, #1a6f93 100%);
  color: var(--ciel-blanc);
  font-family: var(--ciel-font);
  isolation: isolate;
}
.ciel ::selection { background: var(--ciel-violet); color: #fff; }

/* Couche 1 : la photo (puis la vidéo Flow quand elle existe). */
.ciel-fond { position: absolute; inset: 0; z-index: -1; transform: translate3d(calc(var(--mx, 0) * -10px), calc(var(--my, 0) * -8px + var(--sy, 0) * 110px), 0) scale(calc(1 + var(--sy, 0) * .05)); will-change: transform; }
/* La vidéo garde toute sa largeur (pas de recadrage) ; elle est seulement décalée de 10 % vers la droite
   pour laisser le titre sur le fond, et fondue à gauche. */
.ciel-fond picture, .ciel-video { position: absolute; top: 0; bottom: 0; left: 10%; width: 100%; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12%); mask-image: linear-gradient(90deg, transparent 0, #000 12%); }
.ciel-image { position: absolute; inset: 0; width: 100%; height: 100%; }
.ciel-video { height: 100%; }
.ciel-image, .ciel-video { object-fit: cover; object-position: 50% 30%; }
.ciel-video { opacity: 0; transition: opacity 1.2s linear; }
.ciel-video.fin { transition: opacity 2s cubic-bezier(.4, 0, .2, 1); }
.ciel-video.joue { opacity: 1; }
.ciel-image { animation: ciel-recul 2.6s var(--ciel-ease) both; }
/* Lumière de la référence : clé cyan en haut à droite, ombre bleu nuit à gauche pour le titre. */
.ciel-lumiere {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 70% at 92% 6%, rgba(170, 238, 250, .55), rgba(132, 205, 238, 0) 70%),
    linear-gradient(90deg, rgba(6, 34, 56, .5) 0%, rgba(6, 34, 56, .18) 34%, rgba(6, 34, 56, 0) 55%),
    linear-gradient(0deg, rgba(5, 24, 38, .45) 0%, rgba(5, 24, 38, 0) 26%);
  mix-blend-mode: normal;
  pointer-events: none;
}

/* Fils décoratifs : une verticale et une courbe, comme sur la référence. */
.ciel-traits { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; fill: none; stroke: rgba(255, 255, 255, .32); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ciel-traits path { vector-effect: non-scaling-stroke; stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: ciel-trait 2.4s .5s var(--ciel-ease) forwards; }

/* Haut de page : marque centrée, « Menu » à droite sous un filet. */
.ciel-haut { position: absolute; inset: 0 0 auto; height: 72px; z-index: 2; }
.ciel-marque {
  position: absolute; top: 22px; left: 50%; transform: translateX(-50%);
  font-size: 12px; font-weight: 500; letter-spacing: .42em; padding-left: .42em;
  animation: ciel-fondu 1.2s .9s both;
}
.ciel-menu {
  position: absolute; top: 16px; right: clamp(16px, 2.4vw, 28px);
  width: clamp(120px, 15vw, 210px);
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0 0 14px;
  border: 0; border-top: 1px solid rgba(255, 255, 255, .55);
  background: none; color: inherit; cursor: pointer;
  font: 500 11px/1 var(--ciel-font); letter-spacing: .32em; text-transform: uppercase;
  animation: ciel-fondu 1.2s 1s both;
}
.ciel-menu svg { width: 16px; height: 16px; fill: currentColor; transition: transform .5s var(--ciel-ease); }
.ciel-menu:hover svg { transform: rotate(90deg); }
.ciel-menu:hover span { color: #dbe4ff; }

/* Titre : très fin, très serré, aligné à droite contre la tête. */
.ciel-centre { position: absolute; top: 22%; right: 55%; z-index: 2; text-align: right; }
.ciel-titre {
  margin: 0;
  font-family: var(--ciel-font);
  font-weight: 200;
  font-size: clamp(44px, 5.9vw, 116px);
  line-height: 1;
  letter-spacing: -.04em;
  color: var(--ciel-blanc);
  text-wrap: balance;
}
.ciel-titre > span { display: block; overflow: hidden; padding: 0 .04em .08em; margin-bottom: -.08em; }
.ciel-titre > span > span { display: block; animation: ciel-monte 1.6s var(--ciel-ease) both; }
.ciel-titre > span:nth-child(2) > span { animation-delay: .12s; }
.ciel-titre > span:nth-child(3) > span { animation-delay: .24s; }
.ciel-titre > span:nth-child(4) > span { animation-delay: .36s; }

/* Seul bouton : pilule violette. */
.ciel-cta {
  display: inline-flex; align-items: center; gap: 9px;
  margin-top: clamp(22px, 3.2vh, 34px);
  padding: 14px 24px;
  border-radius: 20px;
  border: 1px solid rgba(120, 140, 230, .45);
  background: linear-gradient(174deg, #2a398e 5%, #5566c5 100%);
  color: #fff;
  font: 500 11px/1 var(--ciel-font); letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 10px 30px -12px rgba(27, 41, 120, .8);
  transition: transform .5s var(--ciel-ease), box-shadow .5s var(--ciel-ease), background-position .5s;
  animation: ciel-fondu 1.2s .7s both;
}
.ciel-cta i { width: 5px; height: 5px; border-radius: 50%; background: #9fe9f2; box-shadow: 0 0 10px 2px rgba(159, 233, 242, .7); }
.ciel-cta:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -12px rgba(27, 41, 120, .95); }

/* Texte à droite, petit, comme la phrase de présentation de la référence. */
.ciel-texte {
  position: absolute; z-index: 2;
  left: 84%; top: 44%;
  width: min(15vw, 230px);
  margin: 0;
  font-size: clamp(12px, .95vw, 15px); font-weight: 300; line-height: 1.45;
  color: rgba(255, 255, 255, .92);
  text-shadow: 0 1px 14px rgba(6, 34, 56, .55);
  animation: ciel-fondu 1.2s 1.1s both;
}

.ciel-defiler {
  position: absolute; z-index: 2; left: clamp(16px, 2vw, 28px); bottom: 24px;
  display: inline-flex; align-items: center; gap: 10px;
  color: #fff; text-decoration: none;
  font: 500 10px/1 var(--ciel-font); letter-spacing: .32em; text-transform: uppercase;
  animation: ciel-fondu 1.2s 1.2s both;
}
.ciel-defiler svg { width: 9px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.2; animation: ciel-pas 2.4s 2.4s var(--ciel-ease) infinite; }

.ciel a:focus-visible, .ciel button:focus-visible { outline: 1px solid #fff; outline-offset: 6px; border-radius: 20px; }

/* Passage de l'ouverture turquoise au reste de la page, clair. */
.accueil-ciel .m-aube { background: linear-gradient(#0e3346 0%, #1f6f86 30%, #7fc6d3 58%, #d9eeee 82%, var(--bg) 100%); }

@keyframes ciel-recul { from { transform: scale(1.14); filter: blur(6px) brightness(.7); } to { transform: scale(1); filter: none; } }
@keyframes ciel-monte { from { transform: translateY(108%); } to { transform: none; } }
@keyframes ciel-fondu { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes ciel-trait { to { stroke-dashoffset: 0; } }
@keyframes ciel-pas { 0%, 100% { transform: none; } 50% { transform: translateY(4px); } }

/* Écrans moyens : le texte de droite passe sous le titre. */
@media (max-width: 1100px) {
  .ciel-texte { left: auto; right: clamp(16px, 2.4vw, 28px); top: auto; bottom: 64px; width: min(34vw, 300px); }
}

/* Téléphone ou écran en hauteur : image verticale, homme en bas, titre dans le ciel au-dessus. */
@media (max-aspect-ratio: 4/5), (max-width: 760px) {
  .ciel { min-height: 600px; }
  /* La vidéo verticale est cadrée serré : on la pose sous le titre, fondue vers le ciel. */
  .ciel-fond picture, .ciel-video { inset: 27svh 0 0 0; width: 100%; height: auto; -webkit-mask-image: linear-gradient(transparent 0, #000 16%); mask-image: linear-gradient(transparent 0, #000 16%); }
  .ciel-video { height: 73svh; }
  .ciel-image, .ciel-video { object-position: 50% 0; }
  .ciel-lumiere { background: radial-gradient(ellipse 80% 50% at 90% 0%, rgba(170, 238, 250, .45), rgba(132, 205, 238, 0) 70%), linear-gradient(0deg, rgba(5, 24, 38, .85) 0%, rgba(5, 24, 38, .35) 28%, rgba(5, 24, 38, 0) 46%); }
  .ciel-traits { display: none; }
  .ciel-centre { position: static; text-align: left; }
  .ciel-titre { position: absolute; z-index: 2; top: calc(var(--header-h) + 4svh); left: 20px; right: 20px; }
  .ciel-cta { position: absolute; z-index: 2; left: 20px; bottom: 150px; margin: 0; }
  .ciel-titre { font-size: clamp(40px, 11.6vw, 64px); }
  .ciel-texte { left: 20px; right: 20px; top: auto; bottom: 60px; width: auto; max-width: 34ch; font-size: 14px; }
  .ciel-defiler { left: 20px; bottom: 22px; }
  .ciel-marque { left: 20px; transform: none; }
  .ciel-menu { width: 104px; }
}

@media (prefers-reduced-motion: reduce) {
  .ciel *, .ciel-image { animation: none !important; }
  .ciel-traits path { stroke-dashoffset: 0; }
  .ciel-fond { transform: none; }
}
