/* Espace de gestion CPJ Mbao */
:root {
	--bleu: #1F3566; --nuit: #142347; --carmin: #A3302B; --or: #D2A03A; --or-clair: #F3E3BC;
	--papier: #F4F5F9; --blanc: #fff; --encre: #18213A; --gris: #5E6785; --trait: #E1E4EE; --vert: #2E7D4F;
	--titres: Montserrat, "Segoe UI", system-ui, sans-serif; --texte: "DM Sans", "Segoe UI", system-ui, sans-serif;
	--menu: 260px; --r: 16px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.app { margin: 0; font: 400 15px/1.55 var(--texte); color: var(--encre); background: var(--papier); }
a { color: var(--bleu); }
h1, h2, h3 { font-family: var(--titres); color: var(--nuit); margin: 0; line-height: 1.2; }
h2 { font-size: 1.05rem; }
code { font-size: 0.85em; background: var(--papier); padding: 2px 6px; border-radius: 6px; }
:focus-visible { outline: 3px solid var(--or); outline-offset: 2px; }
.app-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.app-saut { position: absolute; left: 8px; top: -60px; z-index: 99; background: var(--nuit); color: #fff; padding: 10px 14px; border-radius: 8px; }
.app-saut:focus { top: 8px; }
.app-ic { flex: none; }
.app-muet { color: var(--gris); font-size: 0.88rem; }
[hidden] { display: none !important; }

/* ── Menu latéral ── */
.app-menu {
	position: fixed; inset: 0 auto 0 0; width: var(--menu); z-index: 40; display: flex; flex-direction: column; gap: 24px;
	padding: 20px 14px; background: var(--nuit); color: #C9D1E6; overflow-y: auto;
	background-image: radial-gradient(circle at 120% 0%, rgba(210, 160, 58, 0.18), transparent 45%);
}
.app-marque { display: flex; align-items: center; gap: 12px; padding: 4px 8px; text-decoration: none; color: #fff; }
.app-marque img { width: 44px; height: 44px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(210, 160, 58, 0.4); }
.app-marque span { display: grid; line-height: 1.2; }
.app-marque strong { font-family: var(--titres); font-size: 1.02rem; }
.app-marque small { color: var(--or); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; }
.app-menu nav { display: grid; gap: 4px; }
.app-lien {
	position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px;
	color: #C9D1E6; text-decoration: none; font-weight: 600; transition: background-color 0.2s, color 0.2s;
}
.app-lien:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.app-lien.is-actif { background: #fff; color: var(--nuit); box-shadow: 0 12px 24px -14px rgba(0, 0, 0, 0.6); }
.app-lien.is-actif .app-ic { color: var(--carmin); }
.app-badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; display: grid; place-items: center; background: var(--or); color: var(--nuit); font-size: 0.75rem; }
.app-menu-bas { margin-top: auto; display: grid; gap: 2px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.app-lien-discret { font-weight: 500; font-size: 0.9rem; padding: 9px 12px; }
.app-moi { display: flex; align-items: center; gap: 10px; padding: 6px 8px 12px; }
.app-moi span:last-child { display: grid; line-height: 1.25; min-width: 0; }
.app-moi strong { color: #fff; font-size: 0.92rem; }
.app-moi small { color: #8F9BBB; font-size: 0.76rem; }

/* ── Zone principale ── */
.app-principal { margin-left: var(--menu); min-height: 100vh; }
.app-entete {
	position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
	padding: 18px clamp(16px, 3vw, 36px); background: rgba(244, 245, 249, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--trait);
}
.app-entete h1 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); flex: 1; min-width: 0; }
.app-entete-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.app-burger { display: none; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--trait); background: #fff; color: var(--nuit); cursor: pointer; place-items: center; }
.app-contenu { padding: clamp(16px, 3vw, 36px); display: grid; gap: 20px; align-content: start; max-width: 1400px; outline: none; }
.app-bonjour { margin: 0; font-family: var(--titres); font-weight: 700; font-size: 1.15rem; color: var(--nuit); }
.app-intro { margin: 0; color: var(--gris); max-width: 70ch; }

/* ── Boutons ── */
.app-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 999px;
	border: 1.5px solid transparent; background: var(--bleu); color: #fff; font: 700 0.88rem/1.2 var(--titres); text-decoration: none; cursor: pointer;
	transition: transform 0.15s, background-color 0.2s, box-shadow 0.2s; white-space: nowrap;
}
.app-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 18px -12px rgba(20, 35, 71, 0.7); }
.app-btn .app-ic { width: 18px; height: 18px; }
.app-btn-carmin { background: var(--carmin); }
.app-btn-carmin:hover { background: #87251F; }
.app-btn-vert { background: var(--vert); }
.app-btn-clair { background: #fff; color: var(--nuit); border-color: var(--trait); }
.app-btn-clair:hover { border-color: var(--or); }
.app-btn-danger { background: #fff; color: var(--carmin); border-color: #F0C9C5; }
.app-btn-danger:hover { background: #FDF1F0; }
.app-btn-petit { padding: 7px 13px; font-size: 0.8rem; }
.app-btn-large { width: 100%; padding: 13px 20px; font-size: 0.95rem; }
.app-btn-plein { width: 100%; }
.app-inline { display: inline-flex; margin: 0; }
.app-lien-fleche { font-weight: 700; color: var(--carmin); text-decoration: none; font-size: 0.88rem; white-space: nowrap; }
.app-lien-fleche:hover { text-decoration: underline; }

/* ── Messages ── */
.app-flash { padding: 13px 16px; border-radius: 12px; border: 1px solid; font-weight: 500; animation: app-entree 0.35s ease-out; }
.app-flash-succes { background: #EAF6EF; border-color: #BFE3CD; color: #1E5C38; }
.app-flash-erreur { background: #FDF1F0; border-color: #F0C9C5; color: #7E241F; }
.app-flash-info { background: #FFF7E3; border-color: #F1DFAF; color: #6B5320; line-height: 1.7; }
@keyframes app-entree { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ── Cartes ── */
.app-carte { background: #fff; border: 1px solid var(--trait); border-radius: var(--r); padding: 20px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.app-carte-tete { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.app-carte-liste { padding: 6px; }
.app-lien-carte { text-decoration: none; font-weight: 700; color: var(--carmin); padding: 16px 20px; }
.app-lien-carte:hover { border-color: var(--or); }
.app-grille-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 20px; }
.app-vide { padding: 40px 20px; text-align: center; background: #fff; border: 1px dashed var(--trait); border-radius: var(--r); color: var(--gris); }
.app-vide h2 { margin-bottom: 12px; }

/* Chiffres */
.app-chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; }
.app-chiffre {
	position: relative; overflow: hidden; display: grid; gap: 4px; padding: 18px 20px; border-radius: var(--r); background: #fff; border: 1px solid var(--trait);
	text-decoration: none; color: var(--gris); transition: transform 0.2s, box-shadow 0.2s;
}
.app-chiffre::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--bleu); }
.app-chiffre:hover { transform: translateY(-3px); box-shadow: 0 18px 30px -22px rgba(20, 35, 71, 0.6); }
.app-chiffre strong { font: 800 2rem/1 var(--titres); color: var(--nuit); }
.app-chiffre-alerte::before { background: var(--or); }
.app-chiffre-alerte strong { color: var(--carmin); }
.app-chiffre-vert::before { background: var(--vert); }
.app-chiffre-or::before { background: var(--carmin); }

/* Listes */
.app-liste { list-style: none; margin: 0; padding: 0; display: grid; }
.app-liste > li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 12px; }
.app-liste > li + li { border-top: 1px solid var(--trait); }
.app-liste > li:hover { background: var(--papier); }
.app-liste-lien { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; min-width: 0; flex: 1; }
.app-liste-lien > span:last-child { display: grid; min-width: 0; }
.app-liste-lien strong { color: var(--nuit); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-liste-lien small { color: var(--gris); font-size: 0.82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-avatar { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--bleu); color: #fff; font: 700 0.9rem var(--titres); }
.app-avatar-or { background: var(--or-clair); color: #6B5320; }
.app-avatar-grand { width: 72px; height: 72px; font-size: 1.4rem; box-shadow: 0 0 0 5px var(--or-clair); }
.app-type { flex: none; padding: 4px 10px; border-radius: 999px; font: 700 0.7rem var(--titres); letter-spacing: 0.04em; text-transform: uppercase; background: var(--papier); color: var(--bleu); }
.app-type-jeune { background: #E6EDFA; color: var(--bleu); }
.app-type-cadre { background: #EAF6EF; color: var(--vert); }
.app-type-partenaire { background: var(--or-clair); color: #6B5320; }
.app-type-question { background: #F3E8F7; color: #7A3A93; }
.app-type-candidature { background: #FDF1F0; color: var(--carmin); }

/* Pastilles de statut */
.app-pastille { display: inline-block; padding: 4px 11px; border-radius: 999px; font: 700 0.74rem var(--titres); white-space: nowrap; }
.app-pastille-en_attente { background: #FFF2D1; color: #8A5A00; }
.app-pastille-actif { background: #DFF3E7; color: #1E6B3E; }
.app-pastille-inactif { background: #ECEEF3; color: var(--gris); }

/* Barres de répartition */
.app-onglets-mini { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--papier); justify-self: start; }
.app-onglets-mini button { border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; font: 700 0.8rem var(--titres); color: var(--gris); cursor: pointer; }
.app-onglets-mini button.is-actif { background: var(--bleu); color: #fff; }
.app-barres { display: grid; gap: 6px; }
.app-barre { display: grid; grid-template-columns: minmax(0, 170px) 1fr 34px; align-items: center; gap: 12px; padding: 6px 8px; border-radius: 10px; text-decoration: none; color: var(--encre); }
.app-barre:hover { background: var(--papier); }
.app-barre span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9rem; }
.app-barre i { height: 10px; border-radius: 99px; background: var(--papier); overflow: hidden; }
.app-barre b { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--or), var(--carmin)); }
.app-barre strong { text-align: right; font-family: var(--titres); }

/* ── Liste des membres ── */
.app-onglets { display: flex; gap: 6px; flex-wrap: wrap; }
.app-onglets a { padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--trait); text-decoration: none; color: var(--gris); font: 700 0.85rem var(--titres); }
.app-onglets a b { margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: var(--papier); color: var(--encre); font-size: 0.74rem; }
.app-onglets a.is-actif { background: var(--nuit); border-color: var(--nuit); color: #fff; }
.app-onglets a.is-actif b { background: var(--or); color: var(--nuit); }
.app-filtres { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px; background: #fff; border: 1px solid var(--trait); border-radius: var(--r); }
.app-recherche { flex: 1 1 260px; display: flex; align-items: center; gap: 8px; padding: 0 14px; border: 1.5px solid var(--trait); border-radius: 12px; background: var(--papier); color: var(--gris); }
.app-recherche:focus-within { border-color: var(--bleu); background: #fff; }
.app-recherche input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 11px 0; font: inherit; color: var(--encre); outline: none; }
.app-form .app-champ select, .app-form .app-champ input, .app-form .app-champ textarea { width: 100%; }
.app-filtres select, .app-form select, .app-form input, .app-form textarea, .app-lot select, .app-equipe-role select {
	font: inherit; color: var(--encre); padding: 10px 12px; border: 1.5px solid var(--trait); border-radius: 12px; background-color: #fff; min-height: 44px; max-width: 100%;
}
.app-filtres select { flex: 0 1 200px; }
.app-resultat { margin: 0; color: var(--gris); font-weight: 600; }
.app-lot { position: sticky; top: 76px; z-index: 5; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 14px; margin-bottom: 10px; border-radius: 14px; background: var(--nuit); color: #fff; font-weight: 600; box-shadow: 0 16px 30px -20px rgba(0, 0, 0, 0.7); }
.app-lot select { min-height: 36px; padding: 6px 10px; }
.app-tableau-defile { overflow-x: auto; background: #fff; border: 1px solid var(--trait); border-radius: var(--r); }
.app-tableau { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.app-tableau th { text-align: left; padding: 12px 14px; font: 700 0.72rem var(--titres); letter-spacing: 0.06em; text-transform: uppercase; color: var(--gris); border-bottom: 1px solid var(--trait); white-space: nowrap; }
.app-tableau td { padding: 12px 14px; border-bottom: 1px solid var(--trait); vertical-align: middle; }
.app-tableau tbody tr:last-child td { border-bottom: 0; }
.app-tableau tbody tr:hover { background: #FAFBFD; }
.app-tableau td a { text-decoration: none; }
.app-col-case { width: 44px; }
.app-col-case input, .app-case input { width: 18px; height: 18px; accent-color: var(--bleu); }
.app-col-action { text-align: right; }
.app-membre { display: flex; align-items: center; gap: 12px; color: inherit; }
.app-membre span:last-child { display: grid; line-height: 1.3; }
.app-membre strong { color: var(--nuit); }
.app-membre small { color: var(--gris); font-size: 0.8rem; }
.app-pages { display: flex; gap: 6px; flex-wrap: wrap; }
.app-pages a { min-width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: #fff; border: 1px solid var(--trait); text-decoration: none; font-weight: 700; color: var(--encre); }
.app-pages a.is-actif { background: var(--nuit); color: #fff; border-color: var(--nuit); }
@media (max-width: 860px) {
	.app-tableau-defile { background: transparent; border: 0; }
	.app-tableau thead { display: none; }
	.app-tableau, .app-tableau tbody, .app-tableau tr, .app-tableau td { display: block; width: 100%; }
	.app-tableau tr { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; padding: 14px; margin-bottom: 10px; background: #fff; border: 1px solid var(--trait); border-radius: var(--r); }
	.app-tableau td { padding: 0; border: 0; font-size: 0.85rem; }
	.app-tableau td[data-label]:not(.app-col-membre)::before { content: attr(data-label); display: block; font: 700 0.66rem var(--titres); letter-spacing: 0.06em; text-transform: uppercase; color: var(--gris); }
	.app-tableau .app-col-membre { grid-column: 1 / -1; padding: 0 30px 8px 0; margin-bottom: 4px; border-bottom: 1px solid var(--trait); }
	.app-tableau .app-col-case { position: absolute; top: 14px; right: 12px; width: auto; }
	.app-tableau .app-col-action { grid-column: 1 / -1; text-align: left; padding-top: 6px; }
}

/* ── Fiche ── */
.app-fiche { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
@media (max-width: 1080px) { .app-fiche { grid-template-columns: minmax(0, 1fr); } }
.app-fiche-cote { display: grid; gap: 16px; }
.app-form { gap: 16px; }
.app-form h2 { padding-top: 6px; }
.app-form h2:not(:first-of-type) { border-top: 1px solid var(--trait); padding-top: 18px; }
.app-grille-champs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
@media (max-width: 640px) { .app-grille-champs { grid-template-columns: minmax(0, 1fr); } }
.app-champ { display: grid; gap: 6px; min-width: 0; }
.app-champ > span { font: 600 0.82rem var(--titres); color: var(--encre); }
.app-champ em { color: var(--carmin); font-style: normal; }
.app-champ small { font-weight: 400; color: var(--gris); }
.app-form input:focus, .app-form select:focus, .app-form textarea:focus, .app-filtres select:focus { outline: none; border-color: var(--bleu); box-shadow: 0 0 0 4px rgba(31, 53, 102, 0.12); }
.app-form input[readonly], .app-form textarea[readonly], .app-form select:disabled { background: var(--papier); color: var(--encre); }
.app-form textarea { resize: vertical; }
.app-form-actions { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 6px; }
.app-case { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; color: var(--gris); cursor: pointer; }
.app-carte-identite { justify-items: center; text-align: center; }
.app-carte-identite > strong { font: 800 1.15rem var(--titres); color: var(--nuit); }
.app-carte-identite dl { width: 100%; margin: 4px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; text-align: left; font-size: 0.88rem; }
.app-carte-identite dt { color: var(--gris); }
.app-carte-identite dd { margin: 0; text-align: right; font-weight: 600; }
.app-contact-rapide { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.app-carte-identite form, .app-carte-identite .app-btn-large { width: 100%; }
.app-zone-danger { margin: 0; padding: 14px; border: 1px dashed #F0C9C5; border-radius: var(--r); text-align: center; }
.app-donnees { display: grid; grid-template-columns: minmax(120px, auto) 1fr; gap: 10px 18px; margin: 0; }
.app-donnees dt { color: var(--gris); font-size: 0.88rem; }
.app-donnees dd { margin: 0; font-weight: 600; }
.app-message { margin: 0; padding: 14px 16px; border-left: 4px solid var(--or); background: var(--papier); border-radius: 0 12px 12px 0; }

/* Équipe */
.app-equipe-ligne { flex-wrap: wrap; }
.app-equipe-role select { min-height: 36px; padding: 6px 10px; }
.app-roles-aide dl { margin: 0; display: grid; gap: 4px; font-size: 0.88rem; }
.app-roles-aide dt { font-weight: 700; color: var(--nuit); margin-top: 8px; }
.app-roles-aide dd { margin: 0; color: var(--gris); }

/* ── Connexion ── */
body.app-connexion { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--nuit); background-image: radial-gradient(circle at 85% 10%, rgba(210, 160, 58, 0.22), transparent 40%), radial-gradient(circle at 10% 90%, rgba(163, 48, 43, 0.25), transparent 45%); }
.app-connexion-boite { width: min(420px, 100%); display: grid; gap: 16px; padding: 32px 28px; border-radius: 24px; background: #fff; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.7); text-align: center; }
.app-connexion-logo { width: 96px; height: 96px; margin: -80px auto 0; border-radius: 50%; box-shadow: 0 0 0 6px #fff, 0 0 0 10px rgba(210, 160, 58, 0.5); }
.app-connexion h1 { font-size: 1.5rem; }
.app-connexion-sous { margin: -8px 0 4px; color: var(--gris); font-size: 0.88rem; }
.app-connexion .app-form { text-align: left; }
.app-connexion-liens { margin: 0; font-size: 0.86rem; color: var(--gris); }

/* ── Mobile : menu en tiroir ── */
.app-voile { display: none; }
@media (max-width: 960px) {
	.app-menu { transform: translateX(-100%); transition: transform 0.3s ease; box-shadow: 20px 0 40px -20px rgba(0, 0, 0, 0.6); }
	.app-menu-ouvert .app-menu { transform: none; }
	.app-menu-ouvert .app-voile { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(20, 35, 71, 0.45); }
	.app-principal { margin-left: 0; }
	.app-burger { display: grid; }
	.app-entete-actions { width: 100%; }
	.app-entete-actions .app-btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ── Cotisations ── */
.app-pastille-retard { background: #FDE7E5; color: #9B2C25; }
.app-progres { display: grid; gap: 8px; }
.app-progres-barre { height: 12px; border-radius: 99px; background: var(--papier); overflow: hidden; }
.app-progres-barre span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--or), var(--vert)); transition: width 0.6s ease; }
.app-progres p { margin: 0; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; color: var(--gris); font-size: 0.9rem; }
.app-progres strong { font-family: var(--titres); color: var(--nuit); font-size: 1.05rem; }
.app-progres b { margin-left: auto; font-family: var(--titres); color: var(--vert); }
.app-campagnes { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr)); }
.app-campagne { text-decoration: none; color: inherit; transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; }
.app-campagne:hover { transform: translateY(-3px); border-color: var(--or); box-shadow: 0 18px 30px -22px rgba(20, 35, 71, 0.6); }
.app-campagne p { margin: 0; }
.app-cotis-compteurs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.86rem; color: var(--gris); }
.app-cotis-compteurs b { color: var(--nuit); font-family: var(--titres); }
.app-campagnes-mini { grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.app-campagne-mini { display: grid; gap: 8px; padding: 14px; border-radius: 12px; background: var(--papier); text-decoration: none; color: inherit; }
.app-campagne-mini:hover { outline: 2px solid var(--or); }
.app-campagne-mini strong { color: var(--nuit); font-family: var(--titres); }
.app-campagne-mini small { color: var(--gris); }
.app-campagne-tete p { margin: 0; }
.app-cotis-actions { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.app-btn-lien { border: 0; background: none; padding: 4px; color: var(--gris); font: 600 0.82rem var(--texte); text-decoration: underline; cursor: pointer; }
.app-btn-lien:hover { color: var(--nuit); }
.app-btn-lien-danger:hover { color: var(--carmin); }
.app-paiement { position: relative; }
.app-paiement summary { list-style: none; }
.app-paiement summary::-webkit-details-marker { display: none; }
.app-paiement[open] summary { background: var(--nuit); }
.app-paiement-form {
	position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; width: 280px; display: grid; gap: 10px; text-align: left;
	padding: 16px; border-radius: 14px; background: #fff; border: 1px solid var(--trait); box-shadow: 0 24px 40px -20px rgba(20, 35, 71, 0.5);
}
.app-paiement-form label { display: grid; gap: 4px; font: 600 0.78rem var(--titres); color: var(--encre); }
.app-paiement-form small { font-weight: 400; color: var(--gris); }
.app-paiement-form input, .app-paiement-form select { font: 400 0.9rem var(--texte); padding: 8px 10px; border: 1.5px solid var(--trait); border-radius: 10px; min-height: 40px; }
.app-paiement-form input:focus, .app-paiement-form select:focus { outline: none; border-color: var(--bleu); }
@media (max-width: 860px) {
	.app-tableau-cotis tr { grid-template-columns: 1fr 1fr 1fr; }
	.app-cotis-actions { justify-content: flex-start; }
	.app-paiement-form { position: static; width: 100%; margin-top: 8px; }
}

/* Reçu imprimable */
.app-recu-page { background: var(--papier); padding: 24px 16px; }
.app-recu { max-width: 640px; margin: 0 auto; padding: 32px; background: #fff; border-radius: 18px; border: 1px solid var(--trait); display: grid; gap: 18px; }
.app-recu-tete { display: flex; align-items: center; gap: 14px; padding-bottom: 16px; border-bottom: 3px solid var(--or); }
.app-recu-tete img { border-radius: 50%; }
.app-recu-tete div { display: grid; flex: 1; }
.app-recu-tete strong { font-family: var(--titres); color: var(--nuit); }
.app-recu-tete span { color: var(--gris); font-size: 0.88rem; }
.app-recu-num { margin: 0; text-align: right; color: var(--gris); font-size: 0.8rem; }
.app-recu-num b { font-family: var(--titres); color: var(--carmin); font-size: 1rem; }
.app-recu h1 { font-size: 1.4rem; }
.app-recu dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 12px 20px; }
.app-recu dt { color: var(--gris); }
.app-recu dd { margin: 0; font-weight: 600; }
.app-recu-montant { font-family: var(--titres); font-size: 1.6rem; color: var(--vert); }
.app-recu-merci { margin: 0; padding: 14px; border-radius: 12px; background: var(--or-clair); text-align: center; color: var(--nuit); }
.app-recu-pied { display: flex; gap: 10px; flex-wrap: wrap; }
@media print {
	.app-recu-page { background: #fff; padding: 0; }
	.app-recu { border: 0; padding: 0; }
	.app-recu-pied { display: none; }
}

/* Le formulaire de paiement doit pouvoir déborder du tableau */
.app-tableau-defile:has(.app-tableau-cotis) { overflow: visible; }
@media (max-width: 860px) { .app-paiement[open] { flex: 1 1 100%; order: 9; } .app-paiement[open] summary { display: inline-flex; } }

/* ── Cotisations v2 : types, cibles multiples, participants ── */
.app-form-campagne { max-width: 860px; }
.app-choix-type { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 640px) { .app-choix-type { grid-template-columns: minmax(0, 1fr); } }
.app-type-carte { position: relative; display: flex; gap: 12px; padding: 14px 16px; border: 2px solid var(--trait); border-radius: 14px; cursor: pointer; transition: border-color 0.2s, background-color 0.2s; }
.app-type-carte input { margin-top: 3px; accent-color: var(--carmin); width: 18px; height: 18px; flex: none; }
.app-type-carte span { display: grid; gap: 3px; }
.app-type-carte strong { font-family: var(--titres); color: var(--nuit); }
.app-type-carte small { color: var(--gris); font-size: 0.84rem; }
.app-type-carte:has(input:checked) { border-color: var(--carmin); background: #FDF7F6; }
.app-cibles { display: grid; gap: 14px; padding: 16px; border-radius: 14px; background: var(--papier); }
.app-cibles .app-muet { margin: 0; }
.app-puces { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.app-puces legend { width: 100%; margin-bottom: 8px; font: 700 0.78rem var(--titres); color: var(--nuit); text-transform: uppercase; letter-spacing: 0.06em; }
.app-puces label { cursor: pointer; }
.app-puces input { position: absolute; opacity: 0; pointer-events: none; }
.app-puces span { display: inline-block; padding: 7px 13px; border-radius: 999px; background: #fff; border: 1.5px solid var(--trait); font-size: 0.86rem; font-weight: 600; transition: all 0.15s; }
.app-puces input:checked + span { background: var(--nuit); border-color: var(--nuit); color: #fff; }
.app-puces input:checked + span::before { content: "✓ "; color: var(--or); }
.app-puces input:focus-visible + span { outline: 3px solid var(--or); outline-offset: 2px; }
.app-case-grande { align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: var(--papier); color: var(--encre); }
.app-case-grande small { color: var(--gris); }
.app-grille-campagne { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1080px) { .app-grille-campagne { grid-template-columns: minmax(0, 1fr); } }
.app-campagne-outils { display: grid; gap: 16px; }
.app-consignes { margin: 0; padding: 10px 14px; border-radius: 10px; background: var(--or-clair); font-size: 0.9rem; }
.app-lien-public p { margin: 0; }
.app-url { display: block; padding: 10px 12px; border-radius: 10px; background: var(--papier); overflow-wrap: anywhere; font-size: 0.85rem; }
.app-lien-public .app-contact-rapide { justify-content: flex-start; }
.app-ajout-participant summary { list-style: none; cursor: pointer; }
.app-ajout-participant summary::-webkit-details-marker { display: none; }
.app-ajout-participant[open] summary { margin-bottom: 4px; }
.app-cotis-en-ligne { display: inline-block; padding: 4px 11px; border-radius: 999px; background: #E6EDFA; color: var(--bleu); font: 700 0.74rem var(--titres); white-space: nowrap; }
.app-plus { position: relative; }
.app-plus summary { list-style: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--trait); background: #fff; cursor: pointer; font-weight: 800; color: var(--gris); }
.app-plus summary::-webkit-details-marker { display: none; }
.app-plus[open] summary { border-color: var(--nuit); color: var(--nuit); }
.app-plus-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 25; min-width: 210px; display: grid; padding: 6px; border-radius: 12px; background: #fff; border: 1px solid var(--trait); box-shadow: 0 20px 34px -18px rgba(20, 35, 71, 0.5); }
.app-plus-menu form { margin: 0; }
.app-plus-menu button { width: 100%; text-align: left; padding: 9px 12px; border: 0; border-radius: 8px; background: none; font: 600 0.86rem var(--texte); color: var(--encre); cursor: pointer; }
.app-plus-menu button:hover { background: var(--papier); }
.app-plus-menu .app-plus-danger { color: var(--carmin); }
@media (max-width: 860px) { .app-plus-menu { left: 0; right: auto; } }

/* ── Cotisations : cartes et détail (v3) ── */
.app-campagnes { grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 20px; }
.app-cc { display: flex; flex-direction: column; overflow: hidden; border-radius: 20px; background: #fff; border: 1px solid var(--trait); text-decoration: none; color: inherit; transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s; }
.app-cc:hover { transform: translateY(-4px); border-color: transparent; box-shadow: 0 26px 44px -26px rgba(20, 35, 71, 0.55); }
.app-cc-media { position: relative; }
.app-couverture { aspect-ratio: 16 / 10; overflow: hidden; background: var(--nuit); }
.app-couverture img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.app-cc:hover .app-couverture img { transform: scale(1.05); }
/* Affiche entière sur un fond flou tiré d'elle-même : rien n'est rogné, quel que soit son format. */
.app-affiche-floue { position: relative; isolation: isolate; }
.app-affiche-floue::before { content: ""; position: absolute; inset: -24px; z-index: -1; background: var(--fond) center / cover; filter: blur(22px) saturate(1.2) brightness(0.62); }
.app-affiche-floue img { position: relative; object-fit: contain; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.4)); }
.app-couverture.app-affiche-floue img { padding: 44px 0 10px; }
.app-couverture-vide, .app-cotis-hero-affiche-vide {
	display: grid; place-items: center;
	background: radial-gradient(circle at 80% 15%, rgba(210, 160, 58, 0.45), transparent 45%), radial-gradient(circle at 15% 90%, rgba(163, 48, 43, 0.5), transparent 50%), linear-gradient(135deg, var(--bleu), var(--nuit));
}
.app-couverture-vide span, .app-cotis-hero-affiche-vide span { font: 800 2.6rem var(--titres); color: rgba(255, 255, 255, 0.9); letter-spacing: 0.04em; text-shadow: 0 6px 20px rgba(0, 0, 0, 0.3); }
.app-cc-puces { display: flex; flex-wrap: wrap; gap: 6px; }
.app-cc-media .app-cc-puces { position: absolute; left: 12px; top: 12px; right: 12px; }
.app-cc-media .app-pastille, .app-cc-media .app-puce-type { box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.35); }
.app-puce-type { display: inline-block; padding: 4px 11px; border-radius: 999px; background: #fff; color: var(--nuit); font: 700 0.74rem var(--titres); }
.app-puce-ouverte { background: var(--or); color: var(--nuit); }
.app-cc-corps { display: grid; gap: 12px; padding: 18px 20px 20px; flex: 1; align-content: start; }
.app-cc-corps h2 { font-size: 1.1rem; line-height: 1.3; }
.app-cc-montant { margin: -4px 0 0; font: 800 1.45rem var(--titres); color: var(--carmin); }
.app-cc-montant small { font: 500 0.82rem var(--texte); color: var(--gris); }
.app-cc-progres { display: grid; gap: 6px; }
.app-cc-progres p { margin: 0; display: flex; gap: 6px; align-items: baseline; font-size: 0.86rem; color: var(--gris); }
.app-cc-progres strong { color: var(--nuit); font-family: var(--titres); }
.app-cc-progres b { margin-left: auto; color: var(--vert); font-family: var(--titres); }
.app-cc-stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.app-cc-stats li { display: grid; padding: 8px 10px; border-radius: 10px; background: var(--papier); font-size: 0.76rem; color: var(--gris); border-top: 3px solid; }
.app-cc-stats b { font: 800 1.15rem var(--titres); color: var(--nuit); line-height: 1.1; }
.app-cc-stats .is-vert { border-color: var(--vert); }
.app-cc-stats .is-or { border-color: var(--or); }
.app-cc-stats .is-rouge { border-color: var(--carmin); }
.app-cc-pied { margin: auto 0 0; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--trait); font-size: 0.82rem; color: var(--gris); }

/* En-tête du détail */
.app-cotis-hero {
	display: grid; grid-template-columns: 240px minmax(0, 1fr) 230px; gap: 24px; align-items: start;
	padding: 20px; border-radius: 22px; background: #fff; border: 1px solid var(--trait);
	background-image: radial-gradient(circle at 100% 0%, rgba(210, 160, 58, 0.12), transparent 40%);
}
.app-cotis-hero-affiche { border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 5; background: var(--nuit); box-shadow: 0 20px 36px -24px rgba(20, 35, 71, 0.7); }
.app-cotis-hero-affiche img { width: 100%; height: 100%; object-fit: cover; }
.app-cotis-hero-affiche.app-affiche-floue img { object-fit: contain; }
.app-cotis-hero-infos { display: grid; gap: 12px; align-content: start; min-width: 0; }
.app-cotis-hero-infos > p { margin: 0; }
.app-cotis-hero-montant { font: 800 2rem/1 var(--titres); color: var(--carmin); display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.app-cotis-hero-montant small { font: 500 0.9rem var(--texte); color: var(--gris); }
.app-cotis-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.app-cotis-hero-jauge { display: grid; gap: 8px; justify-items: center; text-align: center; padding: 16px; border-radius: 18px; background: var(--papier); }
.app-cotis-hero-jauge p { margin: 0; font-size: 0.86rem; color: var(--gris); display: grid; }
.app-cotis-hero-jauge strong { font: 800 1.2rem var(--titres); color: var(--nuit); }
.app-jauge { --p: 0; width: 132px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--vert) calc(var(--p) * 1%), #E3E6EF 0); }
.app-jauge span { width: 74%; aspect-ratio: 1; border-radius: 50%; background: #fff; display: grid; place-items: center; align-content: center; font: 600 0.9rem var(--titres); color: var(--gris); box-shadow: inset 0 0 0 1px var(--trait); }
.app-jauge b { font-size: 2rem; line-height: 1; color: var(--nuit); }
@media (max-width: 1180px) { .app-cotis-hero { grid-template-columns: 200px minmax(0, 1fr); } .app-cotis-hero-jauge { grid-column: 1 / -1; grid-template-columns: auto 1fr; justify-items: start; text-align: left; align-items: center; } .app-jauge { width: 104px; } }
@media (max-width: 640px) { .app-cotis-hero { grid-template-columns: minmax(0, 1fr); } .app-cotis-hero-affiche { aspect-ratio: 4 / 3; } .app-cotis-hero-affiche.app-affiche-floue img { padding: 14px 0; } }

/* Tuiles d'état (servent de filtres) */
.app-tuiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 860px) { .app-tuiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 480px) { .app-tuiles { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; } .app-tuiles > * { grid-column: span 2; } .app-tuiles > :nth-child(n+4) { grid-column: span 3; } }
.app-tuile { position: relative; display: grid; gap: 2px; padding: 14px 16px; border-radius: 16px; background: #fff; border: 1.5px solid var(--trait); text-decoration: none; color: var(--gris); transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; }
.app-tuile::before { content: ""; position: absolute; left: 16px; top: 16px; width: 8px; height: 8px; border-radius: 50%; background: var(--tuile, var(--bleu)); }
.app-tuile b { font: 800 1.7rem/1 var(--titres); color: var(--nuit); padding-left: 16px; }
.app-tuile span { font-size: 0.84rem; font-weight: 600; }
.app-tuile:hover { transform: translateY(-2px); border-color: var(--tuile, var(--bleu)); }
.app-tuile.is-actif { border-color: var(--tuile, var(--bleu)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tuile, var(--bleu)) 18%, transparent); }
.app-tuile-bleu { --tuile: var(--bleu); }
.app-tuile-rouge { --tuile: var(--carmin); }
.app-tuile-or { --tuile: var(--or); }
.app-tuile-vert { --tuile: var(--vert); }
.app-tuile-gris { --tuile: #9AA2BA; }
.app-grille-campagne { grid-template-columns: minmax(0, 1fr); }
.app-campagne-outils { grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); align-items: start; }
.app-campagne-outils:empty { display: none; }

/* Champ affiche du formulaire */
.app-affiche-champ { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 520px) { .app-affiche-champ { grid-template-columns: minmax(0, 1fr); } }
.app-affiche-apercu { aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; display: grid; place-items: center; background: var(--papier); border: 2px dashed var(--trait); color: var(--gris); font-size: 0.85rem; }
.app-affiche-apercu img { width: 100%; height: 100%; object-fit: cover; }
.app-affiche-actions { display: grid; gap: 8px; justify-items: start; }
.app-affiche-actions p { margin: 0; }
.app-fichier { position: relative; overflow: hidden; }
.app-fichier input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* Mise en avant sur l'accueil et texte du bouton */
.app-si-inscriptions { display: grid; gap: 14px; margin-top: -4px; padding-left: 18px; border-left: 3px solid var(--or); }
.app-si-inscriptions[hidden] { display: none; }
.app-bouton-choix { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.app-bouton-suggestion { font: 600 0.82rem var(--texte, inherit); padding: 6px 12px; border-radius: 999px; border: 1.5px solid var(--trait); background: #fff; color: var(--nuit); cursor: pointer; transition: all 0.15s; }
.app-bouton-suggestion:hover { border-color: var(--nuit); }
.app-bouton-suggestion.is-actif { background: var(--nuit); border-color: var(--nuit); color: #fff; }
.app-bouton-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.app-bouton-ligne input { flex: 1 1 220px; }
.app-bouton-apercu { display: inline-flex; align-items: center; padding: 11px 22px; border-radius: 999px; background: var(--or); color: var(--nuit); font: 700 0.9rem var(--titres); box-shadow: 0 8px 18px -10px rgba(210, 160, 58, 0.9); white-space: nowrap; }
.app-cotis-accueil { background: var(--or-clair, #F3E3BC); color: #7A5A12; }
.app-champ-libelle { font: 600 0.82rem var(--titres); color: var(--encre); }
.app-champ-libelle small { font-weight: 500; color: var(--gris); }
