/* Charte validée sur les mockups (canevas « Skoazell — mockups ») :
   papier chaud, encre ardoise, sarcelle pour ce qui est acquis, brique pour
   ce qui manque. Thème clair uniquement : les pages bénévoles servent
   dehors, en plein soleil (même retour terrain que TyBuvette).
   Polices auto-hébergées (public/fonts) : aucun appel à un service tiers
   depuis le navigateur des bénévoles. */

@font-face { font-family: 'Atkinson Hyperlegible'; font-weight: 400; font-display: swap; src: url('/fonts/atkinson-400.woff2') format('woff2'); }
@font-face { font-family: 'Atkinson Hyperlegible'; font-weight: 700; font-display: swap; src: url('/fonts/atkinson-700.woff2') format('woff2'); }
@font-face { font-family: 'Bricolage Grotesque'; font-weight: 600 700; font-display: swap; src: url('/fonts/bricolage.woff2') format('woff2'); }

:root {
  --papier: #f4f0e6;
  --carte: #fffdf8;
  --ligne: #ddd5c4;
  --ligne-douce: #ece6d8;
  --encre: #1c2630;
  --encre-douce: #4f5a63;
  --sarcelle: #0e5b58;
  --sarcelle-fond: #dcebe8;
  --sarcelle-bord: #9cc5bf;
  --brique: #a93f0c;
  --brique-texte: #7a3310;
  --brique-fond: #f8e2d3;
  --brique-bord: #c96a3a;
  --gris-fond: #ebe6da;
  --titre: 'Bricolage Grotesque', system-ui, sans-serif;
  --texte: 'Atkinson Hyperlegible', system-ui, sans-serif;
  --rayon: 12px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--papier); color: var(--encre); font-family: var(--texte); font-size: 16px; line-height: 1.45; }
h1, h2, h3 { line-height: 1.15; margin: 0; }
h1 { font-family: var(--titre); font-weight: 700; letter-spacing: -0.02em; }
a { color: var(--sarcelle); }
a:hover { color: #093d3b; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.doux { color: var(--encre-douce); }
.petit { font-size: 14px; }
.mono { font-family: ui-monospace, monospace; }

/* --- Marque ------------------------------------------------------------- */
.marque { display: inline-flex; align-items: center; gap: 8px; font-family: var(--titre); font-weight: 700; font-size: 20px; letter-spacing: -0.01em; color: inherit; text-decoration: none; }
.marque svg { flex-shrink: 0; }

/* --- Boutons et champs ---------------------------------------------------- */
.btn { min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--encre); background: var(--carte); color: var(--encre); font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; text-decoration: none; }
.btn:hover { background: #f7f3ea; color: var(--encre); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primaire { background: var(--brique); border-color: var(--brique); color: #fff; }
.btn-primaire:hover { background: #8e3409; color: #fff; }
.btn-ok { background: var(--sarcelle); border-color: var(--sarcelle); color: #fff; }
.btn-ok:hover { background: #0b4a47; color: #fff; }
.btn-discret { border-color: var(--ligne); background: var(--papier); }
.btn-danger { border-color: var(--ligne); background: var(--papier); color: var(--brique-texte); }
.btn-petit { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-icone { width: 44px; padding: 0; }
.btn-large { width: 100%; min-height: 52px; font-size: 17px; border-radius: 12px; }
.btn svg { flex-shrink: 0; }

.champ { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 700; }
.champ input, .champ select, .champ textarea { min-height: 46px; padding: 0 12px; border-radius: 10px; border: 1px solid #b9ae98; background: #fff; font-weight: 400; font-size: 16px; }
.champ textarea { padding: 10px 12px; min-height: 90px; resize: vertical; }
.champ .aide { font-weight: 400; color: var(--encre-douce); font-size: 13px; }
.case { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.4; cursor: pointer; }
.case input { width: 20px; height: 20px; margin: 1px 0 0; flex-shrink: 0; accent-color: var(--sarcelle); }
.rangee { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid #e8a66f; outline-offset: 2px; }

/* --- Cartes, pastilles, messages ----------------------------------------- */
.carte { background: var(--carte); border: 1px solid var(--ligne); border-radius: 14px; padding: 18px; }
.pastille { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--gris-fond); color: var(--encre); white-space: nowrap; }
.pastille-ok { background: var(--sarcelle-fond); color: #0b4a47; }
.pastille-alerte { background: var(--brique-fond); color: var(--brique-texte); }
.pastille-sombre { background: var(--encre); color: #fffdf8; }
.message { border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.45; }
.message-info { background: #e7eef3; color: #22384a; }
.message-erreur { background: var(--brique-fond); color: #5a2a0c; }
.message-ok { background: var(--sarcelle-fond); color: #0b4a47; }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--encre); color: #fffdf8; padding: 12px 18px; border-radius: 10px; font-size: 15px; z-index: 100; max-width: calc(100vw - 32px); box-shadow: 0 6px 24px rgba(0,0,0,.2); }
.toast.erreur { background: var(--brique); }

/* --- Dialogues ------------------------------------------------------------ */
dialog { border: none; border-radius: 16px; padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); background: var(--carte); color: var(--encre); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(28, 38, 48, .45); }
dialog form, .dialogue-corps { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
dialog h2 { font-family: var(--titre); font-size: 22px; }
.dialogue-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 4px; }
.dialogue-actions .gauche { margin-right: auto; }

/* --- En-tête des pages bénévoles (mobile d'abord) ------------------------- */
.bandeau { background: var(--encre); color: #fffdf8; padding: 22px 20px 24px; }
.bandeau .sur-titre { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #c9d1d6; }
.bandeau h1 { font-size: 28px; margin-top: 10px; }
.bandeau .infos { display: flex; flex-direction: column; gap: 4px; font-size: 15px; margin-top: 10px; }
.bandeau .infos span { display: flex; align-items: center; gap: 8px; }
.page-etroite { max-width: 560px; margin: 0 auto; }
.contenu { padding: 20px; display: flex; flex-direction: column; gap: 20px; }

@media print {
  body { background: #fff; }
  .pas-imprime { display: none !important; }
}
