/* ============================================================
   TANTI GUSTI II — PAGE CARTE
   Fichier : menu.css
   Rôle    : Styles spécifiques à menu.html uniquement.
             (Header de la carte, barre catégories, items, etc.)
   ============================================================ */


/* ============================================================
   1. HEADER DE LA PAGE CARTE (grande image en haut)
   ─────────────────────────────────────────────────────────────
   📁 IMAGE : définie dans menu.html
   ============================================================ */
.menu-page-header {
    position: relative;
    min-height: 38vh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

/* Conteneur de l'image */
.menu-page-header-bg {
    position: absolute;
    inset: 0;
}

/* Dégradé du bas vers le haut */
.menu-page-header-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--noir) 0%, rgba(14, 13, 11, 0.55) 100%);
}

/* Texte (titre + sous-titre) au-dessus de l'image */
.menu-page-header-content {
    position: relative;
    z-index: 1;
    padding: 120px 5% 56px;
}

.menu-page-header-content h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
}

.menu-page-header-content p {
    font-size: 0.8rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--or);
    margin-top: 10px;
    max-width: unset;
}


/* ============================================================
   2. BARRE DE CATÉGORIES (sticky = elle colle en haut du scroll)
   ───────────────────────────────────────────────────────────── */
.cat-bar {
    position: sticky;
    top: 62px;
    z-index: 100;
    background: var(--noir);
    border-bottom: 1px solid rgba(201, 164, 92, 0.1);
    overflow-x: auto;
    scrollbar-width: none;
}

.cat-bar::-webkit-scrollbar {
    display: none;
}

.cat-bar-inner {
    display: flex;
    gap: 0;
    width: max-content;
    min-width: 100%;
}

/* Bouton de catégorie */
.cat-btn {
    flex-shrink: 0;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--creme);
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 18px 24px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity var(--t-fast), border-color var(--t-fast), color var(--t-fast);
    white-space: nowrap;
}

@media (max-width: 600px) {
    .cat-btn {
        padding: 14px 18px;
        font-size: 0.65rem;
    }
}

/* Survol */
.cat-btn:hover {
    opacity: 1;
    color: var(--or);
}

/* Bouton actif */
.cat-btn.active {
    opacity: 1;
    color: var(--or);
    border-bottom-color: var(--or);
}


/* ============================================================
   3. ZONE PRINCIPALE DU MENU (sections + items)
   ============================================================ */
.menu-body {
    padding: 0 5% 80px;
}

.cat-section {
    padding-top: 64px;
}

.cat-section-title {
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    color: var(--or-clair);
    margin-bottom: 6px;
}

.cat-section-note {
    font-size: 0.78rem;
    font-style: italic;
    color: var(--sable);
    opacity: 0.7;
    margin-bottom: 28px;
}

.cat-section-divider {
    width: 100%;
    height: 1px;
    background: rgba(201, 164, 92, 0.1);
    margin-bottom: 32px;
}


/* ============================================================
   4. ITEMS DE LA CARTE (grille de plats)
   ============================================================ */

/* Grille responsive d'items */
.menu-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1px;
}

.menu-item {
    padding: 22px 24px;
    background: rgba(20, 18, 15, 0.65);
    border-bottom: 1px solid rgba(201, 164, 92, 0.06);
    border-right: 1px solid rgba(201, 164, 92, 0.04);
    transition: background var(--t-fast);
    position: relative;
}

.menu-item:hover {
    background: rgba(201, 164, 92, 0.08);
}

.menu-item-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    /* Alignement sur la ligne de base du texte */
    gap: 12px;
    margin-bottom: 6px;
}

.menu-item-price-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.menu-item-name {
    font-family: var(--font-serif);
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--blanc);
}

.menu-item-dots {
    flex: 1;
    border-bottom: 1px dotted rgba(201, 164, 92, 0.3);
    align-self: baseline;
    margin-bottom: 4px;
}

.menu-item-price {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 700;
    color: var(--or);
    white-space: nowrap;
    flex-shrink: 0;
}

.price-size {
    display: block;
    font-size: 0.65rem;
    color: var(--sable);
    opacity: 0.8;
    margin-top: 2px;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.menu-item-desc {
    font-size: 0.8rem;
    font-style: italic;
    color: var(--creme);
    opacity: 0.6;
    line-height: 1.5;
    max-width: unset;
}


/* ============================================================
   5. BLOC SUPPLÉMENTS
   ============================================================ */
.supplements-block {
    margin-top: 60px;
    padding: 40px;
    background: rgba(201, 164, 92, 0.05);
    /* Opacité du fond augmentée */
    border: 2px solid rgba(201, 164, 92, 0.2);
    /* Bordure plus épaisse */
    border-radius: 8px;
}

.supplements-block h3 {
    margin-bottom: 24px;
    font-size: 1.3rem;
    /* Titre plus grand */
    color: var(--or-clair);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.suppl-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

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

.suppl-item strong {
    font-size: 0.9rem;
    color: var(--blanc);
    font-weight: 400;
}

.suppl-item .price {
    color: var(--or);
    font-family: var(--font-serif);
}

/* ============================================================
   6. RESPONSIVE — PAGE CARTE
   ─────────────────────────────────────────────────────────────
   - Tablettes ( < 900px ) : 2 colonnes d'items
   - Mobiles   ( < 600px ) : 1 colonne, boutons plus petits
   ============================================================ */

/* Tablettes */
@media (max-width: 900px) {
    .menu-items-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobiles */
@media (max-width: 600px) {
    .menu-items-grid {
        grid-template-columns: 1fr;
    }

    .menu-item {
        padding: 20px;
    }

    .menu-page-header-content {
        padding: 140px 5% 40px;
        text-align: center;
    }
}

/* ============================================================
   7. MODAL APERÇU PRODUIT
   ============================================================ */
.pizza-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pizza-modal.active {
    display: flex;
    opacity: 1;
}

.pizza-modal-content {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.8);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    object-fit: contain;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pizza-modal.active .pizza-modal-content {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #fff;
    font-size: 50px;
    font-weight: 200;
    cursor: pointer;
    line-height: 1;
    z-index: 10001;
    transition: 0.3s;
}

.close-modal:hover {
    color: var(--gold-main);
}

/* Style interactif des items cliquables */
.clickable-item {
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.clickable-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.05);
}

.photo-icon {
    font-size: 0.8rem;
    margin-left: 8px;
    opacity: 0.6;
    vertical-align: middle;
}

/* ============================================================
   8. BOUTONS AJOUTER AU PANIER
   ============================================================ */
.menu-item-add {
    margin-top: 16px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.add-btn {
    flex: 1;
    min-width: 80px;
    background: transparent;
    border: 1px solid var(--or);
    color: var(--or);
    padding: 8px 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s var(--ease);
    border-radius: 4px;
}

.add-btn:hover {
    background: var(--or);
    color: var(--noir);
    box-shadow: 0 4px 12px rgba(201, 164, 92, 0.2);
    transform: translateY(-2px);
}

.add-btn:active {
    transform: scale(0.95);
}

/* Animation ajout panier */
@keyframes flyToCart {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(var(--tx), var(--ty)) scale(0.1);
        opacity: 0;
    }
}

.floating-item {
    position: fixed;
    z-index: 9999;
    background: var(--or);
    width: 15px;
    height: 15px;
    border-radius: 50%;
    pointer-events: none;
}

/* ============================================================
   9. MODALE SUPPLÉMENTS PIZZAS
   ============================================================ */
.supplement-modal.hidden {
  display: none;
}

.supplement-modal {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: block;
}

.supplement-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}

.supplement-modal-content {
  position: relative;
  z-index: 1;
  width: min(720px, calc(100vw - 28px));
  max-height: calc(100vh - 40px);
  margin: 20px auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: rgba(20, 18, 15, 0.98);
  border: 1px solid rgba(201, 164, 92, 0.28);
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.supplement-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(201, 164, 92, 0.25);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--or-clair);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.supplement-modal-header {
  padding: 28px 28px 18px;
  border-bottom: 1px solid rgba(201, 164, 92, 0.12);
}

.supplement-modal-label {
  display: block;
  color: var(--or);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.supplement-modal-header h3 {
  color: var(--or-clair);
  font-size: 1.7rem;
  margin-bottom: 8px;
}

.supplement-modal-header p {
  color: var(--creme);
  opacity: 0.78;
  margin: 0;
}

.supplement-list {
  padding: 22px 28px;
  overflow-y: auto;
}

.supplement-category {
  margin-bottom: 24px;
}

.supplement-category-title {
  color: var(--blanc);
  font-size: 0.9rem;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.supplement-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.supplement-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid rgba(201, 164, 92, 0.14);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.24);
  cursor: pointer;
}

.supplement-choice:hover {
  border-color: rgba(201, 164, 92, 0.42);
  background: rgba(201, 164, 92, 0.08);
}

.supplement-choice input {
  accent-color: var(--or);
}

.supplement-choice span {
  flex: 1;
  color: var(--creme);
  font-size: 0.88rem;
}

.supplement-choice strong {
  color: var(--or);
  font-size: 0.82rem;
  white-space: nowrap;
}

.supplement-modal-footer {
  padding: 18px 28px 24px;
  border-top: 1px solid rgba(201, 164, 92, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(0, 0, 0, 0.22);
}

.supplement-modal-total-block span {
  display: block;
  color: var(--sable);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.supplement-modal-total-block strong {
  display: block;
  color: var(--or-clair);
  font-size: 1.6rem;
  line-height: 1.1;
}

#pizza-supplement-add {
  min-width: 210px;
}

@media (max-width: 640px) {
  .supplement-modal-content {
    width: calc(100vw - 18px);
    max-height: calc(100vh - 18px);
    margin: 9px auto;
    border-radius: 14px;
  }

  .supplement-grid {
    grid-template-columns: 1fr;
  }

  .supplement-modal-header,
  .supplement-list,
  .supplement-modal-footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .supplement-modal-footer {
    flex-direction: column;
    align-items: stretch;
  }

  #pizza-supplement-add {
    width: 100%;
    min-width: 0;
  }
}

/* ==========================================================================
   GLOBAL RESPONSIVE FIXES (menu.css)
   ========================================================================== */
@media (max-width: 1024px) {
  .menu-items-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 768px) {
  .menu-items-grid {
    grid-template-columns: 1fr !important;
    gap: 15px;
  }
  .menu-section {
    padding: 0 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
  }
  .menu-category-title {
    text-align: left;
    margin-left: 0;
    width: 100%;
    padding: 0;
  }
  .product-card {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box;
  }
  .product-header, .product-desc, .product-actions {
    width: 100%;
    box-sizing: border-box;
  }
  .variants-group {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
  }
  .btn-variant, .btn-add {
    flex: 1;
    min-width: 45%;
    text-align: center;
  }
  .btn-add {
    width: 100%;
    margin-top: 5px;
  }
  
  /* Modale Suppléments */
  .supplement-modal-content {
    width: calc(100vw - 24px) !important;
    max-height: calc(100vh - 24px) !important;
    overflow-y: auto !important;
    margin: 12px auto !important;
  }
  .supplement-grid {
    grid-template-columns: 1fr !important;
  }
  .supplement-check-item {
    padding: 12px !important; 
  }
  #pizza-supplement-add {
    width: 100% !important;
    padding: 15px !important;
    font-size: 1.1rem !important;
  }
}