/* Atelier·K — charte Myriam·K appliquée (docs/DESIGN.md) */

/* Polices officielles. Déposer les fichiers dans public/fonts/.
   Tant qu'ils ne sont pas là, les secours de la maquette prennent le relais. */
@font-face { font-family: 'Sink';    src: url('/fonts/sink.woff2') format('woff2');        font-weight: 400; font-display: swap; }
@font-face { font-family: 'SN';      src: url('/fonts/sn-regular.woff2') format('woff2');  font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'SN';      src: url('/fonts/sn-italic.woff2') format('woff2');   font-weight: 500; font-style: italic;  font-display: swap; }
@font-face { font-family: 'Jost';    src: url('/fonts/jost.woff2') format('woff2');        font-weight: 100 900; font-display: swap; }

:root {
  --mk-wisteria-blue: #95A5F9;
  --mk-parchment:     #F4F0EC;
  --mk-pitch-black:   #100C08;
  --ak-surface:       #FFFFFF;
  --ak-line:          #E6DFD7;
  --ak-line-strong:   #D9D0C6;
  --ak-text-muted:    #5E574F;
  --ak-mention-bg:    #E4E9FF;
  --ak-warning:       #FCEF5C;

  --ak-titre:  'Sink', 'Anton', Impact, sans-serif;
  --ak-serif:  'SN', 'Seriously Nostalgic', 'Playfair Display', Georgia, serif;
  --ak-texte:  'Jost', 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--ak-texte);
  font-size: 15px;
  color: var(--mk-pitch-black);
  background: var(--mk-parchment);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--mk-pitch-black); text-decoration: none; }
a:hover { color: #423F3F; }

h1, h2, h3 { margin: 0; font-weight: 500; }

/* ----------------------------------------------------------------- titrages */

.ak-titre {
  font-family: var(--ak-titre);
  font-weight: 400;
  font-size: 64px;
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.ak-titre--m { font-size: 40px; }

.ak-serif { font-family: var(--ak-serif); font-weight: 500; }

.ak-libelle {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ak-text-muted);
}

.ak-muted { color: var(--ak-text-muted); }
.ak-small { font-size: 13px; }

/* ------------------------------------------------------------------ boutons */

.ak-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--mk-pitch-black);
  color: var(--mk-parchment);
  font-family: var(--ak-texte);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  cursor: pointer;
}
.ak-btn:hover { background: #2A2320; color: var(--mk-parchment); }

.ak-btn--ghost {
  background: transparent;
  border: 1px solid var(--mk-pitch-black);
  color: var(--mk-pitch-black);
}
.ak-btn--ghost:hover { background: var(--mk-pitch-black); color: var(--mk-parchment); }

.ak-btn--quiet {
  background: var(--ak-surface);
  border: 1px solid var(--ak-line-strong);
  color: var(--mk-pitch-black);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  font-size: 14px;
}
.ak-btn--quiet:hover { background: var(--mk-parchment); color: var(--mk-pitch-black); }

.ak-btn--mini { height: 32px; padding: 0 12px; font-size: 11px; }

.ak-btn--danger { border-color: #B4482F; color: #B4482F; background: transparent; }
.ak-btn--danger:hover { background: #B4482F; color: #FFFFFF; }

/* ------------------------------------------------------------------ formulaires */

.ak-champ { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }

.ak-champ > label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.ak-champ input[type="text"],
.ak-champ input[type="email"],
.ak-champ input[type="password"],
.ak-champ select,
.ak-champ textarea {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--ak-line-strong);
  border-radius: 12px;
  background: var(--ak-surface);
  font-family: var(--ak-texte);
  font-size: 15px;
  color: var(--mk-pitch-black);
}
.ak-champ textarea { height: auto; padding: 12px 14px; line-height: 1.5; resize: vertical; }

.ak-champ input:focus, .ak-champ select:focus, .ak-champ textarea:focus {
  outline: none;
  border-color: var(--mk-pitch-black);
  box-shadow: 0 0 0 3px rgba(149, 165, 249, 0.35);
}

.ak-aide { font-size: 12.5px; color: var(--ak-text-muted); }

.ak-case { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.ak-case input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: var(--mk-pitch-black); }

/* --------------------------------------------------------------------- cartes */

.ak-carte {
  background: var(--ak-surface);
  border: 1px solid var(--ak-line);
  border-radius: 18px;
  padding: 26px;
}
.ak-carte--choisie { border: 2px solid var(--mk-pitch-black); }

/* ------------------------------------------------------------------ pastilles */

.ak-pastille {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--mk-wisteria-blue);
  color: var(--mk-pitch-black);
  font-size: 12px;
  font-weight: 600;
}
.ak-pastille--sombre { background: var(--mk-pitch-black); color: var(--mk-parchment); }
.ak-pastille--calme  { background: var(--mk-parchment); border: 1px solid var(--ak-line-strong); font-weight: 500; }

.ak-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
  color: var(--mk-pitch-black);
  flex-shrink: 0;
}
.ak-avatar--sm { width: 28px; height: 28px; font-size: 11px; }

/* ---------------------------------------------------------- barre latérale */

.ak-app { display: flex; min-height: 100vh; }

.ak-nav {
  width: 248px;
  flex-shrink: 0;
  padding: 32px 20px;
  background: var(--mk-wisteria-blue);
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.ak-nav__marque { padding: 0 12px; display: flex; flex-direction: column; gap: 4px; }
.ak-nav__logo { font-family: var(--ak-titre); font-size: 34px; line-height: 1; text-transform: uppercase; }
.ak-nav__claim { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }

.ak-nav__liens { display: flex; flex-direction: column; gap: 4px; }

.ak-nav__lien {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
}
.ak-nav__lien:hover { background: rgba(16, 12, 8, 0.08); color: var(--mk-pitch-black); }
.ak-nav__lien--actif { background: var(--mk-pitch-black); color: var(--ak-surface); }
.ak-nav__lien--actif:hover { background: var(--mk-pitch-black); color: var(--ak-surface); }
.ak-nav__compteur { margin-left: auto; font-size: 13px; font-weight: 700; }

.ak-nav__pied { margin-top: auto; display: flex; flex-direction: column; gap: 14px; padding: 0 12px; }
.ak-nav__moi { display: flex; align-items: center; gap: 12px; }

/* ------------------------------------------------------------------- contenu */

.ak-main { flex-grow: 1; min-width: 0; padding: 44px 52px 64px; }

.ak-entete {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}
.ak-entete__texte { display: flex; flex-direction: column; gap: 8px; }
.ak-entete__actions { display: flex; gap: 12px; align-items: center; }

/* --------------------------------------------------------------- messages */

.ak-flash { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.ak-flash__item {
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid var(--ak-line-strong);
  background: var(--ak-surface);
  font-size: 14px;
}
.ak-flash__item--ok    { border-left: 4px solid var(--mk-wisteria-blue); }
.ak-flash__item--error { border-left: 4px solid #B4482F; }

/* --------------------------------------------------------------- tableaux */

.ak-table { width: 100%; border-collapse: collapse; background: var(--ak-surface);
            border: 1px solid var(--ak-line); border-radius: 18px; overflow: hidden; }
.ak-table th {
  text-align: left;
  padding: 14px 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ak-text-muted);
  border-bottom: 1px solid var(--ak-line);
}
.ak-table td { padding: 16px 18px; border-bottom: 1px solid var(--ak-line); font-size: 14px; vertical-align: middle; }
.ak-table tr:last-child td { border-bottom: 0; }
.ak-table tr.est-inactif td { opacity: 0.55; }

/* ------------------------------------------------------------- page connexion */

.ak-auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px; }
.ak-auth__carte { width: 100%; max-width: 430px; }
.ak-auth__marque { text-align: center; margin-bottom: 26px; }
.ak-auth__logo { font-family: var(--ak-titre); font-size: 44px; line-height: 1; text-transform: uppercase; }
.ak-auth__claim { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ak-text-muted); }
.ak-auth__liens { margin-top: 18px; text-align: center; font-size: 13.5px; }

/* ------------------------------------------------------------- projet type */

.ak-colonnes { display: flex; gap: 16px; align-items: flex-start; overflow-x: auto; padding-bottom: 20px; }
.ak-colonne { width: 280px; flex-shrink: 0; display: flex; flex-direction: column; gap: 10px; }
.ak-colonne__entete { display: flex; align-items: center; gap: 8px; padding: 0 4px; }
.ak-colonne__point { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.ak-colonne__titre { font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.ak-colonne__compte { margin-left: auto; font-size: 12px; color: var(--ak-text-muted); }

.ak-etape {
  background: var(--ak-surface);
  border: 1px solid var(--ak-line);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  line-height: 1.35;
}
.ak-etape__outils { margin-left: auto; display: flex; gap: 4px; flex-shrink: 0; }
.ak-icone-btn {
  width: 26px; height: 26px; border: 0; border-radius: 8px; background: var(--mk-parchment);
  color: var(--ak-text-muted); font-size: 13px; line-height: 1; cursor: pointer; padding: 0;
}
.ak-icone-btn:hover { background: var(--mk-wisteria-blue); color: var(--mk-pitch-black); }

.ak-vide {
  background: var(--ak-surface);
  border: 1px dashed var(--ak-line-strong);
  border-radius: 18px;
  padding: 44px 32px;
  text-align: center;
  color: var(--ak-text-muted);
}

.ak-inline { display: flex; gap: 8px; align-items: center; }
.ak-inline input[type="text"] {
  flex-grow: 1; height: 38px; padding: 0 12px;
  border: 1px solid var(--ak-line-strong); border-radius: 10px;
  font-family: var(--ak-texte); font-size: 14px; background: var(--ak-surface);
}

/* --------------------------------------------------------------- téléphone */

@media (max-width: 860px) {
  .ak-app { flex-direction: column; }
  .ak-nav { width: 100%; flex-direction: row; align-items: center; gap: 16px; padding: 14px 16px; overflow-x: auto; }
  .ak-nav__marque, .ak-nav__claim { display: none; }
  .ak-nav__liens { flex-direction: row; }
  .ak-nav__pied { margin-top: 0; margin-left: auto; }
  .ak-nav__pied form { display: none; }
  .ak-main { padding: 26px 18px 48px; }
  .ak-titre { font-size: 38px; }
  .ak-entete { flex-direction: column; align-items: stretch; }
}

/* ======================================================= lot 2 — les projets */

.ak-recherche {
  display: flex; align-items: center; gap: 8px;
  height: 46px; padding: 0 16px;
  border-radius: 999px; background: var(--ak-surface);
  border: 1px solid var(--ak-line-strong); color: var(--ak-text-muted);
}
.ak-recherche input {
  border: 0; outline: none; background: transparent;
  font-family: var(--ak-texte); font-size: 14px; width: 250px; color: var(--mk-pitch-black);
}

.ak-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 22px; }

.ak-projet { display: flex; flex-direction: column; gap: 20px; }
.ak-projet:hover { border-color: var(--ak-line-strong); }
.ak-projet__haut { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.ak-projet__haut > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ak-projet__nom { font-size: 25px; }
.ak-projet__bas { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ak-projet__stats { display: flex; gap: 16px; font-size: 13px; color: var(--ak-text-muted); flex-wrap: wrap; }

.ak-progress__ligne { display: flex; justify-content: space-between; font-size: 13px; color: var(--ak-text-muted); margin-bottom: 8px; }
.ak-progress { height: 6px; border-radius: 3px; background: var(--ak-line); overflow: hidden; }
.ak-progress > span { display: block; height: 6px; border-radius: 3px; background: var(--mk-pitch-black); transition: width .25s ease; }

.ak-pile { display: flex; }
.ak-pile__item { border: 2px solid var(--ak-surface); }
.ak-pile__item + .ak-pile__item { margin-left: -8px; }

/* ------------------------------------------------------------ nouveau projet */

.ak-deux-colonnes { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 22px; align-items: start; max-width: 1100px; }
.ak-fieldset { border: 0; padding: 0; margin: 26px 0 0; }
.ak-fieldset legend { padding: 0; margin-bottom: 12px; }

.ak-choix { display: flex; gap: 12px; align-items: flex-start; padding: 16px; margin-bottom: 10px;
            border: 1px solid var(--ak-line-strong); border-radius: 14px; cursor: pointer; }
.ak-choix:has(input:checked) { border: 2px solid var(--mk-pitch-black); padding: 15px; }
.ak-choix input { margin: 2px 0 0; accent-color: var(--mk-pitch-black); width: 18px; height: 18px; }
.ak-choix > span { display: flex; flex-direction: column; gap: 4px; }
.ak-choix__titre { font-weight: 600; font-size: 15px; }
.ak-choix__aide { font-size: 13px; color: var(--ak-text-muted); }

.ak-participants { display: flex; flex-direction: column; gap: 12px; }
.ak-participants .ak-case { gap: 10px; }

.ak-apercu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ak-apercu li { display: flex; justify-content: space-between; font-size: 14px;
                padding-bottom: 10px; border-bottom: 1px solid var(--ak-line); }
.ak-apercu li:last-child { border-bottom: 0; }

/* ---------------------------------------------------------- rail du projet */

.ak-nav--rail { width: 72px; padding: 26px 0; align-items: center; gap: 18px; }
.ak-rail__lien { width: 44px; height: 44px; border-radius: 22px; display: flex; align-items: center; justify-content: center; }
.ak-rail__lien:hover { background: rgba(16, 12, 8, 0.08); }
.ak-rail__lien--actif { background: var(--mk-pitch-black); color: var(--ak-surface); }
.ak-rail__lien--actif:hover { background: var(--mk-pitch-black); color: var(--ak-surface); }

.ak-main--pleine { padding: 0; display: flex; flex-direction: column; min-height: 100vh; }

.ak-projet__entete {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  padding: 26px 40px 20px; background: var(--ak-surface); border-bottom: 1px solid var(--ak-line);
}
.ak-projet__meta { display: flex; gap: 16px; font-size: 13px; color: var(--ak-text-muted); flex-wrap: wrap; align-items: center; }

.ak-bandeau { margin: 0; padding: 12px 40px; background: var(--ak-warning); font-size: 14px; font-weight: 500; }

.ak-colonnes--projet { flex-grow: 1; padding: 24px 40px; align-items: flex-start; }

/* ------------------------------------------------------------------ étapes */

.ak-etape { flex-direction: column; gap: 8px; position: relative; }
.ak-etape--ligne { flex-direction: row; align-items: flex-start; gap: 8px; }
.ak-etape__case { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.ak-etape__case input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--mk-pitch-black); flex-shrink: 0; }
.ak-etape__titre { line-height: 1.35; }
.ak-etape.est-faite .ak-etape__titre { color: var(--ak-text-muted); text-decoration: line-through; }
.ak-etape__pied { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--ak-text-muted); flex-wrap: wrap; }
.ak-etape__pied:empty { display: none; }
.ak-etape__fait:empty { display: none; }

.ak-etape__outils, .ak-colonne__outils { display: flex; gap: 4px; }
.ak-etape__outils { position: absolute; top: 8px; right: 8px; opacity: 0; transition: opacity .15s; }
.ak-etape:hover .ak-etape__outils, .ak-etape:focus-within .ak-etape__outils { opacity: 1; }
.ak-etape__outils .ak-icone-btn { background: var(--mk-parchment); }

.ak-colonne__outils { opacity: 0; transition: opacity .15s; }
.ak-colonne:hover .ak-colonne__outils, .ak-colonne:focus-within .ak-colonne__outils { opacity: 1; }

@media (max-width: 860px) {
  .ak-grille { grid-template-columns: 1fr; }
  .ak-deux-colonnes { grid-template-columns: 1fr; }
  .ak-nav--rail { width: 100%; flex-direction: row; padding: 12px 16px; }
  .ak-projet__entete { flex-direction: column; align-items: stretch; padding: 20px 18px 16px; }
  .ak-colonnes--projet { padding: 18px; }
  .ak-recherche input { width: 100%; }
  .ak-recherche { flex-grow: 1; }
}

/* ================================================== lot 3 — les échanges */

.ak-hors-ecran { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.ak-projet__corps { display: flex; flex-grow: 1; min-height: 0; }
.ak-projet__corps .ak-colonnes--projet { flex-grow: 1; min-width: 0; }

.ak-etape.est-ouverte { border: 2px solid var(--mk-pitch-black); padding: 11px 13px; }
.ak-etape__titre { flex-grow: 1; }
a.ak-etape__titre:hover { text-decoration: underline; }

.ak-nav__badge {
  min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px;
  background: var(--mk-pitch-black); color: var(--mk-parchment);
  display: inline-flex; align-items: center; justify-content: center;
}
.ak-rail__lien { position: relative; }
.ak-rail__pastille {
  position: absolute; top: 2px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--mk-pitch-black); color: var(--mk-parchment);
  font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}

/* ------------------------------------------------ panneau latéral d'étape */

.ak-panneau {
  width: 472px; flex-shrink: 0; background: var(--ak-surface);
  border-left: 1px solid var(--ak-line); box-shadow: -12px 0 32px rgba(17, 10, 7, 0.06);
  display: flex; flex-direction: column; min-height: 0;
}
.ak-panneau__entete { padding: 22px 26px 16px; border-bottom: 1px solid var(--ak-line);
                      display: flex; flex-direction: column; gap: 12px; }
.ak-panneau__ligne { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ak-panneau__fil { flex-grow: 1; overflow-y: auto; padding: 20px 26px; display: flex; flex-direction: column; gap: 22px; }

.ak-message { display: flex; gap: 12px; }
.ak-message__corps { display: flex; flex-direction: column; gap: 7px; min-width: 0; flex-grow: 1; }
.ak-message__tete { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.ak-message__texte { font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.ak-message__supprime { margin: 0; font-size: 13px; font-style: italic; color: var(--ak-text-muted); }

.ak-mention { background: var(--ak-mention-bg); padding: 1px 4px; border-radius: 4px; font-weight: 600; }

.ak-message__actions summary {
  font-size: 12px; color: var(--ak-text-muted); cursor: pointer; list-style: none; padding: 2px 0;
}
.ak-message__actions summary:hover { color: var(--mk-pitch-black); }
.ak-message__actions[open] summary { margin-bottom: 8px; }

.ak-pj { display: flex; flex-direction: column; gap: 6px; }
.ak-pj__item {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  border: 1px solid var(--ak-line); border-radius: 10px; font-size: 13px;
}
.ak-pj__item:hover { border-color: var(--ak-line-strong); background: var(--mk-parchment); }
.ak-pj__nom { flex-grow: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ak-pj__vignette { border-radius: 6px; object-fit: cover; flex-shrink: 0; }

/* ------------------------------------------------------------- composeur */

.ak-composeur { border-top: 1px solid var(--ak-line); padding: 14px 26px 20px;
                display: flex; flex-direction: column; gap: 10px; }
.ak-composeur__zone { position: relative; }
.ak-zone {
  width: 100%; box-sizing: border-box; resize: vertical; padding: 12px 14px;
  border: 1px solid var(--ak-line-strong); border-radius: 12px;
  font-family: var(--ak-texte); font-size: 14px; line-height: 1.5; color: var(--mk-pitch-black);
  background: var(--ak-surface);
}
.ak-zone:focus { outline: none; border-color: var(--mk-pitch-black); }
.ak-composeur__pied { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ak-composeur__fichiers { display: flex; flex-wrap: wrap; gap: 6px; }
.ak-composeur__fichiers span {
  font-size: 12px; padding: 5px 10px; border-radius: 999px;
  background: var(--mk-parchment); border: 1px solid var(--ak-line-strong);
}

.ak-suggestions {
  position: absolute; left: 0; bottom: calc(100% + 6px); width: 250px; padding: 6px; z-index: 20;
  background: var(--ak-surface); border: 1px solid var(--ak-line-strong); border-radius: 12px;
  box-shadow: 0 12px 28px rgba(17, 10, 7, 0.12); display: flex; flex-direction: column;
}
.ak-suggestions button {
  display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 10px;
  border: 0; border-radius: 8px; background: transparent; cursor: pointer;
  font-family: var(--ak-texte); font-size: 14px; color: var(--mk-pitch-black); text-align: left;
}
.ak-suggestions button:hover, .ak-suggestions button.est-visee { background: #F1F3FF; }

/* --------------------------------------------------------- mes mentions */

.ak-mentions { display: flex; flex-direction: column; gap: 10px; }
.ak-mention-ligne {
  display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px;
  background: var(--ak-surface); border: 1px solid var(--ak-line); border-radius: 16px;
}
.ak-mention-ligne:hover { border-color: var(--ak-line-strong); }
.ak-mention-ligne.est-non-lue { border-left: 4px solid var(--mk-wisteria-blue); }
.ak-mention-ligne__corps { display: flex; flex-direction: column; gap: 5px; flex-grow: 1; min-width: 0; }
.ak-mention-ligne__texte { font-size: 14px; line-height: 1.45; }
.ak-mention-ligne__date { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.ak-point-wisteria { width: 10px; height: 10px; border-radius: 50%; background: var(--mk-wisteria-blue); display: block; }

@media (max-width: 1100px) {
  .ak-projet__corps { flex-direction: column; }
  .ak-panneau { width: 100%; border-left: 0; border-top: 1px solid var(--ak-line); box-shadow: none; }
  .ak-panneau__fil { max-height: 55vh; }
}

/* ===================================================== lot 4 — la clôture */

.ak-recap { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; }
.ak-recap > div { display: flex; flex-direction: column; gap: 2px;
                  padding-bottom: 12px; border-bottom: 1px solid var(--ak-line); }
.ak-recap dt { font-size: 12px; font-weight: 600; letter-spacing: 0.1em;
               text-transform: uppercase; color: var(--ak-text-muted); }
.ak-recap dd { margin: 0; font-size: 15px; }

.ak-alerte { margin: 22px 0 0; padding: 14px 16px; border-radius: 12px;
             background: var(--ak-warning); font-size: 14px; line-height: 1.45; }

.ak-consequences { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px;
                   font-size: 14px; line-height: 1.45; }

.ak-apercu-pdf { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 7px;
                 font-size: 13px; line-height: 1.4; color: var(--ak-text-muted); }

.ak-encadre {
  margin-top: 26px; padding: 18px 22px; border-radius: 16px;
  background: var(--ak-surface); border: 1px dashed var(--ak-line-strong);
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
}

.ak-table details summary { list-style: none; }
.ak-table details form { position: absolute; z-index: 10; margin-top: 8px; padding: 14px;
                         background: var(--ak-surface); border: 1px solid var(--ak-line-strong);
                         border-radius: 14px; box-shadow: 0 12px 28px rgba(17, 10, 7, 0.12); }
.ak-table td { position: relative; }

@media (max-width: 860px) {
  .ak-recap { grid-template-columns: 1fr; }
}

/* ============================ lot 5 — confort tactile et petits écrans */

/* La charte impose 44 px de zone cliquable. Sur un écran tactile, on épaissit
   les cibles fines sans changer la mise en page du bureau. */
@media (pointer: coarse) {
  .ak-etape__case { min-height: 44px; align-items: center; }
  .ak-etape__case input[type="checkbox"] { width: 22px; height: 22px; }
  .ak-etape__titre { padding: 11px 0; }

  .ak-case { min-height: 44px; }
  .ak-case input[type="checkbox"] { width: 22px; height: 22px; }

  .ak-icone-btn { width: 44px; height: 44px; font-size: 15px; }
  .ak-etape__outils { opacity: 1; }
  .ak-colonne__outils { opacity: 1; }

  .ak-nav__lien, .ak-rail__lien { min-height: 44px; }
  .ak-nav__logo { display: inline-flex; align-items: center; min-height: 44px; }

  .ak-pj__item { min-height: 44px; }
  .ak-btn--mini { height: 40px; padding: 0 16px; }
  .ak-nav--rail .ak-avatar { width: 44px; height: 44px; }
  .ak-projet__entete a.ak-small, .ak-entete__texte .ak-libelle a {
    display: inline-flex; align-items: center; min-height: 40px;
  }
  .ak-inline input[type="text"] { height: 44px; }
  .ak-message__actions summary { padding: 12px 0; }
  .ak-mention-ligne { padding: 20px; }
  .ak-apercu li { padding-bottom: 14px; }
  .ak-table td a.ak-btn--mini { height: 40px; }
}

/* Téléphone : on respire, et le tableau des archives se lit en liste. */
@media (max-width: 620px) {
  .ak-titre { font-size: 32px; }
  .ak-titre--m { font-size: 28px; }
  .ak-entete { gap: 16px; }
  .ak-entete__actions { flex-wrap: wrap; }
  .ak-recherche { width: 100%; }
  .ak-carte { padding: 20px; }
  .ak-projet__nom { font-size: 21px; }
  .ak-colonne { width: 84vw; max-width: 320px; }
  .ak-panneau__entete, .ak-panneau__fil, .ak-composeur { padding-left: 18px; padding-right: 18px; }

  .ak-table, .ak-table thead, .ak-table tbody, .ak-table tr, .ak-table th, .ak-table td { display: block; }
  .ak-table thead { display: none; }
  .ak-table tr { border-bottom: 1px solid var(--ak-line); padding: 14px 4px; }
  .ak-table tr:last-child { border-bottom: 0; }
  .ak-table td { border: 0; padding: 4px 14px; }
  .ak-table details form { position: static; width: auto; }

  /* Sur téléphone on consulte, on coche et on commente. Réorganiser ou
     supprimer une rubrique se fait sur un écran large. */
  .ak-etape__outils, .ak-colonne__outils { display: none; }

  /* Barre du haut : les libellés restent sur une ligne et défilent,
     le nom du compte laisse la place à son seul avatar. */
  .ak-nav { gap: 10px; padding: 10px 14px; }
  .ak-nav__lien { white-space: nowrap; padding: 0 12px; font-size: 14px; }
  .ak-nav__moi > span:last-child { display: none; }
  .ak-nav__pied .ak-nav__claim { display: none; }
}

/* Bandeau plein en tête de rubrique, à la manière de Taskworld mais aux
   couleurs de la charte. La couleur du texte suit le chapitre 03 :
   Pitch Black partout, Parchment sur Pitch Black. */
.ak-colonne__entete--plein {
  padding: 11px 16px;
  border-radius: 12px;
  margin-bottom: 2px;
}
.ak-colonne__entete--plein .ak-colonne__titre { font-size: 13px; letter-spacing: 0.12em; }
.ak-colonne__entete--plein .ak-colonne__compte { color: inherit; opacity: 0.72; font-weight: 600; }

/* ============================= épingle, fiche projet, palette de couleur */

.ak-projet-carte { position: relative; }
.ak-projet-carte .ak-projet__haut { padding-right: 40px; }

.ak-projet__etoile { position: absolute; top: 18px; right: 18px; z-index: 2; line-height: 0; }
.ak-etoile {
  width: 32px; height: 32px; padding: 0; border: 0; border-radius: 16px;
  background: transparent; color: var(--ak-line-strong); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.ak-etoile:hover { background: var(--mk-parchment); color: var(--ak-text-muted); }
.ak-etoile.est-epingle { color: var(--mk-pitch-black); }
.ak-etoile.est-epingle:hover { color: var(--mk-pitch-black); }

.ak-projet__resume {
  font-size: 13px; color: var(--ak-text-muted); line-height: 1.4; margin-top: 2px;
}

/* -------------------------------------------------------- fiche du projet */

.ak-fiche {
  margin: 0; padding: 18px 40px 20px;
  background: var(--ak-surface); border-bottom: 1px solid var(--ak-line);
}
.ak-fiche__texte { font-size: 14px; line-height: 1.55; max-width: 900px; }
.ak-fiche__edition { margin-top: 10px; }
.ak-fiche__edition summary {
  font-size: 12.5px; color: var(--ak-text-muted); cursor: pointer;
  list-style: none; display: inline-block; padding: 4px 0;
}
.ak-fiche__edition summary:hover { color: var(--mk-pitch-black); }
.ak-fiche__edition[open] summary { margin-bottom: 10px; }
.ak-fiche__edition form { max-width: 900px; }

/* ------------------------------------------------------ petits menus pliants */

.ak-menu { position: relative; display: inline-block; }
.ak-menu > summary { list-style: none; cursor: pointer; }
.ak-menu > summary::-webkit-details-marker { display: none; }
.ak-menu__panneau {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; width: 280px; padding: 16px;
  background: var(--ak-surface); border: 1px solid var(--ak-line-strong); border-radius: 14px;
  box-shadow: 0 12px 28px rgba(17, 10, 7, 0.14);
}
.ak-menu__panneau input[type="text"] {
  width: 100%; height: 40px; padding: 0 12px; margin-top: 6px;
  border: 1px solid var(--ak-line-strong); border-radius: 10px;
  font-family: var(--ak-texte); font-size: 14px;
}

.ak-menu--couleur .ak-menu__panneau { width: 208px; left: 0; right: auto; }
.ak-pastille-couleur { width: 12px; height: 12px; border-radius: 50%; display: block; border: 1px solid rgba(16,12,8,.25); }
.ak-palette { display: flex; flex-wrap: wrap; gap: 8px; }
.ak-palette .ak-libelle { flex-basis: 100%; }
.ak-palette__choix {
  width: 30px; height: 30px; border-radius: 15px; border: 2px solid transparent;
  cursor: pointer; padding: 0; box-shadow: inset 0 0 0 1px rgba(16,12,8,.18);
}
.ak-palette__choix:hover { border-color: var(--ak-line-strong); }
.ak-palette__choix.est-choisie { border-color: var(--mk-pitch-black); }

@media (max-width: 620px) {
  .ak-fiche { padding: 16px 18px; }
  .ak-menu__panneau { width: 240px; }
}

/* ===================== la page projet tient dans l'écran, le composeur reste visible */

/* Sur grand écran, le tableau et le panneau défilent chacun de leur côté.
   Sans ça, une colonne longue pousse le composeur sous la ligne de flottaison. */
@media (min-width: 1101px) {
  .ak-main--pleine { height: 100vh; overflow: hidden; }
  .ak-projet__corps { min-height: 0; }
  .ak-colonnes--projet { overflow: auto; }
  .ak-panneau { min-height: 0; }
  .ak-fiche__texte { max-height: 92px; overflow-y: auto; }
}

/* ------------------------------------------------- joindre un fichier */

.ak-trombone {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--ak-line-strong); background: var(--ak-surface);
  font-size: 13px; color: var(--mk-pitch-black); cursor: pointer;
}
.ak-trombone:hover { background: var(--mk-parchment); border-color: var(--mk-pitch-black); }

.ak-composeur__indice { font-size: 12px; color: var(--ak-text-muted); flex-grow: 1; }

.ak-composeur { position: relative; }
.ak-depot {
  position: absolute; inset: 6px; z-index: 5;
  border: 2px dashed var(--mk-pitch-black); border-radius: 14px;
  background: var(--ak-mention-bg);
  display: none; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600; pointer-events: none;
}
.ak-composeur.recoit .ak-depot { display: flex; }

.ak-composeur__fichiers span {
  display: inline-flex; align-items: center; gap: 8px;
}
.ak-composeur__fichiers button {
  border: 0; background: transparent; cursor: pointer; padding: 0 2px;
  color: var(--ak-text-muted); font-size: 14px; line-height: 1;
}
.ak-composeur__fichiers button:hover { color: #B4482F; }

@media (max-width: 620px) {
  .ak-composeur__indice { display: none; }
}
