*{box-sizing:border-box}body{margin:0;padding:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;color:#2f3640}
a{color:inherit}

.topbar{
  position: sticky;
  top: 0;
  z-index: 900;
  background: #72256b;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #0002;
  /* Gestion de la zone iOS */
  padding-top: calc(10px + env(safe-area-inset-top));
  height: calc(60px + env(safe-area-inset-top));
}

.topbar .title{font-weight:700}.burger-global{font-size:22px;cursor:pointer}
.page{padding:16px}
.container{max-width:1100px;margin:0 auto}
.card{background:#fff;border:1px solid #eee;border-radius:14px;padding:16px;box-shadow:0 1px 2px rgba(0,0,0,.04)}
.alert{background:#ff0000;border:2px solid #dbeafe;padding:10px 12px;border-radius:10px;margin:10px 0}
.alert.success{background:#ecfdf5;border-color:#d1fae5}
.alert.error{background:#fef2f2;border-color:#fee2e2}
.alert-info{background:#fff7ed;border-color:#ffedd5;border-width:1px; font-weight: bold; background-color: #f9f9f9; color: red ;margin: 20px auto; box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1); border-radius: 8px;}
.btn-primary{background:#2563eb;color:#fff;border:none;padding:10px 14px;border-radius:10px;cursor:pointer}
.btn-outline{background:#fff;border:1px solid #cbd5e1;padding:8px 12px;border-radius:10px;cursor:pointer}
input[type=text],input[type=email],input[type=password],textarea,input[type=datetime-local]{width:100%;padding:10px;border:1px solid #e5e7eb;border-radius:10px;margin:6px 0}


/* Forcer une taille minimale de 16px sur tous les champs interactifs */
input, select, textarea, button {
  font-size: 16px;
}
/* Ciblage “safe” pour iOS Safari uniquement */
@supports (-webkit-touch-callout: none) {
  input, select, textarea {
    font-size: 16px;
  }
}

select, input {
  padding: 8px 10px;
  border-radius: 5px;
  border: 1px solid #ccc;
  width: 100%;
  box-sizing: border-box;
}

/* Formulaire en grid */
.form-grid {
  display: grid;
  grid-template-columns: 150px 1fr; /* label / champ */
  gap: 10px 20px;
  align-items: center;
}

.form-grid label {
  text-align: right;
  font-weight: bold;
}


#totalPrice {
  grid-column: 1 / -1;       /* prend toute la largeur de la grille */
  background-color: #fff3b0; /* jaune clair */
  border-radius: 12px;       /* arrondi doux */
  padding: 12px 15px;
  font-weight: bold;
  font-size: 1.2em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;                 /* espace entre icône et texte */
  box-shadow: 0 3px 6px rgba(0,0,0,0.1); /* léger relief */
  margin-top: 15px;
}

.total-icon {
  font-size: 1.5em;          /* icône plus grande */
}


.sidebar-global{position:fixed;left:0;top:0;bottom:0;width:240px;background:#72256b;color:#e5e7eb;z-index:950;padding:12px;border-right:1px solid #0004;transform:translateX(-105%);transition:transform .25s ease}
.sidebar-global .brand{font-weight:800;margin:4px 8px 12px}
.sidebar-global nav a{display:block;padding:10px 12px;border-radius:10px;text-decoration:none}
.sidebar-global nav a:hover{background:#111827}
#global-nav-toggle:checked~.sidebar-global{transform:translateX(0)}
@media(min-width:992px){.sidebar-global{transform:translateX(0)}.page{margin-left:240px;padding:20px}}

/* Chat */
.chat-toolbar{display:flex;align-items:center;gap:12px;margin-bottom:10px}
.chat-toggle-btn{display:none}
.chat-layout{display:flex;gap:16px;min-height:420px;position:relative}
.chat-main{flex:1;display:flex;flex-direction:column}
.list{background:#f0f0f0;border-radius:10px;padding:12px;overflow-y:auto;max-height:60vh}
.message{max-width:70%;margin:8px 0;padding:10px 14px;border-radius:18px;line-height:1.4em;font-size:14px;display:inline-block;position:relative;clear:both;word-wrap:break-word}
.message .small{font-size:11px;color:#666;display:block;margin-bottom:4px}
.message.me{background:#DCF8C6;margin-left:auto;margin-right:6px;border-bottom-right-radius:4px}
.message.them{background:#fff;margin-right:auto;margin-left:6px;border-bottom-left-radius:4px;box-shadow:0 1px 2px rgba(0,0,0,.08)}
.chat-form{margin-top:10px;gap:8px}
.chat-form textarea{flex:1}

/* Conversations sidebar RIGHT */
.chat-sidebar{width:300px;background:#fff;border:1px solid #eee;border-radius:10px;overflow:hidden;z-index:1100}
.chat-sidebar.right{order:2}
.sidebar-header{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;background:#f6f7f9;border-bottom:1px solid #eee}
.sidebar-list{max-height:480px;overflow-y:auto}
.chat-item{display:flex;gap:10px;align-items:center;padding:10px 12px;text-decoration:none;color:#2f3640;border-bottom:1px solid #f2f2f2}
.chat-item:hover{background:#f7f9ff}.chat-item.active{background:#e6f0ff}
.chat-item .avatar{width:36px;height:36px;border-radius:50%;background:#273c75;color:#fff;display:flex;align-items:center;justify-content:center;font-weight:bold}
.chat-item .meta .name{font-size:14px;font-weight:600}.chat-item .meta .last{font-size:12px;color:#777}

/* Off-canvas mobile for chat sidebar */
.chat-overlay{display:none}
@media(max-width:991px){
  .chat-toggle-btn{display:inline-block}
  .chat-sidebar{position:fixed;top:0;right:0;height:100vh;width:85%;max-width:320px;transform:translateX(110%);transition:transform .3s ease;border-radius:0;box-shadow:-2px 0 10px rgba(0,0,0,.15)}
  .chat-sidebar.open{transform:translateX(0)}
  .chat-overlay{position:fixed;display:none;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.35);z-index:1050}
  .chat-overlay.show{display:block}
}
.article__hero {
    background: url();
    background-color: #72256b;
    background-position: right top;
    background-repeat: no-repeat;
}

/*CSS POUR LES TABLEAUX DE GESTION DES REPAS ANCIENNE VERSION */
.table-responsive {
  width: 100%;
  overflow-x: auto;   /* Scroll horizontal si besoin */
  -webkit-overflow-scrolling: touch; /* Scroll fluide iOS */
}

.table-responsive table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px; /* évite que ça casse l'affichage */
}

table th, table td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: center;
 /* white-space: nowrap; /* évite que le texte casse et prenne 2 lignes */
}

table th {
  background: #f8f8f8;
}

/* GESTION REPAS CARTE NOUVELLE VERSION */
.repas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding: 20px;
}
/**/
.repas-card {
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  padding: 15px;
  text-align: center;
  position: relative;
}

.repas-img-wrapper {
  position: relative;
}

.repas-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
}

.reserved-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  /*background: rgba(220,20,60,0.8);*/
  color: #fff;
  padding: 5px 12px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 14px;
  text-transform: uppercase;
 /* background-image: url('./img/reserved.png');*/
  background-size: 100px 80px;
  background-repeat: no-repeat;
  
}

.btn-reserver {
  margin-top: 10px;
  background: linear-gradient(135deg, #ff7e5f, #feb47b);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.3s;
}
.btn-reserver:hover {
  transform: scale(1.05);
}

/***/
/*.repas-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}*/

.repas-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.repas-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.repas-body {
  padding: 15px;
  flex: 1;
}

.repas-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
}

.repas-desc {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 10px;
  line-height: 1.4;
}

.repas-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #444;
  margin-bottom: 10px;
}

.repas-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
}
.btn-edit {
  background: #007bff;
  color: #fff;
}
.btn-delete {
  background: #dc3545;
  color: #fff;
}

/* --- MODAL --- */
.modal {
  display: none; 
  position: fixed;
  z-index: 9999; 
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  justify-content: center; align-items: center;
}

.modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 16px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  animation: fadeIn 0.3s ease;
}

.modal-content h3 {
  margin-bottom: 15px;
}

.modal-actions {
  grid-column: 1 / -1; 
  display: flex;
  justify-content:center;
  margin-top: 20px;
  gap: 15px;               /* espace entre les boutons */
  margin-top: 20px;
}
.modal.hidden { display: none; }
.modal-actions button {
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
}

#addModal {
  opacity: 0;
  transition: opacity 0.25s ease;
}
#addModal[style*="display: flex"] {
  opacity: 1;
}


.btn-cancel {
  background: #ddd;
}

.btn-confirm {
  background: #e74c3c;
  color: #fff;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

.close {
  float: right;
  font-size: 22px;
  cursor: pointer;
}
.form-row { margin-bottom: 12px; display: flex; flex-direction: column; }
.form-row label { margin-bottom: 4px; font-weight: bold; }
.btn-primary {
  background: #007bff; color: white;
  border: none; padding: 10px 16px;
  border-radius: 6px; cursor: pointer;
}
.btn-primary:hover { background: #0056b3; }


.mySwiper {
    width: 100%;
    max-width: 500px;
    margin: auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    background: #fff;
  }
  .swiper-slide {
    text-align: center;
    padding: 20px;
  }
  .swiper-slide img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 10px;
  }
  .swiper-slide h3 {
    margin: 5px 0;
    font-size: 18px;
    color: #5a2d82; /* violet Vantive */
  }
  .swiper-slide p {
    font-size: 14px;
    color: #555;
  }
  .swiper-slide strong {
    display: block;
    margin-top: 8px;
    font-size: 16px;
    color: #2a9d8f;
  }
  .swiper-button-prev, .swiper-button-next{
   color:var(--text);
   background:rgba(17,24,39,.55);
   backdrop-filter: blur(6px);
   width:40px; height:40px; border-radius:999px;
   box-shadow:0 8px 20px rgba(0,0,0,.35);
}
/* PARTIE POUR LE MENU DES REPAS LIKE GLOVO */
.msg {
            background: #eafaf1;
            border: 1px solid #2ecc71;
            color: #27ae60;
            padding: 10px;
            margin-bottom: 15px;
            border-radius: 6px;
            font-weight: bold;
            text-align: center;
        }
.card-food {
            display: flex;
            background: white;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 3px 6px rgba(0,0,0,0.1);
            margin-bottom: 15px;
        }
.card-food img {
            width: 120px;
            height: 100%;
            padding: 3px;
            border-radius: 10px;
            object-fit: cover;
        }
.card-content {
            flex: 1;
            padding: 12px 15px;
        }
.card-content h3 {
            margin: 0;
            font-size: 18px;
            color: #2c3e50;
        }
.card-content p {
            margin: 6px 0;
            color: #666;
            font-size: 14px;
        }
.price {
            color: #e67e22;
            font-weight: bold;
            font-size: 16px;
        }
.btn {
            background: #27ae60;
            color: white;
            border: none;
            padding: 8px 14px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 14px;
            float: right;
        }
.btn:hover {
            background: #2ecc71;
        }
.total {
            margin-top: 20px;
            background: #f1c40f;
            color: #2c3e50;
            font-weight: bold;
            text-align: center;
            padding: 15px;
            border-radius: 10px;
            font-size: 18px;
        }
.options label, .heure label {
            display: block;
            background: #ecf0f1;
            margin: 5px 0;
            padding: 10px;
            border-radius: 8px;
            cursor: pointer;
            text-align: center;
        }
        input[type=radio] { display: none; }
        input[type=radio]:checked + label {
            background: #27ae60;
            color: white;
            font-weight: bold;
        }
.confirm-btn {
            width: 100%;
            background: #27ae60;
            color: white;
            border: none;
            padding: 12px;
            border-radius: 10px;
            cursor: pointer;
            font-size: 16px;
            margin-top: 15px;
        }
/* css pour le statut des repas livré et en cours */
.status-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 20px 0;
  font-family: "Poppins", sans-serif;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-weight: 600;
  font-size: 14px;
}

.step .circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 5px;
}

.step.active .circle {
  background: #4CAF50; /* vert moderne */
  color: white;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.step.inactive .circle {
  background: #f44336; /* rouge */
  color: white;
  opacity: 0.6;
}

.step.inactive p {
  text-decoration: line-through;
  color: #999;
}

.line {
  flex: 1;
  height: 3px;
  background: linear-gradient(to right, #4CAF50, #f44336);
  border-radius: 2px;
}
