/* =========================================================
   Bridge TechSolutions & Services — feuille de style
   ========================================================= */

/* Police hébergée localement (pas d'appel à Google = conforme RGPD) */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/space-grotesk-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/space-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --blue: #1f3590;
  --blue-2: #2c45a6;
  --blue-soft: #dce3f7;
  --red: #c81e28;
  --red-soft: #ffc9cc;
  --ink: #141b3c;
  --muted: #4a5274;
  --line: #dde2ee;
  --tint: #e4e8f3;
  --tag: #eef1f8;
  --bg-alt: #f5f6fa;
  --white: #ffffff;
  --radius: 4px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 18px 40px -18px rgba(20, 27, 60, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--white);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--blue);
  transition: color 0.2s;
}
a:hover {
  color: var(--red);
}

h1,
h2,
h3,
p {
  margin: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--ink);
  color: var(--white);
  padding: 10px 16px;
  z-index: 100;
  border-radius: var(--radius);
}
.skip-link:focus {
  left: 8px;
}

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 50;
  transition: box-shadow 0.3s var(--ease);
}
.site-header.is-scrolled {
  box-shadow: 0 6px 24px -12px rgba(20, 27, 60, 0.35);
}
.site-header .container {
  padding-top: 12px;
  padding-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  transition: transform 0.5s var(--ease);
}
.brand:hover img {
  transform: rotate(-6deg) scale(1.06);
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.brand-name {
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--red);
  letter-spacing: 0.04em;
}
.brand-sub {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--blue);
  letter-spacing: 0.12em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px 28px;
  font-weight: 500;
}
.main-nav a {
  text-decoration: none;
  color: var(--ink);
  position: relative;
}
.main-nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.main-nav a:not(.btn):hover::after,
.main-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}
.main-nav a[aria-current="page"] {
  color: var(--blue);
}
.main-nav .btn,
.main-nav .btn:hover {
  color: var(--white);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 10px;
  border-radius: var(--radius);
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}
.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 820px) {
  .nav-toggle {
    display: block;
  }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--white);
    padding: 8px 24px 24px;
    box-shadow: 0 16px 24px -16px rgba(20, 27, 60, 0.35);
    clip-path: inset(0 0 100% 0);
    visibility: hidden;
    transition: clip-path 0.4s var(--ease), visibility 0s 0.4s;
  }
  .nav-open .main-nav {
    clip-path: inset(0 0 0 0);
    visibility: visible;
    transition: clip-path 0.4s var(--ease), visibility 0s;
  }
  .main-nav a:not(.btn) {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }
  .main-nav a:not(.btn)::after {
    display: none;
  }
  .main-nav .btn {
    margin-top: 16px;
    justify-content: center;
  }
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font: inherit;
  font-weight: 500;
  padding: 14px 24px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  color: var(--white);
  background: var(--blue);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background 0.25s;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 30%,
    rgba(255, 255, 255, 0.28) 50%,
    transparent 70%
  );
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease);
  z-index: -1;
}
.btn:hover {
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.btn:hover::before {
  transform: translateX(120%);
}
.btn svg {
  transition: transform 0.25s var(--ease);
}
.btn:hover svg {
  transform: translateX(4px);
}
.btn-red {
  background: var(--red);
}
.btn-soft {
  background: var(--blue-2);
}
.btn-dark {
  background: var(--ink);
}
.btn-sm {
  padding: 12px 20px;
}

/* ---------- Typo commune ---------- */
.eyebrow {
  color: var(--red);
  font-weight: 500;
}
.eyebrow-light {
  color: var(--red-soft);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue-2);
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.h-display {
  font-weight: 400;
  font-size: clamp(2.4rem, 4.8vw, 3.6rem);
  line-height: 1.18;
}
.h-section {
  font-weight: 400;
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  line-height: 1.2;
}
.text-muted {
  color: var(--muted);
}
.lead {
  font-size: 1.1rem;
  color: var(--blue-soft);
}

/* ---------- Sections ---------- */
.section-blue {
  background: var(--blue);
  color: var(--white);
}
.section-alt {
  background: var(--bg-alt);
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
}
.hero .container {
  position: relative;
  padding-top: 72px;
  padding-bottom: 88px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 56px;
}
.hero-text {
  flex: 1 1 520px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.hero-media {
  flex: 1 1 360px;
  min-width: 0;
  position: relative;
}
.hero-media .frame {
  aspect-ratio: 4 / 5;
  max-height: 460px;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--blue-2);
  position: relative;
  z-index: 1;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 50%;
}
.hero-media::before {
  content: "";
  position: absolute;
  inset: 22px -18px -18px 22px;
  border: 2px solid var(--red);
  border-radius: var(--radius);
  z-index: 0;
}
.hero-chip {
  position: absolute;
  z-index: 2;
  left: -22px;
  bottom: 36px;
  background: var(--white);
  color: var(--ink);
  padding: 12px 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  font-size: 0.92rem;
}
.hero-chip .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2ebd6b;
  box-shadow: 0 0 0 0 rgba(46, 189, 107, 0.6);
  animation: pulse 2s infinite;
}
@media (max-width: 520px) {
  .hero-chip {
    left: 12px;
  }
  .hero-media::before {
    inset: 14px -8px -10px 14px;
  }
}

/* Décor animé du hero (pont stylisé + cercles) */
.hero-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero-deco .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.55;
}
.hero-deco .orb-1 {
  width: 420px;
  height: 420px;
  right: -140px;
  top: -160px;
  background: radial-gradient(circle, #3653c4 0%, transparent 70%);
  animation: float 14s ease-in-out infinite;
}
.hero-deco .orb-2 {
  width: 320px;
  height: 320px;
  left: -120px;
  bottom: -160px;
  background: radial-gradient(circle, rgba(200, 30, 40, 0.45) 0%, transparent 70%);
  animation: float 18s ease-in-out infinite reverse;
}
.hero-deco .bridge-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 140px;
  opacity: 0.22;
}
.hero-deco .bridge-line path {
  stroke-dasharray: 2400;
  stroke-dashoffset: 2400;
  animation: draw 3.2s var(--ease) 0.4s forwards;
}

.page-hero .container {
  padding-top: 80px;
  padding-bottom: 80px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
  position: relative;
}
.page-hero h1 {
  font-size: clamp(2.4rem, 4.8vw, 3.4rem);
  max-width: 16em;
}
.page-hero .lead {
  max-width: 36em;
}

/* Bandeau des atouts */
.features .container {
  padding-top: 56px;
  padding-bottom: 56px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
}
.feature {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.feature-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fde7e8;
  margin-bottom: 6px;
  transition: transform 0.4s var(--ease), background 0.3s;
}
.feature:hover .feature-icon {
  transform: translateY(-4px) rotate(-8deg);
  background: #fbd4d6;
}
.feature h3 {
  font-weight: 600;
  font-size: 1.2rem;
}

/* Split image / texte */
.split .container {
  padding-top: 96px;
  padding-bottom: 96px;
  display: flex;
  flex-wrap: wrap;
  gap: 56px;
  align-items: center;
}
.split.top .container {
  align-items: flex-start;
}
.split.tight .container {
  padding-top: 72px;
  padding-bottom: 72px;
}
.split-media {
  flex: 1 1 420px;
  min-width: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--tint);
  aspect-ratio: 5 / 4;
}
.split-media.square {
  aspect-ratio: 1 / 1;
  max-height: 420px;
}
.split-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.split-media:hover img {
  transform: scale(1.05);
}
.split-text {
  flex: 1 1 440px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
}
.split-text.gap-sm {
  gap: 12px;
}
.service-icon {
  width: 40px;
  height: 40px;
  background: var(--blue);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}
.split-text h2.h-service {
  font-weight: 400;
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  line-height: 1.2;
}
.check-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.check-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.check-list svg {
  flex: 0 0 auto;
  margin-top: 4px;
}

/* Cartes services */
.services-block .container {
  padding-top: 96px;
  padding-bottom: 96px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}
.section-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  text-align: center;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  align-items: start;
}
.card {
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 14px 14px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 28px 50px -24px rgba(0, 0, 0, 0.55);
}
.card-media {
  aspect-ratio: 16 / 10;
  border-radius: 2px;
  overflow: hidden;
  background: var(--tint);
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease);
}
.card:hover .card-media img {
  transform: scale(1.08);
}
.card-body {
  padding: 0 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.card-body h3 {
  font-weight: 500;
  font-size: 1.4rem;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.82rem;
}
.tags span {
  background: var(--tag);
  padding: 4px 10px;
  border-radius: 3px;
}
.link-more {
  font-weight: 500;
  text-decoration: none;
  color: var(--blue);
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.link-more span {
  transition: transform 0.25s var(--ease);
}
.link-more:hover span {
  transform: translateX(5px);
}

/* Services complémentaires */
.extra .container {
  padding-top: 88px;
  padding-bottom: 88px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.extra-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.extra-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-bottom: 3px solid transparent;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
    border-color 0.35s;
}
.extra-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: var(--red);
}
.extra-card h3 {
  font-weight: 500;
  font-size: 1.2rem;
}

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-q {
  width: 100%;
  min-height: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: none;
  border: none;
  padding: 16px 0;
  font: inherit;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: color 0.2s;
}
.faq-q:hover {
  color: var(--blue);
}
.faq-icon {
  position: relative;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}
.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  background: var(--red);
  transition: transform 0.35s var(--ease);
}
.faq-icon::after {
  transform: rotate(90deg);
}
.faq-q[aria-expanded="true"] .faq-icon::after {
  transform: rotate(0deg);
}
.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--ease);
}
.faq-a > div {
  overflow: hidden;
}
.faq-a p {
  padding: 0 0 18px;
  color: var(--muted);
}
.faq-item.is-open .faq-a {
  grid-template-rows: 1fr;
}

/* Bandeau CTA */
.cta-wrap .container {
  padding-bottom: 96px;
}
.cta-wrap.pad-top .container {
  padding-top: 88px;
  padding-bottom: 88px;
}
.cta {
  background: var(--blue);
  color: var(--white);
  border-radius: var(--radius);
  padding: 72px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.cta::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  border: 60px solid rgba(255, 255, 255, 0.05);
  right: -200px;
  top: -260px;
  z-index: -1;
  animation: spin 40s linear infinite;
}
.cta::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 30, 40, 0.35), transparent 70%);
  left: -100px;
  bottom: -140px;
  z-index: -1;
  animation: float 12s ease-in-out infinite;
}
.cta h2 {
  max-width: 16em;
}

/* Contact */
.contact .container {
  padding-top: 80px;
  padding-bottom: 80px;
  display: flex;
  flex-wrap: wrap;
  gap: 56px;
  align-items: center;
}
.contact-info {
  flex: 1 1 440px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: flex-start;
}
.contact-lines {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-weight: 500;
}
.contact-lines a,
.contact-lines span {
  color: var(--white);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.contact-lines a:hover {
  color: var(--red-soft);
}
.form-card {
  flex: 1 1 420px;
  min-width: 0;
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.5);
}
.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 180px;
  min-width: 0;
}
.field label {
  font-size: 0.9rem;
  font-weight: 500;
}
.field input,
.field textarea {
  font: inherit;
  padding: 12px;
  border: 1px solid #b8c2dc;
  border-radius: 3px;
  width: 100%;
  color: var(--ink);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea {
  resize: vertical;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(31, 53, 144, 0.18);
}
.hp-field {
  position: absolute !important;
  left: -10000px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.consent {
  font-size: 0.82rem;
  color: var(--muted);
}
.form-status {
  font-size: 0.95rem;
  padding: 12px 14px;
  border-radius: 3px;
  display: none;
}
.form-status.ok {
  display: block;
  background: #e7f7ee;
  color: #136c3b;
}
.form-status.err {
  display: block;
  background: #fde7e8;
  color: #9b1820;
}
.btn[disabled] {
  opacity: 0.7;
  cursor: wait;
}

/* Page texte (mentions légales / 404) */
.prose .container {
  padding-top: 64px;
  padding-bottom: 96px;
  max-width: 820px;
}
.prose h2 {
  font-weight: 500;
  font-size: 1.4rem;
  margin: 40px 0 10px;
}
.prose p,
.prose li {
  color: var(--muted);
}
.prose p + p {
  margin-top: 10px;
}

.notfound .container {
  padding-top: 120px;
  padding-bottom: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
}
.notfound .big {
  font-size: clamp(5rem, 14vw, 9rem);
  font-weight: 700;
  line-height: 1;
  color: var(--blue);
}
.notfound .big span {
  color: var(--red);
  display: inline-block;
  animation: wobble 2.6s ease-in-out infinite;
}

/* Footer */
.site-footer {
  background: var(--white);
  border-top: 1px solid var(--tint);
}
.site-footer .container {
  padding-top: 48px;
  padding-bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}
.site-footer img {
  width: 110px;
  height: 110px;
  object-fit: cover;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 32px;
  font-weight: 500;
}
.footer-nav a {
  text-decoration: none;
  color: var(--ink);
}
.footer-nav a:hover {
  color: var(--red);
}
.legal {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Bouton retour en haut */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--red);
  color: var(--white);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(16px) scale(0.9);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s var(--ease);
  z-index: 40;
}
.to-top.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* Barre de progression de lecture */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: var(--red);
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 60;
}

/* =========================================================
   Animations
   ========================================================= */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes float {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-24px, 28px);
  }
}
@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(46, 189, 107, 0.6);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(46, 189, 107, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(46, 189, 107, 0);
  }
}
@keyframes wobble {
  0%,
  100% {
    transform: rotate(0);
  }
  25% {
    transform: rotate(-10deg);
  }
  75% {
    transform: rotate(10deg);
  }
}
@keyframes reveal-img {
  from {
    clip-path: inset(0 0 100% 0);
    transform: scale(1.12);
  }
  to {
    clip-path: inset(0 0 0 0);
    transform: scale(1);
  }
}

/* Entrée du hero au chargement */
.js .hero-in > * {
  opacity: 0;
  animation: rise 0.9s var(--ease) forwards;
}
.js .hero-in > *:nth-child(1) { animation-delay: 0.1s; }
.js .hero-in > *:nth-child(2) { animation-delay: 0.22s; }
.js .hero-in > *:nth-child(3) { animation-delay: 0.34s; }
.js .hero-in > *:nth-child(4) { animation-delay: 0.46s; }
.js .hero-in > *:nth-child(5) { animation-delay: 0.58s; }
.js .hero-media .frame {
  animation: reveal-img 1.3s var(--ease) 0.25s both;
}
.js .hero-media::before {
  opacity: 0;
  animation: rise 1s var(--ease) 0.9s forwards;
}
.js .hero-chip {
  opacity: 0;
  animation: rise 0.8s var(--ease) 1.2s forwards;
}

/* Apparition au défilement (IntersectionObserver) */
.js .reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0s);
}
.js .reveal.reveal-left {
  transform: translateX(-48px);
}
.js .reveal.reveal-right {
  transform: translateX(48px);
}
.js .reveal.reveal-zoom {
  transform: scale(0.92);
}
.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js .reveal,
  .js .hero-in > *,
  .js .hero-chip,
  .js .hero-media::before {
    opacity: 1;
    transform: none;
  }
}
