/* ============================================================
   RESTAURANT LE BAOBAB DORÉ — CSS PRINCIPAL RESPONSIVE
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── Variables ── */
:root {
  --orange:     #D85A30;
  --orange-lt:  #FAECE7;
  --orange-dk:  #993C1D;
  --teal:       #1D9E75;
  --teal-lt:    #E1F5EE;
  --dark:       #1A1206;
  --mid:        #4A3728;
  --muted:      #8C7B6E;
  --light:      #FBF7F4;
  --white:      #FFFFFF;
  --border:     rgba(74,55,40,0.12);
  --shadow-sm:  0 2px 8px rgba(26,18,6,0.08);
  --shadow-md:  0 6px 24px rgba(26,18,6,0.12);
  --shadow-lg:  0 16px 48px rgba(26,18,6,0.16);
  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans:  'DM Sans', system-ui, sans-serif;
  --nav-h:      68px;
  --transition: 0.25s cubic-bezier(0.4,0,0.2,1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font-sans); background: var(--light); color: var(--dark); line-height: 1.65; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font-sans); border: none; background: none; }
ul { list-style: none; }

/* ── Layout ── */
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 5rem 0; }
.section--sm { padding: 3rem 0; }

/* ── Typography ── */
h1,h2,h3,h4 { font-family: var(--font-serif); line-height: 1.2; color: var(--dark); }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }
p  { color: var(--mid); }

.section-header { text-align: center; margin-bottom: 3rem; }
.section-header .eyebrow { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--orange); font-weight: 600; margin-bottom: .5rem; }
.section-header h2 { margin-bottom: .75rem; }
.section-header p  { max-width: 520px; margin: 0 auto; }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .75rem 1.75rem; border-radius: 99px; font-size: .95rem; font-weight: 500; transition: all var(--transition); }
.btn-primary   { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-dk); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline   { border: 1.5px solid var(--orange); color: var(--orange); }
.btn-outline:hover { background: var(--orange-lt); }
.btn-wa        { background: #25D366; color: #fff; }
.btn-wa:hover  { background: #1EB85A; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(37,211,102,.35); }
.btn-sm        { padding: .5rem 1.25rem; font-size: .875rem; }
.btn-full      { width: 100%; justify-content: center; }

/* ================================================================
   NAVIGATION
   ================================================================ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-h);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; }
.navbar-logo { font-family: var(--font-serif); font-size: 1.35rem; color: var(--orange); font-weight: 700; }
.navbar-logo span { color: var(--dark); }
.navbar-links { display: flex; align-items: center; gap: 2rem; }
.navbar-links a { font-size: .9rem; font-weight: 500; color: var(--mid); transition: color var(--transition); }
.navbar-links a:hover, .navbar-links a.active { color: var(--orange); }
.navbar-cta { display: flex; align-items: center; gap: .75rem; }
.navbar-burger { display: none; flex-direction: column; gap: 5px; padding: 6px; }
.navbar-burger span { display: block; width: 22px; height: 2px; background: var(--dark); border-radius: 2px; transition: all var(--transition); }

/* Mobile nav */
.nav-mobile { display: none; position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0; background: var(--white); z-index: 999; padding: 2rem 1.5rem; flex-direction: column; gap: 1.5rem; overflow-y: auto; }
.nav-mobile.open { display: flex; }
.nav-mobile a { font-size: 1.2rem; font-weight: 500; color: var(--dark); padding: .5rem 0; border-bottom: 1px solid var(--border); }

.page-top { padding-top: var(--nav-h); }

/* ================================================================
   HERO
   ================================================================ */
.hero {
  min-height: 92vh;
  background: linear-gradient(135deg, #2A1A0E 0%, #4A2810 60%, #1A3020 100%);
  display: flex; align-items: center;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url('../uploads/hero-bg.jpg') center/cover no-repeat;
  opacity: .25;
}
.hero-content { position: relative; z-index: 1; max-width: 680px; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: .5rem; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); color: #F5C4B3; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; padding: .4rem 1rem; border-radius: 99px; margin-bottom: 1.5rem; }
.hero h1 { color: #fff; margin-bottom: 1.25rem; }
.hero h1 em { color: var(--orange); font-style: normal; }
.hero p { color: rgba(255,255,255,.75); font-size: 1.1rem; margin-bottom: 2rem; max-width: 480px; }
.hero-btns { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-scroll { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.5); font-size: .8rem; text-align: center; animation: bounce 2s infinite; }
@keyframes bounce { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(6px)} }

/* ================================================================
   SERVICES
   ================================================================ */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.service-card { background: var(--white); border-radius: var(--radius-md); padding: 1.75rem; border: 1px solid var(--border); transition: all var(--transition); text-align: center; }
.service-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.service-icon { font-size: 2.25rem; margin-bottom: 1rem; }
.service-card h3 { font-size: 1rem; font-family: var(--font-sans); font-weight: 600; margin-bottom: .4rem; color: var(--dark); }
.service-card p  { font-size: .875rem; }

/* ================================================================
   PLATS (cartes communes)
   ================================================================ */
.plats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.75rem; }
.plat-card { background: var(--white); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); transition: all var(--transition); cursor: pointer; }
.plat-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.plat-img-wrap { position: relative; height: 210px; overflow: hidden; background: #f0e8df; }
.plat-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.plat-card:hover .plat-img-wrap img { transform: scale(1.06); }
.plat-badge { position: absolute; top: .75rem; left: .75rem; background: var(--orange); color: #fff; font-size: .7rem; font-weight: 600; padding: .25rem .75rem; border-radius: 99px; letter-spacing: .05em; }
.plat-body { padding: 1.25rem; }
.plat-cat  { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--orange); font-weight: 600; margin-bottom: .3rem; }
.plat-body h3 { font-size: 1.05rem; font-family: var(--font-sans); font-weight: 600; margin-bottom: .4rem; color: var(--dark); }
.plat-body p { font-size: .875rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 1rem; }
.plat-footer { display: flex; align-items: center; justify-content: space-between; }
.plat-prix { font-size: 1.1rem; font-weight: 700; color: var(--orange); }

/* Semaine slider */
.semaine-slider { display: grid; grid-template-columns: repeat(7,1fr); gap: .75rem; overflow-x: auto; padding-bottom: .5rem; }
.semaine-slider::-webkit-scrollbar { height: 4px; }
.semaine-slider::-webkit-scrollbar-thumb { background: var(--orange-lt); border-radius: 2px; }
.jour-card { min-width: 130px; background: var(--white); border-radius: var(--radius-sm); overflow: hidden; border: 1.5px solid var(--border); transition: all var(--transition); }
.jour-card.today { border-color: var(--orange); }
.jour-card-head { background: var(--light); padding: .5rem .75rem; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.jour-card.today .jour-card-head { background: var(--orange); color: #fff; }
.jour-card-img { height: 90px; overflow: hidden; }
.jour-card-img img { width: 100%; height: 100%; object-fit: cover; }
.jour-card-body { padding: .6rem .75rem; }
.jour-card-body p { font-size: .75rem; font-weight: 600; color: var(--dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jour-card-body span { font-size: .7rem; color: var(--orange); font-weight: 600; }

/* ================================================================
   PAGE MENU — Filtres & grille
   ================================================================ */
.menu-filters { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.filter-btn { padding: .55rem 1.25rem; border-radius: 99px; font-size: .875rem; font-weight: 500; border: 1.5px solid var(--border); color: var(--mid); background: var(--white); transition: all var(--transition); }
.filter-btn:hover, .filter-btn.active { background: var(--orange); color: #fff; border-color: var(--orange); }
.menu-search { position: relative; max-width: 360px; }
.menu-search input { width: 100%; padding: .65rem 1rem .65rem 2.75rem; border: 1.5px solid var(--border); border-radius: 99px; font-size: .9rem; font-family: var(--font-sans); outline: none; transition: border var(--transition); background: var(--white); }
.menu-search input:focus { border-color: var(--orange); }
.menu-search-icon { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.menu-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; }

/* ================================================================
   MODAL PLAT
   ================================================================ */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.65); z-index: 2000; align-items: center; justify-content: center; padding: 1rem; }
.modal-overlay.open { display: flex; }
.modal-box { background: var(--white); border-radius: var(--radius-lg); max-width: 820px; width: 100%; max-height: 90vh; overflow-y: auto; position: relative; }
.modal-close { position: absolute; top: 1rem; right: 1rem; width: 36px; height: 36px; border-radius: 50%; background: var(--light); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; color: var(--mid); transition: all var(--transition); z-index: 1; }
.modal-close:hover { background: var(--orange); color: #fff; }
.modal-gallery { position: relative; }
.modal-main-img { width: 100%; height: 320px; object-fit: cover; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.modal-video-wrap { width: 100%; height: 320px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; overflow: hidden; background: #000; }
.modal-video-wrap iframe { width: 100%; height: 100%; border: none; }
.modal-thumbs { display: flex; gap: .5rem; padding: .75rem 1.25rem; overflow-x: auto; background: var(--light); }
.modal-thumb { width: 72px; height: 52px; border-radius: var(--radius-sm); overflow: hidden; cursor: pointer; border: 2px solid transparent; flex-shrink: 0; transition: border-color var(--transition); }
.modal-thumb:hover, .modal-thumb.active { border-color: var(--orange); }
.modal-thumb img { width: 100%; height: 100%; object-fit: cover; }
.modal-body { padding: 1.75rem; }
.modal-cat  { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--orange); font-weight: 600; margin-bottom: .3rem; }
.modal-body h2 { font-size: 1.6rem; margin-bottom: .75rem; }
.modal-body .desc { margin-bottom: 1.25rem; }
.ingredients-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.5rem; }
.ingredient-tag { background: var(--light); border: 1px solid var(--border); border-radius: 99px; font-size: .78rem; padding: .25rem .75rem; color: var(--mid); }
.modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 1.25rem; margin-top: 1rem; }
.modal-prix { font-size: 1.8rem; font-weight: 700; color: var(--orange); font-family: var(--font-serif); }

/* ================================================================
   FOOTER
   ================================================================ */
.footer { background: var(--dark); color: rgba(255,255,255,.7); padding: 4rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem; margin-bottom: 3rem; }
.footer-brand .logo { font-family: var(--font-serif); font-size: 1.5rem; color: var(--white); margin-bottom: 1rem; }
.footer-brand .logo span { color: var(--orange); }
.footer-brand p { font-size: .875rem; line-height: 1.7; max-width: 280px; }
.footer h4 { font-family: var(--font-sans); font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; color: var(--white); margin-bottom: 1.25rem; }
.footer ul li { margin-bottom: .6rem; }
.footer ul li a { font-size: .875rem; transition: color var(--transition); }
.footer ul li a:hover { color: var(--orange); }
.footer-social { display: flex; gap: .75rem; margin-top: 1.25rem; }
.footer-social a { width: 38px; height: 38px; background: rgba(255,255,255,.08); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .9rem; transition: all var(--transition); }
.footer-social a:hover { background: var(--orange); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding-top: 1.5rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; font-size: .8rem; }

/* ================================================================
   ADMIN
   ================================================================ */
.admin-wrap { display: flex; min-height: 100vh; }
.sidebar { width: 260px; background: var(--dark); flex-shrink: 0; display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; overflow-y: auto; transition: transform var(--transition); z-index: 500; }
.sidebar-logo { padding: 1.5rem 1.5rem 1rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-logo .name { font-family: var(--font-serif); font-size: 1.1rem; color: var(--white); }
.sidebar-logo .sub  { font-size: .72rem; color: rgba(255,255,255,.4); margin-top: .1rem; }
.sidebar-nav { padding: 1rem 0; flex: 1; }
.sidebar-section { font-size: .65rem; text-transform: uppercase; letter-spacing: .12em; color: rgba(255,255,255,.3); padding: .75rem 1.5rem .3rem; }
.sidebar-link { display: flex; align-items: center; gap: .75rem; padding: .7rem 1.5rem; font-size: .875rem; color: rgba(255,255,255,.65); transition: all var(--transition); border-left: 3px solid transparent; }
.sidebar-link:hover { background: rgba(255,255,255,.06); color: var(--white); }
.sidebar-link.active { background: rgba(216,90,48,.15); color: var(--orange); border-left-color: var(--orange); }
.sidebar-link .icon { font-size: 1rem; width: 20px; flex-shrink: 0; }
.sidebar-footer { padding: 1rem 1.5rem; border-top: 1px solid rgba(255,255,255,.08); }

.admin-main { margin-left: 260px; flex: 1; min-height: 100vh; background: #F5F0EB; }
.admin-topbar { background: var(--white); border-bottom: 1px solid var(--border); padding: 1rem 2rem; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; }
.admin-topbar h1 { font-size: 1.2rem; font-family: var(--font-sans); font-weight: 600; color: var(--dark); }
.admin-content { padding: 2rem; }

/* Stat cards admin */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.25rem; margin-bottom: 2rem; }
.stat-card { background: var(--white); border-radius: var(--radius-md); padding: 1.5rem; border: 1px solid var(--border); }
.stat-card .label { font-size: .8rem; color: var(--muted); margin-bottom: .5rem; text-transform: uppercase; letter-spacing: .06em; }
.stat-card .value { font-size: 2rem; font-weight: 700; color: var(--dark); font-family: var(--font-serif); }
.stat-card .sub   { font-size: .8rem; color: var(--teal); margin-top: .3rem; }

/* Tables admin */
.table-wrap { background: var(--white); border-radius: var(--radius-md); border: 1px solid var(--border); overflow: hidden; }
.table-head { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; }
.table-head h3 { font-size: 1rem; font-family: var(--font-sans); font-weight: 600; }
table.admin-table { width: 100%; border-collapse: collapse; }
table.admin-table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: .75rem 1.25rem; text-align: left; background: var(--light); }
table.admin-table td { padding: 1rem 1.25rem; border-top: 1px solid var(--border); font-size: .875rem; vertical-align: middle; }
table.admin-table tr:hover td { background: #FBF7F4; }
.overflow-table { overflow-x: auto; }

/* Badges statut */
.badge-statut { display: inline-block; font-size: .72rem; font-weight: 600; padding: .25rem .75rem; border-radius: 99px; }
.badge-en_attente    { background: #FEF3C7; color: #92400E; }
.badge-confirme      { background: #D1FAE5; color: #065F46; }
.badge-en_preparation{ background: #DBEAFE; color: #1E40AF; }
.badge-pret          { background: #E0E7FF; color: #3730A3; }
.badge-livre         { background: #D1FAE5; color: #065F46; }
.badge-annule        { background: #FEE2E2; color: #991B1B; }

/* Formulaires admin */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: .85rem; font-weight: 500; color: var(--dark); }
.form-group input,
.form-group select,
.form-group textarea { padding: .7rem 1rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: .9rem; font-family: var(--font-sans); outline: none; transition: border var(--transition); background: var(--white); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--orange); }
.form-group textarea { resize: vertical; min-height: 100px; }

/* Upload images */
.upload-zone { border: 2px dashed var(--border); border-radius: var(--radius-md); padding: 2rem; text-align: center; background: var(--light); transition: border-color var(--transition); cursor: pointer; }
.upload-zone:hover { border-color: var(--orange); }
.upload-zone p { font-size: .875rem; color: var(--muted); }
.upload-previews { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1rem; }
.upload-preview { position: relative; width: 120px; height: 90px; border-radius: var(--radius-sm); overflow: hidden; border: 1.5px solid var(--border); }
.upload-preview img { width: 100%; height: 100%; object-fit: cover; }
.upload-preview .del-btn { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,.6); color: #fff; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .7rem; cursor: pointer; }

/* Login admin */
.login-page { min-height: 100vh; background: var(--dark); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.login-card { background: var(--white); border-radius: var(--radius-lg); padding: 2.5rem 2rem; width: 100%; max-width: 400px; box-shadow: var(--shadow-lg); }
.login-logo { text-align: center; font-family: var(--font-serif); font-size: 1.5rem; color: var(--orange); margin-bottom: .5rem; }
.login-sub  { text-align: center; font-size: .875rem; color: var(--muted); margin-bottom: 2rem; }
.alert-error { background: #FEE2E2; color: #991B1B; border-radius: var(--radius-sm); padding: .75rem 1rem; font-size: .875rem; margin-bottom: 1.25rem; }
.alert-success { background: #D1FAE5; color: #065F46; border-radius: var(--radius-sm); padding: .75rem 1rem; font-size: .875rem; margin-bottom: 1.25rem; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .semaine-slider { grid-template-columns: repeat(7, 130px); }
}

@media (max-width: 768px) {
  .navbar-links, .navbar-cta .btn { display: none; }
  .navbar-burger { display: flex; }
  .hero { min-height: 80vh; }
  .hero-btns .btn:last-child { display: none; }
  .section { padding: 3.5rem 0; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .plats-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .modal-main-img, .modal-video-wrap { height: 240px; }
  .modal-footer { flex-direction: column; align-items: stretch; }
  .sidebar { transform: translateX(-260px); }
  .sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .admin-topbar .menu-toggle { display: flex; }
}

@media (max-width: 480px) {
   .admin-main { margin-left: 0; width: 350px;}
  .services-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .menu-toolbar { flex-direction: column; align-items: stretch; }
  .menu-search { max-width: 100%; }
}

/* Loader */
.loader { display: inline-block; width: 20px; height: 20px; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast notification */
.toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 3000; display: flex; flex-direction: column; gap: .5rem; }
.toast { background: var(--dark); color: var(--white); padding: .9rem 1.25rem; border-radius: var(--radius-sm); font-size: .875rem; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: .75rem; animation: slideIn .3s ease; }
.toast.success { border-left: 3px solid var(--teal); }
.toast.error   { border-left: 3px solid #E24B4A; }
@keyframes slideIn { from{opacity:0;transform:translateX(20px)} to{opacity:1;transform:translateX(0)} }
