/* =====================================================
   SOFIE BENNA — Site vitrine — Cuisine Tunisienne
   Palette : crème / terracotta / rouge tunisien / or
   ===================================================== */

/* ======================================================
   CHARTE OFFICIELLE SOFIE BENNA
   Corail #E8856A / Vert #5A9E5A / Crème #FDF9F6
   (fidèle à la carte de visite et aux logos fournis)
   ====================================================== */
:root {
  --cream:       #FDF9F6;        /* Fond principal chaud */
  --beige:       #FAF2EC;        /* Sections alternées */
  --coral:       #E8856A;        /* Corail principal — couleur logo */
  --coral-dark:  #D4624A;        /* Corail foncé — hover */
  --coral-deep:  #B84A32;        /* Très foncé pour contrastes */
  --green:       #5A9E5A;        /* Vert casserole */
  --green-dark:  #3D7A3D;        /* Vert foncé */
  --text-dark:   #2A1A12;        /* Texte principal */
  --text-mid:    #7A4A36;        /* Texte secondaire */
  --text-light:  #B08878;        /* Texte léger */
  --white:       #FFFFFF;
  --shadow:      rgba(180, 80, 50, 0.1);
  --radius:      12px;
  --radius-lg:   20px;
  --transition:  0.3s ease;

  /* Alias pour cohérence avec l'ancien CSS */
  --terracotta:  var(--coral);
  --brown-dark:  var(--coral-deep);
  --gold:        #E8C090;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Lato', sans-serif; background: var(--cream); color: var(--text-dark); line-height: 1.7; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.text-center { text-align: center; }

.section-pretitle {
  font-size: 0.82rem; font-weight: 700; letter-spacing: 3px;
  text-transform: uppercase; color: var(--terracotta); margin-bottom: 10px;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  color: var(--brown-dark); margin-bottom: 16px; line-height: 1.2;
}
.section-desc { color: var(--text-mid); font-size: 1.02rem; max-width: 580px; margin: 0 auto 48px; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 30px; border-radius: 50px;
  font-family: 'Lato', sans-serif; font-weight: 700; font-size: 0.95rem;
  cursor: pointer; transition: all var(--transition); border: 2px solid transparent;
}
.btn-primary { background: var(--terracotta); color: var(--white); border-color: var(--terracotta); }
.btn-primary:hover { background: var(--brown-dark); border-color: var(--brown-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(196,114,74,0.35); }
.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.7); }
.btn-outline:hover { background: rgba(255,255,255,0.15); border-color: var(--white); }
.full-width { width: 100%; justify-content: center; }

/* ====================================================
   NAVIGATION
   ==================================================== */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 14px 0; transition: all 0.4s ease;
}
#navbar.scrolled {
  background: rgba(253,250,245,0.97); backdrop-filter: blur(10px);
  padding: 10px 0; box-shadow: 0 2px 20px var(--shadow);
}
.nav-container {
  max-width: 1160px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
}

/* Logo texte */
.nav-logo {
  display: flex;
  align-items: baseline;
  text-decoration: none;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 1px;
}
.logo-sofie {
  color: #FFFFFF;
  transition: color var(--transition);
}
.logo-benna {
  color: var(--coral);
  transition: color var(--transition);
}
#navbar.scrolled .logo-sofie { color: var(--text-dark); }
#navbar.scrolled .logo-benna { color: var(--coral-dark); }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  color: rgba(255,255,255,0.92); font-weight: 400; font-size: 0.93rem;
  transition: color var(--transition); position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -3px; left: 0;
  width: 0; height: 2px; background: var(--gold); transition: width var(--transition);
}
.nav-links a:hover::after { width: 100%; }
.nav-links a:hover { color: var(--gold); }
#navbar.scrolled .nav-links a { color: var(--text-mid); }
#navbar.scrolled .nav-links a:hover { color: var(--terracotta); }

.nav-cta {
  background: var(--terracotta); color: var(--white) !important;
  padding: 10px 22px; border-radius: 50px; font-weight: 700 !important;
}
.nav-cta:hover { background: var(--brown-dark); }
.nav-cta::after { display: none !important; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px; z-index: 1001;
}
.nav-toggle span {
  display: block; width: 26px; height: 2px; background: var(--white);
  border-radius: 2px; transition: all 0.3s;
}
#navbar.scrolled .nav-toggle span { background: var(--brown-dark); }
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ====================================================
   HERO
   ==================================================== */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; transform: scale(1.04); transition: transform 8s ease; }
.hero:hover .hero-bg { transform: scale(1.07); }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(44,24,16,0.75) 0%, rgba(92,46,14,0.52) 60%, rgba(196,114,74,0.28) 100%);
}
.hero-content { position: relative; z-index: 2; text-align: center; padding: 120px 24px 80px; max-width: 800px; }
.hero-pretitle { font-size: 1rem; letter-spacing: 2px; color: var(--gold); margin-bottom: 16px; font-weight: 300; }
.hero-title { font-family: 'Playfair Display', serif; font-size: clamp(3.5rem, 9vw, 6.5rem); color: var(--white); line-height: 1; margin-bottom: 20px; text-shadow: 0 2px 30px rgba(0,0,0,0.3); }
.hero-subtitle { font-size: clamp(1rem, 2.5vw, 1.25rem); color: rgba(255,255,255,0.88); margin-bottom: 42px; font-style: italic; font-family: 'Playfair Display', serif; }
.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-scroll { position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%); z-index: 2; color: rgba(255,255,255,0.7); font-size: 1.2rem; animation: bounce 2s infinite; }
@keyframes bounce { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(8px)} }

/* ====================================================
   À PROPOS
   ==================================================== */
.apropos { padding: 100px 0; background: var(--cream); }
.apropos-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.apropos-image { position: relative; }
.apropos-image img { width: 100%; height: 520px; object-fit: cover; border-radius: var(--radius-lg); box-shadow: 0 20px 60px var(--shadow); }
.apropos-badge { position: absolute; bottom: -20px; right: -20px; background: var(--terracotta); color: var(--white); padding: 18px 24px; border-radius: var(--radius); display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 0.9rem; box-shadow: 0 8px 30px rgba(196,114,74,0.4); }
.apropos-badge i { font-size: 1.3rem; }
.apropos-text .section-title { margin-bottom: 24px; }
.apropos-text p { color: var(--text-mid); margin-bottom: 16px; font-size: 1.02rem; }
.apropos-badges { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.badge-item { display: flex; align-items: center; gap: 7px; background: var(--beige); color: var(--brown-dark); padding: 8px 16px; border-radius: 50px; font-size: 0.88rem; font-weight: 700; }
.badge-item i { color: var(--terracotta); }

/* ====================================================
   GALERIE
   ==================================================== */
.galerie { padding: 100px 0; background: var(--beige); }
.galerie-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 260px; gap: 14px; }
.galerie-item { position: relative; overflow: hidden; border-radius: var(--radius); cursor: pointer; }
.galerie-wide { grid-column: span 2; }
.galerie-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.galerie-item:hover img { transform: scale(1.06); }
.galerie-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(44,24,16,0.78) 0%, transparent 60%); opacity: 0; transition: opacity var(--transition); display: flex; align-items: flex-end; padding: 16px; }
.galerie-item:hover .galerie-overlay { opacity: 1; }
.galerie-overlay span { color: var(--white); font-weight: 700; font-size: 0.93rem; font-family: 'Playfair Display', serif; display: flex; align-items: center; gap: 8px; }

/* ====================================================
   LIGHTBOX
   ==================================================== */
.lightbox {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(10,5,2,0.94); backdrop-filter: blur(6px);
  align-items: center; justify-content: center;
  animation: fadeIn 0.25s ease;
}
.lightbox.open { display: flex; }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }

.lightbox-content {
  position: relative; max-width: 88vw; max-height: 86vh;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.lightbox-content img {
  max-width: 100%; max-height: 80vh;
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px rgba(0,0,0,0.7);
  object-fit: contain;
}
#lightbox-caption { color: rgba(255,255,255,0.8); font-family: 'Playfair Display', serif; font-style: italic; font-size: 1rem; }

.lightbox-close {
  position: fixed; top: 24px; right: 28px;
  background: rgba(255,255,255,0.15); border: none; color: white;
  width: 46px; height: 46px; border-radius: 50%; font-size: 1.2rem;
  cursor: pointer; transition: background var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.lightbox-close:hover { background: var(--terracotta); }

.lightbox-prev, .lightbox-next {
  position: fixed; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.12); border: none; color: white;
  width: 52px; height: 52px; border-radius: 50%; font-size: 1.2rem;
  cursor: pointer; transition: background var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-prev:hover, .lightbox-next:hover { background: var(--terracotta); }

/* ====================================================
   SERVICES
   ==================================================== */
.services { padding: 100px 0; background: var(--cream); }
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-bottom: 40px; }
.service-card { background: var(--white); border-radius: var(--radius-lg); padding: 36px 24px; text-align: center; box-shadow: 0 4px 24px var(--shadow); transition: all var(--transition); border: 2px solid transparent; }
.service-card:hover { transform: translateY(-6px); border-color: var(--terracotta); box-shadow: 0 16px 40px var(--shadow); }
.service-card.featured { background: linear-gradient(135deg, var(--coral), var(--coral-dark)); color: var(--white); }
.service-icon { font-size: 2.2rem; margin-bottom: 18px; }
.service-card h3 { font-family: 'Playfair Display', serif; font-size: 1.2rem; margin-bottom: 12px; color: var(--brown-dark); }
.service-card.featured h3 { color: var(--white); }
.service-card p { color: var(--text-mid); font-size: 0.93rem; margin-bottom: 20px; line-height: 1.65; }
.service-card.featured p { color: rgba(255,255,255,0.88); }
.service-tag { display: inline-block; background: var(--beige); color: var(--terracotta); padding: 5px 14px; border-radius: 50px; font-size: 0.78rem; font-weight: 700; letter-spacing: 1px; }
.service-card.featured .service-tag { background: rgba(255,255,255,0.25); color: var(--white); }
.services-note { display: flex; align-items: center; gap: 14px; background: var(--beige); border-left: 4px solid var(--gold); padding: 18px 24px; border-radius: 0 var(--radius) var(--radius) 0; color: var(--text-mid); font-size: 0.95rem; }
.services-note i { color: var(--gold); font-size: 1.3rem; flex-shrink: 0; }

/* ====================================================
   AVIS
   ==================================================== */
.avis { padding: 100px 0; background: var(--beige); }
.avis-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 56px; }
.avis-card { background: var(--white); border-radius: var(--radius-lg); padding: 30px 26px; box-shadow: 0 4px 24px var(--shadow); transition: transform var(--transition); }
.avis-card:hover { transform: translateY(-4px); }
.avis-stars { color: var(--gold); font-size: 1.15rem; letter-spacing: 2px; margin-bottom: 14px; }
.avis-text { color: var(--text-mid); font-style: italic; font-size: 0.96rem; margin-bottom: 22px; line-height: 1.7; }
.avis-author { display: flex; align-items: center; gap: 12px; }
.avis-avatar { width: 42px; height: 42px; background: var(--terracotta); color: var(--white); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1rem; flex-shrink: 0; }
.avis-author strong { display: block; color: var(--brown-dark); font-size: 0.95rem; }
.avis-author span { color: var(--text-light); font-size: 0.82rem; }
.avis-form-wrapper { background: var(--white); border-radius: var(--radius-lg); padding: 40px; box-shadow: 0 4px 24px var(--shadow); max-width: 680px; margin: 0 auto; }
.avis-form-wrapper h3 { font-family: 'Playfair Display', serif; font-size: 1.4rem; color: var(--brown-dark); margin-bottom: 28px; display: flex; align-items: center; gap: 10px; }
.avis-form-wrapper h3 i { color: var(--terracotta); }

/* ====================================================
   FORMULAIRES
   ==================================================== */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group label { font-size: 0.88rem; font-weight: 700; color: var(--brown-dark); letter-spacing: 0.5px; }
.form-group input, .form-group textarea, .form-group select { padding: 13px 16px; border: 2px solid #E8D8C9; border-radius: var(--radius); font-family: 'Lato', sans-serif; font-size: 0.97rem; color: var(--text-dark); background: var(--cream); transition: border-color var(--transition), box-shadow var(--transition); outline: none; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--terracotta); box-shadow: 0 0 0 3px rgba(196,114,74,0.15); }
.form-group textarea { resize: vertical; min-height: 120px; }
.star-rating { display: flex; gap: 4px; font-size: 1.8rem; cursor: pointer; }
.star-rating span { color: #E8D8C9; transition: color var(--transition); line-height: 1; }
.star-rating span.active { color: var(--gold); }
.form-success { display: none; align-items: center; gap: 10px; color: #27ae60; font-weight: 700; margin-top: 16px; padding: 14px 18px; background: #eafaf1; border-radius: var(--radius); }

/* ====================================================
   CONTACT
   ==================================================== */
.contact { padding: 100px 0; background: var(--cream); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 56px; align-items: start; }
.contact-card { background: var(--white); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 16px; box-shadow: 0 2px 16px var(--shadow); }
.whatsapp-btn { display: flex; align-items: center; gap: 16px; transition: opacity var(--transition); }
.whatsapp-btn:hover { opacity: 0.85; }
.whatsapp-btn i { font-size: 2.2rem; color: #25D366; }
.whatsapp-btn strong { display: block; color: var(--brown-dark); font-size: 0.95rem; }
.whatsapp-btn span { color: var(--text-mid); font-size: 0.95rem; }
.contact-item { display: flex; align-items: center; gap: 16px; }
.contact-item i { font-size: 1.4rem; color: var(--terracotta); width: 36px; }
.contact-item strong { display: block; color: var(--brown-dark); font-size: 0.88rem; font-weight: 700; }
.contact-item a { color: var(--text-mid); font-size: 0.97rem; transition: color var(--transition); }
.contact-item a:hover { color: var(--terracotta); }
.contact-social { margin-top: 8px; }
.contact-social p { color: var(--text-mid); font-size: 0.9rem; margin-bottom: 14px; font-weight: 700; }
.social-links { display: flex; gap: 12px; }
.social-link { width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; color: var(--white); transition: transform var(--transition), box-shadow var(--transition); }
.social-link:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.2); }
.social-link.instagram { background: linear-gradient(135deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); }
.social-link.facebook { background: #1877F2; }
.social-link.tiktok { background: #010101; }
.contact-form-wrapper { background: var(--white); border-radius: var(--radius-lg); padding: 40px; box-shadow: 0 4px 24px var(--shadow); }

/* ====================================================
   FOOTER
   ==================================================== */
.footer { background: var(--coral-deep); color: rgba(255,255,255,0.85); padding: 56px 0 24px; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; margin-bottom: 40px; }
.footer-brand p { margin-top: 12px; color: rgba(255,255,255,0.58); font-size: 0.93rem; line-height: 1.7; }
.footer-social { display: flex; gap: 12px; margin-top: 16px; }
.footer-social a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.12); color: white; display: flex; align-items: center; justify-content: center; transition: background var(--transition); }
.footer-social a:hover { background: var(--terracotta); }
.footer-links, .footer-contact { display: flex; flex-direction: column; gap: 10px; padding-top: 8px; }
.footer-links strong, .footer-contact strong { color: var(--gold); font-size: 0.8rem; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 4px; }
.footer-links a, .footer-contact a { color: rgba(255,255,255,0.62); font-size: 0.93rem; transition: color var(--transition); display: flex; align-items: center; gap: 8px; }
.footer-links a:hover, .footer-contact a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px; text-align: center; color: rgba(255,255,255,0.42); font-size: 0.88rem; }

/* ====================================================
   RESPONSIVE
   ==================================================== */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .galerie-grid { grid-template-columns: repeat(2, 1fr); }
  .galerie-wide { grid-column: span 2; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: span 2; }
}

@media (max-width: 768px) {
  /* ---- MENU MOBILE ---- */
  .nav-links {
    display: none;
    position: fixed;
    inset: 0;
    background: #2C1810;       /* Fond plein, opaque */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    z-index: 999;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    font-size: 1.4rem !important;
    color: #FFFFFF !important;
    font-weight: 400;
  }
  .nav-links a.nav-cta {
    background: var(--terracotta) !important;
    color: #FFFFFF !important;
    padding: 12px 32px;
    border-radius: 50px;
  }
  .nav-links a::after { display: none; }

  .nav-toggle { display: flex; }

  /* ---- SECTIONS ---- */
  .apropos-grid { grid-template-columns: 1fr; gap: 48px; }
  .apropos-image img { height: 360px; }
  .apropos-badge { bottom: -14px; right: 12px; font-size: 0.82rem; padding: 14px 18px; }

  .avis-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
  .form-row { grid-template-columns: 1fr; }
  .avis-form-wrapper, .contact-form-wrapper { padding: 24px 18px; }

  /* Lightbox nav buttons on mobile */
  .lightbox-prev { left: 8px; width: 40px; height: 40px; }
  .lightbox-next { right: 8px; width: 40px; height: 40px; }
}

@media (max-width: 480px) {
  .services-grid { grid-template-columns: 1fr; }
  .galerie-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 170px; }
  .galerie-wide { grid-column: span 2; }
  .hero-title { font-size: 3rem; }
}

/* ====================================================
   ANIMATIONS SCROLL
   ==================================================== */
.fade-in { opacity: 0; transform: translateY(28px); transition: opacity 0.65s ease, transform 0.65s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }
