/* ============================================================
   LES CINQ ANIMATIONS DE VENTE — styles
   Une section par animation, dans l'ordre de
   includes/animations.php (où chacune s'éteint).
   Couleurs : uniquement les jetons du site, pour que le clair
   et la nuit suivent tout seuls. Exceptions : les teintes de
   dent du nuancier et le papier du certificat, qui sont des
   objets réels et gardent leur couleur dans les deux modes.
   ============================================================ */

@font-face {
  font-family: "Pinyon Script";
  src: url("/assets/fonts/pinyon-script.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}


/* --- 1. Le nuancier ---------------------------------------- */

.nuancier {
  margin: 0;
  padding: clamp(1.2rem, 2.4vw, 1.8rem);
  background: var(--encre);
}
.nuancier__scene {
  display: grid;
  justify-items: center;
  gap: .9rem;
  padding: .6rem 0 1.4rem;
}
.nuancier__dents {
  width: min(320px, 86%);
  height: auto;
  overflow: visible;
}
.nuancier__dents path {
  fill: var(--teinte-actuelle, #D6C29B);
  stroke: rgba(10, 10, 10, .28);
  stroke-width: 1;
  stroke-linejoin: round;
  transition: fill 1.1s cubic-bezier(.4, 0, .2, 1);
}
.nuancier__etat {
  display: flex;
  align-items: baseline;
  gap: .7rem;
  margin: 0;
  font-size: .78rem;
  color: var(--brume);
}
.nuancier__etat span {
  font-size: .62rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--sourdine);
}
.nuancier__etat b {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.05rem;
  color: var(--blanc);
}

/* La gamme : dix pastilles, comme les languettes du nuancier. */
.nuancier__gamme {
  position: relative;
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 3px;
}
.nuancier__gamme input { position: absolute; opacity: 0; pointer-events: none; }
.nuancier__gamme label {
  display: block;
  height: 34px;
  background: var(--teinte-dent);
  border-radius: 2px 2px 9px 9px;
  cursor: pointer;
  outline: 1px solid transparent;
  outline-offset: 2px;
  transition: outline-color var(--vif);
}
.nuancier__gamme label:hover { outline-color: var(--filet-fort); }
.nuancier__gamme input:checked + label { outline-color: var(--blanc); }
.nuancier__gamme input:focus-visible + label { outline-color: var(--rose); }
/* Le repère de la teinte atteinte, sous la gamme. */
.nuancier__cible {
  position: absolute;
  left: 0; bottom: -10px;
  width: calc((100% - 27px) / 10);
  height: 2px;
  background: var(--rose);
  opacity: 0;
  transform: translateX(var(--cible, 0));
  transition: transform .9s cubic-bezier(.4, 0, .2, 1), opacity var(--vif);
}
.nuancier.a-un-resultat .nuancier__cible { opacity: 1; }

.nuancier__etapes {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: 1.6rem;
}
.nuancier__etapes button,
.regard__poses button {
  padding: .55rem .9rem;
  border: 1px solid var(--filet-fort);
  font-size: .64rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brume);
  transition: color var(--vif), border-color var(--vif), background var(--vif);
}
.nuancier__etapes button:hover,
.regard__poses button:hover { color: var(--blanc); border-color: var(--blanc); }
.nuancier__etapes button[aria-pressed="true"],
.regard__poses button[aria-pressed="true"] {
  color: var(--noir);
  background: var(--blanc);
  border-color: var(--blanc);
}
.nuancier figcaption,
.regard figcaption {
  margin-top: 1.1rem;
  font-size: .72rem;
  line-height: 1.6;
  color: var(--sourdine);
}


/* --- 2. Le regard ------------------------------------------ */

.regard {
  margin: 0;
  padding: clamp(1.2rem, 2.4vw, 1.8rem);
  background: var(--encre);
}
.regard__scene {
  display: grid;
  justify-items: center;
  gap: .4rem;
  padding-bottom: 1.2rem;
}
.regard__oeil {
  width: min(360px, 92%);
  height: auto;
  overflow: visible;
}
.regard__cils path {
  fill: none;
  stroke: var(--blanc);
  stroke-linecap: round;
}
.regard__paupiere { fill: none; stroke: var(--blanc); stroke-width: 1.6; stroke-linecap: round; }
.regard__bas      { fill: none; stroke: var(--filet-fort); stroke-width: 1; }
.regard__iris     { fill: none; stroke: var(--filet-fort); stroke-width: 1; }
.regard__pupille  { fill: var(--blanc); opacity: .85; }
.regard__reflet   { fill: var(--encre); }

.regard__legende {
  display: flex;
  align-items: baseline;
  gap: .8rem;
  margin: 0;
}
.regard__legende b {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.15rem;
  color: var(--blanc);
}
.regard__legende span { font-size: .74rem; color: var(--sourdine); }

.regard__poses {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}


/* --- 3. La tenue ------------------------------------------- */

.tenue .tete h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); line-height: 1.08; }
.tenue__corps { margin-top: clamp(2rem, 4vw, 3rem); }

.tenue__temps { position: relative; padding-bottom: .4rem; }

/* Le curseur du temps : une ligne fine et un point rose. */
.tenue__temps input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 28px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
.tenue__temps input[type="range"]::-webkit-slider-runnable-track { height: 1px; background: var(--filet-fort); }
.tenue__temps input[type="range"]::-moz-range-track { height: 1px; background: var(--filet-fort); }
.tenue__temps input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px; height: 13px;
  margin-top: -6px;
  border: 0;
  border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--rose) 18%, transparent);
}
.tenue__temps input[type="range"]::-moz-range-thumb {
  width: 13px; height: 13px;
  border: 0;
  border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--rose) 18%, transparent);
}
.tenue__temps input[type="range"]:focus-visible { outline: 1px solid var(--rose); outline-offset: 6px; }

.tenue__reperes {
  display: flex;
  justify-content: space-between;
  margin: .3rem 0 0;
  padding: 0;
  list-style: none;
}
.tenue__reperes li {
  flex: 0 0 auto;
  width: 0;
  display: flex;
  justify-content: center;
  white-space: nowrap;
  font-size: .62rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sourdine);
  transition: color var(--vif);
}
.tenue__reperes li:first-child { justify-content: flex-start; }
.tenue__reperes li:last-child  { justify-content: flex-end; }
.tenue__reperes li.est-actif { color: var(--blanc); }

.tenue__soins {
  margin: clamp(2rem, 4vw, 2.8rem) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--filet);
}
.tenue__soin {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr) minmax(0, 1.4fr) 8.5rem;
  align-items: center;
  gap: 1.4rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--filet);
}
.tenue__soin h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.15rem;
  color: var(--blanc);
}
.tenue__barre { height: 2px; background: var(--filet); }
.tenue__barre i {
  display: block;
  width: var(--niveau, 100%);
  height: 100%;
  background: var(--rose);
  transition: width .7s cubic-bezier(.4, 0, .2, 1);
}
.tenue__etat {
  margin: 0;
  font-size: .82rem;
  line-height: 1.55;
  color: var(--brume);
}
.tenue__rappel {
  padding: .5rem 0;
  border-bottom: 1px solid var(--filet-fort);
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blanc);
  transition: border-color var(--vif), color var(--vif);
}
.tenue__rappel:hover { border-color: var(--rose); color: var(--rose); }
/* Le bouton est aligné à droite de sa colonne. */
.tenue__rappel { justify-self: end; }

.tenue__mention {
  margin: 1.2rem 0 0;
  font-size: .72rem;
  color: var(--sourdine);
}

@media (max-width: 860px) {
  .tenue__soin {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .6rem 1rem;
  }
  .tenue__barre { grid-column: 1 / -1; }
  .tenue__etat  { grid-column: 1 / -1; }
  .tenue__rappel { grid-row: 1; grid-column: 2; }
  /* Sept repères ne tiennent pas sur un téléphone : on garde le
     premier, le dernier, et celui où l'on est. */
  .tenue__reperes li { font-size: .56rem; visibility: hidden; }
  .tenue__reperes li:first-child,
  .tenue__reperes li:last-child,
  .tenue__reperes li.est-actif { visibility: visible; }
}


/* --- 4. Les places ----------------------------------------- */

.places-dents {
  display: inline-flex;
  gap: 5px;
  margin-bottom: .35rem;
}
.places-dents__dent {
  position: relative;
  display: block;
  width: 17px; height: 19px;
}
.places-dents__dent svg { display: block; width: 100%; height: 100%; overflow: visible; }
.places-dents__dent path {
  fill: transparent;
  stroke: var(--filet-fort);
  stroke-width: 1.6;
  stroke-linejoin: round;
}
.places-dents__dent.est-prise path { stroke: var(--sourdine); fill: var(--filet); }

/* Le strass d'une place prise. Il se pose quand la liste arrive
   à l'écran, une dent après l'autre, une seule fois. */
.places-dents__dent i {
  position: absolute;
  top: 24%; left: 54%;
  width: 4px; height: 4px;
  background: var(--eclat); background-size: 260% 100%;
  transform: rotate(45deg) scale(0);
  transition: transform .45s cubic-bezier(.2, 1.5, .4, 1);
  transition-delay: calc(.25s + var(--rang) * .14s);
}
.sessions__liste.est-vu .places-dents__dent i { transform: rotate(45deg) scale(1); }

/* La place libre, au survol : une phrase, la dent s'éclaire. */
.places-dents__dent[data-libre] path { transition: stroke var(--vif); }
.places-dents__dent[data-libre]:hover path { stroke: var(--rose); }
.places-dents__dent[data-libre]::after {
  content: attr(data-libre);
  position: absolute;
  right: 0; bottom: calc(100% + 8px);
  padding: .4rem .6rem;
  background: var(--blanc);
  color: var(--noir);
  font-size: .62rem;
  letter-spacing: .04em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--vif);
}
.places-dents__dent[data-libre]:hover::after { opacity: 1; }
.session--complet .places-dents { opacity: .7; }
.session__prix .places-dents { display: flex; justify-content: flex-end; }


/* --- 5. Le certificat -------------------------------------- */

.certificat__grille {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(2.4rem, 6vw, 6rem);
  align-items: center;
}
.certificat__texte h2 {
  margin: 0 0 1.1rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  line-height: 1.08;
}
.certificat__texte h2 em { font-style: italic; color: var(--rose-clair); }
.certificat__texte > p { max-width: 30rem; font-size: .92rem; line-height: 1.7; color: var(--brume); }

.certificat__champs {
  display: grid;
  gap: 1rem;
  margin: 1.8rem 0 1.6rem;
  max-width: 24rem;
}
.certificat__champ { display: grid; gap: .35rem; }
.certificat__champ span {
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--sourdine);
}
.certificat__champ input,
.certificat__champ select {
  width: 100%;
  padding: .7rem 0;
  border: 0;
  border-bottom: 1px solid var(--filet-fort);
  border-radius: 0;
  background: transparent;
  color: var(--blanc);
  font: inherit;
  font-size: 1rem;
  transition: border-color var(--vif);
}
.certificat__champ input::placeholder { color: var(--sourdine); }
.certificat__champ input:focus,
.certificat__champ select:focus { outline: none; border-bottom-color: var(--rose); }
.certificat__champ select option { color: #0A0A0A; }
.certificat__mention { margin-top: 1rem; font-size: .7rem; color: var(--sourdine); }

/* Le papier : un vrai objet, crème, encre sombre, quel que soit
   le mode. */
.certificat__papier {
  position: relative;
  display: grid;
  justify-items: center;
  text-align: center;
  aspect-ratio: 1.414 / 1;
  padding: clamp(1.6rem, 3.4vw, 2.8rem) clamp(1.6rem, 4vw, 3.4rem);
  background: #F4F1EB;
  color: #1A1418;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .45);
  font-size: clamp(.62rem, .9vw, .74rem);
}
.certificat__papier::before {
  /* Le double filet du bord. */
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(26, 20, 24, .22);
  box-shadow: inset 0 0 0 3px #F4F1EB, inset 0 0 0 4px rgba(26, 20, 24, .12);
  pointer-events: none;
}
.certificat__papier p { margin: 0; }
.certificat__marque {
  font-family: var(--serif);
  font-size: .8em;
  letter-spacing: .32em;
  text-transform: uppercase;
}
.certificat__titre {
  margin-top: .8em !important;
  font-family: var(--serif);
  font-size: 2.1em;
  line-height: 1.1;
}
.certificat__decerne,
.certificat__pour {
  margin-top: 1.2em !important;
  font-size: .82em;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(26, 20, 24, .55);
}
.certificat__nom {
  min-height: 1.15em;
  margin-top: .1em !important;
  font-family: "Pinyon Script", var(--serif);
  font-size: 3.6em;
  line-height: 1.15;
  color: #1A1418;
  transition: color var(--moyen);
}
.certificat__nom.est-vide { color: rgba(26, 20, 24, .22); }
.certificat__formation {
  margin-top: .3em !important;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.35em;
}
.certificat__date { margin-top: .5em !important; color: rgba(26, 20, 24, .62); }

.certificat__pied {
  align-self: end;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 1.2em;
}
.certificat__signature { display: grid; justify-items: start; text-align: left; }
.certificat__signature span {
  font-family: "Pinyon Script", var(--serif);
  font-size: 2.6em;
  line-height: 1;
  color: #2C2230;
  /* La signature se trace de gauche à droite, une fois. */
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.6s cubic-bezier(.45, 0, .25, 1);
}
.certificat__papier.est-signe .certificat__signature span { clip-path: inset(0 0 0 0); }
.certificat__signature small {
  margin-top: .3em;
  padding-top: .4em;
  border-top: 1px solid rgba(26, 20, 24, .3);
  font-size: .78em;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(26, 20, 24, .55);
}
.certificat__lieu {
  font-size: .78em;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(26, 20, 24, .55);
}

@media (max-width: 900px) {
  .certificat__grille { grid-template-columns: 1fr; }
  .certificat__papier { order: -1; }
}

@media (prefers-reduced-motion: reduce) {
  .nuancier__dents path,
  .nuancier__cible,
  .tenue__barre i,
  .places-dents__dent i,
  .certificat__signature span { transition: none; }
}
