/* ============================================================
   ACG INTRO — Corporate Signature Reveal (Animation 1)
   Overlay institutionnel 5 secondes — Version restaurée
   Performances : transform + opacity uniquement (GPU)
   Isolation totale du layout (position:fixed, contain:strict)
   ============================================================ */

/* ── Overlay principal ──────────────────────────────────────── */
#acg-intro {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #071e25;
  overflow: hidden;
  contain: strict;
}

#acg-intro.acg-intro--leaving {
  opacity: 0;
  transition: opacity 0.85s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

#acg-intro.acg-intro--gone {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

/* ── Fond dégradé ───────────────────────────────────────────── */
.acg-intro-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%,   rgba(0, 126, 137, 0.18) 0%, transparent 70%),
    radial-gradient(ellipse 60% 80% at 100% 100%, rgba(84, 213, 204, 0.06) 0%, transparent 60%),
    linear-gradient(160deg, #071e25 0%, #092d35 45%, #07232c 100%);
  z-index: 0;
}

/* ── Grille de fond subtile ─────────────────────────────────── */
.acg-intro-grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.06;
  background-image:
    linear-gradient(rgba(84, 213, 204, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(84, 213, 204, 0.5) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* ── Ligne lumineuse techno (Phase 1) ───────────────────────── */
.acg-intro-line {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: -10%;
  width: 120%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(84, 213, 204, 0) 15%,
    rgba(84, 213, 204, 0.9) 45%,
    rgba(140, 221, 211, 1) 50%,
    rgba(84, 213, 204, 0.9) 55%,
    rgba(84, 213, 204, 0) 85%,
    transparent 100%
  );
  opacity: 0;
  transform: translateY(-50%) scaleX(0);
  transform-origin: left center;
  animation: acgLineReveal 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.1s forwards;
  pointer-events: none;
}

.acg-intro-line::after {
  content: '';
  position: absolute;
  inset: -3px 0;
  background: inherit;
  filter: blur(6px);
  opacity: 0.5;
}

@keyframes acgLineReveal {
  0%   { opacity: 0; transform: translateY(-50%) scaleX(0); }
  15%  { opacity: 1; }
  60%  { opacity: 1; transform: translateY(-50%) scaleX(1); }
  80%  { opacity: 0.6; }
  100% { opacity: 0; transform: translateY(-50%) scaleX(1.05); }
}

/* ── Contenu centré ─────────────────────────────────────────── */
.acg-intro-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 32px;
  width: 100%;
  max-width: 640px;
}

/* ── Emblème / Logo (Phase 2) ───────────────────────────────── */
.acg-intro-logo-wrap {
  margin-bottom: 32px;
  opacity: 0;
  transform: translateY(24px);
  animation: acgLogoReveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.9s forwards;
}

.acg-intro-logo {
  width: clamp(72px, 12vw, 100px);
  height: clamp(72px, 12vw, 100px);
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 20px rgba(84, 213, 204, 0.35))
          drop-shadow(0 8px 32px rgba(0, 0, 0, 0.5));
}

@keyframes acgLogoReveal {
  0%   { opacity: 0; transform: translateY(24px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ── Nom de l'entreprise (Phase 3) ─────────────────────────── */
.acg-intro-name {
  opacity: 0;
  transform: translateY(16px);
  animation: acgTextReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1.75s forwards;
}

.acg-intro-title {
  font-family: Inter, 'Segoe UI', Arial, sans-serif;
  font-size: clamp(18px, 3.5vw, 28px);
  font-weight: 800;
  letter-spacing: 0.18em;
  color: #ffffff;
  line-height: 1.1;
  text-transform: uppercase;
  margin: 0 0 6px;
}

.acg-intro-subtitle {
  font-family: Inter, 'Segoe UI', Arial, sans-serif;
  font-size: clamp(11px, 1.8vw, 14px);
  font-weight: 500;
  letter-spacing: 0.32em;
  color: #54d5cc;
  text-transform: uppercase;
  margin: 0;
  display: block;
}

/* Séparateur */
.acg-intro-divider {
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #54d5cc, transparent);
  margin: 20px auto;
  opacity: 0;
  animation: acgDividerReveal 0.7s ease-out 2.45s forwards;
}

@keyframes acgDividerReveal {
  0%   { width: 0; opacity: 0; }
  100% { width: 160px; opacity: 0.6; }
}

/* ── Signature institutionnelle (Phase 4) ───────────────────── */
.acg-intro-tagline {
  opacity: 0;
  transform: translateY(12px);
  animation: acgTextReveal 0.75s cubic-bezier(0.16, 1, 0.3, 1) 2.7s forwards;
}

.acg-intro-tagline p {
  font-family: Inter, 'Segoe UI', Arial, sans-serif;
  font-size: clamp(12px, 1.8vw, 15px);
  font-weight: 300;
  letter-spacing: 0.04em;
  color: rgba(195, 215, 216, 0.85);
  line-height: 1.6;
  margin: 0;
  font-style: italic;
}

.acg-intro-tagline span {
  color: #8cddd3;
  font-weight: 500;
  font-style: normal;
}

@keyframes acgTextReveal {
  0%   { opacity: 0; transform: translateY(16px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ── Barre de progression ───────────────────────────────────── */
.acg-intro-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, #007e89, #54d5cc, #8cddd3);
  z-index: 20;
  animation: acgProgressBar 5s linear 0.1s forwards;
  pointer-events: none;
}

@keyframes acgProgressBar {
  0%   { width: 0%; }
  100% { width: 100%; }
}

/* ── Coin décoratif haut-gauche ─────────────────────────────── */
.acg-intro-corner {
  position: absolute;
  top: 32px;
  left: 32px;
  z-index: 5;
  opacity: 0;
  animation: acgFadeIn 0.6s ease 0.3s forwards;
}
.acg-intro-corner span {
  display: block;
  font-family: Inter, Arial, sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: rgba(84, 213, 204, 0.5);
  text-transform: uppercase;
}
.acg-intro-corner-line {
  width: 24px;
  height: 1px;
  background: rgba(84, 213, 204, 0.35);
  margin-top: 6px;
}

/* ── Coin décoratif bas-droite ──────────────────────────────── */
.acg-intro-corner-br {
  position: absolute;
  bottom: 36px;
  right: 32px;
  z-index: 5;
  text-align: right;
  opacity: 0;
  animation: acgFadeIn 0.6s ease 0.4s forwards;
}
.acg-intro-corner-br span {
  display: block;
  font-family: Inter, Arial, sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: rgba(84, 213, 204, 0.4);
  text-transform: uppercase;
}
.acg-intro-corner-line-br {
  width: 24px;
  height: 1px;
  background: rgba(84, 213, 204, 0.3);
  margin: 6px 0 0 auto;
}

@keyframes acgFadeIn {
  to { opacity: 1; }
}

/* ── Bouton Passer ──────────────────────────────────────────── */
#acg-intro-skip {
  position: absolute;
  top: 28px;
  right: 28px;
  z-index: 30;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(84, 213, 204, 0.3);
  color: rgba(195, 215, 216, 0.75);
  font-family: Inter, 'Segoe UI', Arial, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 8px 16px;
  border-radius: 30px;
  cursor: pointer;
  text-transform: uppercase;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  opacity: 0;
  animation: acgFadeIn 0.5s ease 1.2s forwards;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  -webkit-appearance: none;
  appearance: none;
}

#acg-intro-skip:hover,
#acg-intro-skip:focus-visible {
  background: rgba(84, 213, 204, 0.14);
  border-color: rgba(84, 213, 204, 0.7);
  color: #8cddd3;
}

#acg-intro-skip:focus-visible {
  outline: 2px solid #54d5cc;
  outline-offset: 3px;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .acg-intro-content {
    padding: 20px 24px;
    max-width: 100%;
  }
  .acg-intro-corner,
  .acg-intro-corner-br {
    display: none;
  }
  #acg-intro-skip {
    top: 20px;
    right: 16px;
    padding: 7px 13px;
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  .acg-intro-title {
    letter-spacing: 0.12em;
  }
  .acg-intro-subtitle {
    letter-spacing: 0.2em;
  }
  .acg-intro-logo-wrap {
    margin-bottom: 24px;
  }
}

/* ── prefers-reduced-motion ─────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  #acg-intro *,
  .acg-intro-line,
  .acg-intro-logo-wrap,
  .acg-intro-name,
  .acg-intro-divider,
  .acg-intro-tagline,
  .acg-intro-progress,
  .acg-intro-corner,
  .acg-intro-corner-br,
  #acg-intro-skip {
    animation: none !important;
    transition-duration: 0.01ms !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .acg-intro-divider { width: 160px; }
}
