/* ============================================================
   28INK MARRAKECH — Global Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&family=Inter:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

/* ─── CSS Variables ─── */
:root {
  --gold:       #C9A84C;
  --gold-light: #E8C97A;
  --gold-dark:  #9A7A2E;
  --black:      #0A0A0A;
  --dark:       #111111;
  --dark-2:     #1A1A1A;
  --dark-3:     #222222;
  --gray:       #888888;
  --light-gray: #CCCCCC;
  --white:      #F5F5F5;
  --red-accent: #8B0000;

  --font-title:  'Cinzel', serif;
  --font-body:   'Inter', sans-serif;
  --font-accent: 'Playfair Display', serif;

  --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --shadow-gold: 0 0 30px rgba(201, 168, 76, 0.25);
  --shadow-dark: 0 20px 60px rgba(0,0,0,0.8);
}

/* ─── Reset & Base ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--black);
  color: var(--white);
  overflow-x: hidden;
  max-width: 100%;
  line-height: 1.7;
  cursor: default;
}

/* Empêche tout élément de créer un overflow horizontal */
img, video, svg, canvas, iframe, embed, object {
  max-width: 100%;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--dark); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 3px; }

/* Custom Cursor */
.cursor {
  width: 12px; height: 12px;
  background: var(--gold);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 99999;
  transition: transform 0.1s ease;
  mix-blend-mode: difference;
}
.cursor-follower {
  width: 36px; height: 36px;
  border: 1px solid rgba(201,168,76,0.5);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 99998;
  transition: all 0.15s ease;
}

/* ─── Preloader ─── */
#preloader {
  position: fixed; inset: 0;
  background: var(--black);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}
#preloader.hidden { opacity: 0; visibility: hidden; }
.preloader-logo {
  font-family: var(--font-title);
  font-size: 3rem;
  color: var(--gold);
  letter-spacing: 0.3em;
  animation: pulseGold 1.5s ease-in-out infinite;
}
.preloader-sub {
  font-size: 0.75rem;
  letter-spacing: 0.5em;
  color: var(--gray);
  margin-top: 0.5rem;
  text-transform: uppercase;
}
.preloader-line {
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin-top: 2rem;
  animation: loadLine 2s ease forwards;
}
@keyframes loadLine { to { width: 200px; } }
@keyframes pulseGold {
  0%, 100% { opacity: 1; text-shadow: 0 0 20px rgba(201,168,76,0.5); }
  50%       { opacity: 0.6; text-shadow: 0 0 40px rgba(201,168,76,0.8); }
}

/* ─── Navigation ─── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  padding: 1.2rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  transition: var(--transition);
}
#navbar.scrolled {
  background: rgba(10,10,10,0.95);
  backdrop-filter: blur(20px);
  padding: 0.8rem 3rem;
  border-bottom: 1px solid rgba(201,168,76,0.15);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
}
/* Logo image crabe 28 INK — illustration avec fond transparent */
.nav-logo-img {
  height: 52px;
  width: 52px;
  object-fit: contain;
  flex-shrink: 0;
  /* Glow or doré autour du logo crabe */
  filter: drop-shadow(0 0 8px rgba(201,168,76,0.5)) drop-shadow(0 0 2px rgba(201,168,76,0.3));
  transition: var(--transition);
  border-radius: 0; /* pas de crop circulaire — le logo est une illustration */
}
.nav-logo:hover .nav-logo-img {
  filter: drop-shadow(0 0 18px rgba(201,168,76,0.9)) drop-shadow(0 0 4px rgba(201,168,76,0.5));
  transform: scale(1.08);
}

/* Fallback SVG inline (si image logo manquante) */
.logo-svg-icon {
  height: 52px;
  width: 52px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(201,168,76,0.4));
  transition: var(--transition);
  display: none; /* caché par défaut — affiché si img échoue */
}
.nav-logo:hover .logo-svg-icon {
  filter: drop-shadow(0 0 18px rgba(201,168,76,0.7));
  transform: scale(1.05);
}
.nav-logo-text {
  font-family: var(--font-title);
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  color: var(--gold);
  line-height: 1.2;
}
.nav-logo-text span { display: block; font-size: 0.6rem; letter-spacing: 0.4em; color: var(--gray); font-family: var(--font-body); text-transform: uppercase; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
}
.nav-links a {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--light-gray);
  text-decoration: none;
  position: relative;
  transition: var(--transition);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.3s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: nowrap;
  flex-shrink: 0;
}
/* Hamburger masqué sur desktop */
@media (min-width: 769px) {
  .nav-hamburger { display: none !important; }
}
/* Nav links masquées sur mobile */
@media (max-width: 768px) {
  .nav-links { display: none !important; }
}
.nav-social a {
  color: var(--gray);
  font-size: 1rem;
  transition: var(--transition);
  text-decoration: none;
}
.nav-social a:hover { color: var(--gold); transform: translateY(-2px); }

.lang-switcher {
  display: flex;
  gap: 0.4rem;
}
.lang-btn {
  background: none;
  border: 1px solid rgba(201,168,76,0.3);
  color: var(--gray);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-body);
  border-radius: 2px;
}
.lang-btn.active, .lang-btn:hover {
  background: var(--gold);
  color: var(--black);
  border-color: var(--gold);
}

.btn-reserve {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.6rem 1.4rem;
  text-decoration: none;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.btn-reserve::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: -1;
}
.btn-reserve:hover { color: var(--black); }
.btn-reserve:hover::before { transform: translateX(0); }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
}
.nav-hamburger span {
  width: 24px; height: 1px;
  background: var(--gold);
  transition: var(--transition);
}
.nav-hamburger.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-hamburger.active span:nth-child(2) { opacity: 0; }
.nav-hamburger.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(10,10,10,0.98);
  backdrop-filter: blur(20px);
  z-index: 9998;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.76, 0, 0.24, 1);
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu a {
  font-family: var(--font-title);
  font-size: 2rem;
  color: var(--white);
  text-decoration: none;
  letter-spacing: 0.1em;
  transition: var(--transition);
  opacity: 0;
  transform: translateY(20px);
}
.mobile-menu.open a {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.5s ease var(--delay, 0s);
}
.mobile-menu a:hover { color: var(--gold); }

/* ─── Utility Classes ─── */
.section-title {
  font-family: var(--font-title);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--white);
  text-align: center;
  line-height: 1.1;
  position: relative;
}
.section-title span { color: var(--gold); }
.section-subtitle {
  text-align: center;
  color: var(--gray);
  font-size: 0.8rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: block;
}
.gold-line {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 1.5rem auto;
}
.gold-line-left {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
  margin: 1.5rem 0;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  background: var(--gold);
  color: var(--black);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 1rem 2.5rem;
  text-decoration: none;
  transition: var(--transition);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 100%, 12px 100%);
}
.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(201,168,76,0.4);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 1rem 2.5rem;
  text-decoration: none;
  transition: var(--transition);
}
.btn-outline:hover { background: var(--gold); color: var(--black); }

/* ─── Page Header (inner pages) ─── */
.page-header {
  height: 45vh;
  min-height: 350px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.page-header-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.3);
  transform: scale(1.05);
  animation: subtleZoom 20s ease-in-out infinite alternate;
}
@keyframes subtleZoom { from { transform: scale(1.05); } to { transform: scale(1.1); } }
.page-header-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 30%, var(--black));
}
.page-header-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
}
.page-header-content h1 {
  font-family: var(--font-title);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--white);
}
.page-header-content h1 span { color: var(--gold); }
.breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--gray);
}
.breadcrumb a { color: var(--gold); text-decoration: none; }
.breadcrumb span { color: var(--gray); }

/* ─── Animations ─── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }
.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }
.reveal-scale {
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal-scale.visible { opacity: 1; transform: scale(1); }

/* Stagger delays */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }

/* ─── Footer ─── */
footer {
  background: var(--dark);
  border-top: 1px solid rgba(201,168,76,0.15);
  padding: 2.5rem 3rem 1.5rem;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.footer-brand .nav-logo-text {
  font-size: 1.3rem;
  display: block;
  margin-bottom: 0.8rem;
}
.footer-brand p {
  color: var(--gray);
  font-size: 0.8rem;
  line-height: 1.8;
  max-width: 280px;
}
.footer-col h4 {
  font-family: var(--font-title);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 1rem;
  text-transform: uppercase;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul li a {
  color: var(--gray);
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 0.3s ease;
}
.footer-col ul li a:hover { color: var(--gold); }
.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}
.footer-social a {
  width: 36px; height: 36px;
  border: 1px solid rgba(201,168,76,0.3);
  display: flex; align-items: center; justify-content: center;
  color: var(--gray);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}
.footer-social a:hover { border-color: var(--gold); color: var(--gold); background: rgba(201,168,76,0.1); }
.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.2);
  letter-spacing: 0.1em;
}
.footer-bottom span { color: var(--gold); }

/* ─── Fallback images cassées (404/403) ─── */
/* Quand une image ne charge pas, affiche un gradient de fond */
.hero-slide {
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1208 50%, #0d0d0d 100%);
}
.hero-slide img {
  /* Si 403, le background du parent reste visible */
}
.style-card {
  background: linear-gradient(135deg, #111 0%, #1a1208 100%);
}
.style-card img {
  /* fallback: fond visible derrière */
}
.featured-item {
  background: linear-gradient(135deg, #111 0%, #0d0d0d 100%);
}
.blog-card-img {
  background: linear-gradient(135deg, #111 0%, #1a1208 100%);
}
.intro-visual-img {
  background: linear-gradient(135deg, #111 0%, #1a1208 100%);
}
/* img avec onerror invisible */
img[src=""] { display: none; }

/* ─── WhatsApp Floating Button ─── */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  width: 56px; height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  transition: var(--transition);
  animation: floatPulse 2s ease-in-out infinite;
}
.whatsapp-float:hover { transform: scale(1.1) translateY(-3px); box-shadow: 0 8px 30px rgba(37,211,102,0.6); }
.whatsapp-float svg { width: 28px; height: 28px; fill: white; }
@keyframes floatPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,0.4), 0 0 0 0 rgba(37,211,102,0.4); }
  50%       { box-shadow: 0 4px 20px rgba(37,211,102,0.4), 0 0 0 12px rgba(37,211,102,0); }
}

/* ─── Instagram Floating Button ─── */
.instagram-float {
  position: fixed;
  bottom: 6rem;
  right: 2rem;
  z-index: 999;
  width: 50px; height: 50px;
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(214,36,159,0.4);
  transition: var(--transition);
  color: white;
  font-size: 1.3rem;
}
.instagram-float:hover {
  transform: scale(1.12) translateY(-3px);
  box-shadow: 0 8px 28px rgba(214,36,159,0.55);
}
.instagram-float i { color: white; }

/* ─── Chatbot ─── */
.chatbot-btn {
  position: fixed;
  bottom: 2rem;
  right: 5.5rem;
  z-index: 999;
  width: 56px; height: 56px;
  background: var(--gold);
  border: none;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(201,168,76,0.4);
  transition: var(--transition);
  font-size: 1.4rem;
}
.chatbot-btn:hover { transform: scale(1.1) translateY(-3px); background: var(--gold-light); }

.chatbot-window {
  position: fixed;
  bottom: 5.5rem;
  right: 5.5rem;
  z-index: 998;
  width: 340px;
  background: var(--dark-2);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
  transform: scale(0.8) translateY(20px);
  transform-origin: bottom right;
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.chatbot-window.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}
.chatbot-header {
  background: linear-gradient(135deg, var(--dark-3), #1A1A1A);
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  border-bottom: 1px solid rgba(201,168,76,0.15);
}
.chatbot-avatar {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.chatbot-info h4 {
  font-family: var(--font-title);
  font-size: 0.85rem;
  color: var(--white);
  letter-spacing: 0.05em;
}
.chatbot-info span {
  font-size: 0.65rem;
  color: #4ade80;
  letter-spacing: 0.05em;
}
.chatbot-close {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--gray);
  font-size: 1.2rem;
  cursor: pointer;
  transition: color 0.2s;
}
.chatbot-close:hover { color: var(--white); }

.chatbot-messages {
  height: 280px;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.chatbot-messages::-webkit-scrollbar { width: 3px; }
.chatbot-messages::-webkit-scrollbar-thumb { background: var(--gold); }

.chat-msg {
  max-width: 85%;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  font-size: 0.8rem;
  line-height: 1.5;
}
.chat-msg.bot {
  background: var(--dark-3);
  border: 1px solid rgba(201,168,76,0.1);
  color: var(--light-gray);
  align-self: flex-start;
  border-radius: 4px 12px 12px 12px;
}
.chat-msg.user {
  background: var(--gold);
  color: var(--black);
  align-self: flex-end;
  border-radius: 12px 4px 12px 12px;
  font-weight: 500;
}

.chatbot-suggestions {
  padding: 0.5rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.suggestion-btn {
  background: rgba(201,168,76,0.1);
  border: 1px solid rgba(201,168,76,0.3);
  color: var(--gold);
  font-size: 0.7rem;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-body);
}
.suggestion-btn:hover { background: var(--gold); color: var(--black); }

.chatbot-input {
  padding: 0.8rem 1rem;
  border-top: 1px solid rgba(201,168,76,0.1);
  display: flex;
  gap: 0.5rem;
}
.chatbot-input input {
  flex: 1;
  background: var(--dark-3);
  border: 1px solid rgba(201,168,76,0.2);
  color: var(--white);
  font-size: 0.8rem;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.3s;
}
.chatbot-input input:focus { border-color: var(--gold); }
.chatbot-input button {
  width: 36px; height: 36px;
  background: var(--gold);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--black);
  font-size: 1rem;
  transition: var(--transition);
}
.chatbot-input button:hover { background: var(--gold-light); }

/* ─── Particles Background ─── */
#particles-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.15;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  #navbar { padding: 1rem 2rem; }
  .nav-links { gap: 1.5rem; }
}

@media (max-width: 768px) {
  .nav-links, .btn-reserve { display: none; }
  .nav-hamburger { display: flex; }
  #navbar { padding: 1rem 1.5rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
  .chatbot-window { width: 90vw; right: 2rem; }
  footer { padding: 2rem 1.5rem 1rem; }
}
