/* =========================================================
   AN-KI SOLUTIONS — Villa connectée
   Feuille de styles principale
   ========================================================= */

:root {
  --ink: #1b1a16;
  --ink-soft: #4a463d;
  --cream: #faf6ee;
  --cream-dim: #f1ead9;
  --sand: #e8dcc3;
  --charcoal: #15180f;
  --charcoal-2: #1d2217;
  --gold: #bb8a43;
  --gold-light: #d9ad6c;
  --sage: #4b5d45;
  --line: rgba(27, 26, 22, 0.1);
  --line-dark: rgba(250, 246, 238, 0.14);

  --font-serif: "Playfair Display", "Georgia", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container-w: 1160px;
  --radius: 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.01em;
}

p { margin: 0; }

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

.hide-mobile { display: inline; }

/* -------------------- Reveal animation -------------------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* -------------------- Buttons -------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #241a0b;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -12px rgba(187, 138, 67, 0.55); }
.btn-ghost {
  background: transparent;
  color: var(--cream);
  border-color: rgba(250, 246, 238, 0.45);
}
.btn-ghost:hover { background: rgba(250, 246, 238, 0.1); border-color: var(--cream); }
.btn-block { width: 100%; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: background 0.4s var(--ease), padding 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.site-header.scrolled {
  background: rgba(21, 24, 15, 0.82);
  backdrop-filter: blur(14px);
  padding: 12px 0;
  box-shadow: 0 10px 30px -18px rgba(0,0,0,0.5);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-logo { height: 36px; width: auto; filter: brightness(0) invert(1); opacity: 0.95; }
.brand-text {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  color: var(--cream);
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-text-sub {
  font-family: var(--font-sans);
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  color: var(--gold-light);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-link {
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(250, 246, 238, 0.82);
  position: relative;
  padding: 4px 0;
  transition: color 0.3s;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--gold-light);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav-link:hover { color: var(--cream); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link.active { color: var(--gold-light); }
.nav-link.active::after { transform: scaleX(1); }
.nav-cta {
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid rgba(250, 246, 238, 0.4);
  color: var(--cream) !important;
}
.nav-cta::after { display: none; }
.nav-cta:hover { background: var(--gold); border-color: var(--gold); color: #241a0b !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--cream);
  border-radius: 2px;
  transition: all 0.3s var(--ease);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--charcoal);
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transform: scale(1.04);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(14, 16, 9, 0.55) 0%, rgba(14, 16, 9, 0.45) 35%, rgba(14, 16, 9, 0.88) 100%),
    linear-gradient(100deg, rgba(10, 12, 7, 0.75) 0%, rgba(10, 12, 7, 0.15) 55%);
}
.hero-content {
  position: relative;
  z-index: 1;
  padding-top: 120px;
  padding-bottom: 80px;
  max-width: 760px;
}
.eyebrow {
  color: var(--gold-light);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 20px;
  display: block;
}
.hero-title {
  color: var(--cream);
  font-size: clamp(2.8rem, 6.5vw, 5.2rem);
  line-height: 1.04;
  margin-bottom: 20px;
}
.hero-title em { color: var(--gold-light); font-style: italic; }
.hero-sub {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  color: var(--cream-dim);
  margin-bottom: 14px;
}
.hero-desc {
  font-size: 1.05rem;
  color: rgba(250, 246, 238, 0.78);
  max-width: 480px;
  margin-bottom: 30px;
}
.hero-pillars {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream);
  margin-bottom: 40px;
}
.hero-pillars .dot { color: var(--gold-light); font-weight: 400; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.scroll-cue {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 1px solid rgba(250, 246, 238, 0.5);
  border-radius: 20px;
  z-index: 1;
}
.scroll-cue span {
  position: absolute;
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: var(--gold-light);
  border-radius: 3px;
  animation: scrollCue 1.8s ease-in-out infinite;
}
@keyframes scrollCue {
  0% { opacity: 1; top: 7px; }
  70% { opacity: 0; top: 22px; }
  100% { opacity: 0; top: 22px; }
}

/* ============================================================
   SECTIONS — shared
   ============================================================ */
.section { padding: 120px 0; position: relative; }
.section-dark {
  background: var(--charcoal);
  color: var(--cream);
}
.section-dark .section-lead { color: rgba(250, 246, 238, 0.7); }

.section-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}
.section-dark .section-tag { color: var(--gold-light); }
.section-title {
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  margin-bottom: 16px;
}
.section-lead {
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 560px;
}
.section-head.center { text-align: center; max-width: 680px; margin: 0 auto 64px; }
.section-head.center .section-lead { margin: 0 auto; }

/* -------------------- Experience split -------------------- */
.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 72px;
  align-items: center;
}
.section-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.5rem;
  line-height: 1.4;
  color: var(--ink);
  margin: 28px 0;
  padding-left: 22px;
  border-left: 2px solid var(--gold);
}
.section-body { color: var(--ink-soft); font-size: 1.02rem; max-width: 480px; }
.split-media {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 40px 60px -30px rgba(27, 26, 22, 0.35);
}
.split-media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3.1; }

/* -------------------- Protocols -------------------- */
.protocols {
  text-align: center;
  margin-bottom: 28px;
}
.protocols-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 16px;
}
.protocols-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}
.protocol-badge {
  font-size: 0.86rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--cream-dim);
  border: 1px solid var(--line);
  color: var(--ink);
}

/* -------------------- CSEI dimensions -------------------- */
.csei-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.csei-card {
  background: var(--charcoal-2);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 34px 26px;
  position: relative;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease);
}
.csei-card:hover { transform: translateY(-6px); border-color: rgba(187, 138, 67, 0.45); }
.csei-letter {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  color: var(--gold);
  opacity: 0.5;
  line-height: 1;
  margin-bottom: 10px;
}
.csei-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: rgba(187, 138, 67, 0.14);
  color: var(--gold-light);
  margin-bottom: 18px;
}
.csei-icon svg { width: 22px; height: 22px; }
.csei-card h3 { font-size: 1.2rem; margin-bottom: 8px; color: var(--cream); }
.csei-card p { font-size: 0.92rem; color: rgba(250, 246, 238, 0.68); }

.dimensions-footer {
  text-align: center;
  margin-top: 64px;
  font-size: 1.15rem;
  font-family: var(--font-serif);
  color: var(--cream);
}
.dimensions-footer span {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  color: rgba(250, 246, 238, 0.6);
  margin-top: 8px;
}

/* -------------------- Pilotage -------------------- */
.pilotage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 64px;
}
.pilotage-card {
  background: var(--cream-dim);
  border-radius: var(--radius);
  padding: 36px 28px;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.pilotage-card:hover { transform: translateY(-6px); box-shadow: 0 24px 40px -24px rgba(27,26,22,0.25); }
.pilotage-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--gold-light);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 22px;
}
.pilotage-icon svg { width: 24px; height: 24px; }
.pilotage-card h3 { font-size: 1.25rem; margin-bottom: 10px; }
.pilotage-card p { color: var(--ink-soft); font-size: 0.96rem; }

.pilotage-banner {
  text-align: center;
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--ink);
  padding: 40px 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.pilotage-banner span:first-child { font-style: italic; color: var(--gold); margin-right: 10px; }

/* -------------------- Technologies -------------------- */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.tech-card {
  background: var(--charcoal-2);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease);
}
.tech-card:hover { transform: translateY(-6px); border-color: rgba(187, 138, 67, 0.5); }
.tech-icon {
  width: 48px; height: 48px;
  border-radius: 13px;
  background: rgba(187, 138, 67, 0.14);
  color: var(--gold-light);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.tech-icon svg { width: 23px; height: 23px; }
.tech-category {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 10px;
}
.tech-card h3 { font-size: 1.12rem; color: var(--cream); margin-bottom: 10px; line-height: 1.3; }
.tech-card p { font-size: 0.92rem; color: rgba(250, 246, 238, 0.65); }

.tech-detail {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line-dark);
}
.tech-detail-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tech-tag {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(250, 246, 238, 0.06);
  border: 1px solid var(--line-dark);
  color: rgba(250, 246, 238, 0.8);
}
.tech-usage {
  font-size: 0.9rem;
  color: rgba(250, 246, 238, 0.68);
  line-height: 1.55;
}

/* -------------------- Architecture -------------------- */
.arch-chain {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-bottom: 44px;
}
.arch-layer {
  flex: 1;
  background: var(--cream-dim);
  border-radius: var(--radius);
  padding: 30px 22px;
  text-align: center;
  position: relative;
}
.arch-layer-index {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--gold);
  font-size: 1rem;
  margin-bottom: 10px;
}
.arch-layer-body h3 { font-size: 1.05rem; margin-bottom: 8px; }
.arch-layer-body p { font-size: 0.86rem; color: var(--ink-soft); }
.arch-connector {
  width: 36px;
  position: relative;
  flex: none;
}
.arch-connector::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--gold) 0 6px, transparent 6px 12px);
  transform: translateY(-1px);
}
.arch-footer {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: 1rem;
}
.arch-footer strong { color: var(--ink); }

/* -------------------- Zones -------------------- */
.zones-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.zone-card {
  background: var(--charcoal-2);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 34px 24px;
  text-align: center;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease);
}
.zone-card:hover { transform: translateY(-6px); border-color: rgba(187, 138, 67, 0.5); }
.zone-icon {
  width: 52px; height: 52px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: rgba(187, 138, 67, 0.14);
  color: var(--gold-light);
  display: flex; align-items: center; justify-content: center;
}
.zone-icon svg { width: 24px; height: 24px; }
.zone-card h3 { font-size: 1.1rem; color: var(--cream); margin-bottom: 8px; }
.zone-card p { font-size: 0.9rem; color: rgba(250, 246, 238, 0.65); }

/* -------------------- Closing / Contact -------------------- */
.closing { padding: 0; color: var(--cream); }
.closing-bg { position: absolute; inset: 0; z-index: 0; }
.closing-bg img { width: 100%; height: 100%; object-fit: cover; }
.closing-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(14,16,9,0.94) 10%, rgba(14,16,9,0.8) 55%, rgba(14,16,9,0.55) 100%);
}
.closing-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
  padding-top: 120px;
  padding-bottom: 120px;
}
.closing-title {
  font-size: clamp(2.1rem, 4vw, 3.1rem);
  line-height: 1.18;
  margin-bottom: 22px;
}
.closing-title em { color: var(--gold-light); font-style: italic; }
.closing-desc {
  font-size: 1.08rem;
  color: rgba(250, 246, 238, 0.8);
  max-width: 460px;
  margin-bottom: 40px;
}
.closing-meta {
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line-dark);
  padding-top: 28px;
}
.closing-meta div { display: flex; flex-direction: column; gap: 6px; }
.closing-meta-label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.contact-card {
  background: rgba(250, 246, 238, 0.96);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: 0 40px 70px -30px rgba(0,0,0,0.5);
}
.contact-card h3 { font-size: 1.4rem; margin-bottom: 8px; }
.contact-card > p { color: var(--ink-soft); font-size: 0.94rem; margin-bottom: 22px; }
.contact-card label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 16px;
}
.contact-card input,
.contact-card textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  font-family: var(--font-sans);
  font-size: 0.94rem;
  color: var(--ink);
  resize: vertical;
}
.contact-card input:focus,
.contact-card textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(187, 138, 67, 0.18);
}
.form-status {
  margin-top: 14px;
  font-size: 0.88rem;
  min-height: 1.2em;
  color: var(--sage);
  text-align: center;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--charcoal);
  color: rgba(250, 246, 238, 0.75);
  padding: 56px 0 30px;
}
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.footer-brand { justify-content: center; }
.footer-tag { font-size: 0.9rem; color: rgba(250, 246, 238, 0.55); }
.footer-nav { display: flex; gap: 26px; flex-wrap: wrap; justify-content: center; font-size: 0.88rem; }
.footer-nav a { color: rgba(250, 246, 238, 0.75); transition: color 0.3s; }
.footer-nav a:hover { color: var(--gold-light); }
.footer-copy {
  font-size: 0.78rem;
  color: rgba(250, 246, 238, 0.4);
  margin-top: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--line-dark);
  width: 100%;
  text-align: center;
}

/* -------------------- Back to top -------------------- */
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--cream);
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: all 0.35s var(--ease);
  z-index: 90;
  box-shadow: 0 12px 24px -10px rgba(0,0,0,0.4);
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover { background: var(--gold); color: #241a0b; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .csei-grid { grid-template-columns: repeat(2, 1fr); }
  .tech-grid { grid-template-columns: repeat(2, 1fr); }
  .zones-grid { grid-template-columns: repeat(2, 1fr); }
  .pilotage-grid { grid-template-columns: 1fr; }
  .arch-chain { flex-direction: column; gap: 14px; }
  .arch-connector { display: none; }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split-media { order: -1; }
  .closing-inner { grid-template-columns: 1fr; padding-top: 100px; }
}

@media (max-width: 860px) {
  .main-nav {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(320px, 82vw);
    background: rgba(18, 20, 13, 0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 26px;
    padding: 40px;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease);
  }
  .main-nav.open { transform: translateX(0); }
  .nav-link { font-size: 1.05rem; }
  .nav-cta { margin-top: 10px; }
  .nav-toggle { display: flex; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
}

@media (max-width: 680px) {
  .section { padding: 84px 0; }
  .hero-content { padding-top: 110px; }
  .csei-grid, .tech-grid, .zones-grid { grid-template-columns: 1fr; }
  .hide-mobile { display: none; }
  .closing-meta { gap: 22px; }
  .contact-card { padding: 28px 22px; }
}
