/* Warada — feuille de styles (identité reprise du cadrage produit) */

:root {
  /* --- Couleurs de marque, reprises du logo ------------------------------
     Rouge #700C0C et orange #FF914D sont exactement ceux du logo Warada.
     Rouge = identité et actions ; orange = accents et focus clavier.     */
  --marque: #700c0c;
  --marque-vif: #8c1a17;
  --marque-sombre: #4d0707;
  --accent: #ff914d;
  --accent-doux: #ffeadb;
  --accent-ink: #8a3d0c;

  /* --- Neutres chauds, accordés à la photo de Bangui -------------------- */
  --ink: #1c1512;
  --ink-2: #3b2f29;
  --ink-soft: #6d625b;
  --paper: #f7f4f1;
  --surface: #ffffff;
  --line: #e7ded7;
  --sombre: #1e1512;

  /* --- Couleurs de sens -------------------------------------------------- */
  --vente: #700c0c;
  --location: #1f6a5a;
  --location-doux: #e2efe9;
  --danger: #a3231b;

  --font-ui: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-lecture: 'Source Serif 4', Georgia, serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  /* --- Échelle unique de rayons ------------------------------------------ */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-pill: 100px;
  --radius: var(--r-lg);
  --h-entete: 58px;
  /* Photo d'accueil : Bangui, centre-ville (rond-point PK0, l'Oubangui au fond)
     — Alllexxxis, CC BY-SA 4.0. Hébergée avec le site : aucune dépendance externe.
     Pour la remplacer : déposer une autre image dans img/ et changer ce chemin. */
  --photo-hero: url('../img/bangui-centre.jpg');
  /* Ombres teintées du même brun que le texte : elles se fondent dans la page
     au lieu de la grisailler. */
  --ombre-sm: 0 1px 2px rgba(28,21,18,.06), 0 1px 1px rgba(28,21,18,.04);
  --ombre-md: 0 6px 16px -6px rgba(28,21,18,.16), 0 2px 6px -2px rgba(28,21,18,.08);
  --ombre-lg: 0 20px 45px -18px rgba(28,21,18,.30);
}

/* Focus clavier visible et homogène sur tout ce qui est actionnable.
   Rouge sur fond clair (contraste 11:1), orange sur fond sombre (7:1) :
   l'orange seul sur blanc ne dépasse pas 2,3:1 et serait sous le seuil. */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--marque);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}
.entete--sur-hero :focus-visible,
.pied-de-page :focus-visible,
.hero :focus-visible {
  outline-color: var(--accent);
}
::selection { background: var(--accent-doux); color: var(--ink); }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Pas de rectangle gris au toucher sur mobile : les états de survol suffisent. */
  -webkit-tap-highlight-color: transparent;
}
/* Les titres coupent leurs lignes de façon équilibrée plutôt que de laisser
   un mot orphelin en fin de titre. */
h1, h2, .titre-page, .hero__contenu h1, .fiche-titre { text-wrap: balance; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
img { max-width: 100%; display: block; }

#app-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  position: relative;
  padding-bottom: 78px;
}

/* ---- entête ---- */
.entete {
  flex: none;
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--h-entete);
  padding: 0 20px;
  background: var(--surface);
  box-shadow: var(--ombre-sm);
  transition: background .25s ease, box-shadow .25s ease;
}
.logo {
  display: flex; align-items: center; flex: none;
  font-weight: 800; font-size: 21px; letter-spacing: -0.015em; color: var(--ink);
  transition: color .25s ease;
}
.logo__point { color: var(--accent); }
.logo__img { height: 42px; width: auto; display: block; }
.logo__img--clair { display: none; }
.entete--sur-hero .logo__img--sombre { display: none; }
.entete--sur-hero .logo__img--clair { display: block; }
.nav-principale { display: none; }
.entete__actions { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.zone-compte { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.zone-compte__nom { font-weight: 700; }
.btn-entete { display: none; }

/* Entête transparente tant qu'on est en haut d'une page avec photo de héro. */
.entete--sur-hero { background: transparent; box-shadow: none; }
.entete--sur-hero .logo,
.entete--sur-hero .zone-compte__nom,
.entete--sur-hero .nav-principale a,
.entete--sur-hero .btn-texte { color: #fff; }
.entete--sur-hero .logo__point { color: var(--accent); }

/* ---- navigation basse ---- */
.nav-bas {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 480px;
  height: 72px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.nav-item { font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.nav-item--principal {
  width: 50px; height: 50px; border-radius: var(--r-pill);
  background: var(--marque);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 700; margin-top: -26px;
  box-shadow: 0 10px 20px -6px rgba(112,12,12,.45);
}

/* ---- écran de chargement / erreur initiale ---- */
.chargement-initial { padding: 60px 24px; text-align: center; }
.chargement-initial p { margin: 0 0 10px; }
.chargement-aide { font-size: 12.5px; color: var(--ink-soft); line-height: 1.6; }
.chargement-aide code { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 1px 6px; font-family: var(--font-mono); font-size: 11.5px; }

/* ---- écran générique ---- */
.ecran { padding: 16px 20px 24px; flex: 1; }
.hero + .ecran { padding-top: 0; }
.titre-page { font-size: 20px; font-weight: 800; margin: 8px 0 4px; }
.sous-titre { color: var(--ink-soft); font-size: 13.5px; margin: 0 0 16px; }
.etat-vide { color: var(--ink-soft); font-size: 14px; padding: 40px 8px; text-align: center; }

/* ---- bandeau héro (accueil) : photo de Bangui + voile sombre ---- */
.hero {
  position: relative;
  overflow: hidden;
  /* remonte sous l'entête, qui est transparente en haut de page */
  margin-top: calc(-1 * var(--h-entete));
  padding: calc(var(--h-entete) + 46px) 20px 84px;
  background: var(--sombre);
  color: #fff;
  text-align: center;
}
.hero__media {
  position: absolute; inset: 0;
  background-image: var(--photo-hero);
  background-size: cover;
  background-position: center 45%;
}
.hero__voile {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(22,14,11,.62) 0%, rgba(22,14,11,.32) 34%, rgba(22,14,11,.46) 62%, rgba(30,21,18,.86) 100%);
}
.hero__contenu { position: relative; z-index: 1; max-width: 460px; margin: 0 auto; }
.hero__surtitre {
  display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 12px;
}
.hero__contenu h1 {
  font-family: var(--font-lecture);
  font-size: 26px; line-height: 1.18; font-weight: 600; margin: 0 0 12px;
  letter-spacing: -0.01em; text-shadow: 0 2px 20px rgba(0,0,0,.4);
}
.hero__contenu p { font-size: 14px; color: rgba(255,255,255,.85); margin: 0; text-shadow: 0 1px 12px rgba(0,0,0,.4); }

/* ---- carte de recherche flottante ---- */
.carte-recherche {
  position: relative;
  z-index: 2;
  margin: -48px 0 20px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--ombre-lg);
  padding: 18px 18px 14px;
}

/* ---- recherche / accueil ---- */
.barre-recherche {
  margin-bottom: 12px;
  position: relative;
  display: flex;
  align-items: center;
}
.barre-recherche svg { position: absolute; left: 14px; pointer-events: none; }
.barre-recherche input {
  width: 100%; padding: 12px 16px 12px 40px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--paper);
  font-size: 14.5px;
}
.barre-recherche input::placeholder { color: var(--ink-soft); }
.barre-recherche input:focus-visible { outline: 2px solid var(--marque); outline-offset: 2px; border-color: transparent; background: var(--surface); }

.toggle-transaction { display: flex; gap: 8px; margin-bottom: 12px; }
.pill {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft);
  font-weight: 600; font-size: 13.5px; border-radius: var(--r-pill); padding: 9px 20px;
  cursor: pointer;
  transition: all .15s ease;
}
.pill--active { background: var(--marque); color: #fff; border-color: var(--marque); font-weight: 700; }

/* Les filtres passent à la ligne plutôt que de défiler : sur téléphone, un
   défilement horizontal sans indice visuel cache le dernier bouton. */
.filtres { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
/* Listes déroulantes dessinées plutôt que laissées à l'apparence du système :
   même chevron, même hauteur et même graisse partout. */
select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%236d625b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}
.filtres select {
  flex: none; border: 1px solid var(--line); background-color: var(--surface);
  border-radius: var(--r-pill); padding: 9px 32px 9px 14px; font-size: 12.5px; font-weight: 600;
  transition: border-color .15s ease, background-color .15s ease;
}
.filtres select:hover { border-color: var(--ink-soft); }

.liste-annonces { display: flex; flex-direction: column; gap: 14px; }
.carte-annonce {
  display: block; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--ombre-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.carte-annonce:hover { transform: translateY(-3px); box-shadow: var(--ombre-md); }
.carte-annonce__photo {
  height: 140px; background: linear-gradient(135deg, #ece4dd, #f7f4f1);
  position: relative; display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.carte-annonce__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.carte-annonce:hover .carte-annonce__photo img { transform: scale(1.06); }
.carte-annonce__sans-photo { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.carte-annonce__info { padding: 13px 15px; display: flex; flex-direction: column; gap: 3px; }
.carte-annonce__info .prix { font-family: var(--font-mono); font-size: 16.5px; font-weight: 600; }
.carte-annonce__info .titre { font-size: 14px; font-weight: 600; }
.carte-annonce__info .meta { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-soft); }
.carte-annonce__caracteristiques { display: flex; gap: 12px; margin-top: 4px; }
.carte-annonce__caracteristiques span { display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--ink-soft); font-weight: 600; }
.carte-annonce__caracteristiques svg { flex: none; }

.tag {
  position: absolute; top: 10px; left: 10px; color: #fff; font-size: 10.5px;
  font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  padding: 4px 10px; border-radius: var(--r-pill);
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
}
.tag--location { background: var(--location); }
.tag--vente { background: var(--vente); }

/* Squelettes de chargement : la grille apparaît tout de suite, les données la remplissent. */
.carte-squelette { pointer-events: none; animation: pulse-squelette 1.3s ease-in-out infinite; }
.carte-squelette:hover { transform: none; box-shadow: var(--ombre-sm); }
.carte-squelette .carte-annonce__photo { background: #ece4dd; }
.squelette-barre { height: 12px; border-radius: var(--r-sm); background: #ece4dd; margin: 4px 0; width: 85%; }
.squelette-barre--prix { height: 16px; width: 55%; }
.squelette-barre--courte { width: 40%; }
@keyframes pulse-squelette { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .carte-squelette { animation: none; } }

.etat-vide--carte { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 56px 20px; }
.etat-vide--carte p { margin: 0; max-width: 320px; }
.etat-vide--carte p strong { color: var(--ink); font-size: 14.5px; }

/* ---- fiche annonce ---- */
.lien-retour { display: inline-block; margin: 12px 0; font-size: 13.5px; color: var(--ink-soft); font-weight: 600; }
/* Sur mobile le conteneur média s'efface : la galerie suit le flux normal et
   la barre de contact reste fixée en bas de l'écran. */
.fiche-media { display: contents; }
.galerie { position: relative; border-radius: var(--r-lg); overflow: hidden; height: 230px; background: linear-gradient(135deg,#ece4dd,#f7f4f1); }
.galerie img { width: 100%; height: 100%; object-fit: cover; }
.galerie__placeholder { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--ink-soft); font-size: 13px; }
.galerie__tag { position: absolute; top: 14px; left: 14px; }
.galerie__favori {
  position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: var(--r-pill);
  background: rgba(255,255,255,.9); border: none; font-size: 18px; color: var(--vente); cursor: pointer;
}

.fiche-corps { padding: 16px 2px 90px; }
.fiche-prix { font-family: var(--font-mono); font-size: 23px; font-weight: 600; }
.fiche-titre { font-size: 17px; font-weight: 700; margin: 4px 0; }
.fiche-lieu { font-size: 13px; color: var(--ink-soft); margin-bottom: 14px; }

.fiche-faits { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px,1fr)); gap: 10px; margin-bottom: 18px; }
.fait { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 8px; text-align: center; }
.fait b { display: block; font-size: 13px; }
.fait span { font-size: 10.5px; color: var(--ink-soft); }

.fiche-section { margin-bottom: 18px; }
.fiche-section__titre { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); margin-bottom: 6px; }
.fiche-description { font-family: var(--font-lecture); font-size: 14.5px; line-height: 1.6; margin: 0; }

.carte-vendeur { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 13px 15px; }
.carte-vendeur__avatar {
  width: 42px; height: 42px; border-radius: var(--r-pill); flex: none;
  background: var(--marque); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700; text-transform: uppercase;
}
.carte-vendeur__nom { display: flex; align-items: center; gap: 5px; font-weight: 700; font-size: 13.5px; }
.carte-vendeur__role { font-size: 11.5px; color: var(--ink-soft); }
.carte-vendeur__tel {
  font-size: 13px; font-weight: 600; color: var(--ink-2); margin-top: 3px;
  font-variant-numeric: tabular-nums; letter-spacing: .01em;
}

.barre-contact {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 72px;
  width: 100%; max-width: 480px; display: flex; gap: 10px; padding: 12px 20px;
  background: var(--surface); border-top: 1px solid var(--line);
}
.btn {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 13px; border-radius: var(--r-md); font-weight: 700; font-size: 14px;
  border: none; cursor: pointer; text-align: center;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, filter .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--outline { border: 1.5px solid var(--ink); background: transparent; color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: #fff; }
.btn--whatsapp { background: #25D366; color: #fff; }
.btn--whatsapp:hover { filter: brightness(1.06); }
.btn--accent { background: var(--marque); color: #fff; }
.btn--accent:hover { background: var(--marque-vif); box-shadow: 0 8px 20px -6px rgba(112,12,12,.4); }
.btn--pleine-largeur { width: 100%; }

/* ---- formulaires (dépôt, auth) ---- */
.formulaire { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.champ { display: flex; flex-direction: column; gap: 7px; }
.champ label { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
.champ input, .champ select, .champ textarea {
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; font-size: 14px;
  background-color: var(--surface); color: var(--ink);
  width: 100%; min-width: 0; /* sans cela les champs nombre refusent de rétrécir sur petit écran */
  transition: border-color .15s ease, box-shadow .15s ease;
}
.champ select { padding-right: 34px; }
.champ input::placeholder, .champ textarea::placeholder { color: #a89c93; }
.champ input:hover, .champ select:hover, .champ textarea:hover { border-color: #cfc3b9; }
/* Sélecteur de photos : le bouton natif affiche le libellé de la langue du
   navigateur (« Choose Files » sur un navigateur anglais). On masque le champ
   et on pilote un libellé français, sans rien perdre côté accessibilité. */
.champ-fichier { position: relative; }
.champ-fichier__input {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
label.champ-fichier__bouton {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  /* on annule le style des étiquettes de champ (petites majuscules espacées) */
  text-transform: none; letter-spacing: normal;
  font-size: 13.5px; font-weight: 700;
  padding: 11px 18px; border-radius: var(--r-md); cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.champ-fichier__bouton::before { content: '+'; font-size: 16px; color: var(--marque); }
.champ-fichier__bouton:hover { border-color: var(--ink-soft); transform: translateY(-1px); }
.champ-fichier__input:focus-visible + .champ-fichier__bouton {
  outline: 2px solid var(--marque); outline-offset: 2px;
}
.champ-fichier__input:disabled + .champ-fichier__bouton {
  opacity: .5; cursor: not-allowed; transform: none;
}
.champ textarea { resize: vertical; font-family: inherit; }
/* Indicatif pays + numéro local. Le select est dimensionné par son contenu
   (flex: none) et le champ numéro occupe le reste ; min-width: 0 évite qu'il
   déborde de son conteneur sur petit écran. */
.champ-telephone { display: flex; gap: 8px; align-items: stretch; }
.champ-telephone select {
  flex: none; width: auto; max-width: 46%;
  padding-left: 12px; padding-right: 30px;
  font-size: 13.5px; font-weight: 600;
}
.champ-telephone input { flex: 1; min-width: 0; }
.champ-ligne { display: flex; gap: 10px; }
.champ-ligne .champ { flex: 1; min-width: 0; }
.note { font-size: 11.5px; color: var(--ink-soft); text-align: center; margin: 0; }
.aide-champ { font-size: 11.5px; color: var(--ink-soft); margin: 0; }
.aide-champ--alerte { color: var(--vente); font-weight: 600; }
.lien-secondaire { text-align: center; font-size: 13.5px; color: var(--ink-soft); margin-top: 18px; }
.lien-secondaire a { color: var(--marque); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.ecran--auth { padding-top: 20px; }

/* ---- tableau de bord / modération ---- */
.entete-tableau { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.liste-tableau { display: flex; flex-direction: column; gap: 10px; }
.ligne-annonce, .ligne-moderation {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px;
  display: flex; align-items: center; gap: 12px;
}
.ligne-annonce__vignette { width: 44px; height: 44px; border-radius: var(--r-sm); background: #ece4dd; flex: none; overflow: hidden; }
.ligne-annonce__vignette img { width: 100%; height: 100%; object-fit: cover; }

/* Photos déjà en ligne, dans l'écran de modification */
.photos-existantes { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 4px; }
.photos-existantes .aide-champ { margin: 0; }
.photo-existante { position: relative; width: 84px; height: 84px; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); background: var(--paper); }
.photo-existante img { width: 100%; height: 100%; object-fit: cover; }
.photo-existante__retirer {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; line-height: 1;
  border: none; border-radius: var(--r-pill); cursor: pointer;
  background: rgba(28,21,18,.8); color: #fff; font-size: 15px; font-weight: 700;
}
.photo-existante__retirer:hover { background: var(--vente); }
.ligne-annonce__info { flex: 1; min-width: 0; }
.ligne-annonce__titre { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ligne-annonce__prix { font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.ligne-annonce__motif { font-size: 11px; color: var(--danger); margin-top: 3px; }
.ligne-annonce__actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }

.statut { font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: var(--r-pill); }
.statut--attente { background: var(--accent-doux); color: var(--accent-ink); }
.statut--publiee { background: var(--location-doux); color: var(--location); }
.statut--refusee { background: #f6e2e0; color: var(--marque); }
.statut--terminee { background: #ece7e2; color: var(--ink-soft); }
.statut--expiree { background: #ece7e2; color: var(--ink-soft); }
.ligne-annonce__echeance { font-size: 11px; color: var(--ink-soft); margin-top: 3px; }
.ligne-annonce__echeance--proche { color: var(--marque); font-weight: 600; }

.btn-texte { background: none; border: none; color: var(--marque); font-weight: 700; font-size: 12px; cursor: pointer; padding: 0; transition: color .25s ease; }
.btn-texte--danger { color: var(--vente); }

/* Bouton d'action de l'entête (visible en format web) */
.btn-entete {
  align-items: center; justify-content: center;
  background: var(--marque); color: #fff;
  font-size: 13.5px; font-weight: 700;
  padding: 10px 18px; border-radius: var(--r-md);
  box-shadow: 0 6px 16px -8px rgba(112,12,12,.7);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-entete:hover { transform: translateY(-1px); background: var(--marque-vif); box-shadow: 0 10px 22px -8px rgba(112,12,12,.8); }

/* Onglets de l'écran d'administration */
.onglets {
  display: flex; gap: 6px; margin: 14px 0 18px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto; /* trois onglets tiennent mal sur un écran étroit */
  scrollbar-width: none;
}
.onglets::-webkit-scrollbar { display: none; }
.onglet { white-space: nowrap; }
.onglet {
  background: none; border: none; cursor: pointer;
  padding: 10px 4px; margin-right: 18px;
  font-size: 13.5px; font-weight: 700; color: var(--ink-soft);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .15s ease, border-color .15s ease;
}
.onglet:hover { color: var(--ink); }
.onglet--actif { color: var(--ink); border-bottom-color: var(--marque); }

/* Liste des comptes */
.barre-recherche--compacte { margin-bottom: 14px; }
.barre-recherche--compacte input { padding-left: 16px; }
.ligne-compte {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.ligne-compte__info { flex: 1; min-width: 160px; }
.ligne-compte__info .ligne-annonce__titre { display: flex; align-items: center; gap: 7px; white-space: normal; }
.ligne-compte__actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ligne-compte__actions select {
  border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--r-sm); padding: 7px 10px; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.ligne-compte__actions select:disabled { opacity: .55; cursor: not-allowed; }
.case-verif { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-soft); font-weight: 600; cursor: pointer; }
.case-verif[hidden] { display: none; }
.badge-role {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 2px 8px; border-radius: var(--r-pill); background: #ece7e2; color: var(--ink-soft);
}
.badge-role--admin { background: var(--accent-doux); color: var(--accent-ink); }

.ligne-moderation { flex-direction: column; align-items: stretch; }
.ligne-moderation__vendeur { font-size: 11.5px; color: var(--ink-soft); margin-top: 2px; }
.ligne-moderation__description { font-family: var(--font-lecture); font-size: 13px; margin: 8px 0 0; }
.ligne-moderation__actions { display: flex; flex-direction: row; justify-content: flex-end; gap: 10px; margin-top: 10px; }
.ligne-moderation__actions .btn { flex: none; padding: 9px 16px; font-size: 13px; }

/* ---- pied de page ---- */
.pied-de-page {
  background: var(--sombre);
  color: rgba(255,255,255,.72);
  padding: 40px 20px 26px;
  margin-top: auto;
}
.pied-de-page__marque .logo { color: #fff; }
.pied-de-page__logo { width: 210px; max-width: 70%; height: auto; }
.pied-de-page__marque p { font-size: 13px; line-height: 1.6; margin: 10px 0 0; max-width: 320px; color: rgba(255,255,255,.6); }
.pied-de-page__colonnes { display: flex; gap: 40px; margin-top: 24px; flex-wrap: wrap; }
.pied-de-page__titre { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: rgba(255,255,255,.42); margin-bottom: 10px; }
.pied-de-page__colonnes a { display: block; font-size: 13.5px; padding: 5px 0; color: rgba(255,255,255,.78); }
.pied-de-page__colonnes a:hover { color: #fff; }
.pied-de-page__bas {
  margin-top: 30px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12);
  font-size: 11.5px; color: rgba(255,255,255,.42);
  display: flex; flex-direction: column; gap: 5px;
}
.pied-de-page__credit a { color: rgba(255,255,255,.55); text-decoration: underline; }
.pied-de-page__credit a:hover { color: rgba(255,255,255,.85); }

/* ---- notifications ---- */
.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 600; opacity: 0; pointer-events: none; transition: all .2s ease;
  max-width: 90%; text-align: center; z-index: 50;
}
.toast--visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast--erreur { background: var(--vente); }
.toast--succes { background: var(--location); }

@media (min-width: 481px) and (max-width: 859.98px) {
  #app-shell { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}

/* Petit écran : dans les listes de gestion, les actions passent sous le titre
   plutôt que de le comprimer en colonne étroite. */
@media (max-width: 560px) {
  .ligne-annonce { flex-wrap: wrap; }
  .ligne-annonce__info { flex: 1 1 60%; }
  .ligne-annonce__titre { white-space: normal; }
  .ligne-annonce__actions {
    flex: 1 1 100%;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 10px 16px;
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
  }
  .ligne-annonce__actions .btn { flex: none; }
}

/* =========================================================
   Format web (tablette large / ordinateur) — à partir de 860px
   la coquille mobile (colonne étroite + nav du bas) devient une
   vraie mise en page web : nav du haut, grille d'annonces, etc.
   ========================================================= */
@media (min-width: 860px) {
  body { background: var(--surface); }

  :root { --h-entete: 74px; }

  #app-shell {
    max-width: 1180px;
    min-height: 0;
    padding-bottom: 0;
    border: none;
    background: var(--paper);
  }

  /* Une seule barre : logo + navigation + compte + bouton d'action. */
  .entete { padding: 0 32px; }
  .logo { font-size: 23px; }
  .logo__img { height: 56px; }
  .pied-de-page__logo { width: 250px; }
  .nav-principale { display: flex; align-items: center; gap: 26px; margin-left: 12px; }
  .nav-principale a {
    font-size: 14px; font-weight: 600; color: var(--ink-soft);
    padding: 4px 0; border-bottom: 2px solid transparent;
    transition: color .2s ease, border-color .2s ease;
  }
  .nav-principale a:hover { color: var(--ink); border-bottom-color: var(--marque); }
  .entete--sur-hero .nav-principale a { color: rgba(255,255,255,.88); }
  .entete--sur-hero .nav-principale a:hover { color: #fff; border-bottom-color: var(--accent); }
  .btn-entete { display: inline-flex; }
  .zone-compte { font-size: 13.5px; }
  .btn-texte { font-size: 13px; }

  /* La barre du bas est une convention mobile : inutile en format web. */
  .nav-bas { display: none; }

  .pied-de-page { padding: 56px 32px 30px; }
  .pied-de-page__colonnes { gap: 64px; }
  .pied-de-page__bas { flex-direction: row; justify-content: space-between; gap: 20px; }

  .ecran {
    max-width: 1116px;
    margin: 0 auto;
    padding: 28px 32px 56px;
  }
  .hero + .ecran { padding-top: 0; }

  /* Bandeau héro et carte de recherche : plus grands, la carte
     devient une barre horizontale qui chevauche le bas du héro. */
  .hero { padding: calc(var(--h-entete) + 92px) 32px 128px; }
  .hero__contenu { max-width: 640px; }
  .hero__surtitre { font-size: 11.5px; margin-bottom: 16px; }
  .hero__contenu h1 { font-size: 46px; }
  .hero__contenu p { font-size: 16px; }

  .carte-recherche {
    max-width: 940px;
    margin: -64px auto 36px;
    padding: 22px 28px;
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
  }
  .carte-recherche .toggle-transaction,
  .carte-recherche .barre-recherche,
  .carte-recherche .filtres { margin-bottom: 0; }
  .carte-recherche .barre-recherche { flex: 1; min-width: 220px; }

  .liste-annonces {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
  }
  .carte-annonce__photo { height: 160px; }

  /* Formulaires et tableaux : largeur de lecture confortable, centrés. */
  .ecran:has(.formulaire) { max-width: 560px; }
  .ecran:has(.liste-tableau) { max-width: 760px; }
  .titre-page { font-size: 24px; }

  /* Fiche annonce : deux colonnes (galerie / informations). */
  .ecran--fiche {
    max-width: 980px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 0 40px;
  }
  .lien-retour { grid-column: 1 / -1; }
  /* La colonne photo + contact suit le défilement : les boutons Appeler et
     WhatsApp restent visibles quelle que soit la longueur de la description. */
  .fiche-media {
    display: block;
    position: sticky;
    top: calc(var(--h-entete) + 16px);
  }
  .galerie { height: 420px; }
  .fiche-corps { padding: 0 0 24px; }
  .barre-contact {
    position: static;
    transform: none;
    max-width: none;
    width: auto;
    margin-top: 12px;
    border-top: none;
    padding: 0;
    background: transparent;
  }
}
