/* SEEDKA Studio — style sobre noir et blanc (logo « Les briques »), mobile d'abord, cibles de 44 px. */
:root {
  --ink: #111111;
  --muted: #4a4a4a;
  --line: #d9d9d6;
  --ground: #f4f4f2;
  --paper: #ffffff;
  --accent: #f2be1a;
  --danger: #b3261e;
  --radius: 10px;
  font-family: Poppins, "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--ground);
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; }
a { color: var(--ink); }
h1 { font-size: 1.5rem; margin: 0 0 1rem; letter-spacing: -0.01em; }
.top { display: flex; align-items: center; gap: 1rem; padding: 0.75rem 1rem; background: var(--paper); border-bottom: 1px solid var(--line); }
.top__brand { display: inline-flex; min-height: 44px; align-items: center; }
.top__app { font-weight: 600; color: var(--muted); }
.menu { display: flex; gap: 0.25rem; overflow-x: auto; padding: 0.5rem 1rem; background: var(--paper); border-bottom: 1px solid var(--line); }
.menu__item { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.875rem; border-radius: var(--radius); text-decoration: none; white-space: nowrap; }
.menu__item[aria-current="page"] { background: var(--ink); color: var(--paper); }
.main { max-width: 1100px; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
.lead { color: var(--muted); margin-top: -0.5rem; }
.notice { background: var(--paper); border-left: 4px solid var(--accent); padding: 0.75rem 1rem; border-radius: 4px; }
.alert { background: #fdecea; border-left: 4px solid var(--danger); padding: 0.75rem 1rem; border-radius: 4px; margin-bottom: 1rem; }
.alert p { margin: 0.25rem 0; }
.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.card__link { display: flex; flex-direction: column; gap: 0.25rem; padding: 1rem; min-height: 44px; text-decoration: none; }
.card__title { font-weight: 600; }
.card__text { color: var(--muted); font-size: 0.9rem; }
.head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.head h1 { margin: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 1.125rem; border: 1px solid var(--ink); border-radius: var(--radius); background: var(--ink); color: var(--paper); font: inherit; font-weight: 500; text-decoration: none; cursor: pointer; }
.button--ghost { background: var(--paper); color: var(--ink); }
.button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.empty { background: var(--paper); border: 1px dashed var(--line); border-radius: var(--radius); padding: 1.5rem; color: var(--muted); }
.table { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }
td a { display: inline-block; min-height: 24px; font-weight: 500; }
.pager { margin-top: 1rem; }
.form { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; display: grid; gap: 1rem; max-width: 640px; }
.field { display: grid; gap: 0.375rem; }
.field__label { font-weight: 500; }
.field input, .field select, .field textarea { width: 100%; min-height: 44px; padding: 0.5rem 0.75rem; border: 1px solid #8a8a86; border-radius: 8px; font: inherit; background: var(--paper); color: var(--ink); }
.field--error input, .field--error select, .field--error textarea { border-color: var(--danger); }
.field__error { margin: 0; color: var(--danger); font-size: 0.9rem; }
.field__help { margin: 0; color: var(--muted); font-size: 0.9rem; }
.check { display: flex; align-items: center; gap: 0.625rem; min-height: 44px; }
.check input { width: 22px; height: 22px; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.archive { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 1.5rem; max-width: 640px; }
.archive__hint { color: var(--muted); font-size: 0.9rem; }
.subtitle { font-size: 1.1rem; margin: 2rem 0 0.75rem; }
.widgets { list-style: none; padding: 0; margin: 0 0 0.5rem; display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.widget { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; display: flex; flex-direction: column; gap: 0.375rem; }
.widget--list { grid-column: 1 / -1; }
.widget__label { color: var(--muted); font-size: 0.9rem; }
.widget__value { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; }
.widget__empty { color: var(--muted); }
.widget__items { margin: 0; padding-left: 1.1rem; }
.widget__items li { min-height: 32px; }
.months { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.agenda { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.agenda__day { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.75rem 1rem; }
.agenda__day--today { border-color: var(--ink); border-width: 2px; }
.agenda__day--past { opacity: 0.75; }
.agenda__date { font-size: 1rem; margin: 0 0 0.5rem; text-transform: capitalize; }
.agenda__items { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.agenda__items li { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; align-items: baseline; }
.agenda__meta { color: var(--muted); font-size: 0.9rem; }
.notifications { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.notification { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 6px; padding: 0.75rem 1rem; }
.notification__text { margin: 0 0 0.25rem; font-weight: 500; }
.notification__meta { margin: 0; color: var(--muted); font-size: 0.9rem; }
@media (max-width: 640px) {
  thead { display: none; }
  table, tbody, tr, td { display: block; }
  tr { border-bottom: 1px solid var(--line); padding: 0.5rem 0; }
  td { border: 0; padding: 0.25rem 1rem; }
  td::before { content: attr(data-label); display: block; font-size: 0.8rem; color: var(--muted); }
}
.card--template { display: flex; flex-direction: column; justify-content: space-between; }
.card__action { padding: 0 1rem 1rem; }

/* Choix du rôle (démonstration) */
.role { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; background: var(--paper); border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.role select { min-height: 44px; }

/* Pièces jointes */
.attachment { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: baseline; margin: 0.25rem 0; }
.attachment a { font-weight: 600; overflow-wrap: anywhere; }
.attachment__size { color: var(--muted, #5b6470); font-size: 0.85rem; }
input[type="file"] { min-height: 44px; max-width: 100%; }

/* Compte connecté */
.top__account { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: 0.9rem; color: var(--muted); }
.auth { max-width: 28rem; }
.members { list-style: none; padding: 0; display: grid; gap: 0.75rem; }
.members li { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; justify-content: space-between; padding: 0.75rem; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.invite-link { overflow-wrap: anywhere; user-select: all; padding: 0.75rem; border: 1px dashed var(--line); border-radius: 8px; }

/* Aperçu d'une modification */
.preview { border: 1px solid var(--line); border-radius: 8px; padding: 1rem; background: var(--paper); }
.preview ul { padding-left: 1.25rem; }

/* Recherche et filtres des listes */
.filters { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; margin: 0 0 1rem; }
.filters .field { margin: 0; min-width: 10rem; flex: 1 1 10rem; }
.filters .actions { margin: 0; }

/* Petits téléphones (360 px) : l'en-tête passe sur deux lignes au lieu de déborder (aucun défilement horizontal). */
.top { flex-wrap: wrap; row-gap: 0.5rem; }
.top__app { min-width: 0; overflow-wrap: anywhere; }
.top__account { min-width: 0; justify-content: flex-end; }
.top__account .button { min-height: 36px; padding: 0 0.75rem; }
html, body { max-width: 100%; overflow-x: hidden; }
@media (max-width: 480px) {
  .top { gap: 0.5rem; }
  .top__brand img { width: 120px; height: auto; }
  .top__account { flex-basis: 100%; justify-content: flex-start; font-size: 0.85rem; }
}

/* Aide : lien d'en-tête, articles dépliables, demandes d'aide. */
.top__help { margin-left: auto; display: inline-flex; align-items: center; min-height: 44px; }
.help-search { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; max-width: 640px; }
.help-search input { flex: 1 1 14rem; min-height: 44px; padding: 0.5rem 0.75rem; border: 1px solid #8a8a86; border-radius: 8px; font: inherit; }
.help-articles { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; max-width: 720px; }
.help-article { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.help-article summary { cursor: pointer; padding: 0.75rem 1rem; min-height: 44px; display: flex; align-items: center; font-weight: 600; }
.help-article p { margin: 0; padding: 0 1rem 1rem; }
.tickets { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; max-width: 720px; }
.ticket { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; overflow-wrap: anywhere; }
.ticket__meta { color: var(--muted); font-size: 0.9rem; margin: 0 0 0.5rem; }
.ticket__answer { border-left: 4px solid var(--accent); padding: 0.5rem 0.75rem; margin: 0.75rem 0; background: var(--ground); }
.ticket__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Pied de page (liens légaux) et pages de texte. */
.footer { max-width: 1100px; margin: 0 auto; padding: 1rem 1rem 2rem; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; border-top: 1px solid var(--line); font-size: 0.9rem; }
.footer a { color: var(--muted); display: inline-flex; align-items: center; min-height: 44px; }
.legal { max-width: 46rem; }
.legal p, .legal li { line-height: 1.6; }
