/* Julien Dérout — Landing SEO / UI */
:root {
  --bg-deep: #070a12;
  --bg-card: rgba(18, 24, 42, 0.55);
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8ecf4;
  --text-muted: #8b95a8;
  --accent: #5eead4;
  --accent-dim: rgba(94, 234, 212, 0.15);
  --accent-glow: rgba(94, 234, 212, 0.45);
  --violet: #a78bfa;
  --violet-dim: rgba(167, 139, 250, 0.12);
  --font-display: "Syne", system-ui, sans-serif;
  --font-body: "Instrument Sans", system-ui, sans-serif;
  --radius: 20px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg-deep);
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Ambient background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(94, 234, 212, 0.12), transparent 50%),
    radial-gradient(ellipse 80% 60% at 100% 50%, rgba(167, 139, 250, 0.08), transparent 45%),
    radial-gradient(ellipse 70% 50% at 0% 80%, rgba(56, 189, 248, 0.06), transparent 40%),
    linear-gradient(180deg, #0a0f1a 0%, var(--bg-deep) 40%, #050810 100%);
  pointer-events: none;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.035;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: -1;
  animation: float-orb 18s var(--ease-out) infinite;
}

.orb-1 {
  width: min(55vw, 420px);
  height: min(55vw, 420px);
  top: -10%;
  right: -5%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  opacity: 0.35;
  animation-delay: 0s;
}

.orb-2 {
  width: min(40vw, 320px);
  height: min(40vw, 320px);
  bottom: 15%;
  left: -8%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.5) 0%, transparent 70%);
  opacity: 0.25;
  animation-delay: -6s;
  animation-duration: 22s;
}

.orb-3 {
  width: 200px;
  height: 200px;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(56, 189, 248, 0.25) 0%, transparent 70%);
  opacity: 0.2;
  animation-delay: -12s;
  animation-duration: 16s;
}

@keyframes float-orb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(2%, 3%) scale(1.05); }
  66% { transform: translate(-2%, -2%) scale(0.95); }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem max(1.25rem, env(safe-area-inset-left)) 1rem max(1.25rem, env(safe-area-inset-right));
  padding-top: max(1rem, env(safe-area-inset-top));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(7, 10, 18, 0.72);
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: -0.02em;
  color: var(--bg-deep);
  background: linear-gradient(135deg, var(--accent), #2dd4bf);
  border-radius: 12px;
  box-shadow: 0 0 24px var(--accent-dim);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s;
}

.logo:hover .logo-mark {
  transform: scale(1.05) rotate(-3deg);
  box-shadow: 0 0 32px rgba(94, 234, 212, 0.35);
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 3vw, 1.75rem);
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.25s;
}

.nav a:hover {
  color: var(--text);
}

.nav-cta {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent) !important;
  border: 1px solid rgba(94, 234, 212, 0.25);
}

.nav-cta:hover {
  background: rgba(94, 234, 212, 0.22);
}

/* Hero */
.hero {
  padding: clamp(3rem, 10vw, 6rem) clamp(1.25rem, 4vw, 2.5rem) clamp(4rem, 12vw, 7rem);
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  margin: 0 0 1.25rem;
  letter-spacing: 0.02em;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-glow);
  animation: pulse 2.2s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(94, 234, 212, 0.5); }
  70% { box-shadow: 0 0 0 12px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 8vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 1.5rem;
}

.title-line {
  display: block;
}

.title-accent {
  background: linear-gradient(105deg, var(--text) 0%, var(--accent) 45%, var(--violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 8s ease-in-out infinite;
  background-size: 200% auto;
}

@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-lead {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-muted);
  max-width: 36em;
  margin: 0 auto 2rem;
}

.hero-lead strong {
  color: var(--text);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.35rem;
  min-height: 44px;
  box-sizing: border-box;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s, background 0.3s;
}

.btn-primary {
  color: var(--bg-deep);
  background: linear-gradient(135deg, #5eead4, #2dd4bf);
  border: none;
  box-shadow: 0 4px 24px rgba(94, 234, 212, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(94, 234, 212, 0.45);
}

.btn-primary svg {
  transition: transform 0.3s var(--ease-out);
}

.btn-primary:hover svg {
  transform: translateX(4px);
}

.btn-ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

/* Sections */
.section {
  padding: 0 clamp(1.25rem, 4vw, 2.5rem) clamp(4rem, 10vw, 6rem);
  max-width: 1120px;
  margin: 0 auto;
}

.section-head {
  margin-bottom: 2.5rem;
  max-width: 640px;
}

.section-head h2,
#zone-title,
#villes-title,
#contact-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.65rem, 4vw, 2.25rem);
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  line-height: 1.2;
}

.section-sub {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.inline-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(94, 234, 212, 0.35);
  transition: color 0.2s, border-color 0.2s;
}
.inline-link:hover {
  color: #7ff5e8;
  border-bottom-color: rgba(94, 234, 212, 0.6);
}
.communes-wrap {
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: var(--radius);
}
.communes-details {
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 0;
}
.communes-details:last-of-type {
  border-bottom: none;
}
.communes-details summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  list-style: none;
  padding: 0.5rem 0;
  transition: color 0.2s;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 44px;
  box-sizing: border-box;
}
.communes-details summary::-webkit-details-marker {
  display: none;
}
.communes-details summary::after {
  content: "";
  flex-shrink: 0;
  width: 0.5em;
  height: 0.5em;
  margin-top: 0.35em;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
  transition: transform 0.3s var(--ease-out);
  opacity: 0.7;
}
.communes-details[open] summary::after {
  transform: rotate(-135deg);
  margin-top: 0.4em;
}
.communes-details summary:hover {
  color: var(--accent);
}
.communes-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  columns: 2;
  column-gap: 1.5rem;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--text-muted);
}
.communes-list li {
  break-inside: avoid;
  padding: 0.12rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
@media (min-width: 640px) {
  .communes-list { columns: 3; }
}
@media (min-width: 960px) {
  .communes-list { columns: 4; }
}
.communes-footnote {
  margin: 1.25rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Service grid */
.service-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1.25rem;
}

.service-card {
  position: relative;
  padding: 1.75rem;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.4s var(--ease-out), border-color 0.4s, box-shadow 0.4s;
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(94, 234, 212, 0.35), transparent 40%, transparent 60%, rgba(167, 139, 250, 0.2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(94, 234, 212, 0.2);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(94, 234, 212, 0.08);
}

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

.card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1.25rem;
  color: var(--accent);
}

.card-icon svg {
  width: 100%;
  height: 100%;
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.65rem;
  line-height: 1.3;
}

.service-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.6;
}

/* Local block */
.local-inner {
  padding: clamp(1.75rem, 4vw, 2.5rem);
  border-radius: var(--radius);
}

.local-inner p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.local-inner p:last-of-type {
  margin-bottom: 0;
}

.local-inner strong {
  color: var(--text);
}

/* Glass */
.glass {
  background: rgba(18, 24, 42, 0.45);
  border: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
}

/* Contact */
.contact {
  display: flex;
  justify-content: center;
}

.contact-card {
  width: 100%;
  max-width: 520px;
  padding: clamp(2rem, 5vw, 2.75rem);
  border-radius: var(--radius);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.contact-card::after {
  content: "";
  position: absolute;
  top: -50%;
  left: 50%;
  width: 120%;
  height: 100%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, var(--accent-dim), transparent 65%);
  pointer-events: none;
}

.contact-card > * {
  position: relative;
  z-index: 1;
}

.contact-lead {
  color: var(--text-muted);
  margin: 0 0 1.75rem;
}

.contact-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  text-align: left;
}

.contact-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.contact-list li:last-child {
  border-bottom: none;
}

.contact-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.contact-list a {
  color: var(--accent);
  font-weight: 600;
  font-size: clamp(0.95rem, 3.5vw, 1.1rem);
  text-decoration: none;
  transition: opacity 0.2s;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.contact-list a:hover {
  opacity: 0.85;
  text-decoration: underline;
}

.contact-note {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  padding: 2.5rem max(1.25rem, env(safe-area-inset-left)) max(3rem, env(safe-area-inset-bottom)) max(1.25rem, env(safe-area-inset-right));
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.875rem;
}

.site-footer p {
  margin: 0.35rem 0;
}

.footer-seo {
  font-size: 0.75rem;
  opacity: 0.65;
  max-width: 520px;
  margin-left: auto !important;
  margin-right: auto !important;
  overflow-wrap: anywhere;
  hyphens: auto;
}

@media (max-width: 640px) {
  .communes-list {
    columns: 1;
    column-gap: 0;
  }
}

@media (max-width: 560px) {
  .site-header {
    flex-wrap: wrap;
    justify-content: center;
  }

  .logo {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: center;
  }

  .nav {
    flex: 1 1 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.25rem 0.65rem;
    row-gap: 0.35rem;
  }

  .nav a {
    font-size: 0.8125rem;
    padding: 0.45rem 0.4rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .nav-cta {
    padding: 0.45rem 0.85rem;
  }

  .hero-title {
    font-size: clamp(2rem, 11vw, 3.25rem);
  }

  .hero-eyebrow {
    justify-content: center;
    text-align: center;
    max-width: 100%;
    padding-inline: 0.25rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions .btn {
    width: 100%;
  }
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children optional — hero uses single blocks */
.hero .reveal:nth-child(2) { transition-delay: 0.08s; }
.hero .reveal:nth-child(3) { transition-delay: 0.16s; }
.hero .reveal:nth-child(4) { transition-delay: 0.24s; }

.service-card.reveal:nth-child(1) { transition-delay: 0.05s; }
.service-card.reveal:nth-child(2) { transition-delay: 0.1s; }
.service-card.reveal:nth-child(3) { transition-delay: 0.15s; }
.service-card.reveal:nth-child(4) { transition-delay: 0.2s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .orb, .title-accent, .pulse-dot, .logo-mark {
    animation: none !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .service-card:hover {
    transform: none;
  }
}
