/* ------------------------------
   Variables globales
------------------------------ */
:root {
  --blue: #1a4f7a;
  --blue-light: #e6f0f8;
  --green: #3cb371;
  --red: #e85c5c;
  --yellow: #ffd447; /*#FFDD58*/
  --gray-light: #f5f5f5;
  --gray: #999;
  --bg: #f5f5f7;
  --text: #222;
  --radius: 8px;
  --shadow: 0 8px 20px rgba(0,0,0,0.06);
  
  /* ESSENCE — cercle vert/turquoise */
  --fuel-e5: #00A19A; /* E5 */
  --fuel-e10: #009F6B; /* E10 */
  --fuel-e85: #00C1B5; /* E85 */

  /* DIESEL — carré jaune/orange/rouge */
  --fuel-b7: #F2A900; /* B7 */
  --fuel-b10: #D97904; /* B10 */
  --fuel-xtl: #C8102E; /* XTL (diesel synthétique) */

  /* GAZ — losange bleu */
  --fuel-cng: #005EB8; /* CNG */
  --fuel-lpg: #0072CE; /* LPG/GPL */
  --fuel-lng: #0033A0; /* LNG */
  --fuel-h2: #1D4ED8; /* Hydrogène */

  --b7-1: #1958af;
  --b7-2: #4681d5;
  
  --sp95-1: #2d9328;
  --sp95-2: #75be37;
  
  --sp98-1: #e58704;
  --sp98-2: #f9a20b;
  
  --e10-1: #c12118;
  --e10-2: #ea4436;
  
  --e85-1: #07568c;
  --e85-2: #357ca5;
  
  --gpl-1: #f7a903;
  --gpl-2: #f0b02a;
  
  --btn-stations-1: #1857a6;
  --btn-stations-2: #225ca8;
  
  --btn-simulate-1: #d32a20;
  --btn-simulate-2: #d92f27;
  
  --btn-locate-1: #FF944D;
  --btn-locate-2: #f96a0a;
  
  --container-bg: #fff;
  --container-border-color: #eee;
  --container-title-color: #1a4f7a;
  
  --card-border-color: #cdcdd0; 
  
  --popup-station-bg:#fff;
  --best-station-grid-bg: #fff;
  
  --scroll-track-bg: #f5f5f7;
  --scroll-thumb-bg: #4d8dff;
  --scroll-border-color: #4d8dff;
  
  --footer-bg: #fff;
  --footer-border-color: #484848;
  
  --card-comment-bg:#fff;
}

/* Thème sombre forcé */
:root[data-theme="dark"] {
  --bg: #121212;
  --container-bg: #1E1E1E;
  --container-border-color: transparent;
  --container-title-color: #e6e6e6;
  
  --card-border-color: #484848;
  --card-bg: #272727;
  --popup-station-bg:#212121;
  
  --best-station-grid-bg: transparent;
  
  --text: #B3B3B3;
  --card: #1a1a1a;
  --border: #333;
  
  --scroll-track-bg: #1a1a1a;
  --scroll-thumb-bg: #4d8dff;
  --scroll-border-color: #4d8dff;
  
  --footer-bg: #272727;
  --footer-border-color: #484848;
  
  --card-comment-bg:#2b2b2b;
}

/* ------------------------------
   Reset & base
------------------------------ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--scroll-track-bg);
  border-radius: var(--radius);
}

::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb-bg);
  border-radius: 10px;
  border: 2px solid var(--scroll-border-color);
}

::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--scroll-thumb-bg) 80%, black);
}

.hidden {
  display: none !important;
}

.comment {
  font-size:.9em;
}

/* ------------------------------
   Header
------------------------------ */
.header {
  max-width: 1440px;
  height: auto;
  margin: 0 auto;
  padding: 8px;
  border-radius: var(--radius);
  background: var(--footer-bg);
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  flex-wrap: wrap;
  /*background: linear-gradient(90deg, #225ea9, #336fbe, #4987db);*/
  box-shadow: 0 4px 4px rgba(0,0,0,0.15);
}

.icon-light {
  color: #FFD43A !important;
}

.brand {
  color: var(--text);
  font-size:1.2em;
  display: flex;
  align-items: center;
  column-gap: 1em;
  
  & span {
    color: var(--text);
  }
  
  & img {
    border-radius:var(--radius);
  }
  
  & .title-link {
    display: flex;
    align-items: center;
    gap: 10px;
  }
}

.icon-buttons {
  display: flex;
  gap: 8px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid #ddd;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  & .fa-moon {
    color: #000 !important;
  }
}

/* ------------------------------
   Layout principal
------------------------------ */

.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 9px 9px 0 9px;
  /*display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: center;*/
}

.search-bar {
  flex: 1;
}

.search-input {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 10px 16px;
  position: relative; /* important */
  width: 100%;
}

.search-input input {
  border: none;
  outline: none;
  width: 90%;
  min-width:200px;
  font-size: 15px;
}

.country-filters {
  display: flex;
  gap: 8px;
  width: 100%;
  overflow-x: auto;
}

.country-pill {
  padding: 6px 12px;
  border-radius: var(--radius);
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
  font-size: 1em;
  
  &.active {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
  }
  
  &.plus {
    color: var(--blue);
    font-size:1.1em;
  }
  
  &.next {
    color: #8e8e8e;
  }
}

.statistique {
  display: flex;
  justify-content: space-between;
  gap: 1em;
  padding: 1em 0 0 0;
   
  & .historic {
    width: 100%;
    background: #fff;
    border-radius: var(--radius);
    padding: 15px;
    border: 1px solid #eee;
    box-shadow: var(--shadow);  
    display: block;
    margin: 0 auto;
    
    & .fuel-filters2 {
      display: flex;
      gap: 8px;
      width: 100%;
      overflow-x: auto;
      
      & .pill {
        font-size: 1em;
        font-weight: 400;
        padding: 10px;
        color:#000 !important;
      }
    }
  }
  
  & .price-means {
    width: 50%;
    background: #fff;
    border-radius: var(--radius);
    padding: 15px;
    border: 1px solid #eee;
    box-shadow: var(--shadow);  
    display: block;
    margin: 0 auto;
    
    & .filters-box {
      margin: 0 auto;
      padding: 10px;
      display: flex;
      align-items: center;
      gap: 16px;
      justify-content: space-between;
      flex-wrap: wrap;
    }
    
    /* ------------------------------
       Prix moyens
    ------------------------------ */
    .fuel-grid {
      display: grid;
      grid-template-columns: repeat(6, 1fr);
      gap: 10px;
      
      & .fuel-card {
        border-radius: var(--radius);
        border:1px solid #cbd0da;
        padding: 0px;
        overflow: hidden;   /* masque les coins du contenu */
    
        & .fuel-hearder {
          color: white;
          padding: .4em;
          &.b7 { background: linear-gradient(to top, var(--b7-1), var(--b7-2)); }
          &.sp95 { background: linear-gradient(to top, var(--sp95-1), var(--sp95-2)); }
          &.sp98 { background: linear-gradient(to top, var(--sp98-1), var(--sp98-2)); }
          &.e10 { background: linear-gradient(to top, var(--e10-1), var(--e10-2)); }
          &.e85 { background: linear-gradient(to top, var(--e85-1), var(--e85-2)); }
          &.gpl { background: linear-gradient(to top, var(--gpl-1), var(--gpl-2)); }
          & .fuel-name {
            font-weight: 600;
            margin-bottom: 4px;
          }
          & .fuel-price {
            font-size: 1em;
            font-weight: 700;
          }
        }
    
        & .fuel-variation {
          font-size: 1em;
          font-weight:600;
          margin-top: 4px;
          padding: 0 .2em 0 .2em;
  
          &.b7 { color: var(--b7-1); }
          &.sp95 { color: var(--sp95-1); }
          &.sp98 { color: var(--sp98-1); }
          &.e10 { color: var(--e10-1); }
          &.e85 { color: var(--e85-1); }
          &.gpl { color: var(--gpl-1); }
        }
      }
    }
  }
}

/* ------------------------------
   SEARCH + SIMULATE
------------------------------ */
.search-simulate {
  display: flex;
  justify-content: space-between;
  gap: 1em;
  padding: 0 0 0 0;
  
  & .search {
    width: 50%;
    background: var(--container-bg);
    border-radius: var(--radius);
    padding: 15px;
    border: 1px solid var(--container-border-color);
    box-shadow: var(--shadow);
    margin: 0 auto;
    gap: 15px;
    display: grid;
    align-content: start;
    
    & .datas-maj {
      display: flex;
      gap: 15px;
      justify-content: end;
      font-size:.9em;
    }
    
    & .actions {
      display: flex;
      gap: 15px;
      justify-content: center;
    }
    
    & .fuel-filters {
      display: flex;
      overflow-x: auto;
      gap: 10px;
      
      & .pill {
        font-size: 1em;
        font-weight: 400;
        padding: 10px;
        background: #e5e7eb;
	color: #000 !important;
        -webkit-text-color: #000;
        
        &.active {
          background: var(--blue);
          color: #fff !important;
          -webkit-text-color: #fff;
          border-color: var(--blue);
        }
      }
    }
  }
  
  & .simulate {
    width: 50%;
    background: var(--container-bg);
    border-radius: var(--radius);
    padding: 15px;
    border: 1px solid var(--container-border-color);
    box-shadow: var(--shadow);  
    display: block;
    margin: 0 auto;
    gap: .5em;
  }
}

.compare-stations-top {
  margin:1em 0 1em 0;
  
  & .compare-stations-top-container {
    background: var(--container-bg);
    border-radius: var(--radius);
    padding: 15px;
    border: 1px solid var(--container-border-color);
    box-shadow: var(--shadow);  
    display: block;
    margin: 0 auto;
  & .compare-stations-top-cards {  
    display:flex;
    gap: 1em;
    justify-content: center;
    
    & .compare-stations-top-card {
      border-radius: var(--radius);
      border: 1px solid var(--card-border-color);
      box-shadow: var(--shadow);
      overflow: hidden; 
      background: var(--card-bg);
      
      &.full {
        flex: 0 0 calc(100% - 1em) !important;
      }
    
      & .compare-stations-top-card-badge {
        display: flex;
        justify-content: center;
        margin-bottom: 5px;
        padding: 5px 0 5px 0;
        color: #fff;

        &.moins-cher {
          background-color: #1c8207;
        }
      
        &.proche {
          background-color: #1d79b7;
        }
      
        &.compromis {
          background-color: #8d3b05;
        }
      }
    
      & .compare-stations-top-card-header {
        display: flex;
        justify-content: center;
        gap: 10px;
        
        & img {
          border-radius:var(--radius);
          background:#efefef;
        }
      }
    
      & .compare-stations-top-card-price {
        display: flex;
        justify-content: center;
        font-size: 1.4em;
        font-weight: 600;
        /*color: #1c8207;*/
        border-bottom: 1px solid #d0c9c9;
        margin-bottom: 10px;
      }
      
      & .compare-stations-top-card-energy {
        display: flex;
        justify-content: center;
        font-size: 1.1em;
      }
                
      & .compare-stations-top-card-info {
        display: block;
        justify-content: center;
        font-size: .95em;
        padding: 0 1em 0 1em;
      
        /*& > i {
          color: #1c8207;
        }*/
      }

      & .compare-stations-top-card-actions {
        padding: 1em;
        display: flex;
        justify-content: center;
        gap: .5em;
        font-size: .9em;
      }
    } 
  }
  }
}

/* ------------------------------
   FAVORITES
------------------------------ */
.favorites-stations {
  & .favorites-stations-container {
   background: var(--container-bg);
   border-radius: var(--radius);
   padding: 15px;
   border: 1px solid var(--container-border-color);
   box-shadow: var(--shadow);
   display: block;
   margin: 0 auto;
        
  & .favorites-stations-cards {
    display: flex;
    gap: 1em;
    overflow-x: scroll;
      
    & .favorites-stations-card {
      display: grid;
      gap: .5em;
      border-radius: var(--radius);
      border: 1px solid var(--card-border-color);
      box-shadow: var(--shadow);
      overflow: hidden; 
      padding: 1em;
      background: var(--card-bg);
      flex-shrink: 0;
    
      &.active {
        /*border:1px solid #1c8207;*/
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
      }
    
      & .favorites-stations-card-brand {
        display: flex;
        align-items: center;
        gap: 1em;
        font-weight: 600;
        width:15em;

        & img {
          border-radius:var(--radius);
          background:#efefef;
        }
      }
    
      & .favorites-stations-card-info {
        display: flex;
        align-items: center;
        font-size: 1em;
        flex-direction: row;
        column-gap: 1em;
      }
    
      & .favorites-stations-card-actions {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: .5em;
        font-size:.9em;
        
        & > button {
          font-size:.9em;
        }
      }
    
      & .favorites-stations-card-header {
        display: flex;
        gap:10px;
        /*grid-template-columns: 2fr 1fr;*/
        
        & .favorites-stations-card-close {
          font-size: 2em;
          cursor: pointer;
          display: flex;
          padding: 0;
          line-height: .5;
        }
      }
    
      & .favorites-stations-card-price {
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 1.4em;
        font-weight: 600;
      }
                  
      & .favorites-stations-card-position {
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: .9em;
      
        & > i {
          color: #1c8207;
        }
      }
                  
      & .favorites-stations-card-majvalue {
        padding: 0 10px 5px 10px;
        font-size: .8em;
      }
    }
  }
  }
}

/* ------------------------------
   COMPARATEUR + MAPS
------------------------------ */
.compare-maps {
  display: flex;
  justify-content: space-between;
  gap: 1em;
}

.compare-container {
  height:80vh;
  overflow-y: scroll;
}

.compare {
  & .filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    
    & .pill {
      padding: 6px 12px;
      border-radius: var(--radius);
      border: 1px solid #ddd;
      background: #e5e7eb;
      cursor: pointer;
      font-size: 1em;
      color: #000 !important;
      -webkit-text-color: #000;
        
      &.active {
        background: var(--blue);
        color: #fff !important;
        -webkit-text-color: #fff;
        border-color: var(--blue);
      }
  
      &.plus {
        color: var(--blue);
        font-size:1.1em;
      }
  
      &.next {
        color: #8e8e8e;
      }
    }
  }
  
  & .fiters-comment {
    padding:10px 0 5px 10px;
    font-size: .8em;
  }
}

.compare, .maps {
  width: 50%;
  background: var(--container-bg);
  border-radius: var(--radius);
  padding: 15px;
  border: 1px solid var(--container-border-color);
  box-shadow: var(--shadow);  
  display: block;
  margin: 0 auto;
}

.compare h2, .maps h2 {
  color: var(--container-title-color);
}

.compare table {
  & th {
    text-align:left;
    color: var(--blue);
  }
  
  & td {
    padding: .3em;
    color: var(--blue);
  }
}

/* ------------------------------
   MAP
------------------------------ */
.marker-cluster {
  width: 32px;
  height: 32px;
  background: #1976d2;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  border: 2px solid #fff;
  box-shadow: 0 0 4px rgba(0,0,0,0.4);
}
  
.fuel-marker {
    background: #fff !important;
    border-radius: var(--radius);
    padding: .8em;
    position: absolute !important;
    z-index: 1 !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
    flex-direction: column;
    color: #000;
    
    & .fuel-marker-icon {
      display: flex;
      justify-content: center;
      height: auto;
      
      & img { 
        width: 40px;
        height: auto;
      }
    }
    
    & .fuel-marker-prices {
      display: flex;
      flex-direction: column;
      gap: .5em;
      
      & .fuel-marker-price  {
        display: flex;
        gap: .5em;
        
        & .fuel-marker-price-title {
          font-size: 1.2em;
        }
        
        & .fuel-marker-price-value {
          font-size: 1.2em;
          font-weight: 600;
        }
      }
    }
}

.fuel-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.fuel-price {
    margin-top: 2px;
    font-size: 14px;
    font-weight: bold;
    color: #222;
}

/* Menu bas mobile */
/*.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: #ffffff;
  border-top: 1px solid #e0e0e0;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
  font-family: sans-serif;
}

.bottom-nav .nav-item {
  justify-items: center;
  
  & a {
    text-align: center;
    text-decoration: none;
    color: #000;
      
    &.active {
      color: var(--btn-simulate-1) !important;
      -webkit-text-fill-color: var(--btn-simulate-1) !important;
    }
    
    & i {
      display: block;
      margin:0 auto;
      font-size: 20px;
      margin-bottom: 3px;
      color: var(--blue);
      
      &.active {
        color: var(--btn-simulate-1);
      }
    }
  }
  
  &.active {
    border-bottom: 2px solid var(--btn-simulate-1);
  }
}


.bottom-nav .nav-item span {
  font-size: 12px;
}

.bottom-nav .nav-item:hover,
.bottom-nav .nav-item.active {
  color: var(--btn-simulate-1);
}*/

.card-comment {
  background: var(--card-comment-bg);
  margin: 1em 0 1em 0;
  padding: 1em;
  border-radius: var(--radius);
}

/* TABLEAU */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.2rem;
}

th {
  background: #f3f4f6;
  padding: 0.8rem;
  border-bottom: 2px solid #e5e7eb;
  font-weight: 600;
}

td {
  padding: 0.8rem;
  border-bottom: 1px solid #e5e7eb;
}

td.green { color: #22c55e; font-weight: 700; }
td.red { color: #ef4444; font-weight: 700; }

/* ------------------------------
   SIMULATEUR
------------------------------ */
.simulate label {
  display: block;
  margin-bottom: 1rem;
  font-weight:600;
  color: var(--text);
}

.simulate {
  & .saving-price {
    font-size:1.3em;
    font-weight:700;
    color: var(--red);
  }
}

.simulate select,
.simulate input {
  width: 100%;
  padding: 0.7rem;
  border-radius: var(--radius);
  border: 1px solid #d1d5db;
  background: #f9fafb;
  margin-top: 0.4rem;
}

#result {
  margin: 1rem 0;
  font-weight: 700;
  font-size:1.1em;
  color: var(--text);
}

/* BOUTONS */
/*button {
  padding: 0.8rem 1.2rem;
  background: #1a4f7a;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: 0.2s;
}

button:hover {
  background: #163f63;
}
*/

.btn {
  padding: 13px !important;
  background: #1a4f7a;
  color: white !important;
  border: none;
  border-radius: var(--radius) !important;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  gap: 5px;
  font-size: 1em;
  align-items: center;
  justify-content: center;
  
  &.station-details { background: linear-gradient(to top, var(--btn-stations-1), var(--btn-stations-2)); }
  &.stations { background: linear-gradient(to top, var(--btn-stations-1), var(--btn-stations-2)); }
  &.simulate { background: linear-gradient(to top, var(--btn-simulate-1), var(--btn-simulate-2)); }
  
  &.locate { background: linear-gradient(to top, var(--btn-locate-1), var(--btn-locate-2)); }
  &.address { background: #1a4f7a; }
}

.btn-station {
  background: #2563EB;
  color: #fff;
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 600;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: 0.2s;
}

.btn-pref {
  background: transparent;
  color: var(--text);
  border: 1.5px solid #EF4444;
  padding: 8px 14px;
  border-radius: var(--radius);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: 0.2s;
}

.icon-coeur::before {
  font-family: "Font Awesome 7 Free";
  font-weight: 900; /* solid */
  content: "\f004";
}

.icon-coeur.active {
  color:var(--red);
}

.btn-favoris {
  background: transparent;
  color: var(--text);
  border: 1.5px solid #EF4444;
  padding: 8px 14px;
  border-radius: var(--radius);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: 0.2s;
  
  &.active {
    color:var(--red);
  }
}

.btn-favoris-active {
  background: transparent;
  color:var(--red);
  border: 1.5px solid #EF4444;
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: 0.2s;
}

.btn-itinerary {
  background: transparent;
  color: var(--text);
  border: 1.5px solid #374151;
  padding: 8px 10px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: 0.2s;
}

.cities {
  display:none;
  background: var(--container-bg);
  border-radius: var(--radius);
  padding: 15px;
  border: 1px solid var(--container-border-color);
  box-shadow: var(--shadow);
  display: block;
  margin: 1em 0 1em 0;
  
  & .list-cities {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    gap:10px;

    & a {
      border:1px solid gray;
      border-radius:var(--radius);
      padding:5px;
      color:var(--text) !important;
      -webkit-text-color: var(--text);
    }
  }
}

.faq {
  margin: 1em 0 1em 0;
  padding: 15px;
  background: var(--container-bg);
  border-radius: var(--radius);
  border: 1px solid var(--container-border-color);
  box-shadow: var(--shadow);
    
  & h2 {
    color:var(--container-title-color);
    margin-bottom: 1rem;
  }
  
  & .details {
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: var(--radius);
    cursor: pointer;
  }
}

.best-station {
  display:flex;
  gap:10px;
  justify-content: center;
  
  & .best-station-header {
    & img {
      border-radius:var(--radius);
      background:#efefef;
    }
  }

  & .best-station-energy {
    text-align:center;
  }
}

.best-station-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 15px;
  
  & .item {
    padding: 12px;
    background: var(--best-station-grid-bg);
    border-radius: var(--radius);
    text-align: center;
    
    & .label {
      font-size: 1em;
    }
    
    & .value {
      font-size: 1.1em;
      font-weight: 700;
    }
  }
}

.chartLine {
  display:flex;
  width: 100%;
  height: 300px !important;
}

.section-map {
  margin-top: 1em;
  background: #fff;
  border-radius: var(--radius);
  padding: 15px;
  border: 1px solid #eee;
  box-shadow: var(--shadow);  
  display: block;
}

.list-stations {
  display: flex;
  flex-direction: column;
  gap: 1em;
  row-gap: 1em;
  grid-auto-rows: min-content;
  margin: 1em 0 1em 0;
  align-items: center;
  /*max-height: 45vh;
  overflow:auto;*/
  
  & .list-stations-item {
    display: grid;
    gap: .5em;
    width: 100%;
    border-radius: var(--radius);
    border: 1px solid var(--card-border-color);
    box-shadow: var(--shadow);
    overflow: hidden; 
    padding: 1em;
    background: var(--card-bg);
    /*width: 70%;*/
    flex-shrink: 0;
    
    &.active {
      /*border:1px solid #1c8207;*/
      box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }
    
    & .list-stations-item-brand {
      display: flex;
      align-items: center;
      gap: 1em;
      font-weight: 600;
      
      & img {
        border-radius:var(--radius);
        background: #efefef;
      }
    }
    
    & .list-stations-item-info {
      display: flex;
      align-items: center;
      font-size: 1em;
      flex-direction: row;
      column-gap: 1em;
    }
    
    & .list-stations-item-actions {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: .5em;
      /*justify-content: center;
      align-items: center;*/
      font-size:.9em;
      
      & > button {
        font-size:.9em;
      }
    }
    
    & .list-stations-item-header {
      display: grid;
      grid-template-columns: 2fr 1fr;
    }
    
    & .list-stations-item-energy-price {
      & .list-stations-item-energy {
        display: flex;
        justify-content: center;
        align-items: center;
        /*color: #1c8207;*/
      }
      
      & .list-stations-item-price {
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 1.4em;
        font-weight: 600;
        /*color: #1c8207;*/
      }
    }
                  
    & .list-stations-item-position {
      display: flex;
      justify-content: center;
      align-items: center;
      font-size: .9em;
      
      & > i {
        color: #1c8207;
      }
    }
                  
    & .list-stations-item-majvalue {
      padding: 0 10px 5px 10px;
      font-size: .8em;
    }
  }
}

.compare-top {
  /*display: grid;
  grid-template-columns: repeat(3, 1fr);*/
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
  margin:1em 0 1em 0;
  justify-content: center;
  
  & .compare-top-item {
    flex: 0 0 calc(50% - 1em);
    border-radius: var(--radius);
    border: 1px solid var(--card-border-color);
    box-shadow: var(--shadow);
    overflow: hidden; 
    
    &.full {
      flex: 0 0 calc(100% - 1em) !important;
    }
    
    & .compare-top-item-badge {
      display: flex;
      justify-content: center;
      margin-bottom: 5px;
      padding: 5px 0 5px 0;
      
      &.moins-cher {
         background-color: #bdda13;
      }
      
      &.proche {
         background-color: #509bcd;
      }
      
      &.compromis {
         background-color: #8d3b05;
      }
    }
    
    & .compare-top-item-header {
      display: flex;
      justify-content: center;    
    }
    
    & .compare-top-item-price {
      display: flex;
      justify-content: center;
      font-size: 1.4em;
      font-weight: 600;
      color: #1c8207;
      border-bottom: 1px solid #d0c9c9;
      margin-bottom: 10px;
    }
                  
    & .compare-top-item-info {
      display: block;
      justify-content: center;
      font-size: .95em;
      padding: 0 .5em 0 .5em;
      
      & > i {
        color: #1c8207;
      }
    }

    & .compare-top-item-actions {
      padding: .5em;
      display: flex;
      justify-content: center;
    }
  } 
}

.popup-station {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
  z-index: 9999;
  
  & .popup-station-body {
    display:flex;
    flex-direction:column;
    
    & .popup-station-header {
      display:flex;
      flex-direction:column;
      padding: 0 0 .7em 0;
      margin-bottom: 1em;
      border-bottom: 1px solid #747474;
      
      & .popup-station-header-brand-logo {
        & img {
          border-radius:var(--radius);
          background:#efefef;
        }
      }
    }
    
    & .popupStationPrices {
      & .popupStationPricesList {
          display: grid;
          grid-template-columns: repeat(5, 1fr);
          gap: 10px;
          padding: .3em 0 .3em 0;
          
          & .popup-station-fuel {
            color:#fff;
            border-radius: var(--radius);
            overflow: hidden;
            &.fuel-b7 {border:1px solid var(--fuel-b7);}
            &.fuel-e5 {border:1px solid var(--fuel-e5);}
            &.fuel-e10 {border:1px solid var(--fuel-e10);}
            &.fuel-lpg {border:1px solid var(--fuel-lpg);}
              
            & .popup-station-fuel-label {
              display:flex;
              justify-content:center;
              padding:.3em;
              &.fuel-b7 {background:var(--fuel-b7);}
              &.fuel-e5 {background:var(--fuel-e5);}
              &.fuel-e10 {background:var(--fuel-e10);}
              &.fuel-lpg {background:var(--fuel-lpg);}
            }
            
            & .popup-station-fuel-price {
              display: flex;
              justify-content: center;
              color:var(--text);
              padding:.3em;
            }
          }
      }
    }
    
    & .popupStationServices {
      margin:1em 0 1em 0;
      border-bottom:1px solid #747474;
      padding-bottom:.7em;
    }
    
    & .popupStationHoraires {
      margin-top: 1em;
      padding-top: .5em;
      border-top: 1px solid #747474;
    }
    
    & .popup-station-horaires {
      display: grid;
      grid-template-columns: 1fr;    
    }
    
    & .popupStationActions {
      display: flex;
      gap: 1em;
      margin-top: 1em;
      justify-content: center;
    }
  }
}

.popup-station.show {
  opacity: 1;
  pointer-events: auto;
}

.popup-station-content {
  background: var(--popup-station-bg);
  padding: 15px;
  border-radius: var(--radius);
  width: 100%;
  max-width: 550px;
  transform: translateY(-20px);
  transition: transform .3s ease;
}

.popup-station.show .popup-station-content {
  transform: translateY(0);
}

.popup-station-close {
  float: right;
  font-size: 24px;
  cursor: pointer;
}

#map {
  width:100%; 
  height:80vh;
  margin: 1em 0 1em 0;
  
  & .fuel-filters {
    display: flex;
    width:63px; 
    flex-direction: column;
    padding:5px;
    overflow-x: auto;
    gap: 10px;
    
    & .filter-toggle {
       color: #000;
    }
    
    & .pill {
      font-size: 1em;
      font-weight: 400;
      padding: 10px;
      background: #e5e7eb;
      border-radius: var(--radius);
      width: 100%;
      
      &.active {
        background: var(--blue);
        color: #fff;
        border-color: var(--blue);
      }
      
      &.hidden {
        display:none;
      }
    }
  }
}

#map:fullscreen {
  width: 100%;
  height: 100%;
}

.map-crosshairs {
  font-size: 1.5em;
  color: #000 !important;
}

/*#address-input {
    width: 90px;
    padding: 8px;
    font-size: 16px;
}*/
#suggestions {
    /*border: 1px solid #ccc;
    width: 300px;
    max-height: 200px;
    overflow-y: auto;
    display: none;*/
    display: none;
    position: absolute;
    top: 100%; /* juste sous l’input */
    left: 0;
    width: 100%;
    background: white;
    border: 1px solid #ccc;
    z-index: 100; /* passe au-dessus du parent */
    max-height: 200px;
    overflow-y: auto;
}
.suggestion-item {
    padding: 8px;
    cursor: pointer;
    color:#000;
}
.suggestion-item:hover {
    background-color: #f0f0f0;
}

.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button, .maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner {
    color: #000 !important;
}
.maplibregl-ctrl-attrib a {
  color: #000 !important;
}

/*
 en-savoir-plus
*/
.en-savoir-plus {
  margin: 1em 0 1em 0;
  padding: 15px;
  background: var(--container-bg);
  border-radius: var(--radius);
  border: 1px solid var(--container-border-color);
  box-shadow: var(--shadow);
    
  & h2 {
    color:var(--container-title-color);
    margin-bottom: 1rem;
  }
}

.clamped {
  display: -webkit-box;
  -webkit-line-clamp: 3; /* nombre de lignes visibles */
  -webkit-box-orient: vertical;
  overflow: hidden;
  position: relative;
}

.show-more {
  color: #007bff;
  font-weight: 600;
  cursor: pointer;
  display: inline-block;
  margin-top: 6px;
}
  
/*
FOOTER
*/
.site-footer {
  max-width: 1440px;
  height: auto;
  margin: 0 auto;
  padding: 5px;
  border-radius:var(--radius);
  background: var(--footer-bg);
  padding: 15px 0;
  box-shadow: 2px -3px 4px rgba(0, 0, 0, 0.15);
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  
  & #installerPWA {
    color: #000 !important;
    -webkit-text-fill-color: #000;
  }
}

.footer-link {
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.footer-link:hover {
  color: #007bff !important;
}

.fa-heart {
  &.active {
    color: var(--red);
  }
}

.banner-responsive {
  display: flex;
  justify-content: center;
  margin: 1em 0 1em 0;
  
  & a {
    display:flex;
    & img {
      max-width: 100%;
      height: auto;
    }
  }
}

.banner-text {
  border:1px dashed gray;
  border-radius:var(--radius);
  padding:1em;
}

.aff-lien {
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text);
  text-decoration: none;
  font-size: 1.1em;
}

a {
  /*color: black !important;
  -webkit-text-fill-color: black !important;*/
  text-decoration: none;
}

h1 {
  color: var(--container-title-color);  
}

h2 {
  color: var(--container-title-color);  
  margin: 0 0 .7em 0;
}

input[type="range"] {
  -webkit-appearance: none;
  width: 60%;
  height: 6px;
  background: var(--blue); /* couleur de la barre */
  border-radius: 4px;
  outline: none;
}

/* Track (Brave / Chrome / Edge / Safari) */
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  background: var(--blue); /* couleur du slider */
  border-radius: 4px;
}

/* Thumb (curseur) */
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: var(--blue); /* couleur du bouton */
  border-radius: 50%;
  cursor: pointer;
  margin-top: -7px;
}

/* Firefox */
input[type="range"]::-moz-range-track {
  height: 6px;
  background: var(--blue);
  border-radius: 4px;
}

input[type="range"]::-moz-range-progress {
  height: 6px;
  background: var(--blue);
  border-radius: 4px;
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--blue);
  border-radius: 50%;
  cursor: pointer;
}

button {
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
}

/* ------------------------------
   Responsive
------------------------------ */
@media (max-width: 1100px) { 
  .container {
    grid-template-columns: repeat(2, 1fr);
  }

  .map-card {
    grid-column: span 2;
  }
}

@media (max-width: 780px) {
  .bottom-nav { display: flex; }
  
  .best-station-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  
  .container {
    grid-template-columns: 1fr;
  }
  
  .search-simulate {
    display: grid;
    grid-template-columns: 1fr;
    
    & .search, .simulate {
      width: 100%;
    }
  }
  
  .compare-maps {
    display: grid;
    grid-template-columns: 1fr;
    
    & .compare, .maps {
      width: 100%;
    }
  }
  
  .map-card {
    grid-column: span 1;
  }

  /*.card-header {
    & .title {
      font-size: 1em;
    }
    & .badge {
      font-size: 1em;
    }
  }*/

  .statistique {
    display: grid;
    grid-template-columns: 1fr;
    
    & .historic {
      width:100%;
    }
    
    & .price-means {
      width:100%;
      
      & .filters-box {
        display: grid;
      }
      
      & .fuel-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 3px;
      }
    }
  }
  
  .cities {
    & .list-cities {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
    }
  }
}

@media (max-width: 480px) {
  .brand {
    & span {
      display:none;
    }
  }
  
  #map {
    height:50vh;
  }

  .best-station-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .statistique {
    display: grid;
    grid-template-columns: 1fr;
    
    & .historic {
      width:100%;
    }
    
    & .price-means {
      width:100%;
      
      & .filters-box {
        display: grid;
      }
      
      & .fuel-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 3px;
      }
    }
  }
  
  .search-simulate {
    display: grid;
    grid-template-columns: 1fr;
    
    & .search, .simulate {
      width: 100%;
    }
  }
  
  .compare-maps {
    display: grid;
    grid-template-columns: 1fr;
    
    & .compare, .maps {
      width: 100%;
    }
  }
  
  .compare-top {
    display: flex;
    align-items: center;
    
    & .compare-top-item {
      & .compare-top-item-price {
        font-size: 1.3em;
      }
    }    
  }
  
  .list-stations {
    & .list-stations-item {
        & .list-stations-item-header {
            display: grid;
            grid-template-columns: 2fr 1fr;
        }

        & .list-stations-item-energy-price {
          & .list-stations-item-price {
            font-size: 1.2em;
          }
        }
    }
  }
  
  .compare-stations-top {
    & .compare-stations-top-container {
      & .compare-stations-top-cards {  
        display: grid;
        grid-template-columns: 1fr;
      }
    }
  }
  
  .cities {
    & .list-cities {
      display: grid;
      grid-template-columns: 1fr 1fr;
    }
  }

  .popup-station {
    & .popup-station-body {
        & .popupStationPrices {
            & .popupStationPricesList {
                grid-template-columns: repeat(3, 1fr);
            }
            
            & .popup-station-horaires {
              display: grid;
              grid-template-columns: 1fr;
            }
        }
    }
  }
}

