/* ============================================================
   KILIAN REALTY — main.css
   Variables CSS, Reset, Base, Typography, Utilitaires
   ============================================================ */

/* ── Fonts locales ── */
@font-face {
  font-family: 'Cherston';
  src: url('../fonts/Cherston-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Nexa';
  src: url('../fonts/NexaRegular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Nexa';
  src: url('../fonts/Nexa Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Nexa';
  src: url('../fonts/NexaBlack.otf') format('opentype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Nexa';
  src: url('../fonts/Nexa-Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Marcellus';
  src: url('../fonts/Marcellus-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ── Google Fonts (fallback si offline) ── */
@import url('https://fonts.googleapis.com/css2?family=Marcellus&family=Outfit:wght@300;400;500;600;700;900&display=swap');

/* ── Variables ── */
:root {
  /* Couleurs principales */
  --bleu:         #083B5A;
  --bleu-fonce:   #041E2D;
  --bleu-moyen:   #53778D;
  --bleu-clair:   #9CB1BD;
  --bleu-pale:    #E6EBEF;
  --bordeaux:     #931931;
  --bordeaux-fonce:#4A0D19;
  --bordeaux-moyen:#B35E6F;
  --bordeaux-clair:#D4A3AD;
  --bordeaux-pale:#F4E8EA;
  --anthracite:   #252626;
  --gris-moyen:   #676767;
  --gris-clair:   #A8A8A8;
  --gris-pale:    #E9E9E9;
  --chantilly:    #F5F4F0;
  --chantilly-clair:#F8F7F5;
  --blanc:        #ffffff;
  --noir:         #131313;

  /* Typographie */
  --font-titre:   'Cherston', 'Marcellus', 'Times New Roman', serif;
  --font-body:    'Nexa', 'Outfit', sans-serif;

  /* Espacements */
  --container-max: 1320px;
  --section-py:    100px;
  --section-py-sm: 60px;

  /* Transitions */
  --ease-luxury:   cubic-bezier(0.22, 1, 0.36, 1);
  --transition:    0.4s var(--ease-luxury);
  --transition-fast:0.25s ease;

  /* Ombres */
  --shadow-sm: 0 2px 12px rgba(8,59,90,0.08);
  --shadow-md: 0 8px 40px rgba(8,59,90,0.14);
  --shadow-lg: 0 20px 60px rgba(8,59,90,0.18);

  /* Z-index */
  --z-nav:      1000;
  --z-preloader:9999;
  --z-overlay:   800;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--anthracite);
  background: var(--blanc);
  line-height: 1.7;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }

/* ── Typographie ── */
h1, h2, h3, h4 { font-family: var(--font-titre); font-weight: 400; line-height: 1.15; }

h1 { font-size: clamp(2.8rem, 6vw, 5.5rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(2.2rem, 4vw, 3.5rem); }
h3 { font-family: var(--font-body); font-weight: 600; font-size: clamp(1.1rem, 1.5vw, 1.4rem); letter-spacing: 0.08em; text-transform: uppercase; }
h4 { font-family: var(--font-body); font-weight: 600; font-size: 1.1rem; }

p { line-height: 1.8; }

/* ── Utilitaires ── */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 40px;
}

.section { padding: var(--section-py) 0; }
.section--dark { background: var(--bleu-fonce); color: var(--blanc); }
.section--cream { background: var(--chantilly); }
.section--blue { background: var(--bleu); color: var(--blanc); }

.section-tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--bordeaux);
  margin-bottom: 18px;
}
.section-tag--light { color: var(--bordeaux-clair); }

.section-title { margin-bottom: 24px; color: var(--bleu); }
.section-title--light { color: var(--blanc); }
.section-title--dark { color: var(--anthracite); }

.section-subtitle {
  font-size: 1rem;
  font-weight: 300;
  color: var(--gris-moyen);
  max-width: 620px;
  line-height: 1.9;
}
.section-subtitle--light { color: rgba(255,255,255,0.75); }

.section-header { margin-bottom: 60px; }
.section-header--center { text-align: center; }
.section-header--center .section-subtitle { margin: 0 auto; }

.divider {
  width: 48px;
  height: 2px;
  background: var(--bordeaux);
  margin: 24px 0;
}
.divider--center { margin: 24px auto; }
.divider--light { background: rgba(255,255,255,0.4); }

/* ── Boutons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.08);
  opacity: 0;
  transition: var(--transition-fast);
}
.btn:hover::after { opacity: 1; }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn-primary {
  background: var(--bordeaux);
  color: var(--blanc);
}
.btn-primary:hover { background: var(--bordeaux-fonce); }

.btn-outline {
  background: transparent;
  color: var(--blanc);
  border: 1px solid rgba(255,255,255,0.6);
}
.btn-outline:hover { border-color: var(--blanc); background: rgba(255,255,255,0.08); }

.btn-outline-dark {
  background: transparent;
  color: var(--bleu);
  border: 1px solid var(--bleu);
}
.btn-outline-dark:hover { background: var(--bleu); color: var(--blanc); }

.btn-text {
  padding: 0;
  font-size: 0.78rem;
  letter-spacing: 2px;
  color: var(--bordeaux);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition-fast);
}
.btn-text:hover { border-color: var(--bordeaux); transform: none; box-shadow: none; }
.btn-text::after { display: none; }

/* ── Animations scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-luxury), transform 0.8s var(--ease-luxury);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ── Preloader ── */
#preloader {
  position: fixed;
  inset: 0;
  background: var(--bleu-fonce);
  z-index: var(--z-preloader);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#preloader.hidden {
  opacity: 0;
  visibility: hidden;
}
.preloader-logo {
  width: 80px;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.4; transform: scale(0.96); }
  50% { opacity: 1; transform: scale(1); }
}

/* ── Scroll indicator ── */
.scroll-indicator {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.6);
  font-size: 0.65rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  animation: scrollBounce 2s ease-in-out infinite;
  cursor: pointer;
}
.scroll-indicator__line {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.6), transparent);
}
@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.6; }
  50% { transform: translateX(-50%) translateY(6px); opacity: 1; }
}

/* ── Hexagone décoratif ── */
.hex-accent {
  width: 6px;
  height: 6px;
  background: var(--bordeaux);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  display: inline-block;
}
