/* Webmails Cloud — interface (30/11/2026). Téléphone d'abord, mode sombre, sans dépendance. */

:root {
	--fond: #f6f7fb;
	--surface: #ffffff;
	--surface-2: #f1f3f9;
	--surface-3: #e8ebf3;
	--encre: #0f172a;
	--encre-2: #475467;
	--encre-3: #8a94a6;
	--ligne: #e4e7ef;
	--accent: #4f46e5;
	--accent-2: #6366f1;
	--accent-doux: #eef0ff;
	--accent-encre: #ffffff;
	--danger: #e5484d;
	--danger-doux: #fdecec;
	--ok: #12a150;
	--ambre: #d97706;
	--ombre-1: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
	--ombre-2: 0 12px 32px -8px rgba(16, 24, 40, .18), 0 4px 12px -4px rgba(16, 24, 40, .08);
	--rayon: 14px;
	--rayon-s: 10px;
	--police: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--haut: env(safe-area-inset-top, 0px);
	--bas: env(safe-area-inset-bottom, 0px);
	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--fond: #0b0d12;
		--surface: #12151c;
		--surface-2: #181c25;
		--surface-3: #222734;
		--encre: #e8eaf0;
		--encre-2: #a9b0c0;
		--encre-3: #6f788b;
		--ligne: #232836;
		--accent: #7c83ff;
		--accent-2: #8f95ff;
		--accent-doux: #1d2040;
		--danger-doux: #2b1517;
		--ombre-1: 0 1px 2px rgba(0, 0, 0, .4);
		--ombre-2: 0 16px 40px -8px rgba(0, 0, 0, .6);
		color-scheme: dark;
	}
}

:root[data-theme="dark"] {
	--fond: #0b0d12;
	--surface: #12151c;
	--surface-2: #181c25;
	--surface-3: #222734;
	--encre: #e8eaf0;
	--encre-2: #a9b0c0;
	--encre-3: #6f788b;
	--ligne: #232836;
	--accent: #7c83ff;
	--accent-2: #8f95ff;
	--accent-doux: #1d2040;
	--danger-doux: #2b1517;
	--ombre-1: 0 1px 2px rgba(0, 0, 0, .4);
	--ombre-2: 0 16px 40px -8px rgba(0, 0, 0, .6);
	color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
	margin: 0;
	background: var(--fond);
	color: var(--encre);
	font: 15px/1.45 var(--police);
	-webkit-font-smoothing: antialiased;
	-webkit-tap-highlight-color: transparent;
	overscroll-behavior: none;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--accent); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

svg.ic { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Chargement ---------- */
.ecran-chargement { position: fixed; inset: 0; display: grid; place-items: center; }
.logo-anime { width: 54px; height: 54px; border-radius: 16px; background: linear-gradient(135deg, var(--accent), #22d3ee); position: relative; animation: pulse 1.2s ease-in-out infinite; }
.logo-anime span { position: absolute; inset: 15px 13px; border: 2.5px solid #fff; border-radius: 4px; }
.logo-anime span::after { content: ""; position: absolute; left: 2px; right: 2px; top: 2px; height: 10px; border-bottom: 2.5px solid #fff; border-left: 2.5px solid #fff; transform: skewY(0) rotate(-45deg); transform-origin: 0 0; width: 0; }
@keyframes pulse { 50% { transform: scale(.92); opacity: .8; } }

/* ---------- Connexion ---------- */
.connexion {
	min-height: 100%;
	display: grid;
	place-items: center;
	padding: calc(24px + var(--haut)) 20px calc(24px + var(--bas));
	background:
		radial-gradient(900px 500px at 10% -10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%),
		radial-gradient(700px 500px at 110% 110%, color-mix(in srgb, #22d3ee 18%, transparent), transparent 60%),
		var(--fond);
}
.carte-connexion { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--ligne); border-radius: 22px; padding: 32px 26px 26px; box-shadow: var(--ombre-2); }
.marque { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.marque-logo { width: 44px; height: 44px; border-radius: 13px; background: linear-gradient(135deg, var(--accent), #22d3ee); display: grid; place-items: center; color: #fff; box-shadow: 0 8px 20px -6px color-mix(in srgb, var(--accent) 60%, transparent); }
.marque-logo svg { width: 24px; height: 24px; stroke-width: 2; }
.marque b { display: block; font-size: 19px; letter-spacing: -.01em; }
.marque small { color: var(--encre-3); font-size: 13px; }
.carte-connexion h1 { font-size: 24px; letter-spacing: -.02em; margin: 0 0 6px; }
.carte-connexion p.sous { margin: 0 0 22px; color: var(--encre-2); }
.champ { display: block; margin-bottom: 14px; }
.champ span { display: block; font-size: 13px; font-weight: 600; color: var(--encre-2); margin-bottom: 6px; }
.champ input, .champ textarea {
	width: 100%; border: 1.5px solid var(--ligne); background: var(--surface); border-radius: 12px;
	padding: 12px 14px; font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.champ input:focus, .champ textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.mdp { position: relative; }
.mdp button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); padding: 8px; color: var(--encre-3); border-radius: 8px; }
.bouton {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	height: 44px; padding: 0 18px; border-radius: 12px; font-weight: 600;
	background: var(--accent); color: var(--accent-encre); transition: transform .08s, filter .15s, background .15s;
}
.bouton:hover { filter: brightness(1.06); }
.bouton:active { transform: scale(.98); }
.bouton[disabled] { opacity: .55; pointer-events: none; }
.bouton.large { width: 100%; height: 48px; font-size: 16px; }
.bouton.second { background: var(--surface-2); color: var(--encre); }
.bouton.danger { background: var(--danger); }
.bouton.leger { background: transparent; color: var(--encre-2); }
.erreur { background: var(--danger-doux); color: var(--danger); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 14px; }
.pied-connexion { text-align: center; color: var(--encre-3); font-size: 12.5px; margin-top: 18px; }

/* ---------- Structure ---------- */
.coque { display: grid; grid-template-columns: 260px minmax(320px, 400px) 1fr; height: 100dvh; overflow: hidden; }
.cote { background: var(--surface-2); border-right: 1px solid var(--ligne); display: flex; flex-direction: column; padding: calc(14px + var(--haut)) 12px calc(12px + var(--bas)); overflow-y: auto; }
.cote .marque { margin: 4px 8px 18px; }
.cote .marque b { font-size: 16px; }
.cote .marque small { display: block; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ecrire {
	display: flex; align-items: center; justify-content: center; gap: 10px; height: 46px; border-radius: 14px; margin: 0 4px 16px;
	background: var(--accent); color: #fff; font-weight: 650; box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--accent) 80%, transparent);
}
.ecrire:active { transform: scale(.98); }
.dossiers { list-style: none; margin: 0; padding: 0; }
.dossiers button {
	width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--encre-2); text-align: left; font-weight: 550;
}
.dossiers button:hover { background: var(--surface-3); }
.dossiers button.actif { background: var(--accent-doux); color: var(--accent); }
.dossiers .nb { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--accent); }
.dossiers .titre-groupe { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--encre-3); padding: 16px 12px 6px; font-weight: 700; }
.cote-bas { margin-top: auto; padding-top: 12px; display: grid; gap: 2px; }
.cote-bas button { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--encre-2); font-weight: 550; text-align: left; }
.cote-bas button:hover { background: var(--surface-3); }

/* ---------- Liste ---------- */
.colonne-liste { background: var(--surface); border-right: 1px solid var(--ligne); display: flex; flex-direction: column; min-width: 0; height: 100dvh; }
.barre-liste { padding: calc(12px + var(--haut)) 14px 10px; border-bottom: 1px solid var(--ligne); background: var(--surface); position: relative; z-index: 2; }
.barre-liste .ligne1 { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.barre-liste h2 { font-size: 21px; letter-spacing: -.02em; margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bt-icone { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; color: var(--encre-2); flex: none; }
.bt-icone:hover { background: var(--surface-2); color: var(--encre); }
.bt-icone.on { color: var(--accent); background: var(--accent-doux); }
.menu-mobile { display: none; }
.recherche { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border-radius: 12px; padding: 0 12px; height: 40px; border: 1.5px solid transparent; }
.recherche:focus-within { border-color: var(--accent); background: var(--surface); }
.recherche input { flex: 1; border: 0; background: none; outline: none; min-width: 0; font-size: 15px; }
.recherche svg { color: var(--encre-3); width: 18px; height: 18px; }
.puces { display: flex; gap: 6px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.puces button { flex: none; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--surface-2); color: var(--encre-2); font-size: 13px; font-weight: 600; }
.puces button.on { background: var(--encre); color: var(--surface); }
.liste { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding-bottom: calc(90px + var(--bas)); }
.message-ligne {
	position: relative; display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 12px 14px; cursor: pointer;
	border-bottom: 1px solid var(--ligne); background: var(--surface); transition: background .12s; touch-action: pan-y; user-select: none;
}
.message-ligne:hover { background: var(--surface-2); }
.message-ligne.ouvert { background: var(--accent-doux); }
.message-ligne.choisi { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 15px; flex: none; position: relative; }
.choisi .avatar { background: var(--accent) !important; }
.choisi .avatar::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 18px; background: var(--accent); border-radius: 50%; }
.message-ligne .haut { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.message-ligne .qui { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--encre-2); font-weight: 500; }
.message-ligne .date { font-size: 12.5px; color: var(--encre-3); flex: none; }
.message-ligne .objet { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--encre-2); margin-top: 1px; }
.message-ligne .apercu { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--encre-3); font-size: 13.5px; margin-top: 1px; }
.message-ligne.non-lu .qui, .message-ligne.non-lu .objet { color: var(--encre); font-weight: 700; }
.message-ligne.non-lu::before { content: ""; position: absolute; left: 5px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--accent); }
.marques { display: inline-flex; gap: 4px; color: var(--encre-3); vertical-align: -3px; }
.marques svg { width: 15px; height: 15px; }
.marques .suivi { color: var(--ambre); }
.glisse-fond { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; color: #fff; font-weight: 600; }
.glisse-fond.droite { background: var(--accent); }
.glisse-fond.gauche { background: var(--danger); justify-content: flex-end; }
.glisse-contenu { position: relative; }
.vide { text-align: center; padding: 60px 24px; color: var(--encre-3); }
.vide svg { width: 42px; height: 42px; stroke-width: 1.4; margin-bottom: 10px; }
.plus { display: block; margin: 16px auto; }
.squelette { padding: 14px; display: grid; grid-template-columns: 40px 1fr; gap: 12px; border-bottom: 1px solid var(--ligne); }
.squelette i { display: block; height: 11px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: brille 1.2s infinite; margin: 5px 0; }
.squelette i.rond { width: 40px; height: 40px; border-radius: 50%; margin: 0; }
@keyframes brille { to { background-position: -200% 0; } }

/* Barre de sélection */
.barre-choix { display: flex; align-items: center; gap: 4px; padding: calc(10px + var(--haut)) 10px 10px; border-bottom: 1px solid var(--ligne); background: var(--accent-doux); }
.barre-choix b { flex: 1; padding-left: 6px; }

/* ---------- Lecture ---------- */
.lecture { background: var(--fond); min-width: 0; height: 100dvh; display: flex; flex-direction: column; }
.lecture-vide { flex: 1; display: grid; place-items: center; color: var(--encre-3); text-align: center; padding: 30px; }
.lecture-vide .rond { width: 84px; height: 84px; border-radius: 26px; background: var(--surface); display: grid; place-items: center; margin: 0 auto 14px; box-shadow: var(--ombre-1); }
.lecture-vide svg { width: 38px; height: 38px; stroke-width: 1.4; color: var(--accent); }
.barre-lecture { display: flex; align-items: center; gap: 2px; padding: calc(10px + var(--haut)) 12px 10px; border-bottom: 1px solid var(--ligne); background: var(--surface); }
.barre-lecture .espace { flex: 1; }
.retour { display: none; }
.defile { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.feuille { max-width: 860px; margin: 18px auto; background: var(--surface); border: 1px solid var(--ligne); border-radius: 18px; box-shadow: var(--ombre-1); overflow: hidden; }
.entete-lecture { padding: 22px 24px 16px; }
.entete-lecture h1 { font-size: 22px; line-height: 1.25; letter-spacing: -.02em; margin: 0 0 16px; word-break: break-word; }
.expediteur { display: flex; gap: 12px; align-items: center; }
.expediteur .qui { flex: 1; min-width: 0; }
.expediteur b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.expediteur small { color: var(--encre-3); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.expediteur .date { color: var(--encre-3); font-size: 13px; flex: none; text-align: right; }
.details { margin-top: 10px; font-size: 13px; color: var(--encre-2); background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.details div + div { margin-top: 3px; }
.details span { color: var(--encre-3); display: inline-block; min-width: 34px; }
.bandeau-images { display: flex; align-items: center; gap: 10px; margin: 0 24px 12px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); color: var(--encre-2); font-size: 13.5px; }
.bandeau-images button { margin-left: auto; color: var(--accent); font-weight: 650; white-space: nowrap; }
.corps { padding: 4px 24px 24px; }
.corps iframe { width: 100%; border: 0; display: block; min-height: 120px; background: #fff; border-radius: 8px; }
.corps pre { white-space: pre-wrap; word-break: break-word; font: 15px/1.6 var(--police); margin: 0; }
.pieces { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 24px 22px; }
.piece { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; border: 1px solid var(--ligne); border-radius: 12px; max-width: 280px; text-decoration: none; color: var(--encre); background: var(--surface); }
.piece:hover { border-color: var(--accent); }
.piece .ext { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; font-size: 10.5px; font-weight: 800; color: #fff; background: var(--encre-3); flex: none; text-transform: uppercase; }
.piece .nom { min-width: 0; }
.piece .nom b { display: block; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.piece .nom small { color: var(--encre-3); font-size: 12px; }
.reponses-rapides { display: flex; gap: 8px; padding: 0 24px 24px; flex-wrap: wrap; }
.reponses-rapides .bouton { height: 40px; }

/* ---------- Rédaction ---------- */
.voile { position: fixed; inset: 0; background: rgba(10, 14, 22, .38); backdrop-filter: blur(2px); z-index: 40; animation: apparait .15s; }
@keyframes apparait { from { opacity: 0; } }
.redaction {
	position: fixed; right: 24px; bottom: 0; width: min(640px, calc(100vw - 48px)); height: min(680px, calc(100dvh - 40px));
	background: var(--surface); border: 1px solid var(--ligne); border-radius: 18px 18px 0 0; box-shadow: var(--ombre-2);
	z-index: 50; display: flex; flex-direction: column; animation: monte .22s cubic-bezier(.2, .8, .2, 1);
}
@keyframes monte { from { transform: translateY(30px); opacity: 0; } }
.redaction header { display: flex; align-items: center; gap: 6px; padding: 10px 10px 10px 18px; border-bottom: 1px solid var(--ligne); }
.redaction header b { flex: 1; font-size: 16px; }
.redaction .lignes { border-bottom: 1px solid var(--ligne); }
.redaction .lig { display: flex; align-items: center; gap: 10px; padding: 0 18px; min-height: 46px; border-bottom: 1px solid var(--ligne); position: relative; }
.redaction .lig:last-child { border-bottom: 0; }
.redaction .lig label { color: var(--encre-3); font-size: 14px; width: 34px; flex: none; }
.redaction .lig input { flex: 1; border: 0; outline: none; background: none; font-size: 15px; min-width: 0; padding: 12px 0; }
.redaction .lig .lien { color: var(--encre-3); font-size: 13.5px; font-weight: 600; }
.redaction textarea { flex: 1; border: 0; outline: none; resize: none; padding: 16px 18px; font: 15.5px/1.6 var(--police); background: none; min-height: 120px; }
.redaction .citation { margin: 0 18px 10px; border-left: 3px solid var(--ligne); padding: 2px 0 2px 12px; color: var(--encre-3); font-size: 13.5px; max-height: 120px; overflow: auto; white-space: pre-wrap; }
.redaction .pj { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px 8px; }
.redaction .pj span { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border-radius: 999px; padding: 5px 6px 5px 12px; font-size: 13px; max-width: 240px; }
.redaction .pj span em { font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.redaction .pj button { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: var(--encre-3); }
.redaction footer { display: flex; align-items: center; gap: 6px; padding: 10px 14px calc(10px + var(--bas)); border-top: 1px solid var(--ligne); }
.redaction footer .espace { flex: 1; }
.suggestions { position: absolute; left: 52px; right: 12px; top: 100%; background: var(--surface); border: 1px solid var(--ligne); border-radius: 12px; box-shadow: var(--ombre-2); z-index: 5; overflow: hidden; }
.suggestions button { display: block; width: 100%; text-align: left; padding: 10px 14px; font-size: 14px; }
.suggestions button:hover, .suggestions button.on { background: var(--accent-doux); }

/* ---------- Feuilles (menus, réglages) ---------- */
.feuille-bas {
	position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(460px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); overflow: auto;
	background: var(--surface); border-radius: 20px; box-shadow: var(--ombre-2); z-index: 60; padding: 20px; animation: apparait .15s;
}
.feuille-bas h3 { margin: 0 0 14px; font-size: 18px; }
.feuille-bas .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.choix-liste { display: grid; gap: 2px; }
.choix-liste button { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; text-align: left; font-weight: 550; }
.choix-liste button:hover { background: var(--surface-2); }
.segment { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; }
.segment button { padding: 7px 12px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--encre-2); }
.segment button.on { background: var(--surface); color: var(--encre); box-shadow: var(--ombre-1); }
.reglage { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--ligne); }

/* ---------- Toasts ---------- */
.toasts { position: fixed; left: 50%; bottom: calc(24px + var(--bas)); transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: #111827; color: #fff; padding: 11px 14px 11px 16px; border-radius: 12px; box-shadow: var(--ombre-2); font-size: 14px; display: flex; align-items: center; gap: 14px; animation: monte .2s; }
.toast button { color: #a5b4fc; font-weight: 700; }
.toast.erreur-t { background: var(--danger); }

/* ---------- Bouton flottant (téléphone) ---------- */
.fab { display: none; }

/* ---------- Tablette ---------- */
@media (max-width: 1180px) {
	.coque { grid-template-columns: 76px minmax(300px, 380px) 1fr; }
	.cote { padding-left: 10px; padding-right: 10px; align-items: center; }
	.cote .marque div, .dossiers .titre-groupe, .dossiers .lib, .dossiers .nb, .cote-bas .lib, .ecrire .lib { display: none; }
	.cote .marque { margin: 4px 0 18px; }
	.ecrire { width: 50px; margin: 0 0 16px; }
	.dossiers button, .cote-bas button { justify-content: center; padding: 11px; position: relative; }
	.dossiers button .point { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
}
.dossiers .point { display: none; }
@media (max-width: 1180px) { .dossiers .point { display: block; } }

/* ---------- Téléphone ---------- */
@media (max-width: 760px) {
	body { font-size: 16px; }
	.coque { display: block; position: relative; }
	.cote {
		position: fixed; inset: 0 auto 0 0; width: 84vw; max-width: 320px; z-index: 45; transform: translateX(-102%);
		transition: transform .25s cubic-bezier(.2, .8, .2, 1); align-items: stretch; box-shadow: var(--ombre-2);
	}
	.coque.menu-ouvert .cote { transform: none; }
	.cote .marque div, .dossiers .titre-groupe, .dossiers .lib, .dossiers .nb, .cote-bas .lib, .ecrire .lib { display: initial; }
	.dossiers .point { display: none !important; }
	.ecrire { display: none; }
	.dossiers button, .cote-bas button { justify-content: flex-start; padding: 12px 14px; }
	.menu-mobile { display: grid; }
	.colonne-liste { height: 100dvh; border: 0; }
	.lecture { position: fixed; inset: 0; z-index: 30; transform: translateX(100%); transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
	.coque.lecture-ouverte .lecture { transform: none; }
	.retour { display: grid; }
	.feuille { margin: 0; border: 0; border-radius: 0; box-shadow: none; min-height: 100%; }
	.entete-lecture { padding: 18px 18px 12px; }
	.entete-lecture h1 { font-size: 20px; }
	.corps { padding: 4px 14px 20px; }
	.pieces, .reponses-rapides { padding-left: 18px; padding-right: 18px; }
	.bandeau-images { margin: 0 18px 12px; }
	.fab {
		display: flex; position: fixed; right: 18px; bottom: calc(20px + var(--bas)); z-index: 20; height: 56px; padding: 0 22px 0 18px; gap: 10px; align-items: center;
		border-radius: 18px; background: var(--accent); color: #fff; font-weight: 650; box-shadow: 0 14px 28px -10px color-mix(in srgb, var(--accent) 80%, transparent);
	}
	.fab.reduit .lib { display: none; }
	.fab.reduit { padding: 0 16px; }
	.redaction { inset: 0; width: auto; height: 100dvh; border-radius: 0; border: 0; padding-top: var(--haut); }
	.feuille-bas { top: auto; bottom: 0; left: 0; right: 0; transform: none; width: auto; border-radius: 22px 22px 0 0; padding-bottom: calc(20px + var(--bas)); animation: monte .22s; }
	.toasts { bottom: calc(92px + var(--bas)); }
	.barre-lecture .large-seul { display: none; }
}
@media (min-width: 761px) { .mobile-seul { display: none !important; } }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Couche IA (lot 3) ---------- */
.carte-ia { margin: 0 24px 14px; display: grid; gap: 10px; }
.carte-ia > .bouton { justify-self: start; height: 38px; background: var(--accent-doux); color: var(--accent); }
.resume-ia { border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--ligne)); background: linear-gradient(180deg, var(--accent-doux), var(--surface)); border-radius: 14px; padding: 14px 16px; font-size: 14.5px; }
.resume-ia.alerte { border-color: var(--danger); background: var(--danger-doux); }
.resume-ia p { margin: 6px 0 0; }
.resume-ia ul { margin: 8px 0 0; padding-left: 20px; }
.ia-tete { display: flex; align-items: center; gap: 8px; color: var(--accent); flex-wrap: wrap; }
.ia-tete b { color: var(--encre); }
.etiquette { font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--surface-3); color: var(--encre-2); }
.etiquette.urgent, .etiquette.n-hameconnage { background: var(--danger); color: #fff; }
.etiquette.n-client, .etiquette.n-prospect { background: #dcfce7; color: #166534; }
.ia-alerte { color: var(--danger); font-weight: 600; }
.ia-faire { background: var(--surface); border-radius: 10px; padding: 8px 10px; margin-top: 10px !important; }
.idees { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.idees small { color: var(--encre-3); font-weight: 600; margin-right: 2px; }
.puce-ia { height: 34px; padding: 0 14px; border-radius: 999px; border: 1.5px solid color-mix(in srgb, var(--accent) 35%, var(--ligne)); color: var(--accent); font-weight: 600; font-size: 13.5px; background: var(--surface); }
.puce-ia:hover { background: var(--accent-doux); }
.barre-ia { display: flex; align-items: center; gap: 8px; margin: 10px 14px 0; padding: 6px 6px 6px 12px; border-radius: 12px; background: var(--accent-doux); color: var(--accent); }
.barre-ia input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-size: 14.5px; color: var(--encre); padding: 6px 0; }
.barre-ia .bouton { height: 34px; padding: 0 14px; font-size: 14px; }
.barre-ia .bt-icone { width: 34px; height: 34px; color: var(--accent); }
.redaction textarea.ia-en-cours { opacity: .45; background: repeating-linear-gradient(90deg, transparent, transparent 8px, var(--accent-doux) 8px, var(--accent-doux) 16px); }
.bloc-signature { margin: 0 18px 10px; border-top: 1px dashed var(--ligne); padding-top: 8px; }
.bloc-signature label { font-size: 12.5px; color: var(--encre-3); display: inline-flex; gap: 6px; align-items: center; font-weight: 600; }
.apercu-sig { margin-top: 6px; font-size: 13.5px; color: var(--encre-2); max-height: 150px; overflow: auto; }
.apercu-sig img, .editeur-sig img { max-width: 100%; height: auto; vertical-align: middle; }
.outils-sig { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.outils-sig > button, .outils-sig > label { height: 34px; min-width: 34px; padding: 0 10px; border-radius: 9px; background: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 14px; color: var(--encre-2); cursor: pointer; }
.outils-sig .couleur input { width: 22px; height: 22px; border: 0; padding: 0; background: none; cursor: pointer; }
.outils-sig .bt-img { background: var(--accent-doux); color: var(--accent); font-weight: 650; }
.editeur-sig { min-height: 110px; max-height: 280px; overflow: auto; border: 1.5px solid var(--ligne); border-radius: 12px; padding: 12px 14px; outline: none; font-size: 14.5px; line-height: 1.5; background: var(--surface); }
.editeur-sig:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.editeur-sig:empty::before { content: attr(data-vide); color: var(--encre-3); white-space: pre-line; }
.editeur-sig img.img-choisie { outline: 3px solid var(--accent); outline-offset: 2px; }
.tailles-img { display: flex; gap: 6px; align-items: center; margin-top: 8px; font-size: 13px; color: var(--encre-2); flex-wrap: wrap; }
.tailles-img button { height: 30px; padding: 0 10px; border-radius: 8px; background: var(--surface-2); font-weight: 600; }
.aide-ia { margin: 2px 0 0; font-size: 13px; color: var(--encre-3); }
.relance-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.relance-actions .bouton { height: 34px; font-size: 13.5px; padding: 0 12px; }
.message-ligne.relance { cursor: default; }
@media (max-width: 760px) { .carte-ia { margin: 0 18px 14px; } }

/* ---------- Tableau de bord, langues ---------- */
.ia-boutons { display: flex; gap: 8px; flex-wrap: wrap; }
.ia-boutons .bouton { height: 38px; background: var(--accent-doux); color: var(--accent); }
.langues button { color: var(--encre-3); font-weight: 600; }
.langues button.on { color: var(--accent); }
.feuille-bas.large { width: min(980px, calc(100vw - 32px)); }
.tdb h4 { margin: 22px 0 10px; font-size: 14px; text-transform: uppercase; letter-spacing: .05em; color: var(--encre-3); }
.tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 14px; }
.tuile { background: var(--surface-2); border-radius: 14px; padding: 14px 16px; }
.tuile small { color: var(--encre-3); font-weight: 600; font-size: 12.5px; }
.tuile b { display: block; font-size: 26px; letter-spacing: -.02em; margin-top: 4px; }
.interrupteur { position: relative; display: inline-block; width: 44px; height: 26px; flex: none; cursor: pointer; }
.interrupteur input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.interrupteur i { position: absolute; inset: 0; border-radius: 999px; background: var(--surface-3); transition: background .15s; }
.interrupteur i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--ombre-1); transition: transform .15s; }
.interrupteur input:checked + i { background: var(--ok); }
.interrupteur input:checked + i::after { transform: translateX(18px); }
.interrupteur.gris { opacity: .45; }
.grille-domaines { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
.ligne-dom { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; background: var(--surface-2); border-radius: 10px; font-size: 14px; }
.table-defile { overflow-x: auto; border: 1px solid var(--ligne); border-radius: 12px; }
.table-tdb { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table-tdb th { text-align: left; font-size: 12px; color: var(--encre-3); font-weight: 700; padding: 10px 12px; background: var(--surface-2); white-space: nowrap; }
.table-tdb td { padding: 9px 12px; border-top: 1px solid var(--ligne); white-space: nowrap; }
.prix { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.prix input { width: 90px; border: 1.5px solid var(--ligne); border-radius: 10px; padding: 8px 10px; background: var(--surface); }
@media (max-width: 760px) { .feuille-bas.large { width: auto; max-height: 92dvh; } }

/* ---------- Sélection multiple, mot de passe ---------- */
.liste.mode-choix .message-ligne:not(.choisi) .avatar { background: transparent !important; color: transparent; border: 2px solid var(--encre-3); }
.barre-choix .bt-icone[disabled] { opacity: .35; pointer-events: none; }
.force { display: grid; gap: 6px; margin: -6px 0 14px; }
.force i { display: block; height: 6px; border-radius: 99px; background: var(--surface-3); position: relative; overflow: hidden; }
.force i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 99px; transition: width .2s, background .2s; }
.force.f1 i::after { width: 25%; background: var(--danger); }
.force.f2 i::after { width: 50%; background: var(--ambre); }
.force.f3 i::after { width: 75%; background: #84cc16; }
.force.f4 i::after { width: 100%; background: var(--ok); }
.force small { color: var(--encre-3); font-size: 12.5px; }

/* ---------- Détails techniques ---------- */
.controles { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.controle { padding: 6px 12px; border-radius: 999px; font-size: 13.5px; background: var(--surface-2); }
.controle.ok { background: #dcfce7; color: #166534; }
.controle.ko { background: var(--danger-doux); color: var(--danger); }
.controle.moyen { background: #fef3c7; color: #92400e; }
.table-tdb.fiche th { width: 170px; vertical-align: top; background: none; padding-left: 0; }
.table-tdb.fiche td { white-space: normal; word-break: break-word; }
.parcours { margin: 0; padding-left: 22px; display: grid; gap: 10px; font-size: 14px; }
.parcours small { color: var(--encre-3); }
.bruts { margin-top: 16px; }
.bruts summary { cursor: pointer; font-weight: 650; color: var(--accent); }
.bruts pre { max-height: 320px; overflow: auto; background: var(--surface-2); border-radius: 10px; padding: 12px; font-size: 12px; white-space: pre-wrap; word-break: break-all; }
a.bouton { text-decoration: none; }

/* ---------- Fiche contact ---------- */
.expediteur[role="button"] { cursor: pointer; border-radius: 12px; margin: -6px; padding: 6px; }
.expediteur[role="button"]:hover { background: var(--surface-2); }
.fiche-contact { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.fiche-contact .avatar { width: 56px; height: 56px; font-size: 22px; }
.fiche-contact b { display: block; font-size: 18px; }
.fiche-contact small { color: var(--encre-3); }
.lien-details { float: right; display: inline-flex; align-items: center; gap: 5px; color: var(--accent); font-weight: 600; font-size: 13px; }
.lien-details svg { width: 16px; height: 16px; }
