:root {
  --clay: #D97757;        /* orange Claude : éléments graphiques */
  --clay-fonce: #B85A3A;  /* boutons pleins et textes d'accent (4,6:1 sur blanc) */
  --clay-survol: #96462B;
  --encre: #141413;
  --texte-2: #3D3D3A;
  --gris: #5E5D59;
  --ligne: #DEDCD1;
  --ligne-douce: #E8E6DC;
  --bord-champ: #C2C0B6;
  --fond-doux: #F5F4ED;
  --fond: #FFFFFF;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--fond);
  color: var(--encre);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 13px;
  line-height: 1.45;
}
.volet { display: flex; flex-direction: column; min-height: 100%; }

/* En-tête */
.tete { padding: 12px 16px 8px; display: flex; flex-direction: column; gap: 2px; }
.tete-ligne { display: flex; justify-content: space-between; align-items: center; }
.marque { font-size: 15px; font-weight: 700; }
.sujet { font-size: 12px; color: var(--gris); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Onglets */
.onglets { display: flex; gap: 4px; padding: 0 10px; border-bottom: 1px solid var(--ligne); }
.onglets button {
  height: 40px; padding: 0 10px; border: 0; background: none; font: inherit; color: var(--gris);
  border-bottom: 2px solid transparent; cursor: pointer;
}
.onglets button[aria-selected="true"] { color: var(--clay-fonce); font-weight: 600; border-bottom-color: var(--clay); }
.onglets button:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible {
  outline: 2px solid var(--clay); outline-offset: 1px;
}

.contenu { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.pied { padding: 8px 16px; border-top: 1px solid var(--ligne-douce); font-size: 11px; color: var(--gris); display: flex; justify-content: space-between; gap: 8px; }
.pied:empty { display: none; }

/* Textes */
h2 { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.3; }
.titre-section { margin: 0; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--clay-fonce); }
.discret { color: var(--gris); font-size: 12px; margin: 0; }
p { margin: 0; }
a { color: var(--clay-fonce); }
a:hover { color: var(--clay-survol); }

/* Champs */
label { font-weight: 600; }
.facultatif { font-weight: 400; color: var(--gris); }
.champ { display: flex; flex-direction: column; gap: 6px; }
textarea, input[type="text"], input[type="password"], input[type="date"], select {
  font: inherit; color: var(--encre); border: 1px solid var(--bord-champ); border-radius: 6px; padding: 8px 10px; background: #fff; width: 100%;
}
textarea { resize: vertical; min-height: 72px; }
.ligne-champ { display: flex; gap: 8px; }
.ligne-champ input { flex: 1; min-width: 0; }

/* Boutons */
button { font: inherit; cursor: pointer; }
.btn { min-height: 40px; padding: 0 14px; border-radius: 6px; border: 1px solid var(--bord-champ); background: #fff; color: var(--encre); }
.btn:hover { background: var(--fond-doux); }
.btn-plein { background: var(--clay-fonce); border-color: var(--clay-fonce); color: #fff; font-weight: 600; }
.btn-plein:hover { background: var(--clay-survol); border-color: var(--clay-survol); }
.btn[disabled] { opacity: .5; cursor: default; }
.btn-large { width: 100%; min-height: 44px; }
.pile { display: flex; flex-direction: column; gap: 8px; }
.rang { display: flex; gap: 8px; }
.rang > .btn { flex: 1; }
.icone { width: 32px; height: 32px; border: 0; background: none; border-radius: 6px; color: var(--gris); display: inline-flex; align-items: center; justify-content: center; }
.icone:hover { background: var(--fond-doux); }
.lien { border: 0; background: none; padding: 0; color: var(--clay-fonce); text-decoration: underline; font-size: 12px; }

/* Encadrés */
.encart { padding: 10px 12px; background: var(--fond-doux); border-radius: 6px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.encart-texte { display: flex; flex-direction: column; gap: 1px; }
.encart-texte strong { font-weight: 600; }
.alerte { padding: 10px 12px; border: 1px solid var(--clay-fonce); border-radius: 6px; color: var(--encre); background: #FBF1EC; }
.erreur { padding: 10px 12px; border: 1px solid var(--clay-fonce); border-left-width: 1px; border-radius: 6px; background: #FBF1EC; }

/* Étapes */
.entete-attente { display: flex; justify-content: space-between; align-items: baseline; }
.chrono { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--clay-fonce); }
.etapes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.etapes li { display: flex; gap: 12px; align-items: center; }
.pastille { width: 20px; height: 20px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; }
.pastille.faite { background: var(--clay); }
.pastille.active { border: 2px solid var(--clay); }
.pastille.active::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--clay); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .pastille.active::after { animation: none; } }
.etape-active { font-weight: 600; }

/* Listes de résultats */
.liste { list-style: none; margin: 0; padding: 0; }
.liste > li { padding: 9px 0; border-top: 1px solid var(--ligne-douce); display: flex; flex-direction: column; gap: 3px; }
.liste > li:last-child { border-bottom: 1px solid var(--ligne-douce); }
.points > li { flex-direction: row; gap: 10px; }
.num { font-weight: 700; color: var(--clay-fonce); width: 12px; flex: none; }
.ligne-titre { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.ligne-titre strong { font-weight: 600; }
.badge { font-size: 10px; font-weight: 700; letter-spacing: .04em; border-radius: 4px; padding: 1px 6px; white-space: nowrap; flex: none; }
.badge-ecart { background: var(--clay-fonce); color: #fff; }
.badge-confirme { border: 1px solid var(--encre); }
.badge-rien { border: 1px dashed #87867F; color: var(--gris); }
.section { display: flex; flex-direction: column; gap: 6px; }

/* Angles */
.angle { text-align: left; padding: 10px 12px; border: 1px solid var(--bord-champ); border-radius: 8px; background: #fff; display: flex; flex-direction: column; gap: 3px; }
.angle strong { font-weight: 600; font-size: 13px; }
.angle span { color: var(--gris); font-size: 12px; }
.angle[aria-pressed="true"] { border: 1.5px solid var(--clay); background: #FDF7F4; }
.angle:hover { border-color: var(--clay); }

/* Tâches */
.tache { border: 1px solid var(--ligne); border-radius: 8px; padding: 10px; display: flex; gap: 10px; }
.tache input[type="checkbox"] { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--clay); flex: none; }
.tache-corps { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.tache-corps .rang select, .tache-corps .rang input { flex: 1; min-width: 0; padding: 5px 8px; }
.tache.ecartee { opacity: .65; }
.nom-tache { min-height: 0; resize: none; padding: 6px 8px; }

details summary { cursor: pointer; font-weight: 600; }
.apercu { margin-top: 8px; white-space: pre-wrap; color: var(--texte-2); }
.succes { display: flex; gap: 8px; align-items: center; }
.succes svg { flex: none; }
.vide { color: var(--gris); }
