@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --font-primary: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --bg-main: #0B0F19;
  --bg-card: rgba(17, 24, 39, 0.78);
  --bg-card-inner: rgba(30, 41, 59, 0.65);
  --border-color: rgba(255, 255, 255, 0.1);
  --border-highlight: rgba(245, 158, 11, 0.45);

  --accent-amber: #F59E0B;
  --accent-emerald: #10B981;
  --accent-cyan: #06B6D4;
  --accent-purple: #8B5CF6;
  --accent-rose: #F43F5E;

  --primary-gradient: linear-gradient(135deg, #F59E0B 0%, #EA580C 100%);
  --emerald-gradient: linear-gradient(135deg, #10B981 0%, #059669 100%);
  --cyan-gradient: linear-gradient(135deg, #06B6D4 0%, #3B82F6 100%);

  --text-main: #F9FAFB;
  --text-muted: #9CA3AF;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  background-image:
    radial-gradient(circle at 12% 15%, rgba(245, 158, 11, 0.14) 0%, transparent 40%),
    radial-gradient(circle at 88% 82%, rgba(6, 182, 212, 0.14) 0%, transparent 40%);
  background-attachment: fixed;
  padding-bottom: 3rem;
}

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1rem;
}

.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

/* ==========================================
   AUTH OVERLAY (MOT DE PASSE "Chaussette")
   ========================================== */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: radial-gradient(circle at 50% 30%, rgba(245, 158, 11, 0.16), #0B0F19 70%);
}

.auth-card {
  width: 100%;
  max-width: 430px;
  padding: 2.25rem 1.75rem;
  text-align: center;
  animation: fadeUp 0.4s ease-out;
}

.auth-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  border-radius: 20px;
  background: rgba(245, 158, 11, 0.15);
  border: 2px solid rgba(245, 158, 11, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
}

.auth-card h1 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.auth-subtitle {
  color: var(--accent-amber);
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 0.9rem;
}

.auth-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.4rem;
}

.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 0.85rem;
}

.password-input-wrapper input {
  width: 100%;
  padding: 0.95rem 3rem 0.95rem 1.1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.9);
  color: #FFF;
  font-size: 1.05rem;
  font-family: var(--font-primary);
  outline: none;
  transition: var(--transition);
}

.password-input-wrapper input:focus {
  border-color: var(--accent-amber);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.btn-icon-pwd {
  position: absolute;
  right: 0.65rem;
  background: none;
  border: none;
  font-size: 1.15rem;
  cursor: pointer;
  padding: 0.3rem;
}

.auth-error {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #FDA4AF;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.9rem;
}

.auth-remember {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  cursor: pointer;
}

.auth-footer {
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.link-back {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
}

.link-back:hover {
  color: #FFF;
}

/* ==========================================
   HEADER & NETWORK STATUS
   ========================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 25, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 0;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.logo-emoji {
  font-size: 1.8rem;
}

.logo-title {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.3px;
}

.network-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
}

.network-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.network-badge .dot.online {
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

.network-badge .dot.offline {
  background: var(--accent-amber);
  box-shadow: 0 0 8px var(--accent-amber);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ==========================================
   BUTTONS & INPUTS
   ========================================== */
.btn {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.72rem 1.25rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #FFF;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45);
}

.btn-accent {
  background: var(--emerald-gradient);
  color: #FFF;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.13);
}

.btn-sm {
  font-size: 0.82rem;
  padding: 0.5rem 0.85rem;
  border-radius: 10px;
}

.btn-xs {
  font-size: 0.76rem;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
}

.btn-large {
  font-size: 1rem;
  padding: 0.9rem 1.6rem;
}

.btn-block {
  width: 100%;
}

.form-group {
  margin-bottom: 1.1rem;
}

.form-group label {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  color: #E5E7EB;
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.72rem 0.95rem;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(15, 23, 42, 0.8);
  color: #FFF;
  font-family: var(--font-primary);
  font-size: 0.92rem;
  outline: none;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--accent-amber);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}

.form-hint {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.85rem;
}

.date-range-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.date-arrow {
  color: var(--accent-amber);
  font-weight: 800;
}

.input-add-row {
  display: flex;
  gap: 0.6rem;
}

/* ==========================================
   TOOLBAR & HERO BANNER
   ========================================== */
.trip-toolbar-section {
  margin-top: 1rem;
}

.trip-toolbar {
  padding: 0.85rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.trip-selector-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  flex: 1;
}

.toolbar-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-amber);
  white-space: nowrap;
}

.trip-select-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 1;
  min-width: 230px;
}

.select-trip {
  max-width: 280px;
  padding: 0.48rem 0.75rem;
  font-weight: 600;
}

.trip-actions-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.save-toast {
  margin-top: 0.6rem;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #6EE7B7;
  padding: 0.6rem 1rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
}

.trip-hero-banner {
  margin-top: 1rem;
  padding: 1.35rem 1.5rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18) 0%, rgba(6, 182, 212, 0.15) 100%);
  border: 1px solid rgba(245, 158, 11, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.trip-hero-countries {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-amber);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.trip-hero-main h2 {
  font-size: 1.55rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
}

.trip-hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-size: 0.86rem;
  color: #D1D5DB;
}

.meta-sep {
  opacity: 0.45;
}

.trip-hero-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.hero-stat-pill {
  background: rgba(11, 15, 25, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #F3F4F6;
}

/* ==========================================
   MAIN TABS NAVIGATION
   ========================================== */
.main-tabs-nav {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
}

.tab-btn {
  background: rgba(17, 24, 39, 0.75);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.75rem 0.5rem;
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 0.8rem;
  transition: var(--transition);
}

.tab-btn .tab-icon {
  font-size: 1.25rem;
}

.tab-btn:hover {
  color: #FFF;
  border-color: rgba(255, 255, 255, 0.22);
}

.tab-btn.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(234, 88, 12, 0.22));
  border-color: var(--accent-amber);
  color: #FFF;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2);
}

.main-content {
  margin-top: 1.25rem;
}

.tab-pane {
  display: none;
  animation: fadeUp 0.25s ease-out;
}

.tab-pane.active {
  display: block;
}

/* ==========================================
   SECTIONS, CHIPS, FLIGHTS & CAR RENTAL
   ========================================== */
.section-card {
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-color);
}

.section-header h3 {
  font-size: 1.18rem;
  font-weight: 800;
  margin-bottom: 0.2rem;
}

.section-header p,
.section-sub {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.chip-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.35);
  font-size: 0.84rem;
  font-weight: 700;
  color: #FDE68A;
}

.chip-item.participant {
  background: rgba(6, 182, 212, 0.14);
  border-color: rgba(6, 182, 212, 0.35);
  color: #A5F3FC;
}

.chip-remove {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 0.9rem;
  opacity: 0.75;
  line-height: 1;
}

.chip-remove:hover {
  opacity: 1;
}

/* FLIGHTS BOX */
.flight-form-box,
.car-form-box {
  background: var(--bg-card-inner);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.15rem;
}

.flight-auto-times-box {
  background: rgba(16, 185, 129, 0.08);
  border: 1px dashed rgba(16, 185, 129, 0.45);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  margin-top: 0.4rem;
}

.auto-times-header {
  margin-bottom: 0.65rem;
}

.auto-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #6EE7B7;
}

.time-highlight {
  font-weight: 800;
  font-size: 1.02rem;
  color: #6EE7B7;
  border-color: rgba(16, 185, 129, 0.4);
}

.items-stack {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.flight-ticket-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: 14px;
  padding: 1rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.flight-route-visual {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  flex: 1;
}

.flight-time-Point {
  text-align: center;
}

.flight-time-big {
  font-size: 1.25rem;
  font-weight: 800;
  color: #FFF;
}

.flight-airport-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.flight-middle-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 110px;
  color: var(--accent-cyan);
  font-size: 0.78rem;
  font-weight: 700;
}

.flight-line {
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
  margin: 0.2rem 0;
}

/* CAR RENTAL */
.switch-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  user-select: none;
}

.switch-toggle input {
  display: none;
}

.switch-slider {
  width: 46px;
  height: 26px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  position: relative;
  transition: var(--transition);
}

.switch-slider::after {
  content: '';
  width: 20px;
  height: 20px;
  background: #FFF;
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: var(--transition);
}

.switch-toggle input:checked + .switch-slider {
  background: var(--accent-emerald);
}

.switch-toggle input:checked + .switch-slider::after {
  transform: translateX(20px);
}

.switch-label {
  font-size: 0.88rem;
  font-weight: 700;
}

.car-pickup-dropoff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}

.car-subcard {
  padding: 1rem;
  border-radius: 12px;
  background: rgba(11, 15, 25, 0.55);
  border: 1px solid var(--border-color);
}

.car-subcard.pickup {
  border-left: 4px solid var(--accent-emerald);
}

.car-subcard.dropoff {
  border-left: 4px solid var(--accent-amber);
}

.car-subcard-title {
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.empty-inline-msg {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-style: italic;
}

.next-step-bar {
  display: flex;
  justify-content: center;
  margin-top: 0.5rem;
}

/* ==========================================
   TAB 2 : PROGRAMME JOUR PAR JOUR
   ========================================== */
.days-nav-wrapper {
  padding: 1.15rem 1.35rem;
  margin-bottom: 1.25rem;
  position: sticky;
  top: 66px;
  z-index: 80;
}

.days-nav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.days-view-mode {
  display: flex;
  gap: 0.4rem;
}

.days-view-mode .btn.active {
  background: var(--primary-gradient);
  border-color: transparent;
  color: #FFF;
}

.day-pills-scroll {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  scrollbar-width: thin;
}

.day-pill {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.5rem 0.9rem;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  font-family: var(--font-primary);
  font-size: 0.82rem;
  font-weight: 700;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.day-pill .pill-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}

.day-pill.active {
  background: var(--primary-gradient);
  border-color: transparent;
  color: #FFF;
}

.day-pill.active .pill-sub {
  color: rgba(255, 255, 255, 0.9);
}

.day-card {
  padding: 1.4rem;
  margin-bottom: 1.35rem;
}

.day-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.15rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-color);
}

.day-badge-num {
  background: var(--primary-gradient);
  color: #FFF;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  display: inline-block;
  margin-right: 0.6rem;
}

.day-date-title {
  font-size: 1.2rem;
  font-weight: 800;
}

.day-reminders-banner {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.day-reminder-item {
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.day-reminder-item.flight {
  background: rgba(6, 182, 212, 0.14);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: #A5F3FC;
}

.day-reminder-item.car {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #A7F3D0;
}

/* ACTIVITÉ PHARE DU JOUR */
.highlight-activity-box {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(234, 88, 12, 0.06));
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 14px;
  padding: 1rem;
  margin-bottom: 1.15rem;
}

/* ÉTAPES & LIEUX VISITÉS */
.day-visits-box {
  background: var(--bg-card-inner);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1rem;
  margin-bottom: 1.15rem;
}

.visit-row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: rgba(11, 15, 25, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.visit-time-badge {
  background: rgba(6, 182, 212, 0.18);
  color: #67E8F9;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
  border-radius: 7px;
}

/* REPAS (MIDI & SOIR) + NUITÉE */
.day-meals-hotel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.9rem;
}

.meal-hotel-card {
  background: var(--bg-card-inner);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 0.95rem;
}

.meal-hotel-card.lunch {
  border-top: 3px solid #F59E0B;
}

.meal-hotel-card.dinner {
  border-top: 3px solid #EC4899;
}

.meal-hotel-card.night {
  border-top: 3px solid #8B5CF6;
}

.mh-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  font-weight: 800;
  font-size: 0.9rem;
}

/* ==========================================
   TAB 3 : CARTE GOOGLE MAPS & HÔTELS/RESTOS
   ========================================== */
.map-filters-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.map-filter-group,
.map-layer-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip-filter {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-family: var(--font-primary);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.chip-filter.active {
  background: var(--primary-gradient);
  border-color: transparent;
  color: #FFF;
}

.map-container-wrapper {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  margin-bottom: 1rem;
}

.interactive-map {
  width: 100%;
  height: 430px;
  background: #111827;
}

.map-legend {
  background: rgba(15, 23, 42, 0.95);
  padding: 0.6rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  font-size: 0.78rem;
  color: #D1D5DB;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 0.35rem;
}

.legend-dot.visit { background: #F59E0B; }
.legend-dot.hotel { background: #8B5CF6; }
.legend-dot.resto { background: #EC4899; }
.legend-dot.car { background: #10B981; }

.gmaps-embed-panel {
  background: var(--bg-card-inner);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 0.95rem;
}

.gmaps-embed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.gmaps-embed-header .text-muted {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.gmaps-iframe-wrapper {
  width: 100%;
  height: 290px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.gmaps-iframe-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.map-places-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 1.25rem;
}

.places-directory-list {
  margin-top: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.directory-item {
  background: var(--bg-card-inner);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.8rem 0.95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.directory-item-info strong {
  display: block;
  font-size: 0.92rem;
}

.directory-item-info span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ==========================================
   TAB 4 : PHOTOS DES LIEUX (GOOGLE / WIKIMEDIA)
   ========================================== */
.photo-quick-finder {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.photo-quick-finder input {
  flex: 1;
  min-width: 220px;
}

.photos-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 1.1rem;
}

.photo-place-card {
  background: var(--bg-card-inner);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.photo-place-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.4);
}

.photo-img-container {
  position: relative;
  width: 100%;
  height: 175px;
  background: #1E293B;
  overflow: hidden;
}

.photo-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.photo-place-card:hover .photo-img-container img {
  transform: scale(1.04);
}

.photo-day-tag {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  background: rgba(11, 15, 25, 0.82);
  backdrop-filter: blur(6px);
  color: #FDE68A;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}

.photo-type-tag {
  position: absolute;
  bottom: 0.6rem;
  right: 0.6rem;
  background: rgba(11, 15, 25, 0.82);
  color: #FFF;
  padding: 0.2rem 0.55rem;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 700;
}

.photo-card-body {
  padding: 0.95rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
  gap: 0.75rem;
}

.photo-card-title {
  font-weight: 800;
  font-size: 0.98rem;
}

.photo-card-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.photo-card-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

/* ==========================================
   TAB 5 : MODE HORS-CONNEXION (ROADBOOK)
   ========================================== */
.offline-banner-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.offline-icon-big {
  font-size: 2.8rem;
}

.offline-banner-info {
  flex: 1;
  min-width: 250px;
}

.offline-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.75rem;
}

.offline-banner-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.offline-roadbook {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.roadbook-day-sheet {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.25rem;
}

.roadbook-grid-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-top: 0.8rem;
}

.roadbook-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.75rem;
  font-size: 0.86rem;
}

/* ==========================================
   MODAL PARTAGE
   ========================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-box {
  width: 100%;
  max-width: 560px;
  padding: 1.5rem;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.btn-close-modal {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
}

.share-option-box {
  background: var(--bg-card-inner);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
}

.small-muted {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0.25rem 0 0.65rem;
}

/* ==========================================
   RESPONSIVE MOBILE OPTIMIZATIONS
   ========================================== */
@media (max-width: 720px) {
  .main-tabs-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 900;
    margin: 0;
    padding: 0.45rem 0.5rem calc(0.45rem + env(safe-area-inset-bottom));
    background: rgba(11, 15, 25, 0.96);
    backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 0;
    gap: 0.25rem;
  }

  body {
    padding-bottom: 5.5rem;
  }

  .tab-btn {
    padding: 0.45rem 0.2rem;
    font-size: 0.68rem;
    border-radius: 10px;
  }

  .tab-btn .tab-icon {
    font-size: 1.15rem;
  }

  .section-card,
  .day-card {
    padding: 1.1rem;
  }

  .interactive-map {
    height: 330px;
  }

  .input-add-row {
    flex-direction: column;
  }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media print {
  .app-header,
  .trip-toolbar-section,
  .main-tabs-nav,
  .offline-banner-actions {
    display: none !important;
  }
  body {
    background: #FFF;
    color: #000;
  }
}
