/* style-bureau.css — bureau virtuel : icônes, fenêtres, menu, barre des
   tâches, et le style interne des applications (Terminal, Fichiers). */

.bureau {
	position: relative;
	height: 100%;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.fond {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(circle at 22% 12%, rgba(126, 231, 135, 0.09), transparent 46%),
		radial-gradient(circle at 82% 78%, rgba(121, 192, 255, 0.1), transparent 52%),
		linear-gradient(160deg, #10161e 0%, #0b0f14 100%);
	pointer-events: none;
}

/* --- icônes du bureau ----------------------------------------------------- */

.icones {
	position: absolute;
	top: 1rem;
	left: 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	z-index: 1;
}

.icone {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.25rem;
	width: 84px;
	padding: 0.55rem 0.3rem;
	background: transparent;
	border: 1px solid transparent;
	border-radius: 8px;
	cursor: pointer;
	color: var(--texte);
	transition: background 0.15s, border-color 0.15s;
}

.icone:hover,
.icone:focus-visible {
	background: rgba(121, 192, 255, 0.1);
	border-color: rgba(121, 192, 255, 0.35);
	outline: 0;
}

.icone-vignette {
	width: 38px;
	height: 38px;
	display: grid;
	place-items: center;
	border-radius: 8px;
	border: 1px solid var(--bordure);
	background: var(--fond-panneau);
	color: var(--accent);
	font-size: 1rem;
}

.icone-nom { font-size: 0.76rem; color: var(--texte); }

/* --- zone des fenêtres ---------------------------------------------------- */

.zone {
	position: relative;
	flex: 1;
	min-height: 0;
	overflow: hidden;
}

.fenetre-app {
	position: absolute;
	display: flex;
	flex-direction: column;
	min-width: 280px;
	min-height: 200px;
	background: var(--fond-fenetre);
	border: 1px solid var(--bordure);
	border-radius: 8px;
	box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
	overflow: hidden;
}

.fenetre-app.active {
	border-color: rgba(126, 231, 135, 0.35);
	box-shadow: 0 20px 52px rgba(0, 0, 0, 0.62), 0 0 0 1px rgba(126, 231, 135, 0.12);
}

.fenetre-app.reduite { display: none; }

/* Agrandie : occupe la zone des fenêtres, sans cadre arrondi. */
.fenetre-app.agrandie {
	border-radius: 0;
	box-shadow: none;
}

.fenetre-app.agrandie .poignee { display: none; }

/* --- poignées de redimensionnement --------------------------------------- */

.poignee { position: absolute; z-index: 4; }
.poignee-e,
.poignee-w { top: 0; width: 6px; height: 100%; cursor: ew-resize; }
.poignee-e { right: 0; }
.poignee-w { left: 0; }

.poignee-n,
.poignee-s { left: 0; width: 100%; height: 6px; cursor: ns-resize; }
.poignee-n { top: 0; }
.poignee-s { bottom: 0; }

.poignee-ne,
.poignee-nw,
.poignee-se,
.poignee-sw { width: 13px; height: 13px; }

.poignee-ne { top: 0; right: 0; cursor: nesw-resize; }
.poignee-sw { bottom: 0; left: 0; cursor: nesw-resize; }
.poignee-nw { top: 0; left: 0; cursor: nwse-resize; }
.poignee-se { bottom: 0; right: 0; cursor: nwse-resize; }

body.redimensionnement,
body.deplacement { user-select: none; }

.fenetre-tete {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.4rem 0.45rem 0.4rem 0.75rem;
	background: var(--fond-panneau);
	border-bottom: 1px solid var(--bordure);
	cursor: grab;
	touch-action: none;
	user-select: none;
	flex-shrink: 0;
}

body.deplacement .fenetre-tete { cursor: grabbing; }

.fenetre-titre {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 0.78rem;
	color: var(--dim);
	letter-spacing: 0.04em;
}

.fenetre-app.active .fenetre-titre { color: var(--accent); }

.fenetre-actions { display: flex; gap: 0.25rem; }

.fenetre-bouton {
	width: 24px;
	height: 22px;
	display: grid;
	place-items: center;
	background: transparent;
	border: 1px solid transparent;
	border-radius: 4px;
	color: var(--dim);
	cursor: pointer;
	font-size: 0.8rem;
	line-height: 1;
}

.fenetre-bouton:hover { background: rgba(121, 192, 255, 0.12); color: var(--texte); }
.fenetre-bouton[data-action="fermer"]:hover { background: rgba(255, 123, 114, 0.16); color: var(--erreur); }

.fenetre-corps {
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

/* --- menu des applications ------------------------------------------------ */

.menu-applis {
	position: absolute;
	bottom: 52px;
	left: 0.7rem;
	width: 262px;
	padding: 0.5rem;
	background: rgba(12, 17, 23, 0.97);
	border: 1px solid var(--bordure);
	border-radius: 10px;
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
	z-index: 50;
	backdrop-filter: blur(6px);
}

.menu-titre {
	margin: 0.15rem 0.45rem 0.45rem;
	font-size: 0.7rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--dim);
}

.menu-appli {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	width: 100%;
	padding: 0.5rem 0.45rem;
	background: transparent;
	border: 0;
	border-radius: 7px;
	text-align: left;
	cursor: pointer;
}

.menu-appli:hover,
.menu-appli:focus-visible {
	background: rgba(121, 192, 255, 0.12);
	outline: 0;
}

.menu-icone {
	width: 30px;
	height: 30px;
	display: grid;
	place-items: center;
	border: 1px solid var(--bordure);
	border-radius: 7px;
	background: var(--fond-panneau);
	color: var(--accent);
	font-size: 0.85rem;
	flex-shrink: 0;
}

.menu-texte { display: flex; flex-direction: column; min-width: 0; }
.menu-nom { font-size: 0.86rem; color: var(--texte); }
.menu-aide { font-size: 0.72rem; color: var(--dim); }

/* --- barre des tâches ----------------------------------------------------- */

.taches {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.4rem 0.7rem;
	background: #080b10;
	border-top: 1px solid var(--bordure);
	flex-shrink: 0;
	z-index: 2;
}

.taches-menu {
	width: 30px;
	height: 26px;
	display: grid;
	place-items: center;
	background: transparent;
	border: 1px solid var(--bordure);
	border-radius: 6px;
	color: var(--accent);
	cursor: pointer;
	font-size: 0.9rem;
}

.taches-menu:hover,
.taches-menu[aria-expanded="true"] {
	background: rgba(126, 231, 135, 0.12);
	border-color: rgba(126, 231, 135, 0.45);
}

.taches-fenetres,
.taches-session { display: flex; align-items: center; gap: 0.4rem; }

.taches-fenetres { flex: 1; overflow-x: auto; scrollbar-width: none; }
.taches-fenetres::-webkit-scrollbar { display: none; }

.tache {
	background: transparent;
	border: 1px solid var(--bordure);
	border-radius: 6px;
	color: var(--dim);
	padding: 0.28rem 0.7rem;
	font-size: 0.78rem;
	cursor: pointer;
	white-space: nowrap;
	transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.tache:hover { color: var(--texte); border-color: #35404d; }
.tache.active { color: var(--accent); border-color: rgba(126, 231, 135, 0.45); }
.tache.reduite { color: var(--dim); border-style: dashed; }

.session-nom { font-size: 0.78rem; color: var(--accent-2); }

/* ===================== application Terminal ===================== */

.appli-terminal {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
	background: var(--fond-fenetre);
}

.terminal-corps {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	padding: 0.9rem 1rem 1.1rem;
	cursor: text;
}

.sortie { white-space: pre-wrap; word-break: break-word; }
.sortie > div { margin: 0; }
.sortie > div + div { margin-top: 0.12rem; }

.dim { color: var(--dim); }
.accent { color: var(--accent); }
.erreur { color: var(--erreur); }
.texte { color: var(--texte); }

.invite-ligne {
	display: flex;
	align-items: baseline;
	gap: 0.15rem;
	margin-top: 0.45rem;
	flex-wrap: wrap;
}

.invite { color: var(--accent); }
.arobase, .tilde { color: var(--dim); }
.hote { color: var(--accent-2); }

.invite-ligne input {
	flex: 1;
	min-width: 8ch;
	background: transparent;
	border: 0;
	outline: 0;
	color: var(--texte);
	font: inherit;
	caret-color: var(--accent);
	padding: 0;
}

/* bannière type fastfetch */
.banniere {
	display: flex;
	gap: 1.1rem;
	align-items: flex-start;
	margin-bottom: 0.9rem;
	flex-wrap: wrap;
}

.banniere-avatar {
	width: 76px;
	height: 76px;
	border-radius: 8px;
	border: 1px solid var(--bordure);
	background: var(--fond-panneau);
	object-fit: cover;
	flex-shrink: 0;
}

.banniere-infos { flex: 1; min-width: 200px; }
.banniere-titre { color: var(--accent); }
.banniere-titre span { color: var(--dim); }

.banniere-regle {
	color: var(--bordure);
	overflow: hidden;
	white-space: nowrap;
	user-select: none;
}

.banniere-ligne { display: flex; gap: 0.5rem; }
.banniere-cle { color: var(--accent-2); min-width: 8ch; }
.banniere-val { color: var(--texte); }

/* ===================== application Fichiers ===================== */

.appli-fichiers {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
	background: var(--fond-fenetre);
	font-size: 0.84rem;
}

/* barre d'outils */
.fichiers-barre {
	display: flex;
	align-items: center;
	gap: 0.3rem;
	padding: 0.4rem 0.55rem;
	background: var(--fond-panneau);
	border-bottom: 1px solid var(--bordure);
	flex-shrink: 0;
}

.fichiers-nav {
	width: 26px;
	height: 26px;
	display: grid;
	place-items: center;
	background: transparent;
	border: 1px solid transparent;
	border-radius: 6px;
	color: var(--dim);
	cursor: pointer;
	font-size: 0.95rem;
	line-height: 1;
}

.fichiers-nav:hover:not(:disabled) { background: rgba(121, 192, 255, 0.12); color: var(--texte); }
.fichiers-nav:disabled { opacity: 0.35; cursor: default; }

.fichiers-miettes {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 0.1rem;
	min-width: 0;
	overflow: hidden;
}

.miette {
	background: rgba(121, 192, 255, 0.08);
	border: 0;
	border-radius: 5px;
	color: var(--texte);
	font: inherit;
	padding: 0.12rem 0.45rem;
	cursor: pointer;
	white-space: nowrap;
	max-width: 16ch;
	overflow: hidden;
	text-overflow: ellipsis;
}

.miette:hover { background: rgba(121, 192, 255, 0.18); }
.miette-sep { color: var(--dim); }

/* corps : volet + liste */
.fichiers-corps {
	flex: 1;
	min-height: 0;
	display: flex;
}

.fichiers-volet {
	width: 148px;
	flex-shrink: 0;
	border-right: 1px solid var(--bordure);
	background: var(--fond-panneau);
	padding: 0.5rem 0.35rem;
	overflow-y: auto;
	scrollbar-width: thin;
}

.volet-titre {
	margin: 0 0.4rem 0.35rem;
	font-size: 0.66rem;
	letter-spacing: 0.13em;
	text-transform: uppercase;
	color: var(--dim);
}

.volet-lieux { display: flex; flex-direction: column; gap: 0.05rem; }

.lieu {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	width: 100%;
	padding: 0.3rem 0.45rem;
	background: transparent;
	border: 0;
	border-radius: 6px;
	color: var(--texte);
	font: inherit;
	text-align: left;
	cursor: pointer;
	min-width: 0;
}

.lieu span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.lieu:hover { background: rgba(121, 192, 255, 0.1); }
.lieu.actif { background: rgba(121, 192, 255, 0.16); color: var(--accent-2); }

.fichiers-principal {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

/* colonnes et lignes */
.fichiers-colonnes,
.ligne-fichier {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 84px 128px 30px;
	align-items: center;
	gap: 0.5rem;
	padding: 0 0.55rem;
}

.fichiers-colonnes {
	height: 28px;
	border-bottom: 1px solid var(--bordure);
	background: var(--fond-fenetre);
	flex-shrink: 0;
}

.colonne {
	background: none;
	border: 0;
	color: var(--dim);
	font: inherit;
	font-size: 0.74rem;
	letter-spacing: 0.04em;
	text-align: left;
	padding: 0;
	cursor: pointer;
	white-space: nowrap;
}

.colonne::after { content: ""; margin-left: 0.3ch; opacity: 0.7; }
.colonne.tri-actif { color: var(--accent); }
.colonne[data-sens="asc"]::after { content: "↑"; }
.colonne[data-sens="desc"]::after { content: "↓"; }

.colonne-taille,
.colonne-date,
.cellule-taille,
.cellule-date { text-align: right; justify-self: end; }

.fichiers-liste {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	padding: 0.15rem 0;
}

.ligne-fichier {
	height: 30px;
	border-radius: 6px;
	cursor: pointer;
	outline: 0;
}

.ligne-fichier:hover,
.ligne-fichier:focus-visible { background: rgba(121, 192, 255, 0.11); }
.ligne-fichier:active { background: rgba(121, 192, 255, 0.18); }

.colonne-vide { width: 30px; }

.ligne-telecharger {
	width: 24px;
	height: 24px;
	justify-self: end;
	display: grid;
	place-items: center;
	background: transparent;
	border: 1px solid transparent;
	border-radius: 4px;
	color: var(--dim);
	font-size: 0.85rem;
	line-height: 1;
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.12s, color 0.12s, background 0.12s;
}

.ligne-fichier:hover .ligne-telecharger,
.ligne-fichier:focus-within .ligne-telecharger { opacity: 1; }

.ligne-telecharger:hover {
	color: var(--accent);
	border-color: rgba(126, 231, 135, 0.4);
	background: rgba(126, 231, 135, 0.1);
}

.cellule { min-width: 0; display: flex; align-items: center; }
.cellule-taille,
.cellule-date {
	display: block;
	color: var(--dim);
	font-size: 0.76rem;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.cellule-nom { gap: 0.45rem; }
.nom-fichier { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ico { width: 15px; height: 15px; flex-shrink: 0; }
.ico-dossier { fill: rgba(121, 192, 255, 0.75); }
.ico-fichier { fill: rgba(125, 133, 144, 0.35); stroke: var(--dim); stroke-width: 0.9; }
.ico-pli { fill: none; stroke: var(--dim); stroke-width: 0.9; }

.vide { color: var(--dim); padding: 0.9rem; margin: 0; }

.fichiers-pied {
	padding: 0.3rem 0.6rem;
	border-top: 1px solid var(--bordure);
	background: var(--fond-panneau);
	color: var(--dim);
	font-size: 0.72rem;
	min-height: 1.7em;
	flex-shrink: 0;
}

/* ===================== application Éditeur ===================== */

.appli-editeur {
	display: flex;
	flex: 1;
	min-height: 0;
	background: var(--fond-fenetre);
}

.editeur-volet {
	width: 186px;
	flex-shrink: 0;
	border-right: 1px solid var(--bordure);
	background: var(--fond-panneau);
	padding: 0.5rem 0.3rem;
	overflow-y: auto;
	scrollbar-width: thin;
}

.editeur-arbre { display: flex; flex-direction: column; gap: 0.03rem; }

.arbre-ligne {
	display: flex;
	align-items: center;
	gap: 0.3rem;
	width: 100%;
	background: transparent;
	border: 0;
	border-radius: 4px;
	color: var(--texte);
	font: inherit;
	font-size: 0.79rem;
	text-align: left;
	padding: 0.16rem 0.3rem;
	cursor: pointer;
}

.arbre-ligne:hover { background: rgba(121, 192, 255, 0.1); }
.arbre-ligne.actif-fichier { background: rgba(121, 192, 255, 0.18); color: var(--accent-2); }
.arbre-chevron { width: 1ch; color: var(--dim); flex-shrink: 0; }
.arbre-nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.editeur-principal {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.editeur-onglets {
	display: flex;
	overflow-x: auto;
	background: var(--fond-panneau);
	border-bottom: 1px solid var(--bordure);
	flex-shrink: 0;
	scrollbar-width: none;
}

.editeur-onglets::-webkit-scrollbar { display: none; }

.onglet {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	padding: 0.3rem 0.45rem 0.3rem 0.7rem;
	border-right: 1px solid var(--bordure);
	font-size: 0.78rem;
	color: var(--dim);
	white-space: nowrap;
}

.onglet.actif {
	color: var(--accent);
	background: var(--fond-fenetre);
	box-shadow: inset 0 -2px 0 var(--accent);
}

.onglet-nom { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }
.onglet-fermer {
	background: none;
	border: 0;
	color: var(--dim);
	font-size: 0.72rem;
	cursor: pointer;
	padding: 0 0.15rem;
	border-radius: 3px;
}
.onglet-fermer:hover { color: var(--erreur); background: rgba(255, 123, 114, 0.14); }

.editeur-chemin {
	padding: 0.18rem 0.8rem;
	font-size: 0.72rem;
	color: var(--dim);
	border-bottom: 1px solid var(--bordure);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	flex-shrink: 0;
}

.editeur-zone { flex: 1; min-height: 0; position: relative; overflow: hidden; }

.editeur-defilement {
	display: flex;
	height: 100%;
	overflow: auto;
	font-size: 0.82rem;
	line-height: 1.5;
}

.editeur-numeros {
	display: flex;
	flex-direction: column;
	padding: 0.5rem 0.55rem 0.5rem 0.7rem;
	color: #46505e;
	text-align: right;
	user-select: none;
	background: var(--fond-fenetre);
	font-variant-numeric: tabular-nums;
}

.editeur-code {
	margin: 0;
	padding: 0.5rem 0.9rem 0.5rem 0.5rem;
	white-space: pre;
	font: inherit;
	flex: 1;
	tab-size: 4;
}

.tok-commentaire { color: #6e7781; font-style: italic; }
.tok-chaine { color: #a5d6ff; }
.tok-nombre { color: #79c0ff; }
.tok-mot { color: #ff7b72; }

.editeur-accueil {
	position: absolute;
	inset: 0;
	margin: 0;
	display: grid;
	place-items: center;
	text-align: center;
	padding: 1.5rem;
	color: var(--dim);
	font-size: 0.82rem;
}

.editeur-pied {
	padding: 0.22rem 0.8rem;
	border-top: 1px solid var(--bordure);
	background: var(--fond-panneau);
	color: var(--dim);
	font-size: 0.72rem;
	flex-shrink: 0;
}

/* ===================== application Vidéos ===================== */

.appli-videos {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
	background: var(--fond-fenetre);
}

.videos-barre {
	display: flex;
	gap: 0.4rem;
	padding: 0.45rem 0.55rem;
	background: var(--fond-panneau);
	border-bottom: 1px solid var(--bordure);
	flex-shrink: 0;
}

.videos-url {
	flex: 1;
	min-width: 0;
	background: #05070a;
	border: 1px solid var(--bordure);
	border-radius: 6px;
	padding: 0.35rem 0.55rem;
	font-size: 0.8rem;
	outline: 0;
}

.videos-url:focus { border-color: rgba(126, 231, 135, 0.5); }

.videos-lire {
	background: rgba(126, 231, 135, 0.12);
	border: 1px solid rgba(126, 231, 135, 0.45);
	color: var(--accent);
	border-radius: 6px;
	padding: 0.3rem 0.8rem;
	cursor: pointer;
	font-size: 0.8rem;
}

.videos-lire:hover { background: rgba(126, 231, 135, 0.2); }

.videos-corps { flex: 1; min-height: 0; display: flex; }

.videos-volet {
	width: 190px;
	flex-shrink: 0;
	border-right: 1px solid var(--bordure);
	background: var(--fond-panneau);
	padding: 0.5rem 0.3rem;
	overflow-y: auto;
	scrollbar-width: thin;
}

.videos-liste { display: flex; flex-direction: column; gap: 0.05rem; }

.videos-entree {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.4rem;
	width: 100%;
	background: transparent;
	border: 0;
	border-radius: 5px;
	color: var(--texte);
	font: inherit;
	font-size: 0.78rem;
	text-align: left;
	padding: 0.3rem 0.4rem;
	cursor: pointer;
}

.videos-entree:hover { background: rgba(121, 192, 255, 0.1); }
.videos-entree.actif { background: rgba(121, 192, 255, 0.18); color: var(--accent-2); }
.videos-nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.videos-meta { color: var(--dim); font-size: 0.7rem; flex-shrink: 0; }

.videos-scene {
	flex: 1;
	min-width: 0;
	display: grid;
	place-items: center;
	background: #05070a;
	padding: 0.4rem;
}

.videos-lecteur { width: 100%; max-height: 100%; background: #000; border-radius: 6px; }
.videos-cadre {
	width: 100%;
	height: 100%;
	border: 0;
	border-radius: 6px;
	background: #000;
}
.videos-vide { color: var(--dim); font-size: 0.8rem; text-align: center; padding: 1rem; margin: 0; }

.videos-pied {
	padding: 0.22rem 0.7rem;
	border-top: 1px solid var(--bordure);
	background: var(--fond-panneau);
	color: var(--dim);
	font-size: 0.72rem;
	min-height: 1.6em;
	flex-shrink: 0;
}

/* ===================== application Archives ===================== */

.appli-archives {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
	background: var(--fond-fenetre);
	font-size: 0.84rem;
}

.archives-barre {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.45rem 0.55rem;
	background: var(--fond-panneau);
	border-bottom: 1px solid var(--bordure);
	flex-shrink: 0;
}

.archives-nom {
	color: var(--accent);
	font-size: 0.8rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 40%;
}

.archives-mdp {
	flex: 1;
	min-width: 0;
	background: #05070a;
	border: 1px solid var(--bordure);
	border-radius: 6px;
	padding: 0.3rem 0.5rem;
	font: inherit;
	font-size: 0.78rem;
	outline: 0;
}

.archives-mdp:focus { border-color: rgba(126, 231, 135, 0.5); }

.archives-bouton {
	background: transparent;
	border: 1px solid var(--bordure);
	color: var(--dim);
	border-radius: 6px;
	padding: 0.25rem 0.6rem;
	cursor: pointer;
	font-size: 0.78rem;
}

.archives-bouton:hover { color: var(--accent); border-color: rgba(126, 231, 135, 0.45); }

.archives-corps { flex: 1; min-height: 0; display: flex; }

.archives-liste {
	width: 48%;
	min-width: 180px;
	overflow-y: auto;
	border-right: 1px solid var(--bordure);
	padding: 0.3rem 0;
	scrollbar-width: thin;
}

.archive-ligne {
	display: grid;
	grid-template-columns: 1ch minmax(0, 1fr) auto 26px;
	align-items: center;
	gap: 0.4rem;
	padding: 0.22rem 0.55rem;
	cursor: pointer;
	border-radius: 5px;
}

.archive-ligne.dossier { color: var(--dim); cursor: default; }
.archive-ligne:not(.dossier):hover { background: rgba(121, 192, 255, 0.1); }
.archive-icone { color: var(--accent-2); }
.archive-entree { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.archive-taille { color: var(--dim); font-size: 0.73rem; font-variant-numeric: tabular-nums; }

.archive-telecharger {
	width: 22px;
	height: 22px;
	display: grid;
	place-items: center;
	background: transparent;
	border: 1px solid transparent;
	border-radius: 4px;
	color: var(--dim);
	cursor: pointer;
	opacity: 0;
}

.archive-ligne:hover .archive-telecharger { opacity: 1; }
.archive-telecharger:hover { color: var(--accent); border-color: rgba(126, 231, 135, 0.4); }

.archives-apercu {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	padding: 0.4rem;
}

.archives-texte {
	margin: 0;
	flex: 1;
	overflow: auto;
	white-space: pre-wrap;
	word-break: break-word;
	font: inherit;
	font-size: 0.8rem;
	padding: 0.4rem;
	scrollbar-width: thin;
}

.archives-media { flex: 1; min-height: 0; width: 100%; background: #000; border-radius: 6px; }

.archives-note {
	margin: auto;
	color: var(--dim);
	font-size: 0.78rem;
	text-align: center;
	padding: 1rem;
}

.archives-pied {
	padding: 0.22rem 0.6rem;
	border-top: 1px solid var(--bordure);
	background: var(--fond-panneau);
	color: var(--dim);
	font-size: 0.72rem;
	min-height: 1.6em;
	flex-shrink: 0;
}

/* --- petits écrans : fenêtres plein cadre ------------------------------- */

@media (max-width: 760px) {
	.icones {
		flex-direction: row;
		top: auto;
		bottom: 0.6rem;
		left: 0.6rem;
	}

	.icone { width: 72px; }
	.icone-vignette { width: 34px; height: 34px; }
	.menu-applis { left: 0.4rem; right: 0.4rem; width: auto; }

	.fenetre-app {
		inset: 0 !important;
		width: auto !important;
		height: auto !important;
		border-radius: 0;
		border: 0;
		box-shadow: none;
	}

	.fenetre-tete { cursor: default; }
	.poignee { display: none; }
	.banniere-avatar { width: 60px; height: 60px; }

	.fichiers-volet { display: none; }
	.fichiers-colonnes,
	.ligne-fichier { grid-template-columns: minmax(0, 1fr) 72px 30px; }
	.ligne-telecharger { opacity: 1; }
	.colonne-date,
	.cellule-date { display: none; }

	.editeur-volet { display: none; }
	.videos-volet { width: 150px; }
	.icones { flex-wrap: wrap; max-width: 100%; }
}

/* ===================== application Comptes ===================== */

.appli-comptes {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
	background: var(--fond-fenetre);
	font-size: 0.84rem;
}

.comptes-barre {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.45rem 0.55rem;
	background: var(--fond-panneau);
	border-bottom: 1px solid var(--bordure);
	flex-shrink: 0;
}

.comptes-titre {
	flex: 1;
	color: var(--accent);
	font-size: 0.8rem;
}

.comptes-bouton {
	background: transparent;
	border: 1px solid var(--bordure);
	color: var(--dim);
	border-radius: 6px;
	padding: 0.25rem 0.6rem;
	cursor: pointer;
	font: inherit;
	font-size: 0.78rem;
}

.comptes-bouton:hover:not(:disabled) {
	color: var(--accent);
	border-color: rgba(126, 231, 135, 0.45);
}

.comptes-bouton:disabled { opacity: 0.4; cursor: default; }
.comptes-bouton.accent { color: var(--accent); border-color: rgba(126, 231, 135, 0.45); }
.comptes-bouton.danger { color: var(--erreur); }
.comptes-bouton.danger:hover:not(:disabled) {
	color: var(--erreur);
	border-color: var(--erreur);
}

.comptes-corps { flex: 1; min-height: 0; display: flex; }

.comptes-liste {
	width: 185px;
	flex-shrink: 0;
	border-right: 1px solid var(--bordure);
	background: var(--fond-panneau);
	padding: 0.3rem;
	overflow-y: auto;
	scrollbar-width: thin;
}

.compte-entree {
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
	width: 100%;
	padding: 0.35rem 0.45rem;
	background: transparent;
	border: 0;
	border-radius: 5px;
	color: var(--texte);
	text-align: left;
	font: inherit;
	cursor: pointer;
}

.compte-entree:hover { background: rgba(121, 192, 255, 0.1); }
.compte-entree.actif { background: rgba(121, 192, 255, 0.18); }

.compte-nom,
.compte-acces {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.compte-nom { font-size: 0.8rem; }
.compte-acces { color: var(--dim); font-size: 0.7rem; }

.comptes-detail {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
	padding: 0.55rem 0.65rem;
	overflow-y: auto;
	scrollbar-width: thin;
}

.comptes-entete { margin: 0; color: var(--accent); font-size: 0.8rem; }

.comptes-champ {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	font-size: 0.78rem;
}

.comptes-champ > span { width: 7.5rem; flex-shrink: 0; color: var(--dim); }

.comptes-champ input {
	flex: 1;
	min-width: 0;
	background: #05070a;
	border: 1px solid var(--bordure);
	border-radius: 6px;
	padding: 0.3rem 0.5rem;
	font: inherit;
	font-size: 0.8rem;
	color: var(--texte);
	outline: 0;
}

.comptes-champ input:focus { border-color: rgba(126, 231, 135, 0.5); }
.comptes-champ input[readonly] { background: transparent; color: var(--dim); }

.comptes-case {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	color: var(--dim);
	font-size: 0.78rem;
	cursor: pointer;
}

.comptes-case input,
.comptes-acces-ligne input { accent-color: var(--accent); flex-shrink: 0; }

.comptes-acces {
	flex: 1;
	min-height: 6rem;
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0.25rem 0.45rem 0.4rem;
	border: 1px solid var(--bordure);
	border-radius: 8px;
}

.comptes-acces legend { padding: 0 0.3rem; color: var(--dim); font-size: 0.72rem; }

.comptes-acces-liste {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	scrollbar-width: thin;
}

.comptes-acces-ligne {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.15rem 0.2rem;
	border-radius: 5px;
	font-size: 0.78rem;
	cursor: pointer;
}

.comptes-acces-ligne:hover { background: rgba(121, 192, 255, 0.08); }

.comptes-acces-ligne.tout {
	color: var(--accent);
	border-bottom: 1px dashed var(--bordure);
	border-radius: 0;
	margin-bottom: 0.2rem;
	padding-bottom: 0.3rem;
}

.comptes-acces-nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.comptes-actions { display: flex; gap: 0.4rem; flex-shrink: 0; }
.comptes-actions .comptes-bouton { flex: 1; padding: 0.35rem 0.6rem; }

.comptes-pied {
	padding: 0.22rem 0.7rem;
	border-top: 1px solid var(--bordure);
	background: var(--fond-panneau);
	color: var(--dim);
	font-size: 0.72rem;
	min-height: 1.6em;
	flex-shrink: 0;
}

/* --- Comptes : verrouillage et journal de connexions ---------------------- */

.compte-entree.verrouille .compte-acces { color: var(--erreur); }

.comptes-securite {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 1.9rem;
	flex-shrink: 0;
}

.comptes-etat { flex: 1; color: var(--dim); font-size: 0.74rem; }
.comptes-etat.verrouille { color: var(--erreur); }
.comptes-securite .comptes-bouton { flex-shrink: 0; }

.comptes-historique {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	flex-shrink: 0;
}

.comptes-soustitre { margin: 0; color: var(--dim); font-size: 0.72rem; }

.comptes-connexions {
	display: flex;
	flex-direction: column;
	max-height: 8.5rem;
	overflow-y: auto;
	scrollbar-width: thin;
	border: 1px solid var(--bordure);
	border-radius: 8px;
}

.connexion-ligne {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto auto 2.4rem;
	gap: 0.5rem;
	align-items: baseline;
	padding: 0.22rem 0.45rem;
	font-size: 0.74rem;
}

.connexion-ligne + .connexion-ligne { border-top: 1px solid var(--bordure); }

.connexion-pays { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.connexion-date,
.connexion-ip { color: var(--dim); white-space: nowrap; }
.connexion-etat { color: var(--accent); text-align: right; }
.connexion-ligne.echec .connexion-etat { color: var(--erreur); }

@media (max-width: 760px) {
	.connexion-ligne { grid-template-columns: minmax(0, 1fr) auto 2.4rem; }
	.connexion-ip { display: none; }
}

/* --- alertes de verrouillage (bureau administrateur) ---------------------- */

.alertes {
	position: absolute;
	right: 0.9rem;
	bottom: 52px;
	width: min(340px, calc(100% - 1.8rem));
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	padding: 0.5rem 0.6rem;
	background: rgba(12, 17, 23, 0.97);
	border: 1px solid rgba(248, 81, 73, 0.45);
	border-radius: 10px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
	z-index: 5;
}

.alertes-tete { margin: 0 0 0.15rem; color: var(--erreur); font-size: 0.78rem; }

.alerte { display: flex; align-items: center; gap: 0.4rem; font-size: 0.75rem; }

.alerte-texte {
	flex: 1;
	min-width: 0;
	color: var(--texte);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.alerte-action {
	background: transparent;
	border: 1px solid var(--bordure);
	color: var(--accent);
	border-radius: 5px;
	padding: 0.1rem 0.45rem;
	cursor: pointer;
	font: inherit;
	font-size: 0.72rem;
	flex-shrink: 0;
}

.alerte-action:hover { border-color: rgba(126, 231, 135, 0.45); }

.alerte-fermer {
	background: transparent;
	border: 0;
	color: var(--dim);
	cursor: pointer;
	font: inherit;
	font-size: 0.95rem;
	line-height: 1;
	padding: 0 0.2rem;
	flex-shrink: 0;
}

.alerte-fermer:hover { color: var(--erreur); }

/* --- dialogue (mot de passe provisoire) ----------------------------------- */

.dialogue {
	position: fixed;
	inset: 0;
	display: grid;
	place-items: center;
	padding: 1rem;
	background: rgba(4, 7, 10, 0.78);
	z-index: 50;
}

.dialogue-boite {
	width: min(420px, 100%);
	/* Le dialogue de la double authentification est plus long que les autres
	   (secret, adresse otpauth, codes de secours) : il doit pouvoir défiler
	   plutôt que déborder de l'écran sur un téléphone. */
	max-height: 92vh;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 0.7rem;
	padding: 1.2rem 1.3rem 1.3rem;
	background: var(--fond-fenetre);
	border: 1px solid var(--bordure);
	border-radius: 12px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

.dialogue-titre { margin: 0; color: var(--accent); font-size: 0.95rem; font-weight: 600; }
.dialogue-actions { display: flex; gap: 0.5rem; }
.dialogue-actions .bouton { flex: 1; }

#dialogue-totp .dialogue-boite { width: min(520px, 100%); }

.totp-secret {
	margin: 0;
	padding: 0.5rem 0.6rem;
	background: var(--fond-panneau);
	border: 1px solid var(--bordure);
	border-radius: 8px;
	font-size: 0.78rem;
	line-height: 1.45;
	white-space: pre-wrap;
	word-break: break-all;
	user-select: all;
}

.totp-codes {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.25rem 0.8rem;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.8rem;
}

.totp-codes li { color: var(--accent-2); }

/* --- application Mail (compléments) --------------------------------------- */

/* La mise en page est celle de l'application Comptes : une liste à gauche, un
   formulaire à droite. Seule la gestion des alias est propre au mail. */

.mail-alias { min-height: 5rem; gap: 0.3rem; }

.mail-alias-ligne {
	justify-content: space-between;
	cursor: default;
}

.mail-alias-ligne:hover { background: transparent; }
.mail-alias-ligne .comptes-bouton { padding: 0.1rem 0.45rem; }

.mail-alias-ajout { display: flex; gap: 0.35rem; padding-top: 0.3rem; }

.mail-alias-ajout input {
	flex: 1;
	min-width: 0;
	background: #05070a;
	border: 1px solid var(--bordure);
	border-radius: 6px;
	padding: 0.25rem 0.45rem;
	font: inherit;
	font-size: 0.78rem;
	color: var(--texte);
	outline: 0;
}

.mail-alias-ajout input:focus { border-color: rgba(126, 231, 135, 0.5); }
.mail-alias-ajout input:disabled { opacity: 0.5; }

/* --- application Drive (compléments) ------------------------------------- */

/* Même mise en page que Comptes et Mail : la seule différence est le compte
   désactivé, qui se lit dans la liste comme un compte verrouillé. */

.compte-entree.desactive .compte-acces { color: var(--erreur); }

/* « générer » reste à sa taille, le champ de mot de passe prend le reste. */
.comptes-champ > .comptes-bouton { flex-shrink: 0; }
