/* ==========================================================
   Cabinet Ergo — Portail patient (front-end)
   ========================================================== */

.ce-portal-wrap {
	max-width: 860px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 15px;
	color: #2c3338;
	line-height: 1.55;
}

/* ── Connexion ─────────────────────────────────────────────── */
.ce-portal-login {
	max-width: 400px;
	margin: 32px auto;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 2px 12px rgba(0,0,0,.1);
	padding: 32px;
}

.ce-portal-login h2 {
	font-size: 20px;
	font-weight: 700;
	color: #1e1e1e;
	margin: 0 0 24px;
	text-align: center;
}

.ce-portal-login .login-username,
.ce-portal-login .login-password {
	margin-bottom: 16px;
}

.ce-portal-login label {
	display: block;
	font-weight: 600;
	font-size: 13px;
	margin-bottom: 6px;
	color: #3c434a;
}

.ce-portal-login input[type="text"],
.ce-portal-login input[type="password"] {
	width: 100%;
	padding: 9px 12px;
	border: 1px solid #c3c4c7;
	border-radius: 5px;
	font-size: 14px;
	box-sizing: border-box;
	transition: border-color .15s;
}

.ce-portal-login input[type="text"]:focus,
.ce-portal-login input[type="password"]:focus {
	border-color: #2271b1;
	outline: none;
	box-shadow: 0 0 0 2px rgba(34,113,177,.2);
}

.ce-portal-login .login-remember { margin-bottom: 16px; }

.ce-portal-login input[type="submit"],
.ce-portal-login .button-primary {
	display: block;
	width: 100%;
	padding: 10px;
	background: #2271b1;
	color: #fff;
	border: none;
	border-radius: 5px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s;
}

.ce-portal-login input[type="submit"]:hover,
.ce-portal-login .button-primary:hover {
	background: #135e96;
}

/* ── En-tête tableau de bord ───────────────────────────────── */
.ce-portal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	padding: 20px 0 16px;
	border-bottom: 1px solid #e0e0e0;
	margin-bottom: 28px;
}

.ce-portal-header h2 {
	font-size: 22px;
	font-weight: 700;
	margin: 0;
	color: #1e1e1e;
}

.ce-portal-logout {
	font-size: 13px;
	color: #666;
	text-decoration: none;
	padding: 6px 14px;
	border: 1px solid #c3c4c7;
	border-radius: 20px;
	transition: background .12s;
}

.ce-portal-logout:hover { background: #f6f7f7; color: #444; }

/* ── Grille sections ───────────────────────────────────────── */
.ce-portal-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

@media (max-width: 640px) {
	.ce-portal-grid { grid-template-columns: 1fr; }
}

/* ── Carte section ─────────────────────────────────────────── */
.ce-portal-card {
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 1px 6px rgba(0,0,0,.08);
	overflow: hidden;
}

.ce-portal-card-full {
	grid-column: 1 / -1;
}

.ce-portal-card-header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 18px;
	border-bottom: 1px solid #f0f0f0;
}

.ce-portal-card-icon {
	width: 32px;
	height: 32px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.ce-portal-card-icon.blue   { background: #e8f0fb; color: #2271b1; }
.ce-portal-card-icon.green  { background: #e6f4ea; color: #00a32a; }
.ce-portal-card-icon.orange { background: #fff8e1; color: #dba617; }
.ce-portal-card-icon.teal   { background: #e0f7fa; color: #0097a7; }

.ce-portal-card-icon .dashicons { font-size: 18px; width: 18px; height: 18px; }

.ce-portal-card-header h3 {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	color: #1e1e1e;
}

.ce-portal-card-body {
	padding: 16px 18px;
}

.ce-portal-empty {
	color: #888;
	font-style: italic;
	font-size: 13.5px;
	padding: 8px 0;
}

/* ── Tableau portail ───────────────────────────────────────── */
.ce-portal-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13.5px;
}

.ce-portal-table th {
	text-align: left;
	font-size: 12px;
	font-weight: 600;
	color: #666;
	text-transform: uppercase;
	letter-spacing: .4px;
	padding: 0 0 8px;
	border-bottom: 1px solid #f0f0f0;
}

.ce-portal-table td {
	padding: 9px 0;
	border-bottom: 1px solid #f6f6f6;
	vertical-align: top;
}

.ce-portal-table tbody tr:last-child td { border-bottom: none; }

/* ── Badges portail ────────────────────────────────────────── */
.ce-portal-badge {
	display: inline-block;
	padding: 2px 9px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
}

.ce-portal-badge-planifiee,
.ce-portal-badge-planifie   { background: #e8f0fb; color: #2271b1; }
.ce-portal-badge-confirme   { background: #e6f4ea; color: #00a32a; }
.ce-portal-badge-realisee   { background: #e6f4ea; color: #00a32a; }
.ce-portal-badge-termine    { background: #e6f4ea; color: #00a32a; }
.ce-portal-badge-annulee,
.ce-portal-badge-annule     { background: #fde8e8; color: #d63638; }
.ce-portal-badge-paye       { background: #e6f4ea; color: #00a32a; }
.ce-portal-badge-en_attente { background: #fff8e1; color: #dba617; }
.ce-portal-badge-en_cours   { background: #e8f0fb; color: #2271b1; }
.ce-portal-badge-atteint    { background: #e6f4ea; color: #00a32a; }
.ce-portal-badge-abandonne  { background: #fde8e8; color: #d63638; }

/* ── Liste objectifs ───────────────────────────────────────── */
.ce-portal-objective {
	padding: 10px 0;
	border-bottom: 1px solid #f6f6f6;
}

.ce-portal-objective:last-child { border-bottom: none; }

.ce-portal-objective-title {
	font-weight: 600;
	font-size: 14px;
	color: #1e1e1e;
}

.ce-portal-objective-meta {
	font-size: 12px;
	color: #888;
	margin-top: 3px;
}

/* ── Navigation onglets (thérapeute) ───────────────────────── */
.ce-portal-nav {
	display: flex;
	gap: 4px;
	margin-bottom: 20px;
	border-bottom: 1px solid #e0e0e0;
}

.ce-portal-nav a {
	padding: 10px 16px;
	font-size: 13.5px;
	font-weight: 600;
	color: #666;
	text-decoration: none;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
}

.ce-portal-nav a:hover { color: #2271b1; }

.ce-portal-nav a.active {
	color: #2271b1;
	border-bottom-color: #2271b1;
}

/* ── Boutons portail ───────────────────────────────────────── */
.ce-portal-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 14px;
	border-radius: 5px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	border: 1px solid #c3c4c7;
	background: #fff;
	color: #3c434a;
	cursor: pointer;
}

.ce-portal-btn:hover { background: #f6f7f7; }

.ce-portal-btn-default {
	background: #fff;
	color: #2271b1;
	border-color: #2271b1;
}

.ce-portal-btn-primary {
	background: #2271b1;
	color: #fff;
	border-color: #2271b1;
}

.ce-portal-btn-primary:hover { background: #135e96; }

/* ── Notices portail ───────────────────────────────────────── */
.ce-portal-notice {
	padding: 10px 14px;
	border-radius: 5px;
	font-size: 13.5px;
	margin-bottom: 16px;
}

.ce-portal-notice-success {
	background: #e6f4ea;
	color: #00a32a;
	border: 1px solid #b8e2c3;
}

.ce-portal-notice-error {
	background: #fde8e8;
	color: #d63638;
	border: 1px solid #f5c2c2;
}

/* ── Tableau formulaire (observations) ─────────────────────── */
.ce-portal-table-form th,
.ce-portal-table-form td {
	padding: 10px 8px;
	vertical-align: top;
}

/* ── Message thérapeute ────────────────────────────────────── */
.ce-portal-therapist {
	max-width: 500px;
	margin: 40px auto;
	text-align: center;
	padding: 32px;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 1px 6px rgba(0,0,0,.08);
}

.ce-portal-therapist p { margin-bottom: 16px; color: #555; }

.ce-portal-therapist a.button {
	display: inline-block;
	padding: 10px 24px;
	background: #2271b1;
	color: #fff;
	border-radius: 5px;
	text-decoration: none;
	font-weight: 600;
	font-size: 14px;
}

.ce-portal-therapist a.button:hover { background: #135e96; }
