/* Opulancia — manifeste, repères, mémoire flottante, questions, macaron. */

/* Manifeste : les mots s'éclairent au défilement */
.manifeste {
  font-weight: 500;
  font-size: clamp(28px, 3.9vw, 54px);
  line-height: 1.12;
  letter-spacing: -.03em;
  max-width: 24ch;
  margin: 0 0 0 auto;
}
.manifeste .mot { color: rgba(21, 21, 21, .2); transition: color .4s ease; }
.manifeste .mot.allume, .sans-js .manifeste .mot { color: var(--encre); }

/* Repères */
.reperes {
  list-style: none; padding: 0;
  margin: clamp(56px, 8vw, 110px) 0 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0;
}
.reperes li { border-top: 1px solid rgba(21, 21, 21, .3); padding: 18px 20px 0 0; }
.reperes li + li { border-left: 1px solid rgba(21, 21, 21, .3); padding-left: 20px; }
.reperes strong { display: block; font-weight: 400; font-size: clamp(64px, 8vw, 112px); line-height: .9; letter-spacing: -.05em; }
.reperes span { display: block; margin-top: 14px; font-size: 14px; color: var(--gris); max-width: 22ch; }

/* Mémoire flottante */
.memoire {
  position: relative;
  min-height: clamp(560px, 90vh, 820px);
  display: grid; place-items: center; text-align: center;
  overflow: hidden;
}
.memoire .centre-memoire { position: relative; z-index: 2; max-width: 46ch; }
.memoire .titre-section { margin: 18px auto 22px; max-width: 18ch; font-size: clamp(34px, 4.6vw, 64px); }
.memoire .texte-memoire { margin: 0 auto; max-width: 40ch; }
.flottants { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.flottant {
  position: absolute;
  background: var(--carreau);
  border: 1px solid rgba(21, 21, 21, .12);
  padding: 10px 14px;
  font-size: 14px;
  white-space: nowrap;
  box-shadow: 0 10px 30px -18px rgba(20, 32, 46, .35);
  animation: flotte 9s ease-in-out infinite alternate;
}
.flottant::before { content: ""; display: inline-block; width: 7px; height: 7px; background: var(--nuit); margin-right: 9px; vertical-align: 1px; }
.flottant.or::before { background: var(--or); border-radius: 50%; }
.flottant.vide::before { background: transparent; border: 1px solid var(--encre); }
.flottant:nth-child(1) { left: 6%;  top: 14%; animation-duration: 8s; }
.flottant:nth-child(2) { left: 70%; top: 10%; animation-duration: 11s; }
.flottant:nth-child(3) { left: 12%; top: 46%; animation-duration: 10s; }
.flottant:nth-child(4) { left: 78%; top: 42%; animation-duration: 9s; }
.flottant:nth-child(5) { left: 4%;  top: 78%; animation-duration: 12s; }
.flottant:nth-child(6) { left: 66%; top: 80%; animation-duration: 8.5s; }
.flottant:nth-child(7) { left: 30%; top: 6%;  animation-duration: 10.5s; }
.flottant:nth-child(8) { left: 46%; top: 88%; animation-duration: 9.5s; }
.memoire .exemples { position: absolute; right: var(--marge); bottom: 18px; z-index: 2; }
@keyframes flotte { from { translate: 0 -8px; } to { translate: 0 10px; } }

/* Questions */
.questions { border-top: 1px solid rgba(21, 21, 21, .3); }
.questions details { border-bottom: 1px solid rgba(21, 21, 21, .3); }
.questions summary {
  list-style: none; cursor: pointer;
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;
  padding: 22px 0;
  font-size: clamp(19px, 2vw, 24px); letter-spacing: -.015em; font-weight: 500;
}
.questions summary::-webkit-details-marker { display: none; }
.questions summary::after {
  content: ""; width: 14px; height: 14px;
  background:
    linear-gradient(var(--encre), var(--encre)) center / 14px 1.5px no-repeat,
    linear-gradient(var(--encre), var(--encre)) center / 1.5px 14px no-repeat;
  transition: rotate .35s var(--ease);
}
.questions details[open] summary::after { rotate: 45deg; }
.questions details p { margin: 0 0 24px; max-width: 60ch; color: #2A2825; }

/* Macaron qui tourne */
.macaron {
  position: absolute; z-index: 3;
  right: calc(var(--marge) + min(42vw, 520px) - 60px);
  top: 58%;
  width: 112px; height: 112px;
  animation: apparait 1s var(--ease) 1.6s both;
}
.macaron svg { width: 100%; height: 100%; animation: tourne 22s linear infinite; }
.macaron text { font: 500 10.5px var(--sans); letter-spacing: .18em; text-transform: uppercase; fill: var(--encre); }
.macaron .point { position: absolute; inset: 0; margin: auto; width: 12px; height: 12px; background: var(--nuit); }
@keyframes tourne { to { rotate: 360deg; } }

/* Retour en haut */
.haut {
  position: fixed; right: 18px; bottom: 18px; z-index: 50;
  width: 46px; height: 46px; display: grid; place-items: center;
  background: var(--nuit); color: var(--sur-nuit); text-decoration: none; font-size: 18px;
  opacity: 0; translate: 0 12px; pointer-events: none;
  transition: opacity .4s var(--ease), translate .4s var(--ease);
}
.haut.visible { opacity: 1; translate: 0 0; pointer-events: auto; }

@media (prefers-reduced-motion: reduce) {
  .manifeste .mot { color: var(--encre); }
  .haut { transition: none; }
}

@media (max-width: 900px) {
  .reperes { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; }
  .reperes li + li { border-left: 0; padding-left: 0; }
  .reperes li:nth-child(even) { border-left: 1px solid rgba(21, 21, 21, .3); padding-left: 16px; }
  .macaron { display: none; }
  .memoire { min-height: auto; padding-block: 40px; }
  .flottants { position: static; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 36px; }
  .flottant { position: static; animation: none; white-space: normal; }
  .memoire { display: block; }
  .memoire .exemples { position: static; display: block; text-align: center; margin-top: 14px; }
}

/* Mention des normes, sous les garanties */
.normes { margin: clamp(48px, 6vw, 80px) 0 0; padding-top: 24px; border-top: 1px solid rgba(234, 228, 218, .25); max-width: 72ch; }
.normes .legende { margin: 0 0 10px; color: var(--sur-nuit); }
.normes p:last-child { margin: 0; color: rgba(234, 228, 218, .8); font-size: 15px; line-height: 1.55; }
