/* ================================================================
   iMagin.K - Global CSS "Prestige & Technologie"
   ================================================================ */

/* Variables CSS - Nouvelle Charte Couleur */
:root {
  /* === Fonds === */
  --anthracite-profond: #1F2328;
  --anthracite-clair: #2E333A;
  
  /* === Textes === */
  --ivoire-lumineux: #F7F5F2;
  
  /* === Accents & Détails === */
  --or-somptueux: #D4AF37;
  --argent-brosse: #C0C0C0;
  
  /* === Couleurs d'Action === */
  --bleu-nuit-strategique: #2A4494;
  --bleu-nuit-hover: #3A54A4;
  
  /* === Variables de Layout === */
  --navbar-hauteur: 80px;
  --navbar-hauteur-scroll: 60px;
  --transition-duration: 0.4s;
  --border-radius: 8px;
  --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* ================================================================
   RESET ET BASE
   ================================================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ivoire-lumineux);
  line-height: 1.6;
  padding-top: var(--navbar-hauteur);
  overflow-x: hidden;
}

/* Éviter que le main soit stylé à l'intérieur - toile vierge */
main {
  min-height: calc(100vh - var(--navbar-hauteur));
  position: relative;
}

/* ================================================================
   TYPOGRAPHIE
   ================================================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: 'Lora', Georgia, serif;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
}

h1 { font-size: clamp(2rem, 4vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }

p {
  margin-bottom: 1rem;
  font-size: clamp(1rem, 2vw, 1.125rem);
}

a {
  color: var(--ivoire-lumineux);
  text-decoration: none;
  transition: color var(--transition-duration) ease;
}

a:hover {
  color: var(--or-somptueux);
}

/* Classe utilitaire pour masquer visuellement */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ================================================================
   NAVBAR - "RUBAN DE CRISTAL FLOTTANT"
   ================================================================ */

.main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--navbar-hauteur);
  transition: height var(--transition-duration) ease;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 2rem;
  background-color: rgba(31, 35, 40, 0.7);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: all var(--transition-duration) ease;
}

/* État scrollé de la navbar */
.main-header.scrolled {
  height: var(--navbar-hauteur-scroll);
}

.main-header.scrolled .navbar {
  border-bottom-color: rgba(212, 175, 55, 0.2);
}

/* Logo Central - Pièce Maîtresse */
.navbar-logo-container {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all var(--transition-duration) cubic-bezier(0.4, 0, 0.2, 1);
}

.main-header.scrolled .navbar-logo-container {
  left: 2rem;
  transform: translateX(0);
}

.navbar-logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ivoire-lumineux);
  font-weight: 600;
  font-size: 1.5rem;
  transition: transform var(--transition-duration) ease;
}

.navbar-logo-link:hover {
  transform: scale(1.05);
  color: var(--ivoire-lumineux);
}

.navbar-logo {
  height: 40px;
  width: auto;
  transition: transform var(--transition-duration) ease;
}

.navbar-logo-name {
  font-family: 'Lora', serif;
  font-weight: 700;
  opacity: 1;
  transition: opacity var(--transition-duration) ease;
}

.main-header.scrolled .navbar-logo-name {
  opacity: 0;
  pointer-events: none;
}

/* Navigation Links */
.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin: 0;
}

.nav-links-left {
  transition: transform var(--transition-global);
}

.nav-links-right {
  transition: transform var(--transition-global);
}

.nav-links a {
  position: relative;
  font-weight: 500;
  color: var(--ivoire-lumineux);
  padding: 0.5rem 0;
  transition: color var(--transition-duration) ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--or-somptueux);
  transition: all var(--transition-duration) ease;
  transform: translateX(-50%);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a:hover {
  color: var(--or-somptueux);
}

/* Bouton Contact CTA */
.cta-contact-nav {
  background-color: var(--bleu-nuit-strategique) !important;
  color: var(--ivoire-lumineux) !important;
  padding: 0.75rem 1.5rem !important;
  border-radius: var(--border-radius);
  font-weight: 600;
  transition: all var(--transition-duration) ease;
  border: 1px solid var(--bleu-nuit-strategique);
}

.cta-contact-nav:hover {
  background-color: var(--bleu-nuit-hover) !important;
  border-color: var(--bleu-nuit-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.cta-contact-nav::after {
  display: none;
}

/* ================================================================
   MENU MOBILE
   ================================================================ */

.burger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.burger-bar {
  width: 100%;
  height: 3px;
  background-color: var(--ivoire-lumineux);
  border-radius: 2px;
  transition: all var(--transition-duration) ease;
  transform-origin: center;
}

/* Animation du burger en croix */
.mobile-nav-open .burger-bar:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-nav-open .burger-bar:nth-child(2) {
  opacity: 0;
}

.mobile-nav-open .burger-bar:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Panneau de navigation mobile */
.mobile-nav {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(31, 35, 40, 0.95);
  backdrop-filter: blur(20px);
  transform: translateX(100%);
  transition: transform var(--transition-duration) cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-nav-open .mobile-nav {
  transform: translateX(0);
}

.mobile-nav ul {
  list-style: none;
  text-align: center;
  margin: 0;
  padding: 0;
}

.mobile-nav li {
  margin: 2rem 0;
}

.mobile-nav a {
  font-size: 2rem;
  font-weight: 600;
  color: var(--ivoire-lumineux);
  transition: color var(--transition-duration) ease;
  display: block;
  padding: 1rem;
}

.mobile-nav a:hover {
  color: var(--or-somptueux);
}

/* Empêcher le scroll quand le menu mobile est ouvert */
.mobile-nav-open {
  overflow: hidden;
}
.main-header.scrolled .nav-links-left {
    transform: translateX(60px); /* Ajustez cette valeur si nécessaire */
}
/* ================================================================
   FOOTER - "L'ANCRAGE LUXUEUX"
   ================================================================ */

footer {
  background-color: var(--anthracite-profond);
  color: var(--ivoire-lumineux);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
  border-top: 1px solid rgba(212, 175, 55, 0.1);
}

/* Section de citation */
.footer-quote-section {
  text-align: center;
  margin-bottom: 3rem;
  padding: 0 2rem;
}

.footer-quote {
  font-family: 'Lora', serif;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-style: italic;
  color: var(--ivoire-lumineux);
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Grille principale du footer */
.footer-main-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Contacts */
.footer-contacts dl {
  display: grid;
  gap: 1rem;
}

.footer-contacts dt {
  color: var(--or-somptueux);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.footer-contacts dd {
  color: var(--ivoire-lumineux);
  margin-left: 0;
}

.footer-contacts a {
  color: var(--ivoire-lumineux);
  transition: color var(--transition-duration) ease;
}

.footer-contacts a:hover {
  color: var(--or-somptueux);
}

/* Logo du footer */
.footer-logo-container {
  text-align: center;
}

.footer-logo {
  height: 60px;
  width: auto;
  opacity: 0.8;
  transition: opacity var(--transition-duration) ease;
}

.footer-logo:hover {
  opacity: 1;
}

/* Réseaux sociaux */
.footer-social ul {
  list-style: none;
  display: flex;
  justify-content: flex-end;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.footer-social a {
  display: block;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all var(--transition-duration) ease;
}

.footer-social a:hover {
  background-color: rgba(212, 175, 55, 0.1);
  transform: translateY(-2px);
}

.social-icon {
  width: 24px;
  height: 24px;
  fill: var(--argent-brosse);
  transition: fill var(--transition-duration) ease;
}

.footer-social a:hover .social-icon {
  fill: var(--or-somptueux);
}

/* Section légale */
.footer-legal {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(192, 192, 192, 0.2);
  text-align: center;
}

.footer-legal p {
  color: var(--argent-brosse);
  font-size: 0.9rem;
  margin: 0;
}

/* ================================================================
   BOUTON WHATSAPP FLOTTANT
   ================================================================ */

.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  background-color: #25D366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: var(--shadow-medium);
  transition: all var(--transition-duration) ease;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
  color: white;
}

.whatsapp-float svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}

/* ================================================================
   RESPONSIVE DESIGN
   ================================================================ */

@media (max-width: 1024px) {
  .navbar {
    padding: 0 1.5rem;
  }
  
  .nav-links {
    gap: 1.5rem;
  }
  
  .footer-main-grid {
    gap: 1.5rem;
    padding: 0 1.5rem;
  }
}

@media (max-width: 768px) {
  :root {
    --navbar-hauteur: 70px;
    --navbar-hauteur-scroll: 60px;
  }
  
  /* Masquer les liens de navigation desktop */
  .nav-links {
    display: none;
  }
  
  /* Afficher le bouton burger */
  .burger-menu {
    display: flex;
  }
  
  /* Logo mobile centré */
  .navbar-logo-container {
    position: static;
    transform: none;
  }
  
  .main-header.scrolled .navbar-logo-container {
    left: auto;
    transform: none;
  }
  
  .navbar {
    justify-content: space-between;
    padding: 0 1rem;
  }
  
  /* Footer mobile */
  .footer-main-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
  
  .footer-contacts {
    order: 2;
  }
  
  .footer-logo-container {
    order: 1;
  }
  
  .footer-social {
    order: 3;
  }
  
  .footer-social ul {
    justify-content: center;
  }
  
  .footer-quote {
    font-size: 1.25rem;
  }
  
  .mobile-nav a {
    font-size: 1.75rem;
  }
  
  .whatsapp-float {
    bottom: 1rem;
    right: 1rem;
    width: 50px;
    height: 50px;
  }
  
  .whatsapp-float svg {
    width: 25px;
    height: 25px;
  }
}

@media (max-width: 480px) {
  body {
    padding-top: calc(var(--navbar-hauteur) - 10px);
  }
  
  .navbar {
    padding: 0 0.75rem;
  }
  
  .navbar-logo {
    height: 30px;
  }
  
  .navbar-logo-name {
    font-size: 1.25rem;
  }
  
  footer {
    padding: 3rem 0 1.5rem;
  }
  
  .footer-quote-section {
    margin-bottom: 2rem;
  }
  
  .footer-quote {
    font-size: 1.1rem;
  }
  
  .mobile-nav a {
    font-size: 1.5rem;
    margin: 1.5rem 0;
  }
}

/* ================================================================
   ANIMATIONS ET MICRO-INTERACTIONS
   ================================================================ */

/* Animation au chargement de la page */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Préparation pour les animations JavaScript */
.fade-in {
  animation: fadeInUp 0.6s ease-out forwards;
}

/* Transition fluide pour tous les éléments interactifs */
button, input, textarea, select {
  transition: all var(--transition-duration) ease;
}

/* Focus states pour l'accessibilité */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--or-somptueux);
  outline-offset: 2px;
}

/* Hover effects génériques */
.hover-lift {
  transition: transform var(--transition-duration) ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
}

/* ================================================================
   UTILITAIRES
   ================================================================ */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* Couleurs utilitaires */
.text-or { color: var(--or-somptueux); }
.text-argent { color: var(--argent-brosse); }
.text-bleu { color: var(--bleu-nuit-strategique); }

.bg-anthracite { background-color: var(--anthracite-profond); }
.bg-anthracite-clair { background-color: var(--anthracite-clair); }

/* ================================================================
   FIN DU FICHIER GLOBAL.CSS
   ================================================================ */

   /* ======================================================= */
/* == CORRECTION DE L'ESPACEMENT MAIN/FOOTER            == */
/* ======================================================= */

/**
 * Cible la TOUTE DERNIÈRE section à l'intérieur de la balise <main>
 * et supprime sa marge inférieure pour qu'elle se colle
 * proprement au footer qui la suit.
 */
main > section:last-of-type {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/**
 * Par sécurité, on s'assure que le footer n'a pas de marge supérieure
 * qui pourrait créer un espacement non désiré.
 */
footer {
    margin-top: 0 !important;
}