 /* --- Style général --- */
  body {
    font-family: Arial, sans-serif;
    padding: 18px;
    background: #f9faf6;   /* Vert très clair/crème, ambiance nature */
    color: #2d3a21;        /* Vert foncé naturel */
    margin: 0;background-image:url(fond.jpg);
  }
  .like-btn {
  margin-left: 8px;
  cursor: pointer;
  background: none;
  border: none;
  font-size: 1.2em;padding:0;
}
.like-btn:hover {
  transform: scale(1.2);
}
  #title { font-family: cursive;
    text-align: center; background: #ebf0d6;
   font-size:24px;width:30%;margin:0 auto;border-radius:10px;font-weight:bold;border: 2px solid grey;padding:0.5em;
    margin-bottom: 14px;
      color: #386641;      
  }
  /* --- Zone des contrôles en haut --- */
  #controls {
    max-width: 960px;
    margin: 0 auto 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    background: #d9e6c2;   /* Vert tendre pastel */
    border-radius: 8px;
    padding: 15px 20px;
    box-shadow: 0 2px 6px rgba(56,102,65,0.15);
    color: #335533;
    font-size: 14px;
    line-height: 1.4;
  }
  #controls > * {
    flex: 1 1 180px;
    max-width: 240px;
  }
  /* Label pour case à cocher verrouillage */
  #lockSlidersLabel {
    align-self: center;
    flex: 1 1 180px;
    max-width: 220px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  /* Container planning */
  #planningContainer {
    max-width: 960px;
    margin: 0 auto 30px;
    display: flex;
    flex-wrap: nowrap;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 6px;
  }
  /* Chaque semaine s'affiche en colonne */
  .semaine {
    flex: 1 0 260px;
    border: 1px solid #a7c957; /* Vert clair */
    border-radius: 8px;
    background: #e9f1df;        /* Vert très clair */
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 6px rgba(56,102,65,0.15);
    min-width: 260px;
  }
  /* Entête de semaine */
  .semaine-header {
    background: #6a994e; /* Vert moyen */
    color: #f2f4f3;      /* Blanc pâle */
    text-align: center;
    font-weight: bold;
    padding: 10px 0;
    border-radius: 8px 8px 0 0;
    user-select: none;
    font-size: 1.1em;
  }
  /* Chaque jour dans une semaine */
  .jour {
    border-top: 1px solid #a7c957;
    padding: 10px 15px;
    user-select: none;
    cursor: pointer;
    outline: none;
  }
  /* Premier jour sans bordure haute */
  .jour:first-child {
    border-top: none;
  }
  /* Focus visible clavier */
  .jour:focus {
    box-shadow: 0 0 5px 2px #80ad4e;
    background: #d0e0a9; /* Vert clair */
  }
  /* Label jour */
  .jour-label {
    font-weight: 700;text-decoration: underline;
    margin-bottom: 0px;
    font-size: 1.05em;
    color: #386641;
  }
  /* Détail repas dans chaque jour */
  .meal-item {
    margin-bottom: 6px;height:1.5em;
    font-size: 0.9em;
    color: #355e3b;
  }
  /* Portion style */
  .meal-item .portion {
    background: #ffe8d6;
    color: #554b32;
    border-radius: 6px;
    padding: 1px 6px;
    margin-left: 6px;
    font-weight: normal;
    font-size: 0.85em;
    display: inline-block;
  }
  /* Nombre personnes */
  .nbpers {
    margin-top: 6px;
    font-size: 0.88em;
    font-weight: 600;
    color: #386641;
  }
  /* Calories et macros affichage */
  .calories, .macros {
    margin-top: 1.8em;
    font-weight: 700;
    font-size: 1em;
  }
  .calories {
    color: #bb3e03;  /* Rouge tomatto foncé */
  }
  /* Alertes macros couleur */
  .macro-alert {
    font-weight: 800;
    font-size: 0.9em;
    margin-top: 4px;
  }
  .macro-green {
    color: #386641;
  }
  .macro-orange {
    color: #ffb703;
  }
  .macro-red {
    color: #bb3e03;
  }
  /* Modal principale */
  .modal-bg {
    position: fixed;
    top:0; left:0; right:0; bottom:0;
    background: rgba(0,0,0,0.35);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1100;
  }
  .modal {
    background: #f4f1de;
    padding: 20px 25px;
    border-radius: 9px;
    width: 460px;
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 14px rgba(107, 142, 35, 0.3);
    color: #354f27;
  }
  .modal h2 {
    margin-top: 0;
    font-weight: 700;
    font-size: 1.3em;
    color: #386641;
    margin-bottom: 14px;
  }
  /* Form controls labels */
  label {
    display: block;
    margin-top: 12px;
    font-weight: 600;
    font-size: 0.95em;
  }
  /* Inputs, selects, textarea style */
  select, input[type=number], textarea {
    width: 100%;
    padding: 7px;
    font-size: 1em;
    border-radius: 5px;
    border: 1px solid #6a994e;
    box-sizing: border-box;
    margin-top: 4px;
    font-family: Arial, sans-serif;
    background: #ebf0d6;
    color: #3a5030;
  }
  /* Focus style on form controls */
  select:focus, input[type=number]:focus, textarea:focus {
    border-color: #386641;
    box-shadow: 0 0 5px 1px #80ad4e;
    outline: none;
  }
  textarea {
    resize: vertical;
    min-height: 60px;
  }
  /* Boutons */
  button {
    margin-top: 20px;
    padding: 10px 15px;
    background: #ee6c4d;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1em;
    transition: background-color 0.25s ease;
  }
  button:hover:not([disabled]) {
    background: #f49b60;
  }
  button[disabled] {
    background: #888;
    cursor: not-allowed;
  }
  /* Details summary style */
  details summary {
    cursor: pointer;
    margin-top: 18px;
    font-weight: 600;
    font-size: 1em;
    outline-offset: 2px;
    outline: none;
    color: #46733a;
  }
  details summary::-webkit-details-marker {
    display:none;
  }
  details > :last-child {
    margin-top: 14px;
  }
  /* Liste des courses */
  .list-courses {
    max-width: 920px;
    margin: 0 auto 30px;
    background: #fefae0;
    padding: 18px 25px;
    border-radius: 10px;
    box-shadow: 0 1px 7px rgba(167,201,87,0.8);
    color: #606c38;
  }
  .list-courses h3 {
    text-align:center;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 16px;
    color: #335533;
  }
  .list-courses ul {
    list-style: inside disc;
    margin: 0;
    padding-left: 12px;
    column-count: 2;
    column-gap: 18px;
    font-size: 1em;
  }
  .list-courses ul li {
    margin-bottom: 7px;
    line-height: 1.3;
  }
  /* Scrollbar custom */
  #planningContainer::-webkit-scrollbar {
    height: 8px;
  }
  #planningContainer::-webkit-scrollbar-thumb {
    background-color: #a7c957;
    border-radius:4px;
  }
  /* Responsive layout : semaines verticales sur petits écrans */
  @media (max-width: 720px) {
    #planningContainer {
      flex-direction: column;
      overflow-x: visible;
    }
    .semaine {
      width: auto;
      min-width: auto;
      margin-bottom: 24px;
    }
    #macrosSliders {
      max-width: 95%;
      margin: 15px auto;
    }
    .modal {
      width: 95vw !important;
      max-height: 80vh !important;
    }
  }
  /* Curseurs style */
  input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    height: 9px;
    border-radius: 5px;
    background: #d9e6c2;
    outline: none;
    margin-top: 4px;
  }
  input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #386641;
    cursor: pointer;
    border: 2px solid #a7c957;
    margin-top: -7px;
  }
  input[type=range]:focus::-webkit-slider-thumb {
    background: #6a994e;
  }
  input[type=range]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #386641;
    cursor: pointer;
    border: 2px solid #a7c957;
  }
  /* Format pre for recipe steps */
  pre.recipe-steps {
    white-space: pre-wrap;
    font-family: inherit;
    background: #d9e6c2;
    border-radius: 5px;
    padding: 8px;
    margin-top: 6px;
    color: #274e13;
    font-size: 0.9em;
  }