/* page d'accueil publique (resources/views/welcome.blade.php) : connexion +
   presentation. Se charge APRES style.css, qu'elle ne fait que completer
   (le style de la carte de connexion reste celui de style.css). */

html { scroll-behavior: smooth; }

body.landing {
  display: block;
  padding: 0;
  min-height: 0;
  background: var(--bg);
}

.landing h2.page-title {
  font-size: 1.18rem;
  font-weight: 600;
  text-align: center;
  margin: 0 0 1.3rem;
}

/* ---- hero : fond industriel qui defile + texte + carte de connexion ---- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  overflow: hidden;
  background: #171a1f;
  color: #fff;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  /* voile sombre : garde le texte blanc et la carte lisibles sur des photos */
  background: linear-gradient(90deg, rgba(12, 14, 17, 0.84) 0%, rgba(12, 14, 17, 0.64) 55%, rgba(12, 14, 17, 0.5) 100%);
  pointer-events: none;
}

.bg-slides { position: absolute; inset: 0; }

/* 4 scenes de 7 s qui se fondent l'une dans l'autre (cycle de 28 s). PAS de derive de camera : une mise a l'echelle continue
   d'une photo plein ecran fait « vibrer » les details (sous-pixels) sur les ecrans de mauvaise qualite et coute cher en calcul
   (retour d'Antony, 2026-10-13). Seul l'opacite change, sur des calques promus au compositeur ; l'animation ne demarre qu'une fois
   la page chargee (classe .bg-ready posee par landing.js : pas de saccade pendant le decodage des photos). Avant cela, et sur un
   ecran qui n'arrive pas a suivre (.motion-static), seule la premiere scene est affichee, fixe. */
.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  will-change: opacity;
  backface-visibility: hidden;
}
.slide.s1 { opacity: 1; }
/* la premiere scene demarre DEJA visible (decalage negatif de 2 s dans un cycle de 28 s) : l'animation prend le relais de la photo fixe
   sans la faire disparaitre puis reparaitre ; les autres scenes sont decalees d'autant */
html.bg-ready:not(.motion-static) .slide { animation: slide-fade 28s infinite; }
html.bg-ready:not(.motion-static) .slide.s1 { animation-delay: -2s; }
html.bg-ready:not(.motion-static) .slide.s2 { animation-delay: 5s; }
html.bg-ready:not(.motion-static) .slide.s3 { animation-delay: 12s; }
html.bg-ready:not(.motion-static) .slide.s4 { animation-delay: 19s; }
.slide.s1 { background-image: url("../assets/img/bg/machines-orange.jpg"); }
.slide.s2 { background-image: url("../assets/img/bg/coupe-laser.jpg"); background-position: center 58%; }
.slide.s3 { background-image: url("../assets/img/bg/tuyauterie.jpg"); }
.slide.s4 { background-image: url("../assets/img/bg/engrenages.jpg"); }

@keyframes slide-fade {
  0% { opacity: 0; }
  5% { opacity: 1; }
  25% { opacity: 1; }
  30% { opacity: 0; }
  100% { opacity: 0; }
}
.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  /* haut fixe (calcule sur la hauteur de l'ecran, pas sur le contenu) : quand
     la carte s'agrandit (demande d'acces), le texte de gauche ne bouge pas et
     le fond, qui suit la hauteur du hero, s'etire avec elle */
  padding: clamp(2rem, calc(50vh - 330px), 7rem) 1.75rem 3rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 4rem;
  align-items: start;
}

.hero .form-wrap { max-width: 360px; width: 100%; justify-self: end; }
.hero .card { color: var(--ink); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35); }

.hero-copy {
  position: sticky;
  top: 2rem;
  padding-top: clamp(0.5rem, 5vh, 3.5rem);
}

.hero-copy .badge {
  display: inline-block;
  margin-bottom: 1.1rem;
  padding: 0.32rem 0.8rem;
  border-radius: 999px;
  background: var(--yellow);
  color: #26262a;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0 0 1.1rem;
  text-align: left;
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #fff;
}

.hero-copy .lead {
  margin: 0 0 1.4rem;
  max-width: 34rem;
  font-size: 1.08rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.84);
}

.points {
  list-style: none;
  margin: 0 0 1.8rem;
  padding: 0;
  display: grid;
  gap: 0.55rem;
  font-size: 0.98rem;
  color: rgba(255, 255, 255, 0.92);
}
.points li { position: relative; padding-left: 1.7rem; }
.points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.22rem;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: var(--yellow);
}
.points li::after {
  content: "";
  position: absolute;
  left: 0.36rem;
  top: 0.4rem;
  width: 0.3rem;
  height: 0.55rem;
  border: solid #26262a;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.hero-more {
  display: inline-block;
  padding: 0.7rem 1.3rem;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 10px;
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.hero-more:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; }

/* ---- presentation ---- */

.section {
  max-width: 1040px;
  margin: 0 auto;
  padding: 4.5rem 1.75rem;
}

.section h2,
.cta h2 {
  margin: 0 0 1rem;
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.2;
  font-weight: 700;
  color: var(--ink);
}

.section-lead {
  max-width: 44rem;
  margin: 0 auto 2.6rem;
  text-align: center;
  font-size: 1.05rem;
  line-height: 1.65;
  color: #5b5a54;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
}

.feature {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--yellow);
  border-radius: 14px;
  padding: 1.6rem 1.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.feature svg { width: 28px; height: 28px; color: #26262a; margin-bottom: 0.9rem; }
.feature h3 { margin: 0 0 0.5rem; font-size: 1.08rem; color: var(--ink); }
.feature p { margin: 0; line-height: 1.6; color: #5b5a54; font-size: 0.96rem; }

.band { background: #1f2227; color: #fff; }
.band h2 { color: #fff; }
.band .section-lead { color: rgba(255, 255, 255, 0.78); }

.status {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
}
.status > div {
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}
.status h3 { margin: 0 0 0.9rem; font-size: 1.05rem; color: var(--yellow); }
.status ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.status li { position: relative; padding-left: 1.5rem; line-height: 1.45; color: rgba(255, 255, 255, 0.9); }
.status li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.42rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--yellow);
}
.status .soon li::before { background: transparent; border: 2px solid rgba(245, 196, 0, 0.8); }
.fineprint { margin: 1.4rem 0 0; text-align: center; font-size: 0.86rem; color: rgba(255, 255, 255, 0.6); }

.faq { max-width: 44rem; margin: 2rem auto 0; display: grid; gap: 0.7rem; }
.faq details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 1.2rem;
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
/* fleche a droite, qui se retourne a l'ouverture (remplace le triangle du navigateur,
   colle au bord et different selon les navigateurs) */
.faq summary::after {
  content: "";
  flex-shrink: 0;
  width: 0.55rem;
  height: 0.55rem;
  border: solid #77766f;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.faq summary:focus-visible { outline: 2px solid var(--yellow); outline-offset: 4px; border-radius: 4px; }
.faq details p { margin: 0 0 1.1rem; line-height: 1.65; color: #5b5a54; }

.cta {
  padding: 4rem 1.75rem 5rem;
  text-align: center;
  background: var(--yellow-dim);
}
.cta-btn {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 0.85rem 1.8rem;
  border-radius: 10px;
  background: #26262a;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease;
}
.cta-btn:hover { background: #000; }

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 1.6rem;
  padding: 1.6rem 1.75rem;
  background: #1f2227;
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.6);
}
.site-footer a { color: rgba(255, 255, 255, 0.78); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .credits { flex-basis: 100%; text-align: center; font-size: 0.78rem; color: rgba(255, 255, 255, 0.45); }
.site-footer .credits a { color: rgba(255, 255, 255, 0.6); }

/* ---- ecrans etroits : la carte de connexion passe en premier ---- */

@media (max-width: 900px) {
  .hero { min-height: 0; }
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.2rem;
    padding: 1.5rem 1rem 2.5rem;
  }
  .hero .form-wrap { order: -1; justify-self: center; }
  .hero-copy { position: static; padding-top: 0; }
  .hero-copy h1 { font-size: clamp(1.7rem, 7vw, 2.2rem); }
  .section { padding: 3rem 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slide { animation: none; opacity: 0; }
  .slide.s1 { opacity: 1; transform: none; }
}
