:root {
  --color-bg: #f7f8fa;
  --color-surface: #ffffff;
  --color-primary: #1a73e8;
  --color-primary-dark: #0f4fa8;
  --color-success: #1e8e5a;
  --color-text: #1c1c1e;
  --color-text-muted: #6b7280;
  --color-border: #e5e7eb;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

/* Liens "en ligne" dans du texte courant (CGU, "Se connecter", "verification de votre compte"...) -
   le reset ci-dessus (a { color: inherit; text-decoration: none; }) est volontaire pour la nav/les
   cartes d'annonce (deja evidemment cliquables visuellement), mais rend un lien perdu au milieu
   d'une phrase indiscernable du texte autour - on ne devine pas qu'il faut cliquer. Cette classe
   est a ajouter explicitement sur ce type de lien (voir register.html/mon-compte.html/etc. pour
   des exemples) plutot que de changer le reset global, qui reste correct pour tout le reste. */
.link-inline {
  color: var(--color-primary);
  text-decoration: underline;
  font-weight: 500;
}
.link-inline:hover, .link-inline:focus-visible { color: var(--color-primary-dark); }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 10px 24px;
  flex-wrap: nowrap;
  gap: 8px;
}
.logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-primary-dark);
  flex-shrink: 0;
  white-space: nowrap;
}
.logo span { color: var(--color-success); }
.nav-actions { display: flex; gap: 12px; align-items: center; }
.header-actions { display: flex; gap: 8px; align-items: center; flex-wrap: nowrap; }

/* Menu utilisateur deroulant : regroupe les liens secondaires pour eviter que le header
   deborde et tronque le logo quand le nombre de sections du site augmente. */
.user-menu { position: relative; }
.user-menu-trigger { white-space: nowrap; }
.user-menu-panel {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 200px;
  padding: 6px 0;
  z-index: 30;
}
.user-menu-panel.open { display: block; }
.user-menu-panel .dropdown-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  color: var(--color-text);
  text-decoration: none;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: inherit;
}
.user-menu-panel .dropdown-item:hover { background: #f4f6f8; }
.user-menu-panel hr { border: none; border-top: 1px solid var(--color-border); margin: 6px 0; }
.form-note.success {
    color: var(--color-success);
}

.form-note.error {
    color: #dc2626;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-outline { background: transparent; color: var(--color-primary); border: 1px solid var(--color-primary); }
.btn-outline:hover { background: #eef4fd; }
.btn-full { width: 100%; }

/* Hero */
/* Resserre volontairement le pave hero (etait 64px/80px de padding + gros titre/tagline) :
   il prenait plus de la moitie de la hauteur d'ecran et repoussait les annonces sous le pli.
   Objectif : que la premiere rangee d'annonces reste visible sans scroll. Une deuxieme passe
   (36px/40px -> 32px/28px, titre et badges legerement reduits) a fait de la place pour le
   bandeau publicitaire ci-dessous sans perdre le gain initial. */
.hero {
  background: linear-gradient(135deg, #0f4fa8 0%, #1a73e8 55%, #16a97a 100%);
  color: #fff;
  padding: 20px 0 16px;
}
.hero h1 {
  font-size: 1.55rem;
  line-height: 1.25;
  margin: 0 0 6px;
  font-weight: 800;
}
.hero p.tagline {
  max-width: 980px;
  font-size: 0.92rem;
  line-height: 1.45;
  opacity: 0.92;
  margin: 0 0 10px;
}

/* Boutons d'appel a l'action de la zone hero (fond bleu/vert) : "vendeur" en blanc plein,
   "acheteur" en contour blanc. Le titre mele vendeurs et acheteurs (decision Karim 18/10/2026). */
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; }
.hero-cta .btn { padding: 8px 16px; }
.btn-light { background: #fff; color: #0f4fa8; border: 1px solid #fff; font-weight: 700; }
.btn-light:hover { background: #eef4fd; }
.btn-ghost-light { background: transparent; color: #fff; border: 1px solid #fff; }
.btn-ghost-light:hover { background: rgba(255,255,255,0.15); }
.search-bar {
  background: #fff;
  border-radius: var(--radius);
  padding: 8px;
  display: flex;
  gap: 8px;
  box-shadow: var(--shadow);
  max-width: 720px;
}
.search-bar input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  padding: 12px 16px;
  font-size: 1rem;
  border-radius: 8px;
}
/* Lien "recherche avancee" colle au formulaire principal : garde le geste de recherche
   simple mis en avant, sans imposer les filtres a tout le monde. */
.advanced-search-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.88rem;
  color: #fff;
  text-decoration: underline;
  opacity: 0.9;
}
.advanced-search-link:hover { opacity: 1; }
.trust-badges {
  display: flex;
  gap: 20px;
  margin-top: 8px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  opacity: 0.95;
}
.trust-badges span { display: flex; align-items: center; gap: 6px; }

/* Bandeau d'auto-promotion de la page d'accueil (06/11/2026, BACKLOG point 21) : remplace l'ancien emplacement
   publicitaire vide. Un message a la fois, fin (une carte, pas une pleine section) pour ne pas reprendre
   l'espace regagne sur le hero et les categories. Rotation geree par js/home.js (initPromoBanner) ; sans
   JavaScript le premier message reste affiche. */
.ad-banner-section { padding: 10px 0 0; }
.promo-banner {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-height: 64px;
}
.promo-slide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
}
.promo-slide[hidden] { display: none; }
.promo-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.promo-text strong { font-size: 0.98rem; color: var(--color-text); }
.promo-text span { font-size: 0.85rem; color: var(--color-text-muted); }
.promo-cta { flex: 0 0 auto; white-space: nowrap; }
.promo-dots { display: flex; justify-content: center; gap: 6px; margin-top: 6px; min-height: 12px; }
.promo-dots button {
  width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%;
  background: #d5dae1; cursor: pointer;
}
.promo-dots button[aria-current="true"] { background: var(--color-primary); }
.promo-dots button:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
@media (max-width: 480px) {
  .promo-slide { flex-direction: column; align-items: stretch; gap: 8px; }
  .promo-cta { text-align: center; }
}

/* Sections */
section.block { padding: 48px 0; }
/* Categories et Recemment ajoutes sont les deux premieres sections apres le hero : padding
   resserre (24px au lieu de 48px) pour que la premiere rangee d'annonces remonte davantage.
   Garantie la plus longue et le systeme de verification, plus bas dans la page, gardent le
   padding standard. */
section.block.block-tight { padding: 16px 0; }
.block h2 {
  font-size: 1.5rem;
  margin: 0 0 6px;
}
.block p.subtitle {
  color: var(--color-text-muted);
  margin: 0 0 28px;
}
.block-tight p.subtitle { margin: 0 0 12px; }

/* Categories */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
}
.category-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.category-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.category-card .icon { font-size: 1.8rem; margin-bottom: 8px; }
.category-card .name { font-weight: 600; font-size: 0.9rem; }

/* Categories de la page d'accueil sur une seule ligne (scroll horizontal) plutot que sur
   deux lignes qui ajoutaient de la hauteur avant meme d'arriver aux annonces. Scope par id
   pour ne pas toucher le bloc "systeme de verification" plus bas, qui reste en grille. */
#categories-grid.categories-grid {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 14px;
  padding-bottom: 6px;
  scroll-snap-type: x proximity;
}
#categories-grid.categories-grid .category-card {
  flex: 0 0 auto;
  width: 112px;
  padding: 10px 8px;
  scroll-snap-align: start;
}
#categories-grid.categories-grid .category-card .icon { font-size: 1.4rem; margin-bottom: 4px; }
#categories-grid.categories-grid .category-card .name { font-size: 0.82rem; }

/* Listing cards */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.listing-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.listing-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.listing-card .thumb {
  height: 160px;
  background: #eef1f5 center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}
.listing-card .thumb-wrap { position: relative; overflow: hidden; }
.listing-card.is-sold .thumb { filter: grayscale(0.6) brightness(0.9); }
.sold-ribbon {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(180, 30, 30, 0.88);
  color: #fff;
  text-align: center;
  font-weight: 800;
  letter-spacing: 0.25em;
  font-size: 1.05rem;
  padding: 7px 0;
  pointer-events: none;
}
.demo-note {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(50% + 22px);
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}
.product-gallery .demo-note { top: 205px; font-size: 0.9rem; }
.product-gallery { position: relative; }
.product-gallery .sold-ribbon { top: 150px; font-size: 1.5rem; padding: 12px 0; }
.listing-card .body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.listing-card .title { font-weight: 600; font-size: 0.95rem; }
.listing-card .price { font-size: 1.15rem; font-weight: 800; color: var(--color-primary-dark); }
.badge-row { display: flex; gap: 6px; flex-wrap: wrap; }
.badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e6f4ea;
  color: var(--color-success);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge.level-high { background: #e6f4ea; color: var(--color-success); }
.badge.level-mid { background: #fff4e0; color: #a15c00; }
.badge.level-low { background: #f1f1f3; color: var(--color-text-muted); }
.warranty-pill {
  font-size: 0.78rem;
  color: var(--color-success);
  font-weight: 600;
}
.seller-line {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: auto;
}

/* Filters (recherche.html) */
.search-layout { display: grid; grid-template-columns: 260px 1fr; gap: 32px; padding: 32px 0; align-items: start; }
.filters-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
}
.filters-panel h3 { font-size: 1rem; margin: 0 0 16px; }
.filter-group { margin-bottom: 20px; }
.filter-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; }
.filter-group input, .filter-group select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 0.9rem;
}
.filter-row { display: flex; gap: 8px; }
.checkbox-group { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.checkbox-line { display: flex; align-items: center; gap: 12px; font-size: 0.9rem; }
.checkbox-line input[type="checkbox"] { width: 18px; height: 18px; margin: 0; flex-shrink: 0; }
.checkbox-line label { margin: 0; cursor: pointer; }

/* Choix Neuf / Occasion (vendre.html) : deux boutons pleine largeur plutot que des radios
   classiques, plus lisible pour un texte sur deux lignes que des boutons ronds alignes au centre. */
.condition-toggle { display: flex; gap: 10px; }
.condition-toggle input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.condition-toggle label {
  flex: 1;
  text-align: center;
  padding: 12px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  line-height: 1.4;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.condition-toggle label .sub { display: block; font-weight: 400; font-size: 0.8rem; color: var(--color-text-muted); }
.condition-toggle input[type="radio"]:checked + label {
  border-color: var(--color-primary-dark);
  background: var(--color-primary-dark);
  color: #fff;
}
.condition-toggle input[type="radio"]:checked + label .sub { color: rgba(255,255,255,0.85); }
.condition-toggle input[type="radio"]:focus-visible + label { outline: 2px solid var(--color-primary-dark); outline-offset: 2px; }
.results-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.results-count { color: var(--color-text-muted); font-size: 0.9rem; }
.empty-state { text-align: center; padding: 60px 0; color: var(--color-text-muted); }

/* Fiche produit (annonce.html) */
.product-layout { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; padding: 32px 0 64px; }
.product-gallery .main-image {
  background: #eef1f5;
  border-radius: var(--radius);
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
}
.product-gallery .thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.product-gallery .thumb-row .thumb-mini {
  width: 64px; height: 64px; border-radius: 8px; background: #eef1f5;
}
.product-info h1 { font-size: 1.5rem; margin: 0 0 6px; }
.product-info .price-block { font-size: 2rem; font-weight: 800; color: var(--color-primary-dark); margin: 8px 0; }
.price-block .new-price { font-size: 0.95rem; color: var(--color-text-muted); font-weight: 500; text-decoration: line-through; margin-left: 10px; }
.savings-note { color: var(--color-success); font-weight: 600; font-size: 0.9rem; }

.verification-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 20px 0;
}
.verification-panel h3 { margin: 0 0 12px; font-size: 1rem; }
.verification-panel .badge { margin-bottom: 6px; }

.info-table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.info-table td { padding: 8px 0; border-bottom: 1px solid var(--color-border); font-size: 0.9rem; }
.info-table td:first-child { color: var(--color-text-muted); width: 45%; }

.seller-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.seller-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.seller-meta { font-size: 0.85rem; color: var(--color-text-muted); }
.seller-meta strong { color: var(--color-text); font-size: 0.95rem; display: block; }

/* Formulaire vendre.html */
.form-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 640px;
  margin: 32px auto;
}
.form-card h1 { margin-top: 0; }
.form-row { margin-bottom: 18px; }
.form-row label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.form-row input:not([type="checkbox"]):not([type="radio"]), .form-row select, .form-row textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
}
/* Sans cette regle, une case a cocher heritait du width:100%/padding ci-dessus des qu'elle se
   trouvait dans un .form-row (voir register.html/mon-compte.html) - elle s'etirait sur toute la
   largeur et se retrouvait mal alignee avec son libelle au lieu d'etre une petite case carree.
   Meme gabarit que .checkbox-line input[type="checkbox"] (deja correct ailleurs sur le site),
   pour que toutes les cases a cocher du site aient la meme taille. */
.form-row input[type="checkbox"], .form-row input[type="radio"] {
  width: 18px;
  height: 18px;
  padding: 0;
  margin: 0;
  flex-shrink: 0;
}
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-note { font-size: 0.82rem; color: var(--color-text-muted); margin-top: -10px; margin-bottom: 18px; }
.alert { padding: 12px 16px; border-radius: 8px; font-size: 0.9rem; margin-bottom: 16px; }
.alert-success { background: #e6f4ea; color: var(--color-success); }
.alert-error { background: #fdecea; color: #b3261e; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 32px 0;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin-top: 40px;
}
/* Liens vers les pages legales obligatoires (mentions legales, CGV, confidentialite, cookies) -
   discrets (meme registre visuel que le reste du footer) mais toujours identifiables comme des
   liens (soulignes), contrairement au reset global sur "a" - voir la classe .link-inline plus haut
   pour le meme raisonnement applique au corps de page. */
.site-footer-links { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.site-footer-links a { color: var(--color-text-muted); text-decoration: underline; }
.site-footer-links a:hover, .site-footer-links a:focus-visible { color: var(--color-primary); }

@media (max-width: 860px) {
  .product-layout, .search-layout { grid-template-columns: 1fr; }
}

/* Zone hero sur petit ecran : titre un peu reduit, boutons cote a cote, barre de recherche
   qui ne deborde plus (verifie en 375px de large). */
@media (max-width: 480px) {
  .hero h1 { font-size: 1.4rem; }
  .hero p.tagline { font-size: 0.88rem; }
  .hero-cta .btn { flex: 1 1 0; padding: 10px 8px; font-size: 0.88rem; text-align: center; }
  .search-bar { padding: 6px; }
  .search-bar input { padding: 10px 10px; font-size: 0.95rem; }
  .search-bar .btn { padding: 10px 12px; }
  .trust-badges { gap: 8px 14px; margin-top: 8px; }
}

/* Page "Pourquoi TrustMarket ?" (pourquoi-trustmarket.html) */
.why-hero { padding: 36px 0 32px; }
.why-hero h1 { font-size: 2rem; }
.why-hero p.tagline { font-size: 1.02rem; margin-bottom: 18px; }
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 16px; }
.why-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 18px; }
.why-card h3 { font-size: 1.02rem; margin: 6px 0; }
.why-card p { margin: 0; color: var(--color-text-muted); font-size: 0.92rem; line-height: 1.5; }
.why-icon { font-size: 1.6rem; }
.why-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 20px; }
.why-panel { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 22px; }
.why-panel h2 { margin-top: 0; }
.why-list { padding-left: 18px; margin: 0 0 16px; line-height: 1.55; }
.why-list li { margin-bottom: 8px; }
.why-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; margin-top: 12px; }
.why-step { display: flex; flex-direction: column; gap: 4px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 16px; }
.why-step span:last-child { color: var(--color-text-muted); font-size: 0.9rem; }
.why-step-num { display: inline-flex; width: 28px; height: 28px; border-radius: 50%; background: var(--color-primary); color: #fff; align-items: center; justify-content: center; font-weight: 700; }
.why-final { text-align: center; margin: 28px 0 8px; }
.why-final .hero-cta { justify-content: center; }
.hero-link { background: #ffc83d; color: #1b2a49; text-decoration: none; align-self: center; font-weight: 700; padding: 8px 16px; border-radius: 8px; border: 1px solid #ffc83d; box-shadow: 0 2px 6px rgba(0,0,0,0.25); }
.hero-link:hover { background: #ffd566; }
@media (max-width: 480px) { .why-hero h1 { font-size: 1.5rem; } .hero-link { flex-basis: 100%; text-align: center; } }

/* Page "Aide et contact" (aide.html) - FAQ en accordeon, sans JavaScript. */
.faq details { border: 1px solid var(--color-border); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 8px; background: var(--color-surface); }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details[open] summary { margin-bottom: 6px; }
.faq details p { margin: 0; color: var(--color-text-muted); line-height: 1.5; }

/* Audit mobile (19/10/2026) : en-tete et marges adaptes aux petits ecrans (320-480 px).
   Avant : l'en-tete connecte (Vendre, messages, cloche, menu) debordait a 375 px et touchait les bords. */
@media (max-width: 480px) {
  .container { padding-left: 14px; padding-right: 14px; }
  .site-header .container { padding: 8px 14px; min-height: 56px; }
  .logo { font-size: 1.1rem; }
  .header-actions { gap: 4px; min-width: 0; }
  .header-actions .btn { padding: 7px 9px; font-size: 0.85rem; }
  .user-menu-trigger { max-width: 96px; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 360px) {
  .site-header .container { padding: 8px 10px; }
  .logo { font-size: 1rem; }
  .header-actions .btn { padding: 6px 7px; font-size: 0.8rem; }
  .user-menu-trigger { max-width: 72px; }
}

/* Audit mobile : champs et grilles de formulaire ne doivent jamais depasser l'ecran. */
input, select, textarea { max-width: 100%; box-sizing: border-box; }
.form-grid-2 > * { min-width: 0; }
#send-form input { min-width: 0; }
@media (max-width: 480px) { .form-grid-2 { grid-template-columns: 1fr; } }

/* Audit mobile : cartes de formulaire moins "tassees" et titres adaptes a 375 px. */
@media (max-width: 480px) {
  .form-card { padding: 18px 16px; margin: 14px auto; }
  .form-card h1 { font-size: 1.5rem; line-height: 1.25; }
  .form-card h2 { font-size: 1.15rem; }
}

/* Boutons d'action sous un champ de document (facture, preuve de garantie, masquage) : alignes,
   espaces et a la ligne sur mobile, sans que les libelles se tassent (23/10/2026). */
.doc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 6px; }
.doc-actions .btn { width: auto; white-space: normal; text-align: center; }
#warranty-proof-block { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--color-border); }
#warranty-proof-block .form-note, #redact-invoice-note, #redact-proof-note { margin: 4px 0; }
#redaction-panel h3 { margin: 0 0 8px; }

/* Aide contextuelle « ? » (24/10/2026) - voir js/aide-contextuelle.js */
.help-btn { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-left: 6px; padding: 0; border: 1px solid var(--color-border); border-radius: 50%; background: #fff; color: #1a73e8; font-size: 0.8rem; font-weight: 700; line-height: 1; cursor: pointer; vertical-align: middle; }
.help-btn:hover, .help-btn:focus-visible { background: #1a73e8; color: #fff; outline: none; }
.help-panel { position: absolute; z-index: 1000; box-sizing: border-box; max-width: calc(100vw - 24px); padding: 14px 16px; background: #fff; border: 1px solid var(--color-border); border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,.18); font-size: 0.92rem; line-height: 1.45; font-weight: normal; }
.help-panel.help-sheet { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto !important; max-width: none; max-height: 70vh; overflow-y: auto; border-radius: 14px 14px 0 0; }
.help-panel .help-title { margin: 0 24px 6px 0; font-size: 1rem; }
.help-panel p { margin: 0 0 8px; }
.help-panel .help-why { margin: 8px 0; padding: 8px 10px; background: #e8f5e9; border-left: 3px solid #2e7d32; border-radius: 4px; }
.help-panel .help-why p { margin: 4px 0 0; }
.help-panel .help-tip { color: #555; }
.help-panel .help-close { position: absolute; top: 6px; right: 8px; width: 28px; height: 28px; border: none; background: transparent; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.help-panel .help-more { font-size: 0.85rem; }
.alert-info { background: #e8f0fe; color: #1a3d7c; }
\n
/* Audit mobile (29/10/2026) - constats sur 35 pages en 360 px, voir BACKLOG.md point 8 :
   cibles tactiles trop petites (« ? » 22 px, liens du pied de page, boutons de l'en-tete), badges a 11,5 px,
   bouton « ? » ecrase dans un conteneur flex, note de formulaire qui recouvrait la liste deroulante du litige. */
.help-btn { flex: 0 0 auto; min-width: 22px; }
.form-row select + .form-note, .form-row input + .form-note, .form-row textarea + .form-note { margin-top: 6px; }
@media (max-width: 600px) {
  .help-btn { width: 32px; height: 32px; min-width: 32px; font-size: 0.95rem; margin-left: 4px; }
  .badge { font-size: 0.75rem; }
  .demo-note { font-size: 0.75rem; }
  .logo { display: inline-block; padding: 8px 0; }
  .site-header .btn { min-height: 38px; }
  .site-footer-links a { display: inline-block; padding: 8px 0; }
  .back-link { padding: 10px 0; margin-bottom: 4px; }
  .checkbox-line { min-height: 40px; }
  .checkbox-line input[type="checkbox"], .form-row input[type="checkbox"], .form-row input[type="radio"] { width: 22px; height: 22px; }
  label:has(> input[type="radio"]), label:has(> input[type="checkbox"]) { min-height: 40px; align-items: center; }
}

.back-link { display: inline-block; margin-bottom: 12px; }

/* Bandeau « Confirmez votre adresse email » : colle en haut sur ordinateur, mais sur telephone il occupait
   environ 30 % de l'ecran en permanence (audit mobile 29/10/2026) : il defile avec la page. */
.email-banner { position: sticky; top: 0; z-index: 100; }
@media (max-width: 600px) { .email-banner { position: static; } .help-more { display: inline-block; padding: 8px 0; } }

/* Libelle de champ suivi d'une precision (ex. frais d'envoi : « suggestion : 14.00 EUR ... ») : la precision passe
   a la ligne, en texte normal, au lieu de s'empiler en gras dans le libelle. */
.form-row label .form-note { display: block; font-weight: 400; margin: 2px 0 0; }
