/* Variables de couleurs - Style rustique unifié */
:root {
    --primary-color: #8B5E3C; /* brun boisé */
    --secondary-color: #A38966; /* beige chaud */
    --accent-color: #C1440E; /* terre cuite */
    --background-light: #F6F1E7; /* fond parcheminé */
    --background-gradient: linear-gradient(135deg, #EDE6DB 0%, #D4C4A8 100%);
    --text-dark: #3B2F2F; /* brun foncé */
    --text-light: #FAF9F6;
    --shadow-soft: 0 8px 30px rgba(139, 94, 60, 0.15);
    --shadow-hover: 0 14px 45px rgba(139, 94, 60, 0.2);
    --border-radius: 12px;
    --transition-speed: 0.3s;
    --sans-serif: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* RESET ET BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--background-gradient);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* NAVIGATION TOP RESPONSIVE */
.top-nav {
    background: var(--background-light);
    padding: 14px 15px;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 2000;
    box-shadow: var(--shadow-soft);
    border-bottom: 4px solid var(--primary-color);
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    flex-wrap: wrap;
}

.top-nav a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition-speed) ease;
    padding: 8px 12px;
    border-radius: 6px;
    margin: 2px;
}

.top-nav a:hover, .top-nav a.active {
    background-color: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(139, 94, 60, 0.2);
}

/* RESPONSIVE NAVIGATION */

@media (max-width: 768px) {
    .top-nav {
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center;
    }
}



/* ==================== PAGE PRINCIPALE ==================== */

body.home-page {
    padding-top: 60px;
    padding-right: 179px;
    font-family: 'Inter', sans-serif;
    background: var(--background-gradient);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Containers for the maps */


.map-text-container {
  max-width: 67.5rem;
  margin: 1.25rem auto 3.125rem auto;
  font-size: 1.1em;
  line-height: 1.7;
  padding: 1.875rem 2.5rem;
  background-color: #fffaf3;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
}

.map-text-container p {
  margin-bottom: 20px;
  color: var(--text-dark);
  text-align: center;
}

.map-text-container h2 {
  color: var(--primary-color);
  margin-bottom: 15px;
  text-align: center;
}

.sliderContainer {
  display: block;
  align-items: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
/* animals slaughtered visualisation*/
#actual-detail-containeranimals-slaughtered * {
    box-sizing: border-box;
  }
  
#actual-detail-containeranimals-slaughtered {
width: 100vmin;
height: 100vmin;
margin: auto;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
background-color: #fffaf3;
border: 2px solid #8b7b6b;
border-radius: 8px;
padding: 2vmin;
box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
font-family: 'Inter', sans-serif;
color: #3e3e3e;
}

#actual-detail-containeranimals-slaughtered .title {
font-size: 2.5vmin;
font-weight: bold;
margin-bottom: 1vmin;
text-align: center;
}

#actual-detail-containeranimals-slaughtered .calendar {
display: grid;
width: 100%;
flex-grow: 1;
gap: 1vmin;
margin: 1vmin 0;
}

#actual-detail-containeranimals-slaughtered .time-unit {
border: 1px solid #8b7b6b;
background-color: #e0d6c3;
padding: 1vmin;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
font-size: 2vmin;
font-weight: bold;
position: relative;
flex-direction: column;
}

#actual-detail-containeranimals-slaughtered .filled-full {
background-color: #b15e5e !important;
color: white;
}

#actual-detail-containeranimals-slaughtered .filled-partial::before {
content: '';
position: absolute;
top: 0;
left: 0;
height: 100%;
background-color: #b15e5e;
z-index: 0;
}

#actual-detail-containeranimals-slaughtered .filled-partial span {
position: relative;
z-index: 1;
}

#actual-detail-containeranimals-slaughtered .summary {
font-size: 2vmin;
margin-top: 1vmin;
text-align: center;
font-weight: bold;
}



/* Side navigation */
.menu {
  position: fixed;
  top: 70px;
  right: 0px;
  width: 180px;
  height: 90%;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  border-radius: 0px;
  background-color: #fffaf3;
  padding: 25px 15px;
  box-shadow: var(--shadow-soft);
  z-index: 999;
  border-left: 4px solid var(--primary-color);
}

.menu a {
  margin: 12px 0;
  padding: 10px;
  text-align: center;
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 600;
  border-radius: 6px;
  transition: all var(--transition-speed) ease;
  background-color: rgba(243, 236, 221, 0.6);
}

.menu a:hover {
  background-color: var(--secondary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(139, 94, 60, 0.2);
}

.active-element {
  color: white;
  padding: 10px;
  margin-bottom: 15px;
  text-align: center;
  font-weight: 600;
  background-color: var(--primary-color);
  border-radius: 6px;
  border-left: 4px solid var(--primary-color);
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#active-element {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  transition: font-size 0.2s ease;
}


.chosen-food-element {
  font-size: 3rem; 
  font-weight: 700;
  text-align: center; 
  color: #3B2F2F;
  font-family: 'Inter', sans-serif; /* Style raffiné, parfait pour la gastronomie */
  margin: 2rem 0; /* Espacement autour du titre */
  text-transform: uppercase; /* Tout en majuscules pour l'effet "titre" */
  letter-spacing: 0.05em; /* Espacement entre les lettres */
  position: relative;
}


/* Container principal */
.container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  margin-top: -1rem;
  padding: 0px;
  padding-bottom: 50px;
}

.footprint-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footprint-title {
  margin-bottom: 15px;
  color: var(--text-dark);
  font-size: 22px;
  font-weight: 700;
  position: relative;
  padding-bottom: 8px;
}

.footprint-title:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 25%;
  right: 25%;
  height: 3px;
  background: var(--primary-color);
  border-radius: 2px;
}

.footprint-container:nth-child(1) .footprint-title:after {
  background: linear-gradient(to right, #8B5E3C, #D2B48C); /* teinte marron */
}

.footprint-container:nth-child(2) .footprint-title:after {
  background: linear-gradient(to right, #5C7E91, #A7C8D9); /* teinte bleue */
}

.footprint {
  width: 520px;
  height: 420px;
  border: none;
  background-color: #fefbf5;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  position: relative;
  border-radius: 12px;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.footprint:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

/* D3.js specific */
.breadcrumb rect {
  rx: 4px;
  ry: 4px;
  transition: opacity 0.2s;
  /* fill: var(--primary-color); */
}

.breadcrumb text {
  font-size: 12px;
  fill: var(--text-light);
  font-weight: 600;
  pointer-events: none;
}

.breadcrumb g:hover rect {
  opacity: 0.9;
  cursor: pointer;
}

.root rect {
  transition: opacity 0.3s, stroke-width 0.2s;
  stroke: #fff;
  stroke-width: 1;
}

.root rect:hover {
  opacity: 0.9;
  stroke-width: 2;
  cursor: pointer;
}

.label {
  font-size: 13px;
  font-weight: 600;
  pointer-events: none;
  fill: rgba(59, 47, 47, 0.85);
  text-shadow: 0 0 2px #fff;
}

.label.name {
  font-weight: 600;
}

.label.value {
  font-weight: 400;
}


@media (max-width: 1200px) {
  .container {
    flex-direction: column;
    align-items: center;
  }

  .footprint {
    width: 90vw;
    max-width: 520px;
    margin-bottom: 30px;
  }

  body {
    padding-right: 0;
  }

  .menu {
    position: relative;
    top: auto;
    right: auto;
    width: 90vw;
    max-width: 520px;
    margin: 100px auto 0;
    flex-direction: row;
    justify-content: space-around;
    border-left: none;
    border-bottom: 4px solid var(--secondary-color);
  }
}

.menu a.active-visible {
  background-color: var(--secondary-color);
  color: white;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}


html {
  scroll-behavior: smooth;
}


/* ==================== INVENTAIRE ==================== */
body.inventory-page {
    padding-top: 80px;
    font-family: 'Inter', sans-serif;
    background: var(--background-gradient);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.main-content {
    max-width: 90%;
    margin: 2rem auto;
    background: var(--background-light);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
}

h1 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.form-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

select, input[type="text"] {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    font-size: 1rem;
    margin-top: 0.5rem;
    box-sizing: border-box;
}

/* Search container responsive */

.search-container {
    position: relative;
    width: 100%;
}

.search-container input[type="text"] {
    width: 100%;
}

.dropdown {
    position: absolute;
    background: white;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    z-index: 5;
    box-shadow: var(--shadow-soft);
    display: none;
}

.search-container.active .dropdown {
    display: block;
    animation: slideDown 0.3s ease-out;
}

.dropdown li {
    padding: 0.8rem;
    list-style: none;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.dropdown li:hover {
    background: var(--background-light);
}

/* Results cards responsive */
.results {
    margin-top: 2rem;
}

.card {
    background: #fff;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease;
    margin-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.card h2 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Impact bars */
.impact-bar {
    background-color: #eae0d5;
    border-radius: 8px;
    overflow: hidden;
    height: 12px;
    margin-top: 0.4rem;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}

.bar {
    height: 100%;
    transition: width 0.8s ease;
}

.carbon-bar {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
}

.water-bar {
    background: linear-gradient(to right, #8ecae6, #219ebc);
}

/* Responsive inventory */
@media (max-width: 768px) {
    .main-content {
        max-width: 95%;
        padding: 1.5rem;
        margin: 1rem auto;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    select, input[type="text"] {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 1rem;
    }
    
    h1 {
        font-size: 1.3rem;
    }
    
    .card h2 {
        font-size: 1.2rem;
    }
}

/* Bar charts */
/* Button styles */
.start-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

.pause-btn {
    background-color: #f0ad4e;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

.pause-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.reset-btn {
    background-color: #d9534f;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

/* ==================== BASKET ==================== */
body.basket-page {
    padding-top: 80px;
    font-family: 'Inter', sans-serif;
    background: var(--background-gradient);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.basket-container {
    margin: 0 auto;
    padding: 20px;
    background-color: var(--background-light);
    display: grid;
    grid-template-columns: 3fr 1fr;
    grid-template-rows: auto auto auto 1fr;
    grid-template-areas:
        "header header"
        "info-section info-section"
        "breadcrumb breadcrumb"
        "main cart";
    gap: 20px;
    max-width: 95%;
    margin-top: 20px;
    box-shadow: var(--shadow-soft);
    border-radius: var(--border-radius);
}

.basket-header {
    grid-area: header;
    background-color: var(--background-light);
    color: var(--primary-color);
    padding: 20px;
    border-radius: var(--border-radius);
    text-align: center;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.basket-header h1 {
    color: var(--primary-color);
    margin: 0;
    font-size: 1.8em;
}

.info-section {
    grid-area: info-section;
    background-color: #fffdf8;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.instructions {
    background-color:  #fffdf8;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.9em;
    color: var(--text-dark);
    font-weight: 500;
}

.instructions h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.2em;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 5px;
    font-family: 'Inter', sans-serif;
}

.instructions p {
    margin: 0;
}

.reference-info {
    background-color:  #fffdf8;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    font-size: 0.95em;
    color: var(--text-dark);
}

.reference-info h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.2em;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 5px;
}

.reference-info p {
    margin-bottom: 10px;
    font-size: 0.9em;
    line-height: 1.5;
}

#breadcrumb {
    grid-area: breadcrumb;
    display: flex;
    align-items: center;
    background-color: #fffdf8;
    padding: 15px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    flex-wrap: wrap;
}

main {
    grid-area: main;
    background-color: #fffdf8;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow-soft);
    overflow-y: auto;
    max-height: 70vh;
}

#cart {
    grid-area: cart;
    background-color: #fffdf8;
    border-radius: var(--border-radius);
    padding: 15px;
    box-shadow: var(--shadow-soft);
    max-height: 70vh;
    overflow-y: auto;
}

#cart h2 {
    font-size: 1.4em;
    margin-top: 0;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
    color: var(--primary-color);
}



.breadcrumb-item {
    cursor: pointer;
    margin: 5px 10px 5px 0;
    color: var(--primary-color);
    font-weight: 500;
    padding: 5px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.breadcrumb-item:hover {
    background-color: var(--secondary-color);
    color: white;
}

.breadcrumb-item:not(:last-child)::after {
    content: ">";
    margin-left: 10px;
    color: #b5b5b5;
}

.card {
    background-color: #f4f1ea;
    padding: 12px;
    margin: 8px 0;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-soft);
    font-size: 0.95em;
}

.card:hover {
    background-color: #eae6da;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.food-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.food-name {
    flex-grow: 1;
    color: var(--text-dark);
    min-width: 120px;
}

.quantity-input {
    width: 60px;
    padding: 4px;
    border: 1px solid #ccc2b3;
    border-radius: 4px;
    font-size: 0.9em;
    background-color: #fffdf8;
}

.add-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    white-space: nowrap;
    transition: background-color 0.2s;
}

.add-button:hover {
    background-color: var(--secondary-color);
}

#cart-list {
    list-style-type: none;
    padding: 0;
    margin: 8px 0;
}

#cart-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #ddd3c0;
    flex-wrap: wrap;
    gap: 5px;
}

.remove-item {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
    padding: 0 5px;
    color: var(--accent-color);
    transition: color 0.2s;
}

.remove-item:hover {
    color: #a8382c;
}

#clear-cart {
    margin-top: 12px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    font-size: 0.9em;
    transition: background-color 0.2s;
}

#clear-cart:hover {
    background-color: #a8382c;
}

#totals {
    margin-top: 12px;
    border-top: 2px solid var(--primary-color);
    padding-top: 12px;
    font-weight: 600;
}

/* Responsive basket */
@media (max-width: 1024px) {
    .basket-container {
        grid-template-columns: 2fr 1fr;
        max-width: 98%;
    }
    
    .info-section {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    main, #cart {
        max-height: 60vh;
    }
}

@media (max-width: 768px) {
    .basket-container {
        grid-template-columns: 1fr;
        grid-template-areas:
            "header"
            "info-section"
            "breadcrumb"
            "cart"
            "main";
        max-width: 98%;
        padding: 15px;
        gap: 15px;
    }
    
    .info-section {
        gap: 15px;
        padding: 15px;
    }
    
    main, #cart {
        max-height: 50vh;
    }
    
    .basket-header h1 {
        font-size: 1.5em;
    }
    
    #breadcrumb {
        padding: 10px 15px;
    }
    
    .food-card {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .food-name {
        text-align: center;
        min-width: auto;
    }
    
    .quantity-input {
        width: 100%;
    }
    
    .add-button {
        width: 100%;
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .basket-container {
        padding: 10px;
        margin-top: 10px;
    }
    
    .basket-header {
        padding: 15px;
    }
    
    .basket-header h1 {
        font-size: 1.3em;
    }
    
    .info-section {
        padding: 15px;
    }
    
    main, #cart {
        padding: 15px;
        max-height: 40vh;
    }
    
    #breadcrumb {
        padding: 8px 12px;
    }
    
    .breadcrumb-item {
        font-size: 0.9em;
        margin: 2px 5px 2px 0;
    }
}

/* ==================== COMPARISON ==================== */
body.comparison {
    padding-top: 80px;
    font-family: 'Inter', sans-serif;
    background: var(--background-gradient);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}


.container-comp {
    max-width: 1200px;
    margin: 20px auto;
    background: var(--background-light);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
}

.container-comp h1 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
    font-size: 2rem;
}

.container-comp h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

/* Interface de sélection responsive */
.selection-interface-comp {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.breadcrumb-selector-comp, .food-basket-comp {
    padding: 20px;
    border-radius: var(--border-radius);
    border: 2px solid rgba(139, 94, 60, 0.2);
    background-color: #fffdf8;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-soft);
}

/* Fil d'Ariane responsive */
.breadcrumb-comp {
    display: flex;
    flex-wrap: wrap;
    padding: 10px;
    margin-bottom: 15px;
    background-color: #f4f1ea;
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
    gap: 5px;
}

.breadcrumb-item {
    padding: 8px 12px;
    cursor: pointer;
    color: var(--primary-color);
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.2s;
    white-space: nowrap;
}

.breadcrumb-item:hover {
    background-color: var(--secondary-color);
    color: white;
}

.breadcrumb-item:not(:last-child)::after {
    content: ">";
    margin-left: 8px;
    color: #b5b5b5;
}

/* Liste des catégories responsive */
.category-list-comp {
    flex: 1;
    overflow-y: auto;
    background-color: #f4f1ea;
    border-radius: 8px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
    padding: 15px;
}

.loading-comp {
    text-align: center;
    color: #888;
    padding: 20px;
    font-style: italic;
}

.category-item, .food-item {
    padding: 12px;
    margin: 8px 0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background-color: #eae6da;
    font-size: 0.95em;
    border: 1px solid transparent;
}

.category-item:hover, .food-item:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(139, 94, 60, 0.2);
}

.food-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.select-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s;
}

.select-btn:hover {
    background-color: var(--secondary-color);
}

/* Panier d'aliments sélectionnés responsive */
.selected-foods-comp {
    flex: 1;
    overflow-y: auto;
    background-color: #f4f1ea;
    border-radius: 8px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
    padding: 15px;
    margin-bottom: 15px;
}

.selected-food {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin: 8px 0;
    background-color: #eae6da;
    border-radius: 8px;
    font-size: 0.95em;
    flex-wrap: wrap;
    gap: 8px;
}

.remove-btn {
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 10px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.remove-btn:hover {
    background-color: #a8382c;
}

.empty-basket {
    text-align: center;
    color: #888;
    padding: 30px;
    font-style: italic;
    background-color: #f8f5f0;
    border-radius: 8px;
    border: 2px dashed #ddd;
}

button#compareBtn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.2s;
    width: 100%;
}

button#compareBtn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 94, 60, 0.3);
}

button#compareBtn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Graphique responsive */
.chart-container-comp {
    margin-top: 30px;
    background-color: #f4f1ea;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    overflow-x: auto;
}

/* Responsive comparison */
@media (max-width: 1024px) {
    .container-comp {
        max-width: 95%;
        padding: 25px;
    }
    
    .breadcrumb-selector-comp, .food-basket-comp {
        min-height: 350px;
    }
}

@media (max-width: 768px) {
    body.comparison {
        padding-left: 0px;
        padding-right: 0px;
    }
    
    .container-comp {
        padding: 20px;
        margin: 15px auto;
    }
    
    .container-comp h1 {
        font-size: 1.6rem;
        margin-bottom: 20px;
    }
    
    .selection-interface-comp {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .breadcrumb-selector-comp, .food-basket-comp {
        min-height: 300px;
        padding: 15px;
    }
    
    .chart-container-comp {
        padding: 15px;
        margin-top: 20px;
    }
    
    .breadcrumb-comp {
        padding: 8px;
    }
    
    .breadcrumb-item {
        padding: 6px 8px;
        font-size: 0.9em;
    }
    
    .food-item {
        flex-direction: column;
        align-items: stretch;
    }
    
    .select-btn {
        width: 100%;
        padding: 8px;
    }
    
    .selected-food {
        flex-direction: column;
        align-items: stretch;
    }
    
    .remove-btn {
        width: 100%;
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .container-comp {
        padding: 15px;
        margin: 10px auto;
    }
    
    .container-comp h1 {
        font-size: 1.4rem;
    }
    
    .breadcrumb-selector-comp, .food-basket-comp {
        min-height: 250px;
        padding: 12px;
    }
    
    .chart-container-comp {
        padding: 12px;
        margin-top: 15px;
    }
    
    .breadcrumb-item {
        padding: 4px 6px;
        font-size: 0.8em;
    }
    
    .category-item, .food-item, .selected-food {
        padding: 10px;
        font-size: 0.9em;
    }
}

/* ==================== ANIMATIONS COMMUNES ==================== */
@keyframes fadeInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ==================== AUTRES ANIMATIONS ==================== */

/* Fade In */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Fade Out */
@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Slide In Left */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Slide In Right */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Zoom In */
@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Rotation simple */
@keyframes rotateIn {
    from {
        transform: rotate(-200deg);
        opacity: 0;
    }
    to {
        transform: rotate(0deg);
        opacity: 1;
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.zoom-in {
    animation: zoomIn 0.5s ease-out forwards;
}

.slide-in-left {
    animation: slideInLeft 0.5s ease-out forwards;
}









