﻿:root {
  --f-primary: #155EEF;
  --f-primary-dark: #1146B8;
  --f-accent: #F7B718;
  --f-text: #102A43;
  --f-text-2: #667085;
  --f-bg: #F5F7FA;
  --f-white: #FFFFFF;
  --f-line: #E2E8F0;
  --f-radius-sm: 14px;
  --f-shadow-card: 0 8px 24px rgba(16, 42, 67, 0.06);
  --f-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --f-display: 'Space Grotesk', sans-serif;
}

* { box-sizing: border-box; }

body {
  font-family: var(--f-font);
  background: var(--f-bg);
  color: var(--f-text);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

.appbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  padding-top: calc(34px + env(safe-area-inset-top));
  background: var(--f-primary);
  color: var(--f-white);
  position: sticky;
  top: 0;
  z-index: 100;
}

.guest-appbar {
  background: var(--f-white);
  color: var(--f-text);
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 20px;
}

.appbar-nav {
  display: none;
  align-items: center;
  gap: 24px;
}

.tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--f-white);
  border-top: 1px solid var(--f-line);
  padding: 8px 0 14px;
  display: flex;
  justify-content: space-around;
  z-index: 100;
}

.tabbar .tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: var(--f-text-2);
  font-size: 11px;
  font-weight: 500;
  position: relative;
}

.tabbar .tab.active {
  color: var(--f-primary);
}

.tabbar .tab svg {
  width: 22px;
  height: 22px;
}

@media (min-width: 768px) {
  .appbar-nav { display: flex; }
  .tabbar { display: none !important; }
}

/* ==========================================================================
   Barre laterale (bureau) - masquee sous 1024px, tiroir mobile a la place
   ========================================================================== */
.sidebar {
  display: none;
  flex-direction: column;
  width: 252px;
  min-height: 100vh;
  background: var(--f-white);
  border-right: 1px solid var(--f-line);
  padding: 20px 14px 16px;
}

.sidebar svg, .tabbar svg, .support-fab svg {
  width: 24px;
  height: 24px;
  display: inline-block;
  vertical-align: middle;
}
.sidebar .brand {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--f-display); font-weight: 800; font-size: 19px;
  color: var(--f-text); text-decoration: none;
}
.sidebar .brand em { font-style: normal; color: var(--f-primary); }

@media (min-width: 1024px) {
  body:not(.chat-view) .app-wrap { padding-top: var(--dtopbar-h, 0); }

  /* Chrome mobile masquee sur bureau : le hamburger bureau (.dtopbar-burger)
     ouvre le meme drawer (.cd-drawer), garde visible ici. La .dtopbar
     remplace aussi l'ancien en-tete invite/generique (guest-appbar/appbar). */
  .tabbar,
  .support-fab,
  .burger,
  .appbar,
  .guest-appbar { display: none !important; }

  /* Cadre de contenu confortable sur bureau */
  body:not(.chat-view) .page {
    max-width: 1160px;
    margin: 0 auto;
    padding: 28px 40px 56px;
  }

  /* Les conteneurs "colonne mobile" s'elargissent au lieu de rester a ~520px */
  .rz, .p-wrap {
    max-width: none !important;
  }
}

@media (min-width: 1440px) {
  body:not(.chat-view) .page { max-width: 1320px; }
}

/* ==========================================================================
   COQUILLE BUREAU (>=1024px) - barre superieure + pied de sidebar enrichi.
   Reutilisable par toutes les pages de l'espace client connecte.
   Rien de tout ceci n'est visible en mobile (<1024px).
   ========================================================================== */
.dtopbar { display: none; }

@media (min-width: 1024px) {
  :root { --dtopbar-h: 64px; }

  .dtopbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--dtopbar-h);
    z-index: 80;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 22px;
    background: var(--f-white);
    border-bottom: 1px solid var(--f-line);
  }
  .dtopbar-burger {
    flex-shrink: 0; width: 40px; height: 40px; border-radius: 11px;
    border: 1px solid var(--f-line); background: var(--f-white); color: var(--f-text);
    display: flex; align-items: center; justify-content: center; cursor: pointer;
  }
  .dtopbar-burger:hover { background: var(--f-bg); }
  .dtopbar-burger svg { width: 20px; height: 20px; }

  .dtopbar-brand {
    display: flex; align-items: center; flex-shrink: 0;
    text-decoration: none;
  }
  .dtopbar-brand img { height: 34px; width: auto; object-fit: contain; display: block; }

  .dtopbar-search {
    flex: 0 1 260px; min-width: 0;
    display: flex; align-items: center; gap: 8px;
    height: 38px; padding: 0 12px;
    background: var(--f-bg); border: 1px solid var(--f-line); border-radius: 10px;
  }
  .dtopbar-search svg { width: 16px; height: 16px; color: var(--f-text-2); flex-shrink: 0; }
  .dtopbar-search input {
    flex: 1; min-width: 0; border: none; outline: none; background: transparent;
    font: inherit; font-size: 13px; color: var(--f-text);
  }

  /* Navigation principale centree */
  .dtopbar-nav {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 20px;
    height: 100%; min-width: 0;
  }
  .dtopbar-nav a {
    position: relative; display: flex; align-items: center; gap: 6px;
    height: 100%; text-decoration: none; color: var(--f-text-2);
    font-size: 13.5px; font-weight: 600; white-space: nowrap;
  }
  .dtopbar-nav a:hover { color: var(--f-text); }
  .dtopbar-nav a.active { color: var(--f-primary); font-weight: 700; }
  .dtopbar-nav a.active::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
    border-radius: 3px 3px 0 0; background: var(--f-primary);
  }

  .dtopbar-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

  /* Accueil public (landing) : logo + "Richesse", tres longue recherche,
     position, puis le bouton bleu "Menu" tout a droite (memes elements que
     l'en-tete standard, seulement re-ordonnes ; aucune autre page touchee). */
  .dtopbar-burger-label, .dtopbar-tag { display: none; }
  .dtopbar--landing .dtopbar-nav, .dtopbar--landing .dtopbar-guest-btn { display: none; }
  .dtopbar--landing .dtopbar-burger { order: 10; width: auto; height: 40px; padding: 0 16px; gap: 8px; border-color: var(--f-primary); background: var(--f-primary); color: #fff; font-weight: 700; font-size: 14px; }
  .dtopbar--landing .dtopbar-burger:hover { background: var(--f-primary-dark); }
  .dtopbar--landing .dtopbar-burger-label { display: inline; }
  .dtopbar--landing .dtopbar-tag { display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; font-size: 15px; font-weight: 800; color: var(--f-text); }
  .dtopbar--landing .dtopbar-tag svg { width: 24px; height: 24px; color: #F5B301; }
  .dtopbar--landing .dtopbar-search { flex: 1 1 auto; height: 42px; padding: 0 16px; border-radius: 12px; }
  .dtopbar--landing .dtopbar-search input { font-size: 14px; }
  .dtopbar--landing .dtopbar-right { order: 5; }
  .dtopbar--landing .dtopbar-loc-wrap { margin-left: 0; }
  /* Profil technicien PC : meme en-tete que l'accueil, mais le bouton Menu se place
     entre la position et les icones (favoris, messages, compte). */
  .dtopbar--profile .dtopbar-right { display: contents; }
  .dtopbar--profile .dtopbar-loc-wrap { order: 4; }
  .dtopbar--profile .dtopbar-burger { order: 5; }
  .dtopbar--profile .dtopbar-ic--fav { order: 6; }
  .dtopbar--profile .dtopbar-ic--msg { order: 7; }
  .dtopbar--profile .dtopbar-user, .dtopbar--profile .dtopbar-guest-btn { order: 8; }
  .dtopbar--profile .dtopbar-guest-btn { display: inline-flex; }
  .dtopbar--profile .dtopbar-ic { border-color: transparent; background: transparent; color: var(--f-text); }
  .dtopbar--profile .dtopbar-ic svg { width: 22px; height: 22px; }

  .dtopbar-guest-btn {
    flex-shrink: 0; white-space: nowrap;
    padding: 9px 18px; border-radius: 10px;
    font-size: 13.5px; font-weight: 700; text-decoration: none;
  }
  .dtopbar-guest-btn.soft { color: var(--f-primary); background: var(--f-bg); }
  .dtopbar-guest-btn.soft:hover { background: #E8EDF5; }
  .dtopbar-guest-btn.primary { color: #fff; background: var(--f-primary); }
  .dtopbar-guest-btn.primary:hover { background: var(--f-primary-dark); }

  .dtopbar-loc-wrap { position: relative; margin-left: auto; flex-shrink: 0; }
  .dtopbar-loc {
    display: flex; align-items: center; gap: 8px; flex-shrink: 0;
    height: 40px; padding: 0 12px;
    background: var(--f-white); border: 1px solid var(--f-line); border-radius: 11px;
    text-decoration: none; color: var(--f-text); cursor: pointer; font-family: inherit;
    font-size: 13.5px; font-weight: 600;
    max-width: 220px;
  }
  .dtopbar-loc svg { width: 16px; height: 16px; color: var(--f-primary); flex-shrink: 0; }
  .dtopbar-loc svg.chev { color: var(--f-text-2); width: 14px; height: 14px; transition: transform .15s; }
  .dtopbar-loc[aria-expanded="true"] svg.chev { transform: rotate(180deg); }
  .dtopbar-loc span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  .dtopbar-loc-panel {
    position: absolute; top: calc(100% + 8px); left: 0; z-index: 120;
    width: 280px; max-height: 380px;
    background: #fff; border: 1px solid var(--f-line); border-radius: 16px;
    box-shadow: 0 18px 40px rgba(11,18,32,.16);
    display: flex; flex-direction: column; overflow: hidden;
  }
  .dtopbar-loc-panel[hidden] { display: none; }
  .dtopbar-loc-panel-head {
    display: flex; align-items: center; gap: 7px; padding: 14px 16px 10px;
    font-size: 14px; font-weight: 800; color: var(--f-text); flex-shrink: 0;
  }
  .dtopbar-loc-panel-head svg { width: 16px; height: 16px; color: var(--f-primary); flex-shrink: 0; }
  .dtopbar-loc-search {
    display: flex; align-items: center; gap: 7px; margin: 0 16px 10px; padding: 9px 11px;
    background: var(--f-bg); border: 1px solid var(--f-line); border-radius: 10px; flex-shrink: 0;
  }
  .dtopbar-loc-search svg { width: 15px; height: 15px; color: var(--f-text-2); flex-shrink: 0; }
  .dtopbar-loc-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 13.5px; color: var(--f-text); font-family: inherit; }
  .dtopbar-loc-search input::placeholder { color: var(--f-text-2); }
  .dtopbar-loc-list { list-style: none; margin: 0; padding: 0 8px 10px; overflow-y: auto; flex: 1 1 auto; }
  .dtopbar-loc-item {
    width: 100%; display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 9px;
    background: none; border: 0; text-align: left; font-size: 13.5px; font-weight: 600; color: var(--f-text);
    cursor: pointer; font-family: inherit;
  }
  .dtopbar-loc-item:hover { background: var(--f-bg); }
  .dtopbar-loc-item-pin { width: 15px; height: 15px; color: var(--f-text-2); flex-shrink: 0; }
  .dtopbar-loc-item span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .dtopbar-loc-item-check { width: 15px; height: 15px; color: var(--f-primary); flex-shrink: 0; visibility: hidden; }
  .dtopbar-loc-item.active { color: var(--f-primary); background: var(--f-bg); }
  .dtopbar-loc-item.active .dtopbar-loc-item-pin { color: var(--f-primary); }
  .dtopbar-loc-item.active .dtopbar-loc-item-check { visibility: visible; }
  .dtopbar-loc-empty { margin: 4px 16px 16px; font-size: 12.5px; color: var(--f-text-2); text-align: center; }

  .dtopbar-ic {
    position: relative; flex-shrink: 0;
    width: 40px; height: 40px; border-radius: 11px;
    border: 1px solid var(--f-line); background: var(--f-white); color: var(--f-text-2);
    display: flex; align-items: center; justify-content: center; text-decoration: none;
  }
  .dtopbar-ic:hover { color: var(--f-primary); }
  .dtopbar-ic svg { width: 19px; height: 19px; }
  .dtopbar-ic .dot-badge {
    position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px;
    border-radius: 999px; background: #EF4444; color: #fff;
    font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  }

  .dtopbar-user { position: relative; flex-shrink: 0; }
  .dtopbar-user .user-menu-trigger {
    display: flex; align-items: center; gap: 9px;
    padding: 4px 8px 4px 4px; border: none; background: transparent; cursor: pointer;
    border-radius: 12px;
  }
  .dtopbar-user .user-menu-trigger:hover { background: var(--f-bg); }
  .dtopbar-av {
    width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
    background: rgba(21,94,239,.12); color: var(--f-primary);
    font-weight: 800; font-size: 14px;
    display: flex; align-items: center; justify-content: center;
  }
  .dtopbar-name { font-size: 13.5px; font-weight: 700; color: var(--f-text); white-space: nowrap; }
  .dtopbar-av img { width: 100%; height: 100%; object-fit: cover; }
  .dtopbar-user > svg,
  .dtopbar-user .user-menu-trigger > svg { width: 15px; height: 15px; color: var(--f-text-2); flex-shrink: 0; }
  .dtopbar-user .user-menu-dropdown {
    position: absolute; right: 0; top: calc(100% + 8px);
    min-width: 190px; background: var(--f-white);
    border: 1px solid var(--f-line); border-radius: 12px;
    box-shadow: var(--f-shadow-card); padding: 6px; z-index: 90;
    opacity: 0; visibility: hidden; transform: translateY(-4px);
    transition: opacity .14s, transform .14s, visibility .14s;
  }
  .dtopbar-user.open .user-menu-dropdown { opacity: 1; visibility: visible; transform: none; }
  .dtopbar-user .user-menu-dropdown a {
    display: block; padding: 9px 12px; border-radius: 8px;
    font-size: 13.5px; font-weight: 600; color: var(--f-text); text-decoration: none;
  }
  .dtopbar-user .user-menu-dropdown a:hover { background: var(--f-bg); color: var(--f-primary); }

  /* --- Sidebar : pied enrichi (promo + aide + parametres + deconnexion) --- */
  .sidebar { padding-bottom: 14px; padding-top: 16px; }
  /* Le logo est deja dans la topbar : on masque l'en-tete de la sidebar. */
}

/* En-tete bureau : sur ecran plus etroit, on retire la recherche et le
   slogan pour eviter tout chevauchement (nav + localisation restent). */
@media (min-width: 1024px) and (max-width: 1365px) {
  .dtopbar-search { display: none; }
  .dtopbar--landing .dtopbar-search { display: flex; }
  .dtopbar-nav { gap: 14px; }
  .dtopbar-loc { max-width: 150px; }
}

/* Categories supplementaires */

/* Categories populaires */

/* Comment ca marche */

/* ==========================================================================
   Menu de navigation client (tiroir)
   ========================================================================== */
.cd-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,.45);
  z-index: 190; opacity: 0; visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.cd-overlay.open { opacity: 1; visibility: visible; }

.cd-drawer {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: min(88vw, 360px);
  background: #F4F6FB; z-index: 191;
  display: flex; flex-direction: column;
  transform: translateX(-100%);
  transition: transform .28s ease;
  overflow: hidden;
}
.cd-drawer.open { transform: translateX(0); }

.cd-head {
  background: linear-gradient(135deg, #2563EB, #1D3FA8);
  color: #fff;
  padding: calc(16px + env(safe-area-inset-top)) 18px 34px;
  border-radius: 0 0 24px 24px;
  flex-shrink: 0;
}
.cd-head-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
/* Logo officiel en blanc, directement sur le degrade bleu (plus de cadre blanc). */
.cd-logo { display: flex; align-items: center; text-decoration: none; padding: 2px 0; }
.cd-logo img { height: 32px; width: auto; object-fit: contain; display: block; }
.cd-close {
  width: 38px; height: 38px; border: 0; border-radius: 50%;
  background: #fff; color: #1D4ED8;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,.15); flex-shrink: 0;
}

.cd-account {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 13px;
  margin: 0 0 -24px; padding: 13px 15px;
  background: #fff; border-radius: 16px;
  box-shadow: 0 10px 26px rgba(16,42,67,.16);
  text-decoration: none;
}
.cd-avatar {
  position: relative; width: 50px; height: 50px; border-radius: 50%; flex-shrink: 0;
  background: #EEF2FF; color: #1D4ED8;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800;
}
.cd-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.cd-account-info { flex: 1; min-width: 0; }
/* Adresse e-mail longue : coupee proprement (« ... ») au lieu de sortir de la carte. */
.cd-hello { display: block; font-size: 12.5px; color: #64748B; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-role { display: block; font-size: 15.5px; font-weight: 700; color: #0F172A; margin: 1px 0 3px; overflow-wrap: anywhere; }
.cd-status { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: #64748B; }
.cd-dot { width: 8px; height: 8px; border-radius: 50%; background: #94A3B8; }
.cd-dot.on { background: #16A34A; }
.cd-account .cd-chev { color: #CBD5E1; flex-shrink: 0; }

.cd-body {
  flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: 40px 14px calc(24px + env(safe-area-inset-bottom));
}

/* Bloc "Mon espace professionnel" (statut d'inscription technicien) */

.cd-section { background: #fff; border-radius: 16px; padding: 4px 4px; margin-bottom: 16px; }

.cd-item {
  display: flex; align-items: center; gap: 13px;
  padding: 12px 10px; border-radius: 12px;
  color: #0F172A; text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.cd-item + .cd-item { position: relative; }
.cd-item + .cd-item::before {
  content: ""; position: absolute; left: 53px; right: 10px; top: -1px; height: 1px; background: #F1F5F9;
}
.cd-item-ico {
  width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0;
  background: #EEF2FF; color: #1D4ED8;
  display: flex; align-items: center; justify-content: center;
}
.cd-item-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cd-item-txt .t { font-size: 14.5px; font-weight: 700; line-height: 1.3; }
.cd-item-txt .s { font-size: 11.5px; color: #64748B; margin-top: 1px; }
.cd-item .cd-chev { flex-shrink: 0; color: #CBD5E1; }
.cd-item:active { background: #F8FAFC; }
.cd-item.active { background: #EEF2FF; }
.cd-item.active .cd-item-ico { background: #1D4ED8; color: #fff; }
.cd-item.active .t { color: #1D4ED8; }
.cd-item.active + .cd-item::before, .cd-item.active::before { display: none; }

.cd-badge {
  background: #EF4444; color: #fff; font-size: 11px; font-weight: 700;
  min-width: 20px; height: 20px; border-radius: 10px; padding: 0 6px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* Action mise en avant : "Devenir technicien" / "Acceder a mon espace technicien" */
.cd-tech {
  background: #EAF1FF; border: 1px solid #D6E4FF;
  border-radius: 16px; padding: 14px 13px; margin-bottom: 16px;
}
.cd-tech .cd-item-ico { background: #1D4ED8; color: #fff; }
.cd-tech .cd-item-ico.cd-ico-tech { background: #fff; box-shadow: 0 2px 8px rgba(29,78,216,.22); }
.cd-tech .t { color: #1D4ED8; font-weight: 800; }
.cd-tech .s { color: #4B78C8; }
.cd-tech .cd-chev { color: #93B4F0; }
.cd-tech:active, .cd-tech.active { background: #DEEAFF; }

/* En-tete du menu quand l'utilisateur n'est pas connecte */
.cd-account--guest .cd-avatar { background: #EEF2FF; color: #1D4ED8; }
.cd-account--guest .cd-hello { white-space: normal; line-height: 1.35; margin-top: 2px; }

.cd-logout {
  display: flex; align-items: center; gap: 13px;
  padding: 14px 15px; margin-bottom: 14px; border-radius: 16px;
  background: #FEF2F2; color: #DC2626; text-decoration: none;
}
.cd-logout .cd-item-ico { background: #FEE2E2; color: #DC2626; }
.cd-logout .t { color: #DC2626; font-weight: 800; }
.cd-logout .s { color: #EF9A9A; }
.cd-logout .cd-chev { color: #FCA5A5; }

.cd-footer { text-align: center; font-size: 11.5px; color: #94A3B8; line-height: 1.7; margin: 4px 0 0; }
.cd-footer svg { vertical-align: -2px; }

@media (min-width: 768px) and (max-width: 1023px) {
  .cd-drawer, .cd-overlay { display: none !important; }
}

/* Stabilite mobile : verrouillage horizontal */
html, body {
  overflow-x: hidden;
}

img, svg, canvas {
  max-width: 100%;
  height: auto;
}

/* =========================================================
   Page Mes reservations (.rz)
   ========================================================= */
/* Ordinateur : l'en-tete bureau (.dtopbar) suffit, pas de second en-tete. */
@media (min-width: 1024px) { header.rz-appbar { display: none; } }
.rz-appbar {
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  padding-top: calc(32px + env(safe-area-inset-top));
  background: var(--f-white);
  border-bottom: 1px solid var(--f-line);
}
.rz-appbar-btn {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--f-text);
  border-radius: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.rz-appbar-btn:active { background: #F1F5F9; }
.rz-appbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--f-text);
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 19px;
}
.rz-appbar-brand em { color: var(--f-primary); font-style: normal; }
.rz-appbar-right { display: flex; align-items: center; gap: 6px; }
.rz-appbar-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #EF4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--f-white);
}
.rz-appbar-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #EEF2FF;
  color: var(--f-primary);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #E2E8F0;
}
.rz-appbar-avatar img { width: 100%; height: 100%; object-fit: cover; }

.rz {
  max-width: 520px;
  margin: 0 auto;
  padding: 18px 16px calc(90px + env(safe-area-inset-bottom));
  background: var(--f-bg);
  min-height: 100vh;
}
@media (min-width: 1024px) {
  .rz { padding-bottom: 40px; }
}

.rz-head h1 {
  margin: 0 0 4px;
  font-family: var(--f-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--f-text);
}
.rz-head p { margin: 0 0 16px; color: var(--f-text-2); font-size: 14px; }

.rz-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  margin-bottom: 14px;
  scrollbar-width: none;
}
.rz-filters::-webkit-scrollbar { display: none; }
.rz-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid var(--f-line);
  background: var(--f-white);
  color: var(--f-text);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.rz-chip-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: #EEF2FF;
  color: var(--f-primary);
  font-size: 11px;
  font-weight: 700;
}
.rz-chip.active {
  background: var(--f-primary);
  border-color: var(--f-primary);
  color: #fff;
}
.rz-chip.active .rz-chip-n { background: rgba(255, 255, 255, .25); color: #fff; }

.rz-toolbar { display: flex; gap: 10px; margin-bottom: 18px; }
.rz-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: 48px;
  background: var(--f-white);
  border: 1px solid var(--f-line);
  border-radius: 14px;
  color: var(--f-text-2);
}
.rz-search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 14px;
  color: var(--f-text);
}
.rz-sort { position: relative; flex-shrink: 0; }
.rz-sort summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 16px;
  background: var(--f-white);
  border: 1px solid var(--f-line);
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--f-text);
  cursor: pointer;
}
.rz-sort summary::-webkit-details-marker { display: none; }
.rz-sort-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  width: 220px;
  background: var(--f-white);
  border: 1px solid var(--f-line);
  border-radius: 14px;
  box-shadow: var(--f-shadow-card);
  padding: 6px;
}
.rz-sort-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  background: transparent;
  border-radius: 10px;
  font: inherit;
  font-size: 13.5px;
  color: var(--f-text);
  cursor: pointer;
}
.rz-sort-menu button.active { color: var(--f-primary); font-weight: 700; background: #EEF2FF; }

.rz-list-title {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 700;
  color: var(--f-text);
}

.rz-list { display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 1024px) { .rz-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }

.rz-card {
  background: var(--f-white);
  border: 1px solid var(--f-line);
  border-radius: 18px;
  box-shadow: var(--f-shadow-card);
  overflow: hidden;
}
.rz-card-main {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto 16px;
  gap: 12px;
  align-items: start;
  padding: 16px;
  text-decoration: none;
  color: inherit;
}
.rz-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rz-card-body { min-width: 0; }
.rz-tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 6px;
}

.rz-card-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--f-text);
  line-height: 1.25;
}
.rz-card-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 3px 0;
  font-size: 12.5px;
  color: var(--f-text-2);
}
.rz-card-line svg { flex-shrink: 0; }

.rz-card-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  text-align: right;
}
.rz-ref {
  background: #EEF2FF;
  color: #1D4ED8;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 7px;
  white-space: nowrap;
}
.rz-side-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--f-text-2);
}
.rz-side-status.ok { color: #15803D; }
.rz-side-status.ko { color: #DC2626; }
.rz-card-chev { color: #CBD5E1; margin-top: 4px; }

.rz-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--f-line);
}
.rz-pro { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rz-pro-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #EEF2FF;
  color: var(--f-primary);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rz-pro-avatar img { width: 100%; height: 100%; object-fit: cover; }
.rz-pro strong {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--f-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rz-pro-meta { font-size: 12px; color: var(--f-text-2); display: flex; align-items: center; gap: 6px; }
.rz-star { color: #F59E0B; font-weight: 600; }

.rz-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
}
.rz-btn-primary { background: var(--f-primary); color: #fff; }
.rz-btn-ghost { background: var(--f-white); color: var(--f-primary); border-color: #BFD3FF; }

.rz-empty[hidden], .rz-card[hidden] { display: none; }
.rz-empty {
  text-align: center;
  padding: 48px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.rz-empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #EEF2FF;
  color: var(--f-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}
.rz-empty strong { font-size: 16px; color: var(--f-text); }
.rz-empty p { margin: 0 0 10px; color: var(--f-text-2); font-size: 13.5px; }

/* Tabbar avec bouton central */

@media (max-width: 400px) {
  .rz-card-main { grid-template-columns: 44px minmax(0, 1fr) 16px; }
  .rz-card-side { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px; margin-top: 2px; }
}

/* ==========================================================================
   Menu lateral PC de l'accueil public (_drawer_pc.html) : uniquement >=1024px.
   ========================================================================== */
.pcm-overlay, .pcm, .pcm-toast { display: none; }
@media (min-width: 1024px) {
  .pcm-overlay { display: block; position: fixed; inset: 0; z-index: 190; background: rgba(11,27,69,.42); opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s ease; }
  .pcm-overlay.open { opacity: 1; visibility: visible; }
  .pcm { display: flex; flex-direction: column; position: fixed; top: 0; right: 0; bottom: 0; z-index: 191; width: clamp(340px, 24vw, 440px); background: #fff; border-radius: 22px 0 0 22px; box-shadow: -12px 0 40px rgba(11,27,69,.18); transform: translateX(105%); visibility: hidden; transition: transform .32s cubic-bezier(.22,.8,.3,1), visibility .32s; overflow: hidden; color: #0B1B45; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
  .pcm.open { transform: translateX(0); visibility: visible; }
  .pcm-head { position: relative; flex: none; height: 134px; padding: 20px 18px 0; background: linear-gradient(135deg, #1D63F0, #1141B8); }
  .pcm-brand { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 198px; height: 97px; background: #fff; border-radius: 20px; text-decoration: none; color: #0B1B45; box-shadow: 0 6px 18px rgba(0,0,0,.14); }
  .pcm-brand img { height: 36px; width: auto; display: block; }
  .pcm-brand span { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 800; }
  .pcm-brand svg { width: 20px; height: 20px; color: #F5B301; }
  .pcm-close { position: absolute; top: 18px; right: 18px; width: 46px; height: 46px; border: 0; border-radius: 50%; background: #fff; color: #1D63F0; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,.14); }
  .pcm-close svg { width: 20px; height: 20px; }
  .pcm-body { flex: 1; overflow-y: auto; padding: 14px 16px 18px; border-radius: 22px 0 0 0; margin-top: -14px; background: #fff; position: relative; }
  .pcm-list { display: grid; gap: 6px; }
  .pcm-item { display: flex; align-items: center; gap: 14px; min-height: 48px; padding: 0 14px; border-radius: 12px; color: #0B1B45; text-decoration: none; font-size: 14.5px; font-weight: 500; }
  .pcm-item span { flex: 1; min-width: 0; }
  .pcm-item b { font-weight: 700; }
  .pcm-item .ic { width: 22px; height: 22px; flex: none; color: #1D63F0; }
  .pcm-item .chev { width: 18px; height: 18px; flex: none; color: #9AA7BD; }
  .pcm-item:hover { background: #F1F5FD; }
  .pcm-item.active { background: #DCE8FC; color: #0B1B45; font-weight: 700; }
  .pcm-item.active .chev { color: #1D63F0; }
  .pcm-item.pcm-primary { background: #1D63F0; color: #fff; font-weight: 700; }
  .pcm-item.pcm-primary:hover { background: #1554D6; }
  .pcm-item.pcm-primary .ic, .pcm-item.pcm-primary .chev { color: #fff; }
  .pcm-item.pcm-soft { background: #E4EDFC; }
  .pcm-item.pcm-soft:hover { background: #D6E4FB; }
  .pcm-sep { border: 0; border-top: 1px solid #E7ECF3; margin: 12px 4px; }
  /* Icones du menu dans des tuiles colorees */
  .pcm-item .ic { box-sizing: border-box; width: 38px; height: 38px; padding: 8px; border-radius: 12px; background: #EAF1FE; color: #1D63F0; transition: transform .2s ease; }
  .pcm-item .ic.t-violet { background: #F1EBFF; color: #7C3AED; }
  .pcm-item .ic.t-amber { background: #FFF4DB; color: #D97706; }
  .pcm-item .ic.t-rose { background: #FFE9EE; color: #E11D48; }
  .pcm-item .ic.t-green { background: #E5F7EC; color: #16A34A; }
  .pcm-item .ic.t-white { background: rgba(255,255,255,.2); color: #fff; }
  .pcm-item .ic.ic-tech { padding: 5px; background: #fff; box-shadow: 0 2px 6px rgba(29,99,240,.18); }
  .pcm-item.active .ic { background: #fff; }
  .pcm-item:hover .ic { transform: scale(1.08) rotate(-4deg); }
  .pcm-item:hover .chev { transform: translateX(3px); }
  .pcm-item .chev { transition: transform .2s ease; }
  .pcm-item { min-height: 54px; padding: 0 12px; }
  .pcm-legal { display: flex; justify-content: center; gap: 28px; margin: 16px 0 12px; font-size: 12.5px; }
  .pcm-legal a { color: #64748B; text-decoration: none; }
  .pcm-legal a:hover { color: #1D63F0; }
  .pcm-foot { text-align: center; font-size: 12.5px; line-height: 1.7; color: #64748B; margin: 0; }
  .pcm-foot svg { vertical-align: -2px; }
  .pcm-toast { display: block; position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 200; background: #0B1B45; color: #fff; font-size: 13.5px; padding: 10px 18px; border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity .2s; }
  .pcm-toast.show { opacity: 1; }
}

/* ---------------------------------------------------------------------------
   Mise en page commune (base.html) : messages flash, barre de titre, pied de
   page. Ces classes n'etaient plus definies depuis la suppression de l'ancien
   app.css : les messages ("Identifiants incorrects", "Paiement enregistre"...)
   s'affichaient en texte brut colle en haut de l'ecran.
   --------------------------------------------------------------------------- */
/* Bandeau flottant : position fixe par-dessus la page, jamais dans le flux (le contenu ne descend pas). */
.flash-list { position: fixed; z-index: 130; left: 50%; top: calc(12px + env(safe-area-inset-top)); transform: translateX(-50%);
  width: min(560px, calc(100% - 24px)); display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.flash { display: flex; align-items: center; gap: 10px; padding: 12px 8px 12px 14px; border-radius: 12px; font-size: 14px; font-weight: 600;
  background: #EEF4FF; color: #1146B8; border: 1px solid #C7D7FE; box-shadow: 0 12px 30px rgba(11,27,59,.16);
  pointer-events: auto; animation: flashIn .25s ease-out; transition: opacity .25s, transform .25s; }
.flash-tx { flex: 1; min-width: 0; }
.flash-x { flex: none; width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: inherit; opacity: .6;
  display: flex; align-items: center; justify-content: center; cursor: pointer; }
.flash-out { opacity: 0; transform: translateY(-8px); }
@keyframes flashIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .flash { animation: none; transition: none; } }
.flash.success { background: #ECFDF3; color: #15803D; border-color: #ABEFC6; }
.flash.error { background: #FEF3F2; color: #B42318; border-color: #FECDCA; }
.flash.warning { background: #FFFAEB; color: #B54708; border-color: #FEDF89; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; }
.topbar-title { margin: 0; font-family: var(--f-display); font-size: 22px; color: var(--f-text); }
.topbar .btn-primary { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px;
  background: var(--f-primary); color: var(--f-white); font-size: 14px; font-weight: 600; text-decoration: none; }
.topbar .btn-primary svg { width: 18px; height: 18px; }
.site-footer { padding: 18px 16px 96px; text-align: center; font-size: 12px; color: var(--f-text-2); }

/* ---------------------------------------------------------------------------
   Favoris : coeur actif (rouge plein) sur tous les boutons data-fav, et
   message de confirmation (static/js/favoris.js).
   --------------------------------------------------------------------------- */
[data-fav] { cursor: pointer; }
[data-fav].is-fav svg, [data-fav].is-fav svg path { fill: #EF4444 !important; stroke: #EF4444 !important; }
.fav-toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 9999;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  background: #0F172A; color: #fff; padding: 10px 16px; border-radius: 999px; font: 600 14px/1.3 Inter, Arial, sans-serif;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .25); white-space: nowrap; }
.fav-toast.show { opacity: 1; transform: translate(-50%, 0); }

