/* ============================================================
   TERRA — Style Luxe / Chic
   Glassmorphism · Aurora · Hover 3D · Mobile-first
   ============================================================ */

:root {
  --bg-deep: #050a1a;
  --bg-deep-2: #0a1230;
  --glass: rgba(255, 255, 255, 0.06);
  --glass-strong: rgba(255, 255, 255, 0.10);
  --glass-border: rgba(255, 255, 255, 0.16);
  --gold: #d4b36a;
  --gold-light: #f0d9a6;
  --text: #eef1f8;
  --text-muted: #aab4cc;
  --aurora-1: #3a1c8f;
  --aurora-2: #0d5c8f;
  --aurora-3: #7a1f7a;
  --aurora-4: #1f6f5c;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  font-weight: 600;
  line-height: 1.2;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* ---------- Aurora background ---------- */
.aurora-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: radial-gradient(1200px 800px at 20% 10%, var(--aurora-1), transparent 60%),
              radial-gradient(1000px 700px at 80% 30%, var(--aurora-2), transparent 60%),
              radial-gradient(1100px 800px at 50% 90%, var(--aurora-3), transparent 60%),
              radial-gradient(900px 700px at 10% 80%, var(--aurora-4), transparent 60%),
              linear-gradient(135deg, var(--bg-deep), var(--bg-deep-2));
  background-size: 160% 160%;
  animation: auroraShift 22s ease-in-out infinite;
  filter: blur(6px);
}

.aurora-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 25% 25%, rgba(255,255,255,0.5) 0, transparent 100%),
    radial-gradient(1px 1px at 75% 60%, rgba(255,255,255,0.4) 0, transparent 100%),
    radial-gradient(1px 1px at 50% 85%, rgba(255,255,255,0.35) 0, transparent 100%);
  background-size: 220px 220px;
  opacity: 0.5;
}

@keyframes auroraShift {
  0%   { background-position: 0% 0%, 0% 0%, 0% 0%, 0% 0%; }
  25%  { background-position: 40% 30%, -20% 40%, 30% -10%, -30% 20%; }
  50%  { background-position: 10% 60%, 40% -20%, -20% 30%, 20% 50%; }
  75%  { background-position: -30% 20%, 20% 50%, 40% 10%, -10% -20%; }
  100% { background-position: 0% 0%, 0% 0%, 0% 0%, 0% 0%; }
}

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 5%;
  transition: background 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease;
}

.navbar.scrolled {
  background: rgba(6, 10, 26, 0.7);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 14px 5%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.logo {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--gold-light);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text);
  position: relative;
  padding: 6px 0;
  transition: color 0.3s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.35s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold-light);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1100;
}

.hamburger span {
  width: 26px;
  height: 2px;
  background: var(--text);
  transition: 0.35s ease;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 140px 5% 80px;
}

.hero-bg-img {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.hero-bg-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
}

.hero-bg-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5,10,26,0.75) 0%, rgba(5,10,26,0.4) 50%, var(--bg-deep) 100%);
}

.hero-content {
  max-width: 860px;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 22px;
}

.hero-content h1 {
  font-size: clamp(2.6rem, 7vw, 5rem);
  color: #fff;
  margin-bottom: 24px;
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.5);
}

.hero-content h1 span {
  background: linear-gradient(120deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 36px;
}

.btn {
  display: inline-block;
  padding: 15px 38px;
  border-radius: 50px;
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.35s ease;
  border: 1px solid transparent;
}

.btn-gold {
  background: linear-gradient(120deg, var(--gold), var(--gold-light));
  color: #0a0f22;
  box-shadow: 0 8px 30px rgba(212, 179, 106, 0.35);
}

.btn-gold:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 40px rgba(212, 179, 106, 0.5);
}

.btn-ghost {
  background: var(--glass);
  border-color: var(--glass-border);
  color: var(--text);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  background: var(--glass-strong);
  transform: translateY(-3px);
}

.hero-btns {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
}

.scroll-hint {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
  color: var(--text-muted);
}

@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 10px); }
}

/* ---------- Sections générales ---------- */
.section {
  padding: 100px 5%;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-head {
  text-align: center;
  margin-bottom: 60px;
}

.section-head .eyebrow {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}

.section-head h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  color: #fff;
  margin-bottom: 16px;
}

.section-head p {
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto;
}

/* ---------- Cartes services (hover 3D) ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.service-card {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 40px 32px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.45s ease, background 0.45s ease;
  transform-style: preserve-3d;
  perspective: 800px;
}

.service-card:hover {
  transform: translateY(-12px) rotateX(4deg) rotateY(-4deg);
  background: var(--glass-strong);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(212, 179, 106, 0.3);
}

.service-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(212,179,106,0.2), rgba(212,179,106,0.05));
  border: 1px solid rgba(212, 179, 106, 0.3);
  margin-bottom: 22px;
  color: var(--gold-light);
}

.service-card h3 {
  font-size: 1.45rem;
  margin-bottom: 12px;
  color: #fff;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---------- Globe 3D ---------- */
.globe-section {
  position: relative;
}

.globe-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
}

#globe-container {
  position: relative;
  width: min(420px, 80vw);
  height: min(420px, 80vw);
}

#globe-canvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 0 80px rgba(80, 140, 220, 0.35), inset 0 0 60px rgba(0, 0, 0, 0.4);
}

.globe-info {
  max-width: 440px;
}

.globe-info h3 {
  font-size: 1.9rem;
  margin-bottom: 16px;
  color: #fff;
}

.globe-info p {
  color: var(--text-muted);
  margin-bottom: 22px;
}

.globe-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.stat-box {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.stat-box .num {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold-light);
}

.stat-box .label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

/* ---------- Horloges mondiales ---------- */
.clocks-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.clock-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 26px 20px;
  text-align: center;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.clock-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.clock-card .city {
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}

.clock-card .time {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
}

.clock-card .offset {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ---------- Galerie ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.gallery-item {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1 / 1;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(5, 10, 26, 0.85));
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-item:hover::after {
  opacity: 1;
}

.gallery-item .caption {
  position: absolute;
  bottom: 18px;
  left: 20px;
  z-index: 2;
  color: #fff;
  font-size: 0.9rem;
  opacity: 0;
  transform: translateY(10px);
  transition: 0.4s ease;
}

.gallery-item:hover .caption {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Témoignages ---------- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.testimonial-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 36px 30px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 0.4s ease;
}

.testimonial-card:hover {
  transform: translateY(-8px);
}

.testimonial-card .quote {
  font-size: 3rem;
  line-height: 1;
  color: var(--gold);
  font-family: Georgia, serif;
}

.testimonial-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 14px 0 22px;
  font-style: italic;
}

.testimonial-card .author {
  display: flex;
  align-items: center;
  gap: 14px;
}

.testimonial-card .avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--aurora-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
}

.testimonial-card .author .name {
  font-weight: 600;
  color: #fff;
}

.testimonial-card .author .role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ---------- Formulaire contact ---------- */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: start;
}

.contact-form {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  padding: 40px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.07);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.contact-info-list {
  list-style: none;
}

.contact-info-list li {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--glass-border);
  color: var(--text-muted);
}

.contact-info-list li svg {
  flex-shrink: 0;
  color: var(--gold);
}

.form-success {
  display: none;
  background: rgba(40, 160, 90, 0.15);
  border: 1px solid rgba(40, 160, 90, 0.4);
  color: #7ee2a8;
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.form-error {
  display: none;
  background: rgba(200, 60, 60, 0.15);
  border: 1px solid rgba(200, 60, 60, 0.4);
  color: #f3a0a0;
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.map-wrap {
  margin-top: 60px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
}

.map-wrap iframe {
  width: 100%;
  height: 380px;
  border: 0;
  display: block;
  filter: saturate(0.9);
}

/* ---------- Footer ---------- */
footer {
  background: rgba(5, 8, 20, 0.85);
  border-top: 1px solid var(--glass-border);
  padding: 60px 5% 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 16px;
  max-width: 340px;
}

.footer-col h4 {
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 18px;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.footer-col ul li a:hover {
  color: var(--gold-light);
}

.footer-bottom {
  max-width: 1200px;
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--glass-border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

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

/* Fallback: force appearance even if observer fails */
@keyframes revealFallback {
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Page header (pages internes) ---------- */
.page-hero {
  position: relative;
  padding: 180px 5% 80px;
  text-align: center;
  overflow: hidden;
}

.page-hero .hero-bg-img img {
  opacity: 0.3;
}

.page-hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  color: #fff;
  margin-bottom: 14px;
}

.page-hero p {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .services-grid,
  .testimonials-grid,
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .clocks-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .contact-wrap {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 72%;
    height: 100vh;
    flex-direction: column;
    justify-content: center;
    gap: 30px;
    background: rgba(6, 10, 26, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: right 0.4s ease;
    padding: 40px;
  }
  .nav-links.open {
    right: 0;
  }
  .hamburger {
    display: flex;
  }
  .services-grid,
  .testimonials-grid,
  .gallery-grid,
  .clocks-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .section {
    padding: 70px 5%;
  }
  .globe-stats {
    grid-template-columns: repeat(3, 1fr);
  }
  .hero-btns .btn {
    width: 100%;
    text-align: center;
  }
  .contact-form {
    padding: 28px 22px;
  }
}
