/* ============================================================
   WOUGGO V2 — Composants UI — components.css
   Importer après variables.css
   ============================================================ */

/* ══════════════════════════════════════════════════════════
   BOUTONS
   ══════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  font-size: var(--text-caption);
  font-weight: var(--font-semibold);
  font-family: var(--font-main);
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-white);
}
.btn-primary:hover {
  background: var(--color-accent-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--color-accent);
  border: 1.5px solid var(--color-accent);
}
.btn-secondary:hover {
  background: var(--color-accent-light);
}

.btn-dark {
  background: var(--color-dark);
  color: var(--color-white);
}
.btn-dark:hover {
  background: var(--color-mid);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
}
.btn-ghost:hover {
  background: var(--color-light);
  color: var(--color-text-primary);
}

.btn-whatsapp {
  background: var(--color-whatsapp);
  color: var(--color-white);
}
.btn-whatsapp:hover {
  background: var(--color-whatsapp-dark);
  transform: translateY(-1px);
}

.btn-itineraire {
  background: var(--color-dark);
  color: var(--color-white);
}

.btn-sm {
  min-height: 36px;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-micro);
}

.btn-lg {
  min-height: 52px;
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-body);
}

.btn-full {
  width: 100%;
}

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

/* ══════════════════════════════════════════════════════════
   BADGES
   ══════════════════════════════════════════════════════════ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: var(--text-micro);
  font-weight: var(--font-semibold);
  white-space: nowrap;
}

.badge-ouvert {
  background: var(--color-success);
  color: var(--color-white);
}

.badge-ferme {
  background: var(--color-error);
  color: var(--color-white);
}

.badge-top-ia {
  background: var(--color-accent);
  color: var(--color-white);
}

.badge-verifie {
  background: var(--color-verifie);
  color: var(--color-white);
}

.badge-business {
  background: var(--color-business);
  color: var(--color-white);
}

.badge-flash {
  background: var(--color-accent);
  color: var(--color-white);
  animation: pulse-flash 1.5s infinite;
}

@keyframes pulse-flash {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.7; }
}

.badge-gratuit {
  background: var(--color-success);
  color: var(--color-white);
}

.badge-sponsorise {
  background: var(--color-mid);
  color: var(--color-white);
  font-size: var(--text-micro);
}

.badge-categorie {
  background: rgba(0,0,0,0.6);
  color: var(--color-white);
  backdrop-filter: blur(4px);
}

/* ══════════════════════════════════════════════════════════
   CARTES LIEUX — Design Wouggo V2
   ══════════════════════════════════════════════════════════ */

.card-lieu {
  background: transparent;       /* Pas de fond blanc — la carte vit sur le fond crème */
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  position: relative;            /* Pour positionner le bouton favori hors de la photo */
}

/* ── Bouton favori — même style que le bouton partage ────── */
.card-lieu__favori {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  backdrop-filter: blur(6px);
  transition: transform var(--transition-fast), background var(--transition-fast);
  z-index: 10;
}
.card-lieu__favori:hover { transform: scale(1.1); background: rgba(255,255,255,0.28); }
.card-lieu__favori svg {
  width: 17px; height: 17px;
  stroke: #fff; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.card-lieu__favori.active svg { stroke: #fff; fill: rgba(255,255,255,0.8); }

/* ── Zone photo — carrée, 4 coins arrondis ──────────────── */
.card-lieu__photo {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;    /* CARRÉ obligatoire */
  overflow: hidden;
  background: var(--color-raised);
  border-radius: var(--wg-r-xl);
  flex-shrink: 0;
}

.card-lieu__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-slow);
}
.card-lieu:hover .card-lieu__photo img { transform: scale(1.03); }

/* Placeholder sans photo */
.card-lieu__photo-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  background: var(--color-raised);
}

/* Badges haut gauche (catégorie + ouvert) — SUR la photo */
.card-lieu__photo-badges {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}

/* Badge catégorie — fond gris semi-transparent foncé */
.badge-categorie {
  background: rgba(40, 38, 35, 0.72);
  color: #fff;
  font-size: var(--text-caption);
  font-weight: 600;
  padding: 5px 11px;
  border-radius: var(--wg-r-xl);
  backdrop-filter: blur(6px);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

/* Badge ouvert — vert plein */
.badge-ouvert {
  background: var(--color-verifie);
  color: #fff;
  font-size: var(--text-caption);
  font-weight: 600;
  padding: 5px 11px;
  border-radius: var(--wg-r-xl);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  width: fit-content;
}

/* Badge fermé */
.badge-ferme {
  background: #EF4444;
  color: #fff;
  font-size: var(--text-caption);
  font-weight: 600;
  padding: 5px 11px;
  border-radius: var(--wg-r-xl);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  width: fit-content;
}

/* Barre bas photo : note gauche, partage droite */
.card-lieu__photo-bottom {
  position: absolute;
  bottom: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
}

/* Note — texte blanc simple avec étoile jaune */
.card-lieu__note-txt {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: var(--text-caption);
  font-weight: 700;
  padding: 5px 10px;
  border-radius: var(--wg-r-xl);
}
.card-lieu__note-txt svg {
  width: 14px; height: 14px;
  fill: #F59E0B; stroke: none;
}

/* Bouton partage bas droite photo */
.card-lieu__share-btn {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  cursor: pointer;
  border: none;
  transition: transform var(--transition-fast), background var(--transition-fast);
}
.card-lieu__share-btn:hover { transform: scale(1.1); background: rgba(255,255,255,0.28); }
.card-lieu__share-btn svg {
  width: 17px; height: 17px;
  stroke: #fff; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* ── Corps de la carte — fond transparent (crème du parent) ─ */
.card-lieu__body {
  padding: 14px 4px 16px;
  display: flex;
  flex-direction: column;
  height: 190px;
  overflow: hidden;
}

/* Nom + badge vérifié — badge collé après le nom */
.card-lieu__nom-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.card-lieu__nom {
  font-size: var(--text-body);
  font-weight: 800;
  color: var(--color-txt);
  line-height: 1.2;
  /* Pas de flex:1 — le badge doit coller juste après le nom */
}

/* Badge vérifié ✓ cercle vert — taille réduite */
.card-lieu__badge-verifie {
  width: 18px;
  height: 18px;
  background: var(--color-verifie);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.card-lieu__badge-verifie svg {
  width: 10px; height: 10px;
  stroke: #fff; fill: none;
  stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
}

/* Badge business ⭐ */
.card-lieu__badge-business {
  font-size: var(--text-label);
  line-height: 1;
  flex-shrink: 0;
}

/* Ligne prix pill + quartier */
.card-lieu__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

/* Prix — pill orange clair */
.card-lieu__prix-pill {
  background: var(--color-accent-light);
  color: var(--color-accent-dark);
  font-size: var(--text-caption);
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--wg-r-xl);
  white-space: nowrap;
}

/* Quartier — texte gris simple */
.card-lieu__quartier {
  font-size: var(--text-caption);
  color: var(--color-sub);
  font-weight: 400;
}

/* Description */
.card-lieu__description {
  font-size: var(--text-caption);
  color: var(--color-txt);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}

/* ── Barre actions — 3 éléments à hauteur identique ────────── */
.card-lieu__actions {
  display: flex;
  align-items: stretch;
  gap: 8px;
  height: 40px;
  margin-top: auto;     /* colle toujours en bas */
  flex-shrink: 0;
}

/* Bouton Découvrir — orange Wouggo */
.card-lieu__btn-decouvrir {
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: var(--wg-r-pill);
  padding: 0 18px;
  font-size: var(--text-caption);
  font-weight: 700;
  font-family: var(--font-main);
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
  white-space: nowrap;
  flex-shrink: 0;
  height: 40px;
  display: flex;
  align-items: center;
}
.card-lieu__btn-decouvrir:hover { background: var(--color-accent-dark); transform: translateY(-1px); }

/* Pill nb avis + étoiles — s'adapte au contenu */
.card-lieu__avis-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(83,40,34,.10);
  border-radius: var(--wg-r-pill);
  padding: 0 10px;
  width: fit-content;    /* s'adapte au contenu */
  flex-shrink: 1;
  min-width: 0;
  height: 40px;
  overflow: hidden;
}
.card-lieu__nb-avis {
  font-size: var(--text-caption);
  font-weight: 700;
  color: var(--color-txt);
  flex-shrink: 0;
}
.card-lieu__stars-wrap {
  display: flex;
  gap: 2px;
  align-items: center;
  flex-shrink: 0;
}
.card-lieu__star {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.1s;
}
.card-lieu__star:hover { transform: scale(1.2); }
.card-lieu__star path { fill: rgba(58, 39, 26, 0.25); }
.card-lieu__star.filled path { fill: var(--color-accent-dark); }

/* Bouton parcours — coin bas-droit absolu de la carte */
.card-lieu__btn-parcours {
  position: absolute;
  bottom: 200px;        /* juste au-dessus des actions (190px corps + 10px) */
  right: 0px;
  width: 36px;
  height: 36px;
  background: rgba(83,40,34,.10);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  z-index: 5;
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}
.card-lieu__btn-parcours:hover { background: rgba(83,40,34,.18); transform: scale(1.08); }
.card-lieu__btn-parcours svg { display: block; }

/* État actif */
.card-lieu__btn-parcours.active { background: var(--color-accent); }
.card-lieu__btn-parcours.active:hover { background: var(--color-accent-dark); }
.card-lieu__btn-parcours.active svg { stroke: #fff; }

/* Flash bannière */
.card-lieu__flash {
  background: #FFF0E8;
  border-left: 3px solid var(--color-accent);
  padding: 6px 10px;
  font-size: var(--text-caption);
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 10px;
  border-radius: 0 8px 8px 0;
}

/* Tags ambiance */
.card-lieu__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}
.card-lieu__tag {
  padding: 3px 9px;
  background: var(--color-raised);
  border-radius: var(--wg-r-xl);
  font-size: var(--text-micro);
  color: var(--color-sub);
}

/* ══════════════════════════════════════════════════════════
   CARTES ÉVÉNEMENTS
   ══════════════════════════════════════════════════════════ */

.card-event {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform var(--transition-base);
}

.card-event:hover {
  transform: translateY(-2px);
}

.card-event__affiche {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--color-dark);
}

.card-event__affiche img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}

.card-event__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-3);
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: var(--color-white);
}

.card-event__date {
  font-size: var(--text-caption);
  font-weight: var(--font-semibold);
  opacity: 0.9;
}

.card-event__body {
  padding: var(--space-4);
}

.card-event__titre {
  font-size: var(--text-body);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-1);
}

.card-event__meta {
  font-size: var(--text-caption);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
}

.card-event__prix {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: var(--font-semibold);
  color: var(--color-accent);
}

.card-event__interesses {
  font-size: var(--text-micro);
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

/* ══════════════════════════════════════════════════════════
   CARTES BONS PLANS
   ══════════════════════════════════════════════════════════ */

.card-bon-plan {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.card-bon-plan__image {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
}

.card-bon-plan__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-bon-plan__reduction {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  background: var(--color-accent);
  color: var(--color-white);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-h2);
  font-weight: var(--font-bold);
}

.card-bon-plan__body {
  padding: var(--space-4);
}

.card-bon-plan__duree {
  font-size: var(--text-micro);
  color: var(--color-error);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-1);
}

/* ══════════════════════════════════════════════════════════
   CARTE SPONSORISÉE (Partenaire)
   ══════════════════════════════════════════════════════════ */

.card-sponsorise {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  border: 1.5px solid var(--color-border);
  position: relative;
}

.card-sponsorise__label {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 1;
}

/* ══════════════════════════════════════════════════════════
   CHAT IA
   ══════════════════════════════════════════════════════════ */

.chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--color-white);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.chat-bubble {
  max-width: 85%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-body);
  line-height: var(--leading-relaxed);
}

.chat-bubble--user {
  background: var(--color-accent);
  color: var(--color-white);
  align-self: flex-end;
  border-bottom-right-radius: var(--space-1);
}

.chat-bubble--ia {
  background: var(--color-light);
  color: var(--color-text-primary);
  align-self: flex-start;
  border-bottom-left-radius: var(--space-1);
}

.chat-bubble--ia strong {
  color: var(--color-accent);
}

.chat-typing {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  background: var(--color-light);
  border-radius: var(--radius-md);
  align-self: flex-start;
  width: fit-content;
}

.chat-typing span {
  width: 8px;
  height: 8px;
  background: var(--color-text-muted);
  border-radius: var(--radius-full);
  animation: typing-dot 1.2s infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-dot {
  0%, 60%, 100% { transform: translateY(0); }
  30%           { transform: translateY(-6px); }
}

.chat-input-bar {
  padding: var(--space-3) var(--space-4);
  padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom));
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
  display: flex;
  gap: var(--space-2);
  align-items: flex-end;
}

.chat-input {
  flex: 1;
  min-height: 44px;
  max-height: 120px;
  padding: var(--space-3) var(--space-4);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  font-size: var(--text-body);
  font-family: var(--font-main);
  resize: none;
  outline: none;
  transition: border-color var(--transition-fast);
  background: var(--color-light);
}

.chat-input:focus {
  border-color: var(--color-accent);
  background: var(--color-white);
}

.chat-send-btn {
  width: 44px;
  height: 44px;
  background: var(--color-accent);
  color: var(--color-white);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition-fast);
  font-size: var(--text-h2);
}
.chat-send-btn:hover { background: var(--color-accent-dark); }
.chat-send-btn:disabled { background: var(--color-border); }

.chat-suggestions {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  overflow-x: auto;
  scrollbar-width: none;
}
.chat-suggestions::-webkit-scrollbar { display: none; }

.chat-suggestion {
  flex-shrink: 0;
  padding: var(--space-2) var(--space-3);
  background: var(--color-accent-light);
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-full);
  font-size: var(--text-caption);
  font-weight: var(--font-medium);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}
.chat-suggestion:hover {
  background: var(--color-accent);
  color: var(--color-white);
}

/* ══════════════════════════════════════════════════════════
   NAVIGATION
   ══════════════════════════════════════════════════════════ */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: var(--z-sticky);
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 44px;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
  cursor: pointer;
  text-decoration: none;
}

.bottom-nav__item.active {
  color: var(--color-accent);
}

.bottom-nav__icon {
  font-size: var(--text-h1);
  line-height: 1;
}

.bottom-nav__label {
  font-size: var(--text-micro);
  font-weight: var(--font-medium);
}

.bottom-nav__badge {
  position: absolute;
  top: -2px;
  right: -4px;
  background: var(--color-error);
  color: var(--color-white);
  font-size: var(--text-micro);
  font-weight: var(--font-bold);
  min-width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

/* ══════════════════════════════════════════════════════════
   LOCATION PILL
   ══════════════════════════════════════════════════════════ */

.location-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  background: var(--color-white);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--text-caption);
  font-weight: var(--font-semibold);
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--color-text-primary);
}

.location-pill:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* ══════════════════════════════════════════════════════════
   FILTRES RAPIDES
   ══════════════════════════════════════════════════════════ */

.filter-bar {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  scrollbar-width: none;
  padding: var(--space-3) var(--space-4);
}
.filter-bar::-webkit-scrollbar { display: none; }

.filter-pill {
  flex-shrink: 0;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-caption);
  font-weight: var(--font-medium);
  border: 1.5px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.filter-pill:hover,
.filter-pill.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-white);
}

/* ══════════════════════════════════════════════════════════
   SKELETON LOADER
   ══════════════════════════════════════════════════════════ */

.skeleton {
  background: linear-gradient(90deg,
    var(--color-border) 25%,
    var(--color-light) 50%,
    var(--color-border) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.skeleton-img {
  width: 100%;
  aspect-ratio: 16/9;
}

.skeleton-line {
  height: 14px;
  margin: var(--space-2) var(--space-4);
}

.skeleton-line--short { width: 60%; }
.skeleton-line--medium { width: 80%; }
.skeleton-line--full { width: calc(100% - 2rem); }

/* ══════════════════════════════════════════════════════════
   TOAST
   ══════════════════════════════════════════════════════════ */

.toast-container {
  position: fixed;
  top: calc(var(--header-height) + var(--space-4));
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  pointer-events: none;
}

.toast {
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  font-size: var(--text-caption);
  font-weight: var(--font-medium);
  color: var(--color-white);
  box-shadow: var(--shadow-lg);
  animation: toast-in var(--transition-base) ease;
  white-space: nowrap;
}

.toast--success { background: var(--color-success); }
.toast--error   { background: var(--color-error); }
.toast--info    { background: var(--color-info); }
.toast--warning { background: var(--color-warning); }

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

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

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  backdrop-filter: blur(4px);
}

.modal-content {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-5);
}

.modal-title {
  font-size: var(--text-h1);
  font-weight: var(--font-bold);
}

.modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--color-text-secondary);
  font-size: var(--text-h3);
  cursor: pointer;
  transition: background var(--transition-fast);
}
.modal-close:hover { background: var(--color-light); }

/* ══════════════════════════════════════════════════════════
   BOTTOM SHEET
   ══════════════════════════════════════════════════════════ */

.bottom-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: var(--z-modal);
  display: flex;
  align-items: flex-end;
}

.bottom-sheet {
  background: var(--color-white);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: var(--space-2) var(--space-4) var(--space-6);
  padding-bottom: calc(var(--space-6) + env(safe-area-inset-bottom));
  animation: sheet-up var(--transition-base) ease;
}

.bottom-sheet__handle {
  width: 40px;
  height: 4px;
  background: var(--color-border);
  border-radius: var(--radius-full);
  margin: var(--space-3) auto var(--space-4);
}

@keyframes sheet-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

/* ══════════════════════════════════════════════════════════
   AVATAR
   ══════════════════════════════════════════════════════════ */

.avatar {
  border-radius: var(--radius-full);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-weight: var(--font-bold);
}

.avatar--sm  { width: 32px; height: 32px; font-size: var(--text-caption); }
.avatar--md  { width: 44px; height: 44px; font-size: var(--text-body); }
.avatar--lg  { width: 64px; height: 64px; font-size: var(--text-h1); }
.avatar--xl  { width: 96px; height: 96px; font-size: var(--text-3xl); }

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ══════════════════════════════════════════════════════════
   INPUTS & FORMULAIRES
   ══════════════════════════════════════════════════════════ */

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.form-label {
  font-size: var(--text-caption);
  font-weight: var(--font-semibold);
  color: var(--color-text-primary);
}

.form-label .required {
  color: var(--color-error);
  margin-left: 2px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  min-height: 44px;
  padding: var(--space-3) var(--space-4);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--text-body);
  font-family: var(--font-main);
  color: var(--color-text-primary);
  background: var(--color-white);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-focus);
}

.form-input.error,
.form-select.error,
.form-textarea.error {
  border-color: var(--color-error);
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

.form-hint {
  font-size: var(--text-micro);
  color: var(--color-text-muted);
}

.form-error {
  font-size: var(--text-micro);
  color: var(--color-error);
}

/* ══════════════════════════════════════════════════════════
   GRILLE DE RÉSULTATS
   ══════════════════════════════════════════════════════════ */

.results-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-4);
  padding: var(--space-4);
}

@media (max-width: 1024px) {
  .results-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  .results-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .results-grid { grid-template-columns: 1fr; max-width: 340px; margin: 0 auto; }
}

/* ══════════════════════════════════════════════════════════
   SECTION TITRE
   ══════════════════════════════════════════════════════════ */

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4) var(--space-4) var(--space-2);
}

.section-title {
  font-size: var(--text-h2);
  font-weight: var(--font-bold);
  color: var(--color-text-primary);
}

.section-link {
  font-size: var(--text-caption);
  color: var(--color-accent);
  font-weight: var(--font-medium);
}

/* ══════════════════════════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════════════════════════ */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-16) var(--space-8);
  text-align: center;
  gap: var(--space-4);
}

.empty-state__icon {
  font-size: 3rem;
  opacity: 0.4;
}

.empty-state__title {
  font-size: var(--text-h2);
  font-weight: var(--font-bold);
  color: var(--color-text-primary);
}

.empty-state__text {
  font-size: var(--text-caption);
  color: var(--color-text-secondary);
  max-width: 280px;
}

/* ══════════════════════════════════════════════════════════
   FAB (Floating Action Button)
   ══════════════════════════════════════════════════════════ */

.fab {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + var(--space-4));
  right: var(--space-4);
  width: 56px;
  height: 56px;
  background: var(--color-accent);
  color: var(--color-white);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-h1);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-sticky);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  cursor: pointer;
}

.fab:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}

/* ══════════════════════════════════════════════════════════
   UTILITIES
   ══════════════════════════════════════════════════════════ */

.hidden { display: none !important; }
.flex   { display: flex; }
.grid   { display: grid; }

.items-center  { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }

.text-center { text-align: center; }
.text-accent { color: var(--color-accent); }
.text-muted  { color: var(--color-text-muted); }
.font-bold   { font-weight: var(--font-bold); }

.w-full  { width: 100%; }
.h-full  { height: 100%; }

.p-4  { padding: var(--space-4); }
.mt-4 { margin-top: var(--space-4); }
.mb-4 { margin-bottom: var(--space-4); }

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.no-scroll { overflow: hidden; }
