/* ==========================================================================
   Nounelia — univers graphique « enfance » (chargé après ui.css, sur toutes les pages)
   Proposition validée sur une page de test visuel (retirée en 1.7.28) et étendue au site :
   typographie Nunito, formes douces, pastilles « autocollant », dessins au trait (includes/illustrations.php).
   Couleurs : uniquement les variables de la palette active (assets/css/palettes.css), blanc compris ; aucun
   dégradé, aucune nouvelle couleur. Les ombres et voiles dérivent de ces variables (color-mix).
   Aucune règle métier ici : seulement l'apparence (ordre, forme, taille, casse, mouvement).
   ========================================================================== */

/* ---------- Jetons ---------- */
:root {
  /* Typographie : Nunito partout (400 texte, 700-800 libellés, 900 grands titres) */
  --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ui-font: var(--font);
  --ui-font-display: var(--font);
  --font-family-primary: var(--font);
  --font-family-display: var(--font);
  --fs-h1: clamp(2.25rem, 1.55rem + 2.7vw, 3.5rem);      /* 36 → 56 px (pages publiques) */
  --fs-h2: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem);       /* 28 → 40 px */
  --fs-h3: clamp(1.375rem, 1.22rem + .65vw, 1.75rem);    /* 22 → 28 px */
  --fs-page: clamp(1.625rem, 1.35rem + 1.1vw, 2.25rem);  /* titre d'un écran de l'application : 26 → 36 px */
  --fs-card: clamp(1.125rem, 1.07rem + .25vw, 1.375rem); /* 18 → 22 px */
  --fs-body: clamp(1rem, .97rem + .15vw, 1.0625rem);     /* 16 → 17 px */
  --fs-small: .875rem;                                   /* 14 px */
  --fs-tiny: .8125rem;                                   /* 13 px */
  --lh-title: 1.15;
  --lh-body: 1.6;
  --measure: 58ch;

  /* Espacements : multiples de 8 px */
  --sp-1: 8px; --sp-2: 16px; --sp-3: 24px; --sp-4: 32px; --sp-5: 40px; --sp-6: 48px; --sp-8: 64px; --sp-10: 80px; --sp-12: 96px;
  --section: clamp(72px, 5vw + 48px, 128px);
  --gutter: clamp(16px, 4vw, 32px);
  --container: 1180px;

  /* Formes : une seule famille d'arrondis */
  --r-xs: 8px; --r-sm: 12px; --r-md: 16px; --r-lg: 24px; --r-xl: 32px; --r-pill: 999px;
  --ui-radius-sm: var(--r-sm); --ui-radius: var(--r-md); --ui-radius-lg: var(--r-lg); --ui-radius-xl: var(--r-xl);

  /* Ombres : deux niveaux seulement, très doux et teintés de la palette */
  --sh-1: 0 1px 2px color-mix(in srgb, var(--ink-700) 6%, transparent), 0 10px 24px -14px color-mix(in srgb, var(--brand-700) 28%, transparent);
  --sh-2: 0 2px 6px color-mix(in srgb, var(--ink-700) 6%, transparent), 0 24px 48px -22px color-mix(in srgb, var(--brand-700) 38%, transparent);
  --ui-shadow-xs: 0 1px 2px color-mix(in srgb, var(--ink-700) 6%, transparent);
  --ui-shadow-sm: var(--sh-1);
  --ui-shadow: var(--sh-1);
  --ui-shadow-lg: var(--sh-2);
  --ring: 0 0 0 3px var(--bg), 0 0 0 6px var(--brand-400);

  /* Mouvement : court, jamais en boucle */
  --t-fast: 150ms; --t-med: 220ms; --ease: cubic-bezier(.2, .8, .2, 1);
  --ui-fast: var(--t-fast); --ui-med: var(--t-med);

  /* Bandeaux : aplat de la couleur principale (plus de maille sombre) */
  --ui-mesh-dark: linear-gradient(var(--brand-600), var(--brand-600));

  /* Points de rupture (repères ; les media queries les reprennent en dur) : 576 / 768 / 992 / 1180 px */
}
/* Lisibilité : la couleur principale sert aussi de texte (liens, onglets actifs) et de fond sous du texte blanc (bulles de message,
   étiquettes, onglets) : cran 600 comme les boutons, soit 4,5:1 au moins dans les quatre palettes. Même règle pour le vert. */
:root {
  --c-brand-strong: var(--brand-600); --c-ok: var(--ok-600);
  /* Anciennes variables par rôle (common.css, parent.css, admin.css) : mêmes crans lisibles */
  --color-primary: var(--brand-600); --color-info: var(--brand-600); --color-success: var(--ok-600);
  --color-parent: var(--brand-600); --color-parent-dark: var(--brand-700);
  --color-assistant: var(--ok-600); --color-assistant-dark: var(--ok-700);
  --p-primary: var(--brand-600); --p-primary-dark: var(--brand-700);
  --admin-success: var(--ok-600); --admin-info: var(--brand-600); --admin-danger: var(--bad-600);
}
body {
  --accent: var(--brand-600); --accent-strong: var(--brand-700);
  /* Aplats à la place des dégradés de ui.css (mêmes variables, valeurs unies) */
  --accent-grad: linear-gradient(var(--brand-600), var(--brand-600));
  --accent-grad-soft: linear-gradient(var(--brand-50), var(--brand-50));
  --accent-glow: 0 10px 20px -12px color-mix(in srgb, var(--brand-700) 80%, transparent);
  --accent-ring: 0 0 0 4px var(--brand-100);
}


/* ---------- Base ---------- */
html, html.ui-ambient { background: var(--bg); }
body, body.has-shell, body.is-visitor {
  font-family: var(--font); font-size: var(--fs-body); line-height: var(--lh-body); font-weight: 400;
  color: var(--ink-700); background: var(--bg); font-feature-settings: normal;
}
/* Plus de halo d'ambiance animé derrière le contenu : un fond uni et calme */
body.has-shell::before, body.is-visitor::before { content: none; display: none; animation: none; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-family: var(--font); font-weight: 800; color: var(--ink-800); letter-spacing: -.015em; line-height: var(--lh-title); }
h1, .h1 { font-weight: 900; letter-spacing: -.02em; }
strong, b, .fw-bold { font-weight: 800; }
.fw-semibold { font-weight: 700 !important; }
.text-muted { color: var(--muted) !important; }
a { color: var(--brand-600); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--brand-400); outline-offset: 2px; }


/* Libellés et étiquettes : casse normale (plus de capitales systématiques), lisibles */
:is(.shell-nav-title, .stat-tile-label, .table > thead th, .ui-eyebrow, .billing-eyebrow, .palette-group, .home-eyebrow,
    .stat-chip .label, .section-eyebrow, .child-card-meta span, .hero-eyebrow, .insight-label, .panel-eyebrow, .page-hero-eyebrow,
    .section-unified-eyebrow, .stat-unified-label, .child-contact-title, .admin-table th, .msg-list-title, .contract-status-badge,
    .detail-label, .info-label, .stat-label, .remuneration-label, .calendar-header-cell .day-name, .vacation-status, .stat-card-title-modern,
    .planning-page .stat-label, .planning-page .day-name, .guide-panel-label, .menu-week-eyebrow, .menu-day-date span, .news-tag,
    .acc-hero-meta dt, .search-field small, .qa-context dt, .qa-table th, .qa-facts dt, .day-name, .message-badge) {
  text-transform: none; letter-spacing: 0;
}
@media screen {
  .sheet-table tr.sheet-week th { text-transform: none; letter-spacing: 0; }
  .table thead th { text-transform: none; letter-spacing: 0; }
}

/* ---------- Illustrations (includes/illustrations.php) ---------- */
.ill { display: block; overflow: visible; --lw: 2.25px; }
.ill-art { width: 100%; height: auto; --lw: 2.75px; }
.ill .o { stroke: var(--ink-700); stroke-width: var(--lw); stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ill .l { fill: none; stroke: var(--ink-700); stroke-width: var(--lw); stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ill .ls { fill: none; stroke: var(--ink-200); stroke-width: var(--lw); stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ill .lw { fill: none; stroke: #FFFFFF; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.ill .lw-b { stroke-width: 6; opacity: 1; }
.ill .lw-w { stroke: var(--warm-400); opacity: .9; }
.ill .lb { fill: none; stroke: var(--ink-700); stroke-linecap: round; stroke-linejoin: round; }
.ill .lf { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ill .lb5 { fill: none; stroke: var(--brand-500); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.ill .lsun { fill: none; stroke: var(--warm-500); stroke-width: 4; stroke-linecap: round; }
.ill .ld { fill: none; stroke: var(--warm-400); stroke-width: 3; stroke-dasharray: 1 10; stroke-linecap: round; }
.ill .ill-t { font-family: var(--font, 'Nunito', sans-serif); font-weight: 900; fill: #FFFFFF; text-anchor: middle; }
.ill .wh { fill: #FFFFFF; }
.ill .b0 { fill: var(--brand-50); } .ill .b1 { fill: var(--brand-100); } .ill .b2 { fill: var(--brand-200); } .ill .b3 { fill: var(--brand-300); }
.ill .b4 { fill: var(--brand-400); } .ill .b5 { fill: var(--brand-500); } .ill .b6 { fill: var(--brand-600); }
.ill .w0 { fill: var(--warm-50); } .ill .w1 { fill: var(--warm-100); } .ill .w2 { fill: var(--warm-200); } .ill .w3 { fill: var(--warm-300); }
.ill .w4 { fill: var(--warm-400); } .ill .w5 { fill: var(--warm-500); } .ill .w6 { fill: var(--warm-600); } .ill .w7 { fill: var(--warm-700); }
.ill .g0 { fill: var(--ok-50); } .ill .g1 { fill: var(--ok-100); } .ill .g2 { fill: var(--ok-200); } .ill .g3 { fill: var(--ok-300); } .ill .g5 { fill: var(--ok-500); }
.ill .k { fill: var(--ink-700); } .ill .k1 { fill: var(--ink-100); } .ill .k5 { fill: var(--ink-500); }
.ill .r1 { fill: var(--bad-100); } .ill .r3 { fill: var(--bad-300); } .ill .r5 { fill: var(--bad-500); }
.ill .sk { fill: var(--warm-100); }
.ill .s-wh { stroke: #FFFFFF; } .ill .s-w3 { stroke: var(--warm-300); } .ill .s-b4 { stroke: var(--brand-400); }
.ill .s-g3 { stroke: var(--ok-300); } .ill .s-r3 { stroke: var(--bad-300); } .ill .s-sk { stroke: var(--warm-100); }

/* Pastille « autocollant » : tuile teintée, liseré blanc, légère inclinaison (signature Nounelia) */
.ill-sticker {
  --s: 56px; --tilt: -4deg; --tone: var(--brand-100);
  display: inline-grid; place-items: center; flex: none; width: var(--s); height: var(--s);
  border-radius: calc(var(--s) * .34); background: var(--tone);
  box-shadow: 0 0 0 3px #FFFFFF, var(--sh-1);
  transform: rotate(var(--tilt)); transition: transform var(--t-med) var(--ease);
}
.ill-sticker.is-warm { --tone: var(--warm-100); }
.ill-sticker.is-ok { --tone: var(--ok-100); }
.ill-sticker.is-rose { --tone: var(--bad-50); }
.ill-sticker.is-plain { --tone: #FFFFFF; }
.ill-sticker > i { font-size: calc(var(--s) * .4); color: var(--ink-700); }
.glyph { display: inline-block; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.18em; }
.glyph .gf { fill: currentColor; }


/* Mot souligné à la main (trait de feutre jaune), à la place de la vague */
.ui-squiggle { position: relative; white-space: nowrap; z-index: 0; }
.ui-squiggle::after {
  left: -2%; right: -2%; bottom: .02em; height: .32em; background: var(--warm-300);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'%3E%3Cpath d='M3 13c30-7 60-9 96-7s66 4 98 1' fill='none' stroke='%23000' stroke-width='9' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'%3E%3Cpath d='M3 13c30-7 60-9 96-7s66 4 98 1' fill='none' stroke='%23000' stroke-width='9' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.ui-ink { color: var(--brand-600); }

/* ==========================================================================
   Coquille de l'application : menu illustré, barre du haut
   ========================================================================== */
/* Menu latéral : fond blanc, icônes au trait, rubrique active en pastille douce, séparateurs fins, décor illustré en bas
   (nounours et anneaux sur une colline, illusArt('menu')), qui se prolonge sous la carte du compte */
.shell-sidebar { --menu-ground: color-mix(in srgb, var(--brand-100) 55%, var(--brand-50)); background: #FFFFFF; backdrop-filter: none; -webkit-backdrop-filter: none; border-right: 0; box-shadow: 1px 0 0 var(--line); }
.shell-brand { height: auto; min-height: var(--topbar-h); padding: 18px 14px 10px 22px; }
.shell-brand-link { gap: 10px; }
.shell-brand-link:hover { text-decoration: none; }
.shell-brand-link img { width: 40px; }
.shell-brand-text strong { font-weight: 900; font-size: 1.45rem; letter-spacing: -.02em; color: var(--ink-800); }
.shell-brand-text small { font-weight: 700; color: var(--muted); }
.shell-nav { display: flex; flex-direction: column; padding: 8px 12px 0; }
.shell-nav ul { flex: none; }
.shell-nav li { margin: 3px 0; }
.shell-nav-title { font-size: var(--fs-tiny); font-weight: 700; color: var(--faint); margin: 12px 4px 4px; padding: 14px 10px 0; border-top: 1px solid var(--line); }
.shell-nav-group:first-child .shell-nav-title { margin-top: 0; padding-top: 0; border-top: 0; }
/* Menu en accordéon : titres de rubrique cliquables (zone de toucher confortable), point rouge comme les pastilles */
.shell-nav-title { padding-top: 6px; }
.shell-nav-toggle { padding: 8px 0; color: var(--muted); }
.shell-nav-toggle:hover, .shell-nav-group.is-open .shell-nav-toggle { color: var(--ink-800); }
.shell-nav-group:not(.is-open):has(.shell-badge:not(.is-empty)) .shell-nav-toggle::after { background: var(--bad-500); }
.shell-nav-link { gap: 14px; padding: 10px 12px 10px 14px; border-radius: var(--r-md); color: var(--ink-700); font-weight: 600; font-size: 1rem; }
.shell-nav-link:hover { background: var(--bg); color: var(--ink-800); }
.shell-nav-icon { width: 24px; height: 24px; border-radius: 0; color: var(--ink-700); font-size: 1.05rem; background: transparent; }
.shell-nav-link:hover .shell-nav-icon { color: var(--brand-700); transform: none; }
.shell-nav-link.active { background: color-mix(in srgb, var(--brand-100) 60%, var(--brand-50)); box-shadow: none; color: var(--ink-800); font-weight: 800; }
.shell-nav-link.active .shell-nav-icon { background: transparent; color: var(--brand-700); box-shadow: none; transform: none; }
.shell-nav-link.active .line-icon { stroke-width: 2; }
.shell-nav-link.active::before { content: none; }
.line-icon { display: block; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.line-icon .d { stroke-width: 2.6; }
.shell-badge { font-weight: 900; background: var(--bad-500); animation: none; }
.shell-nav-art { margin: auto -12px 0; padding-top: 20px; pointer-events: none; }
.shell-nav-art .ill-art { display: block; width: 100%; max-width: 268px; margin: 0 auto; }
.shell-nav-art .gr { fill: var(--menu-ground); }
.shell-sidebar-footer { border-top: 0; background: var(--menu-ground); padding: 4px 12px 14px; }
.shell-user { background: color-mix(in srgb, #FFFFFF 70%, transparent); }
.shell-user:hover { background: #FFFFFF; }
.shell-user-text strong { font-weight: 800; }
.shell-intro .shell-nav li { animation: none; }
.ill .s-w4 { stroke: var(--warm-400); }
/* Icônes au trait du menu reprises hors du menu (même tracé, illusLineKey) : pastilles, tuiles, états vides */
.ill-sticker > .line-icon { width: calc(var(--s) * .52); height: calc(var(--s) * .52); color: var(--brand-700); stroke-width: 1.8; }
.ill-sticker.is-warm > .line-icon { color: var(--warm-700); }
.ill-sticker.is-ok > .line-icon { color: var(--ok-700); }
.ill-sticker.is-rose > .line-icon { color: var(--bad-600); }
.ill-sticker.is-plain > .line-icon { color: var(--ink-700); }
.stat-tile-icon .line-icon { width: 26px; height: 26px; }
.ui-empty-icon .line-icon { width: 44px; height: 44px; color: var(--brand-700); }
body.has-shell :is(.insight-icon, .quick-icon, .stat-card-icon-modern) .line-icon { width: 28px; height: 28px; }
@media (min-width: 993px) {
  .sidebar-collapsed .shell-brand { padding: 14px 8px 6px; }
  .sidebar-collapsed .shell-nav-title { padding: 0; border-top: 1px solid var(--line); height: 0; margin: 10px 6px; opacity: 1; }
  .sidebar-collapsed .shell-nav-group:first-child .shell-nav-title { border-top: 0; margin: 0; }
  .sidebar-collapsed .shell-nav-link { padding: 10px; }
  .sidebar-collapsed .shell-nav-art { display: none; }
  .sidebar-collapsed .shell-sidebar-footer { background: transparent; }
  .sidebar-collapsed .shell-user { background: transparent; }
}

.shell-topbar { background: color-mix(in srgb, var(--bg) 88%, transparent); }
.is-scrolled .shell-topbar { background: color-mix(in srgb, #FFFFFF 92%, transparent); box-shadow: 0 1px 0 var(--line); border-bottom-color: transparent; }
.shell-topbar-title { display: flex; align-items: center; gap: 12px; }
.shell-topbar-title .ill-sticker { --s: 38px; }
.shell-greeting { font-weight: 900; font-size: 1.125rem; color: var(--ink-800); letter-spacing: -.01em; }
.shell-icon-btn { border: 0; border-radius: var(--r-md); background: #FFFFFF; box-shadow: var(--sh-1); color: var(--ink-600); }
.shell-icon-btn:hover { background: var(--brand-50); color: var(--brand-700); box-shadow: var(--sh-1); }
.shell-collapse-btn { box-shadow: none; background: transparent; }
.shell-search { border: 0; border-radius: var(--r-pill); background: #FFFFFF; box-shadow: var(--sh-1); color: var(--muted); font-weight: 600; }
.shell-search:hover { box-shadow: var(--sh-1), 0 0 0 3px var(--brand-100); }
.shell-avatar-btn { border: 0; background: #FFFFFF; box-shadow: var(--sh-1); }
.shell-avatar-name { font-weight: 800; }
.shell-dot { background: var(--bad-500); }
.shell-dot::after { content: none; animation: none; }
.shell-icon-btn:has(.shell-dot:not(.is-empty)) > .fa-bell { animation: none; }
.plan-chip { font-weight: 800; }
.plan-founder { background: var(--warm-300); box-shadow: none; }
.plan-founder i, .plan-upgrade::after { animation: none; }
.plan-upgrade { background: var(--brand-600); }
.shell-menu { border: 0; border-radius: var(--r-lg); box-shadow: var(--sh-2); padding: 8px; }
.shell-menu-profile { border-radius: var(--r-md); }
.shell-menu-item { border-radius: var(--r-sm); font-weight: 700; }
.shell-menu-item:hover { padding-left: 10px; }
.shell-content { animation: none; }
.shell-footer { border-top: 0; font-weight: 600; }

@media (max-width: 768px) {
  .shell-topbar-title .ill-sticker { --s: 32px; }
  .shell-greeting { font-size: 1rem; }
}

/* ==========================================================================
   Composants : boutons, champs, cartes, étiquettes, tableaux
   ========================================================================== */
.btn {
  border-radius: var(--r-pill); font-family: var(--font); font-weight: 800; letter-spacing: 0;
  box-shadow: none; overflow: visible;
}
.btn:not(.btn-sm):not(.btn-lg):not(.btn-link):not(.btn-close) { min-height: 44px; padding-left: 22px; padding-right: 22px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.w-100, .btn.d-block { display: flex; }
.btn-sm { padding: 6px 14px; font-size: .875rem; }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 1.0625rem; display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.btn i.me-1, .btn i.me-2, .btn i.ms-1, .btn i.ms-2 { margin: 0 !important; }
.btn:active { transform: translateY(1px) scale(.98); }
.btn-primary, .btn-primary:disabled, .btn-primary.disabled { background: var(--brand-600); border-color: var(--brand-600); color: #FFFFFF; box-shadow: 0 10px 20px -12px color-mix(in srgb, var(--brand-700) 80%, transparent); }
.btn-primary:hover, .btn-primary:focus { background: var(--brand-700); border-color: var(--brand-700); color: #FFFFFF; transform: translateY(-2px); box-shadow: 0 16px 26px -14px color-mix(in srgb, var(--brand-700) 90%, transparent); }
.btn-primary:disabled, .btn-primary.disabled { opacity: .5; box-shadow: none; transform: none; }
.btn-primary::after, .btn-glow::after, .public-cta .btn-glow::after { content: none; display: none; }
.btn-success { --bs-btn-bg: var(--ok-600); --bs-btn-border-color: var(--ok-600); --bs-btn-hover-bg: var(--ok-700); --bs-btn-hover-border-color: var(--ok-700); --bs-btn-active-bg: var(--ok-700); }
.btn-outline-primary { --bs-btn-color: var(--brand-700); --bs-btn-border-color: var(--brand-200); --bs-btn-hover-bg: var(--brand-50); --bs-btn-hover-color: var(--brand-700); --bs-btn-hover-border-color: var(--brand-200); --bs-btn-active-bg: var(--brand-100); --bs-btn-active-color: var(--brand-700); background: #FFFFFF; border-width: 2px; }
.btn-outline-primary:hover { transform: translateY(-2px); }
.btn-outline-secondary { border-width: 2px; --bs-btn-border-color: var(--line-strong); }
.btn-light { --bs-btn-bg: #FFFFFF; --bs-btn-border-color: var(--line); --bs-btn-hover-bg: var(--bg); --bs-btn-hover-border-color: var(--line-strong); --bs-btn-color: var(--ink-700); font-weight: 800; }
.btn-ghost { font-weight: 800; }
.btn .ripple { display: none; }
.btn:hover .fa-arrow-right, .btn:hover .fa-chevron-right { transform: translateX(3px); }
:is(.btn-unified-primary, .btn-modern-primary, .btn-primary-modern) { background: var(--brand-600); box-shadow: none; }
:is(.btn-unified-primary, .btn-modern-primary, .btn-primary-modern):hover { background: var(--brand-700); }

.form-label, legend.form-label { font-weight: 800; font-size: .9375rem !important; color: var(--ink-700); }
.form-control, .form-select { min-height: 48px; border: 2px solid var(--line-strong); border-radius: var(--r-md); font-size: 1rem; font-weight: 600; color: var(--ink-800); }
.form-control-sm, .form-select-sm { min-height: 38px; border-radius: var(--r-sm); font-size: .9rem; }
.form-control:hover, .form-select:hover { border-color: var(--brand-200); }
.form-control:focus, .form-select:focus { border-color: var(--brand-400); box-shadow: 0 0 0 4px var(--brand-100); }
.form-text { font-weight: 600; color: var(--muted); }
.form-check-input { border-width: 2px; border-color: var(--line-strong); }
.form-check-input:checked { background-color: var(--brand-600); border-color: var(--brand-600); }
.form-check-label { font-weight: 600; }
.input-group-text { border: 2px solid var(--line-strong); background: var(--bg); font-weight: 700; }
.tc-control { min-height: 48px; border: 2px solid var(--line-strong); border-radius: var(--r-md); }
.tc-token { font-weight: 800; border: 0; background: var(--brand-50); color: var(--brand-700); }
.tc-menu { border: 0; border-radius: var(--r-md); box-shadow: var(--sh-2); }
.form-control.is-invalid, .form-select.is-invalid { animation: none; }

.card { border: 0; border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.card > .card-header:first-child { border-radius: var(--r-lg) var(--r-lg) 0 0; }
.card-header { padding: 18px 24px 12px; border-bottom: 0; font-weight: 800; }
.card-header h5, .card-header h4, .card-header h3, .card-header .h5, .card-header .h6, .card-header h6 { font-weight: 800; }
.card-body { padding: 24px; }
.card-footer { background: transparent; border-top: 1px dashed var(--line-strong); }
.ui-card { border: 0; border-radius: var(--r-lg); box-shadow: var(--sh-1); padding: 24px; }
/* Carte dans une carte : un filet suffit (pas d'ombre sur ombre) */
:is(.card, .ui-card) :is(.card, .ui-card) { box-shadow: none; border: 1px solid var(--line); }
a.card:hover, .card.card-hover:hover, .card[data-href]:hover { box-shadow: var(--sh-2); transform: translateY(-3px); border-color: transparent; }
/* Plus d'effet 3D ni de halo qui suit la souris : un léger soulèvement au survol des cartes cliquables seulement */
.ui-tilt { transform: none !important; will-change: auto; }
.ui-tilt::after { content: none; }
.ui-tilt:hover { box-shadow: var(--sh-2); border-color: transparent; }

.badge { font-weight: 800; padding: .42em .8em; box-shadow: none; }
.ui-chip { font-weight: 800; border: 0; padding: 5px 12px; }
.ui-chip.is-success { background: var(--ok-100); color: var(--ok-700); }
.ui-chip.is-warning { background: var(--warm-100); color: var(--warm-700); }
.ui-chip.is-danger { background: var(--bad-50); color: var(--bad-600); }

.alert { border: 0; border-radius: var(--r-md); padding: 16px 20px; font-weight: 600; animation: none; }
.alert strong { font-weight: 800; }

.table > thead th { font-size: var(--fs-tiny); font-weight: 800; color: var(--ink-500); background: var(--bg); border-bottom: 0; }
.table > thead th:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.table > thead th:last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.table > :not(caption) > * > * { border-bottom-color: var(--line); }
.table-hover > tbody > tr:hover > td:first-child::before { background: var(--brand-400); animation: none; }

.list-group-item { border-color: var(--line); }
.list-group { border-radius: var(--r-md); }
.modal-content { border-radius: var(--r-xl); box-shadow: var(--sh-2); }
.modal-header { border-bottom: 0; padding: 22px 24px 8px; }
.modal-title { font-weight: 900; }
.modal-footer { border-top: 0; padding: 8px 24px 22px; }
.dropdown-menu { border: 0; border-radius: var(--r-md); box-shadow: var(--sh-2); animation: none; }
.dropdown-item { border-radius: var(--r-sm); font-weight: 600; }
.nav-pills .nav-link { font-weight: 800; }
.nav-pills .nav-link.active, .nav-pills .show > .nav-link { background: var(--brand-600); box-shadow: none; }
.nav-tabs { border-bottom: 2px solid var(--line); gap: 4px; }
.nav-tabs .nav-link { border: 0; border-radius: var(--r-pill); font-weight: 800; color: var(--ink-500); margin-bottom: 6px; }
.nav-tabs .nav-link.active { background: var(--brand-50); color: var(--brand-700); }
.progress { height: 10px; background: var(--bg-2); }
.progress-bar, .progress-bar:not([class*="bg-"]) { background: var(--brand-500); }
.progress-bar::after { content: none; animation: none; }
kbd { font-family: var(--font); }

/* Tuiles de statistiques : libellé en clair, pictogramme en pastille inclinée */
.stat-tile-label { font-size: var(--fs-small); font-weight: 800; color: var(--ink-500); }
.stat-tile-value { font-weight: 900; }
.stat-tile-icon { width: 48px; height: 48px; border-radius: 16px; transform: rotate(-4deg); box-shadow: 0 0 0 3px #FFFFFF, var(--sh-1); }
.stat-tile:hover .stat-tile-icon { transform: rotate(0) scale(1.06); }
.stat-tile-spark { display: none; }
.stat-tile-link { font-weight: 800; }
.tile-violet { --tile-bg: var(--bad-50); --tile-fg: var(--bad-600); }

/* État vide : un dessin, une phrase */
.ui-empty-icon { width: 80px; height: 80px; border-radius: 26px; background: var(--brand-50); transform: rotate(-4deg); box-shadow: 0 0 0 3px #FFFFFF, var(--sh-1); animation: none; }
.ui-empty-icon .ill { width: 60px; height: 60px; }
.ui-empty h3 { font-weight: 800; }

/* En-tête d'écran (gabarit page_template.php) */
.page-header { animation: none; }
.page-header h1 { font-size: var(--fs-page); font-weight: 900; }
.page-description { font-size: 1.0625rem; color: var(--ink-500); }

/* Pastilles d'icônes des anciens tableaux de bord : aplats doux, inclinés comme des autocollants */
body.has-shell :is(.insight-icon, .quick-icon, .stat-card-icon-modern, .stat-icon) {
  background: var(--brand-100) !important; color: var(--brand-700) !important; border-radius: 16px;
  box-shadow: 0 0 0 3px #FFFFFF, var(--sh-1) !important; transform: rotate(-4deg);
}
body.has-shell :is(.quick-icon.bg-green, .insight-icon.icon-contracts, .stat-card-icon-parent) { background: var(--ok-100) !important; color: var(--ok-700) !important; }
body.has-shell :is(.quick-icon.bg-purple, .insight-icon.icon-messages, .stat-card-icon-admin) { background: var(--warm-100) !important; color: var(--warm-700) !important; }
:is(.insight-card, .stat-card-modern, .panel, .quick-action) { border: 0; border-radius: var(--r-lg); box-shadow: var(--sh-1); }
:is(.insight-card, .stat-card-modern)::before { content: none; }
.journey-step { border: 0; border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.journey-step .step-index { background: var(--warm-300); color: var(--ink-800); box-shadow: 0 0 0 3px #FFFFFF; border-radius: 50%; font-weight: 900; }

/* Bandeaux des anciennes pages : aplat de la couleur principale, sans halo animé, avec un nuage et un soleil dessinés */
body.has-shell :is(.contracts-header, .admin-hero, .admin-header, .page-hero, .profile-header, .children-header, .links-header) {
  position: relative; isolation: isolate; overflow: hidden; border-radius: var(--r-xl) !important; animation: none !important; box-shadow: none;
}
body.has-shell :is(.contracts-header, .page-hero, .profile-header, .children-header, .links-header)::after {
  content: ''; position: absolute; z-index: -1; right: 24px; bottom: 14px; width: 132px; height: 70px; pointer-events: none; background: #FFFFFF; opacity: .16;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 64'%3E%3Cpath d='M30 60h62a20 20 0 0 0 0-40 26 26 0 0 0-49-6A22 22 0 0 0 30 60Z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 64'%3E%3Cpath d='M30 60h62a20 20 0 0 0 0-40 26 26 0 0 0-49-6A22 22 0 0 0 30 60Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
/* Bandeau de bienvenue des tableaux de bord : fond clair uni, soleil et nuage immobiles */
body.has-shell :is(.dashboard-hero, .header-modern) {
  background: var(--brand-50) !important; background-image: none !important; border: 0; border-radius: var(--r-xl); box-shadow: none; animation: none !important;
}
body.has-shell :is(.dashboard-hero, .header-modern)::before { animation: none; opacity: 1; background: var(--warm-400); }
body.has-shell :is(.dashboard-hero, .header-modern)::after { animation: none; }
body.has-shell .bg-gradient-primary { background-image: none !important; background-color: var(--brand-600) !important; }

/* Petits dessins d'avant (doodles) : immobiles */
.ui-doodle { animation: none !important; }

/* Mouvement : rien ne tourne ni ne clignote en continu */
.skeleton::after { animation-duration: 1.6s; }
@media (prefers-reduced-motion: reduce) {
  .ill-sticker, .stat-tile-icon { transition: none; }
  .btn:hover, a.card:hover, .ui-tilt:hover { transform: none !important; }
}

/* ==========================================================================
   Pages publiques : barre de navigation et pied de page
   ========================================================================== */
.public-nav { background: color-mix(in srgb, var(--bg) 90%, transparent); }
.is-scrolled .public-nav { background: color-mix(in srgb, #FFFFFF 94%, transparent); box-shadow: 0 1px 0 var(--line); border-bottom-color: transparent; }
.public-nav-inner { height: 80px; }
.public-brand-name { font-weight: 900; font-size: 1.5rem; }
.public-links > a { font-weight: 700; color: var(--ink-600); border-radius: var(--r-pill); }
.public-links > a:hover { background: #FFFFFF; color: var(--brand-700); box-shadow: var(--sh-1); }
.public-links > a::after { content: none !important; }
.public-links > a[aria-current="page"] { color: var(--brand-700); background: var(--brand-50); }
.shell-topbar::after, .public-nav::after { content: none !important; }
@media (max-width: 860px) {
  .public-links { top: 80px; border: 0; border-radius: var(--r-lg); box-shadow: var(--sh-2); }
}
.site-footer { background: var(--bg-2); color: var(--ink-600); margin-top: var(--sp-8); padding: var(--sp-8) 0 var(--sp-3); }
.site-footer::before { content: none; }
.site-footer h3 { color: var(--ink-800); font-weight: 900; font-size: 1rem; }
.site-footer a { color: var(--ink-600); font-weight: 600; }
.site-footer a:hover { color: var(--brand-700); }
.site-footer-brand img { background: #FFFFFF; box-shadow: var(--sh-1); border-radius: var(--r-md); }
.site-footer-badges span { background: #FFFFFF; border: 0; box-shadow: var(--sh-1); color: var(--ink-600); font-weight: 700; }
.site-footer-bottom { border-top: 1px dashed var(--line-strong); color: var(--muted); }

/* Bandeaux : un seul aplat (l'image de maille et la couleur d'ardoise de ui.css sont remplacées) */
body.has-shell :is(.contracts-header, .admin-hero, .admin-header, .page-hero, .profile-header, .children-header, .links-header) { background: var(--brand-600) !important; }

/* Petits titres au-dessus d'un titre, et libellés de valeurs : lisibles, en casse normale */
:is(.hero-eyebrow, .section-eyebrow, .panel-eyebrow, .page-hero-eyebrow, .section-unified-eyebrow, .ui-eyebrow, .menu-week-eyebrow, .home-eyebrow) {
  font-size: var(--fs-small) !important; font-weight: 800; letter-spacing: 0;
}
:is(.insight-label, .stat-unified-label, .stat-label, .stat-card-title-modern, .detail-label, .info-label, .remuneration-label, .stat-chip .label) {
  font-size: var(--fs-small) !important; font-weight: 700; letter-spacing: 0; color: var(--ink-500);
}

/* ==========================================================================
   Tableaux de bord : bandeau de bienvenue illustré, pictogrammes dans les tuiles
   ========================================================================== */
body.has-shell :is(.dashboard-hero, .header-modern).has-art { display: flex; align-items: center; gap: var(--sp-3); }
body.has-shell :is(.dashboard-hero, .header-modern).has-art::before, body.has-shell :is(.dashboard-hero, .header-modern).has-art::after { content: none; }
:is(.dashboard-hero, .header-modern) .hero-art { width: 150px; flex: none; margin: -8px 0 -16px -8px; }
:is(.dashboard-hero, .header-modern).has-art :is(.hero-text, .header-content) { flex: 1; min-width: 0; }
:is(.dashboard-hero, .header-modern) :is(h1, .header-title-modern) { font-size: var(--fs-page); font-weight: 900; }
.hero-tags span { background: #FFFFFF; font-weight: 700; box-shadow: var(--sh-1); }
body.has-shell :is(.insight-icon, .quick-icon, .stat-card-icon-modern) .ill { width: 36px; height: 36px; }
body.has-shell :is(.insight-icon, .quick-icon, .stat-card-icon-modern):has(.ill) { width: 52px; height: 52px; }
.alert > .ill-sticker { --s: 40px; flex: none; }
@media (max-width: 768px) {
  body.has-shell :is(.dashboard-hero, .header-modern).has-art { flex-wrap: wrap; }
  :is(.dashboard-hero, .header-modern) .hero-art { width: 104px; margin: 0; }
}

/* Liens en forme de bouton plein : le texte reste blanc au survol (parent.css recolore tous les liens survolés) */
.theme-parent a.btn-action-primary:hover, .theme-assistant a.btn-action-primary:hover, a.btn-action-primary:hover { color: #FFFFFF; }

/* Téléphone : le titre de la barre du haut passe avant sa pastille, sur deux lignes au plus */
@media (max-width: 576px) {
  .shell-topbar-title .ill-sticker { display: none; }
  .shell-greeting { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.2; font-size: .9375rem; }
  /* Boutons de la barre (cloche, plein écran, compte…) plus serrés pour laisser de la place au titre ; leur taille ne change pas */
  .shell-topbar { gap: 8px; }
  .shell-topbar-actions { gap: 6px; }
}
/* Très petits téléphones (320 px) : boutons de la barre un peu plus petits pour que le titre reste lisible */
@media (max-width: 360px) {
  .shell-topbar { gap: 6px; padding: 0 12px; }
  .shell-topbar-actions { gap: 4px; }
  .shell-topbar .shell-icon-btn, .shell-topbar .plan-chip { width: 36px; height: 36px; }
  .shell-avatar-btn { height: 36px; padding: 0 2px; }
  /* Le titre est déjà écrit dans l'en-tête de l'écran, juste dessous : pas de lettres tronquées dans la barre */
  body:has(:is(.ui-page-head, .page-hero, .admin-hero-content, .dashboard-hero, .header-modern)) .shell-greeting { display: none; }
}
/* Ancienne émoji ajoutée par common.css (.icon-messages:before) : la tuile a déjà son pictogramme */
.insight-icon.icon-messages::before { content: none; }

/* ==========================================================================
   En-tête d'écran (uiPageHead, page_template.php) : pastille, titre, introduction, actions
   ========================================================================== */
.ui-page-head { display: flex; align-items: center; gap: 18px 20px; flex-wrap: wrap; margin: 4px 0 var(--sp-4); animation: none; }
.ui-page-head > .ill-sticker { --s: 60px; }
.ui-page-head-text { flex: 1 1 320px; min-width: 0; display: grid; gap: 4px; }
.ui-page-head-kicker { margin: 0; font-size: var(--fs-small); font-weight: 800; color: var(--brand-700); }
.ui-page-head h1 { margin: 0; font-size: var(--fs-page); font-weight: 900; letter-spacing: -.02em; line-height: 1.12; }
.ui-page-head .page-description { margin: 0; max-width: 72ch; font-size: 1.0625rem; color: var(--ink-500); }
.ui-page-head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
/* Une seule pastille par écran : celle de l'en-tête, pas celle de la barre du haut */
body:has(:is(.ui-page-head, .page-hero, .admin-hero-content) > .ill-sticker) .shell-topbar-title .ill-sticker { display: none; }
@media (max-width: 576px) {
  .ui-page-head { gap: 12px 14px; margin-bottom: var(--sp-3); }
  .ui-page-head > .ill-sticker { --s: 48px; }
  .ui-page-head-actions { margin-left: 0; width: 100%; }
  .ui-page-head .page-description { font-size: 1rem; line-height: 1.5; }
  /* Téléphone : la pastille tient sur la ligne du titre au lieu d'occuper une ligne à elle seule ; l'introduction et les actions
     suivent en pleine largeur. L'en-tête rend ainsi une ligne d'écran au contenu (PARCOURS-SIMPLE.md, règle 2).
     La revue des actualités (.news-top) garde sa propre grille. */
  .ui-page-head:has(> .ill-sticker):not(.news-top) { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px 12px; }
  .ui-page-head:has(> .ill-sticker):not(.news-top) > .ill-sticker { --s: 44px; grid-column: 1; grid-row: 1; }
  .ui-page-head:has(> .ill-sticker):not(.news-top) > .ui-page-head-text { display: contents; }
  .ui-page-head:has(> .ill-sticker):not(.news-top) > .ui-page-head-text > * { grid-column: 1 / -1; }
  .ui-page-head:has(> .ill-sticker):not(.news-top) > .ui-page-head-text > h1 { grid-column: 2; grid-row: 1; }
  .ui-page-head:has(> .ill-sticker):not(.news-top) > .ui-page-head-text > .ui-page-head-kicker { grid-row: 1; }
  .ui-page-head:has(> .ill-sticker):has(.ui-page-head-kicker):not(.news-top) > .ill-sticker,
  .ui-page-head:has(> .ill-sticker):has(.ui-page-head-kicker):not(.news-top) > .ui-page-head-text > h1 { grid-row: 2; }
  .ui-page-head:has(> .ill-sticker):not(.news-top) > .ui-page-head-actions { grid-column: 1 / -1; }
}

/* Tuiles de chiffres et états vides : pictogrammes illustrés (illusNavIcon) dans leur pastille */
.stat-tile-icon .ill { width: 34px; height: 34px; }
.stat-tile-icon:has(.ill) { background: var(--tile-bg, var(--brand-50)); }

/* Titres de blocs : l'icône qui précède le titre devient une petite pastille douce (aucun changement de contenu) */
.shell-content :is(h2, h3, h4, h5, h6, .card-title, .card-header, .acc-section-title, .panel-header h3) > i:is(.fas, .fa-solid, .far, .bi):first-child {
  display: inline-grid; place-items: center; width: 34px; height: 34px; margin-right: 10px !important; vertical-align: middle;
  border-radius: 11px; background: var(--brand-50); color: var(--brand-600); font-size: .95rem; line-height: 1;
  transform: rotate(-4deg); box-shadow: 0 0 0 2px #FFFFFF;
}
.shell-content :is(.alert-warning, .bg-warning) :is(h2, h3, h4, h5, h6) > i:is(.fas, .fa-solid):first-child { background: var(--warm-100); color: var(--warm-700); }

/* Chiffres clés sous le titre d'un écran (anciens bandeaux) : pastilles blanches, valeur en gras */
.ui-page-head .ui-head-stats { display: flex; flex-direction: row; flex-wrap: wrap; gap: 10px; margin: 10px 0 0; }
.ui-page-head .ui-head-stats .stat-item { display: inline-flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; border-radius: var(--r-pill); background: #FFFFFF; box-shadow: var(--sh-1); color: var(--ink-700); }
.ui-page-head .ui-head-stats .stat-item:hover { transform: none; }
.ui-page-head .ui-head-stats .stat-icon { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-50); color: var(--brand-600); font-size: .9rem; }
.ui-page-head .ui-head-stats .stat-value { font-size: 1.125rem; font-weight: 900; color: var(--ink-800); line-height: 1.1; }
.ui-page-head .ui-head-stats .stat-label { font-size: var(--fs-tiny) !important; font-weight: 700; color: var(--muted); opacity: 1; }

/* Anciens bandeaux (administration, « page-hero » des parents) : même lecture que l'en-tête d'écran (fond clair, pastille, actions à droite) */
body.has-shell :is(.admin-hero, .page-hero) {
  display: flex; align-items: center; flex-wrap: wrap; gap: 18px 20px; margin: 4px 0 var(--sp-4); padding: 0;
  background: none !important; color: var(--ink-700); border: 0; border-radius: 0 !important; box-shadow: none !important; overflow: visible;
}
body.has-shell :is(.admin-hero, .page-hero)::before, body.has-shell :is(.admin-hero, .page-hero)::after { content: none !important; }
body.has-shell .admin-hero-content { display: flex; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 18px 20px; width: 100%; padding: 0; text-align: left; }
body.has-shell :is(.admin-hero-content, .page-hero) > .ill-sticker { --s: 60px; }
body.has-shell :is(.admin-hero-text, .page-hero-content) { flex: 1 1 320px; min-width: 0; }
body.has-shell :is(.admin-hero-text h1, .page-hero .page-hero-title, .page-hero h1) { margin: 0 0 4px; font-size: var(--fs-page); font-weight: 900; letter-spacing: -.02em; color: var(--ink-800) !important; }
body.has-shell :is(.admin-hero-text p, .page-hero .page-hero-subtitle, .page-hero p) { margin: 0; font-size: 1.0625rem; color: var(--ink-500) !important; opacity: 1; }
body.has-shell .page-hero .page-hero-eyebrow { margin: 0 0 2px; font-weight: 800; color: var(--brand-700) !important; }
body.has-shell :is(.admin-hero-actions, .page-hero-actions) { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 8px; margin-left: auto; }
body.has-shell .admin-hero .btn-hero, body.has-shell .btn-unified {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: var(--r-pill);
  border: 2px solid var(--brand-200); background: #FFFFFF; color: var(--brand-700); font-weight: 800; text-decoration: none; box-shadow: none; backdrop-filter: none;
}
body.has-shell .admin-hero .btn-hero:hover, body.has-shell .btn-unified:hover { background: var(--brand-50); color: var(--brand-700); transform: translateY(-2px); }
body.has-shell .admin-hero .btn-hero.btn-hero-primary, body.has-shell .btn-unified.btn-unified-primary { background: var(--brand-600); border-color: var(--brand-600); color: #FFFFFF; }
body.has-shell .admin-hero .btn-hero.btn-hero-primary:hover, body.has-shell .btn-unified.btn-unified-primary:hover { background: var(--brand-700); border-color: var(--brand-700); color: #FFFFFF; }
@media (max-width: 576px) {
  body.has-shell :is(.admin-hero-content, .page-hero) > .ill-sticker { --s: 48px; }
  body.has-shell :is(.admin-hero-actions, .page-hero-actions) { margin-left: 0; width: 100%; }
}
/* Détail d'un contrat : titre et statut dans l'en-tête clair */
.ui-page-head .contract-detail-title { color: var(--ink-800); font-size: var(--fs-page); }
.ui-page-head .contract-detail-subtitle { color: var(--ink-500); opacity: 1; }
.ui-page-head .contract-detail-subtitle i { color: var(--brand-500); }
.ui-page-head .contract-status-large { padding: 8px 16px; font-weight: 800; box-shadow: none; }
/* La couleur reste celle de l'état (contracts.css) ; seul le blanc des contrats actifs passe en vert pâle sur le fond clair */
.ui-page-head .contract-status-large.status-success { background: var(--ok-100); }
/* Initiale d'une personne à la place du pictogramme (fiche d'un enfant) */
.ill-sticker.ui-initial { font-size: 1.625rem; font-weight: 900; color: var(--brand-700); }
/* Calcul de paie : le choix du contrat est sorti du bandeau, il reprend l'apparence des autres listes */
.contract-selector { background: none; padding: 0; margin: 0; }
.contract-selector label { font-weight: 800; color: var(--ink-700); }
.contract-selector .form-select { border: 2px solid var(--line-strong); border-radius: var(--r-md); padding: .65rem 2.25rem .65rem 1rem; }
/* Mon compte : pictogrammes des sections en pastilles douces */
.acc-card-icon { border-radius: 14px; background: var(--brand-50); color: var(--brand-600); transform: rotate(-4deg); box-shadow: 0 0 0 2px #FFFFFF, var(--sh-1); }

/* ==========================================================================
   Confort d'usage (PARCOURS-SIMPLE.md) : lisibilité, cibles tactiles, premier écran sur téléphone.
   Apparence seulement : aucun bouton, champ, lien ni mention n'est retiré ici.
   ========================================================================== */

/* ---------- Lisibilité : texte à 4,5:1 au moins dans les quatre palettes ---------- */
/* Bouton en contour : texte foncé partout (les anciennes feuilles par rôle le fixaient en bleu clair, illisible sur blanc) */
.btn-outline-primary, .btn-outline-primary:visited { color: var(--brand-700); border-color: var(--brand-200); }
.btn-outline-primary:hover, .btn-outline-primary:focus-visible, .btn-outline-primary:active, .btn-outline-primary.active {
  color: var(--brand-700); background: var(--brand-50); border-color: var(--brand-300); box-shadow: none;
}
/* Boutons pleins : fond assez foncé pour le texte blanc */
.btn-success, .btn-success:disabled { background-color: var(--ok-600); border-color: var(--ok-600); color: #FFFFFF; }
.btn-success:hover, .btn-success:focus-visible, .btn-success:active { background-color: var(--ok-700); border-color: var(--ok-700); color: #FFFFFF; }
.btn-danger { --bs-btn-bg: var(--bad-600); --bs-btn-border-color: var(--bad-600); --bs-btn-disabled-bg: var(--bad-600); --bs-btn-disabled-border-color: var(--bad-600); }
.btn-outline-danger { --bs-btn-color: var(--bad-600); --bs-btn-border-color: var(--bad-300); --bs-btn-hover-bg: var(--bad-600); --bs-btn-hover-border-color: var(--bad-600); }
/* Étiquettes pleines : la couleur principale et le vert foncés portent le texte blanc */
.badge.bg-primary, .badge.text-bg-primary { background-color: var(--brand-600) !important; }
.badge.bg-success, .badge.text-bg-success { background-color: var(--ok-600) !important; }
.badge.bg-danger, .badge.text-bg-danger { background-color: var(--bad-600) !important; }
/* Couleurs de texte utilitaires : crans foncés (le vert et l'orange des fonds sont illisibles en texte sur blanc) */
body.has-shell .text-success, .result-value.text-success { color: var(--ok-700) !important; }
body.has-shell .text-warning { color: var(--warm-700) !important; }
body.has-shell .text-danger { color: var(--bad-600) !important; }
body.has-shell .bg-primary { background-color: var(--brand-600) !important; }
.detail-value.highlight { color: var(--ok-700); }
.theme-parent .detail-value.highlight { color: var(--brand-700); }
.contract-status-large.status-success, .ui-page-head .contract-status-large.status-success { color: var(--ok-700); }
.kid-age { background: var(--ok-600); }
.btn-message { color: var(--brand-700); border-color: var(--brand-200); }
.btn-message:hover { background: var(--brand-50); color: var(--brand-700); }
:is(.child-card-actions, .children-hero-actions) .btn-outline-primary { color: var(--brand-700); border-color: var(--brand-200); }
:is(.child-card-actions, .children-hero-actions) .btn-outline-primary:hover { color: var(--brand-700); background: var(--brand-50); }
.msg-row.mine .msg-meta, .msg-row.mine .msg-subject, .mine > .msg-bubble > :is(.msg-meta, .msg-subject) { opacity: 1; }
.meal-daytab.is-done .meal-daytab-state { color: var(--ok-600); }
.admin-activity-text strong { color: var(--brand-700); }
/* Code cité dans un bandeau d'information : encre du texte plutôt que le rose de Bootstrap */
.main-content code { color: var(--ink-800); background: color-mix(in srgb, var(--ink-700) 7%, transparent); padding: 1px 5px; border-radius: 6px; }
.alert a:not(.btn) { color: var(--brand-700); text-decoration: underline; }
/* Lien dans une phrase : souligné, il ne se distingue plus par la seule couleur */
.main-content :is(p, dd, .form-text, .alert, .billing-terms span, .stat-tile-sub) > a:not([class]) { text-decoration: underline; text-decoration-thickness: 1px; }

/* ---------- Téléphone : cibles tactiles d'au moins 44 px (règle 8) ---------- */
@media (max-width: 768px) {
  .btn-sm { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
  .btn-sm.btn-link { min-height: 44px; }
  .form-control-sm, .form-select-sm { min-height: 44px; font-size: 1rem; }
  .plan-chip { min-width: 44px; min-height: 44px; }
  .pay-switch-btn { min-height: 38px; padding: 4px 16px; }
  .pay-switch { padding: 3px; }
  a.ui-chip, button.ui-chip { min-height: 44px; display: inline-flex; align-items: center; padding: 5px 14px; }
  .site-footer a, .shell-footer a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }
  .shell-footer nav { gap: 0 10px; justify-content: center; }
  .auth-link, .breadcrumb-link, .acc-hero-email, .home-video-link, .panel-link { display: inline-flex; align-items: center; min-height: 44px; }
  .auth-row .auth-link { min-height: 0; padding: 12px 0 12px 12px; margin: -12px 0; }
  /* Croix d'un jeton de combo : la zone de toucher déborde le petit rond, sans changer son dessin */
  .tc-token-remove { position: relative; }
  .tc-token-remove::after { content: ''; position: absolute; inset: -11px; }
  /* Sections repliées : une ligne confortable à toucher */
  .shell-content :where(details) > :where(summary:not([class]), summary.small, summary.fw-semibold) { padding-block: 10px; }
}
/* Saisie sur iPhone : un champ sous 16 px fait zoomer la page */
@media (max-width: 768px) and (pointer: coarse) {
  input.form-control, select.form-select, textarea.form-control, .auth-input, .tc-input { font-size: max(1rem, 16px); }
}

/* ---------- Téléphone : l'essentiel au premier écran (règle 2) ---------- */
@media (max-width: 576px) {
  /* Bandeau de bienvenue : le dessin à côté du bonjour, les deux actions côte à côte */
  body.has-shell .dashboard-hero.has-art { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px 14px; padding: 16px; }
  body.has-shell .dashboard-hero.has-art .hero-art { width: 76px; margin: 0; }
  body.has-shell .dashboard-hero.has-art .hero-text :is(h1, h2) { font-size: 1.5rem; margin: 0 0 4px; }
  body.has-shell .dashboard-hero.has-art .hero-text p { margin: 0; font-size: .9375rem; line-height: 1.45; }
  body.has-shell .dashboard-hero.has-art .hero-actions { grid-column: 1 / -1; display: flex; flex-flow: row wrap; gap: 8px; width: 100%; }
  body.has-shell .dashboard-hero.has-art .hero-actions .btn { flex: 1 1 150px; min-width: 0; padding-left: 12px; padding-right: 12px; }
  /* Même lecture pour l'accueil de l'assistante : dessin à gauche, bonjour et date à droite */
  body.has-shell .header-modern.has-art { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 6px 14px; padding: 16px; }
  body.has-shell .header-modern.has-art .hero-art { width: 76px; margin: 0; grid-row: 1 / span 2; }
  body.has-shell .header-modern.has-art .header-title-modern { font-size: 1.5rem; margin: 0 0 2px; }
  body.has-shell .header-modern.has-art .header-content p { margin: 0; font-size: .9375rem; line-height: 1.45; }
  body.has-shell .header-modern.has-art .header-actions-modern { grid-column: 2; justify-self: start; margin: 0; }
}
@media (max-width: 768px) {
  /* Détail d'un contrat : les actions sur deux colonnes (la principale en pleine largeur) au lieu d'une pile de boutons
     qui repoussait le contrat sous le premier écran */
  .contracts-page .quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .contracts-page .quick-actions > form { display: contents; }
  .contracts-page .quick-actions .btn-quick-action { width: 100%; min-height: 48px; padding: 8px 10px; justify-content: center; text-align: center; line-height: 1.25; }
  .contracts-page .quick-actions .btn-quick-action.btn-sign { grid-column: 1 / -1; order: -1; }
}
/* Retour à la liste (détail d'un contrat) : un lien simple, à la couleur des liens */
.breadcrumb-nav { padding: 0; }
.breadcrumb-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--brand-700); }
.breadcrumb-link:hover { color: var(--brand-700); text-decoration: underline; }
/* Jamais de texte sous 12 px : une étiquette dans un petit texte garde une taille lisible */
.small .badge, small .badge, .badge.small { font-size: .75rem; }
.shell-content code { font-size: .8125rem; }
/* Téléphone : les actions d'une ligne de liste passent à la ligne au lieu de s'écraser en ronds qui débordent de la carte ;
   l'action rare (mettre fin à la liaison) prend sa propre ligne */
@media (max-width: 576px) {
  .list-item-actions { flex-wrap: wrap; gap: 8px; }
  .list-item-actions > :is(a, form) { flex: 1 1 110px; min-width: 0; }
  .list-item-actions > form { flex-basis: 100%; }
  .list-item-actions .btn-unified { width: 100%; justify-content: center; white-space: nowrap; }
  .shell-footer nav { gap: 0 6px; }
  .shell-footer a { padding: 0 3px; }
}
/* Cibles tactiles restantes (téléphone et tablette) : titres du menu, onglets, pagination, petits liens d'action */
@media (max-width: 992px) {
  .shell-nav-toggle { min-height: 44px; }
}
@media (max-width: 768px) {
  .acc-nav a, .sheet-screens a, .qa-tab, .contact-item, .contact-link, .jbook-menu-more, .child-hub-all, .admin-sort { min-height: 44px; display: inline-flex; align-items: center; }
  .acc-password-toggle, .btn-nav, .admin-pagination-btn, .admin-btn-icon { min-width: 44px; min-height: 44px; }
  .shell-content a.small:not(.btn), .shell-content a.small.d-block { display: inline-flex; align-items: center; min-height: 44px; }
}
/* Anciens bandeaux de l'administration sur téléphone : même en-tête compact que uiPageHead (pastille sur la ligne du titre) */
@media (max-width: 576px) {
  body.has-shell .admin-hero-content:has(> .ill-sticker) { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px 12px; }
  body.has-shell .admin-hero-content:has(> .ill-sticker) > .ill-sticker { --s: 44px; grid-column: 1; grid-row: 1; }
  body.has-shell .admin-hero-content:has(> .ill-sticker) > .admin-hero-text { display: contents; }
  body.has-shell .admin-hero-content:has(> .ill-sticker) > .admin-hero-text > * { grid-column: 1 / -1; }
  body.has-shell .admin-hero-content:has(> .ill-sticker) > .admin-hero-text > h1 { grid-column: 2; grid-row: 1; margin: 0; }
  body.has-shell .admin-hero-content:has(> .ill-sticker) > .admin-hero-actions { grid-column: 1 / -1; }
  body.has-shell :is(.admin-hero-text p, .page-hero p) { font-size: 1rem; }
}
/* Petits boutons d'icône (copier une valeur) : zone de toucher élargie autour de l'icône, sans changer la mise en page */
@media (max-width: 768px) {
  [data-copy] { position: relative; }
  [data-copy]::after { content: ''; position: absolute; inset: -11px; }
}
