/* Yazbeck — socle commun (site + portail) · direction « Plâtre & cire » */

/* Mona Sans (SIL OFL 1.1) : la police du site, une seule famille variable — graisse 200–900, chasse 75–125 %. */
@font-face { font-family: 'Mona Sans'; src: url('../fonts/mona-sans-latin.woff2') format('woff2'); font-weight: 200 900; font-stretch: 75% 125%; font-style: normal; font-display: swap;
  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: 'Mona Sans'; src: url('../fonts/mona-sans-latin-ext.woff2') format('woff2'); font-weight: 200 900; font-stretch: 75% 125%; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* Le nom du logo garde la police du logo, Bricolage Grotesque (SIL OFL 1.1), réduite aux lettres de « Raphael Yazbeck dental design » (11 Ko). */
@font-face { font-family: 'Yazbeck Logo'; src: url('../fonts/yazbeck-logo.woff2') format('woff2'); font-weight: 200 800; font-stretch: 75% 100%; font-style: normal; font-display: block; }

:root {
  /* Les couleurs du labo */
  --blanc: #FFFFFF;
  --brume: #F4F5F7;
  --brume-2: #E9EAEE;
  --platre: #F4E094;
  --platre-2: #EDD36F;
  --cire: #C3DAF3;
  --cire-2: #A9C8EC;
  --menthe: #CBE8CF;
  --menthe-2: #ADD9B4;
  --resine: #F7CDD2;
  --resine-2: #F1B3BB;
  --encre: #1D1B22;
  --encre-2: #4E4B57;
  --gris: #6E6B76;
  --trait: #E6E6EB;
  --trait-2: #D3D2DA;
  --crayon: #D8322A;
  --todo: #FFE27A;

  /* Statuts d'un cas (fond de l'étiquette ; texte toujours à l'encre) */
  --st-brouillon: #FFFFFF;
  --st-depose: #E6E7EB;
  --st-charge: var(--cire);
  --st-conception: var(--platre);
  --st-production: var(--resine);
  --st-termine: var(--menthe);
  --st-annule: #EFEFF2;
  --ok: #24764A;
  --danger: #C02C24;

  --sans: 'Mona Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --r-s: 12px; --r-m: 20px; --r-l: 28px; --r-xl: 44px;
  --ease: cubic-bezier(.22, .8, .2, 1);
  --shadow: 0 18px 40px -22px rgba(29, 27, 34, .45);
  --crayon-u: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 30' preserveAspectRatio='none'%3E%3Cpath d='M4 18 C 60 8, 120 26, 180 15 S 270 9, 296 17' fill='none' stroke='%23D8322A' stroke-width='7' stroke-linecap='round'/%3E%3C/svg%3E");

  /* Anciens noms, gardés comme alias pour ne rien casser */
  --ink: var(--encre); --ink-2: var(--encre-2); --muted: var(--gris); --soft: var(--gris);
  --white: var(--blanc); --paper: var(--blanc); --porcelain: var(--brume); --sand: var(--brume-2);
  --line: var(--trait); --line-2: var(--trait-2);
  --zircone: var(--encre); --zircone-deep: var(--encre); --zircone-tint: var(--cire); --glacier: var(--cire);
  --st-termine-bg: var(--menthe); --st-annule-bg: #EFEFF2;
  --serif: var(--sans); --mono: var(--sans);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
body { margin: 0; background: var(--blanc); color: var(--encre); font-family: var(--sans); font-size: 17px; line-height: 1.5; font-optical-sizing: auto; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg, canvas, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
b, strong { font-weight: 700; }
::selection { background: var(--platre); color: var(--encre); }
:focus-visible { outline: 3px solid var(--encre); outline-offset: 3px; border-radius: 6px; }
/* Un élément masqué (attribut hidden) le reste, même si une règle lui donne un display. */
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--encre); color: #fff; padding: 12px 16px; border-radius: 12px; text-decoration: none; font-weight: 700; }
.skip:focus { top: 12px; }

/* Titres : la même famille, très grasse et resserrée */
.d { font-weight: 700; font-stretch: 96%; letter-spacing: -.035em; line-height: .92; }
/* Chiffres alignés (numéros de cas, montants, tailles) — remplace l'ancienne police machine */
em, .it { font-style: normal; font-weight: inherit; }
/* Trait de crayon rouge sous un mot (version statique, pour le portail et les pages légales) */
.crayon { background: var(--crayon-u) no-repeat 0 100% / 100% .24em; padding-bottom: .1em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* Repère « à compléter » : volontairement visible */
.todo { background: var(--todo); color: #3D3000; font-size: .8em; font-weight: 700; font-style: normal; letter-spacing: 0; padding: .12em .5em; border-radius: 6px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* Boutons : à l'encre, coins de 16 px */
.btn { --bg: var(--encre); --fg: #fff; --bd: var(--encre); display: inline-flex; align-items: center; justify-content: center; gap: .55em; min-height: 54px; padding: 0 24px; border-radius: 16px; border: 2px solid var(--bd); background: var(--bg); color: var(--fg); font-weight: 700; font-size: 17px; line-height: 1.1; letter-spacing: -.01em; text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform .25s var(--ease), background-color .2s, color .2s, border-color .2s; }
.btn:hover { --bg: #36333D; --bd: #36333D; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn[disabled], .btn.is-busy { opacity: .5; pointer-events: none; }
.btn .arr { display: none; }
.btn svg { flex: none; }
.btn-light, .btn-ghost { --bg: var(--blanc); --fg: var(--encre); --bd: var(--encre); }
.btn-light:hover, .btn-ghost:hover { --bg: var(--brume); --bd: var(--encre); }
.btn-platre, .btn-blue { --bg: var(--platre); --fg: var(--encre); --bd: var(--encre); }
.btn-platre:hover, .btn-blue:hover { --bg: var(--platre-2); --bd: var(--encre); }
.btn-s { min-height: 46px; padding: 0 18px; border-radius: 14px; font-size: 16px; }
.btn-small { min-height: 40px; padding: 0 14px; border-radius: 12px; font-size: 15px; }
.btn-danger { --bg: var(--blanc); --fg: var(--danger); --bd: #EBC4C1; }
.btn-danger:hover { --bg: #FCECEA; --bd: var(--danger); }
.linkish { background: none; border: 0; padding: 0; color: var(--encre); font-weight: 650; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--crayon); cursor: pointer; }

/* Champs */
.field { display: grid; gap: 7px; }
.field > span, .label { font-size: 15px; font-weight: 650; color: var(--encre); }
.field small, .hint { font-size: 14.5px; color: var(--gris); line-height: 1.45; }
.input, .field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 12px 16px; border: 2px solid var(--trait-2); border-radius: 16px; background: var(--blanc); font-size: 17px; transition: border-color .2s, box-shadow .2s; }
.field textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.field input:hover, .field select:hover, .field textarea:hover, .input:hover { border-color: #B9B7C2; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { outline: none; border-color: var(--encre); box-shadow: 0 0 0 4px var(--cire); }
.field .req { color: var(--crayon); }
.warn { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.45; color: #4A3A00; background: #FFF6CF; border-radius: 14px; padding: 10px 12px; }
.warn svg { flex: none; margin-top: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 16px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--encre); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Statuts : des étiquettes de couleur, avec le trou de l'étiquette */
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 8px; border-radius: 10px; font-size: 14.5px; font-weight: 700; white-space: nowrap; color: var(--encre); background: var(--b, var(--st-depose)); }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--blanc); box-shadow: inset 0 0 0 1.5px rgba(29, 27, 34, .55); }
.pill[data-s=brouillon] { --b: var(--st-brouillon); box-shadow: inset 0 0 0 2px var(--trait-2); }
.pill[data-s=depose] { --b: var(--st-depose); }
.pill[data-s=pris_en_charge] { --b: var(--st-charge); }
.pill[data-s=en_conception] { --b: var(--st-conception); }
.pill[data-s=en_production] { --b: var(--st-production); }
.pill[data-s=termine] { --b: var(--st-termine); }
.pill[data-s=annule] { --b: var(--st-annule); color: var(--gris); text-decoration: line-through; }
.urgent-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 8px; background: #FDE3E1; font-size: 13.5px; font-weight: 800; color: var(--danger); }

/* Message éphémère */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 90; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; background: var(--encre); color: #fff; padding: 14px 20px; border-radius: 16px; font-size: 16px; font-weight: 600; max-width: min(92vw, 540px); box-shadow: var(--shadow); transition: opacity .25s, transform .35s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--danger); }

/* ---------- Marque : la couronne sur sa tuile de plâtre ---------- */
.brand { display: inline-flex; align-items: center; gap: 13px; text-decoration: none; color: var(--encre); }
.tile { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 14px; background: var(--platre); }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.05; white-space: nowrap; }
.brand-name, .brand-sub { font-family: 'Yazbeck Logo', var(--sans); }
.brand-name { font-size: 21px; font-weight: 800; font-stretch: 88%; letter-spacing: -.02em; font-variation-settings: 'opsz' 96; }
.brand-sub { font-size: 14px; font-weight: 450; color: var(--encre-2); margin-top: 2px; }
