/* Espace Chez Donald — front (portail parents + formulaires).
   Palette : bleu #1D6FB8 / orange #F59E2D / fond #F8FAFC. */

.ecde-portal, .ecde-form { --ecde-blue: #1d6fb8; --ecde-orange: #f59e2d; --ecde-ink: #0f172a; --ecde-muted: #64748b; --ecde-line: #e2e8f0; }

/* ---- Notices ---- */
.ecde-notice { border-radius: 10px; padding: 14px 18px; margin: 0 0 18px; font-size: 15px; }
.ecde-notice-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.ecde-notice-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.ecde-notice-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.ecde-notice-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* ---- Boutons ---- */
.ecde-btn { display: inline-block; background: #1d6fb8; color: #fff !important; border: 2px solid #1d6fb8; border-radius: 10px; padding: 10px 20px; font-weight: 700; font-size: 15px; text-decoration: none !important; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
.ecde-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(29, 111, 184, .25); }
.ecde-btn:focus-visible { outline: 3px solid #f59e2d; outline-offset: 2px; }
.ecde-btn-primary { background: #f59e2d; border-color: #f59e2d; }
.ecde-btn-ghost { background: transparent; color: #1d6fb8 !important; }
.ecde-btn-small { padding: 6px 14px; font-size: 13px; }

/* ---- Formulaires ---- */
.ecde-form { max-width: 560px; }
.ecde-field { margin-bottom: 16px; }
.ecde-field label { display: block; font-weight: 600; color: var(--ecde-ink); margin-bottom: 6px; }
.ecde-field small { color: var(--ecde-muted); }
.ecde-field input, .ecde-field select, .ecde-field textarea { width: 100%; border: 1.5px solid var(--ecde-line); border-radius: 10px; padding: 11px 14px; font-size: 15px; box-sizing: border-box; background: #fff; }
.ecde-field input:focus, .ecde-field select:focus, .ecde-field textarea:focus { border-color: var(--ecde-blue); outline: 2px solid rgba(29, 111, 184, .2); }
.ecde-hp { position: absolute !important; left: -9999px !important; height: 1px; overflow: hidden; }

/* ---- Formulaire multi-étapes (admissions) ---- */
.ecde-steps-form { background: #fff; border: 1px solid var(--ecde-line); border-radius: 16px; padding: 26px; }
.ecde-steps-nav { display: flex; gap: 18px; margin-bottom: 24px; flex-wrap: wrap; }
.ecde-step-dot { color: #94a3b8; font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.ecde-step-dot i { font-style: normal; width: 26px; height: 26px; border-radius: 50%; background: #e2e8f0; color: #64748b; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.ecde-step-dot.is-active { color: var(--ecde-blue); }
.ecde-step-dot.is-active i { background: var(--ecde-blue); color: #fff; }
.ecde-step-dot.is-done i { background: #16a34a; color: #fff; }
.ecde-step { display: none; border: 0; padding: 0; margin: 0; }
.ecde-step.is-active { display: block; }
.ecde-step-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; }
.ecde-step-actions .ecde-next:only-child { margin-left: auto; }
.ecde-recap { background: #f8fafc; border-radius: 10px; padding: 16px; font-size: 15px; line-height: 1.8; }

/* ---- Portail : structure ---- */
.ecde-portal { max-width: 880px; margin: 0 auto; }
.ecde-portal-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; background: linear-gradient(120deg, #1d6fb8, #2a86d4); border-radius: 16px; color: #fff; padding: 22px 26px; margin-bottom: 16px; flex-wrap: wrap; }
.ecde-portal-school { font-size: 13px; opacity: .85; text-transform: uppercase; letter-spacing: 1px; }
.ecde-portal-title { color: #fff; margin: 2px 0 0; font-size: 24px; }
.ecde-portal-header .ecde-logout { color: #fff !important; border-color: rgba(255,255,255,.5); }
.ecde-portal-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 18px; }
.ecde-portal-tab { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: 14px; color: #475569; text-decoration: none !important; border: 1.5px solid var(--ecde-line); background: #fff; }
.ecde-portal-tab .dashicons { font-size: 17px; width: 17px; height: 17px; }
.ecde-portal-tab.is-active { background: var(--ecde-blue); border-color: var(--ecde-blue); color: #fff; }
.ecde-portal-body { background: #fff; border: 1px solid var(--ecde-line); border-radius: 16px; padding: 24px; }

/* ---- Login ---- */
.ecde-login-card { max-width: 400px; margin: 0 auto; background: #fff; border: 1px solid var(--ecde-line); border-radius: 16px; padding: 30px; text-align: center; }
.ecde-login-card form { text-align: left; }
.ecde-login-card input[type="text"], .ecde-login-card input[type="password"] { width: 100%; border: 1.5px solid var(--ecde-line); border-radius: 10px; padding: 11px 14px; box-sizing: border-box; }
.ecde-login-card input[type="submit"] { width: 100%; background: var(--ecde-orange); color: #fff; border: 0; border-radius: 10px; padding: 12px; font-weight: 700; font-size: 15px; cursor: pointer; }
.ecde-login-lost { margin-top: 12px; font-size: 14px; }

/* ---- Mes enfants ---- */
.ecde-children-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.ecde-child-card { border: 1px solid var(--ecde-line); border-radius: 14px; padding: 20px; text-align: center; }
.ecde-child-photo img { border-radius: 50%; width: 96px; height: 96px; object-fit: cover; }
.ecde-child-photo .dashicons { font-size: 60px; width: 96px; height: 96px; line-height: 96px; color: #cbd5e1; }
.ecde-child-card h3 { margin: 10px 0 2px; font-size: 17px; }
.ecde-child-class { color: var(--ecde-blue); font-weight: 700; margin: 0 0 2px; font-size: 14px; }
.ecde-child-bd { color: var(--ecde-muted); font-size: 13px; margin: 0 0 12px; }
.ecde-child-links { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.ecde-child-switch { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.ecde-chip { border: 1.5px solid var(--ecde-line); border-radius: 999px; padding: 6px 16px; font-size: 14px; font-weight: 600; color: #475569; text-decoration: none !important; }
.ecde-chip.is-active { background: var(--ecde-blue); border-color: var(--ecde-blue); color: #fff; }

/* ---- Cahier de vie (timeline) ---- */
.ecde-timeline { display: flex; flex-direction: column; gap: 14px; }
.ecde-day { border: 1px solid var(--ecde-line); border-left: 4px solid var(--ecde-orange); border-radius: 12px; padding: 16px 18px; }
.ecde-day-head { display: flex; align-items: center; gap: 10px; }
.ecde-day-head h3 { margin: 0; font-size: 16px; text-transform: capitalize; }
.ecde-day-mood { font-size: 26px; }
.ecde-day-facts { list-style: none; margin: 10px 0 0; padding: 0; display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; color: #334155; }
.ecde-day-activities { margin: 10px 0 0; font-size: 14px; }
.ecde-day-note { margin: 10px 0 0; background: #fffbeb; border-radius: 8px; padding: 10px 12px; font-size: 14px; }

/* ---- Messagerie ---- */
.ecde-announcements { display: flex; flex-direction: column; gap: 12px; margin-bottom: 22px; }
.ecde-announcement { background: #eff6ff; border-radius: 12px; padding: 14px 18px; font-size: 14px; }
.ecde-announcement header { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.ecde-announcement header span { color: var(--ecde-muted); font-size: 13px; }
.ecde-thread-list { list-style: none; margin: 0 0 16px; padding: 0; }
.ecde-thread-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 4px; border-bottom: 1px solid var(--ecde-line); }
.ecde-thread-list a { font-weight: 600; text-decoration: none; color: var(--ecde-ink); }
.ecde-thread-list span { color: var(--ecde-muted); font-size: 13px; }
.ecde-unread { background: var(--ecde-orange); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 12px; margin-left: 6px; }
.ecde-thread { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.ecde-bubble { max-width: 78%; border-radius: 14px; padding: 10px 14px; font-size: 14px; }
.ecde-bubble p { margin: 0; }
.ecde-bubble-meta { display: block; font-size: 12px; color: var(--ecde-muted); margin-bottom: 4px; }
.ecde-bubble.is-mine { align-self: flex-end; background: #e0f2fe; }
.ecde-bubble.is-school { align-self: flex-start; background: #f1f5f9; }
.ecde-new-thread summary { list-style: none; width: max-content; }
.ecde-new-thread[open] summary { margin-bottom: 14px; }

/* ---- Factures ---- */
.ecde-invoice-list { display: flex; flex-direction: column; gap: 12px; }
.ecde-invoice { display: flex; justify-content: space-between; gap: 14px; border: 1px solid var(--ecde-line); border-radius: 12px; padding: 16px 18px; flex-wrap: wrap; }
.ecde-invoice.is-due { border-left: 4px solid var(--ecde-orange); }
.ecde-invoice.is-pending { border-left: 4px solid #a855f7; }
.ecde-invoice.is-paid { border-left: 4px solid #16a34a; opacity: .85; }
.ecde-invoice-main { display: flex; flex-direction: column; gap: 2px; }
.ecde-invoice-meta { color: var(--ecde-muted); font-size: 13px; }
.ecde-invoice-side { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ecde-invoice-amount { font-weight: 800; font-size: 17px; }
.ecde-invoice-status { font-size: 13px; color: var(--ecde-muted); }

/* ---- Page de paiement ---- */
.ecde-pay-header { text-align: center; margin-bottom: 20px; }
.ecde-pay-header h3 { margin: 0; }
.ecde-pay-amount { font-size: 32px; font-weight: 800; color: var(--ecde-blue); margin: 6px 0; }
.ecde-pay-ref { background: #fffbeb; display: inline-block; border-radius: 8px; padding: 8px 14px; font-size: 14px; }
.ecde-pay-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 24px; }
.ecde-pay-method { border: 1px solid var(--ecde-line); border-radius: 14px; padding: 18px; text-align: center; }
.ecde-pay-method h4 { margin: 0 0 10px; font-size: 16px; }
.ecde-pay-hint { color: var(--ecde-muted); font-size: 13px; margin: 10px 0 0; }
.ecde-qr { display: flex; justify-content: center; margin-bottom: 12px; }
.ecde-qr img, .ecde-qr canvas { border-radius: 10px; }
.ecde-copy-line { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; font-size: 16px; }
.ecde-copy { border: 1.5px solid var(--ecde-line); background: #fff; border-radius: 8px; padding: 4px 12px; font-size: 13px; cursor: pointer; }
.ecde-copy.is-copied { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.ecde-declare { border-top: 2px dashed var(--ecde-line); padding-top: 20px; }
.ecde-declare h4 { margin-top: 0; }

/* ---- Vie de l'école ---- */
.ecde-events { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.ecde-event { display: flex; gap: 14px; align-items: center; border: 1px solid var(--ecde-line); border-radius: 12px; padding: 12px 16px; }
.ecde-event-date { display: flex; flex-direction: column; align-items: center; background: var(--ecde-blue); color: #fff; border-radius: 10px; min-width: 52px; padding: 6px 0; line-height: 1.1; }
.ecde-event-date span:first-child { font-size: 20px; font-weight: 800; }
.ecde-event-date span:last-child { font-size: 12px; text-transform: uppercase; }
.ecde-event-meta { display: block; color: var(--ecde-muted); font-size: 13px; }
.ecde-menu-table { width: 100%; border-collapse: collapse; margin-bottom: 22px; }
.ecde-menu-table th { text-align: left; background: #f8fafc; padding: 10px 14px; width: 120px; border-bottom: 1px solid var(--ecde-line); }
.ecde-menu-table td { padding: 10px 14px; border-bottom: 1px solid var(--ecde-line); }
.ecde-timetable { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 22px; }
.ecde-tt-day { border: 1px solid var(--ecde-line); border-radius: 12px; padding: 12px; }
.ecde-tt-day ul { margin: 8px 0 0; padding-left: 16px; font-size: 13px; color: #334155; }
.ecde-albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.ecde-album summary { cursor: pointer; list-style: none; }
.ecde-album summary img { width: 100%; border-radius: 12px; display: block; }
.ecde-album summary span { display: block; font-weight: 600; margin-top: 6px; }
.ecde-album-body img { max-width: 100%; height: auto; border-radius: 10px; }

/* ---- Responsive ---- */
@media (max-width: 640px) {
	.ecde-portal-body { padding: 16px; }
	.ecde-bubble { max-width: 92%; }
	.ecde-invoice-side { width: 100%; justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) {
	.ecde-btn { transition: none; }
}

/* ---- Mon profil ---- */
.ecde-profile-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 22px; align-items: start; }
.ecde-profile-grid .ecde-card h3 { margin-top: 0; }
.ecde-form label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.ecde-form input[type="text"], .ecde-form input[type="email"], .ecde-form input[type="tel"], .ecde-form input[type="password"] { width: 100%; padding: 10px 12px; border: 1.5px solid #e2e8f0; border-radius: 10px; font-family: inherit; font-size: 14.5px; }
.ecde-form input:focus { outline: none; border-color: #1D6FB8; }
.ecde-hint { color: #64748b; font-size: 13.5px; }
.ecde-check { display: flex; gap: 8px; align-items: center; font-weight: 700; }
.ecde-create-account small { display: block; color: #64748b; margin: 4px 0 8px; }
.ecde-account-fields { background: #f8fafc; border-radius: 10px; padding: 12px 14px; margin-top: 8px; }
.ecde-account-fields label { margin-top: 8px; }
@media (max-width: 760px) { .ecde-profile-grid { grid-template-columns: 1fr; } }

/* ---- Formulaire d'inscription complet (multi-étapes) ---- */
.ecde-adm-full .ecde-step-title { font-family: var(--cd-font-display, 'Baloo 2', sans-serif); font-size: 20px; color: #16324F; margin: 0 0 18px; }
.ecde-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ecde-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.ecde-resp { border: 1.5px solid #eef2f6; border-radius: 14px; padding: 16px 18px 4px; margin-bottom: 18px; }
.ecde-resp legend { font-family: var(--cd-font-display, 'Baloo 2', sans-serif); font-weight: 700; color: #1D6FB8; padding: 0 8px; font-size: 15px; }
.ecde-primary-contact { background: #FFF9EF; border: 1.5px dashed #f2e3c4; border-radius: 14px; padding: 14px 16px; }
.ecde-primary-contact > label { font-weight: 800; color: #16324F; display: block; margin-bottom: 8px; }
.ecde-sub { font-weight: 800; color: #16324F; margin: 18px 0 8px; font-size: 14.5px; }
.ecde-pieces { background: #FFF9EF; border-radius: 14px; padding: 16px 20px; margin-bottom: 18px; }
.ecde-pieces p { font-weight: 800; color: #16324F; margin: 0 0 8px; }
.ecde-pieces ul { margin: 0; padding-left: 20px; color: #51677d; font-size: 14px; line-height: 1.6; }
.ecde-check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin: 12px 0; line-height: 1.4; }
@media (max-width: 640px) {
	.ecde-grid-2, .ecde-grid-3 { grid-template-columns: 1fr; }
}

/* =========================================================================
   Portail sur mobile : les onglets deviennent une barre d'app fixe en bas
   et REMPLACENT la barre de navigation mobile du site (.cd-mobilebar).
   Bascule alignée sur celle du site (980px).
   ========================================================================= */
@media (max-width: 979px) {

	/* 1. La barre mobile du site s'efface sur la page du portail. */
	body.ecde-portal-active .cd-mobilebar { display: none !important; }
	body.ecde-portal-active.cd-has-mobilebar { padding-bottom: 0 !important; }

	/* 2. Les onglets du portail : barre fixe en bas, façon application. */
	body.ecde-portal-active .ecde-portal-tabs {
		position: fixed;
		left: 0; right: 0; bottom: 0;
		z-index: 200; /* au-dessus de la barre du site (150) par sécurité */
		margin: 0;
		display: grid;
		grid-auto-flow: column;
		grid-auto-columns: 1fr;
		gap: 0;
		overflow-x: visible;
		background: #fff;
		border-top: 1px solid var(--ecde-line, #e2e8f0);
		box-shadow: 0 -6px 22px rgba(22, 50, 79, .14);
		padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
	}
	body.ecde-portal-active .ecde-portal-tab {
		flex-direction: column;
		justify-content: center;
		gap: 3px;
		padding: 6px 2px;
		border: 0;
		border-radius: 12px;
		background: transparent;
		font-size: 10.5px;
		font-weight: 700;
		line-height: 1.1;
		text-align: center;
		color: #64748b;
		min-width: 0;
		overflow: hidden;
		text-overflow: ellipsis;
	}
	body.ecde-portal-active .ecde-portal-tab .dashicons {
		font-size: 22px; width: 22px; height: 22px;
	}
	body.ecde-portal-active .ecde-portal-tab.is-active {
		background: var(--ecde-cream, #FFF9EF);
		color: var(--ecde-blue, #1D6FB8);
	}

	/* 3. Le contenu du portail ne passe pas sous la barre. */
	body.ecde-portal-active .ecde-portal {
		padding-bottom: calc(86px + env(safe-area-inset-bottom, 0px));
	}

	/* 4. En-tête du portail compact sur mobile. */
	body.ecde-portal-active .ecde-portal-header {
		flex-wrap: wrap; gap: 10px;
	}
	body.ecde-portal-active .ecde-portal-title { font-size: 20px; }
}

/* Libellés courts des onglets sur mobile (data-short). */
@media (max-width: 979px) {
	body.ecde-portal-active .ecde-portal-tab .ecde-tab-text { font-size: 0; }
	body.ecde-portal-active .ecde-portal-tab .ecde-tab-text::after {
		content: attr(data-short);
		font-size: 10.5px;
		display: block;
	}
}

/* ---- Photo de profil enfant (téléversable par le parent) ---- */
.ecde-child-photo img { width: 96px; height: 96px; object-fit: cover; border-radius: 50%; border: 3px solid var(--ecde-cream, #FFF9EF); box-shadow: 0 4px 12px rgba(22, 50, 79, .12); }
.ecde-child-photo-form { margin: 8px 0 4px; }
.ecde-photo-btn { display: inline-block; cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--ecde-blue, #1D6FB8); background: #fff; border: 1.5px solid var(--ecde-line, #e2e8f0); border-radius: 999px; padding: 5px 14px; transition: all .15s ease; }
.ecde-photo-btn:hover { border-color: var(--ecde-blue, #1D6FB8); background: var(--ecde-cream, #FFF9EF); }
.ecde-photo-btn input[type="file"] { display: none; }

/* =========================================================================
   Portail équipe (personnel & direction) — espace front sans wp-admin
   ========================================================================= */
.ecde-staff .ecde-portal-header { background: linear-gradient(120deg, #16324F, #1D6FB8); }
.ecde-staff-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 20px; }
.ecde-staff-stat { background: #fff; border: 1px solid var(--ecde-line, #e2e8f0); border-radius: 16px; padding: 20px 16px; text-align: center; box-shadow: 0 4px 14px rgba(22,50,79,.05); }
.ecde-staff-stat-ico { font-size: 28px; display: block; margin-bottom: 6px; }
.ecde-staff-stat strong { display: block; font-family: var(--cd-font-display, 'Baloo 2', sans-serif); font-size: 30px; color: var(--ecde-blue, #1D6FB8); line-height: 1; }
.ecde-staff-stat span:last-child { display: block; margin-top: 4px; color: #64748b; font-size: 13px; font-weight: 700; }

.ecde-staff-quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.ecde-staff-quick-card { display: flex; flex-direction: column; align-items: center; gap: 8px; background: #fff; border: 1.5px solid var(--ecde-line, #e2e8f0); border-radius: 14px; padding: 20px 14px; text-decoration: none; color: var(--ecde-navy, #16324F); font-weight: 700; font-size: 14px; text-align: center; transition: all .16s ease; }
.ecde-staff-quick-card:hover { border-color: var(--ecde-blue, #1D6FB8); transform: translateY(-3px); box-shadow: 0 10px 24px rgba(22,50,79,.1); }
.ecde-staff-quick-card .dashicons { font-size: 26px; width: 26px; height: 26px; color: var(--ecde-orange, #F59E2D); }

.ecde-staff-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.ecde-staff-table th { text-align: left; font-size: 12.5px; text-transform: uppercase; letter-spacing: .03em; color: #8296a9; padding: 8px 10px; border-bottom: 2px solid var(--ecde-line, #e2e8f0); }
.ecde-staff-table td { padding: 10px; border-bottom: 1px solid #f1f5f9; font-size: 14px; }
.ecde-staff-table tbody tr:hover { background: var(--ecde-cream, #FFF9EF); }

/* Écrans admin réutilisés dans le front : neutralisation du chrome WP. */
.ecde-staff-embed .wrap { margin: 0; max-width: 100%; }
.ecde-staff-embed h1 { font-family: var(--cd-font-display, 'Baloo 2', sans-serif); font-size: 21px; color: var(--ecde-navy, #16324F); margin: 0 0 14px; padding: 0; }
.ecde-staff-embed .notice { border-radius: 10px; margin: 0 0 14px; }
.ecde-staff-embed .button-primary { background: var(--ecde-blue, #1D6FB8); border-color: var(--ecde-blue, #1D6FB8); border-radius: 999px; padding: 8px 22px; height: auto; font-weight: 700; }
.ecde-staff-embed .button { border-radius: 999px; }

/* Liste avec action alignée à droite (enfants rattachés). */
.ecde-linked-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ecde-linked-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--ecde-cream, #FFF9EF); border-radius: 10px; padding: 10px 14px; font-size: 14px; }
.ecde-linked-list form { margin: 0; }
.ecde-unlink-btn { background: none; border: 1.5px solid #e2e8f0; color: #b32d2e; border-radius: 999px; padding: 4px 14px; font-size: 12.5px; font-weight: 700; cursor: pointer; transition: all .15s ease; }
.ecde-unlink-btn:hover { border-color: #b32d2e; background: #fdf2f2; }
.ecde-count { color: #8296a9; font-weight: 400; font-size: 13px; }

/* =========================================================================
   v1.12 — Espace équipe : lisibilité des onglets et des écrans intégrés
   ========================================================================= */

/* --- Bouton Déconnexion sur l'en-tête coloré ---------------------------
   Le HTML utilise .ecde-btn-ghost : sans cette règle, le bouton reste
   bleu sur fond bleu et devient invisible. */
.ecde-portal-header .ecde-btn-ghost,
.ecde-portal-header .ecde-logout {
	background: rgba(255, 255, 255, .16) !important;
	color: #fff !important;
	border-color: rgba(255, 255, 255, .55) !important;
	backdrop-filter: blur(2px);
}
.ecde-portal-header .ecde-btn-ghost:hover,
.ecde-portal-header .ecde-logout:hover {
	background: #fff !important;
	color: var(--ecde-blue, #1D6FB8) !important;
	border-color: #fff !important;
}

/* --- Onglets : passage à la ligne au lieu du défilement horizontal ----- */
@media (min-width: 980px) {
	.ecde-portal-tabs {
		flex-wrap: wrap;
		overflow-x: visible;
		gap: 8px;
		padding-bottom: 0;
	}
	.ecde-portal-tab {
		padding: 10px 18px;
		transition: border-color .15s ease, color .15s ease, transform .15s ease;
	}
	.ecde-portal-tab:hover:not(.is-active) {
		border-color: var(--ecde-blue, #1D6FB8);
		color: var(--ecde-blue, #1D6FB8);
		transform: translateY(-1px);
	}
	.ecde-portal-tab.is-active {
		box-shadow: 0 6px 16px rgba(29, 111, 184, .28);
	}
}

/* --- Écrans d'administration intégrés dans le front ------------------- */
.ecde-staff-embed h2,
.ecde-staff-embed h3 {
	font-family: var(--cd-font-display, 'Baloo 2', sans-serif);
	color: var(--ecde-navy, #16324F);
	margin: 22px 0 12px;
	font-size: 18px;
}
.ecde-staff-embed h1 + h2 { margin-top: 6px; }
.ecde-staff-embed p { color: #51677d; font-size: 14.5px; line-height: 1.6; }
.ecde-staff-embed .form-table th { color: var(--ecde-navy, #16324F); font-weight: 700; }

/* Champs : même style que le reste du portail. */
.ecde-staff-embed input[type="text"],
.ecde-staff-embed input[type="email"],
.ecde-staff-embed input[type="number"],
.ecde-staff-embed input[type="date"],
.ecde-staff-embed input[type="time"],
.ecde-staff-embed input[type="month"],
.ecde-staff-embed input[type="search"],
.ecde-staff-embed select,
.ecde-staff-embed textarea {
	border: 1.5px solid var(--ecde-line, #e2e8f0);
	border-radius: 10px;
	padding: 9px 12px;
	font-size: 14.5px;
	background: #fff;
	box-shadow: none;
	min-height: 40px;
	max-width: 100%;
}
.ecde-staff-embed input:focus,
.ecde-staff-embed select:focus,
.ecde-staff-embed textarea:focus {
	border-color: var(--ecde-blue, #1D6FB8);
	outline: 2px solid rgba(29, 111, 184, .18);
}
.ecde-staff-embed .button,
.ecde-staff-embed .button-secondary {
	border-radius: 999px;
	border: 1.5px solid var(--ecde-line, #e2e8f0);
	background: #fff;
	color: var(--ecde-navy, #16324F);
	min-height: 38px;
	padding: 0 20px;
	font-weight: 700;
	box-shadow: none;
}
.ecde-staff-embed .button:hover { border-color: var(--ecde-blue, #1D6FB8); color: var(--ecde-blue, #1D6FB8); }

/* Tableaux WordPress intégrés. */
.ecde-staff-embed table.widefat,
.ecde-staff-embed table.wp-list-table {
	border: 1px solid var(--ecde-line, #e2e8f0);
	border-radius: 12px;
	overflow: hidden;
	box-shadow: none;
}
.ecde-staff-embed table.widefat thead th {
	background: #f8fafc;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: #8296a9;
}
.ecde-staff-embed table.widefat td { font-size: 14px; }
.ecde-staff-embed table.widefat tbody tr:hover { background: var(--ecde-cream, #FFF9EF); }

/* Les cartes du cahier de vie gardent leur bande de couleur. */
.ecde-staff-embed .ecde-journal-card {
	background: #fff;
	border: 1px solid var(--ecde-line, #e2e8f0);
	border-left: 5px solid var(--ecde-blue, #1D6FB8);
	border-radius: 14px;
	padding: 18px 20px;
	margin-bottom: 14px;
}
.ecde-staff-embed .ecde-journal-card h2 {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 17px;
	margin: 0 0 12px;
	padding-bottom: 10px;
	border-bottom: 1px dashed #eef2f6;
}
.ecde-staff-embed .ecde-moods { display: flex; gap: 8px; flex-wrap: wrap; }
.ecde-staff-embed .ecde-mood { position: relative; cursor: pointer; }
.ecde-staff-embed .ecde-mood input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.ecde-staff-embed .ecde-mood span {
	display: inline-flex; align-items: center; justify-content: center;
	width: 44px; height: 44px; font-size: 24px;
	border: 2px solid var(--ecde-line, #e2e8f0); border-radius: 12px; background: #fff;
	transition: transform .12s ease, border-color .12s ease;
}
.ecde-staff-embed .ecde-mood span:hover { transform: scale(1.1); border-color: var(--ecde-orange, #F59E2D); }
.ecde-staff-embed .ecde-mood input:checked + span {
	border-color: var(--ecde-orange, #F59E2D);
	background: #fff7ed;
	box-shadow: 0 0 0 3px rgba(245, 158, 45, .18);
}
.ecde-staff-embed .ecde-journal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px 18px; }
.ecde-staff-embed .ecde-journal-grid > div > label,
.ecde-staff-embed .ecde-journal-card label { display: block; font-weight: 700; font-size: 13px; color: var(--ecde-navy, #16324F); margin-bottom: 5px; }
.ecde-staff-embed .ecde-nap { display: flex; align-items: center; gap: 8px; }
.ecde-staff-embed .ecde-savebar {
	position: sticky; bottom: 0; z-index: 20;
	display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
	background: #fff; border: 1px solid var(--ecde-line, #e2e8f0);
	border-radius: 14px; padding: 14px 18px; margin-top: 16px;
	box-shadow: 0 -6px 20px rgba(22, 50, 79, .1);
}
.ecde-staff-embed .ecde-savebar .button-primary {
	background: var(--ecde-blue, #1D6FB8); border-color: var(--ecde-blue, #1D6FB8);
	color: #fff; border-radius: 999px; min-height: 42px; padding: 0 26px; font-size: 14.5px;
}
.ecde-staff-embed .ecde-savebar-hint { color: #64748b; font-size: 13px; }
.ecde-staff-embed .ecde-journal-filters,
.ecde-staff-embed .ecde-filters-bar {
	display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
	background: var(--ecde-cream, #FFF9EF); border: 1px solid #f2e6cf;
	border-radius: 12px; padding: 12px 16px; margin: 0 0 18px;
}
.ecde-staff-embed .ecde-count-pill {
	margin-left: auto; background: #eef4fb; color: var(--ecde-blue, #1D6FB8);
	font-weight: 700; font-size: 12.5px; border-radius: 999px; padding: 5px 14px;
}

/* Statut WhatsApp visible aussi dans les fils intégrés au portail équipe. */
.ecde-wa-badge { font-size: 11.5px; font-weight: 700; margin-left: 6px; white-space: nowrap; }

/* ---- Onglet Galerie du portail ---- */
.ecde-gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-top: 14px; }
.ecde-gal-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--ecde-line, #e2e8f0); border-radius: 14px; overflow: hidden; text-decoration: none !important; color: inherit; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.ecde-gal-card:hover { transform: translateY(-3px); border-color: var(--ecde-blue, #1D6FB8); box-shadow: 0 12px 26px rgba(22, 50, 79, .12); }
.ecde-gal-thumb { position: relative; display: block; aspect-ratio: 4/3; background: var(--ecde-cream, #FFF9EF); overflow: hidden; }
.ecde-gal-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.ecde-gal-card:hover .ecde-gal-thumb img { transform: scale(1.06); }
.ecde-gal-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 34px; }
.ecde-gal-lock { position: absolute; top: 8px; right: 8px; background: rgba(22, 50, 79, .78); color: #fff; border-radius: 999px; padding: 3px 9px; font-size: 12px; }
.ecde-gal-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 3px; }
.ecde-gal-body strong { font-family: var(--cd-font-display, 'Baloo 2', sans-serif); font-size: 15px; color: var(--ecde-navy, #16324F); line-height: 1.25; }
.ecde-gal-counts { font-size: 12.5px; color: var(--ecde-orange, #F59E2D); font-weight: 700; }
.ecde-gal-term { font-size: 12px; color: #8296a9; }
@media (max-width: 520px) { .ecde-gal-grid { grid-template-columns: 1fr 1fr; gap: 10px; } }

/* ---- Zone de téléversement façon galerie (espace équipe) ---- */
.ecde-dropzone { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; border: 2.5px dashed var(--ecde-line, #e2e8f0); border-radius: 16px; padding: 30px 20px; cursor: pointer; background: var(--ecde-cream, #FFF9EF); transition: border-color .16s ease, background .16s ease; }
.ecde-dropzone:hover, .ecde-dropzone.is-over { border-color: var(--ecde-blue, #1D6FB8); background: #f4f9ff; }
.ecde-dz-ico { font-size: 36px; }
.ecde-dropzone strong { color: var(--ecde-navy, #16324F); font-size: 15.5px; }
.ecde-dz-hint { color: #64748b; font-size: 13px; }
.ecde-dropzone input[type="file"] { display: none; }
.ecde-dz-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ecde-dz-item { width: 74px; height: 74px; border-radius: 10px; overflow: hidden; background: #fff; border: 1px solid var(--ecde-line, #e2e8f0); display: flex; align-items: center; justify-content: center; font-size: 26px; }
.ecde-dz-item img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Contenu de l'album (gestion) ---- */
.ecde-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-top: 12px; }
.ecde-media-cell { position: relative; margin: 0; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--ecde-cream, #FFF9EF); border: 1px solid var(--ecde-line, #e2e8f0); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.ecde-media-cell img { width: 100%; height: 100%; object-fit: cover; }
.ecde-media-cell.is-video { padding: 10px; }
.ecde-media-vico { font-size: 30px; }
.ecde-media-vname { font-size: 11px; color: #64748b; text-align: center; word-break: break-all; line-height: 1.2; max-height: 2.4em; overflow: hidden; }
.ecde-media-badge { position: absolute; left: 6px; bottom: 6px; background: rgba(29, 111, 184, .9); color: #fff; font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 2px 8px; }
.ecde-media-cell form { position: absolute; top: 5px; right: 5px; margin: 0; }
.ecde-media-x { width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(179, 45, 46, .92); color: #fff; font-size: 15px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ecde-media-x:hover { background: #b32d2e; }

/* Documents d'une facture côté parent : consultation et téléchargement. */
.ecde-invoice-docs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; justify-content: flex-end; }
.ecde-invoice-docs .ecde-btn { white-space: nowrap; }
@media (max-width: 560px) {
	.ecde-invoice-docs { justify-content: flex-start; }
	.ecde-invoice-docs .ecde-btn { flex: 1; justify-content: center; }
}

/* Responsables de l'enfant (père, mère, tuteur) dans le profil parent. */
.ecde-sep { border: 0; border-top: 1px solid var(--ecde-line, #e2e8f0); margin: 26px 0 18px; }
.ecde-guardian { border: 1px solid var(--ecde-line, #e2e8f0); border-radius: 14px; padding: 8px 18px 4px; margin: 0 0 14px; }
.ecde-guardian legend { font-family: var(--cd-font-display, 'Baloo 2', sans-serif); font-size: 14.5px; font-weight: 700; color: var(--ecde-navy, #16324F); padding: 0 8px; }
