/* Espace des Murmures - styles publics.
   Charte : orange #ff914d (principale), vert anis #b9cd1e (secondaire), puis tons chauds.
   Couleur d'accent modifiable depuis le CSS du thème :  .emu-cal, .emu-account { --emu-accent: #ff914d; } */
.emu-cal, .emu-account, .emu-pt {
	--emu-accent: #ff914d;
	--emu-accent-dark: #ea7a30;   /* survol des boutons */
	--emu-accent-text: #a94a0c;   /* orange foncé : texte sur fond clair (lisibilité) */
	--emu-on-accent: #2e1b0d;     /* texte sur fond orange */
	--emu-second: #b9cd1e;
	--emu-second-text: #5f6b06;
	--emu-bg: #ffffff;
	--emu-line: #f3dccb;
	--emu-soft: #fff4ec;
	--emu-text: #2f2a26;
	font-family: inherit;
	color: var(--emu-text);
	max-width: 100%;
}

/* Couleurs par catégorie (orange, vert anis, puis tons chauds) */
.emu-cc-0 { --emu-cat: #ff914d; }
.emu-cc-1 { --emu-cat: #b9cd1e; }
.emu-cc-2 { --emu-cat: #e8683a; }
.emu-cc-3 { --emu-cat: #f5b82e; }
.emu-cc-4 { --emu-cat: #e0574a; }
.emu-cc-5 { --emu-cat: #c98a3a; }

/* Filtres de catégories */
.emu-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.emu-filter {
	border: 1px solid var(--emu-accent); background: #fff; color: var(--emu-accent-text);
	padding: 6px 14px; border-radius: 999px; cursor: pointer; font-size: 14px;
	display: inline-flex; align-items: center; gap: 7px;
}
.emu-filter[data-ci]::before {
	content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--emu-cat, var(--emu-accent));
}
.emu-filter:hover { background: var(--emu-soft); }
.emu-filter.is-active { background: var(--emu-accent); color: var(--emu-on-accent); font-weight: 600; }

/* Sélecteur de vue : Mois / Semaine */
.emu-views { display: inline-flex; margin-bottom: 12px; border: 1px solid var(--emu-second); border-radius: 999px; overflow: hidden; }
.emu-view {
	border: 0; background: #fff; color: var(--emu-second-text); padding: 6px 18px; cursor: pointer; font-size: 14px;
}
.emu-view + .emu-view { border-left: 1px solid var(--emu-second); }
.emu-view:hover { background: #f6f9d8; }
.emu-view.is-active { background: var(--emu-second); color: #2b3103; font-weight: 600; }

/* Barre de navigation (mois ou semaine) */
.emu-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.emu-title { font-size: 1.25em; text-align: center; flex: 1; }
.emu-nav {
	border: 1px solid var(--emu-line); background: #fff; width: 40px; height: 40px; border-radius: 8px;
	font-size: 22px; line-height: 1; cursor: pointer; color: var(--emu-accent-text);
}
.emu-nav:hover { background: var(--emu-soft); }
.emu-today {
	border: 1px solid var(--emu-line); background: #fff; color: var(--emu-accent-text); height: 40px;
	padding: 0 12px; border-radius: 8px; cursor: pointer; font-size: 13px;
}
.emu-today:hover { background: var(--emu-soft); }
.emu-credits-line { margin: 0 0 10px; font-size: 14px; color: var(--emu-accent-text); }

/* Grille du mois */
.emu-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; transition: opacity .15s; }
.emu-grid.is-loading { opacity: .5; }
.emu-wd { text-align: center; font-weight: 600; font-size: 13px; padding: 4px 0; color: #8a7767; }
.emu-blank { min-height: 0; }
.emu-day {
	min-height: 84px; border: 1px solid var(--emu-line); border-radius: 8px; padding: 4px;
	background: var(--emu-bg); display: flex; flex-direction: column; gap: 3px;
}
.emu-day.is-today { border-color: var(--emu-accent); box-shadow: inset 0 0 0 1px var(--emu-accent); }
.emu-day__n { font-size: 12px; color: #9a8676; }
.emu-day__n em { display: none; font-style: normal; }
.emu-ev {
	display: block; text-align: left; width: 100%; border: 0; border-left: 4px solid var(--emu-cat, var(--emu-accent));
	background: var(--emu-soft); color: var(--emu-text); padding: 4px 6px; border-radius: 4px;
	font-size: 12px; line-height: 1.3; cursor: pointer;
}
.emu-ev:hover { background: #ffe6d3; }
.emu-ev.is-past { opacity: .55; }
.emu-ev__t { font-weight: 700; }
.emu-flag { display: block; font-size: 11px; color: var(--emu-second-text); }
.emu-flag--full { color: #b3402f; }

/* Vue semaine : une ligne par jour */
.emu-week { display: flex; flex-direction: column; gap: 8px; transition: opacity .15s; }
.emu-week.is-loading { opacity: .5; }
.emu-wday {
	display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; align-items: start;
	border: 1px solid var(--emu-line); border-radius: 10px; padding: 10px 12px; background: var(--emu-bg);
}
.emu-wday.is-today { border-color: var(--emu-accent); box-shadow: inset 0 0 0 1px var(--emu-accent); }
.emu-wday__h { font-weight: 700; text-transform: capitalize; }
.emu-wday__h small { display: block; font-weight: 400; color: #9a8676; text-transform: none; }
.emu-wday__list { display: flex; flex-direction: column; gap: 6px; }
.emu-wday__none { color: #b3a294; font-size: 14px; }
.emu-week .emu-ev { font-size: 14px; padding: 8px 10px; }
.emu-week .emu-flag { display: inline; margin-left: 6px; font-size: 12px; }
.emu-week .emu-ev__c { color: #8a7767; font-size: 12px; margin-left: 6px; }

/* Sur mobile : seules les journées avec séance sont listées */
@media (max-width: 720px) {
	.emu-grid { grid-template-columns: 1fr; }
	.emu-wd, .emu-blank, .emu-day:not(.has-ev) { display: none; }
	.emu-day { min-height: 0; padding: 8px; }
	.emu-day__n { font-size: 14px; font-weight: 600; color: var(--emu-text); }
	.emu-day__n em { display: inline; }
	.emu-ev { font-size: 15px; padding: 8px 10px; }
	.emu-flag { display: inline; margin-left: 6px; }
	.emu-grid:not(:has(.has-ev))::after { content: "Aucune séance ce mois-ci."; padding: 16px; color: #8a7767; }
	.emu-wday { grid-template-columns: 1fr; gap: 6px; }
	.emu-wday.is-empty { display: none; }
	.emu-today { padding: 0 8px; }
}

/* Fiche séance (fenêtre modale) */
.emu-modal {
	position: fixed; inset: 0; background: rgba(50, 28, 10, .55); z-index: 99999;
	display: flex; align-items: center; justify-content: center; padding: 16px;
}
.emu-modal[hidden] { display: none; }
.emu-modal__box {
	position: relative; background: #fff; border-radius: 14px; width: 100%; max-width: 480px;
	max-height: 90vh; overflow-y: auto; padding: 24px 22px; border-top: 6px solid var(--emu-accent);
}
.emu-modal__close {
	position: absolute; top: 8px; right: 12px; border: 0; background: none; font-size: 30px;
	line-height: 1; cursor: pointer; color: #9a8676;
}
.emu-modal__cat { display: inline-block; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--emu-accent-text); font-weight: 700; }
.emu-modal__box h3 { margin: 4px 0 6px; }
.emu-modal__when { margin: 0 0 4px; font-weight: 600; }
.emu-modal__places { margin: 0 0 10px; font-size: 14px; color: #6f625a; }
.emu-modal__desc { font-size: 14px; margin-bottom: 14px; }
.emu-modal__msg { padding: 10px 12px; border-radius: 8px; margin: 12px 0; font-size: 14px; }
.emu-modal__msg.is-ok { background: #f3f8cf; color: #4d5a06; }
.emu-modal__msg.is-error { background: #fdece6; color: #9c3a1a; }
.emu-ok { color: var(--emu-second-text); font-weight: 600; }
.emu-modal__actions { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.emu-login { font-size: 14px; margin: 6px 0 0; }
.emu-login a, .emu-modal__msg a { color: var(--emu-accent-text); }
html.emu-lock { overflow: hidden; }

/* Boutons et formulaire */
.emu-btn {
	display: inline-block; background: var(--emu-accent); color: var(--emu-on-accent) !important; border: 1px solid var(--emu-accent);
	padding: 10px 18px; border-radius: 8px; cursor: pointer; text-decoration: none; font-size: 15px; font-weight: 600;
}
.emu-btn:hover { background: var(--emu-accent-dark); border-color: var(--emu-accent-dark); }
.emu-btn:disabled { opacity: .6; cursor: wait; }
.emu-btn--ghost { background: #fff; color: var(--emu-accent-text) !important; }
.emu-btn--ghost:hover { background: var(--emu-soft); }
.emu-form { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.emu-form input { width: 100%; padding: 10px; border: 1px solid #e6cdb8; border-radius: 8px; font-size: 15px; box-sizing: border-box; }
.emu-form input:focus { outline: 2px solid var(--emu-second); border-color: var(--emu-second); }
.emu-form__row { display: flex; gap: 8px; }
.emu-hp { position: absolute !important; left: -9999px !important; opacity: 0; height: 0; }

/* Page Mon compte */
.emu-account h3 { margin: 24px 0 8px; }
.emu-account__solde strong { font-size: 1.6em; color: var(--emu-accent-text); }
.emu-list { list-style: none; margin: 0; padding: 0; }
.emu-list li {
	display: flex; justify-content: space-between; align-items: center; gap: 12px;
	padding: 10px 0; border-bottom: 1px solid var(--emu-line);
}

/* L'attribut hidden doit l'emporter sur display:grid / flex */
.emu-grid[hidden], .emu-week[hidden] { display: none; }

/* Boutons d'achat de carnets */
.emu-buy { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* Bouton « Acheter un carnet » (fenêtre de séance) : options déroulantes */
.emu-buyx { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; width: 100%; }
.emu-buyx__opts { display: flex; flex-wrap: wrap; gap: 8px; }
.emu-buyx__opts[hidden] { display: none; }

/* ---------- Écran de pointage ([emu_pointage]) ---------- */
.emu-pt { max-width: 900px; }
.emu-pt__top { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 12px; }
.emu-pt__pick { display: flex; flex-direction: column; gap: 4px; font-weight: 600; flex: 1; min-width: 220px; }
.emu-pt__select { width: 100%; padding: 10px; border: 1px solid #e6cdb8; border-radius: 8px; font-size: 15px; background: #fff; }
.emu-pt__msg { padding: 10px 12px; border-radius: 8px; margin: 0 0 12px; font-size: 14px; }
.emu-pt__msg[hidden] { display: none; }
.emu-pt__msg.is-ok { background: #f3f8cf; color: #4d5a06; }
.emu-pt__msg.is-error { background: #fdece6; color: #9c3a1a; }
.emu-pt__body.is-loading, .emu-pt.is-busy .emu-pt__body { opacity: .55; pointer-events: none; }
.emu-pt__head { border-left: 6px solid var(--emu-accent); padding: 4px 0 4px 12px; margin-bottom: 14px; }
.emu-pt__head h3 { margin: 2px 0 4px; }
.emu-pt__head p { margin: 0 0 2px; }
.emu-pt__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.emu-pt__row {
	display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center;
	border: 1px solid var(--emu-line); border-left: 6px solid var(--emu-line); border-radius: 10px; padding: 12px 14px; background: #fff;
}
.emu-pt__row.is-present { border-left-color: var(--emu-second); background: #fafce8; }
.emu-pt__row.is-absent { border-left-color: #e0574a; background: #fff5f3; }
.emu-pt__row.is-inscrit { border-left-color: var(--emu-accent); }
.emu-pt__badge { display: inline-block; margin-left: 8px; padding: 2px 10px; border-radius: 999px; font-size: 12px; background: #eee; }
.emu-pt__badge.is-inscrit { background: #fff0e3; color: var(--emu-accent-text); }
.emu-pt__badge.is-present { background: #eef5b4; color: #4d5a06; }
.emu-pt__badge.is-absent { background: #fde3dc; color: #9c3a1a; }
.emu-pt__tel { font-weight: 600; color: var(--emu-accent-text); }
.emu-pt__actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; max-width: 420px; }
.emu-pt__actions .emu-btn { padding: 12px 16px; }
.emu-pt__remove { border-color: #e0574a; color: #9c3a1a !important; }
.emu-pt__link { border: 0; background: none; color: var(--emu-accent-text); text-decoration: underline; cursor: pointer; font-size: 14px; padding: 6px; }
.emu-pt__confirm { flex-basis: 100%; display: flex; flex-direction: column; gap: 8px; align-items: stretch; background: var(--emu-soft); border: 1px solid var(--emu-accent); border-radius: 8px; padding: 10px; }
.emu-pt__confirm p { margin: 0; font-size: 14px; }
.emu-pt__none, .emu-pt__deny { padding: 16px; color: #6f625a; }
.emu-pt__help { margin-top: 14px; color: #6f625a; }
@media (max-width: 720px) {
	.emu-pt__row { grid-template-columns: 1fr; }
	.emu-pt__actions { justify-content: flex-start; max-width: none; }
	.emu-pt__actions .emu-btn { flex: 1 1 140px; text-align: center; }
}
