/**
 * GPSwitch v5 — Precision Instrument Design System
 * Fond Ink #0C0F14, Signal Blue #3B82F6, JetBrains Mono
 * Mobile-first, dark/light native, progressive enhancement
 */

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* Dark palette (default) */
  --ink:        #0C0F14;
  --slate:      #161B22;
  --graphite:   #1E2530;
  --wire:       #2A3140;
  --signal:     #3B82F6;
  --topo:       #22C55E;
  --beacon:     #F59E0B;
  --snow:       #F1F5F9;
  --mist:       #94A3B8;

  /* Semantic tokens */
  --bg:         var(--ink);
  --surface:    var(--slate);
  --input-bg:   var(--graphite);
  --border:     var(--wire);
  --text:       var(--snow);
  --text-2:     var(--mist);
  --accent:     var(--signal);

  /* Typography */
  --mono:       'JetBrains Mono', 'Courier New', monospace;
  --sans:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Shape */
  --r:          12px;
  --r-sm:       8px;
  --r-pill:     999px;

  /* Transitions */
  --t-fast:     0.15s ease;
  --t-mid:      0.25s ease;
  --t-spring:   0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Light mode */
[data-theme="light"] {
  --bg:         #F8FAFC;
  --surface:    #FFFFFF;
  --input-bg:   #F1F5F9;
  --border:     #E2E8F0;
  --text:       #0F172A;
  --text-2:     #64748B;
  --accent:     #2563EB;
  --wire:       #E2E8F0;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background var(--t-mid), color var(--t-mid);
}

/* ============================================================
   BACKGROUND BEAMS (Aceternity-inspired, subtils)
   Visibles par defaut — pas d'opacity:0 CSS statique
   ============================================================ */
.bg-beams {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-beams svg {
  width: 100%;
  height: 100%;
}

[data-theme="light"] .bg-beams {
  opacity: 0.15;
}

.beam-line {
  animation: beam-drift 30s linear infinite;
}
.beam-line:nth-child(2) { animation-duration: 38s; animation-direction: reverse; }
.beam-line:nth-child(3) { animation-duration: 45s; animation-delay: -10s; }
.beam-line:nth-child(4) { animation-duration: 33s; animation-delay: -20s; animation-direction: reverse; }

@keyframes beam-drift {
  0%   { transform: translateX(-4%) translateY(-4%); }
  50%  { transform: translateX(4%) translateY(3%); }
  100% { transform: translateX(-4%) translateY(-4%); }
}

/* ============================================================
   LAYOUT
   ============================================================ */
.app-wrap {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
  padding: 0 16px 80px;
}

/* ============================================================
   HEADER — sticky, frosted on scroll
   ============================================================ */
.v5-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  margin: 0 -16px;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background var(--t-mid), border-color var(--t-mid), backdrop-filter var(--t-mid);
}

.v5-header.scrolled {
  background: rgba(12, 15, 20, 0.92);
  border-color: var(--wire);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

[data-theme="light"] .v5-header.scrolled {
  background: rgba(248, 250, 252, 0.92);
  border-color: var(--border);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.header-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  display: block;
  flex-shrink: 0;
  object-fit: contain;
  transition: opacity var(--t-fast);
}

.header-logo:hover .header-logo-icon {
  opacity: 0.85;
}

.header-logo-name {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 19px;
  color: var(--text);
  letter-spacing: -0.03em;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Language switcher header */
.lang-header {
  display: flex;
  gap: 1px;
}

.lang-header-btn {
  background: none;
  border: none;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-2);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: color var(--t-fast), background var(--t-fast);
}

.lang-header-btn.active {
  color: var(--text);
  background: var(--wire);
}

[data-theme="light"] .lang-header-btn.active {
  color: var(--text);
  background: var(--border);
}

.lang-header-btn:hover:not(.active) {
  color: var(--text);
  background: rgba(255,255,255,0.06);
}

/* Theme toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--wire);
  border-radius: var(--r-sm);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-2);
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
  flex-shrink: 0;
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.08);
}

/* ============================================================
   INPUT SECTION
   ============================================================ */
.input-section {
  padding-top: 24px;
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 8px;
}

/* Pulse rings anchor */
.input-anchor {
  position: relative;
}

/* GPS Pulse rings — invisible par defaut (0x0), JS les anime */
.pulse-ring {
  position: absolute;
  top: 36px;
  left: 50%;
  border-radius: 50%;
  border: 2px solid var(--accent);
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
  z-index: 0;
}

@keyframes gps-pulse {
  0%   { width: 0; height: 0; opacity: 0.6; transform: translateX(-50%) translateY(-50%); }
  100% { width: 80px; height: 80px; opacity: 0; transform: translateX(-50%) translateY(-50%); }
}

.pulse-ring.firing {
  animation: gps-pulse 0.65s ease-out forwards;
}

/* Textarea input */
.coord-input {
  width: 100%;
  background: var(--input-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 14px 16px;
  font-family: var(--mono);
  font-size: 15px;
  color: var(--text);
  resize: none;
  height: 72px;
  outline: none;
  line-height: 1.5;
  transition: border-color var(--t-mid), box-shadow var(--t-mid);
  position: relative;
  z-index: 1;
}

.coord-input::placeholder {
  color: var(--text-2);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 400;
}

.coord-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

/* Input action buttons */
.input-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.btn-location {
  flex: 1;
  background: var(--graphite);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}

.btn-location:hover {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(59, 130, 246, 0.06);
}

.btn-location:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-convert {
  flex: 2;
  background: var(--accent);
  border: 1.5px solid var(--accent);
  border-radius: var(--r-sm);
  padding: 10px 20px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: opacity var(--t-fast), transform 0.1s ease, box-shadow var(--t-fast);
}

.btn-convert:hover {
  opacity: 0.88;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
}

.btn-convert:active {
  transform: scale(0.97);
}

/* ============================================================
   PHOTO DROP ZONE
   ============================================================ */
.photo-drop-zone {
  margin-top: 10px;
  background: var(--surface);
  border: 1.5px dashed var(--border);
  border-radius: var(--r-sm);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: border-color var(--t-mid), background var(--t-mid);
}

.photo-drop-zone:hover,
.photo-drop-zone.drag-over {
  border-color: var(--beacon);
  background: rgba(245, 158, 11, 0.06);
}

.photo-drop-zone.success {
  border-color: var(--topo);
  background: rgba(34, 197, 94, 0.06);
}

.photo-drop-zone.error {
  border-color: #EF4444;
  background: rgba(239, 68, 68, 0.06);
}

.photo-drop-zone.processing {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.06);
}

.photo-drop-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.photo-drop-icon {
  color: var(--text-2);
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.photo-drop-text {
  font-size: 13px;
  color: var(--text-2);
}

.photo-file-input {
  display: none;
}

/* Photo preview inside drop zone */
.photo-preview-thumb {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.photo-preview-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.photo-preview-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.photo-preview-coords {
  font-size: 11px;
  color: var(--topo);
}

/* ============================================================
   EMPTY STATE — Example Chips
   ============================================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
}

.example-chip {
  background: var(--graphite);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
  width: 100%;
  text-align: left;
}

.example-chip:hover {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.06);
  transform: translateX(2px);
}

.example-chip:active {
  transform: scale(0.99);
}

.chip-icon {
  width: 36px;
  height: 36px;
  background: var(--surface);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

[data-theme="light"] .chip-icon {
  background: var(--border);
}

.chip-content {
  flex: 1;
  min-width: 0;
}

.chip-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 2px;
}

.chip-value {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip-arrow {
  color: var(--text-2);
  font-size: 18px;
  line-height: 1;
}

/* ============================================================
   LOADING & ERROR
   ============================================================ */
.loading-state {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 16px;
  color: var(--text-2);
  font-size: 13px;
  margin-top: 16px;
}

.loading-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.error-state {
  display: none;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--r-sm);
  padding: 12px 16px;
  color: #FCA5A5;
  font-size: 13px;
  margin-top: 12px;
}

/* ============================================================
   RESULTS SECTION
   Hidden by JS after load. Visible by default = content
   accessible if JS fails.
   ============================================================ */
.results-section {
  margin-top: 24px;
}

/* ============================================================
   SERVICES — 3 boutons Waze / Google Maps / Plans
   ============================================================ */
.services-section {
  margin-bottom: 16px;
}

.services-grid {
  display: flex;
  gap: 8px;
}

/* Service cards (generated by display.js) */
.service-card-glass {
  flex: 1;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: border-color var(--t-mid), box-shadow var(--t-mid), transform var(--t-spring);
}

.service-card-glass:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  transform: translateY(-2px);
}

.service-card-glass:active {
  transform: scale(0.97);
}

.service-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.service-name {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  text-align: center;
}

/* ============================================================
   COORDINATES LIST (formats)
   ============================================================ */
.formats-section {
  margin-bottom: 16px;
}

.formats-section-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 8px;
}

/* Coordinate items (generated by display.js) */
.coordinate-item-glass {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  margin-bottom: 4px;
  transition: border-color var(--t-fast), background var(--t-fast);
}

.coordinate-item-glass:hover {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.04);
}

.coordinate-item-glass.copy-success {
  border-color: var(--topo);
  background: rgba(34, 197, 94, 0.06);
}

.coord-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-2);
  min-width: 80px;
  flex-shrink: 0;
}

.coord-value {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
   SHARE SECTION — QR + boutons
   ============================================================ */
.share-section {
  display: none;
  margin-bottom: 16px;
}

.share-section.active {
  display: block;
}

.share-container-v23 {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 16px;
}

.share-content-v23 {
  display: flex;
  gap: 16px;
  align-items: center;
}

.qr-wrapper-v23 {
  flex-shrink: 0;
}

.qr-code-v23 {
  width: 80px;
  height: 80px;
  background: #fff;
  border-radius: var(--r-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-code-v23 canvas,
.qr-code-v23 img {
  width: 80px !important;
  height: 80px !important;
}

.share-buttons-v23 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  flex: 1;
}

.share-btn-v23 {
  background: var(--graphite);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 8px 10px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}

.share-btn-v23:hover {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.07);
}

.share-btn-v23 svg {
  flex-shrink: 0;
}

/* ============================================================
   MAP SECTION
   ============================================================ */
.map-section-glass {
  margin-bottom: 16px;
}

.map-glass-container {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}

.map-glass {
  height: 220px;
  width: 100%;
}

.map-glass iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ============================================================
   AFFILIATE
   ============================================================ */
.affiliate-section-glass {
  margin-bottom: 16px;
}

.affiliate-container {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 16px;
}

.affiliate-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.affiliate-icon {
  color: var(--beacon);
  flex-shrink: 0;
}

.affiliate-icon svg {
  display: block;
  width: 32px;
  height: 32px;
}

.affiliate-text {
  flex: 1;
  min-width: 0;
}

.affiliate-title {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.affiliate-subtitle {
  font-size: 12px;
  color: var(--text-2);
}

.affiliate-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--r-sm);
  padding: 7px 14px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  transition: opacity var(--t-fast), background var(--t-fast);
  flex-shrink: 0;
}

.affiliate-cta:hover {
  opacity: 0.8;
  background: rgba(59, 130, 246, 0.2);
}

.affiliate-disclosure {
  font-size: 10px;
  color: var(--text-2);
  margin-top: 10px;
  line-height: 1.4;
}

/* ============================================================
   FOOTER
   ============================================================ */
.v5-footer {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.footer-langs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px;
}

.lang-btn-glass {
  background: none;
  border: none;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color var(--t-fast), background var(--t-fast);
}

.lang-btn-glass.active {
  color: var(--text);
  background: var(--wire);
}

[data-theme="light"] .lang-btn-glass.active {
  color: var(--text);
  background: var(--border);
}

.lang-btn-glass:hover:not(.active) {
  color: var(--text);
}

.lang-separator {
  color: var(--wire);
  font-size: 12px;
  line-height: 1.8;
  user-select: none;
}

.coffee-link-v23 {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--text-2);
  text-decoration: none;
  transition: color var(--t-fast);
}

.coffee-link-v23:hover {
  color: var(--beacon);
}

.footer-version {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--wire);
  letter-spacing: 0.04em;
}

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--topo);
  color: #fff;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  z-index: 999;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.25);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* Notification manager toast (class used by notifications.js) */
.notification-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 10px 18px;
  border-radius: var(--r-pill);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  z-index: 999;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
}

.notification-toast.success {
  background: var(--topo);
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.25);
}

.notification-toast.error {
  background: #EF4444;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.25);
}

.notification-toast.visible {
  transform: translateX(-50%) translateY(0);
}

/* ============================================================
   CONTEXT MENU (service buttons long-press)
   ============================================================ */
.context-menu {
  position: fixed;
  inset: 0;
  z-index: 500;
}

.context-menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.context-menu-content {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px;
  min-width: 200px;
}

.context-menu-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.context-action-btn {
  background: var(--graphite);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 12px;
  cursor: pointer;
  color: var(--text);
  transition: border-color var(--t-fast), background var(--t-fast);
}

.context-action-btn:hover {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.1);
}

/* ============================================================
   UTILITIES
   ============================================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   MICRO-INTERACTIONS — Copy Confirm
   ============================================================ */
@keyframes copy-confirm {
  0%   { transform: scale(1); }
  30%  { transform: scale(0.93); }
  70%  { transform: scale(1.04); }
  100% { transform: scale(1); }
}

.coordinate-item-glass.copy-success {
  animation: copy-confirm 0.4s ease forwards;
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }

  .pulse-ring {
    display: none !important;
  }
}

/* ============================================================
   LIGHT MODE OVERRIDES — tokens non suffisants pour tout
   ============================================================ */
[data-theme="light"] .example-chip {
  background: #FFFFFF;
  border-color: #E2E8F0;
}

[data-theme="light"] .example-chip:hover {
  background: rgba(37, 99, 235, 0.04);
  border-color: #2563EB;
}

[data-theme="light"] .btn-location {
  background: #F1F5F9;
  border-color: #CBD5E1;
  color: #475569;
}

[data-theme="light"] .btn-location:hover {
  background: rgba(37, 99, 235, 0.06);
  border-color: #2563EB;
  color: #0F172A;
}

[data-theme="light"] .coord-input {
  color: #0F172A;
}

[data-theme="light"] .share-btn-v23 {
  background: #F1F5F9;
  border-color: #E2E8F0;
}

[data-theme="light"] .coordinate-item-glass {
  background: #FFFFFF;
  border-color: #E2E8F0;
}

[data-theme="light"] .service-card-glass {
  background: #FFFFFF;
  border-color: #E2E8F0;
}

[data-theme="light"] .affiliate-container {
  background: #FFFFFF;
  border-color: #E2E8F0;
}

[data-theme="light"] .share-container-v23 {
  background: #FFFFFF;
  border-color: #E2E8F0;
}

[data-theme="light"] .map-glass-container {
  border-color: #E2E8F0;
}

[data-theme="light"] .photo-drop-zone {
  background: #FFFFFF;
  border-color: #CBD5E1;
}

/* ============================================================
   RESPONSIVE — 375px mobile first, 600px max
   ============================================================ */
@media (max-width: 380px) {
  .share-buttons-v23 {
    grid-template-columns: 1fr;
  }

  .header-logo-name {
    font-size: 16px;
  }

  .lang-header {
    display: none;
  }
}

@media (min-width: 480px) {
  .share-content-v23 {
    gap: 20px;
  }

  .qr-code-v23 {
    width: 100px;
    height: 100px;
  }

  .qr-code-v23 canvas,
  .qr-code-v23 img {
    width: 100px !important;
    height: 100px !important;
  }
}

/* ============================================================
   LANG DROPDOWN — v5.1 (remplace lang-header + lang-btn-glass)
   ============================================================ */

.lang-dropdown {
  position: relative;
}

.lang-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 1px solid var(--wire);
  border-radius: var(--r-sm);
  padding: 5px 8px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-2);
  cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
  white-space: nowrap;
}

.lang-dropdown-btn:hover {
  color: var(--text);
  border-color: var(--signal);
}

.lang-dropdown-btn[aria-expanded="true"] {
  color: var(--text);
  border-color: var(--signal);
  background: var(--graphite);
}

.lang-dropdown-arrow {
  transition: transform var(--t-fast);
  flex-shrink: 0;
  color: var(--text-2);
}

.lang-dropdown-btn[aria-expanded="true"] .lang-dropdown-arrow {
  transform: rotate(180deg);
}

.lang-dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--slate);
  border: 1px solid var(--wire);
  border-radius: var(--r);
  min-width: 130px;
  padding: 4px;
  list-style: none;
  margin: 0;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.lang-dropdown-menu.open {
  display: block;
}

[data-theme="light"] .lang-dropdown-menu {
  background: #ffffff;
  border-color: var(--border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.lang-dropdown-item {
  display: flex;
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  border-radius: 6px;
  padding: 8px 10px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  text-align: left;
  transition: color var(--t-fast), background var(--t-fast);
}

.lang-dropdown-item:hover,
.lang-dropdown-item:focus {
  color: var(--text);
  background: var(--graphite);
  outline: none;
}

[data-theme="light"] .lang-dropdown-item:hover,
[data-theme="light"] .lang-dropdown-item:focus {
  background: var(--border);
}

.lang-dropdown-item.active {
  color: var(--signal);
  font-weight: 600;
}

/* Masquer l'ancien header lang switcher si present */
.lang-header {
  display: none !important;
}

/* Footer : supprimer la liste plate de langues */
.footer-langs {
  display: none !important;
}

/* Coffee link — toujours masque */
.coffee-link-v23 {
  display: none !important;
}

/* Footer simplifie — juste la version */
.v5-footer {
  justify-content: center;
}

/* ============================================================
   QR CODE — fix dark mode : fond blanc garanti
   ============================================================ */

.qr-code-v23 {
  background: #ffffff !important;
}

/* QR SVG generee par la lib : forcer le fond blanc */
.qr-code-v23 svg {
  background: #ffffff;
  display: block;
  width: 100% !important;
  height: 100% !important;
}

