/* ============================================================
   socle.css — ce que le carnet et les maquettes partagent
   ------------------------------------------------------------
   Polices, jetons de couleur, boutons, envoi, échelle de réaction, bloc « votre avis ».
   Aucun sélecteur d'élément nu : chargé sous une maquette, il ne touche à rien d'autre.

   Les couleurs viennent du lieu, pas d'un nuancier (relevé du 16/09) :
   vert du logo, ombre du sous-bois, toile de la tente, travertin, eau du lac, tuile du moulin.
   Contrastes vérifiés sur --coquille : vert nuit 13,4:1 · forêt 9,6:1 · sous-bois 8,3:1 ·
   tuile-encre 5,9:1. Sauge, toile, travertin, eau, tuile : grands titres et décor SEULEMENT.
   Pas de mode sombre : « pas de fond sombre » est une demande de Mika, pas un oubli.
   ============================================================ */

@font-face { font-family: 'Atkinson Hyperlegible'; font-weight: 400; font-style: normal; font-display: swap;
  src: url('../fonts/atkinson-hyperlegible-400.woff2') format('woff2'); }
@font-face { font-family: 'Atkinson Hyperlegible'; font-weight: 700; font-style: normal; font-display: swap;
  src: url('../fonts/atkinson-hyperlegible-700.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Serif'; font-weight: 400; font-style: normal; font-display: swap;
  src: url('../fonts/instrument-serif-400.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Serif'; font-weight: 400; font-style: italic; font-display: swap;
  src: url('../fonts/instrument-serif-400i.woff2') format('woff2'); }

:root {
  --coquille: #F4EFE5;
  --papier: #FBF8F2;
  --lin: #EAE2D2;
  --encre: #202718;
  --foret: #2B4227;
  --sous-bois: #394A35;
  --sauge: #758872;
  --toile: #907449;
  --travertin: #BA905A;
  --eau: #99A89D;
  --tuile: #986E59;
  --tuile-encre: #7A5242;
  --trait: rgba(32, 39, 24, .12);
  --trait-fort: rgba(32, 39, 24, .28);

  --f-titre: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --f-texte: 'Atkinson Hyperlegible', 'Segoe UI', system-ui, sans-serif;

  --marge: clamp(18px, 5vw, 36px);
  --nav-h: 66px;
  --r: 3px;

  /* Le tiroir de retours (sis-ui-widgets) lit ces jetons ; il n'en déclare aucun. */
  --sis-surface: var(--papier);
  --sis-ink: var(--encre);
  --sis-ink-soft: var(--sous-bois);
  --sis-line: var(--trait-fort);
  --sis-accent: var(--foret);
  --sis-accent-ink: var(--foret);
  --sis-fs-sm: .95rem;
}

/* ---------- boutons ---------- */

.bouton-plein, .bouton-trait, .bouton-lien {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 0 1.2em; border-radius: var(--r); cursor: pointer;
  font-weight: 700; font-size: .98rem; letter-spacing: .01em; text-decoration: none;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .12s ease;
}
.bouton-plein { background: var(--foret); color: var(--coquille); border: 1px solid var(--foret); }
.bouton-plein:hover { background: var(--encre); border-color: var(--encre); }
.bouton-plein:active, .bouton-trait:active { transform: translateY(1px); }
.bouton-plein[disabled] { opacity: .45; cursor: not-allowed; }
.bouton-trait { background: transparent; color: var(--foret); border: 1px solid var(--trait-fort); }
.bouton-trait:hover { border-color: var(--foret); background: var(--papier); }
.bouton-lien { min-height: 40px; padding: 0 .2em; background: none; border: 0; color: var(--foret); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; font-weight: 700; }

/* ---------- envoi et mot ---------- */

.mot { margin-top: .7rem; }
.mot textarea { width: 100%; min-height: 88px; resize: vertical; }
.mot-actions { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-top: .5rem; flex-wrap: wrap; }
.envoi { font-size: .84rem; color: var(--sauge); display: inline-flex; align-items: center; gap: .4em; min-height: 1.4em; }
.envoi::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0; }
.envoi[data-e='ok']::before, .envoi[data-e='encours']::before, .envoi[data-e='echec']::before { opacity: 1; }
.envoi[data-e='ok'] { color: var(--foret); }
.envoi[data-e='echec'] { color: var(--tuile-encre); font-weight: 700; }

/* ---------- l'échelle : une règle graduée ---------- */

.echelle { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); margin: 1.1rem 0 .4rem; }
.echelle::before { content: ''; position: absolute; left: 10%; right: 10%; top: 13px; height: 1px; background: var(--trait-fort); }
.echelle button {
  position: relative; display: grid; justify-items: center; gap: .45rem; padding: 0 2px 4px;
  background: none; border: 0; cursor: pointer; color: var(--sous-bois); font-size: .8rem; font-weight: 700; line-height: 1.15; text-align: center;
}
.echelle .repere { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--sauge); background: var(--coquille); transition: transform .15s, background-color .15s, border-color .15s; }
.echelle button:hover .repere { transform: scale(1.12); border-color: var(--foret); }
.echelle button[aria-pressed='true'] { color: var(--foret); }
.echelle button[aria-pressed='true'] .repere { background: var(--foret); border-color: var(--foret); box-shadow: inset 0 0 0 4px var(--coquille); }

/* ---------- hors carnet ---------- */

.hors-carnet { margin: 1rem 0; padding: .8rem 1rem; border: 1px dashed var(--trait-fort); font-size: .92rem; color: var(--sous-bois); }

/* ---------- champs et dépôt : partagés avec le tiroir des maquettes ---------- */

.champ { display: grid; gap: .35rem; }
.champ input, .champ textarea, .zone-texte {
  width: 100%; min-height: 50px; padding: .7em .85em; border-radius: var(--r);
  border: 1px solid var(--trait-fort); background: var(--papier); font-size: 1.02rem;
}
.champ input:focus, .champ textarea:focus, .zone-texte:focus { outline: 2px solid var(--foret); outline-offset: 0; border-color: var(--foret); }

.depose {
  display: grid; justify-items: center; gap: .4rem; margin: .9rem 0 .7rem; padding: 18px 12px; text-align: center;
  border: 1.5px dashed var(--trait-fort); border-radius: var(--r); color: var(--sous-bois); font-size: .95rem;
  transition: border-color .15s, background-color .15s;
}
.depose[data-survol] { border-color: var(--foret); background: var(--lin); color: var(--encre); }
.depose svg { width: 30px; height: 30px; stroke: var(--sauge); fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.depose input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.en-attente { list-style: none; margin: .6rem 0; padding: 0; display: grid; gap: .45rem; }
.en-attente li { display: grid; grid-template-columns: 46px 1fr auto; gap: .7rem; align-items: center; padding: 6px; border: 1px solid var(--trait); border-radius: var(--r); background: var(--coquille); font-size: .9rem; }
.en-attente .vignette { width: 46px; height: 46px; border-radius: 2px; object-fit: cover; background: var(--lin); display: grid; place-items: center; font-size: .65rem; font-weight: 700; color: var(--sauge); text-transform: uppercase; }
.en-attente .nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.en-attente .taille { color: var(--sauge); font-size: .8rem; }
.en-attente progress { width: 100%; height: 3px; appearance: none; border: 0; background: var(--lin); }
.en-attente progress::-webkit-progress-bar { background: var(--lin); }
.en-attente progress::-webkit-progress-value { background: var(--foret); }
.en-attente progress::-moz-progress-bar { background: var(--foret); }
.en-attente button { border: 0; background: none; cursor: pointer; color: var(--sous-bois); font-size: 1.2rem; width: 36px; height: 36px; }
.deja { margin: .9rem 0 0; padding: .7rem 0 0; border-top: 1px solid var(--trait); display: grid; gap: .35rem; font-size: .88rem; color: var(--sous-bois); }
.deja b { color: var(--encre); font-weight: 700; }
.statut { display: inline-block; padding: .05em .55em; border-radius: 999px; border: 1px solid currentColor; font-size: .72rem; font-weight: 700; letter-spacing: .04em; }
.statut-recu { color: var(--sauge); } .statut-vu { color: var(--toile); } .statut-integre { color: var(--foret); } .statut-ecarte { color: var(--tuile-encre); }

/* ---------- « votre avis » en pied de maquette ---------- */

.acb-avis {
  margin: 0; padding: 48px clamp(18px, 5vw, 36px) 64px;
  background: var(--coquille); color: var(--encre); border-top: 1px solid var(--trait-fort);
  font-family: var(--f-texte); font-size: 1.0625rem; line-height: 1.55;
}
.acb-avis-dedans { max-width: 640px; margin: 0 auto; }
.acb-avis .surtitre { margin: 0; font-size: .74rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--sauge); }
.acb-avis h2 { margin: .25em 0 .3em; font-family: var(--f-titre); font-weight: 400; font-size: clamp(2rem, 7vw, 2.8rem); line-height: 1; }
.acb-avis p { margin: 0 0 .8rem; color: var(--sous-bois); }
.acb-avis textarea { width: 100%; min-height: 96px; padding: .7em .85em; border: 1px solid var(--trait-fort); border-radius: var(--r); background: var(--papier); font: inherit; resize: vertical; }
.acb-avis .retour-carnet { display: inline-block; margin-top: 1.4rem; color: var(--foret); font-weight: 700; }

/* ---------- le bandeau « maquette » en tête de page ---------- */

.acb-bandeau {
  display: flex; flex-wrap: wrap; gap: .3rem 1rem; align-items: center; justify-content: space-between;
  padding: 8px clamp(18px, 5vw, 36px); background: var(--encre); color: var(--coquille);
  font-family: var(--f-texte); font-size: .8rem; line-height: 1.35; letter-spacing: .02em;
}
.acb-bandeau a { color: var(--coquille); font-weight: 700; }
.acb-bandeau b { font-weight: 700; }
