/* ====== Base ====== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Lora', serif;
}

body {
  background-color: #9B1C2F;
  color: #5C5C5C;
  padding: 0 10px;
  overflow-x: hidden;
}

.cadre-total {
  background-color: #D9CBA7;
  max-width: 1100px;
  margin: 20px auto;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* ====== Header & Nav ====== */

header {
  background-color: #9B1C2F;
  padding: 20px 0;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

nav a {
  color: #F1E6D6;
  text-decoration: none;
  font-size: 1.2em;
  font-family: 'Playfair Display', serif;
  text-transform: uppercase;
  margin: 10px 20px;
  transition: all 0.3s ease;
}

nav a.active,
nav a:hover {
  color: #FFF;
  text-decoration: underline;
}

/* ====== Main Sections ====== */
main section {
  margin-bottom: 30px;
  width: 100%;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

/* Titres des sections */
h1 {
  color: #9B1C2F;
  font-family: 'Playfair Display', serif;
  font-size: 1.5em;
  font-weight: 700;
  margin-bottom: 10px;
}

/* ====== Plats & Desserts ====== */

/* Plats */
.plat,
.menu-desserts li {
  background-color: #F1E6D6;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 15px;
  padding: 15px;
  color: #9B1C2F;
  text-align: left;
  font-family: 'Lora', serif;
  border: 3px solid #f5f5f5;
  font-size: 1em;
  line-height: 1.3;
}

.plat h2 {
  font-size: 1.2em;
  color: #666;
  margin-bottom: 8px;
  font-weight: normal;
}

/* Conteneur description plat & dessert : flex avec séparation nom & bloc prix/menu */
.plat-description,
.dessert-description {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 1em;
  font-weight: bold;
  color: #9B1C2F;
  flex-wrap: nowrap;
  gap: 15px;
}

/* Nom du plat / dessert - prend tout l'espace dispo */
.plat-nom,
.dessert-nom {
  flex: 1 1 auto;
  word-wrap: break-word;
  white-space: normal;
}

/* Prix + menu déroulant regroupés à droite */
.plat-prix-menu,
.dessert-prix-menu {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 10px;
  white-space: nowrap;
}

/* Prix stylisé */
.prix {
  font-weight: bold;
  color: #9B1C2F;
  white-space: nowrap;
  font-size: 1em;
}

/* Menu déroulant */
.menu-deroulant {
  font-size: 0.95em;
  padding: 5px;
  border: 1px solid #9B1C2F;
  background-color: #FFF;
  border-radius: 5px;
  max-width: 120px;
  width: auto;
  cursor: pointer;
}

.menu-deroulant option {
  padding: 5px;
}

/* Liste desserts */
.menu-desserts {
  list-style: none;
  padding-left: 0;
  max-width: 500px;
  margin: 0 auto;
}

.dessert-section > .plat {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Allergènes */
.infos-allergenes {
  margin-top: 10px;
  padding: 10px;
  background-color: #F1E6D6;
  border-radius: 5px;
  font-size: 0.9em;
  color: #555;
  text-align: left;
}

/* ====== Sold Out Styling ====== */
.sold-out {
  color: #999;
  text-decoration: line-through;
  text-decoration-color: #9B1C2F;
  text-decoration-thickness: 2px;
}

.sold-out-label {
  color: #ff0000;
  font-weight: bold;
  font-size: 0.9em;
  margin-left: 0.5em;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ====== Commander Section ====== */
.commander-section {
  text-align: center;
  margin: 30px 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.btn-commander {
  display: inline-block;
  background-color: #9B1C2F;
  color: #F1E6D6;
  font-size: 1.2em;
  font-family: 'Playfair Display', serif;
  padding: 12px 30px;
  border: 2px solid #9B1C2F;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  max-width: 300px;
  width: 100%;
}

.btn-commander:hover {
  background-color: #F1E6D6;
  color: #9B1C2F;
  transform: scale(1.1);
  text-decoration: underline;
}

/* ====== Footer ====== */
footer {
  background-color: #9B1C2F;
  color: #F1E6D6;
  text-align: center;
  padding: 20px 10px;
  font-size: 0.9em;
  border-radius: 10px;
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
}

/* ====== Responsive ====== */

/* Jusqu'à 1024px */
@media (max-width: 1024px) {
  main section {
    width: 80%;
    max-width: 900px;
    margin: 0 auto 30px;
  }

  main section h2 {
    font-size: 1.6em;
  }

  p, ul {
    font-size: 1em;
  }

  .plat, .menu-desserts li {
    padding: 5px;
  }

  .commander-section {
    margin: 30px auto;
    width: 100%;
  }

  .btn-commander {
    max-width: 300px;
    width: 100%;
  }

  footer {
    padding: 15px 0;
  }

  footer p {
    font-size: 0.85em;
  }
}

/* Jusqu'à 768px */
@media (max-width: 768px) {
  main section {
    width: 90%;
  }

  header {
    flex-direction: row;
    justify-content: center;
    align-items: center;
  }

  main section h2 {
    font-size: 1.4em;
  }

  p, ul {
    font-size: 1em;
  }

  .plat, .menu-desserts li {
    font-size: 1em;
    padding: 12px;
  }

  .plat-description,
  .dessert-description {
    font-size: 1em;
    line-height: 1.3;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
  }

  .commander-section {
    margin: 25px auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .btn-commander {
    font-size: 1.1em;
    padding: 10px 25px;
    max-width: 280px;
    width: 100%;
    margin-top: 15px;
  }

  .plat-nom,
  .dessert-nom {
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .sold-out-label {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .menu-deroulant {
    font-size: 0.85em;
    padding: 4px;
    width: 100%;
    max-width: none;
    margin-left: 0;
  }
}

/* Jusqu'à 480px */
@media (max-width: 480px) {
  .plat-description,
  .dessert-description {
    flex-direction: column;
    align-items: flex-start;
  }

  .plat-prix-menu,
  .dessert-prix-menu {
    margin-top: 8px;
    width: 100%;
    justify-content: flex-start;
    gap: 10px;
  }

  .plat-description .prix,
  .plat-description .menu-deroulant,
  .dessert-description .prix,
  .dessert-description .menu-deroulant {
    margin-left: 0;
    margin-top: 0;
    width: auto;
  }

  .menu-deroulant {
    width: 100%;
  }

  .commander-section {
    flex-direction: column;
  }

  .btn-commander {
    font-size: 1.2em;
    padding: 12px 30px;
    width: 100%;
  }
}

/* ====== Photo de plat (vignette, colonne toujours réservée) ====== */
.plat {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  text-align: left;
}

.plat-photo-conteneur {
  flex-shrink: 0;
  width: 90px;
  height: 90px;
  border-radius: 8px;
  overflow: hidden;
}

.plat-photo-conteneur img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Léger cadre/ombre uniquement quand une vraie photo est présente */
.plat-photo-conteneur.a-une-photo {
  border: 2px solid #F1E6D6;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.plat-contenu {
  flex: 1 1 auto;
  min-width: 0;
}

/* ====== Responsive : vignette légèrement plus petite sur mobile ====== */
@media (max-width: 480px) {
  .plat-photo-conteneur {
    width: 70px;
    height: 70px;
  }
  .plat {
    gap: 10px;
  }
}

/* ====== Compteur avant sold out (discret, dans la ligne de la date) ====== */
.compteur {
  display: inline-block;
  margin-left: 12.5em;
  font-size: 0.75em;
  font-style: italic;
  color: #9B1C2F;
  white-space: nowrap;
}

/* Sur petit écran : le compteur passe sous la date */
@media (max-width: 900px) {
  .compteur {
    display: block;
    margin-left: 0;
    margin-top: 2px;
    white-space: normal;
  }
}