/* Guide de projet : panneau latéral sur ordinateur, plein écran sur téléphone. */
.guide { position: fixed; inset: 0 0 0 auto; width: min(640px, 100vw); height: 100dvh; max-width: none; max-height: none; margin: 0 0 0 auto; padding: 0; border: 0; background: var(--white); color: var(--ink); overflow: hidden; }
.guide::backdrop { background: rgba(23, 26, 33, .38); }
.guide[open] { animation: guideIn .45s var(--ease); }
@keyframes guideIn { from { opacity: 0; transform: translateX(28px); } }
.guide-root { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; height: 100%; }
.g-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: calc(18px + env(safe-area-inset-top, 0px)) 32px 0; }
.g-title { font-size: 15px; font-weight: 500; }
.g-close svg { width: 22px; height: 22px; }
.g-progress { padding: 14px 32px 0; }
.g-bars { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.g-bar { position: relative; height: 24px; padding: 0; border: 0; background: none; border-radius: 2px; }
.g-bar::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 3px; margin-top: -1.5px; background: var(--line); transition: background-color .3s; }
.g-bar.is-done::before { background: var(--ink); }
.g-bar[aria-current="step"]::before { background: var(--cobalt); }
.g-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 4px; font-size: 14px; color: var(--muted); }
.g-body { overflow-y: auto; overscroll-behavior: contain; padding: 40px 32px 40px; }
.g-q { font-size: clamp(1.75rem, 3.4vw, 2.25rem); font-weight: 500; line-height: 1.08; letter-spacing: -.04em; outline: none; }
.g-help { max-width: 34em; margin-top: 12px; font-size: 16px; line-height: 1.55; color: var(--muted); }
.g-hint { margin-top: 12px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.g-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 28px; }
.g-tile { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 4px 14px; padding: 16px 40px 16px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); text-align: left; transition: border-color .2s, background-color .2s, box-shadow .2s; }
.g-tile:hover { border-color: var(--ink); }
.g-tile .icon { grid-row: span 2; width: 28px; height: 28px; }
.g-tile b { font-size: 16px; font-weight: 500; line-height: 1.3; }
.g-tile span { font-size: 14px; line-height: 1.4; color: var(--muted); }
.g-tile[aria-pressed="true"] { --knock: var(--tint); border-color: var(--cobalt); background: var(--tint); box-shadow: inset 0 0 0 1px var(--cobalt); }
.g-tile[aria-pressed="true"]::after, .g-chip[aria-pressed="true"]::before { content: ""; width: 6px; height: 11px; border: solid var(--cobalt); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.g-tile[aria-pressed="true"]::after { position: absolute; top: 16px; right: 18px; }
.g-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.g-tiles + .g-chips { margin-top: 12px; }
.g-chips-later { margin-top: 12px; }
.g-chip { position: relative; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); color: var(--ink); font-size: 15px; font-weight: 500; line-height: 1.25; text-align: left; transition: border-color .2s, background-color .2s, color .2s; cursor: pointer; }
.g-chip:hover { border-color: var(--ink); }
.g-chip.is-later { border-style: dashed; }
.g-chip[aria-pressed="true"], .g-radio:has(input:checked) { border-style: solid; border-color: var(--cobalt); background: var(--tint); color: var(--cobalt-deep); }
.g-chip[aria-pressed="true"]::before { flex: none; width: 5px; height: 9px; margin: -3px 0 0 -2px; }
.g-radio input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.g-radio:has(input:focus-visible) { outline: 2px solid var(--cobalt); outline-offset: 3px; }
.g-radio:has(input:checked)::before { content: ""; flex: none; width: 5px; height: 9px; margin: -3px 0 0 -2px; border: solid var(--cobalt); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.g-group { margin-top: 28px; }
.g-group .g-chips { margin-top: 0; }
.g-group-title { margin-bottom: 12px; font-size: 14px; font-weight: 500; color: var(--muted); }
.g-field { margin-top: 32px; }
.g-label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500; }
.g-text { display: block; width: 100%; min-height: 104px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); font-size: 16px; line-height: 1.5; resize: vertical; transition: border-color .2s; }
.g-text:hover, .g-date:hover { border-color: #B9BCC4; }
.g-text:focus, .g-date:focus { border-color: var(--ink); }
.g-text::placeholder { color: #8C9099; }
.g-date { height: 50px; min-width: 220px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); font-size: 16px; }
.g-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 32px calc(16px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--white); }
.g-footer[hidden] { display: none; }
.g-textbtn { padding: 10px 2px; border: 0; background: none; color: var(--ink); font-size: 15px; font-weight: 500; text-decoration: underline; text-decoration-color: var(--line); text-decoration-thickness: 1px; text-underline-offset: 6px; transition: color .2s, text-decoration-color .2s; }
.g-textbtn:hover { color: var(--cobalt); text-decoration-color: currentColor; }
.g-textbtn[hidden] { display: none; }
.g-brief { margin-top: 32px; border-top: 1px solid var(--line); }
.g-entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.g-entry dt { font-size: 14px; color: var(--muted); }
.g-entry dd { grid-column: 1; margin: 0; font-size: 16px; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
.g-entry.is-empty dd { color: var(--muted); }
.g-edit { grid-column: 2; grid-row: 1 / span 2; align-self: start; padding-top: 0; }
.g-actions { display: grid; gap: 10px; margin-top: 36px; }
.g-actions .btn { width: 100%; }
.g-actions .g-hint { margin: 0 0 6px; }
.g-actions-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.g-btn-icon { width: 20px; height: 20px; flex: none; }
.g-email .g-btn-icon { order: -1; }
.g-status { min-height: 22px; margin-top: 12px; font-size: 14px; font-weight: 500; color: var(--cobalt-deep); }
.g-direct { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.g-links { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.g-link { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 500; text-decoration: none; }
.g-link:hover { color: var(--cobalt); }
.g-note { margin-top: 28px; font-size: 13px; line-height: 1.55; color: var(--muted); }
.g-note a { color: var(--ink); text-underline-offset: 3px; }
.g-reset { margin-top: 20px; }
.g-reset-banner { padding: 18px 20px; border-radius: 10px; background: var(--surface); }
.g-reset-banner strong { font-weight: 500; }
.g-reset-banner p { margin-top: 4px; font-size: 14px; color: var(--muted); }
.g-reset-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 14px; }
@media (max-width: 640px) {
  .guide { width: 100vw; }
  .g-header { padding-inline: 20px; }
  .g-progress { padding-inline: 20px; }
  .g-body { padding: 32px 20px; }
  .g-footer { padding-inline: 20px; }
  .g-tiles { grid-template-columns: 1fr; }
  .g-actions-row { grid-template-columns: 1fr; }
  .g-date { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .guide[open], .info[open] { animation: none; } }
