/* ══════════════════════════════════════════════
   Moirans Pratique – Feuille de style principale
   Design : utilitaire, lisible, ancré dans le territoire
   ══════════════════════════════════════════════ */

:root {
  /* Palette – inspirée des couleurs du Vercors et de la Chartreuse */
  --c-bg:          #f5f4f0;
  --c-surface:     #ffffff;
  --c-surface-2:   #f0efe9;
  --c-border:      #dddbd3;
  --c-border-2:    #ccc9bf;

  --c-text:        #1a1916;
  --c-text-2:      #5a5750;
  --c-text-3:      #8a877e;

  --c-green:       #2d6a4f;
  --c-green-light: #d8f3dc;
  --c-red:         #c0392b;
  --c-red-light:   #fde8e6;
  --c-orange:      #d4500a;
  --c-orange-light:#fde8d4;
  --c-blue:        #1a4e8a;
  --c-blue-light:  #dbe9f8;
  --c-yellow:      #b7791f;
  --c-yellow-light:#fef3c7;
  --c-purple:      #553c9a;
  --c-purple-light:#ede9fe;
  --c-teal:        #0d7377;
  --c-teal-light:  #d0f0f0;

  --c-accent:      #2d6a4f;

  /* Ombres */
  --shadow-sm:  0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:  0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg:  0 8px 24px rgba(0,0,0,.10), 0 4px 8px rgba(0,0,0,.04);

  /* Typo */
  --font-body:    'DM Sans', system-ui, sans-serif;
  --font-mono:    'DM Mono', 'Consolas', monospace;
  --font-display: 'Playfair Display', Georgia, serif;

  /* Radii */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 18px;

  /* Transitions */
  --ease: cubic-bezier(.22,.68,0,1.2);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--c-bg);
  color: var(--c-text);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* ── ALERTES ── */
#alertes-container {
  position: sticky;
  top: 0;
  z-index: 100;
}

.alerte {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideDown .3s var(--ease);
}
.alerte--info    { background: var(--c-blue-light);   color: var(--c-blue);   border-bottom: 2px solid var(--c-blue); }
.alerte--warning { background: var(--c-yellow-light); color: var(--c-yellow); border-bottom: 2px solid var(--c-yellow); }
.alerte--danger  { background: var(--c-red-light);    color: var(--c-red);    border-bottom: 2px solid var(--c-red); }

.alerte-icon { font-size: 18px; flex-shrink: 0; }
.alerte-titre { font-weight: 600; }
.alerte-msg { opacity: .85; }
.alerte-close {
  margin-left: auto;
  cursor: pointer;
  opacity: .6;
  font-size: 18px;
  padding: 0 4px;
  transition: opacity .15s;
  background: none; border: none; color: inherit;
}
.alerte-close:hover { opacity: 1; }

@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

/* ── HEADER ── */
.site-header {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  padding: 0 20px;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-flag { font-size: 28px; }
.brand-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -.01em;
  color: var(--c-text);
}
.brand-sub {
  font-size: 11px;
  color: var(--c-text-3);
  font-family: var(--font-mono);
  letter-spacing: .05em;
  text-transform: uppercase;
}
.header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}
.live-time {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--c-text-2);
  font-weight: 500;
  background: var(--c-surface-2);
  padding: 4px 10px;
  border-radius: var(--r-sm);
}
.btn-admin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  font-size: 16px;
  transition: all .15s;
  cursor: pointer;
}
.btn-admin:hover { background: var(--c-border); }

/* ── NAV TABS ── */
.tab-nav {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  padding: 0 20px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tab-nav::-webkit-scrollbar { display: none; }
.tab-btn {
  padding: 12px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--c-text-2);
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
  margin-bottom: -1px;
}
.tab-btn:hover { color: var(--c-text); }
.tab-btn.active {
  color: var(--c-accent);
  border-bottom-color: var(--c-accent);
}

/* ── MAIN & TABS ── */
.site-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px;
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── SKELETON ── */
.skeleton {
  height: 60px;
  background: linear-gradient(90deg, var(--c-surface-2) 25%, var(--c-border) 50%, var(--c-surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--r-sm);
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── CARDS DASHBOARD ── */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.card-icon { font-size: 24px; flex-shrink: 0; }
.card-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}
.card-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  font-family: var(--font-mono);
  letter-spacing: .02em;
  margin-top: 2px;
}
.badge-ouvert   { background: var(--c-green-light);  color: var(--c-green); }
.badge-ferme    { background: var(--c-red-light);    color: var(--c-red); }
.badge-attente  { background: var(--c-yellow-light); color: var(--c-yellow); }
.badge-info     { background: var(--c-blue-light);   color: var(--c-blue); }

.card-body { flex: 1; }
.card-link {
  font-size: 12px;
  color: var(--c-text-3);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .15s;
}
.card-link:hover { color: var(--c-accent); }

/* Couleurs spécifiques par carte */
.card--pharmacie { border-left: 3px solid #e74c3c; }
.card--trains    { border-left: 3px solid var(--c-blue); }
.card--bus       { border-left: 3px solid var(--c-orange); }
.card--poste     { border-left: 3px solid var(--c-yellow); }
.card--dechet    { border-left: 3px solid var(--c-green); }

/* ── STATUT BADGE ── */
.statut-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}
.statut-badge::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.statut-ouvert  { background: var(--c-green-light);  color: var(--c-green); }
.statut-ferme   { background: var(--c-red-light);    color: var(--c-red); }
.statut-alerte  { background: var(--c-orange-light); color: var(--c-orange); }
.statut-info    { background: var(--c-blue-light);   color: var(--c-blue); }

/* ── TRAINS ── */
.trains-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.trains-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--c-text-3);
  padding: 6px 8px 6px 0;
  border-bottom: 1px solid var(--c-border);
}
.trains-table td {
  padding: 8px 8px 8px 0;
  border-bottom: 1px solid var(--c-surface-2);
  vertical-align: top;
}
.train-heure {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 15px;
}
.train-heure-rt {
  font-family: var(--font-mono);
  color: var(--c-red);
  font-size: 12px;
  display: block;
}
.train-retard {
  font-size: 11px;
  color: var(--c-red);
  font-weight: 600;
}
.train-avance {
  font-size: 11px;
  color: var(--c-green);
  font-weight: 600;
}
.train-label {
  display: inline-block;
  background: var(--c-blue);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  font-family: var(--font-mono);
  vertical-align: middle;
  margin-right: 4px;
}
.train-direction { font-weight: 500; }
.train-voie { color: var(--c-text-3); font-size: 12px; }
.dans-minutes {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--c-text-2);
  white-space: nowrap;
}
.dans-minutes.urgent { color: var(--c-red); font-weight: 600; }
.trains-gare-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-2);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── BUS ── */
.bus-list { list-style: none; }
.bus-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--c-surface-2);
  font-size: 13px;
}
.bus-ligne {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  background: var(--c-orange);
  color: white;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  flex-shrink: 0;
  font-family: var(--font-mono);
}
.bus-direction { flex: 1; font-weight: 500; }
.bus-arret { font-size: 11px; color: var(--c-text-3); }
.bus-heure {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
}
.bus-dans { font-size: 11px; color: var(--c-text-3); }

/* ── PHARMACIE ── */
.pharmacie-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--c-surface-2);
}
.pharmacie-nom { font-weight: 600; font-size: 14px; }
.pharmacie-adresse { font-size: 12px; color: var(--c-text-3); margin: 2px 0; }
.pharmacie-tel {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--c-blue);
}
.pharmacie-horaires { font-size: 12px; color: var(--c-text-2); margin-top: 4px; }

/* ── POSTE ── */
.poste-horaires { list-style: none; }
.poste-horaires li {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--c-surface-2);
}
.poste-jour { font-weight: 500; color: var(--c-text-2); }
.poste-heure { font-family: var(--font-mono); font-size: 12px; }
.poste-today { background: var(--c-green-light); margin: 0 -4px; padding: 5px 4px !important; border-radius: 4px; }

.services-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.service-tag {
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  color: var(--c-text-2);
}

/* ── DÉCHÈTERIE ── */
.dechet-card {
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  padding: 12px;
  margin-bottom: 10px;
}
.dechet-card--principale {
  border-color: var(--c-green);
  background: var(--c-green-light);
}
.dechet-nom { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.dechet-commune { font-size: 11px; color: var(--c-text-3); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.dechet-inscription {
  display: inline-block;
  background: var(--c-orange-light);
  color: var(--c-orange);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}
.dechet-horaires-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  margin-top: 8px;
  font-size: 10px;
}
.dechet-jour {
  text-align: center;
  padding: 4px 2px;
  border-radius: 4px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
}
.dechet-jour.ouvert { background: var(--c-green-light); border-color: var(--c-green); color: var(--c-green); }
.dechet-jour.ferme  { background: var(--c-surface-2); color: var(--c-text-3); }
.dechet-jour.today  { outline: 2px solid var(--c-accent); }
.dechet-jour-label  { font-weight: 600; display: block; }

/* ── TRANSPORT PAGE ── */
.transport-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.transport-panel {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.transport-panel--full { grid-column: 1 / -1; }
.transport-footer {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.btn-outline {
  display: inline-block;
  padding: 8px 16px;
  border: 1.5px solid var(--c-border-2);
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text-2);
  transition: all .15s;
}
.btn-outline:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
}

/* ── SERVICES PAGE ── */
.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.service-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.service-card--full { grid-column: 1 / -1; }

/* ── SECTION TITLE ── */
.section-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--c-text);
}
.section-desc {
  font-size: 13px;
  color: var(--c-text-3);
  margin-bottom: 16px;
  line-height: 1.5;
}

/* ── CARTE ── */
.carte-toolbar {
  margin-bottom: 12px;
}
.carte-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 5px 12px;
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  font-family: var(--font-body);
  color: var(--c-text-2);
}
.filter-btn:hover { border-color: var(--c-accent); color: var(--c-accent); }
.filter-btn.active {
  background: var(--c-accent);
  border-color: var(--c-accent);
  color: white;
}
#map-container {
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm);
}
#map { height: 520px; width: 100%; }
.leaflet-popup-content-wrapper {
  border-radius: var(--r-sm) !important;
  box-shadow: var(--shadow-md) !important;
}

/* ── RESTAURANTS ── */
.restaurants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.resto-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
}
.resto-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.resto-header {
  padding: 16px;
  background: var(--c-surface-2);
  border-bottom: 1px solid var(--c-border);
}
.resto-nom { font-weight: 700; font-size: 16px; margin-bottom: 2px; }
.resto-adresse { font-size: 12px; color: var(--c-text-3); }
.resto-body { padding: 14px; }
.resto-desc { font-size: 13px; color: var(--c-text-2); margin-bottom: 10px; }
.menu-badge {
  display: inline-block;
  background: var(--c-green-light);
  color: var(--c-green);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}
.menu-contenu {
  background: var(--c-surface-2);
  border-radius: var(--r-sm);
  padding: 10px;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
}
.menu-prix { font-weight: 600; font-size: 13px; color: var(--c-green); margin-top: 6px; }
.resto-links { display: flex; gap: 8px; margin-top: 10px; }
.resto-link {
  font-size: 12px;
  color: var(--c-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.menu-form-section {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 24px;
  margin-top: 8px;
}
.menu-form { display: flex; flex-direction: column; gap: 10px; max-width: 480px; }
.form-input, .form-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: 14px;
  background: var(--c-surface);
  color: var(--c-text);
  transition: border-color .15s;
  resize: vertical;
}
.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--c-accent);
}
.btn-primary {
  padding: 10px 20px;
  background: var(--c-accent);
  color: white;
  border: none;
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  width: fit-content;
}
.btn-primary:hover { background: #1e4d38; }
.form-msg { font-size: 13px; font-weight: 500; padding: 8px 12px; border-radius: var(--r-sm); }
.form-msg.success { background: var(--c-green-light); color: var(--c-green); }
.form-msg.error   { background: var(--c-red-light);   color: var(--c-red); }

/* ── MÉTÉO ── */
.meteo-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
  background: var(--c-surface-2);
  border-radius: var(--r-sm);
  transition: background .15s;
}
.meteo-link:hover { background: var(--c-border); }
.meteo-link span { font-size: 14px; font-weight: 500; }
.meteo-coords { font-size: 11px; color: var(--c-text-3); font-family: var(--font-mono); }

/* ── FOOTER ── */
.site-footer {
  border-top: 1px solid var(--c-border);
  background: var(--c-surface);
  padding: 20px;
  margin-top: 40px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  font-size: 12px;
  color: var(--c-text-3);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.footer-credits { opacity: .8; }

/* ── ERREUR ── */
.error-state {
  text-align: center;
  padding: 20px;
  color: var(--c-text-3);
  font-size: 13px;
}
.error-link {
  color: var(--c-blue);
  text-decoration: underline;
  margin-top: 6px;
  display: inline-block;
}

/* ── INFO ── */
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--c-surface-2);
}
.info-label { color: var(--c-text-2); }
.info-value { font-weight: 500; text-align: right; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .site-main { padding: 16px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .transport-layout { grid-template-columns: 1fr; }
  .transport-panel--full { grid-column: auto; }
  .services-grid { grid-template-columns: 1fr; }
  .service-card--full { grid-column: auto; }
  #map { height: 380px; }
  .header-brand .brand-sub { display: none; }
  .trains-table { font-size: 12px; }
}

@media (max-width: 480px) {
  .brand-title { font-size: 1.1rem; }
  .tab-btn { padding: 10px 12px; font-size: 12px; }
}

/* ── EMPTY STATE ── */
.empty-state {
  padding: 24px;
  text-align: center;
  color: var(--c-text-3);
  font-size: 13px;
  background: var(--c-surface-2);
  border-radius: var(--r-sm);
}

/* ── BUS compléments ── */
.bus-note {
  font-size: 12px;
  color: var(--c-yellow);
  background: var(--c-yellow-light);
  padding: 6px 10px;
  border-radius: var(--r-sm);
  margin-bottom: 10px;
}
.bus-dans {
  font-size: 11px;
  color: var(--c-text-3);
}
.bus-dans.urgent {
  color: var(--c-red);
  font-weight: 600;
}

/* ── MÉTÉO ── */
.meteo-current {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.meteo-emoji { font-size: 36px; line-height: 1; }
.meteo-temp  { font-size: 24px; font-weight: 700; line-height: 1; }
.meteo-desc  { font-size: 13px; color: var(--c-text-2); }
.meteo-wind  { font-size: 12px; color: var(--c-text-3); }

.meteo-daily {
  display: flex;
  gap: 8px;
}
.meteo-day {
  flex: 1;
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  padding: 8px 4px;
  text-align: center;
}
.meteo-day-label { font-size: 11px; font-weight: 600; color: var(--c-text-3); margin-bottom: 4px; text-transform: uppercase; }
.meteo-day-icon  { font-size: 20px; margin: 4px 0; }
.meteo-day-temps { font-size: 12px; display: flex; justify-content: center; gap: 4px; }
.t-max { font-weight: 700; color: var(--c-orange); }
.t-min { color: var(--c-text-3); }
.meteo-day-rain  { font-size: 10px; color: var(--c-blue); margin-top: 2px; }
.meteo-source    { font-size: 10px; color: var(--c-text-3); margin-top: 8px; text-align: right; }

/* ── Pharmacie fallback SPA ── */
.pharmacie-fallback { padding: 4px 0; }
.btn-servigardes {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #00b894;
  color: white;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s;
}
.btn-servigardes:hover { background: #00a381; }

/* ── Déchèterie alternative ── */
.dechet-alternative {
  background: var(--c-blue-light);
  border: 1px solid var(--c-blue);
  border-radius: var(--r-sm);
  padding: 8px 10px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--c-blue);
}
.alternative-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 3px;
  opacity: .8;
}

/* ── Déchèterie dashboard ── */
.dechet-dashboard-row { padding: 4px 0; }
.dechet-dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
}
.dechet-dashboard-nom {
  font-size: 13px;
  font-weight: 600;
}
.dechet-dashboard-h {
  font-size: 12px;
  color: var(--c-text-2);
}

/* ══════════════════════════════════════════════
   REDESIGN MODERNE
   ══════════════════════════════════════════════ */

:root {
  --c-navy:       #1b3a5c;
  --c-navy-10:    rgba(27,58,92,.08);
  --c-navy-20:    rgba(27,58,92,.15);
  --c-accent-2:   #2d6a8f;
}

/* ── Header blanc avec logo navy ── */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--c-border);
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
  padding: 0 24px;
}
.header-inner { height: 62px; }

.header-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.brand-logo {
  height: 36px;
  width: auto;
  display: block;
  /* Pas de filtre — le logo navy s'affiche naturellement sur fond blanc */
}

.live-time {
  background: var(--c-surface-2);
  color: var(--c-text-2);
  border: 1px solid var(--c-border);
  font-size: 13px;
}
.btn-admin {
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  color: var(--c-text-2);
  font-size: 17px;
  width: 36px; height: 36px;
  border-radius: 8px;
  transition: background .15s;
}
.btn-admin:hover { background: var(--c-border); }

/* ── Nav tabs ── */
.tab-nav {
  background: #ffffff;
  border-bottom: 1px solid var(--c-border);
  padding: 0 24px;
  gap: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.tab-btn {
  padding: 14px 18px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 0;
  border-bottom: 3px solid transparent;
  color: var(--c-text-3);
  letter-spacing: .01em;
  margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.tab-btn:hover { color: var(--c-navy); }
.tab-btn.active {
  color: var(--c-navy);
  border-bottom-color: var(--c-navy);
  font-weight: 600;
}

/* ── Cards modernes ── */
.card {
  border-radius: 16px;
  border: 1px solid var(--c-border);
  box-shadow: 0 1px 3px rgba(0,0,0,.04), 0 4px 12px rgba(0,0,0,.05);
  transition: box-shadow .25s, transform .25s;
  padding: 20px;
  background: #fff;
}
.card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.07), 0 12px 28px rgba(0,0,0,.08);
  transform: translateY(-3px);
}

/* Accents colorés en haut (top border) */
.card--pharmacie { border-top: 3px solid #e74c3c; border-left: none; }
.card--trains    { border-top: 3px solid #1a4e8a; border-left: none; }
.card--bus       { border-top: 3px solid #d4500a; border-left: none; }
.card--poste     { border-top: 3px solid #b7791f; border-left: none; }
.card--dechet    { border-top: 3px solid #2d6a4f; border-left: none; }
.card--meteo     { border-top: 3px solid #0d7377; border-left: none; }

/* Icône de carte plus grande */
.card-icon { font-size: 28px; }
.card-title { font-size: 15px; font-weight: 700; color: var(--c-navy); }

/* ── Dashboard grid ── */
.dashboard-grid { gap: 20px; }

/* ── Section panels (Transports, Services) ── */
.transport-panel, .service-card, .admin-card {
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04), 0 4px 12px rgba(0,0,0,.04);
}

/* ── Section title ── */
.section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--c-navy);
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 2px solid var(--c-border);
  padding-bottom: 10px;
  margin-bottom: 16px;
}

/* ── Badges statut ── */
.card-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  letter-spacing: .03em;
  text-transform: uppercase;
}

/* ── Footer ── */
.site-footer {
  background: var(--c-navy);
  border-top: none;
  padding: 28px 24px;
  margin-top: 56px;
}
.footer-inner p { color: rgba(255,255,255,.6); font-size: 12px; }
.footer-credits  { color: rgba(255,255,255,.35) !important; font-size: 11px; }

/* ── Fond page légèrement teinté ── */
body { background: #f4f5f7; }
.site-main { max-width: 1200px; margin: 0 auto; padding: 28px 24px; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .site-header  { padding: 0 16px; }
  .brand-logo   { height: 28px; }
  .tab-btn      { padding: 12px 12px; font-size: 12px; }
  .site-main    { padding: 16px; }
  .dashboard-grid { gap: 14px; }
}

/* ══════════════════════════════════════════════
   AGENDA
   ══════════════════════════════════════════════ */

.card--agenda { border-top: 3px solid #7c3aed; }

/* ── Carte dashboard mini ── */
.agenda-mini-list { list-style: none; }
.agenda-mini-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--c-surface-2);
  text-decoration: none;
  color: var(--c-text);
  transition: background .15s;
}
.agenda-mini-item:last-child { border-bottom: none; }
.agenda-mini-item:hover { color: #7c3aed; }
.agenda-date-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  background: #f3f0ff;
  border: 1.5px solid #ddd6fe;
  border-radius: 10px;
  flex-shrink: 0;
}
.agenda-date-jour {
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  color: #7c3aed;
}
.agenda-date-mois {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #7c3aed;
  opacity: .8;
}
.agenda-mini-titre {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  flex: 1;
}
.agenda-mini-date {
  font-size: 11px;
  color: var(--c-text-3);
  margin-top: 2px;
}

/* ── Page agenda complète ── */
.agenda-header { margin-bottom: 20px; }
.agenda-liste {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.agenda-card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
  transition: box-shadow .2s, transform .2s;
  text-decoration: none;
  color: var(--c-text);
  display: flex;
  flex-direction: column;
}
.agenda-card:hover {
  box-shadow: 0 4px 16px rgba(124,58,237,.12);
  transform: translateY(-2px);
}
.agenda-card-top {
  height: 6px;
  background: linear-gradient(90deg, #7c3aed, #a78bfa);
}
.agenda-card-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}
.agenda-card-body {
  padding: 14px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.agenda-card-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #7c3aed;
  background: #f3f0ff;
  padding: 3px 10px;
  border-radius: 20px;
  width: fit-content;
}
.agenda-card-titre {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--c-navy);
}
.agenda-card-desc {
  font-size: 12px;
  color: var(--c-text-3);
  line-height: 1.5;
  flex: 1;
}
.agenda-card-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--c-surface-2);
  font-size: 12px;
  color: #7c3aed;
  font-weight: 500;
}

/* Fallback agenda */
.agenda-fallback {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  background: #f3f0ff;
  border: 1.5px dashed #ddd6fe;
  border-radius: 14px;
  color: var(--c-text-2);
}
.agenda-fallback a { color: #7c3aed; font-weight: 600; }

@media (max-width: 768px) {
  .agenda-liste { grid-template-columns: 1fr; }
}

/* ── Agenda compléments ── */
.agenda-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.agenda-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 2px 8px;
  background: #ede9fe;
  color: #6d28d9;
  border-radius: 20px;
}
.agenda-card-lieu {
  font-size: 12px;
  color: var(--c-text-3);
  margin-top: 4px;
}
.agenda-card-img-placeholder {
  width: 100%;
  height: 100px;
  background: linear-gradient(135deg, #f3f0ff, #ede9fe);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}

/* ══════════════════════════════════════════════
   MODAL RESTAURANT
   ══════════════════════════════════════════════ */

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; transition: opacity .2s;
}
.modal-overlay.visible { opacity: 1; }

.modal-box {
  background: #fff;
  border-radius: 20px;
  width: 100%; max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  transform: translateY(20px);
  transition: transform .25s;
}
.modal-overlay.visible .modal-box { transform: translateY(0); }

.modal-photo {
  width: 100%; height: 200px;
  object-fit: cover;
  border-radius: 20px 20px 0 0;
  display: block;
}
.modal-photo-placeholder {
  height: 80px;
  background: linear-gradient(135deg, #1b3a5c, #2d6a8f);
  border-radius: 20px 20px 0 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
}
.modal-close {
  position: absolute; top: 12px; right: 12px;
  background: rgba(0,0,0,.4); color: #fff;
  border: none; border-radius: 50%;
  width: 32px; height: 32px;
  font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.modal-header-wrap { position: relative; }

.modal-body { padding: 20px; }

.modal-nom {
  font-size: 22px; font-weight: 800;
  color: var(--c-navy); margin-bottom: 4px;
}
.modal-infos {
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 14px;
}
.modal-info-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--c-text-2);
}
.modal-info-row a { color: var(--c-blue); text-decoration: underline; }

.modal-desc {
  font-size: 13px; color: var(--c-text-2);
  line-height: 1.6; margin-bottom: 14px;
  padding: 10px 12px;
  background: var(--c-surface-2);
  border-radius: 8px;
}

#modal-map { height: 150px; border-radius: 10px; margin-bottom: 16px; }

/* ── Menu du jour ── */
.modal-menu-jour {
  background: var(--c-green-light);
  border: 1.5px solid var(--c-green);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 16px;
}
.modal-menu-titre {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .06em; color: var(--c-green); margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.modal-menu-contenu {
  font-size: 13px; line-height: 1.6; white-space: pre-wrap; color: var(--c-text);
}
.modal-menu-prix {
  margin-top: 8px; font-weight: 700; color: var(--c-green); font-size: 14px;
}

/* ── Carte restaurant ── */
.modal-carte { margin-bottom: 16px; }
.modal-carte-titre {
  font-size: 14px; font-weight: 700; color: var(--c-navy);
  margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}
.modal-carte-saison {
  font-size: 11px; font-weight: 600;
  background: var(--c-yellow-light); color: var(--c-yellow);
  padding: 2px 8px; border-radius: 20px;
}

.carte-section { margin-bottom: 12px; }
.carte-section-nom {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .06em; color: var(--c-text-3);
  padding: 4px 0; margin-bottom: 4px;
  border-bottom: 2px solid var(--c-border);
}
.carte-plat {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 7px 0;
  border-bottom: 1px dotted var(--c-border);
  font-size: 13px;
  cursor: default;
  transition: background .15s;
  border-radius: 4px;
}
.carte-plat:hover { background: var(--c-surface-2); padding-left: 6px; }
.carte-plat:last-child { border-bottom: none; }
.carte-plat-nom { flex: 1; }
.carte-plat-desc {
  display: none;
  font-size: 11px; color: var(--c-text-3);
  margin-top: 2px;
}
.carte-plat:hover .carte-plat-desc { display: block; }
.carte-plat-prix {
  font-weight: 700; color: var(--c-navy);
  white-space: nowrap; margin-left: 12px;
  font-family: var(--font-mono); font-size: 13px;
}

/* ── Cards restaurant ── */
.restaurants-grid { gap: 16px; }
.resto-card {
  cursor: pointer;
  transition: box-shadow .2s, transform .2s;
}
.resto-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.resto-card-photo {
  width: 100%; height: 140px; object-fit: cover;
  border-radius: 14px 14px 0 0;
  display: block;
}
.resto-card-photo-placeholder {
  height: 80px;
  background: linear-gradient(135deg, #1b3a5c22, #2d6a8f22);
  border-radius: 14px 14px 0 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}

/* ── Bouton localiser ── */
.btn-localiser {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .1s;
  box-shadow: 0 2px 8px rgba(59,130,246,.3);
}
.btn-localiser:hover   { background: #2563eb; }
.btn-localiser:active  { transform: scale(.97); }
.btn-localiser:disabled { background: #93c5fd; cursor: wait; }

/* ══════════════════════════════════════════════
   BUS – Onglet transports
   ══════════════════════════════════════════════ */

/* Filtres arrêts */
.bus-arret-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--c-border);
}
.bus-filter-tag {
  padding: 4px 12px;
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  font-family: var(--font-body);
  color: var(--c-text-2);
  white-space: nowrap;
}
.bus-filter-tag:hover { border-color: var(--c-orange); color: var(--c-orange); }
.bus-filter-tag.active {
  background: var(--c-orange);
  border-color: var(--c-orange);
  color: white;
}

/* Grille cards arrêts */
.bus-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.bus-arret-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.bus-arret-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--c-orange);
}
.bus-arret-card-nom {
  font-size: 14px;
  font-weight: 700;
  color: var(--c-navy);
}

@media (max-width: 768px) {
  .bus-detail-grid { grid-template-columns: 1fr; }
}
