/* Adaptations de l'ERP : polices locales, cibles tactiles, contraste, tablette et ordinateur.
   app.css (charte d'origine) n'est pas modifié. */
@font-face{font-family:"Big Shoulders Display";font-weight:700;font-display:swap;src:url(../fonts/big-shoulders-display-latin-700-normal.woff2) format("woff2")}
@font-face{font-family:"Big Shoulders Display";font-weight:800;font-display:swap;src:url(../fonts/big-shoulders-display-latin-800-normal.woff2) format("woff2")}
@font-face{font-family:"IBM Plex Sans";font-weight:400;font-display:swap;src:url(../fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2")}
@font-face{font-family:"IBM Plex Sans";font-weight:500;font-display:swap;src:url(../fonts/ibm-plex-sans-latin-500-normal.woff2) format("woff2")}
@font-face{font-family:"IBM Plex Sans";font-weight:600;font-display:swap;src:url(../fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2")}
@font-face{font-family:"IBM Plex Mono";font-weight:400;font-display:swap;src:url(../fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2")}
@font-face{font-family:"IBM Plex Mono";font-weight:500;font-display:swap;src:url(../fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2")}

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{overflow-x:hidden}
.app{max-width:440px;padding-inline:clamp(.75rem,4vw,1rem);padding-bottom:calc(6.5rem + env(safe-area-inset-bottom,0px))}
.view{min-width:0;outline:none}
.view h1,.h2{font-size:clamp(1.9rem,9vw,2.4rem)} .h3{font-size:1.4rem}
.wrap,.row-name,.row-sub,.card p{overflow-wrap:anywhere}
.row-sub{white-space:normal}

.skip{position:absolute;left:-999px} .skip:focus{left:.5rem;top:.5rem;z-index:99;background:var(--surface);padding:.75rem}
.brand .logo{color:inherit;text-decoration:none;min-height:44px}
.brand .mark{width:36px;height:36px;display:block} .brand .mark svg{width:100%;height:100%}
.logo .wm{font:italic 800 clamp(1.15rem,6vw,1.5rem)/1 var(--font-display);text-transform:uppercase} .logo .wm b{color:var(--zed,#5E8A00)}
.spacer{flex:1}
:root[data-theme="dark"]{--zed:#C6F432}

/* Tactile : 44 px minimum ; champs à 16 px pour éviter le zoom automatique d'iOS. */
.btn,.btn.mini,.btn--link,.back,.chip{min-height:44px}
.icon-btn{width:44px;height:44px}
.f,input,select,textarea{font-size:1rem;min-height:44px}
input[type=checkbox]{min-height:0;width:1.35rem;height:1.35rem;flex:none}
.btn--link{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;text-align:center}
a.back,button.back{display:inline-flex;align-items:center;text-decoration:none}
.stack{display:flex;flex-direction:column;gap:1rem}
fieldset.card{margin:0;min-width:0} fieldset.card legend{float:left;width:100%;padding:0} fieldset.card legend+*{clear:both}
.card label{min-width:0}
label.inline{flex-direction:row;align-items:center;gap:.6rem;min-height:44px}
.btn-row{display:flex;flex-wrap:wrap;gap:.5rem} .btn-row>*{flex:1 1 9rem}
.btn.danger{background:#B4191C;color:#fff}
.form-error{margin:0;padding:.65rem .8rem;border-radius:12px;background:var(--stop-soft);color:var(--stop);font-weight:600}
.banner{margin:.5rem 0 0;padding:.6rem .8rem;border-radius:12px;background:var(--accent-soft);font-weight:600;display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;justify-content:space-between}
.banner[hidden]{display:none}
.banner--warn{background:var(--warn-soft)}
.list--cards{display:grid;grid-template-columns:minmax(0,1fr);gap:.65rem}
.member{display:flex;flex-direction:column;gap:.5rem}
.tags{display:flex;flex-wrap:wrap;gap:.4rem}
.tag{display:inline-flex;align-items:center;gap:.25rem;border:1px solid var(--line);border-radius:999px;padding:0 0 0 .75rem;font-size:.9rem;font-weight:600;min-height:44px}
.tag button{background:none;border:0;width:44px;height:44px;font-size:1.25rem;color:var(--muted)}
.tag:not(:has(button)){padding-right:.75rem}
.spcard{--tc:#1E63E9;color:#fff;text-decoration:none;border-radius:16px;padding:1rem;min-height:5.5rem;border:0;
  background-image:repeating-linear-gradient(90deg,rgba(255,255,255,.08) 0 22px,transparent 22px 44px)}
.spcard .tname{font-size:clamp(1.6rem,8vw,2.4rem);overflow-wrap:anywhere}
.codes{display:grid;grid-template-columns:repeat(auto-fill,minmax(8.5rem,1fr));gap:.4rem;list-style:none;padding:0;margin:0}
.cmd{display:block;font-family:var(--font-data);font-size:.85rem;background:var(--bg);padding:.6rem;border-radius:10px;overflow-wrap:anywhere}
.checks{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.35rem}
.check--ok{color:var(--ok)} .check--ko{color:var(--stop);font-weight:600}
.qr{display:flex;justify-content:center} .qr img{width:min(14rem,100%);height:auto;image-rendering:pixelated;background:#fff;border-radius:12px}

.dlg{width:min(26rem,calc(100% - 1.5rem));max-height:calc(100dvh - 2rem);overflow:auto;border:0;border-radius:22px;padding:1rem;background:var(--bg);color:var(--ink);box-shadow:0 18px 50px rgba(0,0,0,.25)}
.dlg::backdrop{background:rgba(8,18,22,.6)}
.dlg[open]{display:flex;flex-direction:column;gap:.85rem;animation:viewIn .25s ease}
body.locked #app,body.locked .nav,body.locked #dlg,body.locked #extend{visibility:hidden}

.view>*{animation:viewIn .38s cubic-bezier(.2,.8,.2,1) both}
.nav a{padding:.6rem .25rem .7rem;min-height:3.5rem;font-size:.84rem;font-weight:600;color:var(--muted);display:flex;flex-direction:column;align-items:center;gap:.25rem;text-decoration:none}
.nav a[aria-current="page"]{color:var(--accent)}
.nav[hidden]{display:none}

/* Contraste : en thème clair, les textes colorés d'origine sont assombris (4,5:1 au minimum). */
:root{--ok-text:#0B6B3A;--warn-text:#8A4B00;--stop-text:#B4191C;--accent-text:#1450BE}
.s-vert,.check--ok{color:var(--ok-text)} .s-orange{color:var(--warn-text)} .s-rouge,.form-error,.check--ko{color:var(--stop-text)}
.btn.ghost{color:var(--accent-text)} .btn.ok{background:var(--ok-text)}
:root[data-theme="dark"]{--ok-text:#5CC48A;--warn-text:#E5B256;--stop-text:#EE7A6C;--accent-text:#9CCBF0}
:root[data-theme="dark"] .btn:not(.ghost):not(.danger){color:#0F1A1D}
@media (prefers-color-scheme:dark){
  :root[data-theme="auto-dark"]{--zed:#C6F432;--ok-text:#5CC48A;--warn-text:#E5B256;--stop-text:#EE7A6C;--accent-text:#9CCBF0}
  :root[data-theme="auto-dark"] .btn:not(.ghost):not(.danger){color:#0F1A1D}
}

/* Tablette */
@media (min-width:48rem){
  .app,.nav-in{max-width:46rem}
  .app--narrow{max-width:34rem}
  .list--cards{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
}
/* Ordinateur : la navigation passe sur le côté. */
@media (min-width:75rem){
  .app{max-width:64rem}
  .app--narrow{max-width:34rem}
  body.signed-in{padding-left:13rem}
  .app{padding-bottom:2rem}
  .list--cards{grid-template-columns:repeat(3,minmax(0,1fr))}
  .nav{top:0;right:auto;width:13rem;border-top:0;border-right:1px solid var(--line);padding-top:1rem}
  .nav-in{display:flex;flex-direction:column;max-width:none}
  .nav a{flex-direction:row;gap:.75rem;padding:.75rem 1rem;font-size:1rem}
}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
