/* ============================================
   Mimita Mie — Design system
   Palette tirée du logo : crème papier, brun croûte,
   rouge couvercle, blé doré, beige levain.
   ============================================ */

:root {
  --cream: #F7EDE0;
  --ivory: #FCF8F2;
  --paper: #FFFDFA;
  --brown: #3E2A1E;
  --brown-2: #5C3A22;
  --brown-3: #8A6A50;
  --red: #C0182F;
  --red-dark: #99101F;
  --red-light: #E23B52;
  --gold: #C9A227;
  --gold-light: #E0C378;
  --levain: #E8D5B7;
  --border: #E4D5C3;
  --border-2: #D6C0A6;
  --ok: #2E7D5E;
  --warn: #C97A0E;
  --shadow-sm: 0 2px 10px rgba(62, 42, 30, 0.06);
  --shadow: 0 8px 28px rgba(62, 42, 30, 0.10);
  --shadow-lg: 0 20px 60px rgba(62, 42, 30, 0.16);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 26px;
  --transition: all 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
  --font: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --display: 'Cormorant Garamond', 'Georgia', serif;
  --nav-h: 74px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  color: var(--brown);
  background: var(--cream);
  line-height: 1.65;
  font-size: 16px;
  overflow-x: hidden;
  /* Cormorant Garamond utilise par défaut des chiffres « à l'ancienne » : le 1 a la
     hauteur d'une minuscule et se lit comme un I majuscule (« 01 » devenait « 0I »).
     On force les chiffres alignés partout — la propriété s'hérite, et Inter est déjà
     en chiffres alignés, donc rien ne change côté sans-serif. */
  font-variant-numeric: lining-nums;
}

/* Grain de papier : une seule texture CSS, zéro image à télécharger. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.5;
  background-image:
    radial-gradient(rgba(138, 106, 80, 0.09) 1px, transparent 1px),
    radial-gradient(rgba(138, 106, 80, 0.06) 1px, transparent 1px);
  background-size: 22px 22px, 13px 13px;
  background-position: 0 0, 7px 9px;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; font-family: var(--font); background: none; color: inherit; }
input, textarea, select { font-family: var(--font); font-size: 1rem; color: var(--brown); }

/* ============ TYPOGRAPHIE ============ */
h1, h2, h3, .display {
  font-family: var(--display);
  font-weight: 600;
  color: var(--brown);
  line-height: 1.12;
  letter-spacing: 0.01em;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.9rem); }
h3 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); }
h4 { font-family: var(--font); font-size: 1rem; font-weight: 700; }
p { color: var(--brown-3); }

.overline {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
}
.lead { font-size: clamp(1.02rem, 1.6vw, 1.18rem); color: var(--brown-2); }
.serif-quote { font-family: var(--display); font-size: 1.4rem; font-style: italic; color: var(--brown-2); }

/* ============ LAYOUT ============ */
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 22px; position: relative; z-index: 2; }
.container-sm { max-width: 780px; }
.section { padding: clamp(56px, 9vw, 110px) 0; position: relative; }
.section-cream { background: var(--cream); }
.section-ivory { background: var(--ivory); }
.section-paper { background: var(--paper); }
.section-brown { background: var(--brown); color: var(--ivory); }
.section-brown h1, .section-brown h2, .section-brown h3 { color: var(--ivory); }
.section-brown p { color: rgba(252, 248, 242, 0.72); }

.section-head { text-align: center; max-width: 720px; margin: 0 auto clamp(34px, 5vw, 58px); }
.section-head .overline { display: block; margin-bottom: 12px; }
.section-head h2 { margin-bottom: 14px; }

/* Séparateur décoratif : épi de blé stylisé en pur CSS */
.divider { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 26px 0; }
.divider::before, .divider::after { content: ''; height: 1px; width: 74px; background: var(--border-2); }
.divider span { color: var(--gold); font-size: 1.1rem; }

.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ============ BOUTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: var(--transition);
  border: 1.5px solid transparent;
  text-align: center;
}
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 6px 18px rgba(192, 24, 47, 0.24); }
.btn-primary:hover { background: var(--red-dark); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(192, 24, 47, 0.32); }
.btn-dark { background: var(--brown); color: var(--ivory); }
.btn-dark:hover { background: #2b1c13; transform: translateY(-2px); }
.btn-outline { border-color: var(--brown-2); color: var(--brown); }
.btn-outline:hover { background: var(--brown); color: var(--ivory); transform: translateY(-2px); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: #b08e1c; transform: translateY(-2px); }
.btn-ghost { color: var(--brown-2); border-color: var(--border-2); background: rgba(255, 255, 255, 0.6); }
.btn-ghost:hover { background: #fff; border-color: var(--brown-3); }
.btn-lg { padding: 17px 38px; font-size: 1.02rem; }
.btn-sm { padding: 9px 18px; font-size: 0.83rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; }

/* ============ BANDEAU ANNONCE ============ */
.announce {
  background: var(--brown);
  color: var(--ivory);
  text-align: center;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 9px 18px;
  position: relative;
  z-index: 1002;
}
.announce b { color: var(--gold-light); }

/* ============ NAVIGATION ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 1001;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(247, 237, 224, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.nav-brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.nav-brand img, .nav-brand svg { width: 44px; height: 44px; border-radius: 50%; }
.nav-brand-txt { display: flex; flex-direction: column; line-height: 1.05; }
.nav-brand-txt b { font-family: var(--display); font-size: 1.22rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.nav-brand-txt small { font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--brown-3); }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--brown-2);
  transition: var(--transition);
  white-space: nowrap;
}
.nav-links a:hover { background: rgba(255, 255, 255, 0.75); color: var(--brown); }
.nav-links a.active { color: var(--red); font-weight: 700; }
.nav-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.nav-cart { position: relative; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--border-2); background: rgba(255, 255, 255, 0.7); color: var(--brown); transition: var(--transition); }
.nav-cart:hover { border-color: var(--red); color: var(--red); }
.nav-cart-badge { position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; border-radius: 999px; background: var(--red); color: #fff; font-size: 0.66rem; font-weight: 800; display: none; place-items: center; padding: 0 5px; }
.nav-cart-badge.show { display: grid; }

.nav-burger { display: none; width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid var(--border-2); background: rgba(255, 255, 255, 0.7); place-items: center; font-size: 1rem; }

.nav-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold-light); flex-shrink: 0; }
.nav-avatar-txt { display: grid; place-items: center; background: var(--levain); font-weight: 800; font-size: .95rem; color: var(--brown); }

/* ---- Menu du compte ----
   Les liens (Mes commandes, Fidélité, Espace Mimita, Déconnexion) sont dans un panneau
   déroulant : la barre garde la même hauteur et reste alignée avec les autres liens. */
.nav-account { position: relative; }
.nav-account-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  border: 1.5px solid var(--border-2);
  background: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
}
.nav-account-btn:hover { border-color: var(--gold); background: #fff; }
.nav-account-name { font-size: 0.86rem; font-weight: 600; color: var(--brown-2); max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-account-chev { font-size: 0.65rem; color: var(--brown-3); transition: var(--transition); }
.nav-account-btn[aria-expanded='true'] .nav-account-chev { transform: rotate(180deg); }

.nav-menu {
  position: absolute; top: calc(100% + 10px); right: 0;
  /* max-width : sans lui, une adresse email longue élargit le panneau
     jusqu'à le faire sortir de l'écran sur téléphone. */
  width: 236px; max-width: calc(100vw - 28px);
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  display: none;
  z-index: 1200;
  animation: navMenuIn 0.2s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.nav-menu.open { display: block; }
@keyframes navMenuIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.nav-menu-head {
  padding: 8px 12px 12px; margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
  font-weight: 700; font-size: 0.9rem; color: var(--brown);
  overflow: hidden; text-overflow: ellipsis;
}
.nav-menu-head small { display: block; font-weight: 500; font-size: 0.72rem; color: var(--brown-3); overflow: hidden; text-overflow: ellipsis; }
.nav-menu a, .nav-menu-out {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: 0.88rem; font-weight: 500; color: var(--brown-2);
  transition: var(--transition); text-align: left;
}
.nav-menu a i, .nav-menu-out i { width: 16px; text-align: center; color: var(--brown-3); font-size: 0.85rem; }
.nav-menu a:hover, .nav-menu-out:hover { background: var(--cream); color: var(--brown); }
.nav-menu a.is-admin { color: var(--red); font-weight: 700; }
.nav-menu a.is-admin i { color: var(--red); }
.nav-menu-out { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 12px; border-radius: 0 0 var(--radius-sm) var(--radius-sm); }

/* Les mêmes liens, repris à la fin du menu burger : masqués tant qu'on est sur ordinateur
   (sinon ils se superposent aux liens de la barre — c'était le bug d'affichage). */
#navAccountMobile { display: none; }
.nav-sep {
  display: block; margin: 12px 4px 4px; padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--brown-3); font-weight: 700;
}

/* ============ CARTES ============ */
.card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.card-hover:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--border-2); }

.icon-badge {
  width: 54px; height: 54px;
  border-radius: 16px;
  display: grid; place-items: center;
  font-size: 1.35rem;
  background: var(--levain);
  color: var(--brown-2);
  margin-bottom: 16px;
}
.icon-badge.red { background: rgba(192, 24, 47, 0.1); color: var(--red); }
.icon-badge.gold { background: rgba(201, 162, 39, 0.16); color: #9c7c14; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 13px; border-radius: 999px;
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border-2);
  color: var(--brown-2);
}
.chip-red { background: rgba(192, 24, 47, 0.1); border-color: rgba(192, 24, 47, 0.28); color: var(--red); }
.chip-gold { background: rgba(201, 162, 39, 0.14); border-color: rgba(201, 162, 39, 0.35); color: #8f7211; }
.chip-ok { background: rgba(46, 125, 94, 0.12); border-color: rgba(46, 125, 94, 0.3); color: var(--ok); }
.chip-off { background: rgba(138, 106, 80, 0.12); color: var(--brown-3); }

/* ============ FORMULAIRES ============ */
.field { margin-bottom: 17px; }
.field label { display: block; font-size: 0.82rem; font-weight: 700; margin-bottom: 7px; color: var(--brown-2); }
.field .hint { font-size: 0.74rem; color: var(--brown-3); margin-top: 5px; }
.input, .field input, .field select, .field textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font-size: 0.95rem;
  transition: var(--transition);
}
.input:focus, .field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--red); box-shadow: 0 0 0 4px rgba(192, 24, 47, 0.09);
}
.field textarea { min-height: 120px; resize: vertical; }
.form-card { background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow); }

/* ============ TOAST ============ */
.toast-wrap { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 4000; display: flex; flex-direction: column; gap: 10px; align-items: center; width: calc(100% - 32px); max-width: 420px; }
.toast {
  background: var(--brown); color: var(--ivory);
  padding: 13px 20px; border-radius: 999px;
  font-size: 0.88rem; font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 10px;
  animation: toastIn 0.34s cubic-bezier(0.22, 0.61, 0.36, 1);
  max-width: 100%;
}
.toast.success { background: var(--ok); }
.toast.error { background: var(--red-dark); }
.toast.warn { background: var(--warn); }
@keyframes toastIn { from { opacity: 0; transform: translateY(18px) scale(0.96); } to { opacity: 1; transform: none; } }

/* ============ MODALE ============ */
.modal-back { position: fixed; inset: 0; background: rgba(62, 42, 30, 0.55); backdrop-filter: blur(4px); z-index: 3000; display: none; align-items: center; justify-content: center; padding: 18px; }
.modal-back.open { display: flex; }
.modal {
  background: var(--paper); border-radius: var(--radius-lg);
  width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto;
  padding: clamp(22px, 4vw, 34px); box-shadow: var(--shadow-lg);
  animation: modalIn 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(24px) scale(0.97); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.modal-close { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--brown-3); flex-shrink: 0; }
.modal-close:hover { background: var(--cream); color: var(--brown); }

/* ============ PIED DE PAGE ============ */
.footer { background: var(--brown); color: rgba(252, 248, 242, 0.78); padding: 62px 0 28px; position: relative; z-index: 2; }
.footer h4 { color: var(--ivory); margin-bottom: 15px; font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; }
.footer a { color: rgba(252, 248, 242, 0.72); font-size: 0.9rem; transition: var(--transition); }
.footer a:hover { color: var(--gold-light); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; margin-bottom: 44px; }
.footer-grid ul li { margin-bottom: 9px; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer-brand b { font-family: var(--display); font-size: 1.3rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ivory); }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(252, 248, 242, 0.09); font-size: 1rem; }
.footer-social a:hover { background: var(--gold); color: var(--brown); transform: translateY(-3px); }
.footer-bottom { border-top: 1px solid rgba(252, 248, 242, 0.13); padding-top: 22px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 0.8rem; }

/* ============ ÉTATS ============ */
.empty { text-align: center; padding: 58px 22px; }
.empty .ico { font-size: 3rem; margin-bottom: 14px; opacity: 0.55; }
.empty h3 { margin-bottom: 8px; }
.skeleton { background: linear-gradient(90deg, var(--levain) 25%, #f2e6d4 50%, var(--levain) 75%); background-size: 200% 100%; animation: sk 1.4s infinite; border-radius: var(--radius-sm); }
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.spinner { width: 34px; height: 34px; border: 3px solid var(--levain); border-top-color: var(--red); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ UTILITAIRES ============ */
.tc { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 34px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 34px; }
.flex { display: flex; } .between { justify-content: space-between; } .center { align-items: center; } .wrap { flex-wrap: wrap; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; } .gap-3 { gap: 24px; }
.hide { display: none !important; }
.red { color: var(--red); } .gold { color: var(--gold); } .muted { color: var(--brown-3); }
.small { font-size: 0.84rem; } .xsmall { font-size: 0.74rem; }
.bold { font-weight: 700; } .price { font-family: var(--display); font-weight: 700; font-size: 1.35rem; color: var(--brown); }

/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
}
@media (max-width: 780px) {
  .nav-links {
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--paper);
    border-bottom: 1px solid var(--border);
    padding: 12px 18px 20px;
    box-shadow: var(--shadow);
    transform: translateY(-130%);
    transition: transform 0.34s cubic-bezier(0.22, 0.61, 0.36, 1);
    max-height: calc(100vh - var(--nav-h));
    overflow-y: auto;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 13px 14px; font-size: 0.98rem; border-radius: var(--radius-sm); }
  .nav-burger { display: grid; }
  /* display:contents = les liens du compte deviennent des enfants directs du menu
     déroulant, donc empilés proprement comme Accueil / Boutique / Journal. */
  #navAccountMobile { display: contents; }
  .nav-account-name, .nav-account-chev { display: none; }
  .nav-account-btn { padding: 3px; }
  .nav-menu { width: 220px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .nav-brand-txt small { display: none; }
}
@media (max-width: 480px) {
  body { font-size: 15.5px; }
  .footer-grid { grid-template-columns: 1fr; }
  .btn-lg { padding: 15px 28px; font-size: 0.96rem; }
  .section { padding: 48px 0; }
}
/* Visiteur non connecté : « Se connecter » devient une pastille ronde comme le panier.
   En toutes lettres le bouton fait ~120 px et poussait le burger hors de l'écran —
   d'où une barre qui débordait déconnecté mais tenait une fois connecté (avatar = 36 px). */
@media (max-width: 560px) {
  .nav-login { width: 38px; height: 38px; padding: 0; border-radius: 50%; gap: 0; flex-shrink: 0; }
  .nav-login span { display: none; }
}

/* Sur les petits téléphones (≤ 430 px), l'emblème + le nom + panier + compte + burger
   dépassaient la largeur de l'écran : on resserre tout d'un cran. */
@media (max-width: 430px) {
  .nav-login { width: 36px; height: 36px; }
  .nav-inner { padding: 0 14px; gap: 10px; }
  .nav-brand { gap: 9px; }
  .nav-brand img, .nav-brand svg { width: 38px; height: 38px; }
  .nav-brand-txt b { font-size: 1.02rem; letter-spacing: 0.08em; }
  .nav-actions { gap: 7px; }
  .nav-cart, .nav-burger { width: 38px; height: 38px; }
  .nav-avatar { width: 32px; height: 32px; }
}

/* Respecte les préférences système : pas d'animation pour qui n'en veut pas. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

@media print {
  .nav, .footer, .announce, .toast-wrap, body::before { display: none !important; }
  body { background: #fff; }
}

/* ============================================
   BARRE D'ONGLETS — application uniquement
   Posée par js/native.js. Invisible sur le web : sur un site, la navigation
   reste en haut ; dans une app, elle se tient sous le pouce.
   ============================================ */
.tabbar { display: none; }
html.is-appmode .tabbar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1500;
  background: rgba(252, 248, 242, 0.97);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  /* La barre de gestes d'Android/iOS mange le bas de l'écran : sans ce padding,
     les libellés passent dessous et deviennent illisibles. */
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
html.is-appmode .tabbar .tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 9px 2px 7px;
  color: var(--brown-3); text-decoration: none;
  transition: color 0.2s;
}
html.is-appmode .tabbar .tab-ico { position: relative; font-size: 1.12rem; line-height: 1; }
html.is-appmode .tabbar .tab-lbl {
  font-size: 0.62rem; font-weight: 600; letter-spacing: 0.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
html.is-appmode .tabbar .tab.active { color: var(--red); }
html.is-appmode .tabbar .tab.active .tab-lbl { font-weight: 800; }
html.is-appmode .tabbar .tab:active { background: rgba(62, 42, 30, 0.05); }
html.is-appmode .tabbar .tab-badge {
  position: absolute; top: -6px; right: -9px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: var(--red); color: #fff;
  font-size: 0.6rem; font-weight: 800;
  display: none; place-items: center;
}
/* Le contenu ne doit pas finir caché sous la barre. */
html.is-appmode body.has-tabbar { padding-bottom: 62px; }
html.is-appmode body.has-tabbar .fab-ig { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
html.is-appmode body.has-tabbar .toast-wrap { bottom: calc(74px + env(safe-area-inset-bottom, 0px)); }
