/* ============================================================
   Portail — coque commune de l'espace membre et de l'administration
   Inspirée de la coque des portails ecolesn : barre du haut en dégradé,
   catégories en pastilles, sous-sections, en-tête de page.
   ============================================================ */
@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  --p-night: #0B1A15;
  --p-dark: #0E2A21;
  --p-forest: #0B5641;
  --p-forest-2: #13705A;
  --p-forest-deep: #093E30;
  --p-gold: #B8923F;
  --p-gold-soft: #D9BE7C;
  --p-gold-pale: #F3E7C6;
  --p-sand: #F1E9D8;
  --p-sand-light: #FBF8F1;
  --p-ink: #13241E;
  --p-muted: #5C6963;
  --p-line: rgba(19, 36, 30, 0.11);
  --p-red: #9A3A2C;
  --p-amber: #A77019;
  --p-green: #2C7A52;
  --p-radius: 16px;
  --p-shadow: 0 1px 2px rgba(19,36,30,.04), 0 6px 20px rgba(19,36,30,.06);
  --p-ui: "Manrope", "Work Sans", "Segoe UI", sans-serif;
  --p-girih: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23E3C98A' stroke-width='.9'%3E%3Crect x='19' y='19' width='26' height='26'/%3E%3Crect x='19' y='19' width='26' height='26' transform='rotate%2845 32 32%29'/%3E%3Ccircle cx='32' cy='32' r='6'/%3E%3Cpath d='M0 32h13.6M50.4 32H64M32 0v13.6M32 50.4V64M0 0l9 9M64 0l-9 9M0 64l9-9M64 64l-9-9'/%3E%3C/g%3E%3C/svg%3E");
  --p-rosace: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cg fill='none' stroke='%23E3C98A' stroke-width='1.2'%3E%3Ccircle cx='100' cy='100' r='96'/%3E%3Ccircle cx='100' cy='100' r='70'/%3E%3Ccircle cx='100' cy='100' r='24'/%3E%3Crect x='44' y='44' width='112' height='112'/%3E%3Crect x='44' y='44' width='112' height='112' transform='rotate%2845 100 100%29'/%3E%3Crect x='68' y='68' width='64' height='64'/%3E%3Crect x='68' y='68' width='64' height='64' transform='rotate%2845 100 100%29'/%3E%3Cpath d='M100 4v42M100 154v42M4 100h42M154 100h42M32 32l30 30M168 32l-30 30M32 168l30-30M168 168l-30-30'/%3E%3C/g%3E%3C/svg%3E");
  --p-etoile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cg fill='%23B8923F'%3E%3Crect x='5' y='5' width='10' height='10'/%3E%3Crect x='5' y='5' width='10' height='10' transform='rotate%2845 10 10%29'/%3E%3C/g%3E%3Ccircle cx='10' cy='10' r='2.2' fill='%23FBF8F1'/%3E%3C/svg%3E");
}

/* Neutralise les anciennes mises en page à barre latérale */
body.portail .sidebar { display: none !important; }
body.portail .dashboard-layout, body.portail .admin-layout, body.portail .portail-page { display: block !important; min-height: 0 !important; }
body.portail .main-content {
  padding: 24px clamp(16px, 3vw, 32px) 64px !important;
  background: transparent !important;
  max-width: 1280px; margin: 0 auto; overflow: visible !important;
}
body.portail {
  font-family: var(--p-ui);
  background: linear-gradient(180deg, rgba(237,230,214,.55) 0, #F7F5EF 280px, #FBFAF7 100%) !important;
  min-height: 100vh;
  color: var(--p-ink);
}
body.portail h1, body.portail h2, body.portail h3 { font-family: var(--font-display, "Fraunces", Georgia, serif); }

/* ---------- Barre du haut ---------- */
.p-top {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px clamp(16px, 3vw, 28px);
  background: linear-gradient(90deg, var(--p-dark), var(--p-forest) 55%, var(--p-forest-2));
  color: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
.p-top::before { content: ""; position: absolute; top: -140px; right: -60px; width: 300px; height: 300px; border-radius: 50%; background: rgba(201,165,92,.16); filter: blur(40px); pointer-events: none; }
.p-top::after { content: ""; position: absolute; bottom: -120px; left: 25%; width: 200px; height: 200px; border-radius: 50%; background: rgba(0,0,0,.12); filter: blur(30px); pointer-events: none; }
.p-brand { display: flex; align-items: center; gap: 12px; min-width: 0; position: relative; z-index: 1; color: #fff; text-decoration: none; }
.p-brand:hover { text-decoration: none; }
.p-logo { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.1); border: 1px solid rgba(201,165,92,.45); flex-shrink: 0; }
.p-logo svg { width: 24px; height: 24px; }
.p-brand .t1 { font-weight: 800; font-size: 1.02rem; line-height: 1.15; }
.p-brand .t2 { font-size: .74rem; color: rgba(237,230,214,.85); line-height: 1.2; }
.p-role { font-size: .7rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: var(--p-gold-soft); color: var(--p-dark); }
.p-actions { display: flex; align-items: center; gap: 6px; position: relative; z-index: 1; }
.p-icon-btn { position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: #fff; opacity: .9; text-decoration: none; background: none; border: none; cursor: pointer; font-size: 1rem; }
.p-icon-btn:hover { background: rgba(255,255,255,.1); opacity: 1; text-decoration: none; }
.p-badge { position: absolute; top: 2px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--p-gold-soft); color: var(--p-dark); font-size: .66rem; font-weight: 800; display: grid; place-items: center; }
.p-user { text-align: right; line-height: 1.2; margin: 0 6px; max-width: 12rem; }
.p-user .n { font-size: .8rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-user .r { font-size: .68rem; opacity: .75; }
.p-logout { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 10px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); color: #fff; font: 600 .78rem var(--p-ui); cursor: pointer; }
.p-logout:hover { background: rgba(255,255,255,.16); }
.p-goldline { height: 2px; background: linear-gradient(90deg, transparent, var(--p-gold-soft), transparent); }

/* ---------- Catégories ---------- */
.p-cats { background: linear-gradient(180deg, rgba(237,230,214,.45), #fff); border-bottom: 1px solid rgba(169,131,46,.3); overflow-x: auto; scrollbar-width: none; }
.p-cats::-webkit-scrollbar, .p-subs::-webkit-scrollbar { display: none; }
.p-cats-in { display: flex; gap: 6px; padding: 8px clamp(10px, 2.5vw, 24px); min-width: max-content; }
.p-cat { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; font: 600 .86rem var(--p-ui); color: #4B5A54; text-decoration: none; white-space: nowrap; transition: background .15s, color .15s; }
.p-cat:hover { background: rgba(237,230,214,.8); color: var(--p-forest); text-decoration: none; }
.p-cat.actif { background: var(--p-forest); color: #fff; box-shadow: 0 1px 4px rgba(15,92,70,.35), inset 0 0 0 1px rgba(201,165,92,.4); }
.p-cat .ico { font-size: 1rem; line-height: 1; }
.p-cat.admin { margin-left: auto; }
.p-cat.admin:not(.actif) { color: var(--p-gold); }

/* ---------- Sous-sections ---------- */
.p-subs { background: rgba(237,230,214,.35); border-bottom: 1px solid rgba(237,230,214,.9); overflow-x: auto; scrollbar-width: none; }
.p-subs-in { display: flex; gap: 2px; padding: 4px clamp(10px, 2.5vw, 24px); min-width: max-content; }
.p-sub { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; margin: 2px 0; border-radius: 9px; font: 600 .78rem var(--p-ui); color: #52605A; text-decoration: none; white-space: nowrap; }
.p-sub:hover { background: #fff; color: var(--p-forest); text-decoration: none; }
.p-sub.actif { background: var(--p-forest); color: #fff; }
.p-sub .n { background: var(--p-gold-soft); color: var(--p-dark); border-radius: 999px; font-size: .64rem; font-weight: 800; padding: 1px 6px; }

/* ---------- En-tête de page ---------- */
.p-chrome { background: rgba(255,255,255,.9); backdrop-filter: blur(6px); border-bottom: 1px solid rgba(237,230,214,.9); }
.p-chrome-in { max-width: 1280px; margin: 0 auto; padding: 10px clamp(16px, 3vw, 32px); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: .82rem; color: var(--p-muted); }
.p-crumb a { color: var(--p-muted); }
.p-crumb strong { color: var(--p-ink); font-weight: 700; }
.p-date::first-letter { text-transform: uppercase; }
.p-date { display: inline-block; }

/* ---------- Composants réutilisables ---------- */
.p-hero { position: relative; overflow: hidden; border-radius: 18px; padding: clamp(20px, 3vw, 28px); color: #fff; background: linear-gradient(100deg, var(--p-dark), var(--p-forest) 60%, var(--p-forest-2)); box-shadow: 0 10px 30px rgba(15,92,70,.25); margin-bottom: 24px; }
.p-hero::before { content: ""; position: absolute; top: -60px; right: -60px; width: 280px; height: 280px; border-radius: 50%; background: rgba(201,165,92,.14); filter: blur(40px); }
.p-hero-in { position: relative; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
.p-hero .eyebrow { display: inline-block; background: var(--p-gold-soft); color: var(--p-dark); font: 800 .68rem var(--p-ui); letter-spacing: .06em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; }
.p-hero h1 { color: #fff; font-size: clamp(1.3rem, 2.6vw, 1.8rem); margin: 10px 0 4px; text-wrap: balance; }
.p-hero p { color: rgba(237,230,214,.88); margin: 0; max-width: 60ch; font-size: .92rem; }
.p-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.p-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 12px; font: 700 .8rem var(--p-ui); text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: filter .15s, background .15s; }
.p-btn:hover { text-decoration: none; filter: brightness(1.08); }
.p-btn-gold { background: var(--p-gold-soft); color: var(--p-dark); }
.p-btn-ghost { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.22); }
.p-btn-forest { background: var(--p-forest); color: #fff; }
.p-btn-line { background: #fff; color: var(--p-forest); border-color: var(--p-line); }

.p-section-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 28px 0 12px; }
.p-section-h h2 { font-size: 1.05rem; margin: 0; color: var(--p-ink); }
.p-section-h a { font-size: .8rem; font-weight: 700; color: var(--p-forest); }
.p-section-h p { margin: 2px 0 0; font-size: .82rem; color: var(--p-muted); }

.p-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.p-kpi { position: relative; display: block; background: #fff; border: 1px solid var(--p-line); border-radius: var(--p-radius); padding: 16px 18px; box-shadow: var(--p-shadow); color: inherit; text-decoration: none; overflow: hidden; }
a.p-kpi:hover { border-color: var(--p-gold-soft); text-decoration: none; }
.p-kpi .ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 1.1rem; background: rgba(15,92,70,.08); margin-bottom: 10px; }
.p-kpi .v { font: 800 1.7rem var(--p-ui); color: var(--p-forest-deep); font-variant-numeric: tabular-nums; line-height: 1.1; }
.p-kpi .l { font-size: .8rem; color: var(--p-muted); margin-top: 2px; }
.p-kpi .s { font-size: .74rem; color: var(--p-muted); margin-top: 8px; }
.p-kpi.alerte .v { color: var(--p-red); }
.p-kpi.alerte .ico { background: rgba(156,59,46,.1); }
.p-kpi.or .ico { background: rgba(201,165,92,.2); }

.p-grid-2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 900px) { .p-grid-2 { grid-template-columns: 1fr; } }
.p-card { background: #fff; border: 1px solid var(--p-line); border-radius: var(--p-radius); box-shadow: var(--p-shadow); padding: 18px 20px; }
.p-card + .p-card { margin-top: 16px; }
.p-card h3 { font-size: 1rem; margin: 0 0 4px; color: var(--p-ink); }
.p-card .sous { font-size: .8rem; color: var(--p-muted); margin: 0 0 12px; }
.p-card.bord-rouge { border-left: 4px solid var(--p-red); }
.p-card.bord-or { border-left: 4px solid var(--p-gold-soft); }
.p-card.bord-vert { border-left: 4px solid var(--p-green); }

.p-sante { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.p-sante .pastille { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 1.3rem; flex-shrink: 0; }
.p-sante.bon { background: #EEF6F1; border-color: #CFE5D8; }
.p-sante.bon .pastille { background: #D7EEE0; }
.p-sante.moyen { background: #FFF8EC; border-color: #F1DDB5; }
.p-sante.moyen .pastille { background: #F8E7C4; }
.p-sante.faible { background: #FBF0EE; border-color: #EECBC5; }
.p-sante.faible .pastille { background: #F4D6D1; }
.p-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.p-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.85); border: 1px solid var(--p-line); font-size: .76rem; font-weight: 600; color: var(--p-ink); text-decoration: none; }
a.p-chip:hover { border-color: var(--p-forest); color: var(--p-forest); text-decoration: none; }
.p-chip .pt { width: 8px; height: 8px; border-radius: 50%; }

.p-list { list-style: none; margin: 0; padding: 0; }
.p-list li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 8px; border-radius: 10px; }
.p-list li + li { border-top: 1px solid rgba(18,36,30,.06); }
.p-list a.ligne { display: flex; gap: 12px; align-items: flex-start; flex: 1; color: inherit; text-decoration: none; }
.p-list a.ligne:hover .t { color: var(--p-forest); }
.p-list .dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.p-list .t { font-weight: 600; font-size: .9rem; }
.p-list .m { font-size: .78rem; color: var(--p-muted); margin-top: 2px; }
.p-list .fin { margin-left: auto; font-size: .76rem; color: var(--p-muted); white-space: nowrap; }
.p-vide { text-align: center; padding: 22px 12px; color: var(--p-muted); font-size: .88rem; }

.p-agenda-date { width: 50px; flex-shrink: 0; text-align: center; border-radius: 10px; background: rgba(15,92,70,.07); padding: 6px 0; }
.p-agenda-date .j { font: 800 1.2rem var(--p-ui); color: var(--p-forest-deep); line-height: 1; }
.p-agenda-date .mo { font-size: .66rem; font-weight: 700; text-transform: uppercase; color: var(--p-gold); letter-spacing: .05em; }

.p-tag { display: inline-block; font: 700 .68rem var(--p-ui); padding: 2px 8px; border-radius: 999px; }
.p-tag.vert { background: #E3F1E9; color: #23694A; }
.p-tag.or { background: #F6EBD2; color: #7A5C1C; }
.p-tag.rouge { background: #F6E1DD; color: #8A3226; }
.p-tag.gris { background: #EEF0EE; color: #51605A; }

.p-skel { background: linear-gradient(90deg, #EEF0EC 25%, #F6F7F4 50%, #EEF0EC 75%); background-size: 200% 100%; border-radius: 8px; height: 14px; animation: p-shine 1.4s infinite; }
@keyframes p-shine { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .p-skel { animation: none; } }

@media (max-width: 720px) {
  .p-user, .p-logout span:last-child { display: none; }
  .p-logout { padding: 7px 10px; }
  .p-brand .t2 { display: none; }
  .p-cat.admin { margin-left: 0; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.sr-only:focus { position: fixed; top: 8px; left: 8px; width: auto; height: auto; clip: auto; background: #fff; padding: 8px 12px; z-index: 100; border-radius: 8px; }

/* ---------- Harmonisation des pages existantes ---------- */
body.portail #logout-btn { display: none !important; }
body.portail .main-content > h2:first-child, body.portail .main-content > div:first-child h2, body.portail .mod-head h2, body.portail .org-head h2 { font-size: clamp(1.35rem, 2.4vw, 1.7rem); color: var(--p-forest-deep); }
body.portail .stat-card { background: #fff !important; border: 1px solid var(--p-line) !important; border-radius: var(--p-radius) !important; box-shadow: var(--p-shadow); padding: 18px !important; }
body.portail .stat-card .stat-number { font-family: var(--p-ui) !important; font-weight: 800; }
body.portail .admin-table { background: #fff !important; border-radius: 12px !important; box-shadow: var(--p-shadow); border: 1px solid var(--p-line) !important; overflow: hidden; }
body.portail .admin-table th { background: rgba(237,230,214,.55) !important; font-family: var(--p-ui) !important; }
body.portail .btn-small, body.portail .btn-mini, body.portail .filtre { font-family: var(--p-ui) !important; border-radius: 9px !important; }
body.portail .poste, body.portail .projet, body.portail .dec, body.portail .reunion-item, body.portail .recherche-card, body.portail .ma-fonction, body.portail .pass-row, body.portail .pass-card, body.portail .carte-membre, body.portail .membre-card {
  border-radius: 12px !important; box-shadow: var(--p-shadow);
}
body.portail .modal, body.portail .fiche { border-radius: 16px !important; }
body.portail .section-title { font-family: var(--p-ui) !important; color: var(--p-gold) !important; }

/* ============================================================
   Thème « manuscrit enluminé » : émeraude, or et parchemin,
   motifs géométriques (étoile à 8 branches, entrelacs).
   ============================================================ */
body.portail {
  background:
    radial-gradient(1200px 400px at 50% -120px, rgba(217,190,124,.18), transparent 70%),
    linear-gradient(180deg, #F4EDDD 0, var(--p-sand-light) 320px, #FDFBF6 100%) !important;
}
.ic { width: 1.15em; height: 1.15em; flex-shrink: 0; vertical-align: -0.2em; }

/* Barre du haut : nuit émeraude + entrelacs dorés */
.p-top { background: linear-gradient(100deg, var(--p-night) 0%, var(--p-dark) 35%, var(--p-forest) 75%, var(--p-forest-2) 100%); padding-block: 14px; }
.p-top::before { content: ""; position: absolute; inset: 0; top: 0; right: 0; width: auto; height: auto; border-radius: 0; filter: none; background: var(--p-girih) 0 0 / 64px 64px; opacity: .13; -webkit-mask-image: linear-gradient(90deg, transparent 5%, #000 55%); mask-image: linear-gradient(90deg, transparent 5%, #000 55%); }
.p-top::after { content: ""; position: absolute; left: auto; right: 8%; bottom: auto; top: 50%; width: 170px; height: 170px; transform: translateY(-50%); border-radius: 0; filter: none; background: var(--p-rosace) center / contain no-repeat; opacity: .16; }
.p-logo { width: 44px; height: 44px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, rgba(243,231,198,.18), rgba(255,255,255,.04)); border: 1px solid rgba(217,190,124,.65); box-shadow: inset 0 0 0 3px rgba(11,26,21,.35), 0 0 0 1px rgba(217,190,124,.18); }
.p-logo svg path { stroke: var(--p-gold-soft); }
.p-brand .t1 { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 1.12rem; letter-spacing: .01em; }
.p-brand .t2 { color: var(--p-gold-soft); letter-spacing: .02em; }
.p-icon-btn { border: 1px solid transparent; }
.p-icon-btn:hover { background: rgba(217,190,124,.12); border-color: rgba(217,190,124,.3); }
.p-icon-btn .ic { width: 20px; height: 20px; color: var(--p-gold-pale); }
.p-badge { background: linear-gradient(180deg, #E9D39C, var(--p-gold)); color: var(--p-night); box-shadow: 0 0 0 2px var(--p-dark); }
.p-logout { background: rgba(217,190,124,.1); border-color: rgba(217,190,124,.35); color: var(--p-gold-pale); }
.p-logout:hover { background: rgba(217,190,124,.2); }
.p-logout .ic { width: 16px; height: 16px; }

/* Filet d'or avec étoile centrale */
.p-goldline { position: relative; height: 3px; background: linear-gradient(90deg, transparent, #8E6E2A 12%, var(--p-gold-soft) 50%, #8E6E2A 88%, transparent); }
.p-goldline::after { content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; transform: translate(-50%, -50%); background: var(--p-etoile) center / contain no-repeat; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); z-index: 2; }

/* Catégories */
.p-cats { background: linear-gradient(180deg, #FBF6EA, #FFFDF8); border-bottom: 1px solid rgba(184,146,63,.28); }
.p-cats-in { padding-block: 11px 9px; }
.p-cat { color: #3F4D47; border: 1px solid transparent; padding: 8px 16px 8px 13px; }
.p-cat .ic { width: 18px; height: 18px; color: var(--p-gold); }
.p-cat:hover { background: #F3EBD8; border-color: rgba(184,146,63,.25); }
.p-cat.actif { background: linear-gradient(180deg, var(--p-forest-2), var(--p-forest)); border-color: rgba(217,190,124,.7); box-shadow: 0 2px 8px rgba(11,86,65,.3), inset 0 1px 0 rgba(255,255,255,.12); }
.p-cat.actif .ic { color: var(--p-gold-soft); }
.p-cat.admin:not(.actif) { color: #7C5E1F; border-color: rgba(184,146,63,.35); background: rgba(243,231,198,.45); }

/* Sous-sections */
.p-subs { background: rgba(241,233,216,.55); border-bottom: 1px solid rgba(184,146,63,.18); }
.p-sub .ic { width: 16px; height: 16px; color: var(--p-gold); }
.p-sub:hover { background: #FFFDF8; }
.p-sub.actif { background: var(--p-forest); color: #FFF; box-shadow: inset 0 -2px 0 var(--p-gold-soft); }
.p-sub.actif .ic { color: var(--p-gold-soft); }
.p-sub .n { background: linear-gradient(180deg, #E9D39C, var(--p-gold-soft)); color: var(--p-night); }

.p-chrome { background: rgba(255,253,248,.92); border-bottom: 1px solid rgba(184,146,63,.15); }
.p-crumb strong { color: var(--p-forest-deep); }

/* Bandeau d'accueil : cadre enluminé */
.p-hero { border-radius: 20px; background: linear-gradient(110deg, var(--p-night) 0%, var(--p-dark) 30%, var(--p-forest) 72%, var(--p-forest-2) 100%); box-shadow: 0 18px 40px -12px rgba(11,58,44,.45); padding: clamp(24px, 3.4vw, 34px); }
.p-hero::before { top: 0; right: 0; bottom: 0; left: 0; width: auto; height: auto; border-radius: 0; filter: none; background: var(--p-girih) 0 0 / 56px 56px; opacity: .1; -webkit-mask-image: linear-gradient(100deg, transparent 20%, #000 80%); mask-image: linear-gradient(100deg, transparent 20%, #000 80%); }
.p-hero::after { content: ""; position: absolute; inset: 9px; border: 1px solid rgba(217,190,124,.38); border-radius: 13px; pointer-events: none; box-shadow: inset 0 0 0 3px rgba(11,26,21,.18), inset 0 0 0 4px rgba(217,190,124,.14); }
.p-hero-in::before { content: ""; position: absolute; right: -40px; top: 50%; width: 240px; height: 240px; transform: translateY(-50%); background: var(--p-rosace) center / contain no-repeat; opacity: .2; pointer-events: none; }
.p-hero-in { z-index: 1; }
.p-hero .eyebrow { background: linear-gradient(180deg, #EFDCA8, var(--p-gold-soft)); color: var(--p-night); box-shadow: 0 1px 0 rgba(255,255,255,.3) inset; }
.p-hero h1 { font-family: "Fraunces", Georgia, serif; font-weight: 600; letter-spacing: .005em; }
.p-hero p { color: rgba(243,231,198,.9); }
.p-btn .ic { width: 17px; height: 17px; }
.p-btn-gold { background: linear-gradient(180deg, #EFDCA8, var(--p-gold-soft) 60%, #C6A55E); color: var(--p-night); box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.p-btn-ghost { background: rgba(243,231,198,.08); border-color: rgba(217,190,124,.4); color: var(--p-gold-pale); }
.p-btn-ghost:hover { background: rgba(243,231,198,.16); }

/* Titres de section avec étoile */
.p-section-h h2 { display: flex; align-items: center; gap: 9px; font-family: "Fraunces", Georgia, serif; font-weight: 600; color: var(--p-forest-deep); }
.p-section-h h2::before { content: ""; width: 14px; height: 14px; flex-shrink: 0; background: var(--p-etoile) center / contain no-repeat; }
.p-section-h p { margin-left: 23px; }
.p-section-h a { display: inline-flex; align-items: center; gap: 4px; color: var(--p-forest); }

/* Indicateurs */
.p-kpi { border-radius: var(--p-radius); background: linear-gradient(180deg, #FFFFFF, #FFFDF8); border-color: rgba(184,146,63,.18); }
.p-kpi::after { content: ""; position: absolute; top: 0; left: 18px; right: 18px; height: 2px; background: linear-gradient(90deg, transparent, var(--p-gold-soft), transparent); opacity: .7; }
a.p-kpi:hover { border-color: rgba(184,146,63,.55); box-shadow: 0 10px 24px -8px rgba(19,36,30,.18); transform: translateY(-1px); }
.p-kpi { transition: transform .15s, box-shadow .15s, border-color .15s; }
.p-kpi .ico { width: 42px; height: 42px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #FBF1D6, #E8CF93 70%, #D2B26B); color: var(--p-forest-deep); box-shadow: inset 0 0 0 1px rgba(142,110,42,.35), 0 2px 6px rgba(142,110,42,.2); }
.p-kpi .ico .ic { width: 21px; height: 21px; }
.p-kpi.alerte .ico { background: radial-gradient(circle at 35% 30%, #FBE9E5, #EDC3BA 70%, #DDA497); color: var(--p-red); box-shadow: inset 0 0 0 1px rgba(154,58,44,.3); }
.p-kpi.or .ico { background: radial-gradient(circle at 35% 30%, #E9F4EE, #BFDDCB 70%, #9FC9B1); color: var(--p-forest-deep); box-shadow: inset 0 0 0 1px rgba(11,86,65,.25); }
.p-kpi .v { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 1.85rem; color: var(--p-forest-deep); }
.p-kpi.alerte .v { color: var(--p-red); }

/* Cartes */
.p-card { border-radius: var(--p-radius); border-color: rgba(184,146,63,.16); background: linear-gradient(180deg, #FFFFFF, #FFFEFA); }
.p-sante { position: relative; overflow: hidden; }
.p-sante::after { content: ""; position: absolute; right: -30px; bottom: -40px; width: 160px; height: 160px; background: var(--p-rosace) center / contain no-repeat; opacity: .12; filter: sepia(1) hue-rotate(-20deg); pointer-events: none; }
.p-sante .pastille { background: #FFF !important; box-shadow: inset 0 0 0 1px rgba(19,36,30,.1); }
.p-sante .pastille .ic { width: 24px; height: 24px; }
.p-sante.bon .pastille { color: var(--p-green); }
.p-sante.moyen .pastille { color: var(--p-amber); }
.p-sante.faible .pastille { color: var(--p-red); }
.p-sante.bon { background: linear-gradient(100deg, #EEF6F1, #F8FBF8); }
.p-sante.moyen { background: linear-gradient(100deg, #FFF6E6, #FFFCF5); }
.p-sante.faible { background: linear-gradient(100deg, #FAECE8, #FFF9F7); }

.p-list li { transition: background .12s; }
.p-list li:hover { background: #FBF6EA; }
.p-list .puce { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: #F4ECDA; color: var(--p-forest); }
.p-list .puce .ic { width: 16px; height: 16px; }
.p-agenda-date { background: linear-gradient(180deg, #FBF5E6, #F1E5C6); box-shadow: inset 0 0 0 1px rgba(184,146,63,.3); }
.p-agenda-date .j { font-family: "Fraunces", Georgia, serif; font-weight: 600; }
.p-agenda-date .mo { color: #8E6E2A; }

/* ---------- Journal annuel en préparation (tableau de bord) ---------- */
.p-journal { padding: 22px 24px; }
.pj-tete { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.pj-ico { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem; color: #D9BE7C;
  background: radial-gradient(circle at 35% 30%, #0B5641, #093E30); box-shadow: 0 0 0 1px rgba(184,146,63,.5), 0 0 0 5px rgba(184,146,63,.12); flex-shrink: 0; }
.pj-annee { font-family: var(--font-caption); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: #B8923F; font-weight: 700; }
.p-journal h3 { margin: 2px 0 6px; font-size: 1.35rem; }
.pj-meta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; font-size: .84rem; color: rgba(19,36,30,.65); }
.pj-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; background: rgba(19,36,30,.07); font-size: .74rem; font-weight: 600; font-family: var(--font-caption); color: rgba(19,36,30,.7); }
.pj-badge.ok { background: rgba(11,86,65,.12); color: #0B5641; }
.pj-frise { display: grid; grid-template-columns: repeat(8, 1fr); gap: 0; margin: 20px 0 8px; position: relative; }
.pj-frise::before { content: ""; position: absolute; left: 6%; right: 6%; top: 7px; height: 2px; background: rgba(184,146,63,.3); }
.pj-et { position: relative; text-align: center; padding: 0 4px; font-size: .72rem; line-height: 1.3; color: rgba(19,36,30,.6); }
.pj-et i { display: block; width: 16px; height: 16px; margin: 0 auto 8px; border-radius: 50%; background: #FBF8F1; border: 2px solid rgba(184,146,63,.55); position: relative; }
.pj-et b { display: block; font-weight: 600; color: rgba(19,36,30,.8); }
.pj-et span { font-family: var(--font-caption); }
.pj-et.fait i { background: #0B5641; border-color: #0B5641; }
.pj-et.cours i { background: #B8923F; border-color: #B8923F; box-shadow: 0 0 0 4px rgba(184,146,63,.2); }
.pj-et.cours b { color: #0B5641; }
.pj-et.retard i { border-color: #9C3B2E; background: #9C3B2E22; }
.pj-et.retard span { color: #9C3B2E; }
.pj-bas { font-size: .84rem; color: rgba(19,36,30,.7); margin-top: 6px; }
.pj-mes { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(19,36,30,.1); font-size: .86rem; }
@media (max-width: 760px) {
  .pj-frise { grid-template-columns: 1fr; gap: 10px; }
  .pj-frise::before { left: 7px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .pj-et { display: grid; grid-template-columns: 16px 1fr auto; gap: 10px; text-align: left; align-items: center; }
  .pj-et i { margin: 0; }
}
