/* =============================================
   LA TABLE DU JASMIN — Styles principaux
   ============================================= */

/* ===== Variables — Jasmin de Tunisie (blanc, jaune, gris) ===== */
:root {
  --white:        #FFFFFF;
  --offwhite:     #F5F5F8;        /* fond légèrement gris */
  --cream:        #EAEAF2;        /* gris très pâle */
  --cream-dark:   #C8C8D8;        /* gris doux */
  --yellow:       #EDB800;        /* jaune chaud, doré */
  --yellow-light: #FFE566;        /* jaune lumineux */
  --yellow-dark:  #B88A00;        /* jaune doré foncé */
  --pink:         #5E5E72;        /* gris principal */
  --pink-light:   #9898AE;        /* gris moyen-clair */
  --pink-pale:    #EAEAF2;        /* fond gris très léger */
  --pink-dark:    #3A3A4E;        /* gris foncé pour hover */
  --text-dark:    #1A1A2E;
  --text-mid:     #4A4A5E;
  --text-light:   #80808E;
  --border:       rgba(94,94,114,0.18);
  --shadow-sm:    0 2px 8px rgba(94,94,114,0.10);
  --shadow-md:    0 6px 24px rgba(94,94,114,0.14);
  --shadow-lg:    0 16px 48px rgba(94,94,114,0.18);
  --radius:       16px;
  --radius-sm:    8px;
  --transition:   all 0.28s ease;

  /* Couleurs de surface (modifiées en mode nuit) */
  --bg-body:      var(--offwhite);
  --bg-card:      #FFFFFF;
  --bg-header:    #FFFFFF;
  --bg-hero-from: #111111;
  --bg-hero-to:   #D4AF37;
  --bg-filter:    var(--cream);
  --bg-contact-from: #EAEAF2;
  --bg-contact-to:   #FFF5CC;
  --bg-footer:    #1A1A2E;
  --footer-text:  var(--pink-light);
  --hero-text:    #111111;
  --card-text:    var(--text-dark);
}

/* ===== MODE NUIT ===== */
[data-theme="dark"] {
  --white:        #12121E;
  --offwhite:     #17172A;
  --cream:        #20203A;
  --cream-dark:   #32324E;
  --text-dark:    #E8E8F0;
  --text-mid:     #AAAAC0;
  --text-light:   #70708A;
  --border:       rgba(94,94,114,0.28);
  --shadow-sm:    0 2px 8px rgba(0,0,0,0.3);
  --shadow-md:    0 6px 24px rgba(0,0,0,0.4);
  --shadow-lg:    0 16px 48px rgba(0,0,0,0.5);

  --bg-body:      #17172A;
  --bg-card:      #20203A;
  --bg-header:    #12121E;
  --bg-hero-from: #1E1E34;
  --bg-hero-to:   #1A160A;
  --bg-filter:    #20203A;
  --bg-contact-from: #1E1E34;
  --bg-contact-to:   #1A160A;
  --bg-footer:    #0C0C18;
  --footer-text:  var(--pink-light);
  --hero-text:    #E8E8F0;
  --card-text:    #E8E8F0;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Lato', sans-serif;
  background: var(--bg-body);
  color: var(--text-dark);
  line-height: 1.65;
  transition: background 0.35s ease, color 0.35s ease;
}

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

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

/* ===== Boutons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 50px;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  letter-spacing: 0.3px;
}

.btn-gold {
  background: var(--yellow);
  color: var(--text-dark);
}
.btn-gold:hover {
  background: var(--yellow-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,215,0,0.45);
}

.btn-insta {
  background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
  color: #fff;
}
.btn-insta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(253,29,29,0.35);
}

.btn-facebook {
  background: #1877F2;
  color: #fff;
}
.btn-facebook:hover {
  background: #0d65d9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(24,119,242,0.4);
}

.btn-large { padding: 14px 28px; font-size: 1rem; }

/* ===== Header ===== */
.header {
  background: var(--bg-header);
  border-bottom: 2px solid var(--pink-light);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(94,94,114,0.12);
  transition: background 0.35s ease;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.logo-flower {
  font-size: 2rem;
  color: var(--pink);
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(94,94,114,0.4));
}

.logo-title {
  font-family: 'Playfair Display', serif;
  color: var(--hero-text);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.15;
}

.logo-sub {
  color: var(--text-light);
  font-size: 0.7rem;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  font-weight: 300;
  margin-top: 2px;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  background: linear-gradient(150deg, var(--bg-contact-from) 0%, var(--bg-contact-to) 100%);
  padding: 100px 24px 90px;
  text-align: center;
  overflow: hidden;
  transition: background 0.35s ease;
}

.hero-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse 80px 80px at 10% 20%, rgba(94,94,114,0.08) 0%, transparent 100%),
    radial-gradient(ellipse 60px 60px at 90% 70%, rgba(255,215,0,0.12) 0%, transparent 100%),
    radial-gradient(ellipse 100px 100px at 50% 90%, rgba(180,180,200,0.1) 0%, transparent 100%);
  pointer-events: none;
}

/* Motif arabesque en arrière-plan */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cg fill='none' stroke='rgba(94,94,114,0.07)' stroke-width='1'%3E%3Ccircle cx='30' cy='30' r='25'/%3E%3Ccircle cx='30' cy='30' r='15'/%3E%3Cline x1='30' y1='5' x2='30' y2='55'/%3E%3Cline x1='5' y1='30' x2='55' y2='30'/%3E%3Cline x1='12' y1='12' x2='48' y2='48'/%3E%3Cline x1='48' y1='12' x2='12' y2='48'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 620px;
  margin: 0 auto;
}

.hero-eyebrow {
  color: var(--text-mid);
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 20px;
  font-weight: 700;
}

.hero-title {
  font-family: 'Playfair Display', serif;
  color: var(--text-dark);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.4;
  letter-spacing: 0.04em;
  margin-bottom: 20px;
}

.hero-title em {
  font-style: italic;
  color: var(--yellow-dark);
}

.hero-desc {
  color: var(--text-mid);
  font-size: 1.05rem;
  font-weight: 300;
  margin-bottom: 12px;
  transition: color 0.35s ease;
}

.hero-halal {
  display: inline-block;
  color: var(--text-mid);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: rgba(94,94,114,0.08);
  border: 1px solid rgba(94,94,114,0.2);
  padding: 5px 14px;
  border-radius: 50px;
  margin-bottom: 28px;
}

.hero-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--yellow), var(--pink));
  margin: 0 auto 32px;
  border-radius: 2px;
}

/* Fleurs décoratives flottantes */
.hero-flowers {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.hf {
  position: absolute;
  color: rgba(94,94,114,0.18);
  font-size: 3rem;
  animation: floatFlower 8s ease-in-out infinite;
}

.hf1 { top: 10%; left: 5%;  font-size: 2rem;   animation-delay: 0s; }
.hf2 { top: 60%; left: 3%;  font-size: 2.5rem; animation-delay: 1.5s; }
.hf3 { top: 15%; right: 6%; font-size: 3rem;   animation-delay: 3s; }
.hf4 { top: 70%; right: 4%; font-size: 2rem;   animation-delay: 4.5s; }
.hf5 { bottom: 10%; left: 50%; font-size: 1.5rem; animation-delay: 2s; }

@keyframes floatFlower {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(10deg); }
}

/* ===== Section Menu ===== */
.menu-section {
  padding: 72px 24px;
  background: var(--bg-body);
  transition: background 0.35s ease;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* En-tête de section */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-eyebrow {
  color: var(--pink);
  font-size: 0.8rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 10px;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--hero-text);
  margin-bottom: 16px;
}

.gold-line {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--yellow), var(--pink), transparent);
  margin: 0 auto;
  border-radius: 2px;
}

/* ===== Filtres ===== */
.filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 40px;
  padding: 20px 24px;
  background: var(--bg-filter);
  border-radius: var(--radius);
  border: 1px solid var(--cream-dark);
  transition: background 0.35s ease;
}

.filter-categories {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: 50px;
  border: 2px solid var(--pink-light);
  background: transparent;
  color: var(--pink);
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--pink);
  color: #fff;
  border-color: var(--pink);
}

.sort-select {
  padding: 8px 16px;
  border-radius: 50px;
  border: 2px solid var(--pink-light);
  background: transparent;
  color: var(--pink);
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  outline: none;
  transition: var(--transition);
}

.sort-select:focus { border-color: var(--pink); }

/* ===== Grille Menu ===== */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 28px;
}

/* ===== Carte Plat ===== */
.menu-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--transition), background 0.35s ease;
  display: flex;
  flex-direction: column;
}

.menu-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--pink-light);
}

.card-image-wrap {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--pink-pale);
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.menu-card:hover .card-image {
  transform: scale(1.06);
}

.card-no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--pink-pale), var(--yellow-light));
  font-size: 3.5rem;
  color: var(--pink-light);
}

.card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--pink);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 50px;
}

.card-badge.badge-dessert {
  background: var(--yellow);
  color: var(--text-dark);
}

.card-unavailable-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 50px;
  letter-spacing: 0.5px;
}

.card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--card-text);
  margin-bottom: 8px;
  line-height: 1.3;
}

.card-description {
  color: var(--text-mid);
  font-size: 0.875rem;
  line-height: 1.6;
  flex: 1;
  margin-bottom: 16px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.card-price {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--pink);
}

.card-flower {
  color: var(--yellow);
  font-size: 1.1rem;
}

/* ===== États vides / chargement ===== */
.loading-state, .empty-state {
  grid-column: 1/-1;
  text-align: center;
  padding: 60px 24px;
  color: var(--text-light);
}

.loading-flower, .empty-flower {
  font-size: 3rem;
  color: var(--pink);
  margin-bottom: 16px;
  animation: spin 4s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.hidden { display: none !important; }

/* ===== Contact ===== */
.contact-section {
  position: relative;
  background: linear-gradient(150deg, var(--bg-contact-from) 0%, var(--bg-contact-to) 100%);
  border-top: 2px solid var(--pink-light);
  padding: 80px 24px;
  text-align: center;
  overflow: hidden;
  transition: background 0.35s ease;
}

.contact-pattern {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cg fill='none' stroke='rgba(94,94,114,0.07)' stroke-width='1'%3E%3Ccircle cx='30' cy='30' r='25'/%3E%3Ccircle cx='30' cy='30' r='15'/%3E%3Cline x1='30' y1='5' x2='30' y2='55'/%3E%3Cline x1='5' y1='30' x2='55' y2='30'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.contact-inner {
  position: relative;
  z-index: 2;
}

.contact-location {
  font-size: 1rem;
  font-weight: 700;
  color: var(--pink);
  margin-bottom: 12px;
  letter-spacing: 0.3px;
}

.contact-desc {
  color: var(--text-mid);
  font-size: 1.05rem;
  font-weight: 300;
  margin-bottom: 14px;
  line-height: 1.7;
}

.contact-halal {
  display: inline-block;
  color: var(--pink);
  font-size: 0.85rem;
  font-weight: 700;
  background: rgba(94,94,114,0.08);
  border: 1px solid rgba(94,94,114,0.2);
  padding: 5px 14px;
  border-radius: 50px;
  margin-bottom: 28px;
}

.contact-btns {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  align-items: flex-start;
}

/* ===== Popup téléphone ===== */
.phone-wrapper {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}

.phone-popup {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1.5px solid var(--pink-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 18px 20px;
  min-width: 230px;
  text-align: center;
  z-index: 50;
  animation: popupIn 0.18s ease;
}

/* Petite flèche en bas du popup */
.phone-popup::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  background: #fff;
  border-right: 1.5px solid var(--pink-light);
  border-bottom: 1.5px solid var(--pink-light);
  rotate: 45deg;
}

@keyframes popupIn {
  from { opacity: 0; transform: translateX(-50%) translateY(6px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.phone-popup-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 6px;
}

.phone-popup-number {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--pink);
  margin-bottom: 14px;
  letter-spacing: 1px;
}

.phone-popup-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.phone-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 50px;
  font-family: 'Lato', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  border: none;
}

.copy-btn {
  background: var(--pink-pale);
  color: var(--pink);
  border: 1.5px solid var(--pink-light);
}
.copy-btn:hover { background: var(--cream); }

.call-btn {
  background: var(--pink);
  color: #fff;
}
.call-btn:hover { background: var(--pink-dark); }

/* ===== Footer ===== */
.footer {
  background: var(--bg-footer);
  color: var(--footer-text);
  text-align: center;
  padding: 32px 24px;
  border-top: 2px solid var(--pink);
  transition: background 0.35s ease;
}

.footer-flower {
  font-size: 1.4rem;
  color: var(--yellow);
  margin-bottom: 10px;
}

.footer-location {
  font-size: 0.85rem;
  color: var(--pink-light);
  margin-top: 6px;
}

.footer-halal {
  font-size: 0.82rem;
  color: var(--yellow);
  margin-top: 4px;
  font-weight: 700;
}

.footer-sub {
  font-size: 0.8rem;
  color: rgba(180,180,200,0.45);
  margin-top: 6px;
  font-style: italic;
}

/* ===== Header droite ===== */
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ===== Bouton mode nuit ===== */
.theme-toggle {
  background: none;
  border: 2px solid var(--pink-light);
  border-radius: 50px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transition);
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: var(--pink-pale);
  border-color: var(--pink);
}

/* ===== Responsive — Tablette ===== */
@media (max-width: 768px) {
  /* Header */
  .header-inner { padding: 10px 16px; }
  .logo-title   { font-size: 1.05rem; }
  .logo-sub     { display: none; }           /* Masque le sous-titre */
  .logo-flower  { font-size: 1.6rem; }

  /* Hero */
  .hero         { padding: 64px 20px 52px; }
  .hero-title   { font-size: 1.9rem; }
  .hf3, .hf4   { display: none; }            /* Moins de fleurs décoratives */

  /* Menu */
  .menu-section { padding: 40px 16px; }
  .menu-grid    { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }

  /* Filtres : colonne sur mobile */
  .filters      { flex-direction: column; align-items: flex-start; padding: 14px 16px; gap: 12px; }
  .sort-select  { width: 100%; }

  /* Contact */
  .contact-section { padding: 52px 20px; }
  .contact-btns { flex-direction: column; align-items: center; }
  .btn-large    { width: 100%; max-width: 280px; justify-content: center; }
}

/* ===== Responsive — Mobile ===== */
@media (max-width: 480px) {
  /* Header : logo compact, insta icon only */
  .logo-flower  { font-size: 1.4rem; }
  .logo-title   { font-size: 0.95rem; }
  .insta-label  { display: none; }           /* Icône Instagram seulement dans le header */
  .header-right .btn-insta { padding: 8px 12px; border-radius: 50%; width: 38px; height: 38px; justify-content: center; }
  .contact-btns .btn-insta { width: 100%; max-width: 280px; border-radius: 50px; padding: 14px 28px; height: auto; font-size: 1rem; justify-content: center; }

  /* Hero */
  .hero         { padding: 50px 16px 44px; }
  .hero-title   { font-size: 1.65rem; }
  .hero-eyebrow { font-size: 0.75rem; }
  .hf1, .hf2, .hf5 { display: none; }

  /* Menu */
  .menu-grid    { grid-template-columns: 1fr 1fr; gap: 14px; }
  .card-body    { padding: 14px; }
  .card-name    { font-size: 1rem; }
  .card-price   { font-size: 1.1rem; }

  /* Section titre */
  .section-title { font-size: 1.6rem; }
}
