/* ==========================================================================
   Écrans 1 → 4 (« story ») — Zéro condensation, Accès 24h/24,
   Vous faciliter la vie, Propre et sain
   Chaque écran : fond photo (--story-image) + voile de lisibilité + repli.
   ========================================================================== */

.story {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 680px;
  padding-block: 88px;
}

.story__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    var(--story-veil),
    var(--story-image) var(--story-position, right center) / cover no-repeat,
    var(--story-fallback);
}

.story__inner { position: relative; }
.story__content { position: relative; z-index: 1; max-width: 640px; }

/* Indicateur « 1 / 4 » + barre de progression */
.story__step {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 1.0625rem;
  font-weight: var(--fw-semibold);
  letter-spacing: .08em;
  color: var(--c-red);
}
.story__progress {
  width: 92px;
  height: 3px;
  border-radius: 2px;
  background:
    linear-gradient(var(--c-red), var(--c-red)) 0 0 / calc(var(--progress, 0) * 100%) 100% no-repeat,
    #cfd4db;
}

.story__title {
  margin-top: 24px;
  font-size: clamp(3rem, 4.3vw, 4.5rem);
  font-weight: var(--fw-bold);
  line-height: 1.02;
  letter-spacing: -.035em;
  color: var(--c-navy);
}

.story__lead {
  max-width: 560px;
  margin-top: 22px;
  font-size: clamp(1.25rem, 1.5vw, 1.5rem);
  font-weight: var(--fw-light);
  line-height: 1.35;
  color: var(--c-navy);
}
.story__content--center .story__lead { max-width: none; }
.story__lead strong { font-weight: var(--fw-semibold); }

/* CTA « Devis gratuit » */
.btn--cta {
  margin-top: 36px;
  min-height: 58px;
  padding-inline: 34px;
  font-size: 1.125rem;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.btn--cta svg { width: 22px; height: 22px; }

/* Petites tuiles (écrans 1 et 4) ----------------------------------------- */
.tiles {
  display: flex;
  gap: 12px;
  margin-top: 34px;
}
.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 168px;
  padding: 22px 12px 20px;
  background: var(--c-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  text-align: center;
}
.tile svg { width: 48px; height: 48px; color: var(--c-red); }
.tile__label {
  font-size: .9375rem;
  font-weight: var(--fw-medium);
  line-height: 1.3;
  color: var(--c-navy);
}
.tile__label small {
  display: block;
  font-size: inherit;
  font-weight: var(--fw-light);
  color: var(--c-muted);
}

/* Liste à pastilles rouges (écran 2) -------------------------------------- */
.checklist {
  display: grid;
  gap: 18px;
  margin-top: 30px;
}
.checklist li {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 1.0625rem;
  font-weight: var(--fw-light);
  line-height: 1.35;
  color: var(--c-navy);
}
.checklist strong { display: block; font-weight: var(--fw-semibold); }
.checklist__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--c-red);
  color: var(--c-white);
  box-shadow: 0 6px 16px rgba(227, 16, 27, .25);
}
.checklist__icon svg { width: 26px; height: 26px; }

/* Grandes cartes (écran 3) ------------------------------------------------ */
.story__content--center {
  max-width: none;
  margin-top: 16px;
  text-align: center;
}
.story__content--center .story__title { margin-top: 0; }

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 40px;
  text-align: center;
}
.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 22px 28px;
  background: rgba(255, 255, 255, .94);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.card__icon { width: 96px; height: 96px; color: var(--c-navy); }
.card__title {
  margin-top: 18px;
  font-size: var(--fs-card);
  font-weight: var(--fw-semibold);
  line-height: 1.2;
  color: var(--c-navy);
}
.card__text {
  margin-top: 10px;
  font-size: var(--fs-small);
  font-weight: var(--fw-light);
  line-height: 1.4;
  color: var(--c-muted);
}

/* Annotations manuscrites ------------------------------------------------- */
.note {
  position: absolute;
  font-family: var(--ff-hand);
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.1;
  text-align: center;
  color: var(--c-navy);
  transform: rotate(-7deg);
  pointer-events: none;
}
.note__arrow { width: 56px; height: 56px; margin: 8px auto 0; }

/* Flèche de base : part du haut-droite et pointe en bas à gauche */
.note--condensation { top: -40px; right: 4%; color: var(--c-white); text-shadow: 0 1px 3px rgba(20,32,46,.55), 0 0 18px rgba(20,32,46,.45); }
.note--condensation .note__arrow { filter: drop-shadow(0 1px 3px rgba(20,32,46,.55)); }

/* Écran 2 : les deux flèches visent le lecteur de badge */
.note--day   { top: -20px; left: 41%; }
.note--day .note__arrow { transform: scaleX(-1) rotate(-15deg); }
.note--night { bottom: 10px; right: 3%; color: var(--c-white); }
.note--night .note__arrow { margin: 0 0 0 -24px; transform: rotate(85deg); }

.note--sain  { top: -10px; left: 40%; }
.note--sain .note__arrow { transform: scaleX(-1); }

/* ==========================================================================
   Fonds par écran
   Déposer les photos dans assets/img/ sous ces noms. Tant qu'elles manquent,
   le dégradé de repli (--story-fallback) s'affiche.
   ========================================================================== */

.story--condensation .story__bg {
  --story-image: url("../assets/img/ecran-1-condensation.jpg");
  --story-veil: linear-gradient(90deg, #fff 0%, rgba(255,255,255,.92) 30%, rgba(255,255,255,0) 58%);
  --story-fallback: radial-gradient(ellipse 55% 80% at 80% 60%, #e7cfa9 0%, #f3e6d3 50%, #fbf7f1 85%);
}

.story--acces .story__bg {
  --story-image: url("../assets/img/ecran-2-acces.jpg");
  --story-veil: linear-gradient(90deg, #fff 0%, rgba(255,255,255,.92) 32%, rgba(255,255,255,0) 55%);
  --story-fallback: linear-gradient(100deg, #fff 0 40%, #d7e9f8 52%, #8cbbe6 72%, #16244a 72.2%, #0b1630 100%);
}

.story--services .story__bg {
  --story-image: url("../assets/img/ecran-3-services.jpg");
  --story-position: center;
  --story-veil: linear-gradient(rgba(255,255,255,.78), rgba(255,255,255,.78));
  --story-fallback: linear-gradient(160deg, #f6f7f9 0%, #eef1f4 100%);
}

.story--sain .story__bg {
  --story-image: url("../assets/img/ecran-4-sain.jpg");
  --story-veil: linear-gradient(90deg, #fff 0%, rgba(255,255,255,.92) 32%, rgba(255,255,255,0) 58%);
  --story-fallback: radial-gradient(ellipse 50% 80% at 78% 50%, #e4ece0 0%, #f1f4f0 55%, #fafbfa 90%);
}

/* Tuiles cliquables (écran 1) : pastille « + » et popup d'explication */
.tile--info {
  position: relative;
  border: 0;
  font: inherit;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}
.tile--info:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.tile__plus {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--c-red);
  color: var(--c-white);
  font-size: 1rem;
  font-weight: var(--fw-semibold);
  line-height: 1;
  transition: transform var(--transition);
}
.tile--info:hover .tile__plus { transform: rotate(90deg); }
.tiles > li { display: flex; }
