/* GROW CI · espace consultants et administration (charte du logo : bleu #193a87, vert #008c39, or #ac8e00) */
:root {
  --ink: #0b1740; --ink-soft: #4a5680; --canvas: #f4f6fb; --paper: #fff; --mist: #dfe4f1;
  --blue: #193a87; --accent: #2a5bc8; --green: #008c39; --green-deep: #00743a; --sun: #e2b928; --gold: #ac8e00; --tint: #dbe5fa;
  --night: #0c1d52; --danger: #c4151c; --ok-bg: #dff7ea; --warn-bg: #fff4d6;
  --f-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif; --f-body: 'Instrument Sans', 'Segoe UI', system-ui, sans-serif; --f-mono: 'DM Mono', ui-monospace, Consolas, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: var(--f-body); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; min-height: 100vh; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 500; letter-spacing: -.03em; line-height: 1.1; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

.top { position: sticky; top: 0; z-index: 20; background: rgba(244,246,251,.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--mist); }
.top__in { max-width: 1100px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 650 19px var(--f-display); letter-spacing: -.03em; color: var(--ink); text-decoration: none; }
.brand img { width: 38px; height: 38px; border-radius: 9px; }
.top__tag { font: 500 11px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); padding: 4px 10px; border: 1px solid var(--mist); border-radius: 99px; background: var(--paper); }
.top__sp { flex: 1; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 28px 20px 80px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border: 0; border-radius: 12px; background: var(--blue); color: #fff; font-weight: 600; text-decoration: none; transition: transform .25s var(--ease), background .25s, box-shadow .25s; }
.btn:hover { background: var(--accent); transform: translateY(-2px); }
.btn:disabled { opacity: .55; cursor: wait; transform: none; }
.btn--sm { min-height: 36px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn--ghost { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1px var(--mist); }
.btn--ghost:hover { background: var(--tint); }
.btn--ok { background: var(--green); } .btn--ok:hover { background: var(--green-deep); }
.btn--danger { background: var(--paper); color: var(--danger); box-shadow: inset 0 0 0 1px #f0c9cb; } .btn--danger:hover { background: #fdecec; }

.card { background: var(--paper); border: 1px solid var(--mist); border-radius: 18px; padding: 22px; }
.card + .card { margin-top: 14px; }
.eyebrow { font: 500 11px var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.muted { color: var(--ink-soft); }
.small { font-size: 13.5px; }

.login { max-width: 440px; margin: 8vh auto 0; display: grid; gap: 18px; }
.login h1 { font-size: clamp(30px, 6vw, 42px); }

.field { display: grid; gap: 6px; }
.field > label { font-size: 14px; font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; padding: 11px 14px; background: var(--paper); border: 1px solid var(--mist); border-radius: 12px; outline: none; transition: border-color .2s, box-shadow .2s; }
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(42,91,200,.14); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form { display: grid; gap: 14px; }
.msg { padding: 10px 14px; border-radius: 12px; font-size: 14.5px; }
.msg--err { background: #fdecec; color: #8d1217; }
.msg--ok { background: var(--ok-bg); color: #075f33; }
.msg--warn { background: var(--warn-bg); color: #6b5200; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 22px; padding: 5px; background: var(--paper); border: 1px solid var(--mist); border-radius: 14px; width: fit-content; max-width: 100%; }
.tab { border: 0; background: transparent; padding: 9px 16px; border-radius: 10px; font-weight: 600; color: var(--ink-soft); display: inline-flex; align-items: center; gap: 8px; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { background: var(--blue); color: #fff; }
.tab .n { background: var(--sun); color: var(--ink); font: 600 11px var(--f-mono); padding: 2px 7px; border-radius: 99px; }

.hello { margin-bottom: 20px; display: grid; gap: 6px; }
.hello h1 { font-size: clamp(28px, 5vw, 40px); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--paper); border: 1px solid var(--mist); border-radius: 16px; padding: 18px; }
.stat b { display: block; font: 500 38px var(--f-display); letter-spacing: -.04em; line-height: 1; color: var(--blue); }
.stat span { font-size: 14px; color: var(--ink-soft); }
.grid2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
.grid2 .card + .card { margin-top: 0; }

.progress { height: 8px; border-radius: 99px; background: var(--mist); overflow: hidden; margin: 10px 0; }
.progress i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--blue), var(--green)); transition: width .8s var(--ease); }
.todo { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; font-size: 14.5px; }
.todo li::before { content: '○'; margin-right: 8px; color: var(--gold); }
.todo li.done::before { content: '✓'; color: var(--green); }
.todo li.done { color: var(--ink-soft); }

.ann { padding: 14px 0; border-top: 1px solid var(--mist); }
.ann:first-of-type { border-top: 0; padding-top: 4px; }
.ann h3 { font-size: 20px; margin-bottom: 4px; }
.ann p { white-space: pre-line; color: var(--ink-soft); }
.date { font: 500 11px var(--f-mono); letter-spacing: .06em; color: var(--ink-soft); }

.cards { display: grid; gap: 14px; }
.mission h3 { font-size: 22px; margin: 6px 0; }
.mission p.d { white-space: pre-line; color: var(--ink-soft); margin: 8px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.chip { font: 500 11.5px var(--f-mono); letter-spacing: .04em; padding: 4px 10px; border-radius: 99px; background: var(--canvas); border: 1px solid var(--mist); }
.chip--pole { background: var(--tint); border-color: transparent; color: var(--blue); }
.chip--ok { background: var(--ok-bg); border-color: transparent; color: #075f33; }
.chip--warn { background: var(--warn-bg); border-color: transparent; color: #6b5200; }
.chip--off { background: #eee; color: #666; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }

.docgroup h2 { font-size: 24px; margin: 22px 0 10px; }
.docgroup:first-child h2 { margin-top: 0; }
.doc { display: flex; align-items: center; gap: 14px; justify-content: space-between; padding: 14px 16px; background: var(--paper); border: 1px solid var(--mist); border-radius: 14px; margin-bottom: 8px; }
.doc b { display: block; }
.doc small { color: var(--ink-soft); }

table.t { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.t th { text-align: left; font: 500 11px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); padding: 8px 10px; border-bottom: 1px solid var(--mist); }
table.t td { padding: 12px 10px; border-bottom: 1px solid var(--mist); vertical-align: top; }
.tw { overflow-x: auto; }
.appcard { display: grid; gap: 8px; }
.appcard header { display: flex; justify-content: space-between; gap: 10px; align-items: start; flex-wrap: wrap; }
.appcard h3 { font-size: 21px; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 4px 12px; font-size: 14.5px; }
.kv dt { color: var(--ink-soft); } .kv dd { margin: 0; word-break: break-word; white-space: pre-line; }
.empty { text-align: center; padding: 40px 10px; color: var(--ink-soft); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); background: var(--night); color: #fff; padding: 12px 20px; border-radius: 12px; z-index: 100; transition: transform .45s var(--ease); max-width: calc(100vw - 32px); }
.toast.on { transform: translate(-50%, 0); }
.modal { position: fixed; inset: 0; z-index: 90; background: rgba(11,23,64,.55); display: grid; place-items: center; padding: 16px; }
.modal__box { background: var(--paper); border-radius: 20px; padding: 24px; max-width: 520px; width: 100%; display: grid; gap: 14px; max-height: 90vh; overflow: auto; }
.cred { background: var(--canvas); border: 1px dashed var(--accent); border-radius: 12px; padding: 14px; font: 500 15px var(--f-mono); display: grid; gap: 4px; word-break: break-all; }
.cred b { color: var(--blue); }

@media (max-width: 820px) {
  .grid2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr 1fr; }
  .row { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; }
  .kv dt { margin-top: 6px; }
  .stat { padding: 12px; } .stat b { font-size: 30px; } .stat span { font-size: 12.5px; }
  .doc { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { * { transition-duration: .001ms !important; animation-duration: .001ms !important; } }

/* en-tête sur petit écran */
.brand { white-space: nowrap; }
.top__in { flex-wrap: nowrap; }
.btn--sm { white-space: nowrap; }
@media (max-width: 560px) {
  .top__tag { display: none; }
  .top__in { padding: 10px 14px; }
  .wrap { padding: 20px 14px 70px; }
}

/* V4 : titres animés lettre par lettre (même effet que les pages du menu « À propos ») */
.aw-word { display: inline-block; white-space: nowrap; }
.aw-word.acc { color: var(--green, #008c39); }
h1[data-anim-done] { position: relative; }
h1[data-anim-done] .ch { display: inline-block; animation: chIn 1s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * 55ms + 120ms); }
h1[data-anim-done] .aw-word:last-child::after { content: ''; }
@keyframes chIn { from { opacity: 0; transform: translateY(.6em) rotate(5deg); filter: blur(10px); } to { opacity: 1; transform: none; filter: blur(0); } }
@media (prefers-reduced-motion: reduce) { h1[data-anim-done] .ch { animation: none; } }
