/* ============================================================
   CHAPITRE 4 : DNEye™ SCANNER
   Adaptation iPad de dneye.css (version 86").
   Les dimensions sont exprimées en px de maquette (base 1194 px),
   la mise à l'échelle globale est gérée par .device-frame.
   ============================================================ */

#screen-dneye {
  --dneye-accent: #0ac8be;
  --dneye-dark: #052542;
}

.sec-dneye {
  position: relative;
  margin-bottom: 90px;
}

.dneye-title {
  margin: 0 auto 50px;
  width: 85%;
  text-align: center;
  font-size: 2em;
  font-weight: 700;
  line-height: 1.15;
}

.dneye-title b,
.dneye-title strong {
  color: var(--dneye-accent);
}

/* ---------- Section 1 : hero ---------- */

#dneye-section1 {
  display: grid;
  grid-template-columns: 46% 54%;
  align-items: center;
  min-height: 640px;
  margin-bottom: 40px;
}

.dneye-hero__text {
  position: relative;
  z-index: 2;
  padding: 0 0 80px 40px;
  align-self: start;
  margin-top: 40px;
}

.dneye-hero__text h1 {
  margin: 0 0 18px;
  font-size: 46px;
  line-height: 1.08;
  font-weight: 700;
}

.dneye-hero__text p {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.35;
  max-width: 440px;
}

.dneye-hero__machine {
  width: 100%;
  max-height: 640px;
  object-fit: contain;
  justify-self: center;
}

/* ---------- Section 2 : process en 6 étapes ---------- */

#dneye-process {
  padding-top: 10px;
}

.dneye-process__wrap {
  position: relative;
  padding: 30px 60px 70px 40px;
}

/*
  Ligne 1 : 01 / 02 / 03
  Ligne 2 : 06 / 05 / 04  (lecture en serpent)
*/
.dneye-process__grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 60px;
  row-gap: 110px;
}

.dneye-step {
  position: relative;
  min-width: 0;
}

.dneye-step__number {
  position: absolute;
  left: -6px;
  top: -30px;
  z-index: 5;
  font-family: "TradeGothicNextRegular", sans-serif;
  font-size: 38px;
  line-height: 1;
  font-weight: 600;
  color: var(--dneye-accent);
  text-shadow: 0 0 14px rgba(10, 200, 190, .25);
}

.dneye-step__card {
  position: relative;
  height: 265px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 2px solid rgba(180, 220, 235, .22);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(5, 29, 54, .10), rgba(2, 18, 37, .30));
  box-shadow: 0 10px 28px rgba(0, 0, 0, .12);
}

.dneye-step__card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, .035), transparent 40%);
}

.dneye-step__visual {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px 6px;
}

.dneye-step__visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dneye-step__text {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px 16px;
  text-align: center;
  font-size: 17px;
  line-height: 1.28;
}

.dneye-step__text p {
  margin: 0;
}

.dneye-step__text b,
.dneye-step__text strong {
  color: var(--dneye-accent);
  font-weight: 500;
}

/* Nœud sous chaque carte */
.dneye-node {
  position: absolute;
  left: 50%;
  bottom: -56px;
  width: 32px;
  height: 32px;
  transform: translateX(-50%);
  border: 4px solid var(--dneye-accent);
  border-radius: 50%;
  background: var(--dneye-dark);
  box-shadow: 0 0 0 4px rgba(10, 200, 190, .12);
  z-index: 5;
}

.dneye-node::before {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--dneye-accent);
}

.dneye-node::after {
  content: "";
  position: absolute;
  inset: -8px;
  border: 2px solid var(--dneye-accent);
  border-radius: 50%;
  opacity: 0;
  animation: dneyePulse 2.2s ease-out infinite;
}

/* Parcours : tracé calculé par js/app.js à partir des nœuds */
.dneye-route {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: visible;
  pointer-events: none;
}

.dneye-route__path {
  fill: none;
  stroke: var(--dneye-accent);
  stroke-width: 2.5;
  stroke-dasharray: 9 7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dneye-route__traveller {
  fill: #fff;
  stroke: var(--dneye-accent);
  stroke-width: 3;
  filter: drop-shadow(0 0 3px #0ac8be) drop-shadow(0 0 6px rgba(10, 200, 190, .7));
}

@keyframes dneyePulse {
  0%   { transform: scale(.65); opacity: .8; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* ---------- Section 3 : bénéfices ---------- */

#dneye-benefits {
  padding: 10px 50px 0;
}

.dneye-benefits__title {
  margin: 0 0 55px;
  text-align: center;
  font-family: "TradeGothicNextRegular", sans-serif;
  font-size: 40px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: .5px;
}

.dneye-benefits__list {
  display: flex;
  flex-direction: column;
  gap: 45px;
}

.dneye-benefit {
  display: grid;
  grid-template-columns: 250px 1fr;
  column-gap: 45px;
  align-items: center;
  opacity: 0;
  transform: translateY(25px);
  transition: opacity .7s ease, transform .7s ease;
}

.dneye-benefit.is-visible {
  opacity: 1;
  transform: none;
}

.dneye-benefit:nth-child(2) { transition-delay: .15s; }
.dneye-benefit:nth-child(3) { transition-delay: .3s; }

.dneye-benefit__visual {
  position: relative;
  width: 215px;
  height: 215px;
  justify-self: center;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, .75);
  background: rgba(3, 34, 62, .45);
  box-shadow: 0 0 25px rgba(0, 0, 0, .15);
}

.dneye-benefit__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dneye-benefit__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 25px rgba(0, 200, 190, .10);
  pointer-events: none;
}

.dneye-benefit__text {
  font-size: 28px;
  line-height: 1.22;
  font-weight: 300;
}

.dneye-benefit__text b,
.dneye-benefit__text strong {
  font-family: "TradeGothicNextRegular", sans-serif;
  font-weight: 600;
  color: var(--dneye-accent);
}

/* ---------- Section 4 : vidéo ---------- */

#dneye-video .big-thumb img {
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .35);
}

/* ---------- Section 5 : mesures ---------- */

#dneye-mesures {
  padding-top: 10px;
  margin-bottom: 30px;
}

/* Zone du schéma : 1000 × 700 (moitié de la version 86") */
.dneye-measures {
  position: relative;
  width: 1000px;
  height: 700px;
  margin: 0 auto;
}

/* Visuel rouge : 500 × 500 */
.dneye-measures__image {
  position: absolute;
  width: 500px;
  height: 500px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  object-fit: contain;
  z-index: 1;
}

/* SVG 600 × 600 : arc de rayon 275 => 25 px autour du visuel */
.dneye-measures__svg {
  position: absolute;
  width: 600px;
  height: 600px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  overflow: visible;
  z-index: 2;
  pointer-events: none;
}

#dneye-circle-path {
  fill: none;
  stroke: rgba(255, 255, 255, .9);
  stroke-width: 4;
  stroke-linecap: round;
}

.dneye-measures__stop {
  fill: #fff;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, .3));
}

#dneye-measures-traveller {
  fill: #0ac8be;
  stroke: #fff;
  stroke-width: 6;
  filter: drop-shadow(0 0 5px #0ac8be) drop-shadow(0 0 12px rgba(10, 200, 190, .9));
  pointer-events: none;
}

.dneye-measure {
  position: absolute;
  z-index: 5;
  width: 235px;
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-family: "TradeGothicNextLight", sans-serif;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transform-origin: center center;
  transition: transform .35s ease, filter .35s ease;
}

.dneye-measure strong {
  display: block;
  margin-bottom: 5px;
  font-family: "TradeGothicNextRegular", sans-serif;
  font-size: 20px;
  line-height: 1;
  font-weight: 600;
  transition: color .35s ease;
}

.dneye-measure span {
  display: block;
  font-size: 15px;
  line-height: 1.18;
}

.dneye-measure.is-active {
  transform: scale(1.13);
  filter: drop-shadow(0 0 10px rgba(10, 200, 190, .20));
}

.dneye-measure.is-active strong {
  color: #0ac8be;
}

/*
  Positions : le cercle blanc a un rayon de 275 px (centre 500 / 350).
  Les textes gardent ~30 px d'écart avec la ligne et grossissent
  vers l'extérieur (transform-origin), jamais par-dessus le cercle.
*/
.dneye-measure--topography   { right: 665px; top: 40px;    text-align: right; transform-origin: right bottom; }
.dneye-measure--pupillometry { left: 667px;  top: 28px;    text-align: left;  transform-origin: left bottom; }
.dneye-measure--pachymetry   { left: 805px;  top: 318px;   text-align: left;  transform-origin: left center; }
.dneye-measure--opacity      { right: 667px; bottom: 44px; text-align: right; transform-origin: right top; }
.dneye-measure--aberrometry  { right: 805px; top: 290px;   text-align: right; transform-origin: right center; }

.dneye-tableau-button {
  position: absolute;
  right: 30px;
  bottom: 20px;
  z-index: 20;
  width: 52px;
  height: 64px;
  padding: 0;
  border: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform .15s ease;
}

.dneye-tableau-button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dneye-tableau-button:active {
  transform: scale(.92);
}

/* ============================================================
   POPINS (mesures + tableau)
   Placées dans #app : elles suivent la mise à l'échelle.
   ============================================================ */

.dneye-popup {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .3s ease, visibility .3s ease;
}

.dneye-popup.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.dneye-popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 18, 38, .86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.dneye-popup__close {
  position: absolute;
  right: 14px;
  top: 10px;
  z-index: 10;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 42px;
  line-height: 44px;
  cursor: pointer;
  touch-action: manipulation;
}

/* Popin mesures */

.dneye-measure-popup__box {
  position: relative;
  z-index: 2;
  width: 900px;
  max-width: 92%;
  padding: 34px 40px 28px;
  border: 2px solid rgba(10, 200, 190, .65);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(5, 45, 76, .98), rgba(2, 27, 51, .98));
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
  transform: scale(.94);
  transition: transform .3s ease;
}

.dneye-measure-popup.is-open .dneye-measure-popup__box {
  transform: scale(1);
}

.dneye-measure-popup__title {
  margin: 0 60px 22px 0;
  font-family: "TradeGothicNextRegular", sans-serif;
  font-size: 32px;
  line-height: 1;
  color: #0ac8be;
}

.dneye-measure-popup__viewer {
  position: relative;
  height: 470px;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
}

.dneye-measure-popup__image {
  max-width: 700px;
  max-height: 470px;
  width: auto;
  height: auto;
  object-fit: contain;
  -webkit-user-drag: none;
  user-select: none;
}

.dneye-measure-popup__prev,
.dneye-measure-popup__next {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  padding: 0 0 5px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #0ac8be;
  border-radius: 50%;
  background: rgba(0, 30, 55, .8);
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  z-index: 5;
  touch-action: manipulation;
}

.dneye-measure-popup__prev { left: 0; }
.dneye-measure-popup__next { right: 0; }

.dneye-measure-popup__dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

.dneye-measure-popup__dot {
  width: 14px;
  height: 14px;
  padding: 0;
  border: 2px solid #0ac8be;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.dneye-measure-popup__dot.is-active {
  background: #0ac8be;
}

.dneye-measure-popup.has-one-image .dneye-measure-popup__prev,
.dneye-measure-popup.has-one-image .dneye-measure-popup__next,
.dneye-measure-popup.has-one-image .dneye-measure-popup__dots {
  display: none;
}

/* Popin tableau */

.dneye-tableau-popup__content {
  position: relative;
  z-index: 2;
  max-width: 94%;
}

.dneye-tableau-popup__image {
  display: block;
  max-width: 100%;
  max-height: calc(var(--app-h, 834px) - 80px);
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}

.dneye-tableau-popup .dneye-popup__close {
  right: -18px;
  top: -18px;
  width: 46px;
  height: 46px;
  border: 2px solid rgba(255, 255, 255, .7);
  border-radius: 50%;
  background: #002a4b;
  font-size: 34px;
  line-height: 40px;
}

@media (prefers-reduced-motion: reduce) {
  .dneye-node::after { animation: none; }
  .dneye-benefit { opacity: 1; transform: none; transition: none; }
}
