﻿/* ==========================================================================
   ReDrone â€” feuille de style principale
   Marketplace de drones reconditionnÃ©s â€” identitÃ© visuelle originale
   ========================================================================== */

:root {
  /* Palette â€” vert forÃªt / sable / blanc cassÃ© : univers "seconde vie", Ã©co-responsable
     ------------------------------------------------------------------
     Deux familles de couleurs, Ã  ne pas confondre quand on modifie le site :
     â€¢ --color-ink / white / sand / mint sont des couleurs FIXES de la charte.
       Elles servent notamment de texte clair posÃ© sur les aplats vert foncÃ©
       (en-tÃªte, pied de page, banniÃ¨res) : elles ne changent jamais.
     â€¢ --surface, --surface-2, --color-line, --color-text, --color-titre
       sont les couleurs d'INTERFACE : ce sont elles, et elles seules, qui
       basculent en mode sombre (voir le bloc Â« mode sombre Â» plus bas). */
  --color-ink: #17231f;
  --color-forest: #1b4b43;
  --color-forest-light: #2e8b6f;
  --color-mint: #d9efe6;
  --color-sand: #f4f1ea;
  --color-white: #ffffff;
  --color-warn: #b5651d;
  --color-grade-a: #2e8b6f;
  --color-grade-b: #c69214;
  --color-grade-c: #b5651d;

  /* couleurs d'interface â€” mode clair */
  --surface: #ffffff;          /* fond des pages et des cartes */
  --surface-2: #f4f1ea;        /* fond secondaire (encadrÃ©s, vignettes) */
  --color-line: #e2ddd0;
  --color-text: #2a2f2c;
  --color-text-muted: #6b7268;
  --color-titre: #17231f;      /* titres et texte fort */
  --surface-entete: rgba(255, 255, 255, 0.92);   /* en-tÃªte translucide */

  --font-display: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-card: 0 2px 10px rgba(23, 35, 31, 0.06);
  --shadow-card-hover: 0 10px 28px rgba(23, 35, 31, 0.12);

  --max-width: 1180px;
}

/* ---------- Mode sombre ----------
   Trois rÃ©glages possibles depuis Â« Mon compte Â», toujours choisis
   explicitement par le client (jamais par dÃ©faut) :
   â€¢ Clair       : <html data-theme="clair">   â€” mode clair force.
   â€¢ Sombre      : <html data-theme="sombre">  â€” mode sombre force.
   â€¢ Automatique : <html data-theme="auto">    â€” suit le rÃ©glage clair/sombre
     du tÃ©lÃ©phone ou de l'ordinateur (media query ci-dessous).
   Tant que le client n'a rien choisi (aucun attribut data-theme sur <html>),
   le site reste en clair - la priorite va au mode clair, meme si l'appareil
   est lui-meme en mode sombre. Seules les couleurs d'interface changent ; le
   vert de la marque, lui, reste identique dans les deux modes pour que le
   site reste reconnaissable. */
:root[data-theme="sombre"] {
  --surface: #141a18;
  --surface-2: #1d2522;
  --color-line: #2e3733;
  --color-text: #dde4e0;
  --color-text-muted: #98a49e;
  --color-titre: #f1f5f3;
  --surface-entete: rgba(20, 26, 24, 0.94);
  --color-forest: #245f53;
  --color-forest-light: #4bb493;
  --shadow-card: 0 2px 10px rgba(0, 0, 0, 0.4);
  --shadow-card-hover: 0 10px 28px rgba(0, 0, 0, 0.55);
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --surface: #141a18;
    --surface-2: #1d2522;
    --color-line: #2e3733;
    --color-text: #dde4e0;
    --color-text-muted: #98a49e;
    --color-titre: #f1f5f3;
    --surface-entete: rgba(20, 26, 24, 0.94);
    --color-forest: #245f53;
    --color-forest-light: #4bb493;
    --shadow-card: 0 2px 10px rgba(0, 0, 0, 0.4);
    --shadow-card-hover: 0 10px 28px rgba(0, 0, 0, 0.55);
  }
}

/* ---------- Couleur du site (choisie depuis Admin > RÃ©glages) ----------
   Palette de 10 couleurs pour --color-forest / --color-forest-light, la
   paire qui pilote tous les boutons, prix, liens et accents du site. "Vert
   forÃªt" (les valeurs ci-dessus) reste la couleur par defaut, sans attribut
   - les 9 autres s'appliquent via <html data-couleur="...">, pose par le
   meme script que le mode clair/sombre (voir le <head> de chaque page).
   Chaque couleur a sa propre variante mode sombre, plus lumineuse pour
   rester lisible sur fond fonce - exactement comme le vert par defaut. */
[data-couleur="leboncoin"]  { --color-forest: #f56b2a; --color-forest-light: #ff8f5c; }
[data-couleur="ocean"]      { --color-forest: #14577e; --color-forest-light: #2e93c9; }
[data-couleur="bordeaux"]   { --color-forest: #7a1b2e; --color-forest-light: #b23a52; }
[data-couleur="violet"]     { --color-forest: #5b2e8c; --color-forest-light: #8b5fc2; }
[data-couleur="marine"]     { --color-forest: #1b2a4a; --color-forest-light: #33507f; }
[data-couleur="emeraude"]   { --color-forest: #0d7a63; --color-forest-light: #17a98a; }
[data-couleur="terracotta"] { --color-forest: #b0532e; --color-forest-light: #d97a50; }
[data-couleur="framboise"]  { --color-forest: #9c1f5c; --color-forest-light: #d13e82; }
[data-couleur="anthracite"] { --color-forest: #2e333a; --color-forest-light: #545b66; }

:root[data-theme="sombre"][data-couleur="leboncoin"]  { --color-forest: #e05b22; --color-forest-light: #ff9a66; }
:root[data-theme="sombre"][data-couleur="ocean"]      { --color-forest: #1d6e99; --color-forest-light: #4fb3e8; }
:root[data-theme="sombre"][data-couleur="bordeaux"]   { --color-forest: #96233b; --color-forest-light: #d9536d; }
:root[data-theme="sombre"][data-couleur="violet"]     { --color-forest: #7038b0; --color-forest-light: #a87de0; }
:root[data-theme="sombre"][data-couleur="marine"]     { --color-forest: #2c4470; --color-forest-light: #5478b0; }
:root[data-theme="sombre"][data-couleur="emeraude"]   { --color-forest: #12967a; --color-forest-light: #2ed1ac; }
:root[data-theme="sombre"][data-couleur="terracotta"] { --color-forest: #c2632e; --color-forest-light: #e8956a; }
:root[data-theme="sombre"][data-couleur="framboise"]  { --color-forest: #c2276e; --color-forest-light: #e85ca0; }
:root[data-theme="sombre"][data-couleur="anthracite"] { --color-forest: #4a515a; --color-forest-light: #767e88; }

@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"][data-couleur="leboncoin"]  { --color-forest: #e05b22; --color-forest-light: #ff9a66; }
  :root[data-theme="auto"][data-couleur="ocean"]      { --color-forest: #1d6e99; --color-forest-light: #4fb3e8; }
  :root[data-theme="auto"][data-couleur="bordeaux"]   { --color-forest: #96233b; --color-forest-light: #d9536d; }
  :root[data-theme="auto"][data-couleur="violet"]     { --color-forest: #7038b0; --color-forest-light: #a87de0; }
  :root[data-theme="auto"][data-couleur="marine"]     { --color-forest: #2c4470; --color-forest-light: #5478b0; }
  :root[data-theme="auto"][data-couleur="emeraude"]   { --color-forest: #12967a; --color-forest-light: #2ed1ac; }
  :root[data-theme="auto"][data-couleur="terracotta"] { --color-forest: #c2632e; --color-forest-light: #e8956a; }
  :root[data-theme="auto"][data-couleur="framboise"]  { --color-forest: #c2276e; --color-forest-light: #e85ca0; }
  :root[data-theme="auto"][data-couleur="anthracite"] { --color-forest: #4a515a; --color-forest-light: #767e88; }
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  /* couvre la zone sous la barre de statut/camÃ©ra perforÃ©e (mobile/app en
     plein ecran) avec la meme couleur que le bandeau du haut, pour que rien
     ne soit cache et qu'il n'y ait pas de flash blanc au-dessus */
  background: var(--color-ink);
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--surface);
  line-height: 1.55;
  /* pousse tout le contenu sous la zone reservee au systeme (status bar,
     encoche/camera perforee) quand le site tourne en plein ecran (PWA,
     appli Android) - sans effet dans un onglet de navigateur classique */
  padding-top: env(safe-area-inset-top, 0px);
  -webkit-font-smoothing: antialiased;
}

/* Le texte tape dans un champ suit --color-text (regle ci-dessus), mais le
   texte d'exemple grise (placeholder) a besoin de sa propre regle : sans ca
   il garde la couleur grise fixe du navigateur, illisible en mode sombre. */
input::placeholder, textarea::placeholder { color: var(--color-text-muted); opacity: 1; }

img, svg { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-titre);
  margin: 0 0 0.5em 0;
  line-height: 1.15;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em 0; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-forest-light);
  margin-bottom: 0.6em;
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-forest);
  color: var(--color-white);
}
.btn-primary:hover { background: var(--color-forest-light); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  border-color: var(--color-titre);
  color: var(--color-titre);
}
.btn-outline:hover { background: var(--color-titre); color: var(--surface); }
.btn-light {
  background: var(--surface);
  color: var(--color-forest);
}
.btn-light:hover { transform: translateY(-1px); box-shadow: var(--shadow-card-hover); }
.btn-danger { background: transparent; border-color: #b3261e; color: #b3261e; }
.btn-danger:hover { background: #b3261e; color: var(--color-white); }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 18px; font-size: 0.85rem; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  /* reste sous la zone systeme (status bar/camera) meme apres defilement,
     quand le bandeau d'avertissement au-dessus a disparu du cadre */
  top: env(safe-area-inset-top, 0px);
  z-index: 100;
  background: var(--surface-entete);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-line);
}
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* padding-top/bottom seulement (pas le raccourci "padding") : cet element
     porte aussi la classe .container, qui pose deja 24px de marge horizontale
     - un simple "padding: 14px 0" ecraserait ce 24px (meme propriete CSS,
     regle plus bas dans la feuille de style) et collait les icones de
     l'entete (panier...) contre le bord de l'ecran sur mobile. */
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: flex;
  align-items: center;
}
/* Bloc marque en une seule image (icone + "ReDrones" + legende), exportee
   telle quelle depuis le fichier fourni par l'utilisateur - evite tout
   ecart de police/espacement entre un rendu recompose en CSS (icone + texte
   + legende separes) et le graphisme d'origine. Meme rendu en clair et en
   sombre (une ombre blanche en mode sombre rendait moins bien, sur demande
   explicite). */
/* Pas d'ombre portee ici (a la difference de l'ancienne icone seule) : sur
   un dessin aussi detaille (lettres fines + legende), drop-shadow cree un
   halo flou disgracieux autour de chaque trait plutot qu'une ombre nette. */
.brand-lockup { height: 36px; width: auto; display: block; }
/* Pied de page : meme logotype sans la legende (assets/logo-footer.png) -
   brightness(0) invert(1) convertit les couleurs d'origine en blanc pur
   (fond du pied de page fixe et toujours sombre, --color-ink). */
.brand-lockup-footer { height: 56px; filter: brightness(0) invert(1); }

/* Logo "en suspension" (PC uniquement) : ajoute par JS (main.js,
   initialiserLogo3D) qui remplace le <img class="brand-lockup"> par ces
   calques quand la souris/le pointeur fin est detecte - sur mobile/tablette
   ou si JS est desactive, le <img> d'origine reste affiche tel quel, ces
   regles ne s'appliquent alors jamais. perspective sur le parent + un calque
   "scene" en 3D avec l'icone et le texte a des profondeurs differentes :
   l'icone bouge plus que le texte quand on incline, ce qui donne
   l'impression de deux plans distincts plutot qu'une image plate. */
.brand-3d { perspective: 700px; }
.brand-3d-scene {
  display: flex; align-items: center; gap: 8px;
  transform-style: preserve-3d;
  animation: brand-3d-flotter 4.5s ease-in-out infinite;
  will-change: transform;
}
/* JS bascule cette classe pendant que la souris survole le logo : coupe
   l'animation de repos et laisse la main au mousemove (transform inline,
   applique directement en JS pour suivre le curseur sans latence). */
.brand-3d.en-interaction .brand-3d-scene { animation-play-state: paused; }
@keyframes brand-3d-flotter {
  0%, 100% { transform: translateY(0) rotateX(0deg) rotateY(0deg); }
  50% { transform: translateY(-3px) rotateX(4deg) rotateY(-3deg); }
}
.brand-3d-icone {
  height: 36px; width: auto; display: block;
  transform: translateZ(28px);
  filter: drop-shadow(0 10px 8px rgba(2, 61, 48, .3));
}
.brand-3d-texte-bloc { display: flex; flex-direction: column; transform: translateZ(12px); }
.brand-3d-texte { height: 20px; width: auto; display: block; }
.brand-3d-tagline {
  font-size: .58rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: var(--color-forest-light); margin-top: 2px; white-space: nowrap;
}
@media (max-width: 980px), (hover: none), (pointer: coarse) {
  /* JS ne s'active jamais dans ce cas (voir initialiserLogo3D), ces regles
     sont juste une securite si la classe venait a etre posee quand meme. */
  .brand-3d-scene { animation: none; transform: none; }
  .brand-3d-icone, .brand-3d-texte-bloc { transform: none; }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--color-text);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--color-forest);
  border-color: var(--color-forest-light);
}

.nav-actions { display: flex; align-items: center; gap: 14px; flex: none; }
/* elements du menu reserves au mobile (Mon compte / Se connecter / Notifications) :
   caches sur bureau, affiches uniquement dans le menu hamburger */
.nav-mobile-seul { display: none; }

/* ---------- en-tete "faÃ§on Leboncoin", ordinateur uniquement ---------- */
/* Caches par defaut (mobile/tablette, ou l'en-tete existant - loupe repliee,
   logo centre, barre du bas - reste inchange) ; reactives a partir de 981px,
   meme seuil que celui qui bascule deja tout le reste du site en version PC. */
.btn-deposer-pc, .recherche-barre-pc, .icones-pc { display: none; }

@media (min-width: 981px) {
  .btn-deposer-pc {
    display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
    background: var(--color-forest); color: #fff; font-weight: 700; font-size: .86rem;
    padding: 10px 18px; border-radius: 999px; transition: background .15s ease; flex: none;
  }
  .btn-deposer-pc:hover { background: var(--color-forest-light); }

  .recherche-barre-pc {
    /* min-width:0 : la barre peut retrecir si l'en-tete est plein, au lieu de
       pousser le panier hors de la page */
    display: flex; align-items: center; flex: 1; min-width: 0; max-width: 420px; margin: 0 4px;
    background: var(--surface-2); border: 1px solid var(--color-line); border-radius: 999px;
    padding: 4px 4px 4px 16px; position: relative;
  }
  .recherche-barre-pc input {
    flex: 1; min-width: 0; border: none; background: none; font-size: .86rem;
    color: var(--color-text); font-family: var(--font-body);
  }
  .recherche-barre-pc input:focus { outline: none; }
  .recherche-barre-pc button {
    border: none; background: var(--color-forest); color: #fff; width: 32px; height: 32px;
    border-radius: 50%; cursor: pointer; font-size: .92rem; flex: none;
  }

  .icones-pc { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; flex: none; }
  .icones-pc > li { position: relative; }
  .icone-pc-lien {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 6px 10px; border-radius: 10px; color: var(--color-text); font-size: .66rem;
    font-weight: 600; background: none; border: none; cursor: pointer; font-family: var(--font-body);
    text-decoration: none; line-height: 1.1;
  }
  .icone-pc-lien:hover { background: var(--surface-2); }
  .icone-pc-symbole { position: relative; line-height: 1; display: flex; }
  .icone-pc-svg { width: 20px; height: 20px; display: block; }
  .recherche-barre-pc button svg { width: 15px; height: 15px; display: block; margin: auto; }
  .icone-pc-avatar .icone-pc-texte { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* petit conteneur dedie autour de l'avatar (et lui seul) pour ancrer la
     pastille de notification : necessaire car le JS remplace entierement le
     contenu de .avatar-rond (photo ou initiale) a chaque rafraichissement -
     une pastille imbriquee dedans serait effacee a chaque fois. */
  .icone-avatar-hote { position: relative; display: inline-flex; }

  /* remplacees par la nouvelle barre ci-dessus - !important necessaire car
     les regles de base (display:flex de .recherche-entete, .nav-links non
     cache) apparaissent plus bas dans la feuille de style et gagneraient
     sinon la cascade malgre cette media query */
  .nav-links, .recherche-entete { display: none !important; }
  .nav-actions .cart-badge[title="Mes messages"], .nav-actions .notif-cloche,
  .nav-actions a[data-si-connecte], .nav-actions a[data-si-deconnecte] { display: none !important; }

  /* logo un peu plus compact qu'en mobile pour laisser de la place a la
     nouvelle barre - reste nettement plus grand qu'avant tout de meme */
  .brand { flex: none; }
  .brand-lockup { height: 34px; }
  .nav-bar { gap: 14px; }
}

/* Petit ecran d'ordinateur (981-1180px) : l'en-tete PC ne tient pas avec les
   libelles sous les icones - la recherche tombait a ~20px. Libelles masques
   visuellement mais gardes pour les lecteurs d'ecran (pas de display:none). */
@media (min-width: 981px) and (max-width: 1180px) {
  .icones-pc .icone-pc-texte {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
  }
  .icone-pc-lien { padding: 8px; }
  .recherche-barre-pc { min-width: 150px; }
}

/* avatar rond (photo de profil validee, ou a defaut initiale du pseudo sur
   fond de couleur) - utilise dans l'en-tete, les annonces et la messagerie */
.avatar-rond {
  width: 30px; height: 30px; border-radius: 50%; overflow: hidden; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
}
.avatar-rond img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-rond-lettre { background: var(--color-forest); color: #fff; font-weight: 700; font-size: .8rem; text-transform: uppercase; }
.avatar-rond-lg { width: 72px; height: 72px; }
.avatar-rond-lg.avatar-rond-lettre { font-size: 1.8rem; }
.avatar-rond-md { width: 44px; height: 44px; }
.avatar-rond-md.avatar-rond-lettre { font-size: 1.1rem; }

/* Recherche repliee dans l'en-tete (version PC uniquement - voir plus bas,
   cachee des la tablette : sur mobile/tablette la recherche reste celle,
   deja bien visible, de la page d'accueil et du catalogue). Ferme : juste
   la loupe. Ouverte (.ouverte) : le champ se deplie a cote. */
.recherche-entete { display: flex; align-items: center; }
.recherche-entete-bouton {
  background: none;
  border: none;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  color: var(--color-text);
  flex: none;
}
.recherche-entete-bouton:hover { background: var(--surface-2); }
/* flex-shrink:0 : en-tete PC plein (Forum ajoute), l'icone du panier etait
   ecrasee a 0 px de large - seul le chiffre restait visible */
.recherche-entete-bouton svg, .cart-badge svg, .cloche-bouton svg { width: 17px; height: 17px; display: block; flex-shrink: 0; }
.cart-badge { display: inline-flex; align-items: center; gap: 4px; }
.recherche-entete-champ {
  overflow: hidden;
  width: 0;
  opacity: 0;
  margin-left: 0;
  transition: width .22s ease, opacity .18s ease, margin-left .22s ease;
}
/* Comme dans l'appli : la recherche ouverte prend toute la largeur
   disponible (jusqu'aux icones de droite) a la place du logo, plutot qu'un
   petit champ de 210px a cote de lui. .recherche-entete grandit pour
   occuper tout l'espace laisse libre par justify-content:space-between sur
   .nav-bar ; le logo est masque via .recherche-ouverte (voir plus bas,
   pose par js/main.js). */
.recherche-entete.ouverte { flex: 1 1 auto; min-width: 0; }
.recherche-entete.ouverte .recherche-entete-champ {
  width: 100%;
  opacity: 1;
  margin-left: 6px;
}
.nav-bar.recherche-ouverte .brand { display: none; }
.recherche-entete-champ input {
  width: 100%;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: .86rem;
  background: var(--surface);
  color: var(--color-text);
  font-family: var(--font-body);
}
/* ---------- "Rechercher par categorie" (mobile + PC), comme Leboncoin ----
   Une ligne qui apparait quand la recherche s'ouvre (mobile) ou recoit le
   focus (PC), tant que le champ est vide - au clic, deroule un choix de
   categories (boutique + petites annonces). Cachee par defaut ; .ouverte
   (mobile) / .categorie-visible (PC, pose par JS au focus) la reactive - le
   [hidden] pose par JS reste toujours prioritaire (input non vide). */
.recherche-entete .recherche-categorie,
.recherche-barre-pc .recherche-categorie { display: none; }
.recherche-entete.ouverte .recherche-categorie,
.recherche-barre-pc.categorie-visible .recherche-categorie { display: block; }
.recherche-categorie[hidden] { display: none !important; }
.recherche-categorie {
  position: absolute; top: 100%; left: 0; right: 0; margin-top: 8px;
  background: var(--surface); border: 1px solid var(--color-line); border-radius: var(--radius-md);
  box-shadow: 0 12px 28px rgba(0,0,0,.14); z-index: 140; overflow: hidden;
}
/* Sur mobile, pas une petite carte flottante mais une ligne plate en pleine
   largeur d'ecran directement sous l'en-tete, comme dans l'appli (une
   Surface + HorizontalDivider dans le flux, pas un popup) : on sort du
   conteneur (large 100vw recentre) et on retire carte/ombre/coins arrondis.
   La barre PC, elle, garde la carte flottante classique - la recherche y
   reste un petit champ au milieu d'un large en-tete, pas plein ecran. */
.recherche-entete .recherche-categorie {
  /* position:fixed (pas absolute) : .recherche-entete ne commence pas au
     bord gauche de l'ecran (l'icone loupe est avant), donc le classique
     "left:50%; margin-left:-50vw" pour sortir du conteneur se calait sur le
     mauvais referentiel et decalait le bloc vers la droite. En fixed, le
     referentiel est directement la fenetre : left:0/width:100vw tombent
     juste. Le "top" (bas reel de l'en-tete, variable - bandeau d'avertissement
     replie ou non, en-tete sticky) est calcule et pose par js/main.js a
     l'ouverture. */
  position: fixed; top: 0; left: 0; right: auto; width: 100vw; margin-left: 0; margin-top: 0;
  border-radius: 0; box-shadow: none; border: none; border-top: 1px solid var(--color-line);
}
/* Specificite renforcee (.recherche-categorie .recherche-categorie-ligne, pas
   juste .recherche-categorie-ligne) : necessaire pour l'emporter sur la
   regle generique ".recherche-barre-pc button" (bouton loupe rond vert) qui,
   sinon, s'applique aussi a CE bouton puisque lui aussi est un <button>
   descendant de .recherche-barre-pc - largeur/hauteur/rayon ecrases sans ca. */
.recherche-categorie .recherche-categorie-ligne {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  height: auto; border-radius: 0;
  padding: 12px 16px; background: none; border: none; font-family: var(--font-body);
  font-size: .88rem; color: var(--color-text); cursor: pointer; text-align: left;
}
.recherche-categorie .recherche-categorie-ligne:hover { background: var(--surface-2); }
.recherche-categorie .recherche-categorie-ligne svg { width: 16px; height: 16px; color: var(--color-text-muted); flex: none; }
.recherche-categorie-menu { padding: 2px 8px 10px; border-top: 1px solid var(--color-line); }
.recherche-categorie-titre {
  display: block; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--color-text-muted); margin: 10px 8px 4px;
}
.recherche-categorie-menu a {
  display: block; padding: 8px; color: var(--color-text); text-decoration: none;
  font-size: .86rem; border-radius: var(--radius-sm);
}
.recherche-categorie-menu a:hover { background: var(--surface-2); color: var(--color-forest); }

/* ---------- "Rechercher par localisation" (code postal, ville, position) - ne
   s'applique qu'aux petites annonces (le catalogue boutique est expedie
   depuis ReDrones, sans localisation propre par article). ---------- */
.recherche-localisation-menu { padding: 10px 8px 12px; border-top: 1px solid var(--color-line); }
.recherche-localisation-auto {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 8px; background: none; border: none; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: .86rem; font-weight: 600; color: var(--color-forest);
  cursor: pointer; text-align: left;
}
.recherche-localisation-auto:hover { background: var(--surface-2); }
.recherche-localisation-auto svg { width: 18px; height: 18px; flex: none; }
.recherche-localisation-auto:disabled { opacity: .6; cursor: default; }
.recherche-localisation-champs {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 8px 4px;
}
.recherche-localisation-champs input {
  flex: 1 1 100px; min-width: 90px; border: 1px solid var(--color-line); border-radius: var(--radius-sm);
  padding: 8px 10px; font-size: .86rem; font-family: var(--font-body); color: var(--color-text); background: var(--surface);
}
.recherche-localisation-champs button {
  flex: 1 1 100%; border: none; background: var(--color-forest); color: #fff; font-weight: 700;
  font-size: .86rem; border-radius: var(--radius-sm); padding: 9px 14px; cursor: pointer; font-family: var(--font-body);
}
.recherche-localisation-champs button:hover { background: var(--color-forest-light); }
.recherche-localisation-message {
  margin: 8px 8px 0; font-size: .8rem; color: var(--color-text-muted);
}
.recherche-localisation-message.erreur { color: #b3261e; }

.cloche-bouton-menu {
  background: none; border: none; cursor: pointer; padding: 0;
  display: flex; align-items: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: .92rem; color: var(--color-titre);
}
.cloche-bouton-menu [data-cloche-badge] { position: static; border: none; }

/* ---------- barre de navigation basse (mobile/tablette uniquement) ---------- */
.nav-bas { display: none; }
.nav-bas-admin { display: none; }
.nav-bas-compte { display: none; }
.txt-court { display: none; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  position: relative;          /* repere pour la pastille de notifications */
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-titre);
  margin: 5px 0;
}
/* Pastille rouge sur le menu Â« trois traits Â» : reprend le nombre de
   notifications non lues, pour que ce soit visible sans ouvrir le menu.
   Selecteur plus precis que Â« .nav-toggle span Â» ci-dessus, sinon la
   pastille heriterait de l'apparence des trois barres. */
.nav-toggle span.nav-toggle-badge {
  position: absolute;
  top: -2px;
  right: -4px;
  width: auto;
  min-width: 17px;
  height: 17px;
  margin: 0;
  padding: 0 4px;
  border-radius: 999px;
  background: #8f2f21;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
  border: 2px solid var(--surface);
}

.disclaimer-bar {
  background: var(--color-ink);
  color: var(--color-sand);
  font-size: 0.78rem;
  text-align: center;
  padding: 7px 16px;
  letter-spacing: 0.01em;
}
.disclaimer-bar strong { color: var(--color-mint); }

/* ---------- barre de recherche ---------- */
/* Ce bloc bien visible sur la page d'accueil/catalogue n'est plus utile :
   sur PC la recherche vit dans l'en-tete (.recherche-entete), et depuis peu
   c'est aussi le cas sur mobile/tablette (loupe qui se deplie). */
.recherche-avant { display: none; }
.barre-recherche { display: flex; gap: 8px; max-width: 520px; }
.barre-recherche input {
  flex: 1; padding: 12px 18px; border-radius: 999px;
  border: 1px solid var(--color-line); font-size: .95rem;
  font-family: var(--font-body); background: var(--surface); color: var(--color-text);
}
.barre-recherche input:focus { outline: 2px solid var(--color-forest-light); outline-offset: 1px; }
.barre-recherche button {
  width: 46px; height: 46px; flex: none; border-radius: 50%; border: none;
  background: var(--color-forest); color: #fff; font-size: 1.1rem; cursor: pointer;
  transition: background .15s ease;
}
.barre-recherche button:hover { background: var(--color-forest-light); }
.barre-recherche-catalogue { max-width: none; margin-bottom: 20px; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--color-forest) 0%, #123832 65%, var(--color-ink) 100%);
  color: var(--color-white);
  padding: 84px 0 96px;
  position: relative;
  overflow: hidden;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero h1 { color: var(--color-white); }
.hero p.lead {
  font-size: 1.15rem;
  color: var(--color-mint);
  max-width: 46ch;
}
.hero-actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 44px;
  flex-wrap: wrap;
}
.hero-stats div strong {
  display: block;
  font-size: 1.5rem;
  color: var(--color-white);
}
.hero-stats div span {
  font-size: 0.8rem;
  color: var(--color-mint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.hero-visual {
  background: var(--surface-2);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 18px 44px rgba(0,0,0,0.22);
  overflow: hidden;
}
.hero-visual img { width: 100%; max-width: 380px; }
/* une vraie photo (pas l'illustration dessinee) remplit le cadre, sans marge beige */
.hero-visual.a-une-photo {
  background: none; border-color: transparent; padding: 0;
  aspect-ratio: 4 / 3;
}
.hero-visual.a-une-photo img {
  width: 100%; height: 100%; max-width: none; object-fit: cover;
}
.hero-visual video, .hero-visual iframe { width: 100%; height: 100%; max-width: none; object-fit: cover; border: 0; }
/* Le reset "img, svg { display:block }" (plus haut dans ce fichier) neutralise
   sinon l'attribut [hidden] natif sur l'image d'accueil quand la video prend
   le relais. */
.hero-visual img[hidden], .hero-visual video[hidden], .hero-visual iframe[hidden] { display: none; }

/* Sur PC, ce bandeau est desormais le tout premier bloc de la page (la
   recherche est passee dans l'en-tete) : on le rend plus compact pour qu'il
   ne prenne pas toute la hauteur d'ecran a l'arrivee sur le site. */
@media (min-width: 981px) {
  .hero { padding: 44px 0 52px; }
  .hero .container { gap: 32px; }
  .hero h1 { font-size: clamp(1.7rem, 2.4vw, 2.3rem); }
  .hero p.lead { font-size: 1rem; }
  .hero-actions { margin-top: 18px; }
  .hero-stats { margin-top: 26px; gap: 24px; }
  .hero-stats div strong { font-size: 1.25rem; }
  .hero-visual { padding: 18px; }
  .hero-visual img { max-width: 280px; }
}

/* ---------- Sections gÃ©nÃ©riques ---------- */
section { padding: 72px 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.section-head p { color: var(--color-text-muted); max-width: 56ch; margin: 0; }
.bg-sand { background: var(--surface-2); }
.bg-mint { background: var(--color-mint); }

/* ---------- Badges de confiance ---------- */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.trust-card {
  background: var(--surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: 26px 22px;
  text-align: left;
}
.trust-card .icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--color-mint);
  color: var(--color-forest);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  font-size: 1.3rem;
}
.trust-card h3 { font-size: 1.02rem; margin-bottom: 6px; }
.trust-card p { color: var(--color-text-muted); font-size: 0.9rem; margin: 0; }

/* ---------- CatÃ©gories ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.cat-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-ink);
  color: var(--color-white);
  padding: 26px;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: transform 0.2s ease;
}
.cat-card:hover { transform: translateY(-4px); }
.cat-card span { font-size: 0.8rem; color: var(--color-mint); }
.cat-card h3 { color: var(--color-white); margin-bottom: 2px; font-size: 1.05rem; }

/* Grille catÃ©gories par type de piÃ¨ce : vignette illustrÃ©e */
.cat-grid-6 { grid-template-columns: repeat(6, 1fr); gap: 16px; }
.cat-grid-6 .cat-card {
  background: var(--surface);
  border: 1px solid var(--color-line);
  color: var(--color-text);
  padding: 16px;
  min-height: 0;
  justify-content: flex-start;
  text-align: center;
}
.cat-grid-6 .cat-card img {
  width: 100%;
  height: 84px;
  object-fit: contain;
  margin-bottom: 10px;
}
.cat-grid-6 .cat-card span {
  color: var(--color-titre);
  font-weight: 700;
  font-size: 0.92rem;
}
.cat-grid-6 .cat-card h3 {
  color: var(--color-forest-light);
  font-size: 0.82rem;
  font-weight: 600;
  margin: 2px 0 0;
}

/* En-tÃªte du bloc filtres */
.filters-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}
.filters-head h3 { margin: 0; }
.link-btn {
  background: none; border: none; padding: 0;
  color: var(--color-forest-light);
  font-size: 0.8rem; font-weight: 600;
  cursor: pointer; text-decoration: underline;
}
.link-btn:hover { color: var(--color-forest); }

/* Badge panier */
.cart-badge { font-weight: 700; font-size: 0.9rem; color: var(--color-titre); }

/* Liste Ã  puces des contrÃ´les */
.check-list { list-style: none; padding: 0; margin: 16px 0 0; max-width: 760px; }
.check-list li {
  position: relative;
  padding: 10px 0 10px 26px;
  border-bottom: 1px solid var(--color-line);
  font-size: 0.93rem;
}
.check-list li::before {
  content: "\2713";
  position: absolute; left: 0; top: 10px;
  color: var(--color-forest-light);
  font-weight: 800;
}
.check-list li:last-child { border-bottom: none; }

/* ---------- Cartes produit ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
/* variante plus etroite (catalogue, a cote des filtres) : 3 colonnes */
.product-grid-3 { grid-template-columns: repeat(3, 1fr); }
.product-card {
  background: var(--surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
}
.product-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-3px); }
.product-thumb {
  background: var(--surface-2);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 14px;
  overflow: hidden;
}
.product-thumb img {
  width: 88%;
  height: 88%;
  object-fit: contain;
  transition: transform 0.25s ease;
}
/* une vraie photo remplit la vignette entierement, sans marge beige autour
   (l'illustration dessinee, elle, garde sa marge de 88% + contain ci-dessus) */
.product-thumb.a-une-photo { padding: 0; }
.product-thumb.a-une-photo img { width: 100%; height: 100%; object-fit: cover; }
.product-card:hover .product-thumb img { transform: scale(1.06); }

/* Ã‰tiquette de stock */
.stock {
  font-size: 0.76rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.stock::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.stock-ok  { color: var(--color-grade-a); }
.stock-low { color: var(--color-warn); }
.stock-out { color: var(--color-text-muted); }
.grade-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--color-white);
  letter-spacing: 0.02em;
}
.grade-a { background: var(--color-grade-a); }
.grade-b { background: var(--color-grade-b); }
.grade-c { background: var(--color-grade-c); }
.fav-bouton {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 32px; height: 32px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.92); color: #8f2f21; font-size: 1rem;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
  transition: transform .15s ease;
}
.fav-bouton:hover { transform: scale(1.1); }
.fav-bouton.actif { background: #fff; }
.fav-bouton-large { position: relative; }
.product-body {
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.product-brand { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-muted); }
.product-body h3 { font-size: 1.02rem; margin-bottom: 2px; }
.product-meta { font-size: 0.82rem; color: var(--color-text-muted); margin-bottom: 6px; }
.price-row { display: flex; align-items: baseline; gap: 10px; margin-top: auto; }
.price-now { font-size: 1.2rem; font-weight: 800; color: var(--color-titre); }
.price-old { font-size: 0.85rem; color: var(--color-text-muted); text-decoration: line-through; }
.product-card .btn { margin-top: 12px; }

/* ---------- Filtres catalogue ---------- */
.catalogue-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 36px;
  align-items: start;
}
.filters {
  background: var(--surface-2);
  border-radius: var(--radius-md);
  padding: 22px;
  position: sticky;
  top: 92px;
}
/* bouton "Filtrer" : n'existe que sur mobile, pour replier les filtres */
.filtres-bouton-mobile {
  display: none; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
}
.filters h3 { font-size: 0.95rem; margin-bottom: 14px; }
.filter-group { margin-bottom: 22px; }
.filter-group legend {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 10px;
  padding: 0;
}
.filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  margin-bottom: 8px;
  cursor: pointer;
}
.filter-option input { accent-color: var(--color-forest); }
.catalogue-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 12px;
}
.catalogue-toolbar select {
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-line);
  background: var(--surface);
  color: var(--color-text);
  font-size: 0.88rem;
}

/* onglet Trafic (admin, version PC uniquement - voir media query mobile) :
   filtre par version du site (France / Etats-Unis / tout), au-dessus des
   tuiles de stats. */
.trafic-filtre-version {
  display: flex; align-items: center; gap: 10px; margin-top: 20px;
}
.trafic-filtre-version label { font-weight: 600; font-size: 0.9rem; }
.trafic-filtre-version select {
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-line);
  background: var(--surface);
  color: var(--color-text);
  font-size: 0.88rem;
}
.result-count { color: var(--color-text-muted); font-size: 0.9rem; }

/* ---------- Fiche produit ---------- */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.detail-gallery {
  background: var(--surface-2);
  border-radius: var(--radius-lg);
  padding: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.detail-gallery img { width: 82%; cursor: zoom-in; }
/* une vraie photo remplit le cadre, sans marge beige autour */
.detail-gallery.a-une-photo { padding: 0; aspect-ratio: 4 / 3; }
.detail-gallery.a-une-photo img { width: 100%; height: 100%; object-fit: cover; }
.detail-info .product-brand { display: block; margin-bottom: 4px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.detail-info .grade-badge { position: static; display: inline-flex; margin-bottom: 14px; }
.detail-price { display: flex; align-items: baseline; gap: 14px; margin: 18px 0; }
.detail-price .price-now { font-size: 2rem; }
.detail-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  border-top: 1px solid var(--color-line);
}
.detail-list li {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-line);
  font-size: 0.92rem;
}
.detail-list li span:first-child { color: var(--color-text-muted); }
.detail-list li span:last-child { font-weight: 600; text-align: right; }
.detail-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.detail-note {
  margin-top: 22px;
  background: var(--color-mint);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  font-size: 0.88rem;
  color: var(--color-forest);
}

.tabs { margin-top: 60px; border-top: 1px solid var(--color-line); padding-top: 40px; }
.tab-nav { display: flex; gap: 28px; border-bottom: 1px solid var(--color-line); margin-bottom: 24px; }
.tab-nav button {
  position: relative;
  background: none; border: none; cursor: pointer;
  padding: 10px 2px 14px;
  font-weight: 700; font-size: 0.95rem;
  color: var(--color-text-muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.tab-nav button.active { color: var(--color-titre); border-color: var(--color-forest); }
/* pastille de notification sur un onglet (ex. onglet Annonces de l'admin) :
   decalee vers le haut-droite du libelle, pas d'icone ici pour s'ancrer dessus. */
.cloche-badge-onglet { top: -6px; right: -14px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---------- Grades explication (comment Ã§a marche) ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.step-card {
  background: var(--surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: 26px 22px;
}
.step-num {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--color-forest);
  color: var(--color-white);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  margin-bottom: 16px;
}
.grade-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.grade-table th, .grade-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--color-line);
  font-size: 0.92rem;
}
.grade-table th { background: var(--surface-2); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-muted); }
.grade-table tr:last-child td { border-bottom: none; }

.faq-item {
  border-bottom: 1px solid var(--color-line);
  padding: 18px 0;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-titre);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.3rem; color: var(--color-forest); }
.faq-item[open] summary::after { content: "\2013"; }
.faq-item p { margin-top: 12px; color: var(--color-text-muted); }

/* ---------- CTA reprise ---------- */
.cta-banner {
  background: var(--color-forest);
  color: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-banner h2 { color: var(--color-white); margin-bottom: 6px; }
.cta-banner p { color: var(--color-mint); margin: 0; }

/* ---------- Contact ---------- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 6px; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--surface);
  color: var(--color-text);
}
.form-field textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 0.82rem; color: var(--color-text-muted); }
.contact-info-card {
  background: var(--surface-2);
  border-radius: var(--radius-md);
  padding: 28px;
}
.contact-info-card h3 { font-size: 1rem; }
.contact-info-card ul { list-style: none; padding: 0; margin: 18px 0 0; }
.contact-info-card li { padding: 10px 0; border-top: 1px solid var(--color-line); font-size: 0.92rem; }
.contact-info-card li:first-child { border-top: none; }
.form-success {
  display: none;
  background: var(--color-mint);
  color: var(--color-forest);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 18px;
}
.form-success.show { display: block; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-ink);
  color: var(--color-sand);
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-grid h4 {
  color: var(--color-white);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { color: rgba(244,241,234,0.75); font-size: 0.9rem; }
.footer-grid a:hover { color: var(--color-white); }
.footer-brand p { color: rgba(244,241,234,0.7); font-size: 0.9rem; max-width: 34ch; }
.footer-langues { display: flex; gap: 12px; margin-top: 16px; }
.footer-langue-bouton {
  padding: 0; border: none; background: none; cursor: pointer;
  line-height: 0; opacity: .45; border-radius: 50%;
  transition: opacity .15s ease, transform .15s ease;
}
.footer-langue-bouton img { display: block; width: 30px; height: 30px; }
.footer-langue-bouton:hover { opacity: .8; transform: scale(1.08); }
/* Langue active : simplement en pleine opacite, sans cadre ni anneau. */
.footer-langue-bouton.actif { opacity: 1; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 22px;
  font-size: 0.8rem;
  color: rgba(244,241,234,0.55);
  flex-wrap: wrap;
  gap: 10px;
}
.footer-legal-note {
  max-width: 640px;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 24px;
}
.breadcrumb a { color: var(--color-forest); font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .cat-grid-6 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 980px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 320px; margin: 0 auto; }
  .trust-grid, .cat-grid, .product-grid, .product-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }

  /* Version mobile uniquement : "Par type de piece" passe sous "Aussi
     disponible" - l'ordre choisi depuis l'admin (voir js/main.js) reste
     inchange pour le PC, seul l'affichage mobile est concerne. */
  .accueil-blocs { display: flex; flex-direction: column; }
  .accueil-blocs [data-bloc="annonces_promo"]   { order: 1; }
  .accueil-blocs [data-bloc="specialite"]       { order: 2; }
  .accueil-blocs [data-bloc="aussi_disponible"] { order: 3; }
  .accueil-blocs [data-bloc="categories"]       { order: 4; }
  .accueil-blocs [data-bloc="cta_revente"]      { order: 5; }
  .accueil-blocs [data-bloc="principe"]         { order: 6; }
  .catalogue-layout { grid-template-columns: 1fr; }
  .filters { position: static; }
  .product-detail { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  /* Annonces plus compactes sur mobile/tablette (appli + site mobile) : on
     retire le texte secondaire des cartes et on ne garde que le titre. */
  .product-card .product-brand, .product-card .product-meta { display: none; }
  /* ...sauf la ville des petites annonces entre particuliers (utile pour
     savoir d'oÃ¹ vient l'objet avant d'acheter) : reste visible partout. */
  .product-card .product-meta.annonce-lieu { display: flex; }
}
@media (max-width: 640px) {
  .trust-grid, .cat-grid, .steps { grid-template-columns: 1fr; }
  /* Toujours 2 annonces par ligne, meme sur petit mobile, comme demande. */
  .product-grid, .product-grid-3 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .product-body { padding: 10px 10px 12px; gap: 4px; }
  .product-body h3 { font-size: 0.86rem; line-height: 1.25; }
  .product-card .btn { margin-top: 8px; font-size: 0.78rem; padding: 8px 10px; }
  .product-thumb { padding: 8px; }
  .price-now { font-size: 1rem; }
  .price-old { font-size: 0.72rem; }
  .stock { font-size: 0.68rem; }
  .grade-badge { font-size: 0.62rem; padding: 3px 8px; top: 8px; left: 8px; }
  .fav-bouton { width: 26px; height: 26px; font-size: 0.85rem; top: 6px; right: 6px; }
  .cat-grid-6 { grid-template-columns: repeat(2, 1fr); }
  .grade-table { display: block; overflow-x: auto; }
  .cta-banner { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr; }
  /* la barre d'onglets defile sur elle-meme plutot que de faire deborder la page */
  .tab-nav { flex-wrap: nowrap; gap: 20px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tab-nav::-webkit-scrollbar { display: none; }
}

/* =========================================================================
   BOUTIQUE â€” panier, comptes clients, suivi de commande, administration
   ========================================================================= */

.cart-badge {
  font-weight: 700; font-size: .9rem; color: var(--color-titre);
  padding: 6px 10px; border-radius: 999px; background: var(--surface-2);
  transition: background .15s ease;
}
.cart-badge:hover { background: var(--color-mint); }
/* icone Messagerie de l'entete mobile : position:relative pour que la
   pastille rouge (.cloche-badge, voir ci-dessous) s'ancre correctement
   dessus, comme elle le fait deja sur les icones ordinateur et barre du bas. */
.cart-badge[title="Mes messages"] { position: relative; }

/* ---------- pastille de compteur (icone Messagerie) ---------- */
.cloche-badge {
  position: absolute; top: -2px; right: -2px;
  background: #8f2f21; color: #fff; font-size: .68rem; font-weight: 700;
  min-width: 17px; height: 17px; border-radius: 999px; padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--color-white); line-height: 1;
}

/* ---------- alerte de retour en stock (fiche produit) ---------- */
.alerte-stock { margin-top: 14px; }

/* ---------- fiche vendue par exemplaire ---------- */
.qte button:disabled { opacity: .4; cursor: default; }
.qte-fiche { margin-right: 4px; }
.exemplaire-etat { margin: 10px 0 0; font-size: .92rem; }
.exemplaires-total { margin: 14px 0 0; font-weight: 700; }
.encadre-exemplaire {
  display: flex; gap: 16px; margin-top: 14px; padding: 14px;
  border: 1px solid var(--color-line); border-radius: var(--radius-md); background: var(--surface);
}
.encadre-exemplaire-photo {
  flex: 0 0 120px; height: 120px; padding: 0; border: none; border-radius: var(--radius-sm);
  overflow: hidden; background: var(--color-mint); cursor: zoom-in;
}
.encadre-exemplaire-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.encadre-exemplaire-infos { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.encadre-exemplaire-infos .detail-list { width: 100%; margin: 0; }
.encadre-exemplaire-infos .galerie-vignettes { width: 100%; margin-top: 4px; }
@media (max-width: 560px) {
  .encadre-exemplaire { flex-direction: column; }
  .encadre-exemplaire-photo { flex-basis: auto; width: 100%; height: 200px; }
}
.exemplaires-panier { margin: 4px 0 0; padding-left: 18px; font-size: .82rem; color: var(--color-text-muted); }
/* admin : dossier pour le comptable (Comptabilite) */
.dossier-compta-appel {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 20px; padding: 16px 18px;
  border-radius: var(--radius-md); background: var(--color-mint); border: 1px solid var(--color-forest-light);
}
.dossier-compta-appel-icone { font-size: 1.8rem; line-height: 1; }
.dossier-compta-appel-texte { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 2px; font-size: .9rem; }
.dossier-compta-appel-texte strong { font-size: 1.02rem; }
[data-sousonglet="dossier"] { font-weight: 700; color: var(--color-forest); }
.dossier-compta { max-width: 1000px; margin-top: 20px; }
.dossier-compta-titre h3 { margin: 0 0 4px; }
.dossier-etape { display: flex; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--color-line); }
.dossier-etape h4 { margin: 4px 0 10px; }
.dossier-numero {
  flex: 0 0 34px; height: 34px; border-radius: 50%; background: var(--color-forest); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.dossier-etape-corps { flex: 1; min-width: 0; }
.dossier-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.dossier-presets .actif { background: var(--color-forest); color: #fff; border-color: var(--color-forest); }
.dossier-dates { display: flex; flex-wrap: wrap; gap: 14px; }
.dossier-dates label { display: flex; align-items: center; gap: 8px; }
.dossier-resume-controles { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 10px; }
.dossier-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.dossier-badge.a_corriger { background: #fbe3df; color: #8f2f21; }
.dossier-badge.a_verifier { background: #fdf0d5; color: #8a5a00; }
.dossier-badge.info { background: var(--surface-2); color: var(--color-text-muted); }
.dossier-ok { color: var(--color-grade-a); font-weight: 700; }
.dossier-contenu { margin: 0 0 16px; padding-left: 18px; font-size: .9rem; line-height: 1.75; }
.dossier-bouton-principal { padding: 14px 24px; font-size: 1rem; }
.dossier-historique-titre { margin-top: 26px; }

/* admin : exemplaires d'une fiche article */
.exemplaire-admin { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--color-line); font-size: .88rem; }
.exemplaire-admin-infos { flex: 1; min-width: 0; }
.exemplaire-admin-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.formulaire-exemplaire { margin-top: 12px; padding: 14px; border: 1px solid var(--color-line); border-radius: var(--radius-md); }
.formulaire-exemplaire h4 { margin-top: 0; }

/* ---------- messages ---------- */
.message { margin: 0 0 14px; font-size: .9rem; padding: 0; }
.message:empty { display: none; }
.message-erreur {
  background: #fdeceb; color: #8f2f21; padding: 12px 14px;
  border-radius: var(--radius-sm); border-left: 3px solid #c0442f;
}
.message-ok {
  background: var(--color-mint); color: var(--color-forest);
  padding: 12px 14px; border-radius: var(--radius-sm);
  border-left: 3px solid var(--color-forest-light);
}
/* champ signale manquant/invalide au moment de payer (voir
   afficherErreurChamp dans boutique.js) */
.champ-erreur { border-color: #c0442f !important; }
.message-erreur-champ { margin: 6px 0 14px; padding: 8px 12px; font-size: .82rem; }

/* "isolation" force les cadres PayPal/Google Pay a l'interieur a former leur
   propre contexte d'empilement, contenu dans cette zone : sans ca, ils
   semblent parfois s'affranchir du z-index normal de la page et passer
   au-dessus de la barre du site au defilement (constate sur iPad et
   Android) - ce conteneur les en empeche, sans avoir a toucher a la barre
   elle-meme. */
.zone-paiements-catalogue { isolation: isolate; }
/* boutons de paiement (PayPal/carte/Apple Pay/Google Pay) grises tant que le
   formulaire de commande n'est pas complet - voir rafraichirEtatPaiement()
   dans boutique.js */
.zone-paiements-catalogue.desactive > div {
  opacity: .45; filter: grayscale(55%); pointer-events: none;
}
.zone-paiements-catalogue.desactive { cursor: not-allowed; }
.message-paiements-desactives { display: none; text-align: center; margin: -6px 0 14px; }

/* petit cercle de chargement pendant que le formulaire "Carte bancaire" se
   deplie (voir afficherChargementCarte dans boutique.js) */
.spinner-paiement {
  /* z-index tres eleve necessaire : un simple z-index bas ne suffit pas
     toujours a passer au-dessus de l'iframe PayPal en dessous (constate a
     l'usage) */
  position: absolute; inset: 0; z-index: 999; border-radius: var(--radius-sm);
  background: rgba(255,255,255,.85);
  display: flex; align-items: center; justify-content: center;
}
.spinner-paiement::after {
  content: ""; width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid var(--color-line); border-top-color: var(--color-forest);
  animation: tourner-spinner-paiement .7s linear infinite;
}
@keyframes tourner-spinner-paiement { to { transform: rotate(360deg); } }

/* Carte bancaire integree (« caisse etendue » PayPal, voir
   afficherChampsCarteIntegres dans boutique.js) : bouton qui deplie les
   champs securises PayPal (iframes) directement sous le recapitulatif. */
.carte-integree-deplier {
  width: 100%; min-height: 45px; border: 0; border-radius: 22px; cursor: pointer;
  background: #111; color: #fff; font-size: 1rem; font-weight: 600;
}
.carte-integree-deplier:hover { background: #2b2b2b; }
.carte-integree {
  margin-top: 10px; padding: 14px; border: 1px solid var(--color-line);
  border-radius: var(--radius-md); background: var(--surface);
}
.carte-integree[hidden] { display: none; }
.carte-integree-ligne { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.carte-integree-payer { width: 100%; margin-top: 6px; }
.carte-integree-note { margin: 10px 0 0; font-size: .8rem; }

.carte-formulaire {
  background: var(--surface); border: 1px solid var(--color-line);
  border-radius: var(--radius-md); padding: 26px;
}
.carte-formulaire h3 { margin-top: 0; }
.grille-couleurs {
  display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px;
}
.couleur-choix {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer; padding: 2px; width: 74px;
  font-family: var(--font-body); color: var(--color-text-muted); font-size: .72rem;
  text-align: center;
}
.couleur-choix-pastille {
  width: 40px; height: 40px; border-radius: 50%;
  border: 3px solid transparent; box-shadow: 0 0 0 1px var(--color-line) inset;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.1rem; transition: transform .15s ease, border-color .15s ease;
}
.couleur-choix:hover .couleur-choix-pastille { transform: scale(1.08); }
.couleur-choix.actif { color: var(--color-titre); font-weight: 700; }
.couleur-choix.actif .couleur-choix-pastille { border-color: var(--color-titre); }
.vide {
  text-align: center; padding: 56px 24px; color: var(--color-text-muted);
  background: var(--surface-2); border-radius: var(--radius-md);
}

/* ---------- panier ---------- */
.layout-panier { display: grid; grid-template-columns: 1.6fr 1fr; gap: 32px; align-items: start; }
/* page "Finaliser ma commande" uniquement (pas panier.html, qui partage la
   meme classe de base) : le recapitulatif/paiement passe sous le formulaire
   d'adresse au lieu d'a cote, sur PC comme sur mobile - l'ordre du HTML
   (formulaire, puis recapitulatif) suffit donc, une seule colonne. */
.layout-commande { grid-template-columns: 1fr; max-width: 720px; margin-left: auto; margin-right: auto; }
.ligne-panier {
  display: grid; grid-template-columns: 88px 1fr auto auto auto;
  gap: 18px; align-items: center;
  padding: 18px 0; border-bottom: 1px solid var(--color-line);
}
.ligne-panier:first-child { border-top: 1px solid var(--color-line); }
.qte { display: flex; align-items: center; gap: 12px; }
.qte button {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--color-line); background: var(--surface);
  font-size: 1.1rem; cursor: pointer; line-height: 1;
}
.qte button:hover { background: var(--color-mint); border-color: var(--color-forest-light); }
.ligne-total { font-weight: 700; min-width: 82px; text-align: right; }

/* ---------- suivi de commande ---------- */
.carte-commande {
  background: var(--surface); border: 1px solid var(--color-line);
  border-radius: var(--radius-md); padding: 24px; margin-bottom: 20px;
}
.carte-commande header,
.carte-admin-tete {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; flex-wrap: wrap; margin-bottom: 20px;
}
.carte-commande h3, .carte-admin-tete h3 { margin: 2px 0 0; }
.montant { font-size: 1.3rem; font-weight: 800; color: var(--color-titre); white-space: nowrap; }

.suivi { list-style: none; display: flex; padding: 0; margin: 0 0 20px; gap: 0; }
.suivi .etape { flex: 1; text-align: center; position: relative; font-size: .78rem; }
.suivi .etape::before {
  content: ""; position: absolute; top: 15px; left: -50%;
  width: 100%; height: 3px; background: var(--color-line); z-index: 0;
}
.suivi .etape:first-child::before { display: none; }
.suivi .etape.faite::before, .suivi .etape.encours::before { background: var(--color-forest-light); }
.pastille {
  position: relative; z-index: 1;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 8px; font-weight: 700; font-size: .85rem;
  background: var(--surface-2); color: var(--color-text-muted);
  border: 3px solid var(--color-white); box-shadow: 0 0 0 1px var(--color-line);
}
.etape.faite .pastille { background: var(--color-forest-light); color: #fff; box-shadow: 0 0 0 1px var(--color-forest-light); }
.etape.encours .pastille {
  background: var(--color-forest); color: #fff;
  box-shadow: 0 0 0 1px var(--color-forest), 0 0 0 5px var(--color-mint);
}
.etape-nom { color: var(--color-text-muted); display: block; padding: 0 4px; }
.etape.faite .etape-nom, .etape.encours .etape-nom { color: var(--color-titre); font-weight: 600; }
.suivi-annule {
  background: #fdeceb; color: #8f2f21; padding: 16px 18px;
  border-radius: var(--radius-md); margin-bottom: 18px;
  border-left: 4px solid #c0442f;
}
.suivi-annule strong { display: block; font-size: 1rem; margin-bottom: 6px; }
.suivi-annule p { margin: 0 0 8px; font-weight: 400; line-height: 1.5; }
.annule-aide { font-size: .84rem; opacity: .85; }
.annule-aide a { text-decoration: underline; font-weight: 600; }

.bloc-suivi {
  background: var(--color-mint); border-radius: var(--radius-md);
  padding: 16px 18px; margin-bottom: 18px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap;
}
.bloc-suivi .product-brand { color: var(--color-forest); }

.liste-articles { list-style: none; padding: 0; margin: 0; }
.liste-articles li {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 9px 0; border-bottom: 1px solid var(--color-line); font-size: .9rem;
}
.liste-articles li:last-child { border-bottom: none; }

.confirmation { text-align: center; padding: 48px 24px; }
.confirmation .coche {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--color-forest-light); color: #fff;
  font-size: 2rem; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}

/* ---------- administration ---------- */
.tuiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-top: 12px; }
.tuile {
  background: var(--surface); border: 1px solid var(--color-line);
  border-radius: var(--radius-md); padding: 20px;
}
.tuile-val { display: block; font-size: 1.7rem; font-weight: 800; color: var(--color-titre); line-height: 1.1; }
.tuile-lbl { font-size: .78rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .04em; }

.carte-admin {
  background: var(--surface); border: 1px solid var(--color-line);
  border-radius: var(--radius-md); padding: 24px; margin-bottom: 20px;
}

/* ---------- ligne compacte cliquable (commandes / annonces a valider) :
   une ligne resumee dans la liste, tout le detail sur une vue a part ---------- */
button.ligne-cliquable {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; width: 100%; text-align: left; font: inherit; color: inherit;
  background: var(--surface); border: 1px solid var(--color-line); border-radius: var(--radius-sm);
  padding: 14px 18px; margin-bottom: 10px; cursor: pointer; transition: border-color .15s;
}
button.ligne-cliquable:hover, button.ligne-cliquable:focus-visible { border-color: var(--color-forest-light); }
.miniature-commande { width: 56px; height: 56px; flex: 0 0 56px; display: grid; place-items: center; overflow: hidden; border-radius: 8px; background: var(--surface-2); font-size: 1.35rem; }
.miniature-commande img { width: 100%; height: 100%; object-fit: cover; }
.ligne-cliquable-principal { min-width: 0; }
.ligne-cliquable-titre { display: block; font-weight: 700; color: var(--color-titre); }
.ligne-cliquable-sous { display: block; font-size: .82rem; color: var(--color-text-muted); margin-top: 2px; }
.ligne-cliquable-infos { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.ligne-cliquable-info { font-size: .85rem; color: var(--color-text-muted); white-space: nowrap; }
.ligne-cliquable-chevron { color: var(--color-text-muted); font-size: 1.2rem; flex-shrink: 0; }
.carte-admin-corps { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; }
.carte-admin h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--color-text-muted); margin-bottom: 8px; }
.adresse { white-space: pre-line; font-size: .92rem; margin: 0; }
.bloc-edition { background: var(--surface-2); border-radius: var(--radius-md); padding: 20px; }
.bloc-edition label, .fiche label, .fiche-client-corps label {
  display: block; font-size: .82rem; font-weight: 600;
  color: var(--color-text); margin-bottom: 14px;
}
.bloc-edition input, .bloc-edition select, .bloc-edition textarea,
.fiche input, .fiche select, .fiche textarea,
.fiche-client-corps input, .fiche-client-corps select, .fiche-client-corps textarea {
  width: 100%; margin-top: 5px; padding: 10px 12px; font-size: .92rem;
  border: 1px solid var(--color-line); border-radius: var(--radius-sm);
  font-family: var(--font-body); background: var(--surface); color: var(--color-text);
}
[data-recherche-commandes] {
  display: block; width: 100%; padding: 12px 14px; font-size: .95rem;
  border: 1px solid var(--color-line); border-radius: var(--radius-sm);
  font-family: var(--font-body); background: var(--surface); color: var(--color-text);
}
.details-adresse {
  margin: -2px 0 16px; padding-top: 10px; border-top: 1px dashed var(--color-line);
}
.details-adresse summary {
  cursor: pointer; font-size: .82rem; font-weight: 600;
  color: var(--color-forest); list-style: none; margin-bottom: 4px;
}
.details-adresse summary::-webkit-details-marker { display: none; }
.details-adresse summary::before { content: "â–¸ "; }
.details-adresse[open] summary::before { content: "â–¾ "; }
.details-adresse label { margin-top: 10px; }

.etiquette {
  font-size: .7rem; font-weight: 700; padding: 3px 10px;
  border-radius: 999px; vertical-align: middle; margin-left: 6px;
  background: var(--surface-2); color: var(--color-text-muted);
}
/* colonne Client de la table Clients (admin) : "Nom (pseudo)" sur ordinateur,
   juste le pseudo sur mobile (voir .col-secondaire juste en dessous). */
.table-admin-mobile-seul { display: none; }
@media (max-width: 980px) {
  /* onglet Clients (admin) sur mobile : seules les 3 premieres colonnes
     (Client/E-mail/TÃ©lÃ©phone) restent affichees, pour tout voir sans avoir a
     faire defiler la table horizontalement - le reste (pays, compteurs,
     statut...) est deja consultable dans la fiche plein ecran du client. */
  .table-admin .col-secondaire { display: none; }
  .table-admin-mobile-masque { display: none; }
  .table-admin-mobile-seul { display: inline; }
}

/* ---------- fiche client plein ecran (panneau admin, onglet Clients) ---------- */
.ligne-client { cursor: pointer; }
.ligne-client:hover { background: var(--surface-2); }
/* Signalement pas encore ouvert (onglet Clients > Signalements) : teinte
   vive pour le reperer d'un coup d'oeil - redevient blanc des qu'on l'ouvre. */
.ligne-non-lue { background: #fff6d8; color: #2a2f2c; }
.ligne-non-lue:hover { background: #fdedb0; }
.fiche-client-plein-ecran {
  position: fixed; inset: 0; z-index: 600; background: var(--surface);
  display: flex; flex-direction: column;
}
.fiche-client-barre {
  display: flex; align-items: center; gap: 12px; flex: 0 0 auto;
  padding: 14px 20px; padding-top: calc(14px + env(safe-area-inset-top, 0px));
  border-bottom: 1px solid var(--color-line);
}
.fiche-client-retour {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%; border: none; flex: 0 0 auto;
  background: var(--surface-2); color: var(--color-text); cursor: pointer;
}
/* Sur PC, la fiche d'apercu (admin, voir ouvrirFicheAnnonceAdmin) masque
   l'entete complet du site : elle a deja sa propre barre "Aperçu" au-dessus,
   pas la peine d'empiler deux barres. Sur mobile l'entete reste discret
   (juste le logo), on le laisse tel quel. */
@media (min-width: 981px) {
  body.mode-apercu-admin .site-header { display: none; }
}
.fiche-client-retour svg { width: 20px; height: 20px; }
.fiche-client-corps { flex: 1; overflow-y: auto; padding: 24px; max-width: 1000px; margin: 0 auto; width: 100%; }
.fiche-client-entete { display: flex; align-items: center; gap: 16px; }
.fiche-client-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: .88rem; }

/* Admin : sous-onglets des onglets regroupés (Forum, Transactions, Réglages) */
.tab-nav-sous { margin: 0 0 18px; }
.tab-nav-sous button { font-size: .9rem; }

/* Admin > Paiements échoués : tableau sur ordinateur, cartes sur téléphone */
.paiements-echoues-cartes { display: none; flex-direction: column; gap: 10px; }
.paiement-echoue-carte {
  display: flex; flex-direction: column; gap: 4px; width: 100%; text-align: left; cursor: pointer;
  padding: 12px 14px; border: 1px solid var(--color-line); border-radius: var(--radius-md);
  background: var(--surface); color: var(--color-text); font: inherit;
}
.paiement-echoue-haut { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .85rem; }
@media (max-width: 760px) {
  .paiements-echoues-cartes { display: flex; }
  .paiements-echoues-table { display: none; }
}

/* Pays d'inscription hors France (panneau admin, onglet Clients) : encadre
   rouge bien visible - un simple signal de vigilance en cas de fraude
   potentielle, jamais une accusation, jamais visible hors de l'admin. */
.alerte-pays-etranger {
  display: inline-block; font-weight: 700; font-size: .82rem;
  color: #8f2f21; background: #fdeceb; border: 1.5px solid #c0442f;
  border-radius: var(--radius-sm); padding: 3px 9px;
}
.etiquette-nouvelle    { background: #fdf0d5; color: #8a6100; }
.etiquette-payee       { background: var(--color-mint); color: var(--color-forest); }
.etiquette-preparation { background: #e2ecfa; color: #23507f; }
.etiquette-expediee    { background: #e5e0f7; color: #4a3990; }
.etiquette-livree      { background: var(--color-forest-light); color: #fff; }
.etiquette-annulee     { background: #fdeceb; color: #8f2f21; }
.etiquette-pause       { background: #ece7dd; color: #6b5d3f; }

.table-admin {
  width: 100%; border-collapse: collapse; background: var(--surface);
  border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-card);
}
.table-admin th, .table-admin td {
  padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--color-line); font-size: .9rem;
}
.table-admin th {
  background: var(--surface-2); font-size: .76rem; text-transform: uppercase;
  letter-spacing: .05em; color: var(--color-text-muted);
}
.table-admin tr:last-child td { border-bottom: none; }

/* ---------- loupe : photo agrandie et zoomable ---------- */
.loupe {
  display: none; position: fixed; inset: 0; z-index: 400;
  align-items: center; justify-content: center;
  background: rgba(10, 16, 14, .94);
}
.loupe.ouverte { display: flex; }
.loupe img {
  max-width: 92vw; max-height: 86vh; object-fit: contain;
  user-select: none; touch-action: pinch-zoom;
  transition: transform .12s ease-out;
}
.loupe-fermer {
  position: absolute; top: 18px; right: 22px;
  width: 40px; height: 40px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.12); color: #fff;
  font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.loupe-fermer:hover { background: rgba(255,255,255,.22); }
.loupe-aide {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.7); font-size: .78rem; white-space: nowrap;
}
@media (max-width: 640px) { .loupe-aide { display: none; } }

/* fiche article (fenÃªtre) */
.fiche-modale { display: none; }
.fiche-modale.ouverte {
  /* z-index 700 : doit rester au-dessus de la conversation plein ecran
     mobile (500) et de la fiche client admin plein ecran (600), sinon la
     fenetre s'ouvre bien mais reste cachee derriere - invisible, comme si
     le clic n'avait rien fait. */
  display: block; position: fixed; inset: 0; z-index: 700;
  overflow-y: auto; padding: 40px 20px;
}
.fiche-fond { position: fixed; inset: 0; background: rgba(23,35,31,.55); }
.fiche {
  position: relative; max-width: 720px; margin: 0 auto;
  background: var(--surface); border-radius: var(--radius-lg); padding: 28px;
  box-shadow: 0 24px 60px rgba(0,0,0,.3);
}
.fiche header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.fiche header h3 { margin: 0; }
.grille-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.fiche .case { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.fiche .case input { width: auto; margin: 0; }
.fiche-actions { display: flex; gap: 12px; margin-top: 20px; }

/* pop-up "deposer une annonce" (voir js/boutique.js) */
.fiche-popup-annonce { max-width: 440px; text-align: center; }
.fiche-popup-annonce-fermer {
  position: absolute; top: 14px; right: 14px; font-size: 1.3rem;
}
.fiche-popup-annonce .btn-block { margin-top: 8px; }

/* notification */
.notif {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 120%);
  z-index: 300; padding: 14px 24px; border-radius: 999px;
  font-weight: 600; font-size: .92rem; box-shadow: var(--shadow-card-hover);
  transition: transform .28s ease; max-width: 90vw;
}
.notif.visible { transform: translate(-50%, 0); }
.notif-ok { background: var(--color-forest); color: #fff; }
.notif-erreur { background: #8f2f21; color: #fff; }

.tuiles-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) {
  .layout-panier, .carte-admin-corps, .grille-2 { grid-template-columns: 1fr; }
  .tuiles, .tuiles-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .suivi { flex-wrap: wrap; gap: 12px; }
  .suivi .etape { flex: 0 0 30%; }
  .suivi .etape::before { display: none; }
  .ligne-panier { grid-template-columns: 1fr auto; row-gap: 10px; }
  .table-admin { display: block; overflow-x: auto; }

  /* tuiles du tableau de bord admin : 3 par ligne plutot qu'empilees, avec
     un intitule abrege quand la version complete ne tient pas - plus
     compact, tout tient sur l'ecran sans defiler autant. */
  .tuiles { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .tuile { padding: 10px 8px; }
  .tuile-val { font-size: 1.05rem; }
  .tuile-lbl { font-size: .6rem; line-height: 1.2; }
  .tuile-note { display: none; }
  .txt-complet { display: none; }
  .txt-court { display: inline; }
}

/* Bandeau affiche quand le site est ouvert sans le serveur (DEMARRER.bat) */
.bandeau-hors-serveur {
  background: #8f2f21; color: #fff;
  padding: 14px 20px; text-align: center;
  font-size: .9rem; line-height: 1.5;
}
.bandeau-hors-serveur code {
  background: rgba(255,255,255,.18); padding: 2px 7px;
  border-radius: 4px; font-size: .92em;
}

/* =========================================================================
   PHOTOS DES ARTICLES â€” galerie client et gestionnaire admin
   ========================================================================= */

/* ---------- galerie sur la fiche produit ---------- */
.galerie-vignettes {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 10px; margin-top: 14px;
}
.galerie-vignette {
  padding: 0; border: 2px solid var(--color-line); background: var(--surface-2);
  border-radius: var(--radius-sm); overflow: hidden; cursor: pointer;
  aspect-ratio: 1; transition: border-color .15s ease, transform .15s ease;
}
.galerie-vignette:hover { transform: translateY(-2px); }
.galerie-vignette.active { border-color: var(--color-forest); }
.galerie-vignette img { width: 100%; height: 100%; object-fit: cover; }


/* ---------- gestionnaire de photos (admin) ---------- */
.bloc-photos {
  margin: 22px 0 6px; padding-top: 20px;
  border-top: 1px solid var(--color-line);
}
.bloc-photos h4 {
  font-size: .8rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--color-text-muted); margin-bottom: 12px;
}
.compteur-photos {
  float: right; font-weight: 700; color: var(--color-forest-light);
  letter-spacing: 0;
}
.photos-grille {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px;
}
.photo-vignette {
  position: relative; margin: 0; aspect-ratio: 1;
  border-radius: var(--radius-sm); overflow: hidden;
  background: var(--surface-2); cursor: grab;
  border: 1px solid var(--color-line);
}
.photo-vignette img { width: 100%; height: 100%; object-fit: cover; }
.photo-vignette.en-deplacement { opacity: .4; }
.photo-principale {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: var(--color-forest); color: #fff;
  font-size: .62rem; font-weight: 700; text-align: center;
  padding: 3px 2px; text-transform: uppercase; letter-spacing: .04em;
}
.photo-suppr {
  position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; cursor: pointer; line-height: 1;
  background: rgba(23,35,31,.72); color: #fff; font-size: 1rem;
}
.photo-suppr:hover { background: #8f2f21; }

.photo-ajout {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; aspect-ratio: 1; cursor: pointer; text-align: center;
  border: 2px dashed var(--color-line); border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--color-text-muted);
  font-size: .68rem; line-height: 1.25; transition: border-color .15s ease, color .15s ease;
}
.photo-ajout:hover { border-color: var(--color-forest-light); color: var(--color-forest); }
.photo-plus { font-size: 1.5rem; font-weight: 300; line-height: 1; }

/* ---------- reorganisation des blocs de la page d'accueil ---------- */
.blocs-ordre { display: flex; flex-direction: column; gap: 8px; max-width: 420px; }
.bloc-ordre-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--color-line);
  border-radius: var(--radius-sm); padding: 10px 14px;
  font-weight: 600; font-size: .9rem; cursor: grab;
}
.bloc-ordre-item.en-deplacement { opacity: .4; }
.bloc-ordre-item .poignee { color: var(--color-text-muted); font-size: 1rem; }

/* ---------- image d'accueil (admin) ---------- */
.hero-image-admin { display: flex; align-items: flex-start; gap: 16px; margin-top: 8px; flex-wrap: wrap; }
.hero-image-admin img, .hero-image-admin video, .hero-image-admin iframe {
  width: 140px; height: 90px; object-fit: cover;
  border-radius: var(--radius-sm); border: 1px solid var(--color-line);
  background: var(--surface-2);
}
.hero-image-admin img[hidden], .hero-image-admin video[hidden], .hero-image-admin iframe[hidden] { display: none; }
.hero-video-choix {
  border: 1px solid var(--color-line); border-radius: var(--radius-sm);
  padding: 10px; display: flex; flex-direction: column;
}
.hero-video-choix[hidden] { display: none; }

/* vignette dans le tableau des articles */
.cellule-article { display: flex; align-items: center; gap: 12px; }
.mini-photo {
  width: 46px; height: 46px; flex: 0 0 46px;
  object-fit: cover; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--color-line);
}

@media (max-width: 640px) {
  .photos-grille, .galerie-vignettes { grid-template-columns: repeat(3, 1fr); }
}

/* =========================================================================
   VIGNETTES DU PANIER ET MOYENS DE PAIEMENT
   ========================================================================= */

/* ---------- vignette d'article dans le panier ---------- */
.vignette-panier {
  display: block; width: 88px; height: 88px;
  border: 1px solid var(--color-line); border-radius: var(--radius-sm);
  background: var(--surface-2); overflow: hidden; flex: 0 0 88px;
  transition: border-color .15s ease;
}
.vignette-panier:hover { border-color: var(--color-forest-light); }
.vignette-panier img {
  width: 100%; height: 100%;
  object-fit: contain;              /* illustration : entiere, sur son fond */
  padding: 6px;
}
.vignette-panier.est-photo img {
  object-fit: cover;                /* vraie photo : elle remplit le cadre */
  padding: 0;
}

.ligne-infos a:hover strong { color: var(--color-forest); }
.ligne-dispo { font-size: .78rem; font-weight: 600; margin-top: 4px; }
.ligne-dispo.ok { color: var(--color-grade-a); }
.ligne-dispo.ko { color: var(--color-warn); }

/* ---------- recapitulatif de la page commande ---------- */
.recap-articles { margin-bottom: 18px; }
.recap-ligne {
  display: grid; grid-template-columns: 60px 1fr auto;
  gap: 12px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--color-line);
}
.recap-ligne .vignette-panier { width: 60px; height: 60px; flex-basis: 60px; }
.recap-ligne .ligne-total { min-width: 0; font-size: .95rem; }
.recap-ligne strong { font-size: .92rem; line-height: 1.3; display: block; }

/* ---------- badges des moyens de paiement ---------- */
.paiements {
  margin-top: 20px; padding-top: 18px;
  border-top: 1px solid var(--color-line);
}
.paiements-titre {
  display: block; font-size: .74rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--color-text-muted); margin-bottom: 12px; text-align: center;
}
.paiements-logos {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
}
.paiements-logos img {
  height: 38px; width: auto;
  border-radius: var(--radius-sm);
  transition: transform .15s ease;
}
.paiements-logos img:hover { transform: translateY(-2px); }

/* ligne "moyens de paiement" sous le prix, fiche produit catalogue (comme
   Leboncoin) - distincte de .paiements (recap panier/commande) */
.paiement-catalogue { margin: 10px 0 6px; }
.paiement-catalogue-ligne { display: flex; align-items: center; gap: 10px; }
.paiement-catalogue-ligne img { height: 22px; width: auto; border-radius: 3px; }
.paiement-catalogue-logos-secondaires { display: flex; gap: 8px; margin-top: 8px; }
.paiement-catalogue-logos-secondaires img { height: 26px; width: auto; border-radius: 3px; }

/* "Modes de remise" sur la fiche annonce (petites annonces) */
.mode-remise-ligne { display: flex; align-items: flex-start; gap: 12px; }
.mode-remise-ligne img { width: 34px; height: 34px; flex: 0 0 auto; border-radius: var(--radius-sm); }

/* mention courte sous le prix, sur la fiche annonce (petites annonces) */
.mention-remise-main-propre {
  display: inline-flex; align-items: center; gap: 6px; margin: 8px 0 0;
  font-size: .85rem; font-weight: 600; color: var(--color-forest);
}
.mention-remise-main-propre svg { width: 16px; height: 16px; flex: 0 0 auto; }

/* tags "Appareils compatibles" (formulaire Vendre + fiche annonce publiee) */
.tags-compatible { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tag-compatible {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-2); border-radius: 999px; padding: 5px 6px 5px 12px;
  font-size: .85rem; font-weight: 600;
}
.tag-compatible button {
  background: none; border: none; cursor: pointer; color: var(--color-text-muted);
  font-size: 1.05rem; line-height: 1; padding: 2px 6px; border-radius: 50%;
}
.tag-compatible button:hover { background: rgba(0,0,0,.08); color: var(--color-text); }
.tag-compatible-lecture { padding: 5px 12px; }

/* recherche produit (formulaire Vendre) : barre globale + lignes par categorie */
.recherche-produit-globale {
  background: var(--color-forest); border-radius: var(--radius-md);
  padding: 16px 20px; color: #fff;
}
.recherche-produit-globale label { display: block; font-weight: 700; margin-bottom: 8px; }
.recherche-produit-globale input {
  background: var(--surface); color: var(--color-text);
  border: none; border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 1rem; width: 100%;
}
.lignes-categorie-produit { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.ligne-categorie-produit { display: grid; grid-template-columns: 140px 1fr; align-items: center; gap: 14px; }
.ligne-categorie-produit label { font-weight: 600; }
@media (max-width: 560px) {
  .ligne-categorie-produit { grid-template-columns: 1fr; gap: 4px; }
}
.champ-recherche-categorie { position: relative; }
.champ-recherche-categorie input, .ligne-categorie-produit > input[data-item-categorie] {
  width: 100%; padding: 10px 12px; border: 1px solid var(--color-line);
  border-radius: var(--radius-sm); font-size: .95rem;
  background: var(--surface); color: var(--color-text);
}
.suggestions-categorie {
  position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--color-line); border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0,0,0,.12); max-height: 260px; overflow-y: auto;
}
.suggestions-categorie button {
  display: flex; align-items: baseline; gap: 8px; width: 100%; text-align: left;
  padding: 9px 12px; background: none; border: none; border-bottom: 1px solid var(--surface-2);
  cursor: pointer; font-size: .92rem;
}
.suggestions-categorie button:last-child { border-bottom: none; }
.suggestions-categorie button:hover { background: var(--surface-2); }
.suggestions-categorie button .form-note { margin-left: auto; white-space: nowrap; }

@media (max-width: 640px) {
  .ligne-panier { grid-template-columns: 68px 1fr auto; row-gap: 12px; }
  .vignette-panier { width: 68px; height: 68px; flex-basis: 68px; }
  .ligne-panier .ligne-total { grid-column: 2 / 4; text-align: left; }
}

/* =========================================================================
   ANNULATION ET SUPPRESSION DE COMMANDE (admin)
   ========================================================================= */

.actions-risquees {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--color-line);
}
.btn-danger-doux {
  background: none; border: 1px solid #d8b3ac; color: #8f2f21;
  padding: 7px 14px; border-radius: 999px;
  font-size: .8rem; font-weight: 600; cursor: pointer;
  font-family: var(--font-body);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn-danger-doux:hover { background: #8f2f21; color: #fff; border-color: #8f2f21; }
.deja-annulee {
  font-size: .8rem; font-weight: 700; color: #8f2f21;
  background: #fdeceb; padding: 7px 14px; border-radius: 999px;
}

.encart-annulation {
  background: #fdeceb; border-left: 4px solid #c0442f;
  border-radius: var(--radius-sm); padding: 14px 16px; margin-top: 16px;
}
.encart-annulation strong {
  display: block; font-size: .78rem; text-transform: uppercase;
  letter-spacing: .05em; color: #8f2f21; margin-bottom: 6px;
}
.encart-annulation p { margin: 0 0 6px; font-size: .92rem; color: #6b2418; }
.encart-annulation .form-note { margin: 0; }

/* fenÃªtre de confirmation Ã©troite */
.fiche-etroite { max-width: 540px; }
.motifs-rapides {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  margin: -6px 0 16px;
}
.motifs-rapides > span {
  font-size: .76rem; color: var(--color-text-muted); font-weight: 600;
  width: 100%; margin-bottom: 2px;
}
.puce-motif {
  background: var(--surface-2); border: 1px solid var(--color-line);
  border-radius: 999px; padding: 5px 12px;
  font-size: .76rem; cursor: pointer; color: var(--color-text);
  font-family: var(--font-body);
  transition: background .15s ease, border-color .15s ease;
}
.puce-motif:hover {
  background: var(--color-mint); border-color: var(--color-forest-light);
  color: var(--color-forest);
}

/* =========================================================================
   FICHE ADRESSE, TABLEAU DE BORD DÃ‰TAILLÃ‰, BLOC INSCRIPTION
   ========================================================================= */

/* ---------- adresse ligne par ligne (admin) ---------- */
.fiche-adresse {
  background: var(--surface-2); border-radius: var(--radius-sm);
  padding: 4px 14px; margin-top: 4px;
}
.ligne-adresse {
  display: grid; grid-template-columns: 108px 1fr auto;
  align-items: center; gap: 12px; padding: 8px 0;
  border-bottom: 1px solid var(--color-line); font-size: .9rem;
}
.ligne-adresse:last-child { border-bottom: none; }
.libelle-adresse {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--color-text-muted); font-weight: 700; padding-top: 2px;
}
.valeur-adresse { font-weight: 600; color: var(--color-titre); word-break: break-word; }
.copie-ligne {
  width: 26px; height: 26px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--color-line);
  border-radius: var(--radius-sm); color: var(--color-text-muted);
  font-size: .85rem; line-height: 1; cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.copie-ligne:hover { background: var(--color-mint); border-color: var(--color-forest-light); color: var(--color-forest); }
.copie-ligne.copie-ligne-ok { background: var(--color-forest); border-color: var(--color-forest); color: #fff; }
.carte-admin h4 .link-btn { float: right; text-transform: none; letter-spacing: 0; }

/* ---------- tuiles du tableau de bord ---------- */
.tuile { display: flex; flex-direction: column; gap: 2px; }
.tuile-note {
  font-size: .72rem; color: var(--color-text-muted);
  margin-top: 4px; line-height: 1.35;
}
.tuile-forte {
  background: var(--color-forest); border-color: var(--color-forest);
}
.tuile-forte .tuile-val { color: #fff; }
.tuile-forte .tuile-lbl { color: var(--color-mint); }
.tuile-forte .tuile-note { color: rgba(217,239,230,.75); }
.tuile-annule { border-color: #d8b3ac; background: #fdeceb; }
.tuile-annule .tuile-val { color: #8f2f21; }

/* ---------- invitation Ã  crÃ©er un compte ---------- */
.bloc-inscription {
  background: var(--color-mint); border-radius: var(--radius-lg);
  padding: 40px; text-align: center; margin-top: 24px;
}
.bloc-inscription h2 { margin-bottom: 8px; }
.bloc-inscription p {
  color: var(--color-forest); max-width: 50ch;
  margin: 0 auto; line-height: 1.6;
}
.bloc-inscription .hero-actions { justify-content: center; }

/* ---------- badge livraison ---------- */
.paiement-livraison { border-top: none; padding-top: 0; margin-top: 18px; }
.paiement-livraison .paiements-logos img { height: 42px; }

/* ---------- avis clients ---------- */
.avis-liste { display: flex; flex-direction: column; gap: 16px; max-width: 820px; margin-top: 8px; }
.avis-carte {
  display: flex; gap: 18px; background: var(--surface);
  border: 1px solid var(--color-line); border-radius: var(--radius-md);
  padding: 18px; align-items: flex-start;
}
.avis-photo {
  width: 84px; height: 84px; flex: 0 0 84px; object-fit: cover;
  border-radius: var(--radius-sm); background: var(--surface-2);
}
.avis-corps { flex: 1; min-width: 0; }
.avis-entete { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.avis-produit { font-weight: 700; color: var(--color-forest); }
.avis-produit:hover { text-decoration: underline; }
.avis-date { font-size: .78rem; color: var(--color-text-muted); white-space: nowrap; }
.avis-texte { margin: 0 0 8px; color: var(--color-text); line-height: 1.5; }
.avis-auteur { font-size: .85rem; font-weight: 700; color: var(--color-text-muted); }

/* ---------- laisser un avis (mon compte) ---------- */
.avis-prompt { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--color-line); }
.avis-prompt textarea {
  width: 100%; margin-top: 6px; padding: 10px 12px; font-size: .92rem;
  border: 1px solid var(--color-line); border-radius: var(--radius-sm);
  font-family: var(--font-body); background: var(--surface); color: var(--color-text);
}

/* ---------- notes en etoiles (1 a 5) ---------- */
.etoiles-champ { margin: 12px 0; }
.etoiles-champ-label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: 4px; }
.etoiles { display: inline-flex; gap: 2px; }
.etoiles button {
  background: none; border: none; cursor: pointer; padding: 2px;
  font-size: 1.35rem; line-height: 1; color: var(--color-line);
  transition: color .1s ease;
}
.etoiles button.pleine { color: var(--color-warn); }
.etoiles-affichage { display: inline-flex; gap: 1px; color: var(--color-warn); font-size: .8rem; letter-spacing: 1px; }
.etoiles-affichage .etoile-vide { color: var(--color-line); }
.questionnaire-retrait {
  width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 32px);
  box-sizing: border-box; overflow-y: auto; margin: auto; padding: 24px;
  border: 1px solid var(--color-line); border-radius: 16px;
  background: var(--surface); color: var(--color-text);
  box-shadow: 0 16px 60px #0004;
}
.stats-annonce { display:flex; justify-content:flex-end; align-items:center; gap:22px; margin-top:14px; color:var(--color-text-muted); font-size:.9rem; }
.stats-annonce span { display:inline-flex; align-items:center; gap:6px; min-width:42px; }
.stats-annonce svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.stats-annonce-admin { margin-top:0; justify-content:flex-start; gap:12px; white-space:nowrap; }
.carte-localisation { overflow:hidden; border-radius:12px; margin-top:12px; height:300px; border:1px solid var(--color-line); position:relative; }
.carte-localisation iframe { width:100%; height:100%; border:0; }
.carte-localisation .form-note { padding:120px 16px; text-align:center; }
.carte-leaflet { width:100%; height:100%; background:#e6e0d5; cursor:pointer; }
.carte-recherche-lien { display:grid; place-items:center; height:100%; color:var(--color-forest); font-weight:600; }
.carte-grand-ecran { position:fixed; inset:0; z-index:10000; background:rgba(15,25,24,.75); display:flex; flex-direction:column; padding:20px; }
.carte-grand-barre { background:var(--surface); display:flex; justify-content:space-between; align-items:center; padding:10px 14px; border-radius:10px 10px 0 0; }
.carte-grand-barre button { border:0; background:transparent; font-size:1.8rem; line-height:1; cursor:pointer; color:var(--color-titre); }
.carte-grand-corps { flex:1; min-height:0; overflow:hidden; border-radius:0 0 10px 10px; background:#e6e0d5; }
@media (max-width:700px) { .carte-grand-ecran { padding:0; } .carte-grand-barre { border-radius:0; padding:14px 16px; } }
@media (max-width: 700px) {
  .stats-annonce { justify-content:space-around; border-top:1px solid var(--color-line); padding-top:11px; margin-top:14px; }
}
.questionnaire-retrait::backdrop { background: #0008; }
.questionnaire-retrait h2 { font-size: 1.5rem; margin-bottom: 10px; }
.questionnaire-retrait fieldset { border: 0; padding: 0; margin: 20px 0; min-width: 0; }
.questionnaire-retrait legend { font-weight: 700; margin-bottom: 10px; }
.questionnaire-retrait label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; cursor: pointer; }
.questionnaire-retrait input[type="radio"] { width: 18px; height: 18px; flex: 0 0 18px; margin-top: 3px; accent-color: var(--color-forest); }
.retrait-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.retrait-actions .btn { white-space: normal; }
.badge-fondateur {
  display: inline-flex; align-items: center; gap: 7px; max-width: 100%;
  box-sizing: border-box; padding: 6px 10px; margin: 4px 8px 6px 0;
  border: 1px solid #b99549; border-radius: 9px;
  background: #f7efd9; color: #674b12;
  font-size: .75rem; line-height: 1.35; font-weight: 700;
  vertical-align: middle;
}
.badge-fondateur svg { width: 23px; height: 23px; flex: 0 0 23px; }
.badge-fondateur-marque { display: block; font-size: .65rem; letter-spacing: .06em; }
.reputation-vendeur { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: .85rem; }
.reputation-chiffre { color: var(--color-text-muted); font-size: .82rem; }
.avis-notes { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 6px 0 8px; }
.avis-note-ligne { font-size: .78rem; color: var(--color-text-muted); display: flex; align-items: center; gap: 6px; }

@media (max-width: 640px) {
  .avis-carte { flex-direction: column; }
  .avis-photo { width: 100%; height: 160px; flex-basis: auto; }
  .ligne-adresse {
    grid-template-columns: 1fr auto; row-gap: 2px; column-gap: 10px;
    grid-template-areas: "libelle libelle" "valeur bouton";
  }
  .libelle-adresse { grid-area: libelle; }
  .valeur-adresse { grid-area: valeur; align-self: center; }
  .copie-ligne { grid-area: bouton; }
  .bloc-inscription { padding: 28px 20px; }
  /* le panneau de notifications reste toujours entierement visible, quelle que
     soit la position de la cloche dans l'en-tete */
  .cloche-panneau { position: fixed; top: calc(64px + env(safe-area-inset-top, 0px)); left: 12px; right: 12px; width: auto; max-width: none; }

  /* page d'accueil : le grand bandeau du haut disparait, on va droit au but */
  .hero { display: none; }

  /* catalogue : deux annonces par ligne au lieu d'une seule */
  .product-grid-3 { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  /* catalogue : les filtres se replient derriere un bouton "Filtrer" */
  .filtres-bouton-mobile { display: flex; margin-bottom: 16px; }
  .filters { display: none; }
  .filters.ouvert { display: block; margin-bottom: 24px; }
}

/* ---------- barre de navigation basse : mobile ET tablette ---------- */
@media (max-width: 980px) {
  .nav-bas {
    display: flex; justify-content: space-evenly; position: fixed; left: 0; right: 0; bottom: 0; z-index: 130;
    background: var(--surface); border-top: 1px solid var(--color-line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -6px 16px rgba(0,0,0,.06);
  }
  /* largeur au contenu (pas flex:1) : avec peu d'onglets, un flex:1 les
     etire chacun sur une large case invisible, ce qui donne de gros trous
     entre les icones. En gardant leur largeur naturelle et en les repartissant
     avec justify-content, l'espacement reste resserre et regulier quel que
     soit le nombre d'onglets affiches. */
  .nav-bas-item {
    position: relative;
    flex: 0 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px;
    color: var(--color-text-muted); font-size: .66rem; font-weight: 600;
    padding: 4px 6px; text-decoration: none;
  }
  .nav-bas-icone { font-size: 1.3rem; line-height: 1; position: relative; }
  .nav-bas-svg { width: 21px; height: 21px; display: block; }
  .nav-bas-plus-cercle .nav-bas-svg { width: 24px; height: 24px; }
  .nav-bas-icone-logo { display: flex; align-items: center; justify-content: center; }
  .nav-bas-icone-logo img {
    width: 21px; height: 21px; display: block; object-fit: contain;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,.4));
  }
  .nav-bas-item.active { color: var(--color-forest); }
  /* petite barre au-dessus de l'onglet actif, pour voir tout de suite ou on
     est - meme couleur verte que le reste du site, visible en clair et en
     sombre puisque c'est une couleur fixe, pas une couleur de texte/fond. */
  .nav-bas-item.active::before {
    content: ""; position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
    width: 28px; height: 3px; border-radius: 999px; background: var(--color-forest);
  }
  .nav-bas-badge {
    position: absolute; top: -5px; right: -9px; background: #8f2f21; color: #fff;
    font-size: .58rem; font-weight: 700; min-width: 15px; height: 15px; border-radius: 999px;
    display: flex; align-items: center; justify-content: center; padding: 0 3px;
    border: 2px solid var(--color-white); line-height: 1;
  }
  /* bouton "Publier" central : la barre est coupee en deux moities de
     largeur EGALE (50/50, quel que soit le nombre d'onglets dans chacune -
     connecte / deconnecte / admin), avec une marge interieure qui reserve
     la place du cercle. Le bouton lui-meme est positionne a 50% exactement,
     donc toujours au milieu, et ne peut plus jamais chevaucher un onglet
     voisin puisque cette place lui est reservee des deux cotes. */
  .nav-bas-avec-plus { justify-content: space-between; }
  .nav-bas-moitie { flex: 1; display: flex; justify-content: space-evenly; min-width: 0; }
  /* :last-of-type et pas :last-child - le bouton "+" (un <a>, pas un <div>)
     suit les deux moities dans le HTML, donc la seconde moitie n'est pas le
     dernier enfant de la barre, seulement le dernier <div>. */
  .nav-bas-moitie:first-of-type { padding-right: 38px; }
  .nav-bas-moitie:last-of-type { padding-left: 38px; }
  .nav-bas-plus-bouton {
    position: absolute; left: 50%; top: -22px; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    text-decoration: none; color: var(--color-forest); font-size: .66rem; font-weight: 700;
  }
  .nav-bas-plus-cercle {
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--color-forest); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; line-height: 1;
    box-shadow: 0 6px 16px rgba(27,75,67,.4);
    border: 3px solid var(--surface);
  }
  /* la barre de navigation basse ne doit pas cacher le pied de page */
  .site-footer { padding-bottom: 92px; }

  /* panneau admin : les onglets du haut (Commandes, Articles...) prennent
     trop de place et se scrollent mal au doigt. Sur mobile/tablette, on les
     remplace par la meme barre basse a icones que le reste du site. */
  /* meme traitement pour l'onglet "Mon compte" (Commandes/Favoris/Infos/
     RÃ©glages) : ses propres sous-onglets internes rejoignent aussi une
     barre du bas plutot que de rester en haut, illisible et malcommode. */
  .tab-nav-admin, .tab-nav-compte { display: none; }
  /* filtre "version du site" de l'onglet Trafic : reserve a la version PC,
     voir .trafic-filtre-version plus haut. */
  .trafic-filtre-version { display: none; }
  .section-admin, .section-compte { padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
  .nav-bas-admin, .nav-bas-compte {
    display: flex; justify-content: space-evenly; position: fixed; left: 0; right: 0; bottom: 0; z-index: 130;
    background: var(--surface); border-top: 1px solid var(--color-line);
    padding: 6px 2px calc(6px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -6px 16px rgba(0,0,0,.06);
  }
  .nav-bas-admin button, .nav-bas-compte button, .nav-bas-compte a {
    position: relative;
    flex: 0 1 auto; display: flex; flex-direction: column; align-items: center; gap: 2px;
    color: var(--color-text-muted); font-size: .6rem; font-weight: 600;
    padding: 4px 8px; background: none; border: none; font-family: var(--font-body); cursor: pointer;
    text-decoration: none;
  }
  .nav-bas-admin button .nav-bas-icone, .nav-bas-compte button .nav-bas-icone, .nav-bas-compte a .nav-bas-icone { font-size: 1.2rem; line-height: 1; }
  .nav-bas-admin button.active, .nav-bas-compte button.active, .nav-bas-compte a.active { color: var(--color-forest); }
  .nav-bas-admin button.active::before, .nav-bas-compte button.active::before {
    content: ""; position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
    width: 28px; height: 3px; border-radius: 999px; background: var(--color-forest);
  }

  /* en-tete compact (mobile ET tablette) : plus de menu "trois traits" -
     toute la navigation se fait desormais par la barre du bas, deja sous
     les yeux (voir .nav-bas plus haut). A la place, la loupe de recherche
     (la meme qu'en version PC, qui se deplie au clic) ; logo centre ;
     panier et notifications a droite. */
  .nav-links { display: none; }
  .nav-bar { position: relative; }
  .nav-bar > .brand {
    position: absolute; left: 50%; top: 50%;
    transform: translate(-50%, -50%);
  }
  /* position:relative + z-index : le champ deplie doit passer AU-DESSUS du
     logo centre (lui-meme en position:absolute, donc naturellement au-dessus
     de tout element non positionne, meme avec un fond plein). */
  .recherche-entete { display: flex; order: 1; position: relative; z-index: 2; }
  .nav-actions { order: 2; }
  /* Mon compte / Se connecter en bouton quittent l'en-tete : deja
     accessibles depuis la barre du bas. Le panier reste visible. */
  .nav-actions a[data-si-connecte],
  .nav-actions a[data-si-deconnecte] { display: none !important; }
}

/* ---------- RÃ©glages (Mon compte > ParamÃ¨tres) ---------- */
.ligne-reglage {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  cursor: pointer;
  font-weight: 600;
  border-bottom: 1px solid var(--color-line);
}
.choix-theme .ligne-reglage:last-child { border-bottom: none; }
.ligne-reglage input { width: 18px; height: 18px; accent-color: var(--color-forest); cursor: pointer; }

/* ---------- notification "installer l'application" ---------- */
/* Imite une vraie notification de telephone : descend du haut, se ferme
   toute seule au bout de 20s ou d'un clic sur la croix. Ne s'affiche que
   sur mobile Android, dans le navigateur (jamais depuis l'application
   elle-meme, deja installee). */
.notif-appli {
  position: fixed; top: env(safe-area-inset-top, 0px); left: 50%;
  width: min(360px, 92vw); z-index: 500;
  transform: translate(-50%, -130%);
  transition: transform .35s cubic-bezier(.22, 1, .36, 1);
  margin-top: 8px;
}
.notif-appli.visible { transform: translate(-50%, 0); }
.notif-appli-carte {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--surface); border: 1px solid var(--color-line);
  border-radius: 16px; padding: 12px 12px 12px 10px;
  box-shadow: 0 12px 28px rgba(0,0,0,.18);
}
.notif-appli-icone {
  flex: none; width: 36px; height: 36px; border-radius: 10px;
  background: var(--color-forest); display: flex; align-items: center; justify-content: center;
}
.notif-appli-icone img { width: 22px; height: 22px; }
.notif-appli-corps { flex: 1; min-width: 0; }
.notif-appli-entete {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
}
.notif-appli-app {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--color-text-muted);
}
.notif-appli-quand { font-size: .68rem; color: var(--color-text-muted); flex: none; }
.notif-appli-titre { font-size: .92rem; font-weight: 700; color: var(--color-titre); margin-top: 2px; }
.notif-appli-texte { font-size: .82rem; color: var(--color-text-muted); margin-top: 2px; line-height: 1.35; }
.notif-appli-lien {
  display: inline-block; margin-top: 8px; font-size: .82rem; font-weight: 700;
  color: var(--color-forest); text-decoration: none;
}
.notif-appli-fermer {
  flex: none; background: none; border: none; cursor: pointer; padding: 4px;
  color: var(--color-text-muted); font-size: 1rem; line-height: 1; margin: -4px -4px 0 0;
}

/* ---------- page "TÃ©lÃ©charger l'application" ---------- */
.telecharger-hero {
  background: radial-gradient(120% 160% at 100% 0%, rgba(75,180,147,.35) 0%, rgba(75,180,147,0) 55%),
              linear-gradient(155deg, var(--color-forest) 0%, rgba(0,0,0,.6) 100%),
              var(--color-forest);
  color: #fff; padding: 56px 0;
}
.telecharger-hero-grille { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.telecharger-hero .eyebrow { color: var(--color-mint); }
.telecharger-hero h1 { color: #fff; margin-top: 4px; }
.telecharger-texte { color: rgba(230,240,235,.85); max-width: 48ch; margin-top: 12px; font-size: 1.02rem; }
.telecharger-hero-visuel { display: flex; align-items: center; justify-content: center; }
.telecharger-hero-visuel img { width: 55%; max-width: 220px; opacity: .9; filter: drop-shadow(0 18px 30px rgba(0,0,0,.35)); }

.bouton-android {
  display: inline-flex; align-items: center; gap: 14px;
  background: #fff; color: var(--color-forest);
  border-radius: 16px; padding: 14px 22px; margin-top: 28px;
  text-decoration: none; box-shadow: 0 14px 30px rgba(0,0,0,.25);
  transition: transform .15s ease;
}
.bouton-android:hover { transform: translateY(-2px); }
.bouton-android-icone { width: 34px; height: 34px; flex: none; }
.bouton-android span { display: flex; flex-direction: column; text-align: left; }
.bouton-android strong { font-size: 1.02rem; }
.bouton-android small { font-size: .74rem; color: var(--color-text-muted); font-weight: 600; }

.telecharger-atouts {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: -28px;
}
.telecharger-atout {
  background: var(--surface); border: 1px solid var(--color-line); border-radius: var(--radius-md);
  padding: 24px; box-shadow: var(--shadow-card);
}
.telecharger-atout-icone { font-size: 1.6rem; }
.telecharger-atout h3 { margin: 10px 0 6px; font-size: 1.02rem; }
.telecharger-atout p { color: var(--color-text-muted); font-size: .9rem; margin: 0; }

/* ---------- petites annonces (marketplace entre particuliers) ---------- */
/* La grille et les cartes reutilisent .product-grid / .product-card du
   catalogue (voir plus haut) - meme apparence exacte, un seul style a
   maintenir. Ne restent ici que les bouts propres a la fiche annonce. */
.carte-annonce-sans-photo {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: var(--color-text-muted);
}
.carte-annonce-prix { font-weight: 800; font-size: 1.15rem; color: var(--color-forest); }
.annonce-lieu { display: flex; align-items: center; gap: 6px; }
.annonce-lieu svg { width: 13px; height: 13px; flex: 0 0 auto; color: var(--color-forest); }
.badge-paypal-annonce { height: 15px; width: auto; border-radius: 3px; }

.fiche-annonce-grille { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; }
.vendeur-bloc { margin: 14px 0; }
@media (max-width: 900px) {
  .fiche-annonce-grille { grid-template-columns: 1fr; }
}

.carte-parrainage { border: 1px solid #d7b86f; background: linear-gradient(145deg, var(--surface), rgba(241,210,132,.16)); }
.progression-parrainage { height: 12px; overflow: hidden; border-radius: 999px; background: var(--surface-2); margin: 16px 0 8px; }
.progression-parrainage span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#1b4b43,#d0a747); }
.ligne-code-parrainage { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-top:6px; }
.ligne-code-parrainage code { padding:10px 14px; border-radius:8px; background:var(--surface-2); font-size:1rem; letter-spacing:.08em; }

.confirmation-email-page { min-height:100vh; display:grid; place-items:center; padding:32px 16px; background:var(--surface-2); }
.confirmation-email-carte { width:min(100%,560px); text-align:center; padding:36px; }
.confirmation-email-logo { width:min(230px,70%); height:auto; margin:0 auto 24px; }
.confirmation-email-icone { width:68px; height:68px; display:grid; place-items:center; margin:0 auto 18px; border-radius:50%; background:var(--color-mint); color:var(--color-forest); font-size:2rem; }
.confirmation-email-carte h1 { margin-top:8px; }
.confirmation-email-spam { text-align:left; padding:16px; margin:22px 0; border:1px solid #d7b86f; border-radius:12px; background:rgba(241,210,132,.16); }
.confirmation-email-spam p { margin:6px 0 0; }

/* fiche annonce sur ordinateur (comme Leboncoin) : la carte titre/prix
   chevauche legerement le bas des photos, et le vendeur + les boutons de
   contact forment un encadre a part dans la colonne de droite, aligne avec
   les photos - inactif sur mobile (le contenu y garde son empilement
   normal, .fiche-annonce-corps reste display:block par defaut). */
@media (min-width: 981px) {
  .fiche-annonce-grille {
    grid-template-columns: 2.3fr 1fr;
    grid-template-areas: "photos vendeur" "titreprix vendeur" "details .";
    align-items: start; gap: 20px 32px;
  }
  .fiche-annonce-photos-conteneur { grid-area: photos; }
  .fiche-annonce-corps { display: contents; }
  .fiche-annonce-corps-titre-prix {
    grid-area: titreprix; position: relative; z-index: 2;
    margin-top: -24px; background: var(--surface); border-radius: 0 0 var(--radius-md) var(--radius-md);
    padding: 20px 24px 6px; box-shadow: 0 8px 20px rgba(0,0,0,.07);
  }
  .fiche-annonce-corps-vendeur {
    grid-area: vendeur; align-self: start;
    background: var(--surface); border: 1px solid var(--color-line); border-radius: var(--radius-md);
    padding: 20px; box-shadow: 0 6px 20px rgba(0,0,0,.06);
  }
  .fiche-annonce-corps-vendeur .fiche-annonce-vendeur-carte {
    margin-top: 0; padding: 0; border: none; background: transparent;
  }
  .fiche-annonce-corps-vendeur-boutons { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
  .fiche-annonce-corps-details { grid-area: details; margin-top: 8px; }

  /* boutons du vendeur sur sa propre annonce (Mettre en pause / Republier /
     Modifier / Supprimer / Annuler la vente) : espaces (au lieu d'etre
     colles) et colores selon leur position - vert en haut, blanc au milieu
     (ne s'inverse pas au survol), rouge en bas. .btn-danger (Supprimer,
     Annuler la vente) garde toujours son rouge, peu importe la position. */
  .fiche-annonce-boutons-proprio-desktop {
    display: flex; flex-direction: column; gap: 10px; margin-top: 14px;
  }
  .fiche-annonce-boutons-proprio-desktop > .btn:nth-child(1):not(.btn-danger) {
    background: var(--color-forest); color: var(--color-white); border-color: var(--color-forest);
  }
  .fiche-annonce-boutons-proprio-desktop > .btn:nth-child(1):not(.btn-danger):hover {
    background: var(--color-forest-light);
  }
  .fiche-annonce-boutons-proprio-desktop > .btn:nth-child(2):not(.btn-danger) {
    background: var(--color-white); color: var(--color-forest); border-color: var(--color-forest);
  }
  .fiche-annonce-boutons-proprio-desktop > .btn:nth-child(2):not(.btn-danger):hover {
    background: var(--color-white); color: var(--color-forest);
  }
  .fiche-annonce-boutons-proprio-desktop > .btn:nth-child(3) {
    background: #b3261e; color: var(--color-white); border-color: #b3261e;
  }
  .fiche-annonce-boutons-proprio-desktop > .btn:nth-child(3):hover { background: #8f2f21; }

  /* bouton unique (ex. "Contacter le vendeur" quand le vendeur n'a pas de
     PayPal.me) : vert plein, comme le bouton du haut ci-dessus */
  .fiche-annonce-corps-vendeur-boutons > .btn:only-child:not(.btn-danger) {
    background: var(--color-forest); color: var(--color-white); border-color: var(--color-forest);
  }
  .fiche-annonce-corps-vendeur-boutons > .btn:only-child:not(.btn-danger):hover {
    background: var(--color-forest-light);
  }
}

/* photo principale de la fiche annonce : une seule photo visible, avec le
   nombre total en badge - clic pour ouvrir la galerie complete */
.fiche-annonce-photo-principale {
  position: relative; display: block; width: 100%; padding: 0; margin: 0;
  border: none; border-radius: var(--radius-md); overflow: hidden;
  background: var(--surface-2); cursor: pointer;
}
.fiche-annonce-photo-principale img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block;
}
.badge-nb-photos {
  position: absolute; bottom: 10px; right: 10px; display: flex; align-items: center; gap: 4px;
  background: rgba(0,0,0,.65); color: #fff; font-size: .8rem; font-weight: 700;
  padding: 4px 10px; border-radius: 999px;
}

/* fiche annonce sur ordinateur : photo principale + grille de miniatures
   (comme Leboncoin), en plus de la photo unique ci-dessus qui reste celle
   utilisee sur mobile (voir le seuil 980px plus bas) */
.fiche-annonce-photos-pc { display: none; }
@media (min-width: 981px) {
  .fiche-annonce-photos { display: none; }
  .fiche-annonce-photos-pc {
    display: grid; grid-template-columns: 1.5fr 1fr; gap: 8px; height: 420px;
    border-radius: var(--radius-md); overflow: hidden; position: relative;
  }
  .fiche-annonce-photo-principale-pc {
    position: relative; display: block; width: 100%; height: 100%; padding: 0; margin: 0;
    border: none; background: var(--surface-2); cursor: pointer; overflow: hidden;
  }
  .fiche-annonce-photo-principale-pc img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .fiche-annonce-miniatures-pc {
    display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: 8px; height: 100%;
  }
  .fiche-annonce-miniature-pc {
    position: relative; display: block; width: 100%; height: 100%; padding: 0; margin: 0;
    border: none; background: var(--surface-2); cursor: pointer; overflow: hidden; border-radius: var(--radius-sm);
  }
  .fiche-annonce-miniature-pc img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .fiche-annonce-photo-boutons-pc {
    position: absolute; top: 14px; right: 14px; z-index: 3; display: flex; gap: 10px;
  }
}

/* galerie plein ecran : liste verticale de toutes les photos (clic sur la
   photo principale de la fiche). Toujours en theme sombre, comme une
   visionneuse photo classique, quel que soit le theme choisi sur le site. */
.galerie-photos {
  position: fixed; inset: 0; z-index: 500; background: #0b0d0c;
  flex-direction: column;
}
.galerie-entete {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; background: #0b0d0c; border-bottom: 1px solid rgba(255,255,255,.1);
}
.galerie-retour {
  background: transparent; border: none; color: #fff; font-size: 1.5rem; line-height: 1;
  cursor: pointer; padding: 4px 8px;
}
.galerie-entete h2 {
  margin: 0; font-size: 1.02rem; font-weight: 700; color: #fff;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.galerie-liste {
  flex: 1; overflow-y: auto; padding: 14px 12px 40px; display: flex;
  flex-direction: column; gap: 14px; -webkit-overflow-scrolling: touch;
}
/* chaque photo en "carte" rectangulaire (format carte bleue), pas prise sur
   toute la hauteur de l'ecran meme pour une photo tres verticale */
.galerie-liste img {
  width: 100%; max-width: 480px; aspect-ratio: 8 / 5; object-fit: cover;
  border-radius: 12px; display: block; margin: 0 auto; cursor: zoom-in;
  box-shadow: 0 4px 14px rgba(0,0,0,.35);
}

/* visionneuse plein ecran d'une seule photo, avec zoom */
.zoom-photo {
  position: fixed; inset: 0; z-index: 600; background: #000;
  align-items: center; justify-content: center; overflow: hidden;
}
.zoom-photo-fermer {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.14); color: #fff; font-size: 1.1rem; cursor: pointer;
}
.zoom-photo-cadre {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  touch-action: none;
}
.zoom-photo-cadre img {
  max-width: 100%; max-height: 100%; user-select: none; -webkit-user-drag: none;
  touch-action: none;
}

/* visionneuse ordinateur de la fiche annonce : grande photo + fleches +
   colonne de miniatures - equivalent PC de .galerie-photos (mobile) */
.lightbox-annonce-pc {
  position: fixed; inset: 0; z-index: 700; background: rgba(8,11,10,.94);
}
.lightbox-annonce-pc-fermer {
  position: absolute; top: 20px; right: 24px; z-index: 2;
  width: 42px; height: 42px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.14); color: #fff; font-size: 1.1rem; cursor: pointer;
}
.lightbox-annonce-pc-corps {
  display: flex; align-items: center; width: 100%; height: 100%; padding: 40px 60px; gap: 26px;
}
.lightbox-annonce-pc-nav {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.14); color: #fff; font-size: 1.4rem; cursor: pointer; line-height: 1;
}
.lightbox-annonce-pc-nav:disabled { opacity: .3; cursor: default; }
.lightbox-annonce-pc-photo {
  flex: 1; height: 100%; display: flex; align-items: center; justify-content: center; min-width: 0;
}
.lightbox-annonce-pc-photo img {
  max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--radius-sm);
  user-select: none;
}
.lightbox-annonce-pc-sidebar {
  flex: 0 0 260px; color: #fff; max-height: 100%; overflow-y: auto;
}
.lightbox-annonce-pc-compteur { opacity: .65; font-size: .85rem; margin: 0 0 4px; }
.lightbox-annonce-pc-titre { font-size: 1.05rem; font-weight: 700; margin: 0 0 16px; }
.lightbox-annonce-pc-miniatures { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lightbox-annonce-pc-miniatures img {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); cursor: pointer;
  border: 2px solid transparent; display: block;
}
.lightbox-annonce-pc-miniatures img.actif { border-color: var(--color-forest-light); }

/* icones flottantes sur la photo principale (retour / partager / favori) -
   masquees par defaut, visibles uniquement en plein ecran mobile plus bas */
.fiche-annonce-photo-boutons {
  display: none; position: absolute; top: 0; left: 0; right: 0; z-index: 3;
  align-items: center; justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 14px 0;
}
.fiche-annonce-photo-boutons-droite { display: flex; gap: 10px; }
.fiche-annonce-icone-bouton {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: rgba(20,24,22,.55); color: #fff; cursor: pointer; text-decoration: none;
  font-size: 1.2rem; line-height: 1;
}
.fiche-annonce-icone-bouton svg { width: 20px; height: 20px; }
.fiche-annonce-icone-bouton.actif { color: #ff5a5f; }

/* barre fixe "Contacter / Payer" en bas de l'ecran - plein ecran mobile
   uniquement (voir body.mode-fiche-annonce plus bas) */
.fiche-annonce-barre-bas {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 400;
  gap: 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--surface); border-top: 1px solid var(--color-line);
  box-shadow: 0 -6px 18px rgba(0,0,0,.08);
}
.fiche-annonce-barre-bas .btn {
  flex: 1; margin: 0; white-space: normal; text-align: center;
  padding: 10px 8px; font-size: .8rem; line-height: 1.15;
}
.fiche-annonce-spacer-bar { display: none; }

.fiche-annonce-section { margin-top: 22px; }
.fiche-annonce-section:not(:last-of-type) { padding-bottom: 22px; border-bottom: 1px solid color-mix(in srgb, var(--color-forest-light) 30%, transparent); }
.fiche-annonce-section h2 { font-size: 1.05rem; margin: 0 0 10px; }
.fiche-annonce-info-ligne {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--color-line); font-size: .92rem;
}
.fiche-annonce-info-ligne:last-child { border-bottom: none; }
.fiche-annonce-info-ligne span { color: var(--color-text-muted); }
.badge-lieu {
  display: inline-flex; align-items: center; gap: 5px; margin: 10px 0 20px;
  background: var(--surface-2); border-radius: 999px; padding: 5px 12px;
  font-size: .82rem; font-weight: 600;
}
.badge-lieu svg { width: 14px; height: 14px; flex: 0 0 auto; color: var(--color-forest); }
.description-annonce-texte {
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical;
  overflow: hidden; white-space: pre-wrap;
}
.description-annonce-texte.etendue { -webkit-line-clamp: unset; overflow: visible; }
.fiche-annonce-vendeur-carte {
  display: flex; align-items: flex-start; gap: 14px; margin-top: 18px;
  padding: 16px; border-radius: var(--radius-md); background: var(--surface-2);
}
.fiche-annonce-vendeur-carte-texte { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.fiche-annonce-vendeur-carte-texte strong { font-size: 1rem; }
.fiche-annonce-vendeur-carte-texte .reputation-vendeur {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
}
/* bouton "Contacter le vendeur" aux couleurs du site (vert de la marque),
   plutot que le contour neutre de .btn-outline utilise ailleurs */
.btn-outline-brand { background: transparent; border-color: var(--color-forest); color: var(--color-forest); }
.btn-outline-brand:hover { background: var(--color-forest); color: var(--color-white); }

/* Sur mobile/appli, une fiche annonce ouverte prend tout l'ecran (comme
   Leboncoin) : l'entete/pied de page/barre du bas du site disparaissent, la
   photo passe en plein largeur avec ses icones flottantes, et une barre
   "Contacter / Payer" reste fixee en bas pendant que la page defile derriere.
   Desactive au-dela de 980px (meme seuil que le reste du site) : sur
   ordinateur, la fiche reste la grille normale a deux colonnes. */
@media (max-width: 980px) {
  body.mode-fiche-annonce .disclaimer-bar,
  body.mode-fiche-annonce .site-header,
  body.mode-fiche-annonce .site-footer,
  body.mode-fiche-annonce .nav-bas,
  body.mode-fiche-annonce [data-fiche-breadcrumb],
  body.mode-fiche-annonce .fiche-annonce-boutons-proprio-desktop {
    display: none !important;
  }
  body.mode-fiche-annonce [data-section-fiche-annonce] { padding: 0 !important; }
  body.mode-fiche-annonce [data-section-fiche-annonce] .container { padding: 0; max-width: none; }
  body.mode-fiche-annonce .fiche-annonce-photos { position: relative; }
  body.mode-fiche-annonce .fiche-annonce-photo-principale,
  body.mode-fiche-annonce .fiche-annonce-photo-principale img,
  body.mode-fiche-annonce .carte-annonce-sans-photo {
    border-radius: 0;
  }
  body.mode-fiche-annonce .fiche-annonce-photo-boutons { display: flex; }
  body.mode-fiche-annonce .fiche-annonce-corps {
    padding: 16px; margin-top: -16px; position: relative; z-index: 2;
    background: var(--surface); border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 20px rgba(0,0,0,.08);
  }
  body.mode-fiche-annonce .fiche-annonce-barre-bas { display: flex; }
  body.mode-fiche-annonce .fiche-annonce-spacer-bar { display: block; height: 84px; }
}

.grille-photos-annonce { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.vignette-photo-annonce {
  width: 90px; height: 90px; object-fit: cover; border-radius: var(--radius-sm);
  border: 1px solid var(--color-line);
}

/* fenÃªtre d'avertissement lÃ©gal, centrÃ©e, Ã  la publication d'une annonce */
.modale-fond {
  position: fixed; inset: 0; z-index: 400; background: rgba(6,12,10,.6);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modale-carte {
  background: var(--surface); border-radius: var(--radius-lg); padding: 28px;
  max-width: 480px; width: 100%; box-shadow: 0 24px 48px rgba(0,0,0,.35);
  max-height: 90vh; overflow-y: auto;
}
.modale-titre-alerte { color: #c0442f; margin-top: 0; }

/* ---------- fenetre de signalement (messagerie) ---------- */
.choix-raison-signalement { display: flex; flex-direction: column; margin-top: 6px; }
.raison-signalement {
  display: flex; align-items: center; gap: 14px; padding: 14px 4px;
  border-bottom: 1px solid var(--color-line); cursor: pointer; font-weight: 600;
}
.raison-signalement:last-child { border-bottom: none; }
.raison-signalement input { width: 20px; height: 20px; flex: 0 0 auto; accent-color: var(--color-forest); }
.encart-info-signalement {
  background: #e3f0fc; color: #1b4a70; border-radius: var(--radius-sm);
  padding: 14px 16px; font-size: .85rem; line-height: 1.5; margin-top: 18px;
}

/* ---------- messagerie interne (contact acheteur/vendeur) ---------- */
.conversation-item {
  display: flex; align-items: center; gap: 14px; padding: 14px;
  background: var(--surface); border: 1px solid var(--color-line);
  border-radius: var(--radius-md); text-decoration: none; color: var(--color-text);
  margin-bottom: 10px; transition: transform .15s ease;
}
.conversation-item:hover { transform: translateY(-2px); }
.conversation-item.non-lue { border-color: var(--color-forest-light); }
.conversation-photo {
  width: 56px; height: 56px; flex: 0 0 56px; border-radius: var(--radius-sm);
  background: var(--surface-2); overflow: hidden; display: flex;
  align-items: center; justify-content: center; font-size: 1.4rem; color: var(--color-text-muted);
}
.conversation-photo img { width: 100%; height: 100%; object-fit: cover; }
.conversation-corps { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.conversation-corps strong { font-size: .95rem; }
.conversation-annonce { font-size: .82rem; color: var(--color-text-muted); }
.conversation-dernier {
  font-size: .82rem; color: var(--color-text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.conversation-item.non-lue .conversation-dernier { color: var(--color-text); font-weight: 600; }
.conversation-meta {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
}
.conversation-date { font-size: .72rem; color: var(--color-text-muted); white-space: nowrap; }
.conversation-badge {
  background: var(--color-forest); color: #fff; font-size: .7rem; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 999px; display: flex;
  align-items: center; justify-content: center; padding: 0 5px;
}

.fil-entete-personne {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border-bottom: 1px solid var(--color-line);
}
.fil-entete-personne-texte { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fil-entete-personne-texte strong { font-size: 1.05rem; }
.fil-entete-note { font-size: .82rem; font-weight: 700; color: var(--color-forest); }
.fil-entete-note-vide { font-weight: 500; color: var(--color-text-muted); }
.fil-entete-menu { position: relative; margin-left: auto; flex: 0 0 auto; }
.fil-entete-menu-bouton {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%; border: none; cursor: pointer;
  background: none; color: var(--color-text);
}
.fil-entete-menu-bouton:hover { background: var(--surface-2); }
.fil-entete-menu-bouton svg { width: 20px; height: 20px; }
.fil-entete-menu-panneau {
  display: none; position: absolute; top: 42px; right: 0; z-index: 50;
  min-width: 220px; background: var(--surface); border: 1px solid var(--color-line);
  border-radius: var(--radius-md); box-shadow: var(--shadow-card-hover);
  padding: 6px; flex-direction: column;
}
.fil-entete-menu-panneau.ouvert { display: flex; }
.fil-entete-menu-panneau button {
  display: block; width: 100%; text-align: left; background: none; border: none;
  padding: 11px 12px; border-radius: var(--radius-sm); cursor: pointer;
  font-family: var(--font-body); font-size: .88rem; color: var(--color-text);
}
.fil-entete-menu-panneau button:hover { background: var(--surface-2); }

/* Message envoye par un administrateur (moderation/litige) : bulle sobre et
   neutre, bien distincte de celle de l'acheteur (grise, "autre") et de celle
   du vendeur/de-moi (verte) - toujours etiquetee "ReDrones", jamais le nom
   personnel de l'administrateur qui l'a ecrit. */
.bulle-message.admin {
  align-self: center; background: var(--surface); border: 1.5px solid var(--color-forest-light);
  max-width: 82%;
}
.bulle-admin-label { display: block; font-size: .74rem; color: var(--color-forest); margin-bottom: 3px; }
.fil-entete-annonce {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border-bottom: 1px solid var(--color-line); text-decoration: none; color: var(--color-text);
}
.fil-entete-annonce-photo {
  width: 52px; height: 52px; flex: 0 0 52px; border-radius: var(--radius-sm);
  background: var(--surface-2); overflow: hidden; display: flex;
  align-items: center; justify-content: center; font-size: 1.3rem; color: var(--color-text-muted);
}
.fil-entete-annonce-photo img { width: 100%; height: 100%; object-fit: cover; }
.fil-entete-annonce-texte { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fil-entete-annonce-texte strong {
  font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fil-entete-annonce-texte span { font-size: .88rem; font-weight: 700; color: var(--color-forest); }
.suivi-vente {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--color-line);
  font-size: .85rem;
}
.suivi-vente .suivi-etat { color: var(--color-text); }
.paypal-bouton-zone { width: 100%; max-width: 260px; }
.fil-messages {
  padding: 16px; display: flex; flex-direction: column; gap: 10px;
  max-height: 50vh; overflow-y: auto;
}
.bulle-systeme {
  align-self: center; max-width: 92%; text-align: center;
  background: var(--surface-2); border-radius: var(--radius-md);
  padding: 8px 14px; font-size: .8rem; color: var(--color-text-muted);
}
.bulle-systeme span:first-child { display: block; color: var(--color-text); font-weight: 600; }
.bulle-systeme-date { font-size: .7rem; }
.bulle-a-propos {
  align-self: center; max-width: 92%; background: var(--surface-2);
  border: 1px solid var(--color-line); border-radius: var(--radius-md);
  padding: 12px 14px; margin-bottom: 4px;
}
.bulle-a-propos strong { display: block; font-size: .82rem; margin-bottom: 8px; }
.bulle-a-propos ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.bulle-a-propos li { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--color-text-muted); }
.bulle-a-propos li svg { width: 15px; height: 15px; flex: 0 0 15px; color: var(--color-forest); }
.bulle-message {
  max-width: 78%; padding: 10px 12px; border-radius: var(--radius-md);
  background: var(--surface-2);
}
.bulle-message p { margin: 0; white-space: pre-wrap; word-break: break-word; }
.bulle-message .bulle-date {
  display: block; font-size: .68rem; color: var(--color-text-muted); margin-top: 4px;
}
.bulle-message.de-moi {
  align-self: flex-end; background: var(--color-forest); color: #fff;
}
.bulle-message.de-moi .bulle-date { color: currentColor; opacity: .72; }

/* Selecteur de style dans la modale "Style de mes bulles" (messages.html) */
.grille-styles-bulle {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 14px;
}
.carte-style-bulle {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 12px 10px; border: 1.5px solid var(--color-line); border-radius: var(--radius-md);
  background: var(--surface); cursor: pointer; font-family: inherit; color: var(--color-text);
  font-size: .82rem;
}
.carte-style-bulle.choisi { border-color: var(--color-forest); box-shadow: 0 0 0 2px var(--color-mint); }
.apercu-style-bulle {
  display: inline-block; padding: 7px 12px; border-radius: var(--radius-md);
  background: var(--color-forest); color: #fff; font-size: .8rem;
}

/* Styles de bulles (reglage personnel, voir Mon compte / menu de conversation)
   - s'appliquent aussi bien aux messages "de moi" qu'a ceux de l'autre
   personne, chacun selon SON propre choix (meme principe que Snapchat : le
   style suit l'auteur du message, pas le lecteur). Deux selecteurs par regle :
   qualifie par .bulle-message (specificite suffisante pour l'emporter sur
   .bulle-message.de-moi juste au-dessus) pour les vrais messages, et par
   .apercu-style-bulle pour les pastilles de la modale "Style de mes bulles". */
.bulle-message.bulle-style-ciel,     .apercu-style-bulle.bulle-style-ciel     { background: linear-gradient(160deg,#eaf7fc,#c9e9f5); color: #1c4a5c; }
.bulle-message.bulle-style-horizon,  .apercu-style-bulle.bulle-style-horizon  { background: linear-gradient(150deg,#ffcf94,#ff8a63); color: #4a2410; }
.bulle-message.bulle-style-foret,    .apercu-style-bulle.bulle-style-foret    { background: linear-gradient(160deg,#173a30,#0f2620); color: #eaf3ec; }
.bulle-message.bulle-style-nuit,     .apercu-style-bulle.bulle-style-nuit     { background: #0c1210; color: #d9f7ec; box-shadow: inset 0 0 0 1px rgba(47,217,166,.35); }
.bulle-message.bulle-style-dune,     .apercu-style-bulle.bulle-style-dune     { background: linear-gradient(155deg,#f1e6cb,#e2cf9f); color: #4a3c1f; }
.bulle-message.bulle-style-or,       .apercu-style-bulle.bulle-style-or       { background: linear-gradient(150deg,#f7dd8a,#d6a83a); color: #4a3608; }
.bulle-message.bulle-style-batterie, .apercu-style-bulle.bulle-style-batterie { background: linear-gradient(155deg,#dcf3e6,#aee0c8); color: #173a2c; }
.bulle-message.bulle-style-helice,   .apercu-style-bulle.bulle-style-helice   { background: linear-gradient(155deg,#e7ecf1,#c6d2dd); color: #2b3a47; }
.bulle-message.bulle-style-sd,       .apercu-style-bulle.bulle-style-sd       { background: #f8f5ec; color: #3a3324; }
.accuse-drones {
  display: inline-flex; position: relative; width: 17px; height: 10px;
  vertical-align: middle; margin-left: 5px; top: -1px;
}
.accuse-drone {
  position: absolute; top: 0; left: 0; width: 10px; height: 10px; line-height: 0;
}
.accuse-drone svg { width: 100%; height: 100%; display: block; }
.accuse-drone-envoye { color: #e2703a; }
.accuse-drone-lu { left: 7px; color: #3ea87a; }
.form-message {
  display: flex; gap: 10px; align-items: flex-end; padding: 14px 16px;
  border-top: 1px solid var(--color-line);
}
.form-message textarea {
  flex: 1; resize: none; min-height: 44px; max-height: 140px;
  border: 1px solid var(--color-line); border-radius: var(--radius-sm);
  padding: 10px 12px; font-family: var(--font-body); background: var(--surface); color: var(--color-text);
}
.fil-retour-mobile {
  display: none; flex: 0 0 auto; align-items: center; justify-content: center;
  width: 32px; height: 32px; color: var(--color-text); text-decoration: none;
}
.fil-retour-mobile svg { width: 22px; height: 22px; }

/* Sur mobile/appli, une conversation ouverte prend tout l'ecran (comme
   Leboncoin) : l'entete/pied de page/barre du bas du site disparaissent, et
   le fil de discussion devient une vue plein ecran avec sa propre fleche de
   retour (voir .fil-retour-mobile ci-dessus). Desactive au-dela de 980px
   (meme seuil que le reste du site) : sur ordinateur, la conversation reste
   une simple carte dans la page, la fleche "Toutes mes conversations" au-
   dessus suffit deja a revenir en arriere. */
@media (max-width: 980px) {
  body.mode-conversation .disclaimer-bar,
  body.mode-conversation .site-header,
  body.mode-conversation .site-footer,
  body.mode-conversation .nav-bas,
  body.mode-conversation [data-page-titre],
  body.mode-conversation [data-retour-liste] {
    display: none !important;
  }
  /* !important sur les marges : [data-fil-conversation] et .carte-fil-
     conversation portent chacun un style="margin-top:...px" en ligne (utile
     pour l'espacement dans la mise en page ordinateur), et un style en ligne
     l'emporte toujours sur une regle de feuille externe a specificite egale -
     sans !important ici, ce reliquat de marge se serait ajoute en haut de la
     vue plein ecran mobile. */
  body.mode-conversation [data-fil-conversation] {
    display: flex !important; flex-direction: column;
    position: fixed; inset: 0; z-index: 500; margin: 0 !important;
    background: var(--surface);
  }
  body.mode-conversation .carte-fil-conversation {
    flex: 1; display: flex; flex-direction: column; min-height: 0;
    margin: 0 !important; border: none; border-radius: 0;
  }
  body.mode-conversation .fil-entete {
    flex: 0 0 auto;
    padding-top: env(safe-area-inset-top, 0px);
  }
  body.mode-conversation .fil-messages { flex: 1; max-height: none; }
  body.mode-conversation .form-message {
    flex: 0 0 auto;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  }
  .fil-retour-mobile { display: inline-flex; }
}

/* ---------- graphique "barres" (statistiques de trafic, admin) ---------- */
.graphique-barres {
  display: flex; align-items: flex-end; gap: 3px; height: 140px;
  background: var(--surface-2); border-radius: var(--radius-md); padding: 12px 10px 0;
}
.graphique-barres .barre {
  flex: 1; min-width: 2px; background: var(--color-forest-light);
  border-radius: 3px 3px 0 0; transition: background .15s ease;
}
.graphique-barres .barre:hover { background: var(--color-forest); }

/* Admin > Trafic : cases cliquables et détail d'une période */
.tuile-cliquable {
  font: inherit; color: inherit; text-align: left; width: 100%; cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.tuile-cliquable:hover, .tuile-cliquable:focus-visible {
  border-color: var(--color-forest-light); box-shadow: 0 2px 12px rgba(0, 0, 0, .07);
}
.trafic-detail-defilement { overflow-x: auto; margin-top: 12px; }
.trafic-detail-graphique {
  display: flex; gap: 4px; height: 240px; min-width: calc(var(--nb, 12) * 34px);
}
.trafic-detail-colonne { flex: 1; min-width: 28px; display: flex; flex-direction: column; align-items: center; }
.trafic-detail-zone { flex: 1; width: 100%; position: relative; }
.trafic-detail-barre {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: var(--color-forest-light); border-radius: 3px 3px 0 0;
}
.trafic-detail-colonne:hover .trafic-detail-barre { background: var(--color-forest); }
.trafic-detail-barre span {
  position: absolute; top: -17px; left: -6px; right: -6px; text-align: center;
  font-size: .68rem; color: var(--color-text-muted);
}
.trafic-detail-libelle { margin-top: 5px; font-size: .66rem; color: var(--color-text-muted); white-space: nowrap; }

@media (max-width: 900px) {
  .telecharger-hero-grille { grid-template-columns: 1fr; text-align: center; }
  .telecharger-texte { margin-left: auto; margin-right: auto; }
  .bouton-android { margin-left: auto; margin-right: auto; }
  .telecharger-hero-visuel { order: -1; }
  .telecharger-hero-visuel img { width: 30%; }
  .telecharger-atouts { grid-template-columns: 1fr; margin-top: 24px; }
}
