/* ============================================================
   SITEPIZZA - Design Moderne Mobile-First
   Theme sombre chaleureux, oriente pizzeria
   Zero dependance externe (hors Google Fonts + Font Awesome)
   ============================================================ */

/* --- Variables --- */
:root {
  --bg-body: #0F0F0F;
  --bg-surface: #1A1A1A;
  --bg-card: #222222;
  --bg-card-hover: #2C2C2C;
  --bg-elevated: #2A2A2A;

  --primary: #FF6B35;
  --primary-light: #FF8F62;
  --primary-dark: #E55A28;
  --primary-glow: rgba(255, 107, 53, 0.15);

  --accent-red: #E63946;
  --accent-gold: #FFB800;
  --accent-green: #2ECC71;
  --accent-green-dark: #27AE60;

  --text-white: #FAFAFA;
  --text-primary: #E8E8E8;
  --text-secondary: #A0A0A0;
  --text-muted: #666666;

  --border: #2E2E2E;
  --border-hover: #444444;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 100px;
  --radius-full: 50%;

  --shadow-sm: 0 1px 4px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 24px var(--primary-glow);

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --nav-h: 54px;
  --container: 600px;
  --fab-size: 58px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  background: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
ul, ol { list-style: none; }

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  padding: 44px 20px 32px;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(255,107,53,0.07) 0%, transparent 60%),
    linear-gradient(180deg, #151515 0%, var(--bg-body) 100%);
  overflow: hidden;
}

/* Decorative pizza pattern (subtle) */
.hero::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Ccircle cx='30' cy='30' r='1.5' fill='%23FF6B35' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--container);
  margin: 0 auto;
}

.hero-logo {
  width: 110px;
  height: 110px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 3px solid var(--primary);
  box-shadow: 0 0 40px var(--primary-glow), var(--shadow-md);
  margin: 0 auto 18px;
  background: var(--bg-card);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 14px;
  letter-spacing: 0.3px;
  line-height: 1.2;
}

.hero-address {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
  transition: all 0.25s ease;
}

.hero-address:hover,
.hero-address:active {
  background: var(--primary-glow);
  border-color: var(--primary);
  color: var(--text-white);
}

.hero-address i {
  color: var(--primary);
  font-size: 16px;
  flex-shrink: 0;
}

/* ============================================================
   CATEGORY NAV (fixed bottom - thumb-friendly)
   ============================================================ */
.cat-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(15,15,15,0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  /* safe area pour iPhone avec barre home */
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.cat-scroll {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cat-scroll::-webkit-scrollbar { display: none; }

.cat-btn {
  flex-shrink: 0;
  scroll-snap-align: start;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.25s ease;
}

.cat-btn:hover { border-color: var(--primary); color: var(--text-white); }

.cat-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 16px rgba(255,107,53,0.35);
}

/* ============================================================
   ANNOUNCEMENTS
   ============================================================ */
.announcements {
  max-width: var(--container);
  margin: 0 auto;
  padding: 20px 16px 4px;
}

.announce-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 12px;
}

.announce-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--primary-light);
  margin-bottom: 6px;
}

.announce-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.announce-date {
  display: block;
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

/* ============================================================
   MENU CONTENT
   ============================================================ */
.menu-content {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px 140px; /* espace pour la nav fixe en bas */
}

/* --- Section title --- */
.section-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-white);
  padding: 28px 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 22px;
  background: var(--primary);
  border-radius: 2px;
  flex-shrink: 0;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--border), transparent 80%);
}

/* --- Product card --- */
.product-card {
  display: flex;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 10px;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.product-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-white);
  margin-bottom: 4px;
  line-height: 1.3;
}

.product-ingredients {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-description {
  font-size: 12px;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 6px;
}

/* Multi-size prices */
.product-prices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.size-price {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 10px;
  background: rgba(255,107,53,0.08);
  border: 1px solid rgba(255,107,53,0.2);
  border-radius: var(--radius-pill);
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.size-price strong {
  color: var(--primary-light);
  font-weight: 700;
  font-size: 14px;
}

/* Single price */
.price-single {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  margin-top: auto;
}

.price-single .euro {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
}

/* Product image */
.product-img {
  width: 95px;
  height: 95px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-img .pizza-icon {
  font-size: 36px;
  color: var(--primary);
  opacity: 0.3;
}

/* ============================================================
   CONTACT SECTION
   ============================================================ */
.contact-section {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px 32px;
}

.contact-section.page {
  padding-top: 24px;
  padding-bottom: 140px;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
}

.contact-card h2 {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--text-white);
  margin-bottom: 20px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-secondary);
  transition: all 0.25s ease;
}

.contact-row:hover,
.contact-row:active {
  background: var(--primary-glow);
  border-color: rgba(255,107,53,0.3);
  color: var(--text-white);
}

.contact-row i {
  color: var(--primary);
  font-size: 18px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.contact-row span { text-align: left; flex: 1; }

/* --- Map embed container --- */
.map-container {
  margin-top: 20px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
}

.map-container iframe {
  width: 100%;
  height: 250px;
  border: 0;
  display: block;
}

/* ============================================================
   CATEGORIE PAGE (single category)
   ============================================================ */
.page-back {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px 16px 0;
}

.page-back a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.2s;
}

.page-back a:hover { color: var(--primary); }

/* ============================================================
   FLOATING ACTION BUTTON
   ============================================================ */
.fab-call {
  position: fixed;
  bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom, 0px));
  right: 20px;
  width: var(--fab-size);
  height: var(--fab-size);
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent-green) 0%, var(--accent-green-dark) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 20px rgba(46,204,113,0.35);
  z-index: 200;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: fabPulse 3s ease-in-out infinite;
}

.fab-call:hover,
.fab-call:active {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(46,204,113,0.5);
}

@keyframes fabPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(46,204,113,0.35); }
  50% { box-shadow: 0 4px 32px rgba(46,204,113,0.55); }
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 16px 120px; /* espace pour la nav fixe en bas */
  text-align: center;
  max-width: var(--container);
  margin: 0 auto;
}

.site-footer p {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.footer-nav a {
  font-size: 12px;
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-nav a:hover { color: var(--primary); }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .product-card {
    animation: slideUp 0.35s ease both;
  }
  .product-card:nth-child(2) { animation-delay: 0.04s; }
  .product-card:nth-child(3) { animation-delay: 0.08s; }
  .product-card:nth-child(4) { animation-delay: 0.12s; }
  .product-card:nth-child(5) { animation-delay: 0.16s; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   DESKTOP (min 768px)
   ============================================================ */
@media (min-width: 768px) {
  .hero { padding: 52px 20px 40px; }
  .hero-logo { width: 130px; height: 130px; }
  .hero h1 { font-size: 32px; }

  .section-title { font-size: 24px; }

  .product-card {
    padding: 18px;
  }
  .product-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
  }

  .product-img { width: 110px; height: 110px; }
  .product-name { font-size: 16px; }
  .product-ingredients { font-size: 13px; }

  .map-container iframe { height: 300px; }

  .fab-call {
    bottom: calc(var(--nav-h) + 20px);
    right: calc(50% - 330px);
  }
}

/* ============================================================
   THEME CLAIR
   ============================================================ */
[data-theme="light"] {
  --bg-body: #F4F4F5;
  --bg-surface: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F0F0F0;
  --bg-elevated: #FAFAFA;

  --primary: #E85A20;
  --primary-light: #D14E18;
  --primary-dark: #C44515;
  --primary-glow: rgba(232, 90, 32, 0.10);

  --accent-green: #27AE60;
  --accent-green-dark: #1E8C4C;

  --text-white: #1A1A1A;
  --text-primary: #2D2D2D;
  --text-secondary: #555555;
  --text-muted: #888888;

  --border: #E2E2E2;
  --border-hover: #CCCCCC;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.10);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
  --shadow-glow: 0 0 16px rgba(232,90,32,0.08);
}

[data-theme="light"] .hero {
  background:
    radial-gradient(ellipse at 50% 100%, rgba(232,90,32,0.06) 0%, transparent 60%),
    linear-gradient(180deg, #FFFFFF 0%, var(--bg-body) 100%);
}

[data-theme="light"] .hero::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Ccircle cx='30' cy='30' r='1.5' fill='%23E85A20' opacity='0.05'/%3E%3C/svg%3E");
}

[data-theme="light"] .hero-logo {
  box-shadow: 0 2px 16px rgba(0,0,0,0.10);
  background: #fff;
}

[data-theme="light"] .hero-address {
  background: rgba(0,0,0,0.03);
}
[data-theme="light"] .hero-address:hover,
[data-theme="light"] .hero-address:active {
  background: rgba(232,90,32,0.08);
}

[data-theme="light"] .cat-nav {
  background: rgba(255,255,255,0.95);
}

[data-theme="light"] .cat-btn.active {
  box-shadow: 0 2px 10px rgba(232,90,32,0.25);
}

[data-theme="light"] .product-card {
  box-shadow: var(--shadow-sm);
}

[data-theme="light"] .product-img {
  background: var(--bg-body);
}

[data-theme="light"] .announce-card {
  box-shadow: var(--shadow-sm);
}

[data-theme="light"] .contact-card {
  box-shadow: var(--shadow-sm);
}

[data-theme="light"] .contact-row {
  background: rgba(0,0,0,0.02);
}
[data-theme="light"] .contact-row:hover,
[data-theme="light"] .contact-row:active {
  background: rgba(232,90,32,0.06);
}

[data-theme="light"] .size-price {
  background: rgba(232,90,32,0.06);
  border-color: rgba(232,90,32,0.15);
}

[data-theme="light"] .fab-call {
  box-shadow: 0 4px 16px rgba(39,174,96,0.25);
}

/* --- Theme toggle button --- */
.theme-toggle {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 150;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-sm);
}

.theme-toggle:hover,
.theme-toggle:active {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--bg-card-hover);
}

/* Icone : soleil en dark, lune en light */
.theme-toggle .fa-sun { display: none; }
.theme-toggle .fa-moon { display: inline; }
[data-theme="light"] .theme-toggle .fa-sun { display: inline; }
[data-theme="light"] .theme-toggle .fa-moon { display: none; }

/* ============================================================
   SCROLLBAR (Webkit)
   ============================================================ */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-body); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
