/* =========================================================
   LOU MOBILE — Apple first, extensible Android/Web
   Activation : @media (max-width: 768px) OU body.is-mobile
   ========================================================= */

@media (max-width: 768px) {

  /* ── Reset layout desktop ── */
  .icalou-modern-nav,
  .mobile-menu-btn,
  #mobile-menu-toggle,
  .mobile-nav-overlay { display: none !important; }

  body { background: var(--lou-bg); }

  html { height: 100% !important; overflow: hidden !important; }
  body.is-mobile {
    height: 100svh !important;
    overflow: hidden !important;
    -webkit-overflow-scrolling: touch;
  }

  #lou-mobile-shell {
    position: relative;
    height: 100svh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    --lou-bottom-nav-clearance: 104px;
  }

  /* ═══════════════ LOGO BAR ═══════════════ */
  #lou-logo-bar {
    background: var(--lou-card);
    border-bottom: 0.5px solid var(--lou-border);
    padding: calc(8px + var(--lou-safe-top)) 14px 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 1001;
  }
  .lou-logo-wrap { display: flex; align-items: center; gap: 8px; }
  .lou-logo-mark {
    width: 104px;
    flex-shrink: 0;
  }
  .lou-logo-gite {
    font-size: 10px;
    color: var(--lou-text-3);
  }
  .lou-notif-pill {
    background: var(--lou-badge-amber-bg);
    color: var(--lou-badge-amber-text);
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--lou-radius-full);
    display: flex;
    align-items: center;
    gap: 3px;
  }

  /* ═══════════════ ZONE PAGES ═══════════════ */
  #lou-pages {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(var(--lou-bottom-nav-clearance, 104px) + 16px);
    box-sizing: border-box;
  }
  .lou-page {
    display: none;
    padding: 10px 12px;
    padding-bottom: 16px;
    background: var(--lou-bg);
    box-sizing: border-box;
    overflow: visible !important;
  }
  .lou-page.active {
    display: block;
    min-height: 100%;
  }

  /* ═══════════════ BOTTOM NAV ═══════════════ */
  #lou-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--app-cream, #F4EFE3);
    border-top: 1px solid rgba(91, 138, 45, 0.18);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 6px 0;
    padding-bottom: calc(6px + var(--lou-safe-bottom));
    z-index: 1000;
  }
  .lou-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    cursor: pointer;
    padding: 4px 2px;
    border: none;
    background: none;
    color: var(--lou-text-3);
    font-size: 9px;
    font-family: sans-serif;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    line-height: 1.3;
  }
  .lou-nav-btn svg,
  .lou-nav-btn i { font-size: 20px; }
  .lou-nav-btn.active { color: var(--lou-green); }

  /* Bouton central "Plus" — accent visuel dans l'alignement de la barre (pas de protrusion : collision avec #lou-voice-island / #lou-orb au-dessus) */
  .lou-nav-btn--fab { gap: 2px; }
  .lou-nav-fab-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2px;
    background: linear-gradient(135deg, var(--lou-green) 0%, var(--lou-green-dark) 100%);
    color: #fff;
    box-shadow: 0 3px 8px rgba(15, 110, 86, 0.35);
  }
  .lou-nav-btn--fab.active .lou-nav-fab-circle { color: #fff; }
  .lou-nav-icon-wrap { position: relative; display: inline-flex; }
  .lou-nav-badge {
    position: absolute;
    top: -3px; right: -6px;
    background: var(--lou-danger);
    color: #fff;
    font-size: 7px; font-weight: 700;
    min-width: 13px; height: 13px;
    border-radius: 999px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 2px;
  }

  /* ═══════════════ MESSAGERIE MOBILE ═══════════════ */
  .lou-msg-conv-item {
    all: unset;
    display: block;
    cursor: pointer;
    padding: 12px 14px;
    background: var(--lou-card);
    border: 0.5px solid var(--lou-border);
    border-radius: 10px;
    margin-bottom: 8px;
    position: relative;
  }
  .lou-msg-conv-item.is-unread { background: var(--lou-card); border-color: var(--lou-border); }
  .lou-msg-conv-item.is-unread::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--lou-danger);
  }
  .lou-msg-conv-title {
    font-size: 14px; font-weight: 600; color: var(--lou-text-1);
    display: flex; justify-content: space-between; gap: 8px;
    align-items: center; margin-bottom: 2px;
  }
  .lou-msg-conv-meta { font-size: 11px; color: var(--lou-text-3); margin-bottom: 4px; }
  .lou-msg-conv-preview {
    font-size: 12px; color: var(--lou-text-2);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .lou-msg-conv-time { font-size: 10px; color: var(--lou-text-3); }
  .lou-msg-conv-unread {
    background: var(--lou-danger); color: #fff;
    font-size: 10px; font-weight: 700;
    min-width: 18px; height: 18px;
    border-radius: 999px; padding: 0 5px;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .lou-msg-day {
    align-self: center;
    background: var(--lou-border); color: var(--lou-text-2);
    font-size: 10px; padding: 2px 9px; border-radius: 999px; margin: 4px 0;
  }
  .lou-msg-bubble {
    max-width: 78%;
    padding: 8px 11px;
    border-radius: 14px;
    line-height: 1.35;
    font-size: 13.5px;
    word-wrap: break-word;
    white-space: pre-wrap;
  }
  .lou-msg-bubble--gerant {
    align-self: flex-end;
    background: rgba(127, 127, 127, 0.13); color: var(--lou-text-1);
    border-bottom-right-radius: 4px;
  }
  .lou-msg-bubble--client {
    align-self: flex-start;
    background: var(--lou-card); color: var(--lou-text-1);
    border: 0.5px solid var(--lou-border);
    border-bottom-left-radius: 4px;
  }
  .lou-msg-time {
    display: block; margin-top: 3px;
    font-size: 9.5px; color: var(--lou-text-3); text-align: right;
  }
  .lou-msg-bubble--client .lou-msg-time { color: var(--lou-text-3); }
  .lou-msg-ai-tag {
    font-size: 9.5px;
    color: var(--lou-text-3);
    margin-bottom: 3px;
  }
  .lou-msg-empty {
    margin: auto; padding: 20px; text-align: center;
    color: var(--lou-text-3); font-size: 12px; font-style: italic;
  }

  /* Temps réel : slide-in, Vu, présence, "en train d'écrire" */
  .lou-msg-bubble { animation: louMsgSlideIn 0.18s ease-out; }
  @keyframes louMsgSlideIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .lou-msg-read {
    align-self: flex-end;
    font-size: 9.5px; color: var(--lou-text-3);
    margin: -1px 2px 3px;
  }
  .lou-msg-presence-dot {
    display: inline-block;
    width: 8px; height: 8px; margin-left: 6px;
    border-radius: 50%; background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34,197,94,0.5);
    animation: louMsgPulse 1.8s infinite;
    vertical-align: middle;
  }
  @keyframes louMsgPulse {
    0%   { box-shadow: 0 0 0 0 rgba(34,197,94,0.5); }
    70%  { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
    100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
  }
  .lou-msg-typing {
    align-self: flex-start;
    display: inline-flex; gap: 4px; align-items: center;
    background: var(--lou-card);
    border: 0.5px solid var(--lou-border);
    border-radius: 14px; border-bottom-left-radius: 4px;
    padding: 8px 11px;
  }
  .lou-msg-typing span {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--lou-text-3);
    animation: louMsgTyping 1.2s infinite ease-in-out;
  }
  .lou-msg-typing span:nth-child(2) { animation-delay: 0.2s; }
  .lou-msg-typing span:nth-child(3) { animation-delay: 0.4s; }
  @keyframes louMsgTyping {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30% { transform: translateY(-4px); opacity: 1; }
  }

  /* Lou Voice V2 : îlot demi-arrondi au-dessus de la bottom-nav */
  #lou-voice-island {
    position: absolute;
    top: -42px;
    left: 50%;
    width: 128px;
    height: 42px;
    transform: translateX(-50%);
    border-radius: 64px 64px 0 0;
    background: var(--lou-card);
    border: 0.5px solid var(--lou-border);
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 18px 6px;
    z-index: 1002;
  }
  #lou-island-mic,
  #lou-island-chat {
    border: none;
    background: transparent;
    color: var(--lou-green);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
  #lou-island-mic svg,
  #lou-island-chat svg {
    width: 19px;
    height: 19px;
  }
  #lou-orb {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--lou-green);
    background: var(--lou-card);
    color: var(--lou-green);
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1003;
  }

  /* ═══════════════ COMPOSANTS ═══════════════ */
  .lou-section-label {
    font-size: 9px;
    font-weight: 600;
    color: var(--lou-text-3);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin: 0 0 5px;
  }

  .lou-card-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
  }

  .lou-card {
    background: var(--lou-card);
    border-radius: var(--lou-radius-md);
    border: 0.5px solid var(--lou-border);
    padding: 10px 12px;
  }

  .lou-row-card {
    background: var(--lou-card);
    border-radius: var(--lou-radius-md);
    border: 0.5px solid var(--lou-border);
    padding: 9px 12px;
    display: flex;
    align-items: center;
    gap: 9px;
  }

  /* Écran mobile natif Draps & stock : stepper +/- réutilisant .lou-row-card */
  .lou-draps-step {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 0.5px solid var(--lou-border);
    background: var(--lou-bg);
    color: var(--lou-green);
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .lou-draps-step:active { background: var(--lou-green-light); }
  .lou-draps-input {
    width: 42px;
    text-align: center;
    padding: 6px 2px;
    border: 0.5px solid var(--lou-border);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--lou-text-1);
    background: var(--lou-card);
  }

  /* Métriques */
  .lou-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 10px; }
  .lou-metric-card {
    background: var(--lou-card);
    border-radius: var(--lou-radius-md);
    border: 0.5px solid var(--lou-border);
    padding: 9px 11px;
  }
  .lou-metric-label { font-size: 10px; color: var(--lou-text-2); margin: 0 0 2px; }
  .lou-metric-value {
    font-size: 20px; font-weight: 600;
    color: var(--lou-text-1); margin: 0;
  }
  .lou-metric-value.green { color: var(--lou-green); }
  .lou-metric-sub { font-size: 9px; color: var(--lou-text-3); margin: 1px 0 0; }

  /* Avatar */
  .lou-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 600;
    flex-shrink: 0;
    font-family: sans-serif;
  }
  .av-green { background: var(--lou-badge-green-bg); color: var(--lou-green); }
  .av-amber { background: var(--lou-badge-amber-bg); color: var(--lou-badge-amber-text); }
  .av-blue  { background: var(--lou-badge-blue-bg);  color: var(--lou-badge-blue-text); }
  .av-pink  { background: #FBEAF0; color: #993556; }

  .lou-row-name   { font-size: 12px; font-weight: 600; color: var(--lou-text-1); margin: 0; }
  .lou-row-detail { font-size: 10px; color: var(--lou-text-2); margin: 1px 0 0; }

  .lou-badge {
    margin-left: auto;
    font-size: 9px; font-weight: 600;
    padding: 3px 7px;
    border-radius: var(--lou-radius-full);
    flex-shrink: 0; white-space: nowrap;
  }
  .badge-green { background: var(--lou-badge-green-bg); color: var(--lou-badge-green-text); }
  .badge-amber { background: var(--lou-badge-amber-bg); color: var(--lou-badge-amber-text); }
  .badge-red   { background: var(--lou-badge-red-bg);   color: var(--lou-badge-red-text); }
  .badge-blue  { background: var(--lou-badge-blue-bg);  color: var(--lou-badge-blue-text); }
  .badge-gray  { background: var(--lou-bg);             color: var(--lou-text-2); }

  /* Validation */
  .lou-val-card {
    background: var(--lou-card);
    border-radius: var(--lou-radius-md);
    border: 1.5px solid var(--lou-green);
    padding: 9px 12px;
    display: flex;
    align-items: center;
    gap: 9px;
  }
  .lou-val-actions { display: flex; gap: 6px; margin-left: auto; flex-shrink: 0; }
  button.lou-btn-sm,
  button.btn-val-ok,
  button.btn-val-no {
    height: 30px !important;
    line-height: 30px !important;
    padding: 0 14px !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    border: none !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    box-shadow: none !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    appearance: none !important;
    -webkit-appearance: none !important;
  }
  button.lou-btn-sm.primary,
  button.btn-val-ok {
    background: #0F6E56 !important;
    color: #fff !important;
  }
  button.lou-btn-sm.primary:hover,
  button.btn-val-ok:hover {
    background: #0C5A47 !important;
  }
  button.lou-btn-sm.ghost,
  button.btn-val-no {
    background: transparent !important;
    color: #64748b !important;
    border: 0.5px solid rgba(0, 0, 0, .15) !important;
  }
  button.lou-btn-sm.ghost:hover,
  button.btn-val-no:hover {
    background: rgba(15, 110, 86, .06) !important;
    color: #0F6E56 !important;
    border-color: rgba(15, 110, 86, .22) !important;
  }

  /* Alerte */
  .lou-alert {
    background: #FAECE7;
    border-radius: var(--lou-radius-md);
    border: 0.5px solid #F0997B;
    padding: 9px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #712B13;
  }

  /* Carte société ménage */
  .lou-soc-card {
    background: var(--lou-card);
    border-radius: var(--lou-radius-md);
    border: 0.5px solid var(--lou-border);
    padding: 9px 12px;
  }
  .lou-soc-header {
    display: flex; justify-content: space-between;
    align-items: center; margin-bottom: 5px;
  }
  .lou-soc-name { font-size: 11px; font-weight: 600; color: var(--lou-text-1); }
  .lou-soc-msg  { font-size: 10px; color: var(--lou-text-2); line-height: 1.45; }
  .lou-soc-footer {
    display: flex; justify-content: space-between;
    align-items: center; margin-top: 7px;
  }
  .lou-soc-date { font-size: 9px; color: var(--lou-text-3); }

  /* Planning */
  .lou-planning-row {
    background: var(--lou-card);
    border-radius: var(--lou-radius-md);
    border: 0.5px solid var(--lou-border);
    padding: 9px 12px;
    display: flex; justify-content: space-between; align-items: center;
  }
  .lou-planning-row.urgent { border: 1.5px solid var(--lou-warning); }
  .lou-status-dot { width: 7px; height: 7px; border-radius: 50%; }
  .dot-green  { background: var(--lou-success); }
  .dot-amber  { background: var(--lou-warning); }
  .dot-red    { background: var(--lou-danger); }

  /* Menu Plus */
  .lou-plus-item {
    background: var(--lou-card);
    border-radius: var(--lou-radius-md);
    border: 0.5px solid var(--lou-border);
    padding: 10px 12px;
    display: flex; justify-content: space-between;
    align-items: center; cursor: pointer;
  }
  .lou-plus-icon {
    width: 32px; height: 32px;
    border-radius: var(--lou-radius-sm);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
  }
  .lou-plus-label { font-size: 12px; font-weight: 600; color: var(--lou-text-1); }

  /* Bannière notifications push : application installée uniquement (js/push-notifications.js) */
  .lou-push-banner { display: flex; flex-direction: column; gap: 8px; }
  .lou-push-banner[hidden] { display: none; }
  .lou-push-banner-head { display: flex; align-items: center; gap: 10px; }
  .lou-push-banner-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  #lou-push-status { font-size: 11px; color: var(--lou-text-3); }
  #lou-push-feedback { margin: 0; font-size: 12px; color: var(--lou-text-2); }
  #lou-push-feedback:empty { display: none; }
  .lou-push-banner-actions { display: flex; justify-content: flex-end; gap: 8px; }
  .lou-push-btn {
    min-height: 36px; padding: 0 14px;
    border-radius: var(--lou-radius-sm);
    border: 0.5px solid var(--lou-border);
    background: var(--lou-card); color: var(--lou-text-2);
    font-size: 12px; font-weight: 600; cursor: pointer;
  }
  .lou-push-btn-primary { background: var(--lou-green); border-color: var(--lou-green); color: #fff; }
  .lou-push-btn[aria-busy="true"], .lou-push-btn:disabled { opacity: .6; }

  /* Onglets internes (page Tâches) */
  .lou-tab-btn {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; gap: 2px; padding: 8px 0;
    border: none; background: var(--lou-card);
    color: var(--lou-text-3); font-size: 10px; cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color .15s, border-color .15s;
  }
  .lou-tab-btn.active { color: var(--lou-green); border-bottom-color: var(--lou-green); font-weight: 600; }

} /* fin @media mobile */

/* Respect des préférences de mouvement réduit (messagerie temps réel) */
@media (prefers-reduced-motion: reduce) {
  .lou-msg-bubble,
  .lou-msg-presence-dot,
  .lou-msg-typing span { animation: none !important; }
}

/* Carte « Suggestion de Lou » — padding réduit, boutons pills compacts */
body.is-mobile #lou-msg-suggest { padding: 8px 10px !important; font-size: 13px !important; }
body.is-mobile #lou-msg-suggest .lou-quick-suggest-btn {
  flex: 0 0 auto !important;
  box-sizing: border-box !important;
  height: 28px !important;
  line-height: 28px !important;
  min-height: 0 !important;
  padding: 0 12px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  border-radius: 999px !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  cursor: pointer !important;
  box-shadow: none !important;
}

/* Activation forcée via classe (override ≥ 768px en dev) */
body.is-mobile #lou-mobile-shell {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
}

/* Masquer la coque desktop quand le shell mobile est actif.
   La coque principale d'app.html est <div class="container"> (unique).
   ⚠️ NE PAS masquer #lou-fab / #lou-panel : chatbot Lou doit rester accessible. */
body.is-mobile > .container,
body.is-mobile > #toast,
body.is-mobile > .mobile-nav-overlay,
body.is-mobile #portrait-banner,
body.is-mobile > .theme-controls,
body.is-mobile .theme-controls,
body.is-mobile #mobile-menu-toggle,
body.is-mobile #adminDropdown {
  display: none !important;
}

/* Lou Voice V2 remplace le FAB en mobile */
body.is-mobile #lou-fab {
  display: none !important;
}
#lou-mobile-shell {
  pointer-events: none;
}
#lou-mobile-shell * {
  pointer-events: auto;
}

/* Overlay + feuille mode IA */
body.is-mobile #lou-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,32,.35);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  z-index: 9998;
}
body.is-mobile #lou-sheet-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

body.is-mobile #lou-panel {
  bottom: 0 !important;
  right: 0 !important;
  left: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  max-height: 88vh !important;
  border-radius: 24px 24px 0 0 !important;
  z-index: 9999 !important;
  transform: translate3d(0, 105%, 0) !important;
  -webkit-transform: translate3d(0, 105%, 0);
  will-change: transform;
  opacity: 1 !important;
  transition: transform .35s cubic-bezier(.32,.72,.35,1) !important;
  pointer-events: none;
}

body.is-mobile #lou-panel button,
body.is-mobile #lou-panel .lou-suggestion {
  border: none !important;
  box-shadow: none !important;
  background-image: none !important;
}
body.is-mobile #lou-panel.lou-open {
  transform: translate3d(0, 0, 0) !important;
  -webkit-transform: translate3d(0, 0, 0);
  pointer-events: auto !important;
}

body.is-mobile #lou-sheet-overlay {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.is-mobile #lou-sheet-handle {
  width: 38px;
  height: 4px;
  border: none;
  border-radius: 999px;
  background: #cbd5e1;
  margin: 10px auto 8px;
  display: block;
}

body.is-mobile #lou-voice-mode {
  display: none;
  text-align: center;
  padding: 8px 16px 14px;
}
body.is-mobile #lou-panel.lou-mode-voice #lou-voice-mode {
  display: block;
}
body.is-mobile #lou-panel.lou-mode-voice #lou-panel-header {
  display: none !important;
}
body.is-mobile #lou-panel.lou-mode-voice #lou-messages,
body.is-mobile #lou-panel.lou-mode-voice #lou-suggestions,
body.is-mobile #lou-panel.lou-mode-voice #lou-quota-bar,
body.is-mobile #lou-panel.lou-mode-voice #lou-input-zone {
  display: none !important;
}
body.is-mobile #lou-panel.lou-mode-text #lou-voice-mode {
  display: none;
}
/* Dictée active en mode texte : on ré-affiche le stage vocal (retour « Je vous écoute… ») */
body.is-mobile #lou-panel.lou-listening #lou-voice-mode {
  display: block;
}
body.is-mobile #lou-panel.lou-mode-text #lou-suggestions {
  display: none !important;
}

body.is-mobile #lou-panel-header {
  background: var(--app-cream, #F4EFE3) !important;
  color: var(--lou-text-1) !important;
  border-bottom: 0.5px solid var(--lou-border) !important;
}
body.is-mobile #lou-panel-header .lou-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #0F6E56;
  color: #0F6E56;
  font-size: 11px;
  font-weight: 600;
  position: relative;
  overflow: visible;
}
body.is-mobile #lou-panel-header .lou-avatar::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
}
body.is-mobile #lou-panel-header .lou-avatar.lou-aura-idle::before { animation: louAuraIdle 3.2s ease-in-out infinite; }
body.is-mobile #lou-panel-header .lou-avatar.lou-aura-listening::before { animation: louAuraListen 1.1s ease-in-out infinite; }
body.is-mobile #lou-panel-header .lou-avatar.lou-aura-thinking::before { animation: louAuraThink 0.9s ease-in-out infinite; }
body.is-mobile #lou-panel-header .lou-avatar.lou-aura-speaking::before { animation: louAuraSpeak 1.4s ease-in-out infinite; }
body.is-mobile #lou-panel-header .lou-title {
  font-size: 14px !important;
  font-weight: 500 !important;
  color: var(--lou-text-1) !important;
}
body.is-mobile #lou-panel-header .lou-subtitle {
  font-size: 11px !important;
  color: var(--lou-text-3) !important;
}
body.is-mobile #lou-tts-toggle {
  width: 30px !important;
  height: 30px !important;
  border-radius: 50% !important;
  background: #E1F5EE !important;
  color: #0F6E56 !important;
}
body.is-mobile #lou-close,
body.is-mobile #lou-clear {
  width: 30px !important;
  height: 30px !important;
  border-radius: 50% !important;
  background: #F1F5F9 !important;
  color: #64748B !important;
}

body.is-mobile #lou-voice-orb {
  width: 84px;
  height: 84px;
  margin: 2px auto 8px;
  border-radius: 50%;
  border: 1px solid var(--lou-green);
  color: var(--lou-green);
  background: var(--lou-card);
  font-size: 20px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: none !important;
  animation: louOrbBeat 1.1s ease-in-out infinite;
}
body.is-mobile #lou-voice-orb::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
}
body.is-mobile #lou-panel.lou-mode-voice #lou-voice-orb.lou-aura-listening::before {
  animation: louAuraListenBig 1.1s ease-in-out infinite;
}
body.is-mobile #lou-panel.lou-mode-voice #lou-voice-orb.lou-aura-thinking::before {
  animation: louAuraThinkBig 0.9s ease-in-out infinite;
}
body.is-mobile #lou-panel.lou-mode-voice #lou-voice-orb.lou-aura-speaking::before,
body.is-mobile #lou-panel.lou-mode-voice #lou-voice-orb.lou-transcribing::before {
  animation: louAuraSpeakBig 1.1s ease-in-out infinite;
}
body.is-mobile #lou-voice-listen-text {
  margin: 0;
  font-size: 14px;
  color: var(--lou-text-2);
}
body.is-mobile #lou-voice-transcript {
  min-height: 42px;
  margin: 8px auto 4px;
  max-width: 280px;
  font-size: 16px;
  color: var(--lou-text-1);
}
body.is-mobile #lou-voice-hint {
  margin: 0;
  font-size: 11px;
  color: var(--lou-text-3);
}

body.is-mobile #lou-input-zone {
  background: var(--app-cream, #F4EFE3);
  border-radius: 14px;
  margin: 0 10px 12px;
  border-top: none;
}
body.is-mobile #lou-send {
  border-radius: 10px;
}

/* Aura Jarvis */
@keyframes louAuraIdle {
  0%,100% { box-shadow: 0 0 8px 2px rgba(15,110,86,.22), 0 0 20px 6px rgba(15,110,86,.10); }
  50%     { box-shadow: 0 0 14px 5px rgba(15,110,86,.40), 0 0 30px 10px rgba(15,110,86,.16); }
}
@keyframes louAuraListen {
  0%,100% { box-shadow: 0 0 10px 3px rgba(216,90,48,.35), 0 0 24px 8px rgba(216,90,48,.14); }
  50%     { box-shadow: 0 0 18px 8px rgba(216,90,48,.55), 0 0 38px 14px rgba(216,90,48,.22); }
}
@keyframes louAuraSpeak {
  0%   { box-shadow: 0 0 8px 2px rgba(24,95,165,.32); }
  25%  { box-shadow: 0 0 16px 7px rgba(24,95,165,.50); }
  50%  { box-shadow: 0 0 10px 4px rgba(24,95,165,.30); }
  75%  { box-shadow: 0 0 18px 8px rgba(24,95,165,.52); }
  100% { box-shadow: 0 0 8px 2px rgba(24,95,165,.32); }
}

@keyframes louAuraThink {
  0%,100% { box-shadow: 0 0 10px 3px rgba(15,110,86,.34), 0 0 24px 8px rgba(15,110,86,.14); }
  50%     { box-shadow: 0 0 20px 8px rgba(15,110,86,.58), 0 0 40px 14px rgba(15,110,86,.24); }
}

@keyframes louAuraListenBig {
  0%,100% { box-shadow: 0 0 16px 5px rgba(216,90,48,.45), 0 0 40px 14px rgba(216,90,48,.18), 0 0 70px 26px rgba(216,90,48,.08); }
  50%     { box-shadow: 0 0 30px 13px rgba(216,90,48,.70), 0 0 70px 26px rgba(216,90,48,.30), 0 0 110px 40px rgba(216,90,48,.12); }
}

@keyframes louAuraSpeakBig {
  0%,100% { box-shadow: 0 0 12px 4px rgba(24,95,165,.38), 0 0 28px 10px rgba(24,95,165,.18), 0 0 48px 18px rgba(24,95,165,.08); }
  50%     { box-shadow: 0 0 22px 10px rgba(24,95,165,.58), 0 0 52px 20px rgba(24,95,165,.28), 0 0 84px 30px rgba(24,95,165,.12); }
}

@keyframes louAuraThinkBig {
  0%,100% { box-shadow: 0 0 16px 5px rgba(15,110,86,.40), 0 0 40px 14px rgba(15,110,86,.20), 0 0 70px 26px rgba(15,110,86,.08); }
  50%     { box-shadow: 0 0 28px 12px rgba(15,110,86,.68), 0 0 64px 24px rgba(15,110,86,.30), 0 0 104px 38px rgba(15,110,86,.12); }
}

@keyframes louOrbBeat {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.045); }
}

body.is-mobile .lou-aura-idle {
  animation: louAuraIdle 3.2s ease-in-out infinite;
  border-color: var(--lou-green) !important;
  color: var(--lou-green) !important;
}
body.is-mobile .lou-aura-listening {
  animation: louAuraListen 1.1s ease-in-out infinite;
  border-color: #993C1D !important;
  color: #993C1D !important;
}
body.is-mobile .lou-aura-thinking {
  animation: louAuraThink 0.9s ease-in-out infinite;
  border-color: var(--lou-green) !important;
  color: var(--lou-green) !important;
}
body.is-mobile .lou-aura-speaking {
  animation: louAuraSpeak 1.4s ease-in-out infinite;
  border-color: #185FA5 !important;
  color: #185FA5 !important;
}

html.theme-dark body.is-mobile .lou-aura-idle {
  animation: louAuraIdle 3.2s ease-in-out infinite;
  box-shadow: 0 0 11px 3px rgba(15,110,86,.31), 0 0 28px 9px rgba(15,110,86,.20);
}
html.theme-dark body.is-mobile .lou-aura-listening {
  animation: louAuraListen 1.1s ease-in-out infinite;
  box-shadow: 0 0 14px 4px rgba(216,90,48,.49), 0 0 30px 10px rgba(216,90,48,.24);
}
html.theme-dark body.is-mobile .lou-aura-thinking {
  animation: louAuraThink 0.9s ease-in-out infinite;
  box-shadow: 0 0 13px 4px rgba(15,110,86,.44), 0 0 32px 11px rgba(15,110,86,.24);
}
html.theme-dark body.is-mobile .lou-aura-speaking {
  animation: louAuraSpeak 1.4s ease-in-out infinite;
  box-shadow: 0 0 12px 4px rgba(24,95,165,.45), 0 0 29px 10px rgba(24,95,165,.22);
}

body.is-mobile.lou-chat-open #lou-bottom-nav {
  display: grid !important;
}

/* Sur écrans étroits, masquer aussi la coque desktop par défaut
   (sécurité si JS n'a pas eu le temps d'ajouter .is-mobile). */
@media (max-width: 768px) {
  body:not(.lou-desktop-mode) > .container { display: none !important; }
  body:not(.lou-desktop-mode) #portrait-banner { display: none !important; }
  body:not(.lou-desktop-mode):not(.is-mobile) #lou-fab,
  body:not(.lou-desktop-mode):not(.is-mobile) #lou-panel { display: none !important; }
  body:not(.lou-desktop-mode) #lou-mobile-shell { display: flex !important; }
}

/* Mode desktop forcé depuis bottom-nav (vue calendrier en plein écran) */
body.lou-desktop-mode > .container { display: block !important; }
body.lou-desktop-mode #lou-mobile-shell { display: none !important; }
body.lou-desktop-mode #portrait-banner { display: none !important; }

/* Bouton "← Retour" flottant au-dessus de la vue desktop */
#lou-back-to-mobile {
  position: fixed;
  top: env(safe-area-inset-top, 8px);
  left: 8px;
  z-index: 10000;
  background: #0F6E56;
  color: #fff;
  border: none;
  border-radius: 18px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  cursor: pointer;
}
#lou-back-to-mobile:active { background: #0a5240; }

/* ========== Badges plateforme + prestation ========== */
.lou-pf-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 4px;
  margin-left: 4px;
  vertical-align: middle;
  background: #E5E7EB; color: #374151;
  letter-spacing: 0.2px;
}
.lou-pf-airbnb        { background: #FFE4E6; color: #FF385C; }
.lou-pf-booking       { background: #E0EBFF; color: #003580; }
.lou-pf-abritel       { background: #E1F5EE; color: #1F7A56; }
.lou-pf-gitesdefrance { background: #FAEEDA; color: #854F0B; }
.lou-pf-direct        { background: #EEF0FE; color: #534AB7; }

.lou-presta-dot {
  display: inline-block;
  font-size: 11px;
  margin-left: 3px;
  vertical-align: middle;
  filter: saturate(1.2);
}

.lou-clickable {
  cursor: pointer;
  transition: background 0.12s ease;
  -webkit-tap-highlight-color: rgba(15,110,86,0.08);
}
.lou-clickable:active {
  background: rgba(15,110,86,0.06);
}

/* ========== Drawer détail réservation ========== */
#lou-detail-panel {
  position: fixed;
  inset: 0;
  background: var(--lou-bg) !important;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.25s cubic-bezier(.4,0,.2,1);
  visibility: hidden;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}
#lou-detail-panel.open {
  transform: translateY(0);
  visibility: visible;
}
.lou-detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--lou-bg);
  border-bottom: 1px solid #E5E7EB;
  flex-shrink: 0;
}
.lou-detail-header h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--lou-text-1);
}
.lou-detail-close {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: none;
  background: var(--lou-border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--lou-text-1);
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  padding: 0;
}
.lou-detail-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: var(--lou-bg);
  -webkit-overflow-scrolling: touch;
}
.lou-detail-section {
  background: var(--lou-card);
  border: 0.5px solid var(--lou-border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
}
.lou-detail-section h3,
.lou-detail-section h4 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--lou-text-1);
}
.lou-detail-name {
  font-size: 17px !important;
  font-weight: 600;
  margin: 0 !important;
}
.lou-detail-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--lou-border);
  font-size: 13px;
}
.lou-detail-row:last-child { border-bottom: none; }
.lou-detail-row .ico {
  font-size: 16px;
  color: var(--lou-text-3);
  width: 18px;
  flex-shrink: 0;
}
.lou-detail-label {
  color: var(--lou-text-2);
  font-size: 13px;
  flex: 1;
  text-align: left;
}
.lou-detail-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--lou-text-1);
  text-align: right;
  word-break: break-word;
}
.lou-detail-sub {
  color: var(--lou-text-2);
  font-size: 11px;
  margin-left: 4px;
}
.lou-detail-empty { color: var(--lou-text-3); font-weight: 400; }
.lou-detail-link {
  color: #0F6E56;
  text-decoration: none;
  font-weight: 500;
}
.lou-detail-presta {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  font-size: 13px;
  color: var(--lou-text-1);
  border-bottom: 0.5px solid var(--lou-border);
}
.lou-detail-presta:last-child { border-bottom: none; }
.lou-detail-presta-price {
  color: #3B6D11;
  font-weight: 600;
  font-size: 12px;
}

.lou-detail-hero { background:var(--lou-card); border: 0.5px solid var(--lou-border); border-radius:12px; padding:16px 14px; margin-bottom:10px; }
.lou-detail-avatar { width:46px; height:46px; border-radius:50%; background:#E6F1FB; color:#185FA5; display:flex; align-items:center; justify-content:center; font-size:15px; font-weight:600; flex-shrink:0; }
.lou-detail-gite { display:flex; align-items:center; gap:4px; font-size:12px; color:var(--lou-text-2); margin:3px 0 0; }
.lou-detail-pills { display:flex; flex-wrap:wrap; gap:6px; margin-top:12px; }
.lou-detail-stay { background:var(--lou-card); border: 0.5px solid var(--lou-border); border-radius:12px; padding:14px; margin-bottom:10px; display:flex; align-items:stretch; gap:10px; }
.lou-detail-stay-box { flex:1; background:var(--lou-bg); border:none; border-radius:10px; padding:10px; }
.lou-detail-stay-sep { display:flex; flex-direction:column; align-items:center; justify-content:center; font-size:11px; color:var(--lou-text-2); }
.lou-detail-figures { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-bottom:10px; }
.lou-detail-figures > div { background:var(--lou-card); border: 0.5px solid var(--lou-border); border-radius:12px; padding:12px; }
.lou-detail-figures .val { font-size:20px; font-weight:600; margin:4px 0 0; color:var(--lou-text-1); }
.lou-detail-figure-warn { color:#BA7517 !important; }
.lou-detail-actions { display:flex; gap:8px; margin-bottom:10px; }
.lou-detail-action { flex:1; height:44px; border-radius:10px; border:0.5px solid var(--lou-border) !important; background:var(--lou-card); color:var(--lou-text-1); font-size:12px; display:flex; align-items:center; justify-content:center; gap:5px; text-decoration:none; padding:0 6px; white-space:nowrap; box-shadow:none !important; margin:0 !important; }
.lou-detail-action[aria-disabled="true"] { opacity:.4; pointer-events:none; }
.lou-detail-conv { background:var(--lou-card); border: 0.5px solid var(--lou-border); border-radius:12px; padding:14px; margin-bottom:10px; display:flex; align-items:center; gap:11px; cursor:pointer; }
.lou-detail-conv-preview { font-size:12px; color:var(--lou-text-2); margin:2px 0 0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.lou-detail-conv-badge { background:#378ADD; color:#fff; font-size:11px; font-weight:600; height:20px; border-radius:999px; display:flex; align-items:center; justify-content:center; padding:0 7px; }
.lou-fiche-icon-pill {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #E6F1FB;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.lou-fiche-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}
.lou-fiche-btn {
  height: 32px !important;
  padding: 0 14px !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  cursor: pointer;
  white-space: nowrap;
}
.lou-fiche-btn-copy {
  border: 0.5px solid var(--lou-border) !important;
  background: var(--lou-card) !important;
  color: var(--lou-text-1) !important;
}
.lou-fiche-btn-send {
  border: none !important;
  background: #0F6E56 !important;
  color: #fff !important;
}
.lou-claims-summary { margin-top: 0; }

.lou-detail-stay-box p:nth-child(1) { font-size: 11px; }
.lou-detail-stay-box p:nth-child(2) { font-size: 14px; font-weight: 600; }
.lou-detail-stay-box p:nth-child(3) { font-size: 12px; }

.lou-claims-panel,
.lou-claim-editor {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  background: rgba(10, 15, 25, 0.52);
  padding: calc(10px + var(--lou-safe-top)) 10px calc(10px + var(--lou-safe-bottom));
  box-sizing: border-box;
}
.lou-claims-panel.is-open,
.lou-claim-editor.is-open { display: flex; align-items: flex-end; }
.lou-claims-sheet,
.lou-claim-editor-sheet {
  width: 100%;
  max-height: 100%;
  overflow: hidden;
  background: var(--lou-bg);
  border-radius: 20px 20px 12px 12px;
  border: 0.5px solid var(--lou-border);
  box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
}
.lou-claims-header,
.lou-claim-editor-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 14px 12px;
  border-bottom: 0.5px solid var(--lou-border);
  background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,255,255,.76));
  backdrop-filter: blur(14px);
}
.lou-claims-close,
.lou-claim-editor-close {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 0.5px solid var(--lou-border);
  background: var(--lou-card);
  color: var(--lou-text-1);
  font-size: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.lou-claims-header-copy,
.lou-claim-editor-header-copy { min-width: 0; flex: 1; }
.lou-claims-header-copy .lou-claims-subtitle { font-size: 12px; color: var(--lou-text-3); margin-top: 2px; }
.lou-claims-kicker,
.lou-claim-editor-kicker {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--lou-text-3);
  margin-bottom: 2px;
}
.lou-claims-title,
.lou-claim-editor-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--lou-text-1);
  line-height: 1.2;
}
.lou-claim-editor-subtitle {
  margin-top: 4px;
  font-size: 12px;
  color: var(--lou-text-2);
}
.lou-claims-add {
  border: none;
  border-radius: 999px;
  padding: 10px 12px;
  background: #0F6E56;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  flex: 0 0 auto;
}
.lou-claims-body,
.lou-claim-editor-body {
  padding: 14px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.lou-claims-loading,
.lou-claims-empty {
  padding: 24px 4px;
  text-align: center;
  color: var(--lou-text-2);
  font-size: 13px;
}
.lou-claims-loading--error { color: #993C1D; }
.lou-claims-empty p { margin: 0 0 12px; }
.lou-claims-empty-btn {
  border: none;
  border-radius: 999px;
  padding: 11px 16px;
  background: #0F6E56;
  color: #fff;
  font-weight: 600;
}
.lou-claim-item {
  background: var(--lou-card);
  border: 0.5px solid var(--lou-border);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 10px;
}
.lou-claim-item.is-open { box-shadow: 0 10px 26px rgba(15, 110, 86, 0.08); }
.lou-claim-item.is-warn { border-color: #E6C77E; }
.lou-claim-item.is-closed { opacity: .92; }
.lou-claim-item.is-muted { opacity: .72; }
.lou-claim-item-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lou-claim-icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eee;
  color: var(--lou-text-2);
}
.lou-claim-item.is-draft .lou-claim-icon { background: var(--lou-badge-amber-bg); color: var(--lou-badge-amber-text); }
.lou-claim-item.is-sent .lou-claim-icon { background: var(--lou-badge-blue-bg); color: var(--lou-badge-blue-text); }
.lou-claim-item.is-accepted .lou-claim-icon { background: var(--lou-badge-green-bg); color: var(--lou-badge-green-text); }
.lou-claim-item.is-refused .lou-claim-icon { background: var(--lou-badge-red-bg); color: var(--lou-badge-red-text); }
.lou-claim-item.is-closed .lou-claim-icon { background: #eee; color: var(--lou-text-2); }
.lou-claim-item-copy { min-width: 0; flex: 1; }
.lou-claim-item-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--lou-text-1);
  line-height: 1.25;
}
.lou-claim-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.lou-claim-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 600;
  background: #eee;
  color: var(--lou-text-2);
}
.lou-claim-item.is-draft .lou-claim-status { background: var(--lou-badge-amber-bg); color: var(--lou-badge-amber-text); }
.lou-claim-item.is-sent .lou-claim-status { background: var(--lou-badge-blue-bg); color: var(--lou-badge-blue-text); }
.lou-claim-item.is-accepted .lou-claim-status { background: var(--lou-badge-green-bg); color: var(--lou-badge-green-text); }
.lou-claim-item.is-refused .lou-claim-status { background: var(--lou-badge-red-bg); color: var(--lou-badge-red-text); }
.lou-claim-item.is-closed .lou-claim-status { background: #eee; color: var(--lou-text-2); }
.lou-claim-amount {
  flex: 0 0 auto;
  margin-left: auto;
  font-size: 14px;
  font-weight: 700;
  color: var(--lou-text-1);
  font-variant-numeric: tabular-nums;
}
.lou-claim-amount.is-muted { font-size: 11px; font-weight: 600; color: var(--lou-text-2); }
.lou-claim-edit-link {
  border: none;
  background: none;
  color: var(--lou-green);
  font-weight: 700;
  font-size: 11.5px;
  padding: 0;
}
.lou-claim-description {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--lou-text-2);
  line-height: 1.45;
}
.lou-claim-item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 0.5px solid var(--lou-border);
  font-size: 11px;
  color: var(--lou-text-3);
}
.lou-claim-photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.lou-claim-photo {
  position: relative;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 0.5px solid var(--lou-border);
  background: #fff;
}
.lou-claim-photo img {
  display: block;
  width: 100%;
  height: 110px;
  object-fit: cover;
}
.lou-claim-photo-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
}
.lou-claim-photo-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 10px 0 2px;
  font-size: 12px;
  color: var(--lou-text-3);
}
.lou-claim-editor-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.lou-claim-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lou-claim-field span,
.lou-claim-photos-head span {
  font-size: 12px;
  font-weight: 600;
  color: var(--lou-text-1);
}
.lou-claim-field input,
.lou-claim-field textarea,
.lou-claim-field select {
  width: 100%;
  box-sizing: border-box;
  border-radius: 12px;
  border: 0.5px solid var(--lou-border);
  background: var(--lou-card);
  color: var(--lou-text-1);
  font-size: 13px;
  padding: 11px 12px;
}
.lou-claim-field textarea { resize: vertical; min-height: 98px; }
.lou-claim-field--row {
  flex-direction: row;
  gap: 10px;
}
.lou-claim-field--row > div { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.lou-claim-photos-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.lou-claim-photos-head p {
  margin: 3px 0 0;
  font-size: 11px;
  color: var(--lou-text-3);
}
.lou-claim-upload-btn-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #EAF3DE;
  color: #3B6D11;
  flex: 0 0 auto;
  overflow: hidden;
}
.lou-claim-upload-btn-icon input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.lou-claim-pending-files {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lou-claim-pending-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 10px;
  background: #F8FAFC;
  border: 0.5px solid var(--lou-border);
  font-size: 12px;
  color: var(--lou-text-1);
}
.lou-claim-pending-file small {
  color: var(--lou-text-3);
  flex: 0 0 auto;
}
.lou-claim-pending-file button,
.lou-claim-photo-delete {
  border: none;
  border-radius: 999px;
  background: #F3D2D5;
  color: #A32D2D;
  font-size: 11px;
  font-weight: 600;
  padding: 7px 10px;
  flex: 0 0 auto;
}
.lou-claim-editor-actions {
  display: flex;
  gap: 8px;
  margin-top: 2px;
}
.lou-claim-editor-actions button {
  flex: 1;
  height: 44px;
  border-radius: 12px;
  border: 0.5px solid var(--lou-border);
  background: var(--lou-card);
  color: var(--lou-text-1);
  font-size: 13px;
  font-weight: 600;
}
.lou-claim-editor-save {
  border: none !important;
  background: #0F6E56 !important;
  color: #fff !important;
}

.lou-devis-file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  padding: 9px 10px;
  border-radius: 10px;
  background: #fff;
  border: 0.5px solid var(--lou-border);
}
.lou-devis-file-name-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}
.lou-devis-file-icon {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: var(--lou-text-3);
}
.lou-devis-filename {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--lou-text-2);
  font-size: 12.5px;
}
.lou-devis-file-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.lou-doc-view-btn,
.lou-doc-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.lou-doc-view-btn svg,
.lou-doc-delete-btn svg { width: 15px; height: 15px; }
.lou-doc-view-btn { color: #0F6E56; }
.lou-doc-view-btn:hover { background: rgba(15,110,86,.08); }
.lou-doc-delete-btn { color: #A32D2D; }
.lou-doc-delete-btn:hover { background: rgba(163,45,45,.08); }
.lou-devis-viewer {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(12px + var(--lou-safe-top)) 12px calc(12px + var(--lou-safe-bottom));
  box-sizing: border-box;
  background: rgba(10, 15, 25, 0.62);
}
.lou-devis-viewer-sheet {
  width: min(920px, 100%);
  height: min(720px, 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--lou-bg);
  border: 0.5px solid var(--lou-border);
  border-radius: 20px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.22);
}
.lou-devis-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px 12px;
  border-bottom: 0.5px solid var(--lou-border);
  background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,255,255,.76));
  backdrop-filter: blur(14px);
  position: relative;
  z-index: 2;
}
.lou-devis-viewer-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--lou-text-1);
  font-size: 14px;
  font-weight: 700;
}
.lou-devis-viewer-close {
  position: relative;
  z-index: 3;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 0.5px solid var(--lou-border);
  background: var(--lou-card);
  color: var(--lou-text-1);
  font-size: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.lou-devis-viewer-body {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}
.lou-devis-viewer-body iframe,
.lou-devis-viewer-body img {
  width: 100%;
  height: 100%;
  border: 0;
}
.lou-devis-viewer-body img {
  object-fit: contain;
}

@media (min-width: 768px) {
  .lou-claim-editor-sheet,
  .lou-claims-sheet {
    max-width: 480px;
    margin: 0 auto;
    border-radius: 20px;
  }

  .lou-claim-editor-actions {
    flex-wrap: wrap;
  }

  .lou-claim-editor-actions button {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
  }
}

#lou-detail-body #mobileReservationNotesList > [data-note-type] {
  display: flex;
  gap: 9px;
  padding: 9px 0;
  border-bottom: 0.5px solid var(--lou-border);
  background: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
}

#lou-detail-body #mobileReservationNotesList > [data-note-type]::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
  background: #94A3B8;
}

#lou-detail-body #mobileReservationNotesList > [data-note-type="alert"]::before { background: #E24B4A; }
#lou-detail-body #mobileReservationNotesList > [data-note-type="request"]::before { background: #378ADD; }
#lou-detail-body #mobileReservationNotesList > [data-note-type="preference"]::before { background: #7F77DD; }

#lou-detail-body #mobileReservationNotesList > div:not([data-note-type]) {
  text-align: center;
  font-size: 12px;
  color: var(--lou-text-3);
  padding: 14px 0 6px;
  border: none !important;
  background: none !important;
}

#lou-detail-body #mobileReservationNoteForm > div:first-of-type {
  display: flex !important;
  align-items: stretch !important;
  gap: 8px !important;
}

#lou-detail-body #mobileReservationNoteForm select,
#lou-detail-body #mobileReservationNoteForm textarea,
#lou-detail-body #mobileReservationNoteForm button[type="submit"] {
  box-sizing: border-box !important;
  background-color: var(--lou-card) !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  font-size: 13px !important;
  margin: 0 !important;
}

#lou-detail-body #mobileReservationNoteForm select {
  height: 40px !important;
  min-height: 40px !important;
  line-height: normal !important;
  padding: 0 32px 0 10px !important;
  border: 0.5px solid var(--lou-border) !important;
  color: var(--lou-text-1) !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230F6E56' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
}

#lou-detail-body #mobileReservationNoteForm button[type="submit"] {
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 14px !important;
  border: none !important;
  background-color: #0F6E56 !important;
  color: #fff !important;
  font-weight: 500 !important;
}

#lou-detail-body #mobileReservationNoteForm textarea {
  min-height: 78px !important;
  padding: 10px !important;
  border: 0.5px solid var(--lou-border) !important;
  color: var(--lou-text-1) !important;
  background-color: var(--lou-card) !important;
  resize: vertical !important;
}

.lou-checklist-header { cursor: pointer; }
.lou-checklist-label { font-size: 13px; font-weight: 600; color: var(--lou-text-1); }
.lou-checklist-count { font-size: 12px; font-weight: 600; margin-left: auto; }
.lou-checklist-chevron { transition: transform 0.2s ease; }
.lou-checklist-chevron.is-open { transform: rotate(90deg); }
.lou-checklist-items { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.lou-checklist-item { display:flex; gap:9px; padding:10px 0; border-bottom: 0.5px solid var(--lou-border); cursor:default; }
.lou-checklist-item:last-child { border-bottom: none; }
.lou-checklist-item-check {
  width:18px;
  height:18px;
  border-radius:50%;
  border:1.5px solid var(--lou-border);
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  color:#3B6D11;
  background:var(--lou-card);
  margin-top:2px;
}
.lou-checklist-item-check.is-done { background:#EAF3DE; border-color:#3B6D11; color:#3B6D11; }
.lou-checklist-item-body { flex:1; min-width:0; }
.lou-checklist-item-text { font-size:13px; color:var(--lou-text-1); }
.lou-checklist-item.is-done .lou-checklist-item-text { text-decoration: line-through; color: var(--lou-text-3); }
.lou-checklist-item-desc { margin-top:3px; font-size:11px; color:var(--lou-text-2); line-height:1.35; }

/* ── Fix V2.1 : neutraliser main.css sur l'îlot Lou (validé live) ── */
#lou-bottom-nav { overflow: visible !important; }

body.is-mobile .lou-nav-btn {
  border: none !important;
  background: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

#lou-voice-island {
  width: 170px !important;
  height: 44px !important;
  top: -44px !important;
  border-radius: 85px 85px 0 0 !important;
  padding: 0 20px !important;
  align-items: flex-end !important;
}

body.is-mobile #lou-island-mic,
body.is-mobile #lou-island-chat {
  width: 30px !important;
  height: 36px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 0 6px !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.is-mobile #lou-orb {
  border-radius: 50% !important;
  border-width: 1px !important;
}

/* ========== Page Calendrier mobile native ========== */
#lou-page-calendrier { padding-top: 8px; }
.lou-cal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 16px;
  color: #111827;
  text-transform: capitalize;
}
.lou-cal-header button {
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  padding: 4px 12px;
  cursor: pointer;
  color: var(--lou-green, #0F6E56);
  border-radius: 8px;
}
.lou-cal-header button:active { background: rgba(15,110,86,0.08); }
.lou-cal-select {
  width: 100%;
  max-width: 100%;
  margin: 0 0 12px;
  box-sizing: border-box;
  padding: 9px 12px;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  font-size: 14px;
  background: #fff;
  color: #111827;
}
.lou-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  padding: 0 8px;
}
.lou-cal-grid .day-name {
  text-align: center;
  font-size: 10px;
  color: #9CA3AF;
  padding: 4px 0;
  font-weight: 600;
  text-transform: uppercase;
}
.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  position: relative;
  color: #111827;
}
.cal-day.libre  { background: #F3F4F6; }
.cal-day.resa   { background: #D4EDDA; color: #0F6E56; font-weight: 600; }
.cal-day.menage { background: #FFF3CD; color: #854F0B; font-weight: 600; }
.cal-day.arrivee  { background: linear-gradient(90deg,#F3F4F6 50%,#D4EDDA 50%); color:#0F6E56; font-weight:600; }
.cal-day.depart   { background: linear-gradient(90deg,#D4EDDA 50%,#F3F4F6 50%); color:#0F6E56; font-weight:600; }
.cal-day.rotation { background: linear-gradient(90deg,#D4EDDA 0 calc(50% - 1px),#FFFFFF calc(50% - 1px) calc(50% + 1px),#D4EDDA calc(50% + 1px) 100%); color:#0F6E56; font-weight:600; }
.cal-day.has-menage::after { content:''; position:absolute; bottom:3px; left:50%; transform:translateX(-50%); width:5px; height:5px; border-radius:50%; background:#BA7517; }
.cal-day.today  { box-shadow: inset 0 0 0 2px var(--lou-green, #0F6E56); }
.cal-day.other-month { background: transparent; cursor: default; }
.cal-day:active:not(.other-month) { transform: scale(0.95); }

/* Écran mobile natif Tarifs : cellule = jour + prix (réutilise la grille .lou-cal-grid) */
.cal-day.tarif-day {
  flex-direction: column;
  gap: 1px;
  background: #F3F4F6;
}
.tarif-day-num { font-size: 11px; color: #6B7280; }
.tarif-day-prix { font-size: 11px; font-weight: 700; color: #0F6E56; }

#lou-cal-legend {
  display: flex;
  gap: 14px;
  padding: 14px 16px 8px;
  font-size: 11px;
  color: #6B7280;
  align-items: center;
  flex-wrap: wrap;
}
#lou-cal-legend > span { display: inline-flex; align-items: center; }
#lou-cal-legend .dot-arrivee,
#lou-cal-legend .dot-resa,
#lou-cal-legend .dot-depart,
#lou-cal-legend .dot-menage {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 5px;
}
#lou-cal-legend .dot-arrivee { background: linear-gradient(90deg,#F3F4F6 50%,#D4EDDA 50%); border: 1px solid #0F6E56; }
#lou-cal-legend .dot-resa   { background: #D4EDDA; border: 1px solid #0F6E56; }
#lou-cal-legend .dot-depart { background: linear-gradient(90deg,#D4EDDA 50%,#F3F4F6 50%); border: 1px solid #0F6E56; }
#lou-cal-legend .dot-menage { background: #FFF3CD; border: 1px solid #E6A817; }

#lou-cal-detail { padding: 0 16px 16px; }
.lou-cal-detail-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  margin-top: 8px;
}
.lou-cal-detail-card h4 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  text-transform: capitalize;
}
.lou-cal-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #F3F4F6;
  font-size: 13px;
  color: #111827;
  cursor: pointer;
}
.lou-cal-detail-row:last-child { border-bottom: none; }
.lou-cal-detail-empty { color: #9CA3AF; font-size: 12px; padding: 6px 0; }

/* ========== PWA : bouton install + hint iOS ========== */
#lou-install-btn {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 20px auto 8px;
  padding: 7px 14px;
  background: transparent;
  color: var(--lou-text-3, #94a3b8);
  border: 1px solid var(--lou-border, #e5e7eb);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity .15s, background .15s;
}
#lou-install-btn:active { background: rgba(15,110,86,0.08); opacity: 1; }

#lou-ios-hint {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 10001;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
}
.lou-ios-hint-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
}
.lou-ios-hint-card p {
  margin: 0 0 10px;
  font-size: 14px;
  color: #111827;
  line-height: 1.5;
}
.lou-ios-hint-card p:first-child { font-weight: 600; }
.lou-ios-hint-card button {
  margin-top: 10px;
  width: 100%;
  padding: 11px;
  background: var(--lou-green, #0F6E56);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* ========== Header mobile : actions plates (Option A) ========== */
.lou-header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.lou-header-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  color: var(--lou-text-2, #64748b);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  padding: 0;
}
.lou-header-btn:active {
  opacity: 0.6;
  transform: scale(0.94);
}

/* BOUTONS ICÔNES MOBILES — priorité sur la règle tactile mobile globale.
   css/mobile/main.css impose `.is-mobile button { padding:12px 18px;
   min-width:44px; min-height:44px; border:1px …; box-shadow:… }` en
   !important. Sa spécificité (0,1,1) bat nos classes simples (0,1,0)
   même avec !important : on passe donc par les id/classes précis pour
   reprendre la main (même schéma que css/messages-conversation.css). */
#lou-refresh-btn,
#lou-logout-btn,
#lou-taches-add,
#lou-nav-plus,
#lou-cal-prev,
#lou-cal-next,
#lou-tarifs-prev,
#lou-tarifs-next,
.lou-draps-step {
  padding: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  border: none !important;
  box-shadow: none !important;
  font-size: inherit !important;
}

.lou-spin {
  animation: lou-spin .6s linear;
}
@keyframes lou-spin {
  to { transform: rotate(360deg); }
}

/* ========== Bouton retour (← Accueil) dans chaque page sauf home ========== */
.lou-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 4px 0 10px;
  padding: 6px 10px 6px 4px;
  background: transparent;
  color: var(--lou-green, #0F6E56);
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
}
.lou-back-btn:active { background: rgba(15,110,86,0.1); }
body.is-mobile #lou-page-home .lou-back-btn { display: none; }

/* Masquer les suggestions Lou (mobile ET desktop) */
#lou-suggestions { display: none !important; }

/* ── Couleurs Lou communes ── */
#lou-panel-header {
  background: linear-gradient(135deg,#085041,#0F6E56) !important;
}
body.is-mobile #lou-fab {
  background: linear-gradient(135deg,#085041,#0F6E56) !important;
}
#lou-send {
  background: #0F6E56 !important;
  border-color: #0F6E56 !important;
}
#lou-input { border-color: #0F6E56 !important; }
#lou-suggestions { display: none !important; }

/* ── Fix V2.2 : aura vivante (pseudo-élément) + libellés onglets ── */
body.is-mobile .lou-nav-btn { font-size: 10px !important; }

body.is-mobile #lou-orb {
  box-shadow: none !important;
  overflow: visible !important;
}
#lou-orb::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
}
body.is-mobile #lou-orb.lou-aura-idle::before      { animation: louAuraIdle 3.2s ease-in-out infinite; }
body.is-mobile #lou-orb.lou-aura-listening::before  { animation: louAuraListen 1.1s ease-in-out infinite; }
body.is-mobile #lou-orb.lou-aura-thinking::before   { animation: louAuraThink 0.9s ease-in-out infinite; }
body.is-mobile #lou-orb.lou-aura-speaking::before   { animation: louAuraSpeak 1.4s ease-in-out infinite; }

/* ── LOU MOBILE CLEAN V3 ───────────────────────────────────────────────
   Neutralise le style neo global sur le shell mobile uniquement.
   Ne touche pas #lou-bottom-nav / #lou-voice-island / #lou-orb. */
body.is-mobile #lou-logo-bar,
body.is-mobile .lou-card,
body.is-mobile .lou-row-card,
body.is-mobile .lou-metric-card,
body.is-mobile .lou-val-card,
body.is-mobile .lou-soc-card,
body.is-mobile .lou-planning-row {
  background-image: none !important;
  box-shadow: none !important;
}

body.is-mobile .lou-card,
body.is-mobile .lou-row-card,
body.is-mobile .lou-metric-card,
body.is-mobile .lou-val-card,
body.is-mobile .lou-soc-card,
body.is-mobile .lou-planning-row {
  background: #fff !important;
  border: 0.5px solid #E8E6DF !important;
  border-radius: 14px !important;
}

body.is-mobile #lou-logo-bar {
  background: #fff !important;
  border-bottom: 0.5px solid #E8E6DF !important;
}

body.is-mobile #lou-logo-bar .lou-header-btn {
  width: 44px !important;
  height: 44px !important;
  border-radius: 10px !important;
  border: none !important;
  background: transparent !important;
  color: #94A3B8 !important;
}

body.is-mobile .lou-section-label {
  font-size: 9px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.6px !important;
  color: #B4B2A9 !important;
}

body.is-mobile .lou-metric-label {
  font-size: 10px !important;
  color: #94A3B8 !important;
}

body.is-mobile .lou-metric-value {
  font-size: 20px !important;
  font-weight: 500 !important;
  color: #1e293b !important;
}

body.is-mobile .lou-metric-value.green {
  color: #0F6E56 !important;
}

body.is-mobile .lou-row-name,
body.is-mobile .lou-soc-name {
  color: #1e293b !important;
}

body.is-mobile .lou-row-detail,
body.is-mobile .lou-soc-msg,
body.is-mobile .lou-soc-date,
body.is-mobile .lou-metric-sub {
  color: #94a3b8 !important;
}

body.is-mobile .btn-val-ok {
  background: #0F6E56 !important;
  color: #fff !important;
  border: none !important;
}

body.is-mobile .btn-val-no {
  background: transparent !important;
  color: #993C1D !important;
  border: 1px solid #F0997B !important;
}

@media (max-width: 768px) {
  /* ══════════════ KANBAN MOBILE REFONTE ══════════════ */

  /* Board : colonne unique verticale */
  .kanban-board {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  /* Onglets de statut (À faire / En cours / Terminé) */
  .kanban-status-tabs {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    background: var(--app-cream, #F4EFE3) !important;
    border-bottom: 1px solid rgba(91, 138, 45, 0.15) !important;
    margin-bottom: 0 !important;
  }
  .kanban-stab {
    padding: 8px 4px !important;
    text-align: center !important;
    cursor: pointer !important;
    border-bottom: 2px solid transparent !important;
  }
  .kanban-stab.active { border-bottom-color: #5B8A2D !important; }
  .kanban-stab-count {
    font-size: 16px !important;
    font-weight: 500 !important;
    color: var(--lou-text-3) !important;
  }
  .kanban-stab.active .kanban-stab-count { color: #5B8A2D !important; }
  .kanban-stab-label {
    font-size: 10px !important;
    color: var(--lou-text-3) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
  }

  /* Une seule colonne visible à la fois */
  .kanban-column { display: none !important; }
  .kanban-column.active { display: block !important; }

  /* En-tête colonne masqué (remplacé par les onglets) */
  .kanban-column-header { display: none !important; }

  /* Corps de colonne */
  .kanban-column-content {
    padding: 6px 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  /* Cartes : filet coloré en haut, plus bas à gauche */
  .kanban-card {
    background: var(--lou-card) !important;
    border: 0.5px solid var(--lou-border) !important;
    border-left: none !important;
    border-radius: var(--lou-radius-md) !important;
    padding: 0 !important;
    box-shadow: none !important;
    overflow: hidden !important;
  }
  .kanban-card::before {
    content: '' !important;
    display: block !important;
    height: 3px !important;
    width: 100% !important;
  }
  .kanban-card[data-category='reservations']::before { background: #3b82f6 !important; }
  .kanban-card[data-category='achats']::before       { background: #f59e0b !important; }
  .kanban-card[data-category='travaux']::before      { background: #ef4444 !important; }

  .kanban-card .kcard-header,
  .kanban-card .kcard-title,
  .kanban-card .kcard-desc,
  .kanban-card .kcard-footer {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
  .kanban-card .kcard-header { padding-top: 12px !important; padding-bottom: 4px !important; }
  .kanban-card .kcard-title  { font-size: 13px !important; padding-bottom: 3px !important; }
  .kanban-card .kcard-desc   { font-size: 11px !important; padding-bottom: 10px !important; }
  .kanban-card .kcard-footer {
    padding-top: 8px !important;
    padding-bottom: 10px !important;
    border-top: 0.5px solid var(--lou-border) !important;
    gap: 6px !important;
  }
  .kanban-card .kcard-btn {
    flex: 1 !important;
    height: 30px !important;
    font-size: 11px !important;
    justify-content: center !important;
    border-radius: var(--lou-radius-sm) !important;
  }

  /* Filtres : scroll horizontal en pills */
  .kanban-filters .filter-group {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    gap: 6px !important;
    padding-bottom: 6px !important;
    scrollbar-width: none !important;
  }
  .filter-btn {
    flex-shrink: 0 !important;
    font-size: 11px !important;
    padding: 5px 11px !important;
    border-radius: 99px !important;
    white-space: nowrap !important;
  }

  /* En-tête page */
  .kanban-container .page-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin-bottom: 8px !important;
  }
  .kanban-container .page-title { font-size: 15px !important; }
  .kanban-container .btn--refresh { font-size: 11px !important; padding: 5px 10px !important; }

  /* ── TÂCHES MOBILE : onglets pills ── */
  #lou-taches-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    gap: 6px !important;
    padding: 10px 12px !important;
    background: var(--lou-card) !important;
    border-bottom: 0.5px solid var(--lou-border) !important;
    scrollbar-width: none !important;
  }
  #lou-taches-tabs::-webkit-scrollbar { display: none !important; }

  .lou-tab-btn {
    flex: 0 0 auto !important;
    flex-direction: row !important;
    gap: 5px !important;
    padding: 6px 14px !important;
    border-radius: 99px !important;
    border: 0.5px solid var(--lou-border) !important;
    background: var(--lou-bg) !important;
    color: var(--lou-text-2) !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    border-bottom: 0.5px solid var(--lou-border) !important;
    white-space: nowrap !important;
  }
  .lou-tab-btn.active {
    background: var(--app-cream, #F4EFE3) !important;
    border-color: #8CB85B !important;
    color: #3B6D11 !important;
    font-weight: 600 !important;
    border-bottom-color: #8CB85B !important;
  }
  .lou-tab-btn i, .lou-tab-btn svg {
    width: 13px !important;
    height: 13px !important;
  }

  /* Page Tâches : layout logo bar */
  #lou-page-taches .lou-logo-bar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 12px 16px !important;
    flex-direction: row !important;
  }
  #lou-page-taches .lou-logo-bar p {
    flex: 1 !important;
    text-align: center !important;
  }

  #lou-taches-add {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    border-radius: 8px !important;
    background: var(--app-green, #5B8A2D) !important;
    color: white !important;
    border: none !important;
    font-size: 22px !important;
    line-height: 1 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  #lou-taches-add i,
  #lou-taches-add svg {
    width: 22px !important;
    height: 22px !important;
    stroke-width: 2 !important;
  }

  #lou-taches-add-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 42px;
    min-width: 220px;
    background: var(--lou-card);
    border: 0.5px solid var(--lou-border);
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .14);
    z-index: 1200;
  }
  #lou-taches-add-menu select {
    width: 100%;
    margin-top: 6px;
    margin-bottom: 8px;
    border: 0.5px solid var(--lou-border);
    border-radius: 8px;
    padding: 8px;
    font-size: 12px;
    background: var(--lou-bg);
    color: var(--lou-text-1);
  }
  #lou-taches-add-menu button {
    width: 100%;
    border: none;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: var(--lou-green);
    cursor: pointer;
  }
}

/* ─── À faire maintenant ─────────────────────────────────────── */
@media (max-width: 768px), body.is-mobile {
  .lou-action-empty {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f0fdf4;
    color: #15803d;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 4px;
  }
  html.theme-dark .lou-action-empty {
    background: #052e16;
    color: #4ade80;
  }
  .lou-action-block {
    background: transparent;
    border-radius: 0;
    border: none;
    overflow: hidden;
    margin-bottom: 0;
  }
  .lou-action-card {
    background: var(--lou-card);
    border: 0.5px solid var(--lou-border);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 4px;
  }
  .lou-action-header {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-start;
    padding: 10px 12px;
    border-bottom: 0.5px solid var(--lou-border);
    font-size: 12px;
    font-weight: 700;
    color: var(--lou-text-1);
  }
  .lou-action-cat {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 0.5px solid var(--lou-border);
  }
  .lou-action-cat:last-child { border-bottom: none; }
  .lou-action-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    margin-top: 1px;
  }
  .lou-action-content { flex: 1; min-width: 0; }
  .lou-action-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--lou-text-2);
    text-transform: uppercase;
    letter-spacing: .03em;
    margin: 0 0 5px 0;
    display: flex;
    align-items: center;
    gap: 5px;
  }
  .lou-action-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 99px;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.4;
  }
  .lou-action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    font-size: 12px;
    color: var(--lou-text-1);
    padding: 3px 0;
    flex-wrap: wrap;
  }
  .lou-action-btn {
    flex-shrink: 0;
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
  }
  .lou-action-btn-blue   { background: #dbeafe; color: #1d4ed8; }
  .lou-action-btn-violet { background: #ede9fe; color: #6d28d9; }
  .lou-action-btn-amber  { background: #fef3c7; color: #b45309; }
  .lou-action-btn-gray   { background: var(--lou-border); color: var(--lou-text-2); }
}

/* ─── Notes voyageur sous les cartes semaine ─────────────────── */
@media (max-width: 768px), body.is-mobile {
  .lou-resa-notes {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 4px;
  }
  .lou-resa-note {
    font-size: 10px;
    line-height: 1.4;
    opacity: .85;
  }
}
/* Une place stable pour chaque carte, y compris au premier lancement sans cache. */
html.is-mobile #lou-home-messages,
html.is-mobile #lou-home-actions {
  min-height: 132px;
}

html.is-mobile #lou-today-list {
  min-height: 236px;
}

html.is-mobile .lou-startup-placeholder,
html.is-mobile .lou-startup-empty {
  min-height: inherit;
  box-sizing: border-box;
  border: 0.5px solid var(--lou-border);
  border-radius: 12px;
  background: var(--lou-card);
}

html.is-mobile .lou-startup-placeholder::before,
html.is-mobile .lou-startup-placeholder::after {
  content: "";
  display: block;
  height: 12px;
  margin: 20px 16px;
  border-radius: 6px;
  background: var(--lou-bg-2, #f1f5f9);
}

html.is-mobile .lou-startup-placeholder::after {
  width: 60%;
}

html.is-mobile .lou-startup-empty {
  padding: 20px 16px;
  color: var(--lou-text-3);
  font-size: 12px;
}
