/* Le Grenier — feuille commune (refonte du 01/11/2026, demande d'Anthony : moderne, animé, professionnel).
   L'idée : un grenier, une brocante. Kraft et bois clair pour travailler, nuit chaude pour l'en-tête et la connexion,
   vermillon d'étiquette de prix, laiton des vieilles poignées. Mobile d'abord. Les autres feuilles (tableau, envoi,
   photos, colis, comptes…) s'appuient sur les jetons ci-dessous : leurs noms n'ont pas changé.
   Polices servies par le site lui-même (SIL Open Font License 1.1, textes dans polices/) : rien ne part chez un tiers. */

@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("polices/barlow-400-latin.81419bf5abb5.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("polices/barlow-400-latin-ext.30fe91f5bb42.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap; src: url("polices/barlow-500-latin.8e986e86d57e.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap; src: url("polices/barlow-500-latin-ext.eaf61d05880b.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url("polices/barlow-600-latin.a1e2a2d7d4c0.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url("polices/barlow-600-latin-ext.7befe7b24353.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("polices/barlow-condensed-600-latin.ba4513495282.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("polices/barlow-condensed-600-latin-ext.ee77e8f678d5.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("polices/barlow-condensed-700-latin.e1180918b873.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("polices/barlow-condensed-700-latin-ext.a4fc62d81f8b.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 800; font-display: swap; src: url("polices/barlow-condensed-800-latin.b1b7dd5dbcea.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 800; font-display: swap; src: url("polices/barlow-condensed-800-latin-ext.9a3d1f9c9f3b.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("polices/ibm-plex-mono-400-latin.79936b18df9f.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("polices/ibm-plex-mono-400-latin-ext.8450d5944de2.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("polices/ibm-plex-mono-500-latin.b1c8a895f5fd.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("polices/ibm-plex-mono-500-latin-ext.fa8d8838b94a.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* Pour travailler : papier kraft clair, encre chaude. */
  --encre: #1f1b17;
  --encre-douce: #6d6359;
  --papier: #f2ebdf;
  --carte: #fffaf1;
  --trait: #e2d6c4;
  /* L'étiquette de prix (vermillon), le laiton, la mousse des bonnes nouvelles, l'alerte. */
  --brique: #c2502a;
  --brique-sombre: #973c1d;
  --mousse: #4b6a48;
  --ocre: #b48329;
  --alerte: #a3271f;
  /* La nuit du grenier : en-tête et page de connexion. */
  --nuit: #16120f;
  --nuit-2: #221c17;
  --nuit-3: #2f2720;
  --lueur: #f4c77b;
  --rayon: 3px;
  --titre: "Barlow Condensed", "Arial Narrow", sans-serif;
  --texte: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --chiffres: "IBM Plex Mono", ui-monospace, "DejaVu Sans Mono", monospace;
  --souple: cubic-bezier(.2, .75, .15, 1);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .2 0 0 0 0 .15 0 0 0 0 .1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--papier) var(--grain);
  color: var(--encre);
  font: 400 16px/1.55 var(--texte);
}

h1, h2, h3 {
  font-family: var(--titre);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: .01em;
  margin: 0 0 .55em;
}
h1 { font-size: 2rem; text-transform: uppercase; letter-spacing: .02em; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }

p { margin: 0 0 1em; }

a {
  color: var(--brique);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color .2s var(--souple), text-decoration-color .2s var(--souple);
}
a:hover, a:focus { color: var(--brique-sombre); }

img { max-width: 100%; height: auto; display: block; }

button, input, select, textarea { font: inherit; color: inherit; }

input, select, textarea {
  width: 100%;
  padding: .7em .8em;
  background: var(--carte);
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
  transition: border-color .2s var(--souple), box-shadow .2s var(--souple);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brique);
  box-shadow: 0 0 0 3px rgb(194 80 42 / .18);
}
textarea { min-height: 8em; resize: vertical; }

button {
  cursor: pointer;
  border: 0;
  border-radius: var(--rayon);
  background: none;
}

table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: .45em .5em; border-bottom: 1px solid var(--trait); vertical-align: top; }
th { font-weight: 600; font-size: .85rem; color: var(--encre-douce); }

ul, ol { margin: 0 0 1em; padding-left: 1.2em; }

/* En-tête : la nuit du grenier, une lueur de lampe, le nom à gauche, la navigation qui défile sur téléphone. */
.entete {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .4rem 1rem;
  padding: .65rem 1rem;
  background: radial-gradient(120% 180% at 12% -40%, rgb(244 199 123 / .16), transparent 55%), var(--nuit) var(--grain);
  color: var(--papier);
  box-shadow: 0 1px 0 rgb(244 199 123 / .12), 0 10px 24px -18px rgb(0 0 0 / .8);
}
.entete-nom {
  display: inline-flex;
  align-items: baseline;
  gap: .45rem;
  font-family: var(--titre);
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--papier);
  text-decoration: none;
}
.entete-nom::after {
  content: "";
  width: .42rem;
  height: .42rem;
  border-radius: 50%;
  background: var(--lueur);
  box-shadow: 0 0 10px 2px rgb(244 199 123 / .55);
  animation: veilleuse 4.5s ease-in-out infinite;
}
.entete-nom:hover, .entete-nom:focus { color: #fff; }
.entete-nav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  font-size: .95rem;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.entete-nav::-webkit-scrollbar { display: none; }
.entete-lien {
  position: relative;
  color: #d8cab8;
  text-decoration: none;
  white-space: nowrap;
  padding: .25rem 0;
}
.entete-lien::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -2px;
  height: 2px;
  background: var(--lueur);
  transition: right .3s var(--souple);
}
.entete-lien:hover, .entete-lien:focus { color: #fff; }
.entete-lien:hover::after, .entete-lien:focus::after { right: 0; }
.entete-lien-actif { color: #fff; }
.entete-lien-actif::after { right: 0; background: var(--brique); }
.entete-sortie { margin: 0; }
.lien-bouton { color: #a3937f; font-size: .85rem; padding: .2rem 0; white-space: nowrap; }
.lien-bouton:hover, .lien-bouton:focus { color: #fff; }

.page { padding: 1.3rem 1rem 3.5rem; max-width: 48rem; margin: 0 auto; }
.page > * { animation: monte .55s var(--souple) both; }
.page > *:nth-child(2) { animation-delay: .04s; }
.page > *:nth-child(3) { animation-delay: .08s; }
.page > *:nth-child(4) { animation-delay: .12s; }
.page > *:nth-child(n+5) { animation-delay: .16s; }

/* Messages de Django : une étiquette posée en haut de page. */
.messages { list-style: none; padding: 0; margin: 0 0 1.1rem; }
.message {
  position: relative;
  padding: .7rem .9rem .7rem 1.1rem;
  background: var(--carte);
  border: 1px solid var(--trait);
  border-left: 4px solid var(--mousse);
  margin-bottom: .45rem;
  box-shadow: 0 6px 14px -12px rgb(31 27 23 / .5);
  animation: glisse .45s var(--souple) both;
}
.message-success { border-left-color: var(--mousse); }
.message-info { border-left-color: var(--encre-douce); }
.message-error { border-left-color: var(--alerte); }
.message-warning { border-left-color: var(--ocre); }

/* Formulaires. */
.formulaire { display: grid; gap: .95rem; }
.champ { display: grid; gap: .3rem; }
.champ-nom { font-size: .88rem; color: var(--encre-douce); font-weight: 500; }
.erreur-formulaire { color: var(--alerte); margin: 0; }

/* Boutons : une étiquette qu'on soulève. */
.bouton {
  display: inline-block;
  padding: .8em 1.3em;
  background: var(--brique);
  color: #fff;
  font-family: var(--titre);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 2px 0 var(--brique-sombre);
  transition: transform .2s var(--souple), box-shadow .2s var(--souple), background .2s var(--souple);
}
.bouton:hover, .bouton:focus { background: #cf5b33; color: #fff; transform: translateY(-2px); box-shadow: 0 5px 0 var(--brique-sombre); }
.bouton:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--brique-sombre); }
.bouton:disabled { background: var(--trait); color: var(--encre-douce); cursor: default; transform: none; box-shadow: none; }
.bouton-secondaire {
  display: inline-block;
  padding: .7em 1.1em;
  border: 1px solid var(--encre);
  color: var(--encre);
  text-decoration: none;
  transition: background .2s var(--souple), color .2s var(--souple);
}
.bouton-secondaire:hover, .bouton-secondaire:focus { background: var(--encre); color: var(--papier); }

@keyframes monte { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes glisse { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
@keyframes veilleuse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

@media (min-width: 48rem) {
  .entete { padding: .8rem 1.6rem; flex-wrap: nowrap; }
  .page { padding-top: 2.2rem; }
  h1 { font-size: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
