/* 📮 Télégramme : bleu nuit, rouge sceau, fond papier bleuté. */
:root { --telegramme: #1b3a5c; --telegramme-soft: #dfe7ec; --telegramme-deep: #0f2440; --sceau: #8a2b2b; --acc: var(--telegramme); --acc-soft: var(--telegramme-soft); --acc-deep: var(--telegramme-deep); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --telegramme: #7fb1d6; --telegramme-soft: #16283a; } }
:root[data-theme="dark"] { --telegramme: #7fb1d6; --telegramme-soft: #16283a; }

.tg-hero { padding: 6px 0 14px; }
.tg-titre { font-size: 40px; font-weight: 800; letter-spacing: .06em; color: var(--acc); line-height: 1; border-bottom: 3px solid var(--acc); padding-bottom: 8px; display: flex; justify-content: space-between; align-items: flex-end; }
.tg-titre span { font-family: var(--mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; background: var(--acc); color: #fff; padding: 6px 10px; }
.tg-hero p { margin: 12px 0 0; font-size: 16px; line-height: 1.5; max-width: 560px; }
.tg-deux { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 8px 0 16px; }
.tg-gros { display: grid; gap: 8px; justify-items: start; padding: 22px 20px; border-radius: 16px; background: var(--acc); color: #fff; text-decoration: none; min-height: 150px; }
.tg-gros.alt { background: var(--panel); color: var(--acc); border: 2px solid var(--acc); }
.tg-gros b { font-size: 26px; letter-spacing: .02em; }
.tg-gros span { font-size: 14px; line-height: 1.4; opacity: .9; }
.tg-sim { padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); margin-bottom: 10px; }
.tg-pied { margin-top: 8px; }
@media (max-width: 600px) { .tg-deux { grid-template-columns: 1fr; } .tg-titre { font-size: 30px; } }

/* Liste et fiche */
.tg-l { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.tg-l:last-child { border-bottom: 0; } .tg-l:hover { background: var(--panel-2); }
.tg-num { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--acc); flex: none; width: 64px; }
.tg-lt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.tg-cartes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.tg-cartes img { width: 100%; border-radius: 6px; box-shadow: var(--shadow); display: block; }
.tg-actions { gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.tg-bloc { display: grid; gap: 8px; padding: 14px 16px; margin-bottom: 10px; }
.tg-bloc h3 { margin: 0; }
.tg-lien { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tg-lien code { flex: 1; min-width: 200px; word-break: break-all; font-size: 12px; padding: 8px 10px; background: var(--panel-2); border-radius: 8px; }
.tg-mono { font-family: var(--mono); word-break: break-all; }
.tg-code { font-family: var(--mono); letter-spacing: .2em; font-size: 16px; }
@media (max-width: 600px) { .tg-cartes { grid-template-columns: 1fr; } }

/* J'envoie */
.tg-etape { display: grid; gap: 10px; padding: 16px 18px; margin-bottom: 12px; }
.tg-etape h3 { margin: 0; display: flex; align-items: center; gap: 10px; }
.tg-etape h3 i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--acc); color: #fff; font-size: 13px; font-style: normal; font-weight: 700; flex: none; }
.tg-rec { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tg-rec .btn { min-height: 46px; }
.tg-rec-btn.on { background: var(--sceau); border-color: var(--sceau); }
.tg-chrono { font-family: var(--mono); font-size: 22px; font-weight: 700; min-width: 70px; }
.tg-wave { width: 100%; height: 48px; border-radius: 8px; background: var(--panel-2); }
.tg-audio { width: 100%; }
.tg-compte { text-align: right; }
.tg-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.tg-dates { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tg-envoi { position: sticky; bottom: calc(66px + env(safe-area-inset-bottom)); display: flex; justify-content: flex-end; gap: 8px; padding: 10px 0; background: linear-gradient(transparent, var(--bg) 30%); }
@media (min-width: 721px) { .tg-envoi { bottom: 0; } }
.tg-attente { display: grid; justify-items: center; gap: 10px; padding: 32px; text-align: center; }
.tg-spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--acc); animation: tg-tourne .9s linear infinite; }
@keyframes tg-tourne { to { transform: rotate(360deg); } }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
