/* Hero atmosphere, band rhythm, per-section art direction. */

/* --- Hero ----------------------------------------------------------------- */

.ace-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  align-content: center;
  min-height: 100svh;
  padding-top: calc(var(--ace-header-h) + var(--ace-sp-6));
  padding-bottom: clamp(4.5rem, 9vh, 7rem);
}

.ace-hero__content {
  position: relative;
  z-index: 2;
}

/* --- Portrait plate ------------------------------------------------------- */

.ace-hero__media {
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.ace-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 12%;
}

.ace-hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
}

.ace-hero__watermark {
  position: absolute;
  z-index: 0;
  left: var(--ace-gutter);
  bottom: var(--ace-gutter);
  width: clamp(11rem, 34vmin, 22rem);
  opacity: .05;
  pointer-events: none;
  user-select: none;
}

/* Phone: full-bleed band above the copy, running under the header. Text never
   sits on the photograph. */
@media (max-width: 767.98px) {
  .ace-hero {
    align-content: start;
    gap: var(--ace-sp-5);
    padding-top: 0;
    padding-bottom: var(--ace-sp-7);
  }

  /* Taller than wide so height drives the cover scale: that enlarges the face
     and trims the empty backdrop at the sides. A landscape band sizes off the
     width instead and leaves the head small. */
  .ace-hero__media {
    width: 100%;
    aspect-ratio: 5 / 6;
    max-height: 52svh;
  }

  .ace-hero__media::after {
    background: linear-gradient(
      to bottom,
      rgba(7, 9, 15, .34) 0%,
      transparent 32%,
      rgba(7, 9, 15, .70) 80%,
      var(--ace-ink) 100%
    );
  }

  .ace-hero__watermark { display: none; }
}

/* Tablet: two columns. The plate stretches to the copy block so both share a
   top and a bottom edge; anything shorter floats against nothing. */
@media (min-width: 768px) and (max-width: 1099.98px) {
  .ace-hero {
    align-items: start;
    grid-template-columns: minmax(0, 1fr) clamp(16rem, 40vw, 26rem);
    column-gap: var(--ace-sp-6);
    padding-inline: var(--ace-gutter);
  }

  .ace-hero__content {
    grid-area: 1 / 1;
    max-width: none;
    padding-inline: 0;
  }

  .ace-hero__media {
    grid-area: 1 / 2;
    align-self: stretch;
    border: 1px solid rgba(198, 161, 91, .30);
    border-radius: var(--ace-r-lg);
    box-shadow: var(--ace-shadow-lg);
  }

  .ace-hero__media::before {
    content: "";
    position: absolute;
    inset: 10px;
    z-index: 2;
    border: 1px solid rgba(198, 161, 91, .18);
    border-radius: calc(var(--ace-r-lg) - 10px);
    pointer-events: none;
  }

  .ace-hero__media::after {
    background: linear-gradient(to top, rgba(7, 9, 15, .42), transparent 46%);
  }
}

/* Desktop: editorial split, plate bleeding off the right edge. */
@media (min-width: 1100px) {
  .ace-hero__media {
    position: absolute;
    inset: 0 0 0 auto;
    width: min(42vw, 46rem);
    -webkit-mask-image: linear-gradient(to right, transparent, rgba(0, 0, 0, .42) 14%, rgba(0, 0, 0, .9) 42%, #000 62%);
    mask-image: linear-gradient(to right, transparent, rgba(0, 0, 0, .42) 14%, rgba(0, 0, 0, .9) 42%, #000 62%);
  }

  .ace-hero__media::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to top, rgba(7, 9, 15, .58), transparent 36%);
  }

  .ace-hero__media::after {
    background: linear-gradient(115deg, transparent 52%, rgba(198, 161, 91, .07) 76%, transparent 93%);
  }

  .ace-hero__content {
    padding-right: max(1.5rem, min(calc(37.5rem - 8vw), calc(83.5rem - 50vw)));
  }
}

@media (prefers-reduced-motion: no-preference) {
  .ace-hero__media img { animation: ace-kenburns 28s var(--ace-ease-inout) 2 alternate; }
  .ace-hero__media { animation: ace-plate-in 1.8s var(--ace-ease-soft) both; }
}

@keyframes ace-kenburns {
  from { scale: 1; }
  to   { scale: 1.06; }
}

@keyframes ace-plate-in {
  from { opacity: 0; translate: 0 14px; }
}

/* --- Atmosphere ----------------------------------------------------------- */

.ace-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: linear-gradient(to bottom, rgba(17, 24, 38, .55), transparent 45%);
}

.ace-hero__bg::before {
  content: "";
  position: absolute;
  top: -30%;
  right: -22%;
  width: 88vmax;
  height: 88vmax;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(198, 161, 91, .17), rgba(198, 161, 91, .05) 55%, transparent 72%);
  transform: translate3d(var(--ace-px, 0px), var(--ace-py, 0px), 0);
}

.ace-hero__bg::after {
  content: "";
  position: absolute;
  bottom: -34%;
  left: -26%;
  width: 96vmax;
  height: 96vmax;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(16, 49, 46, .95), rgba(16, 49, 46, .34) 52%, transparent 74%);
  transform: translate3d(calc(var(--ace-px, 0px) * -.55), calc(var(--ace-py, 0px) * -.55), 0);
}

.ace-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23g)' opacity='.06'/%3E%3C/svg%3E"),
    radial-gradient(122% 92% at 50% 42%, transparent 22%, rgba(4, 5, 9, .78) 100%);
  background-size: 180px 180px, cover;
}

@media (prefers-reduced-motion: no-preference) {
  .ace-hero__bg::before { animation: ace-drift-a 78s var(--ace-ease-inout) infinite; }
  .ace-hero__bg::after  { animation: ace-drift-b 104s var(--ace-ease-inout) infinite; }
}

@keyframes ace-drift-a {
  0%,
  100% { translate: 0 0; scale: 1; opacity: .85; }
  50%  { translate: -5% 4%; scale: 1.14; opacity: 1; }
}

@keyframes ace-drift-b {
  0%,
  100% { translate: 0 0; scale: 1.04; opacity: .9; }
  50%  { translate: 6% -4%; scale: .94; opacity: 1; }
}

/* --- Hero copy ------------------------------------------------------------ */

.ace-hero__overline { margin-bottom: var(--ace-sp-4); }

.ace-hero__title {
  max-width: 16ch;
  line-height: 1.02;
  letter-spacing: -.035em;
}

.ace-hero__title em {
  display: inline-block;
  padding-bottom: .08em;
}

.ace-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ace-sp-3);
  margin-top: var(--ace-sp-6);
}

.ace-hero__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--ace-sp-5);
  max-width: 34rem;
  margin-top: var(--ace-sp-6);
  padding-top: var(--ace-sp-5);
  border-top: 1px solid var(--ace-line);
}

.ace-hero__stat {
  display: grid;
  align-content: start;
  gap: .35rem;
}

.ace-hero__stat-value {
  font-family: var(--ace-font-display);
  font-size: clamp(1.7rem, 1.4rem + 1.1vw, 2.3rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.01em;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--ace-gold-bright);
}

.ace-hero__stat-value span {
  font-size: .62em;
  vertical-align: .28em;
  margin-left: .04em;
  color: var(--ace-gold);
}

.ace-hero__stat-label {
  font-size: var(--ace-fs-overline);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-wrap: balance;
  color: var(--ace-muted);
}

@media (max-width: 640px) {
  .ace-hero__actions .ace-btn { flex: 1 1 100%; }
  .ace-hero__meta { gap: var(--ace-sp-4); }
}

@media (prefers-reduced-motion: no-preference) {
  .ace-hero__overline,
  .ace-hero__title,
  .ace-hero__lead,
  .ace-hero__actions,
  .ace-hero__meta {
    opacity: 0;
    animation: ace-enter 1.1s var(--ace-ease-soft) forwards;
  }

  .ace-hero__overline { animation-delay: .12s; }
  .ace-hero__title    { animation-delay: .26s; }
  .ace-hero__lead     { animation-delay: .44s; }
  .ace-hero__actions  { animation-delay: .58s; }
  .ace-hero__meta     { animation-delay: .72s; }
}

@keyframes ace-enter {
  from { opacity: 0; translate: 0 22px; }
  to   { opacity: 1; translate: none; }
}

/* --- Band rhythm ---------------------------------------------------------- */

.ace-method,
.ace-protocol-section,
.ace-formats {
  border-block: 1px solid var(--ace-line);
  background-color: var(--ace-ink-2);
}

.ace-needs-section {
  background-image: linear-gradient(to bottom, rgba(11, 16, 27, .85), transparent 34%);
}

.ace-method .ace-section__head { max-width: 52rem; }
.ace-method .ace-section__intro { max-width: 62ch; }

.ace-bilan-section {
  background-image: radial-gradient(80% 60% at 82% 8%, rgba(198, 161, 91, .07), transparent 62%);
}

/* --- Pentagone SCÈNE ------------------------------------------------------- */

.ace-scene {
  max-width: 36rem;
  margin: var(--ace-sp-7) auto;
}

.ace-scene__svg { width: 100%; }

.ace-scene__ring {
  fill: none;
  stroke: var(--ace-line);
  transform-box: fill-box;
  transform-origin: center;
}

.ace-scene__rays {
  transform-box: view-box;
  transform-origin: 50% 53.2%;
}

.ace-scene__rays line {
  stroke: var(--ace-line-strong);
  stroke-dasharray: 3 7;
}

.ace-scene__edge {
  fill: rgba(198, 161, 91, .03);
  stroke: var(--ace-gold);
  stroke-width: 1.6;
  stroke-linejoin: round;
}

.ace-scene__glow { fill: var(--ace-gold); opacity: .16; }
.ace-scene__dot { fill: var(--ace-gold-bright); }

.ace-scene__area {
  fill: var(--ace-gold-soft);
  stroke: var(--ace-gold-bright);
  stroke-width: 1.2;
  stroke-linejoin: round;
}

.ace-scene__marker { fill: var(--ace-gold-bright); }

.ace-scene__score {
  fill: var(--ace-ink);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
  dominant-baseline: central;
}

/* Le SVG rétrécit avec le viewport : compenser pour garder les chiffres lisibles.
   Le rayon des pastilles suit en JS, la géométrie CSS des cercles étant inégale. */
@media (max-width: 700px) {
  .ace-scene__score { font-size: 15px; }
}

@media (max-width: 480px) {
  .ace-scene__score { font-size: 19px; }
}

.ace-scene__node {
  transform-box: fill-box;
  transform-origin: center;
}

.ace-scene__initial {
  fill: var(--ace-gold-bright);
  font-family: var(--ace-font-display);
  font-size: 46px;
}

.ace-scene__word {
  fill: var(--ace-muted);
  font-size: 13px;
  letter-spacing: .24em;
}

.ace-scene__core-name {
  fill: var(--ace-gold-bright);
  font-family: var(--ace-font-display);
  font-style: italic;
  font-size: 30px;
}

.ace-scene__core-word {
  fill: var(--ace-gold);
  font-size: 14px;
  letter-spacing: .3em;
}

.ace-scene__core-dot { fill: var(--ace-gold-bright); }

.ace-scene__pulse {
  fill: none;
  stroke: var(--ace-gold-bright);
  stroke-width: 1.5;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

.ace-scene__caption {
  margin-top: var(--ace-sp-5);
  text-align: center;
  font-size: var(--ace-fs-sm);
  color: var(--ace-faint);
}

.ace-js .ace-scene__ring,
.ace-js .ace-scene__rays,
.ace-js .ace-scene__node,
.ace-js .ace-scene__label,
.ace-js .ace-scene__core { opacity: 0; }

.ace-js .ace-scene__edge {
  opacity: 0;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
}

.ace-js .ace-scene.is-visible .ace-scene__ring { animation: ace-scene-ring .9s var(--ace-ease) both; }
.ace-js .ace-scene.is-visible .ace-scene__ring:nth-child(2) { animation-delay: .12s; }
.ace-js .ace-scene.is-visible .ace-scene__ring:nth-child(3) { animation-delay: .24s; }

.ace-js .ace-scene.is-visible .ace-scene__rays { animation: ace-scene-ring .9s var(--ace-ease) .35s both; }

.ace-js .ace-scene.is-visible .ace-scene__edge { animation: ace-scene-trace 1.5s cubic-bezier(.45, .05, .35, 1) .7s both; }

.ace-js .ace-scene.is-visible .ace-scene__node { animation: ace-scene-node .5s var(--ace-ease) both; }
.ace-js .ace-scene.is-visible .ace-scene__node:nth-child(1) { animation-delay: .7s; }
.ace-js .ace-scene.is-visible .ace-scene__node:nth-child(2) { animation-delay: 1s; }
.ace-js .ace-scene.is-visible .ace-scene__node:nth-child(3) { animation-delay: 1.3s; }
.ace-js .ace-scene.is-visible .ace-scene__node:nth-child(4) { animation-delay: 1.6s; }
.ace-js .ace-scene.is-visible .ace-scene__node:nth-child(5) { animation-delay: 1.9s; }

.ace-js .ace-scene.is-visible .ace-scene__label { animation: ace-scene-label .7s var(--ace-ease) both; }
.ace-js .ace-scene.is-visible .ace-scene__label:nth-child(1) { animation-delay: .85s; }
.ace-js .ace-scene.is-visible .ace-scene__label:nth-child(2) { animation-delay: 1.15s; }
.ace-js .ace-scene.is-visible .ace-scene__label:nth-child(3) { animation-delay: 1.45s; }
.ace-js .ace-scene.is-visible .ace-scene__label:nth-child(4) { animation-delay: 1.75s; }
.ace-js .ace-scene.is-visible .ace-scene__label:nth-child(5) { animation-delay: 2.05s; }

.ace-js .ace-scene.is-visible .ace-scene__core { animation: ace-scene-label .8s var(--ace-ease) 2.15s both; }

.ace-js .ace-scene.is-visible .ace-scene__pulse { animation: ace-scene-pulse 4s ease-out 2.6s infinite; }

.ace-js .ace-scene.is-instant.is-visible :is(.ace-scene__ring, .ace-scene__rays, .ace-scene__edge, .ace-scene__node, .ace-scene__label, .ace-scene__core) {
  animation-duration: 0s;
  animation-delay: 0s;
}

.ace-js .ace-scene.is-instant.is-visible .ace-scene__pulse { animation-delay: 0s; }

/* Profil vivant : masqué pendant la cinématique, révélé quand scene.js prend la main. */
.ace-js .ace-scene__profile { opacity: 0; }
.ace-js .ace-scene__profile.is-live { opacity: 1; transition: opacity 1s ease .2s; }
.ace-js .ace-scene.is-instant .ace-scene__profile.is-live { transition: none; }

@keyframes ace-scene-ring {
  from { opacity: 0; scale: .85; }
  to { opacity: 1; scale: 1; }
}

@keyframes ace-scene-trace {
  from { opacity: 1; stroke-dashoffset: 100; }
  to { opacity: 1; stroke-dashoffset: 0; }
}

@keyframes ace-scene-node {
  from { opacity: 0; scale: .3; }
  to { opacity: 1; scale: 1; }
}

@keyframes ace-scene-label {
  from { opacity: 0; translate: 0 8px; }
  to { opacity: 1; translate: none; }
}

@keyframes ace-scene-pulse {
  0% { opacity: .5; scale: 1; }
  70%,
  100% { opacity: 0; scale: 3.4; }
}

@media (prefers-reduced-motion: reduce) {
  .ace-js .ace-scene.is-visible .ace-scene__pulse { animation: none; }

  .ace-js .ace-scene.is-visible .ace-scene__profile { opacity: 1; }
}

.ace-protocol-section .ace-section__head { max-width: 40rem; }

.ace-about .ace-section__title { font-size: clamp(2.2rem, 1.7rem + 2.2vw, 3.4rem); }

.ace-formats .ace-section__head { max-width: 40rem; }

/* --- Réservation ---------------------------------------------------------- */

.ace-booking {
  background-image: radial-gradient(72% 52% at 50% 0%, rgba(198, 161, 91, .09), transparent 66%);
}

.ace-booking .ace-section__head {
  max-width: 42rem;
  margin-inline: auto;
  text-align: center;
}

.ace-booking .ace-overline { text-indent: var(--ace-track-label); }

.ace-booking .ace-section__intro { margin-inline: auto; }

.ace-booking__cta {
  display: flex;
  justify-content: center;
  margin-top: var(--ace-sp-5);
}

.ace-booking__cta .ace-btn {
  white-space: normal;
  line-height: 1.35;
}

.ace-booking__contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: var(--ace-sp-2) var(--ace-sp-3);
  margin-top: var(--ace-sp-5);
  font-size: var(--ace-fs-sm);
  color: var(--ace-muted);
}

.ace-booking__contact-link {
  border-bottom: 1px solid var(--ace-line-strong);
  padding-bottom: 2px;
  transition:
    color var(--ace-dur) var(--ace-ease),
    border-color var(--ace-dur) var(--ace-ease);
}

.ace-booking__contact-link:hover,
.ace-booking__contact-link:focus-visible {
  color: var(--ace-gold-bright);
  border-bottom-color: var(--ace-gold);
}

.ace-booking__sep { color: var(--ace-faint); }

/* --- Volets --------------------------------------------------------------- */

.ace-folds {
  max-width: 46rem;
  border-top: 1px solid var(--ace-line);
}

.ace-fold {
  border-bottom: 1px solid var(--ace-line);
}

.ace-fold__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ace-sp-5);
  padding-block: var(--ace-sp-5);
  cursor: pointer;
  list-style: none;
  font-family: var(--ace-font-display);
  font-size: var(--ace-fs-h3);
  line-height: 1.3;
  color: var(--ace-porcelain);
  transition: color var(--ace-dur-fast) var(--ace-ease);
}

.ace-fold__summary::-webkit-details-marker { display: none; }

.ace-fold__summary:hover { color: var(--ace-gold-bright); }

.ace-fold__summary:focus-visible { outline-offset: 4px; }

.ace-fold__icon {
  position: relative;
  flex: none;
  width: 14px;
  height: 14px;
  transition: rotate var(--ace-dur) var(--ace-ease);
}

.ace-fold__icon::before,
.ace-fold__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--ace-gold);
  translate: 0 -50%;
}

.ace-fold__icon::after { rotate: 90deg; }

.ace-fold[open] .ace-fold__icon { rotate: 45deg; }

.ace-fold__body {
  max-width: 40rem;
  padding-bottom: var(--ace-sp-6);
}

.ace-fold__body p { color: var(--ace-muted); }

.ace-fold__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ace-sp-2) var(--ace-sp-3);
  margin-top: var(--ace-sp-4);
}

.ace-fold__list li {
  padding: .35em .95em;
  border: 1px solid var(--ace-line-strong);
  border-radius: var(--ace-r-pill);
  font-size: var(--ace-fs-sm);
  letter-spacing: .02em;
  color: var(--ace-porcelain);
}

@media (min-width: 900px) {
  .ace-tech .ace-folds {
    max-width: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--ace-sp-7);
    align-items: start;
  }
}

