/* =============================================================================
   ELYSIUM DESIGN SYSTEM — PATTERNS
   Sections complètes de page pour un site vitrine d'agence.
   Dépend de tokens.css + base.css + components.css.
   ============================================================================= */

/* ============================================================================
   HERO — la section signature, qui rejoue le logo à l'échelle de l'écran
   ============================================================================ */

.ely-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: min(88vh, 900px);
  padding-block: var(--ely-space-24);
  overflow: hidden;
  text-align: center;
}

/* Le halo central du logo, agrandi */
.ely-hero__glow {
  position: absolute;
  top: 42%;
  left: 50%;
  width: min(1400px, 130vw);
  aspect-ratio: 16 / 9;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: -2;
  background: radial-gradient(
    ellipse 50% 45% at 50% 50%,
    rgba(29, 111, 224, 0.34) 0%,
    rgba(56, 198, 255, 0.14) 32%,
    rgba(13, 60, 130, 0.06) 55%,
    transparent 72%
  );
}

.ely-hero__content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--ely-space-6);
  max-width: 900px;
  margin-inline: auto;
}

/* Le wordmark script — l'élément le plus proche du logo source */
.ely-hero__wordmark {
  font-family: var(--ely-font-display);
  font-size: var(--ely-text-5xl);
  font-weight: var(--ely-weight-regular);
  line-height: 1.25;
  color: var(--ely-cyan-50);
  text-shadow: var(--ely-glow-text-lg);
}

.ely-hero__title {
  font-size: var(--ely-text-4xl);
  font-weight: var(--ely-weight-bold);
  letter-spacing: var(--ely-tracking-tighter);
  line-height: var(--ely-leading-tight);
  max-width: 16ch;
}

.ely-hero__subtitle {
  font-size: var(--ely-text-lg);
  line-height: var(--ely-leading-relaxed);
  color: var(--ely-text-secondary);
  max-width: 56ch;
}

.ely-hero__actions {
  display: flex;
  gap: var(--ely-space-4);
  flex-wrap: wrap;
  justify-content: center;
  margin-top: var(--ely-space-4);
}

/* Le trait lumineux qui traverse, comme dans le logo */
.ely-hero__swoosh {
  position: absolute;
  bottom: 14%;
  left: 50%;
  width: min(1100px, 92vw);
  height: 2px;
  transform: translateX(-50%);
  z-index: -1;
  background: var(--ely-gradient-swoosh);
  filter: drop-shadow(0 0 10px rgba(56, 198, 255, 0.85));
  /* Courbure douce, comme le trait calligraphique */
  border-radius: 50%;
}

.ely-hero__scroll {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: var(--ely-space-2);
  margin-top: var(--ely-space-12);
  font-size: var(--ely-text-xs);
  letter-spacing: var(--ely-tracking-widest);
  text-transform: uppercase;
  color: var(--ely-text-muted);
}
.ely-hero__scroll::after {
  content: "";
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--ely-cyan-400), transparent);
  animation: ely-scroll-hint 2.2s var(--ely-ease-in-out) infinite;
}
@keyframes ely-scroll-hint {
  0%, 100% { opacity: 0.3; transform: scaleY(0.7); transform-origin: top; }
  50%      { opacity: 1;   transform: scaleY(1);   transform-origin: top; }
}

/* Variante alignée à gauche, avec un visuel à droite */
.ely-hero--split { text-align: left; }
.ely-hero--split .ely-hero__content {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: var(--ely-space-16);
  max-width: 100%;
  text-align: left;
}
.ely-hero--split .ely-hero__actions { justify-content: flex-start; }
.ely-hero--split .ely-hero__title,
.ely-hero--split .ely-hero__subtitle { max-width: none; }

@media (max-width: 900px) {
  .ely-hero--split .ely-hero__content { grid-template-columns: 1fr; gap: var(--ely-space-10); }
}

/* ============================================================================
   EN-TÊTE DE SECTION
   ============================================================================ */

.ely-section-head {
  display: flex;
  flex-direction: column;
  gap: var(--ely-space-4);
  max-width: 640px;
  margin-bottom: var(--ely-space-16);
}
.ely-section-head--center { align-items: center; text-align: center; margin-inline: auto; }
.ely-section-head--center .ely-lead { text-align: center; }

.ely-section-head__title {
  font-size: var(--ely-text-3xl);
  font-weight: var(--ely-weight-bold);
  letter-spacing: var(--ely-tracking-tighter);
}

/* Numéro de section fantôme, en très gros derrière le titre */
.ely-section__index {
  position: absolute;
  top: var(--ely-space-8);
  right: var(--ely-gutter);
  font-family: var(--ely-font-heading);
  font-size: clamp(5rem, 14vw, 12rem);
  font-weight: var(--ely-weight-extrabold);
  line-height: 1;
  letter-spacing: var(--ely-tracking-tighter);
  color: rgba(122, 220, 255, 0.035);
  pointer-events: none;
  user-select: none;
  z-index: -1;
}

/* ============================================================================
   SERVICES — grille de prestations
   ============================================================================ */

.ely-services { display: grid; gap: var(--ely-space-6); grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }

.ely-service {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--ely-space-4);
  padding: var(--ely-space-8);
  border: var(--ely-border-width) solid var(--ely-border);
  border-radius: var(--ely-radius-lg);
  background: var(--ely-gradient-surface), var(--ely-surface-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
  transition: transform var(--ely-duration-normal) var(--ely-ease-out),
              border-color var(--ely-duration-normal) var(--ely-ease-out),
              box-shadow var(--ely-duration-normal) var(--ely-ease-out);
}

/* Lueur qui monte du bas au survol */
.ely-service::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 60%;
  background: radial-gradient(ellipse 70% 100% at 50% 100%, rgba(56,198,255,0.14), transparent 70%);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ely-duration-slow) var(--ely-ease-out);
}
.ely-service:hover {
  transform: translateY(-5px);
  border-color: var(--ely-border-strong);
  box-shadow: var(--ely-shadow-lg);
}
.ely-service:hover::after { opacity: 1; }

.ely-service__number {
  font-family: var(--ely-font-mono);
  font-size: var(--ely-text-xs);
  letter-spacing: var(--ely-tracking-wider);
  color: var(--ely-cyan-400);
}
.ely-service__title { font-size: var(--ely-text-xl); font-weight: var(--ely-weight-semibold); }
.ely-service__body  { color: var(--ely-text-secondary); line-height: var(--ely-leading-relaxed); flex: 1; }

.ely-service__list { display: flex; flex-direction: column; gap: var(--ely-space-2); list-style: none; padding: 0; margin: 0; }
.ely-service__list li {
  display: flex;
  align-items: flex-start;
  gap: var(--ely-space-2);
  font-size: var(--ely-text-sm);
  color: var(--ely-text-muted);
}
.ely-service__list li::before {
  content: "";
  flex-shrink: 0;
  width: 5px; height: 5px;
  margin-top: 0.55em;
  border-radius: 50%;
  background: var(--ely-cyan-400);
  box-shadow: 0 0 6px var(--ely-cyan-400);
}

/* ============================================================================
   PORTFOLIO — grille de cas clients
   ============================================================================ */

.ely-portfolio {
  display: grid;
  gap: var(--ely-space-6);
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
}

/* Première réalisation en pleine largeur (le projet phare) */
.ely-portfolio--featured > :first-child { grid-column: 1 / -1; }
.ely-portfolio--featured > :first-child .ely-work__media { aspect-ratio: 21 / 9; }

.ely-work {
  position: relative;
  display: block;
  border: var(--ely-border-width) solid var(--ely-border);
  border-radius: var(--ely-radius-lg);
  overflow: hidden;
  text-decoration: none;
  background: var(--ely-surface);
  transition: transform var(--ely-duration-normal) var(--ely-ease-out),
              border-color var(--ely-duration-normal) var(--ely-ease-out),
              box-shadow var(--ely-duration-normal) var(--ely-ease-out);
}
.ely-work:hover,
.ely-work:focus-visible {
  transform: translateY(-5px);
  border-color: var(--ely-border-accent);
  box-shadow: var(--ely-shadow-lg), var(--ely-glow-sm);
}

.ely-work__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(140deg, var(--ely-navy-600), var(--ely-navy-850));
}
.ely-work__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--ely-duration-slower) var(--ely-ease-out);
}
.ely-work:hover .ely-work__media img { transform: scale(1.06); }

.ely-work__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: var(--ely-space-2);
  padding: var(--ely-space-6);
  background: linear-gradient(to top, rgba(3,9,22,0.94) 0%, rgba(3,9,22,0.35) 45%, transparent 75%);
}

.ely-work__tags { display: flex; flex-wrap: wrap; gap: var(--ely-space-2); margin-bottom: var(--ely-space-1); }

.ely-work__title {
  font-family: var(--ely-font-heading);
  font-size: var(--ely-text-xl);
  font-weight: var(--ely-weight-semibold);
  color: var(--ely-white);
  text-shadow: 0 2px 12px rgba(1,5,13,0.9);
}
.ely-work__client {
  font-size: var(--ely-text-sm);
  color: var(--ely-cyan-200);
  letter-spacing: var(--ely-tracking-wide);
}

.ely-work__arrow {
  position: absolute;
  top: var(--ely-space-5);
  right: var(--ely-space-5);
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: var(--ely-border-width) solid var(--ely-border-strong);
  background: rgba(3, 9, 22, 0.7);
  backdrop-filter: blur(8px);
  color: var(--ely-cyan-200);
  opacity: 0;
  transform: translate(-6px, 6px);
  transition: opacity var(--ely-duration-normal) var(--ely-ease-out),
              transform var(--ely-duration-normal) var(--ely-ease-out);
}
.ely-work:hover .ely-work__arrow { opacity: 1; transform: translate(0, 0); }

/* Barre de filtres au-dessus de la grille */
.ely-filters { display: flex; flex-wrap: wrap; gap: var(--ely-space-2); margin-bottom: var(--ely-space-10); }

/* ============================================================================
   PROCESS — étapes numérotées
   ============================================================================ */

.ely-process {
  display: grid;
  gap: var(--ely-space-8);
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  position: relative;
}

/* Ligne lumineuse reliant les étapes */
.ely-process::before {
  content: "";
  position: absolute;
  top: 26px;
  left: 8%;
  right: 8%;
  height: 1px;
  background: var(--ely-gradient-swoosh);
  opacity: 0.45;
  z-index: 0;
}
@media (max-width: 780px) { .ely-process::before { display: none; } }

.ely-step { position: relative; z-index: 1; display: flex; flex-direction: column; gap: var(--ely-space-4); }

.ely-step__marker {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border: var(--ely-border-width) solid var(--ely-border-accent);
  border-radius: 50%;
  background: var(--ely-navy-900);
  font-family: var(--ely-font-heading);
  font-size: var(--ely-text-lg);
  font-weight: var(--ely-weight-bold);
  color: var(--ely-cyan-300);
  box-shadow: var(--ely-glow-sm), inset 0 0 20px rgba(56,198,255,0.12);
}

.ely-step__title { font-size: var(--ely-text-lg); font-weight: var(--ely-weight-semibold); }
.ely-step__body  { color: var(--ely-text-secondary); font-size: var(--ely-text-base); line-height: var(--ely-leading-relaxed); }

/* ============================================================================
   STATS — bandeau de chiffres clés
   ============================================================================ */

.ely-stats {
  display: grid;
  gap: var(--ely-space-8);
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  padding: var(--ely-space-12) var(--ely-space-8);
  border: var(--ely-border-width) solid var(--ely-border);
  border-radius: var(--ely-radius-xl);
  background: var(--ely-gradient-surface), var(--ely-surface-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.ely-stats::before {
  content: "";
  position: absolute;
  top: 0; left: 15%; right: 15%;
  height: 1px;
  background: var(--ely-gradient-swoosh);
}

/* 4 → 2×2 → 1. En auto-fit pur, quatre chiffres passent par un 3+1 qui laisse
   une valeur orpheline en largeur intermédiaire. */
@media (max-width: 900px) { .ely-stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .ely-stats { grid-template-columns: 1fr; } }

/* ============================================================================
   LOGOS CLIENTS — bandeau de confiance
   ============================================================================ */

.ely-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--ely-space-12);
}
.ely-logos__item {
  font-family: var(--ely-font-heading);
  font-size: var(--ely-text-lg);
  font-weight: var(--ely-weight-semibold);
  letter-spacing: var(--ely-tracking-wide);
  color: var(--ely-ice-500);
  opacity: 0.75;
  filter: grayscale(1);
  transition: var(--ely-transition);
}
.ely-logos__item:hover { opacity: 1; color: var(--ely-cyan-200); filter: none; }

/* ============================================================================
   TÉMOIGNAGES
   ============================================================================ */

.ely-testimonials {
  display: grid;
  gap: var(--ely-space-6);
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
}

/* ============================================================================
   TARIFS
   ============================================================================ */

.ely-pricing {
  display: grid;
  gap: var(--ely-space-6);
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  align-items: start;
}

.ely-price {
  display: flex;
  align-items: baseline;
  gap: var(--ely-space-2);
  margin-block: var(--ely-space-2) var(--ely-space-4);
}
.ely-price__amount {
  font-family: var(--ely-font-heading);
  font-size: var(--ely-text-3xl);
  font-weight: var(--ely-weight-bold);
  letter-spacing: var(--ely-tracking-tighter);
  color: var(--ely-white);
}
.ely-price__period { font-size: var(--ely-text-sm); color: var(--ely-text-muted); }

.ely-feature-list { display: flex; flex-direction: column; gap: var(--ely-space-3); list-style: none; padding: 0; margin: 0; }
.ely-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--ely-space-3);
  font-size: var(--ely-text-base);
  color: var(--ely-text-secondary);
}
.ely-feature-list li::before {
  content: "";
  flex-shrink: 0;
  width: 18px; height: 18px;
  margin-top: 0.2em;
  border-radius: 50%;
  background: var(--ely-accent-soft);
  border: 1px solid var(--ely-border-accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237ADCFF' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 11px;
}
.ely-feature-list li[data-excluded]::before {
  background-image: none;
  border-color: var(--ely-border);
  background-color: transparent;
}
.ely-feature-list li[data-excluded] { color: var(--ely-ice-500); }

/* ============================================================================
   CTA — bandeau d'appel à l'action
   ============================================================================ */

.ely-cta {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--ely-space-6);
  padding: clamp(3rem, 7vw, 6rem) var(--ely-space-8);
  border: var(--ely-border-width) solid var(--ely-border-accent);
  border-radius: var(--ely-radius-2xl);
  background: var(--ely-surface-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  text-align: center;
  overflow: hidden;
  box-shadow: var(--ely-glow-sm);
}
.ely-cta::before {
  content: "";
  position: absolute;
  inset: -50% 0 auto 0;
  height: 200%;
  z-index: -1;
  background: radial-gradient(ellipse 45% 40% at 50% 55%, rgba(29,111,224,0.30), transparent 70%);
}
.ely-cta__title {
  font-size: var(--ely-text-3xl);
  font-weight: var(--ely-weight-bold);
  letter-spacing: var(--ely-tracking-tighter);
  max-width: 20ch;
}
.ely-cta__subtitle { color: var(--ely-text-secondary); max-width: 52ch; font-size: var(--ely-text-lg); }

/* ============================================================================
   CONTACT
   ============================================================================ */

.ely-contact {
  display: grid;
  gap: var(--ely-space-16);
  grid-template-columns: 1fr 1.2fr;
  align-items: start;
}

/* Variante FAQ : colonne de droite plus large pour absorber l'accordéon.
   Passe par une classe et non un style inline — un inline écraserait la
   media query ci-dessous et la mise en page ne se replierait jamais. */
.ely-contact--faq { grid-template-columns: 1fr 1.4fr; }

@media (max-width: 900px) {
  .ely-contact,
  .ely-contact--faq {
    grid-template-columns: 1fr;
    gap: var(--ely-space-10);
  }
}

.ely-contact__form { display: flex; flex-direction: column; gap: var(--ely-space-5); }
.ely-contact__row  { display: grid; gap: var(--ely-space-5); grid-template-columns: 1fr 1fr; }
@media (max-width: 600px) { .ely-contact__row { grid-template-columns: 1fr; } }

.ely-contact__info { display: flex; flex-direction: column; gap: var(--ely-space-8); }
.ely-contact__item { display: flex; flex-direction: column; gap: var(--ely-space-1); }
.ely-contact__label {
  font-size: var(--ely-text-xs);
  letter-spacing: var(--ely-tracking-widest);
  text-transform: uppercase;
  color: var(--ely-text-muted);
}
.ely-contact__value { font-size: var(--ely-text-lg); color: var(--ely-text); }
