:root{
  --orange:#e86a17; --orange-d:#c8550f; --green:#0e5c3f; --green-l:#e6f4ec;
  --ink:#1d1a15; --muted:#6b6257; --bg:#fffdf9; --alt:#f7f2e9; --line:#e9e0d0;
  --radius:14px; --red:#a3261b; --red-l:#fdecea;
}
*{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:smooth}
body{font-family:-apple-system,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;background:var(--bg);color:var(--ink);line-height:1.6;min-height:100vh;display:flex;flex-direction:column}
main{flex:1}
.wrap{max-width:1200px;margin:0 auto;padding:0 1.25rem}
.wrap.narrow{max-width:620px}
/* nav */
.nav{position:sticky;top:0;z-index:50;background:rgba(255,253,249,.96);backdrop-filter:blur(8px);border-bottom:1px solid var(--line)}
.nav-inner{display:flex;align-items:center;justify-content:space-between;max-width:1200px;margin:0 auto;padding:.7rem 1.25rem;gap:1rem}
.brand{display:flex;align-items:center;gap:.55rem;text-decoration:none;color:var(--ink);font-weight:800;letter-spacing:.06em}
.brand-d{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:10px;background:var(--orange);color:#fff;font-size:1.3rem}
.brand-logo{width:36px;height:36px;border-radius:10px;object-fit:cover}
.test-badge{font-size:.62rem;background:var(--orange);color:#fff;border-radius:6px;padding:.15rem .45rem;font-style:normal;letter-spacing:.1em;font-weight:700}
.nav-links{display:flex;align-items:center;gap:1rem;flex-wrap:wrap}
.nav-links a{color:var(--ink);text-decoration:none;font-size:.93rem}
.nav-links a:hover{color:var(--orange)}
.nav-links a.muted{color:var(--muted)}
.lang-btn{border:1px solid var(--line);background:#fff;border-radius:8px;padding:.3rem .65rem;cursor:pointer;font-weight:700;font-size:.85rem}
/* buttons */
.btn{display:inline-block;text-decoration:none;border-radius:999px;padding:.8rem 1.8rem;font-weight:700;border:2px solid transparent;cursor:pointer;font-size:1rem;background:var(--orange);color:#fff;transition:transform .15s,box-shadow .15s}
.btn:hover{background:var(--orange-d);transform:translateY(-2px);box-shadow:0 8px 20px rgba(232,106,23,.3)}
.btn-small{padding:.45rem 1.1rem;font-size:.88rem}
.btn-ghost{background:transparent;border-color:var(--orange);color:var(--orange)}
.btn-ghost:hover{background:rgba(232,106,23,.08)}
.btn-green{background:var(--green)}
.btn-green:hover{background:#0a4630}
.btn-danger{background:var(--red)}
.btn-danger:hover{background:#7e1c14}
/* hero */
.hero{background:linear-gradient(135deg,#1d1a15 0%,#3a2a16 60%,#0e5c3f 130%);color:#fff;padding:4rem 0 3.5rem;text-align:center;border-radius:0 0 24px 24px;margin-bottom:2rem}
.hero h1{font-size:clamp(1.8rem,5vw,2.8rem);margin-bottom:.8rem}
.hero p{opacity:.9;max-width:640px;margin:0 auto 1.8rem}
.hero-cta{display:flex;gap:1rem;justify-content:center;flex-wrap:wrap;margin-bottom:1.4rem}
.demo-box{background:rgba(255,255,255,.1);border:1px dashed rgba(255,255,255,.4);border-radius:12px;padding:1rem;max-width:560px;margin:0 auto;font-size:.88rem;text-align:left}
.demo-box code{background:rgba(0,0,0,.35);padding:.1rem .4rem;border-radius:6px}
/* sections/cards */
.section{padding:2rem 0}
h2{font-size:clamp(1.4rem,4vw,2rem);margin-bottom:1rem}
.cards3{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:1.1rem}
.card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:1.4rem;box-shadow:0 2px 10px rgba(0,0,0,.04)}
.card h3{margin-bottom:.4rem;font-size:1.05rem}
.card p{color:var(--muted);font-size:.93rem}
.card .meta{font-size:.82rem;color:var(--muted);margin:.4rem 0}
.badge{display:inline-block;font-size:.72rem;font-weight:700;border-radius:999px;padding:.15rem .65rem;letter-spacing:.03em}
.badge.verified{background:var(--green-l);color:var(--green)}
.badge.pending{background:#fff4e0;color:#9a6a00}
.badge.open{background:#e3f0ff;color:#14508c}
.badge.busy{background:#fff4e0;color:#9a6a00}
.badge.done{background:var(--green-l);color:var(--green)}
.badge.cancel{background:var(--red-l);color:var(--red)}
.badge.draft{background:#eee;color:#555}
.stars{color:#d99a16;font-size:1rem;letter-spacing:.1em}
/* forms */
form.stack{display:grid;gap:1rem}
label.f{display:grid;gap:.35rem;font-weight:600;font-size:.95rem}
input,select,textarea{padding:.75rem 1rem;border:1px solid var(--line);border-radius:10px;font-size:1rem;background:#fff;width:100%;font-family:inherit}
input:focus,select:focus,textarea:focus{outline:2px solid var(--orange);border-color:var(--orange)}
textarea{min-height:110px;resize:vertical}
.checks{display:flex;flex-wrap:wrap;gap:.6rem}
.checks label{display:flex;align-items:center;gap:.4rem;background:#fff;border:1px solid var(--line);border-radius:999px;padding:.45rem 1rem;font-weight:600;font-size:.9rem;cursor:pointer}
.checks input{width:auto}
.flash{padding:.9rem 1.2rem;border-radius:10px;margin:1rem 0;font-weight:600}
.flash.ok{background:var(--green-l);color:var(--green)}
.flash.err{background:var(--red-l);color:var(--red)}
.otp-big{font-size:2.4rem;font-weight:800;letter-spacing:.4em;text-align:center;background:#fff;border:2px dashed var(--orange);border-radius:12px;padding:1rem;margin:1rem 0}
/* filters */
.filters{display:flex;gap:.7rem;flex-wrap:wrap;margin:1.2rem 0;align-items:end}
.filters .f{min-width:150px}
/* lists */
.list{display:grid;gap:1rem;margin:1rem 0}
.row-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:1.3rem;display:flex;gap:1.1rem;align-items:flex-start;flex-wrap:wrap}
.row-card .grow{flex:1;min-width:200px}
.row-card h3{margin-bottom:.25rem}
.row-card h3 a{color:var(--ink);text-decoration:none}
.row-card h3 a:hover{color:var(--orange)}
.avatar{width:64px;height:64px;border-radius:50%;object-fit:cover;background:var(--alt);flex-shrink:0}
.actions{display:flex;gap:.6rem;flex-wrap:wrap;margin-top:.8rem}
/* tables */
table.tbl{width:100%;border-collapse:collapse;background:#fff;border-radius:12px;overflow:hidden;font-size:.93rem}
.tbl th,.tbl td{padding:.7rem .9rem;border-bottom:1px solid var(--line);text-align:left}
.tbl th{background:var(--alt);font-size:.82rem;text-transform:uppercase;letter-spacing:.05em;color:var(--muted)}
/* chat */
.chat-box{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:1.2rem;max-height:380px;overflow-y:auto;display:flex;flex-direction:column;gap:.7rem;margin-bottom:1rem}
.msg{max-width:75%;padding:.6rem 1rem;border-radius:14px;font-size:.94rem}
.msg.me{align-self:flex-end;background:var(--orange);color:#fff;border-bottom-right-radius:4px}
.msg.them{align-self:flex-start;background:var(--alt);border-bottom-left-radius:4px}
.msg .when{font-size:.72rem;opacity:.7;display:block;margin-top:.2rem}
.chat-form{display:flex;gap:.6rem}
.chat-form input{flex:1}
/* convo list */
.convo{display:flex;justify-content:space-between;align-items:center;background:#fff;border:1px solid var(--line);border-radius:12px;padding:1rem;text-decoration:none;color:var(--ink)}
.convo:hover{border-color:var(--orange)}
/* pay box */
.pay-box{background:#fff;border:2px solid var(--green);border-radius:var(--radius);padding:1.4rem;margin:1.2rem 0}
.pay-box .line{display:flex;justify-content:space-between;padding:.3rem 0;font-size:.96rem}
/* Build 46 — les lignes libellé/valeur hors pay-box (stats mission, dépenses,
   entreprise) bénéficient du même écartement : avant, libellé et valeur
   s'affichaient collés (« Vues3 »). */
.line{display:flex;justify-content:space-between;gap:1rem;padding:.3rem 0;font-size:.96rem}
.pay-box .total{font-weight:800;font-size:1.1rem;border-top:1px solid var(--line);margin-top:.5rem;padding-top:.6rem}
.sim-note{background:#fff8e6;border:1px dashed #d99a16;border-radius:10px;padding:.8rem 1rem;font-size:.88rem;margin:1rem 0}
/* footer */
footer{background:#1d1a15;color:#cfc6b8;padding:2rem 0;text-align:center;margin-top:3rem}
footer strong{color:#fff;letter-spacing:.06em}
.foot-small{font-size:.8rem;opacity:.7;margin-top:.5rem}
.mt{margin-top:1.2rem}.mb{margin-bottom:1.2rem}.center{text-align:center}
#nav-toggle{display:none;background:none;border:1px solid var(--line);border-radius:8px;font-size:1.4rem;padding:.25rem .7rem;cursor:pointer;color:var(--ink)}
@media(max-width:640px){
  #nav-toggle{display:block}
  .nav-links{display:none;position:absolute;top:100%;left:0;right:0;background:#fffdf9;border-bottom:1px solid var(--line);
    flex-direction:column;align-items:stretch;padding:.8rem 1.25rem;gap:.2rem;box-shadow:0 12px 24px rgba(0,0,0,.12);
    max-height:calc(100dvh - 64px);max-height:calc(100svh - 64px);overflow-y:auto;overscroll-behavior:contain}
  .nav-links.open{display:flex}
  .nav-links a{display:block;padding:.65rem .4rem;font-size:1rem;border-bottom:1px solid var(--alt)}
  .nav-links a.btn-small{display:inline-block;margin:.4rem 0}
  .nav-inner{position:relative;flex-wrap:nowrap}
  .chat-form{flex-direction:column}
}

/* ---- Toggle affichage mot de passe (œil) — Build 35 ---- */
.pass-wrap{position:relative;display:block}
.pass-wrap input{width:100%;padding-right:2.6rem;box-sizing:border-box}
.pass-eye{position:absolute;right:.35rem;top:50%;transform:translateY(-50%);background:none;border:0;cursor:pointer;font-size:1.15rem;line-height:1;padding:.25rem;opacity:.75}
.pass-eye:hover{opacity:1}

/* ---- Pastilles "éléments manquants" du profil (Build 43) : s'enroulent, jamais coupées ---- */
.miss-chips{display:flex;flex-wrap:wrap;gap:.35rem;margin:.2rem 0 .5rem}
.miss-chip{display:inline-block;background:#f4f1ea;border:1px solid var(--line,#e3ddd2);border-radius:999px;padding:.2rem .7rem;font-size:.8rem;color:var(--muted,#8f8577)}
/* ---- fieldset accessibilité (Build 43) ---- */
fieldset.f{border:0;padding:0;margin:0;display:grid;gap:.35rem;font-weight:600;font-size:.95rem;min-width:0}
fieldset.f legend{padding:0}

/* ---- Responsive global (Build 62, 12/10/2026) ---- */
/* Images et médias : jamais de débordement */
img, video, iframe, table{max-width:100%}
img{height:auto}

/* Tables : défilement horizontal sur petit écran (sécurité globale) */
.tbl-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:1rem 0}
table.tbl{min-width:560px}

/* Cibles tactiles : 44px minimum */
.btn, .btn-small, .rxbtn, .admenu-btn, .lang-btn, .pass-eye{min-height:44px}
.btn-small{min-height:40px}
.nav-links a{min-height:44px;display:inline-flex;align-items:center}

/* Évite le zoom auto iOS sur les champs (< 16px déclenche le zoom) */
input, select, textarea{font-size:16px}

/* Grilles : 1 colonne sur téléphone */
@media(max-width:900px){
  .wrap{padding:0 1rem}
  .cards3{grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.9rem}
  .hero{padding:2.5rem 0 2rem}
  .pay-box .line, .line{font-size:.92rem}
}

/* Téléphones */
@media(max-width:640px){
  body{font-size:15px}
  .section{padding:1.4rem 0}
  .card{padding:1.1rem}
  .hero h1{font-size:1.7rem}
  .hero-cta .btn{width:100%;text-align:center}
  .btn{padding:.85rem 1.4rem}
  /* Formulaires : pleine largeur, champs empilés */
  form.stack{ gap:.9rem }
  .filters{flex-direction:column;align-items:stretch}
  .filters .f{min-width:0}
  /* Listes : cartes empilées */
  .row-card{flex-direction:column;gap:.8rem}
  .row-card .grow{min-width:0}
  /* Chat : bulles plus larges */
  .msg{max-width:88%}
  /* Tableaux de bord : stats en 2 colonnes */
  .cards3{grid-template-columns:1fr 1fr;gap:.7rem}
  .cards3 .card{padding:.9rem}
  /* Groupes : couverture plus compacte */
  .gcover{min-height:140px}
  .gcover-info{padding:.8rem}
  /* Connexion/inscription : marges réduites */
  .wrap.narrow{padding:0 .9rem}
  .otp-big{font-size:1.8rem;letter-spacing:.25em}
  /* Pied de page */
  footer{padding:1.5rem 0}
  /* Évite le débordement des longs codes */
  code{word-break:break-all}
  .demo-box{font-size:.82rem}
}

/* Très petits écrans */
@media(max-width:380px){
  .cards3{grid-template-columns:1fr}
  .nav-inner{padding:.6rem .8rem}
  .brand{font-size:.9rem}
}

/* Mode paysage téléphone : nav compacte */
@media(max-height:500px) and (orientation:landscape){
  .hero{padding:1.5rem 0}
}

/* Préférence mouvement réduit : désactive les animations */
@media(prefers-reduced-motion:reduce){
  *, *::before, *::after{animation-duration:.01ms !important;transition-duration:.01ms !important}
  html{scroll-behavior:auto}
}

/* ---- Fin responsive global ---- */

/* ---- Groupes v2 (11/10/2026) : couverture style Facebook, réactions, menu admin ---- */
.gcover{position:relative;border-radius:14px;background:#e9e2d6;margin-bottom:.4rem;min-height:180px;display:flex;align-items:flex-end}
/* Correctif 11/10/2026 : overflow visible pour ne pas rogner le menu admin ⋮ —
   les coins arrondis sont reportés sur les calques image/fond ci-dessous */
.gcover-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:14px}
.gcover-default{position:absolute;inset:0;background:linear-gradient(135deg,#0a7a4d,#0e9f6e 55%,#ff8200);border-radius:14px}
.gcover-info{position:relative;z-index:1;padding:1rem 1.1rem;color:#fff;text-shadow:0 1px 3px rgba(0,0,0,.55)}
.gcover-info h2{margin:0 0 .2rem;color:#fff}
.gcover-info .meta{color:#f2ede4}
.admenu{position:absolute;top:.7rem;right:.7rem;z-index:5}
.admenu-btn{background:rgba(255,255,255,.92);border:0;border-radius:50%;width:40px;height:40px;font-size:1.4rem;line-height:1;cursor:pointer;color:#333;box-shadow:0 2px 8px rgba(0,0,0,.25)}
.admenu-list{display:none;position:absolute;right:0;top:46px;background:#fff;border-radius:12px;box-shadow:0 8px 28px rgba(0,0,0,.22);min-width:230px;max-width:calc(100vw - 2rem);overflow:hidden;z-index:50}
.admenu-list.open{display:block}
.admenu-list button{display:block;width:100%;text-align:left;background:none;border:0;padding:.7rem 1rem;font-size:.95rem;cursor:pointer;color:#222}
.admenu-list button:hover{background:#f4f1ea}
.btn-join{font-size:1.05rem;padding:.7rem 1.6rem;border-radius:999px}
.gpost{border-top:1px solid #eee;padding:.7rem 0}
.gpost-photo{max-width:100%;border-radius:10px;margin:.4rem 0;display:block}
.rx{display:flex;gap:.4rem;margin-top:.35rem}
.rxbtn{border:1px solid #ddd;background:#f8f6f2;border-radius:999px;padding:.3rem .8rem;font-size:.9rem;cursor:pointer}
.rxbtn.on{background:#ffe8d1;border-color:#ff8200;font-weight:700}
.gcard-cover{width:100%;height:150px;object-fit:cover;border-radius:10px 10px 0 0;display:block}
.gcard-cover-default{width:100%;height:150px;border-radius:10px 10px 0 0;background:linear-gradient(135deg,#0a7a4d,#0e9f6e 55%,#ff8200)}
.gcard{padding:0;overflow:hidden}
.gcard-body{padding:.7rem .9rem}
