.adb-ec {
	--ec-brand: #023047;
	--ec-brand-2: #0b5a80;
	--ec-accent: #ffb703;
	--ec-ink: #0d131a;
	--ec-muted: #5f6b76;
	--ec-line: #e3e8ec;
	--ec-bg: #f4f7f9;
	--ec-card: #fff;
	--ec-ok: #1f8a4c;
	--ec-err: #c0392b;
	color: var(--ec-ink);
	font-size: 15px;
	line-height: 1.55;
}
.adb-ec *, .adb-ec *::before, .adb-ec *::after { box-sizing: border-box; }
.adb-ec h2, .adb-ec h3 { font-family: Roboto, system-ui, sans-serif; margin: 0 0 .6em; color: var(--ec-ink); }
.adb-ec a { color: var(--ec-brand-2); }

.adb-ec-card {
	background: var(--ec-card);
	border: 1px solid var(--ec-line);
	border-radius: 12px;
	padding: 22px;
	box-shadow: 0 1px 2px rgba(2, 48, 71, .04);
}
.adb-ec-narrow { max-width: 480px; margin: 0 auto; }
.adb-ec-muted { color: var(--ec-muted); font-size: .92em; }
.adb-ec-error { color: var(--ec-err); font-weight: 600; }

.adb-ec-btn {
	display: inline-flex; align-items: center; gap: 6px;
	background: var(--ec-brand); color: #fff !important; border: 1px solid var(--ec-brand);
	border-radius: 8px; padding: 9px 16px; font-weight: 600; font-size: 14px;
	cursor: pointer; text-decoration: none; line-height: 1.2;
}
.adb-ec-btn:hover { background: var(--ec-brand-2); border-color: var(--ec-brand-2); }
.adb-ec-btn--ghost { background: transparent; color: var(--ec-brand) !important; }
.adb-ec-btn--ghost:hover { background: var(--ec-bg); color: var(--ec-brand) !important; }

/* Connexion */
.adb-ec-login { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; max-width: 960px; margin: 0 auto; }
.adb-ec-login-side h2 { font-size: 2rem; }
.adb-ec-login-side ul { list-style: none; padding: 0; margin: 0 0 1.5em; }
.adb-ec-login-side li { padding: 8px 0 8px 30px; position: relative; }
.adb-ec-login-side li::before {
	content: ""; position: absolute; left: 0; top: 12px; width: 18px; height: 18px; border-radius: 50%;
	background: var(--ec-brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'%3E%3Cpath d='M8 13.2 4.8 10l-1.1 1.1L8 15.4l8.3-8.3-1.1-1.1z'/%3E%3C/svg%3E") center/14px no-repeat;
}
.adb-ec-login-form form p { margin: 0 0 14px; }
.adb-ec-login-form label { display: block; font-weight: 600; margin-bottom: 4px; font-size: 14px; }
.adb-ec-login-form input[type=text], .adb-ec-login-form input[type=password] {
	width: 100%; padding: 11px 12px; border: 1px solid #cdd5db; border-radius: 8px; font-size: 15px;
}
.adb-ec-login-form input:focus { outline: 2px solid var(--ec-brand-2); outline-offset: 1px; border-color: transparent; }
.adb-ec-login-form .login-remember label { display: inline; font-weight: 400; }
.adb-ec-login-form input[type=submit] {
	width: 100%; background: var(--ec-brand); color: #fff; border: 0; border-radius: 8px;
	padding: 12px; font-weight: 700; font-size: 15px; cursor: pointer;
}
.adb-ec-login-form input[type=submit]:hover { background: var(--ec-brand-2); }

/* Barre du haut */
.adb-ec-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; gap: 16px; }
.adb-ec-hello { font-size: 1.15rem; font-weight: 600; margin: 0; }
.adb-ec-hello span { color: var(--ec-muted); font-weight: 400; }
.adb-ec-back { text-decoration: none; font-weight: 600; }
.adb-ec-logout { color: var(--ec-muted) !important; font-size: 14px; }
.adb-ec-title { font-size: 1.6rem; }

/* Projets */
.adb-ec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.adb-ec-project { display: block; text-decoration: none; color: inherit !important; transition: transform .15s, box-shadow .15s, border-color .15s; }
.adb-ec-project:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(2, 48, 71, .1); border-color: #c9d6de; }
.adb-ec-project h3 { margin: 12px 0 4px; font-size: 1.15rem; }
.adb-ec-meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--ec-muted); margin-top: 6px; }
.adb-ec-last { font-size: 13px; color: var(--ec-muted); margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--ec-line); }

.adb-ec-status { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: #eef2f5; color: var(--ec-muted); }
.adb-ec-status--en_cours { background: #e3f0f7; color: #0b5a80; }
.adb-ec-status--revue { background: #fff4d6; color: #8a5a00; }
.adb-ec-status--livre { background: #e2f5ea; color: var(--ec-ok); }
.adb-ec-status--termine { background: #e9ecef; color: #4b5560; }

.adb-ec-progress { height: 6px; background: #e8edf1; border-radius: 99px; overflow: hidden; margin-top: 14px; }
.adb-ec-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ec-brand), var(--ec-brand-2)); border-radius: inherit; transition: width .3s; }
.adb-ec-progress--lg { height: 10px; margin: 0 0 28px; }

/* Page projet */
.adb-ec-project-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 14px; }
.adb-ec-project-head .adb-ec-title { margin: 8px 0 0; }
.adb-ec-kpis { display: flex; gap: 28px; }
.adb-ec-kpis > div { display: flex; flex-direction: column; text-align: right; }
.adb-ec-kpi { font-family: Roboto, system-ui, sans-serif; font-size: 1.5rem; font-weight: 700; color: var(--ec-brand); }
.adb-ec-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.adb-ec-side { display: grid; gap: 20px; }
.adb-ec-content p:last-child { margin-bottom: 0; }

.adb-ec-timeline { list-style: none; margin: 0; padding: 0; }
.adb-ec-timeline li { position: relative; padding: 0 0 16px 20px; border-left: 2px solid var(--ec-line); margin-left: 5px; }
.adb-ec-timeline li:last-child { padding-bottom: 0; border-left-color: transparent; }
.adb-ec-timeline li::before { content: ""; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--ec-brand); }
.adb-ec-timeline time { font-size: 12px; font-weight: 700; color: var(--ec-muted); text-transform: uppercase; letter-spacing: .03em; }
.adb-ec-timeline p { margin: 2px 0 0; font-size: 14px; }

/* Fichiers */
.adb-ec-files { padding: 0; overflow: hidden; }
.adb-ec-files-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 18px 22px 10px; }
.adb-ec-files-head h3 { margin: 0; }
.adb-ec-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.adb-ec-crumbs { padding: 0 22px 12px; font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px; color: var(--ec-muted); border-bottom: 1px solid var(--ec-line); }
.adb-ec-crumbs a { text-decoration: none; }
.adb-ec-crumbs strong { color: var(--ec-ink); }
.adb-ec-drop { position: relative; min-height: 200px; }
.adb-ec-drop-hint {
	position: absolute; inset: 8px; display: none; align-items: center; justify-content: center;
	border: 2px dashed var(--ec-brand-2); border-radius: 10px; background: rgba(227, 240, 247, .92);
	font-weight: 700; color: var(--ec-brand); font-size: 1.1rem; pointer-events: none;
}
.adb-ec-drop.is-over .adb-ec-drop-hint { display: flex; }
.adb-ec-list > p { padding: 22px; margin: 0; }
.adb-ec-empty { text-align: center; color: var(--ec-muted); padding: 50px 22px !important; }

.adb-ec-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 0; }
.adb-ec-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ec-muted); font-weight: 700; padding: 10px 22px; border: 0; background: #fafbfc; }
.adb-ec-table td { padding: 10px 22px; border: 0; border-top: 1px solid var(--ec-line); vertical-align: middle; }
.adb-ec-table tbody tr:hover { background: #f7fafc; }
.adb-ec-num { text-align: right; white-space: nowrap; }
.adb-ec-name { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ec-ink) !important; font-weight: 500; word-break: break-word; }
.adb-ec-name:hover span { text-decoration: underline; }
.adb-ec-dl { display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; border-radius: 6px; text-decoration: none; font-weight: 700; color: var(--ec-brand) !important; }
.adb-ec-dl:hover { background: #e3f0f7; }

.adb-ec-ico { flex: none; width: 30px; height: 30px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 9px; font-weight: 800; text-transform: uppercase; color: #fff; background: #8a96a1; }
.adb-ec-ico::after { content: attr(data-ext); }
.adb-ec-ico--dir { background: #ffb703 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M10 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-8l-2-2z'/%3E%3C/svg%3E") center/18px no-repeat; }
.adb-ec-ico--cad { background: #0b5a80; }
.adb-ec-ico--pdf { background: #d6452f; }
.adb-ec-ico--xls { background: #1f8a4c; }
.adb-ec-ico--doc { background: #2b5fb4; }
.adb-ec-ico--img { background: #8a4fc7; }
.adb-ec-ico--zip { background: #6b5b3e; }

.adb-ec-uploads:not(:empty) { border-top: 1px solid var(--ec-line); padding: 12px 22px 16px; display: grid; gap: 10px; }
.adb-ec-up-name { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 600; }
.adb-ec-up .adb-ec-progress { margin-top: 6px; }
.adb-ec-up.is-done .adb-ec-progress span { background: var(--ec-ok); }
.adb-ec-up.is-error .adb-ec-muted { color: var(--ec-err); }

@media (max-width: 900px) {
	.adb-ec-layout, .adb-ec-login { grid-template-columns: 1fr; }
	.adb-ec-kpis > div { text-align: left; }
}
@media (max-width: 600px) {
	.adb-ec-hide-sm { display: none; }
	.adb-ec-card { padding: 16px; }
	.adb-ec-table th, .adb-ec-table td { padding: 10px 14px; }
	.adb-ec-files-head, .adb-ec-crumbs { padding-left: 14px; padding-right: 14px; }
}

/* Barre d'administration (admin connecté) */
.adb-ec-admin { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px; margin: 0 0 24px; background: #fff; border: 1px dashed #c9d6de; border-radius: 12px; }
.adb-ec-admin-label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--ec-muted); margin-right: 6px; }
.adb-ec-notice { padding: 12px 16px; border-radius: 10px; margin: 0 0 14px; font-weight: 600; font-size: 14px; }
.adb-ec-notice--ok { background: #e2f5ea; color: #1f6b3e; }
.adb-ec-notice--warn { background: #fff4d6; color: #7a5200; }
.adb-ec-notice--err { background: #fcebea; color: #a3281c; }
.adb-ec-form { max-width: 760px; }
.adb-ec-form label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.adb-ec-form input:not([type=checkbox]) { width: 100%; padding: 11px 12px; border: 1px solid #cdd5db; border-radius: 8px; font-size: 15px; font-family: inherit; }
.adb-ec-form input:focus { outline: 2px solid var(--ec-brand-2); outline-offset: 1px; border-color: transparent; }
.adb-ec-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.adb-ec-row p, .adb-ec-form > p { margin: 0 0 14px; }
.adb-ec-form .adb-ec-check { display: inline-flex; gap: 8px; align-items: center; font-weight: 400; }
@media (max-width: 600px) { .adb-ec-row { grid-template-columns: 1fr; gap: 0; } }

/* Réunion Teams */
.adb-ec-teams { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: #eef0fb; border: 1px solid #d9dcf5; border-radius: 12px; padding: 14px 18px; margin: 0 0 24px; }
.adb-ec-teams > div { flex: 1; min-width: 200px; display: flex; flex-direction: column; }
.adb-ec-teams-ico { width: 40px; height: 40px; border-radius: 10px; background: #5b5fc7; color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.adb-ec-btn--teams { background: #5b5fc7; border-color: #5b5fc7; }
.adb-ec-btn--teams:hover { background: #4b4fb3; border-color: #4b4fb3; }

/* Panneau de gestion (admin) */
.adb-ec-manage { border: 1px dashed #c9d6de; }
.adb-ec-manage h3 { display: flex; align-items: center; gap: 8px; }
.adb-ec-manage p { margin: 0 0 12px; }
.adb-ec-form select, .adb-ec-form textarea { width: 100%; padding: 10px 12px; border: 1px solid #cdd5db; border-radius: 8px; font-size: 15px; font-family: inherit; background: #fff; }
.adb-ec-form input[type=range] { padding: 0; border: 0; }

/* Racine listant plusieurs dossiers partagés : pas de dépôt ici */
.adb-ec-files.is-virtual .adb-ec-actions { display: none; }

/* Dossiers partagés (admin) */
.adb-ec-shared { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.adb-ec-shared li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--ec-bg); border-radius: 8px; font-size: 14px; }
.adb-ec-shared li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.adb-ec-shared button { border: 0; background: none; color: var(--ec-err); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 4px; }
.adb-ec-help { font-size: 12.5px; color: var(--ec-muted); margin: 6px 0 0; }

.adb-ec-checklist { max-height: 180px; overflow: auto; border: 1px solid #cdd5db; border-radius: 8px; padding: 8px 12px; margin: 4px 0 14px; background: #fff; }
.adb-ec-checklist .adb-ec-check { display: flex; margin: 4px 0; }
.adb-ec-manage + .adb-ec-manage { margin-top: 0; }
