/* ============================================================
   PREMIUM — Couche d'amélioration visuelle (chargée en dernier)
   Animations de fond, micro-interactions, finitions
   ============================================================ */

/* ─── Barre de progression de scroll ──────────────────── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: calc(var(--z-nav) + 1);
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary));
  box-shadow: 0 0 12px rgba(var(--brand-primary-rgb), 0.5);
  transition: width 120ms linear;
  pointer-events: none;
}

/* ─── Nav : verre dépoli premium + soulignés animés ───── */
.nav.is-scrolled {
  box-shadow: 0 6px 30px rgba(10, 30, 60, 0.07);
}

.nav__link {
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--gradient-brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 300ms var(--ease-out);
}

.nav__link:hover::after {
  transform: scaleX(1);
}

/* ─── Boutons : reflet animé + pression ───────────────── */
.btn--primary,
.btn--phone {
  position: relative;
  overflow: hidden;
}

.btn--primary::after,
.btn--phone::after {
  content: '';
  position: absolute;
  top: 0;
  left: -130%;
  width: 60%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.38), transparent);
  transform: skewX(-18deg);
  transition: left 650ms var(--ease-out);
  pointer-events: none;
}

.btn--primary:hover::after,
.btn--phone:hover::after {
  left: 140%;
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

/* ─── Hero : titre avec reflet mobile + glows qui dérivent ─ */
.hero__title .gradient-text {
  background: linear-gradient(100deg, var(--brand-secondary) 0%, var(--brand-primary) 50%, var(--brand-secondary) 100%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textShimmer 7s linear infinite;
}

@keyframes textShimmer {
  to { background-position: 220% center; }
}

.section-hero::before {
  animation: heroDrift1 16s ease-in-out infinite alternate;
}

.section-hero::after {
  animation: heroDrift2 20s ease-in-out infinite alternate;
}

@keyframes heroDrift1 {
  from { transform: translate(0, 0); }
  to   { transform: translate(60px, 40px); }
}

@keyframes heroDrift2 {
  from { transform: translate(0, 0); }
  to   { transform: translate(-50px, -30px); }
}

/* ─── Sections sombres : aurora animée (fond uniquement) ─ */
.section--dark {
  background:
    radial-gradient(110% 120% at 82% 0%, rgba(var(--brand-primary-rgb), 0.20) 0%, transparent 48%),
    radial-gradient(90% 120% at 0% 100%, rgba(var(--brand-secondary-rgb), 0.22) 0%, transparent 50%),
    linear-gradient(135deg, #242A4F 0%, #161B38 50%, #090D23 100%);
  background-size: 200% 200%, 200% 200%, 100% 100%;
  animation: darkAurora 22s ease-in-out infinite alternate;
}

.section-contact {
  background:
    radial-gradient(100% 120% at 85% 10%, rgba(var(--brand-primary-rgb), 0.22) 0%, transparent 45%),
    radial-gradient(90% 120% at 10% 100%, rgba(var(--brand-secondary-rgb), 0.20) 0%, transparent 48%),
    linear-gradient(135deg, #242A4F 0%, #161B38 50%, #090D23 100%);
  background-size: 200% 200%, 200% 200%, 100% 100%;
  animation: darkAurora 26s ease-in-out infinite alternate;
}

@keyframes darkAurora {
  from { background-position: 0% 0%, 100% 100%, 0 0; }
  to   { background-position: 100% 60%, 0% 40%, 0 0; }
}

/* ─── Boutons flottants : anneau d'attention discret ──── */
.whatsapp-float::after,
.call-float::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  animation: floatRing 2.6s ease-out infinite;
  pointer-events: none;
}

.whatsapp-float::after { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
.call-float::after { box-shadow: 0 0 0 0 rgba(var(--brand-primary-rgb), 0.5); }

@keyframes floatRing {
  0%   { box-shadow: 0 0 0 0 currentColor; opacity: 0.45; }
  70%  { box-shadow: 0 0 0 14px currentColor; opacity: 0; }
  100% { opacity: 0; }
}

.whatsapp-float { color: #25D366; }
.call-float { color: var(--brand-primary); }
.whatsapp-float svg { color: #fff; }
.call-float svg { color: #fff; }

/* ─── Reveal : easing premium + léger flou levé ───────── */
.anim-fade-up,
.anim-scale-in,
.anim-slide-left,
.anim-slide-right {
  will-change: opacity, transform;
}

/* ─── Cartes services : liseré dégradé au survol ──────── */
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(var(--brand-primary-rgb), 0.5), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}

.card:hover::before {
  opacity: 1;
}

/* ─── Chips À propos : survol ─────────────────────────── */
.about__chip {
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.about__chip:hover {
  background: rgba(var(--brand-primary-rgb), 0.16);
  transform: translateY(-2px);
}

/* ─── Scrollbar premium (desktop) ─────────────────────── */
@media (pointer: fine) {
  * { scrollbar-width: thin; scrollbar-color: rgba(var(--brand-primary-rgb), 0.4) transparent; }
  *::-webkit-scrollbar { width: 10px; height: 10px; }
  *::-webkit-scrollbar-thumb {
    background: rgba(var(--brand-primary-rgb), 0.35);
    border-radius: 10px;
    border: 2px solid var(--bg-body);
  }
  *::-webkit-scrollbar-thumb:hover { background: rgba(var(--brand-primary-rgb), 0.6); }
}

/* ─── Respect du reduced-motion ───────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .section--dark, .section-contact,
  .hero__title .gradient-text,
  .section-hero::before, .section-hero::after,
  .whatsapp-float::after, .call-float::after {
    animation: none !important;
  }
}

/* ============================================================
   RESTYLE PREMIUM — inspiré instarocket-ai.com
   (fond beige chaud, hero navy, pastilles, ombres douces)
   ============================================================ */

/* ─── NAV : barre claire toujours visible ─────────────── */
.nav {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid var(--border-subtle);
}
.nav.is-scrolled {
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 6px 30px rgba(36, 42, 79, 0.08);
}

/* ─── HERO sombre : contenu clair ─────────────────────── */
.section-hero { color: rgba(255, 255, 255, 0.82); }
.section-hero .hero__title { color: #FFFFFF; }
.section-hero .hero__subtitle { color: rgba(255, 255, 255, 0.78); }
.section-hero .hero__subtitle strong { color: #FFFFFF; }

.section-hero::before {
  background: radial-gradient(circle, rgba(var(--brand-primary-rgb), 0.34) 0%, transparent 66%);
}
.section-hero::after {
  background: radial-gradient(circle, rgba(var(--accent-warm-rgb), 0.18) 0%, transparent 70%);
}

.section-hero .hero__badge .badge--primary {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Hero trust → pastilles verre */
.hero__trust-item {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-full);
  padding: 9px 18px;
  color: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.hero__trust-item svg { color: var(--accent-warm); }
.hero__trust-item strong { color: #FFFFFF; }

/* Mot accentué du titre : bleu clair → crème (lisible sur navy) */
.hero__title .gradient-text {
  background: linear-gradient(100deg, #7FA8F5 0%, #BBD4FF 42%, var(--accent-warm) 100%);
  background-size: 210% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textShimmer 8s linear infinite;
}

/* Bouton outline sur hero sombre */
.section-hero .btn--outline {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.35);
}
.section-hero .btn--outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #FFFFFF;
  color: #FFFFFF;
}

/* ─── CTA principal : glow pulsé permanent ────────────── */
.btn--glow { animation: ctaPulse 2.4s ease-in-out infinite; }
.btn--glow:hover { animation: none; }
@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 6px 18px rgba(var(--brand-primary-rgb), 0.30); transform: translateY(0); }
  50%      { box-shadow: 0 12px 34px rgba(var(--brand-primary-rgb), 0.52); transform: translateY(-2px); }
}

/* ─── FORMES 3D EN VERRE (hero + contact) ─────────────── */
.glass-shape {
  position: absolute;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  pointer-events: none;
  z-index: 0;
  border-radius: 22px;
}
.glass-shape--1 { width: 130px; height: 130px; top: 16%; right: 7%;  animation: spinSlow 30s linear infinite; }
.glass-shape--2 { width: 84px;  height: 84px;  bottom: 20%; right: 24%; border-radius: 50%; animation: spinSlow 22s linear infinite reverse; }
.glass-shape--3 { width: 70px;  height: 70px;  top: 32%; right: 34%; border-radius: 0; clip-path: polygon(50% 0, 100% 100%, 0 100%); animation: spinSlow 38s linear infinite; }
@keyframes spinSlow { to { transform: rotate(360deg); } }

/* ─── FAQ : état ouvert nettement distinct ────────────── */
.faq-item {
  background: var(--bg-card);
  border: 1px solid transparent;
  box-shadow: var(--shadow-sm);
}
.faq-item[open] {
  background: #FFFFFF;
  border-color: rgba(var(--brand-primary-rgb), 0.30);
  box-shadow: var(--shadow-md);
}
.faq-item[open] .faq-item__question { color: var(--brand-secondary); }
.faq-item[open] .faq-item__answer {
  border-top: 1px solid var(--border-subtle);
  margin-top: 4px;
  padding-top: var(--space-md);
}

/* ─── GALERIE : grille alignée, tailles uniformes ─────── */
#realisations-grid {
  columns: unset !important;
  column-count: initial !important;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}
.realisation { margin: 0 !important; break-inside: auto; }
.realisation__media { aspect-ratio: 4 / 3; }
.realisation__media img { height: 100%; object-fit: cover; }
@media (max-width: 1024px) { #realisations-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { #realisations-grid { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; } }

/* ─── À PROPOS : portrait Stéphane dans un cadre premium ─ */
.about__portrait {
  aspect-ratio: 4 / 5;
  padding: 12px;                                  /* passe-partout du cadre */
  background: linear-gradient(155deg, #FFFFFF 0%, #F3E0D2 100%);
  border: 1px solid rgba(20, 67, 154, 0.10);
  border-radius: 22px;
  box-shadow:
    0 30px 60px -22px rgba(9, 13, 35, 0.32),
    0 4px 12px rgba(9, 13, 35, 0.06);
}
.about__portrait img {
  border-radius: 14px;
  /* fond studio derrière la découpe transparente */
  background: radial-gradient(120% 90% at 50% 12%, #EAF1FC 0%, #D7E2F4 58%, #C5D4ED 100%);
  object-fit: cover;
  object-position: center top;
}

/* ─── Reduced motion : couper les nouvelles anims ─────── */
@media (prefers-reduced-motion: reduce) {
  .btn--glow, .glass-shape, .hero__title .gradient-text { animation: none !important; }
}

/* ─── HERO : showcase photo (remplace le visuel 3D) ───── */
.hero__visual { min-height: auto; }
.hero__showcase {
  position: relative;
  z-index: 1;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 34px 80px -24px rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.12);
  aspect-ratio: 5 / 5.4;
  max-width: 460px;
  margin-left: auto;
}
.hero__showcase img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero__showcase-badge {
  position: absolute;
  left: 18px;
  bottom: 18px;
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.hero__showcase-num { font-family: var(--font-heading); font-weight: 800; font-size: 1.5rem; color: var(--brand-secondary); }
.hero__showcase-txt { font-size: var(--fs-xs); color: var(--text-secondary); margin-top: 3px; }

/* pastilles confiance sur une ligne */
.hero__trust { gap: var(--space-sm) var(--space-md); }

/* formes verre un peu plus présentes */
.glass-shape {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.015));
  border-color: rgba(255, 255, 255, 0.2);
}

/* ─── HERO : compacité (CTA + pastilles sur une ligne) ── */
.hero__grid { grid-template-columns: 1.1fr 0.9fr; gap: var(--space-xl); }
.hero__ctas { gap: var(--space-sm); }
.hero__ctas .btn--lg { padding: 16px 26px; font-size: 1rem; }
.hero__trust-item { padding: 8px 15px; }
@media (max-width: 768px) {
  .hero__grid { grid-template-columns: 1fr; }
}

/* ─── GALERIE : agrandir au survol + lightbox au clic ─── */
.realisation { cursor: zoom-in; }

/* Pastille loupe (indice "agrandir") */
.realisation::before {
  content: '';
  position: absolute;
  top: 12px; right: 12px;
  z-index: 3;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2314439A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h6v6'/%3E%3Cpath d='M9 21H3v-6'/%3E%3Cpath d='M21 3l-7 7'/%3E%3Cpath d='M3 21l7-7'/%3E%3C/svg%3E")
    center / 18px no-repeat;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out);
  pointer-events: none;
}

/* Desktop : agrandissement au survol */
@media (hover: hover) and (pointer: fine) {
  .realisation:hover {
    transform: scale(1.12);
    z-index: 6;
    box-shadow: var(--shadow-lg);
  }
  .realisation:hover::before { opacity: 1; transform: scale(1); }
}
/* Mobile : loupe visible en permanence (tap pour agrandir) */
@media (hover: none) {
  .realisation::before { opacity: 0.92; transform: scale(1); }
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(9, 13, 35, 0.92);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vw;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: scale(0.96);
  transition: transform 0.3s var(--ease-out);
}
.lightbox.is-open .lightbox__content { transform: scale(1); }
.lightbox__img {
  max-width: 92vw;
  max-height: 80vh;
  border-radius: var(--radius-md);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  object-fit: contain;
}
.lightbox__cap {
  color: #fff;
  margin-top: var(--space-md);
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 600;
}
.lightbox__cap span {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--fs-small);
  color: rgba(255, 255, 255, 0.7);
  margin-top: 2px;
}
.lightbox__close {
  position: absolute;
  top: 18px; right: 22px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}
.lightbox__close:hover { background: rgba(255, 255, 255, 0.24); }

/* ============================================================
   DEMANDE CLIENT : fonds STATIQUES & propres
   (suppression des transitions/animations de fond)
   ============================================================ */
.section--dark,
.section-contact {
  background: var(--gradient-dark) !important;
  background-size: auto !important;
  animation: none !important;
}
.section-hero::before,
.section-hero::after { animation: none !important; }
.hero__title .gradient-text {
  animation: none !important;
  background-position: 0 0 !important;
}
.glass-shape { display: none !important; }
