/*
 * ImajeSanté - charte graphique de l'intranet (2026)
 * Reprend l'identité du site public imajesante.fr :
 *   police Open Sans, orange #EE964B, texte gris anthracite #3C3A47,
 *   vert d'eau #02C39A, rose #EA2C59, boutons arrondis.
 * Ce fichier est chargé après le thème Materialize et le surcharge.
 * Pour revenir à l'ancien aspect, il suffit de retirer la ligne qui le charge
 * dans imajesante/templates/imajesante/base.html.
 */

/* ---------- Police (hébergée sur le NAS, aucun appel externe) ---------- */
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../font/open-sans/open-sans-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../font/open-sans/open-sans-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../font/open-sans/open-sans-latin-700-normal.woff2') format('woff2');
}

/* ---------- Couleurs ---------- */
:root {
  --brand: #EE964B;          /* orange du site public */
  --brand-soft: #FDF0E4;     /* fond orange très clair */
  --brand-text: #A9530F;     /* orange foncé, lisible sur fond blanc */
  --ink: #3C3A47;            /* texte principal */
  --ink-soft: #6B6876;       /* texte secondaire */
  --ink-on-brand: #2B2933;   /* texte sur bouton orange */
  --teal: #02C39A;
  --teal-text: #017A61;
  --rose: #EA2C59;
  --rose-text: #C81E47;
  --bg: #F7F5F2;             /* fond de page, blanc cassé chaud */
  --surface: #FFFFFF;
  --line: #E7E3DE;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(60, 58, 71, .06), 0 2px 8px rgba(60, 58, 71, .06);
  --sidenav-w: 264px;
  --topbar-h: 64px;
}

/* ---------- Base ---------- */
html {
  font-family: 'Open Sans', Helvetica, Arial, sans-serif;
  color: var(--ink);
  font-size: 15px;
  -webkit-text-size-adjust: 100%;
}
body {
  background: var(--bg);
  color: var(--ink);
}
a { color: var(--brand-text); }
a:hover { color: var(--ink); }
::selection { background: var(--brand-soft); }

h1, h2, h3, h4, h5, h6 {
  font-family: 'Open Sans', Helvetica, Arial, sans-serif;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -.01em;
}
h1 { font-size: 2rem; margin: 1.2rem 0 1rem; }
h2 { font-size: 1.75rem; margin: 1.2rem 0 1rem; line-height: 1.25; }
h3 { font-size: 1.35rem; margin: 1.4rem 0 .8rem; line-height: 1.3; }
h4 { font-size: 1.5rem; margin: 1.2rem 0 .6rem; line-height: 1.3; }
h5 { font-size: 1.15rem; margin: 1rem 0 .6rem; }
h6 { font-size: 1rem; }

/* Lien d'évitement pour la navigation au clavier */
.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 1001;
  background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px;
}
.skip-link:focus { left: 8px; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- Mise en page générale ---------- */
main > .container {
  width: auto;
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 24px 32px;
}
main > .main-wide { padding: 0 24px 32px; }
main > .main-wide:empty { display: none; }

@media only screen and (min-width: 993px) {
  body.with-nav header,
  body.with-nav main,
  body.with-nav footer { padding-left: var(--sidenav-w); }
}
@media only screen and (max-width: 600px) {
  main > .container { padding: 12px 12px 24px; }
  main > .main-wide { padding: 0 8px 24px; }
  .row { margin-bottom: 12px; }
}

/* ---------- Barre du haut ---------- */
.navbar-fixed { height: var(--topbar-h); z-index: 997; }
nav.topbar {
  height: var(--topbar-h);
  line-height: var(--topbar-h);
  background: var(--surface);
  color: var(--ink);
  box-shadow: none;
  border-bottom: 1px solid var(--line);
  border-top: 4px solid var(--brand);
}
@media only screen and (min-width: 993px) {
  .navbar-fixed nav.topbar { left: var(--sidenav-w); width: calc(100% - var(--sidenav-w)); }
  nav.topbar .topbar-brand { display: none; }
}
nav.topbar .nav-wrapper { display: flex; align-items: center; height: 100%; padding: 0 12px; }
nav.topbar a, nav.topbar i, nav.topbar .material-icons { color: var(--ink); height: auto; line-height: normal; }
nav.topbar a.topbar-menu {
  display: none; margin: 0 4px 0 0; padding: 8px; border-radius: 50%;
}
nav.topbar a.topbar-menu:hover { background: var(--brand-soft); }
@media only screen and (max-width: 992px) {
  nav.topbar a.topbar-menu { display: inline-flex; }
}
nav.topbar .topbar-brand { display: inline-flex; align-items: center; gap: 10px; padding: 0 6px; }
nav.topbar .topbar-brand img { height: 36px; width: auto; display: block; }
nav.topbar .topbar-label {
  font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink-soft); border-left: 1px solid var(--line); padding-left: 10px;
}
nav.topbar ul.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
nav.topbar ul.topbar-actions li { float: none; }
nav.topbar ul.topbar-actions a {
  display: inline-flex; align-items: center; padding: 8px 12px; border-radius: 999px;
  font-weight: 600; font-size: .95rem;
}
nav.topbar ul.topbar-actions a:hover { background: var(--brand-soft); color: var(--ink); }
nav.topbar ul.topbar-actions a i.left { margin-right: 6px; font-size: 20px; }
nav.topbar .topbar-user {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 4px; padding: 3px 12px 3px 3px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); line-height: 1.2;
}
nav.topbar .topbar-initials {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--brand); color: var(--ink-on-brand); font-weight: 700; font-size: .8rem;
}
nav.topbar .topbar-name { font-weight: 600; font-size: .9rem; color: var(--ink); white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
/* téléphone et tablette : les initiales seules */
@media only screen and (max-width: 992px) {
  nav.topbar .topbar-user { padding: 0; border: 0; background: transparent; }
  nav.topbar .topbar-name { display: none; }
}
@media only screen and (max-width: 600px) {
  nav.topbar .topbar-label { display: none; }
  nav.topbar .topbar-brand img { height: 30px; }
}

/* ---------- Menu latéral ---------- */
.sidenav {
  width: var(--sidenav-w);
  min-width: 0;
  background: var(--surface);
  border-right: 1px solid var(--line);
  box-shadow: none;
  padding-bottom: 24px;
}
.sidenav li > a, .sidenav .collapsible-header {
  color: var(--ink);
  font-weight: 600;
  font-size: .95rem;
  height: 44px;
  line-height: 44px;
  border-radius: 10px;
  margin: 0 10px;
  padding: 0 12px;
}
.sidenav li > a > i.material-icons, .sidenav .collapsible-header > i.material-icons {
  color: var(--ink-soft);
  height: 44px; line-height: 44px; margin-right: 0;
}
.sidenav li > a:hover, .sidenav .collapsible-header:hover { background: var(--brand-soft); }
.sidenav .collapsible-body { background: transparent; }
.sidenav .collapsible-body li a {
  font-weight: 400; height: 38px; line-height: 38px; padding-left: 24px; margin: 0 10px;
}
.sidenav .collapsible-body li a.active { background: transparent; }
.sidenav .collapsible-body li a i.material-icons { height: 38px; line-height: 38px; font-size: 20px; }
.sidenav .subheader {
  font-size: .72rem !important; text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink-soft) !important; height: 32px !important; line-height: 32px !important; font-weight: 700 !important;
}
.sidenav li.active > a, .sidenav .collapsible > li.active > .collapsible-header {
  background: var(--brand-soft);
}
.sidenav .collapsible > li.active > .collapsible-header { box-shadow: inset 3px 0 0 var(--brand); }
.sidenav .collapsible-header .chevron { margin-left: auto; transition: transform .2s; }
.sidenav .collapsible > li.active .collapsible-header .chevron { transform: rotate(-90deg); }
.sidenav .sidenav-head { padding: 14px 18px 10px; border-top: 4px solid var(--brand); }
.sidenav .sidenav-head a.sidenav-logo { height: auto; line-height: normal; padding: 0; margin: 0; }
.sidenav .sidenav-head a.sidenav-logo:hover { background: transparent; }
.sidenav .sidenav-head img { height: 44px; width: auto; display: block; }
.sidenav li.sidenav-quick > a { background: var(--bg); margin-bottom: 6px; }
.sidenav li.sidenav-quick > a:hover { background: var(--brand-soft); }
.sidenav li.sidenav-quick > a > i.material-icons { color: var(--brand-text); }
.sidenav .divider { margin: 8px 16px; background: var(--line); }
.sidenav .user-view { display: none; }
.sidenav-overlay { background: rgba(43, 41, 51, .45); }

/* ---------- Cartes, panneaux ---------- */
.card, .card-panel, .collapsible, .modal, .dropdown-content {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card { border: 1px solid var(--line); }
.card .card-content { padding: 20px; }
.collapsible { border: 1px solid var(--line); overflow: hidden; }
.collapsible-header { border-bottom: 1px solid var(--line); font-weight: 600; }
.collapsible-body { border-bottom: 1px solid var(--line); }
.divider { background-color: var(--line); }

/* ---------- Boutons ---------- */
.btn, .btn-large, .btn-small {
  background-color: var(--brand);
  color: var(--ink-on-brand);
  border-radius: 999px;
  text-transform: none;
  font-weight: 600;
  letter-spacing: 0;
  box-shadow: none;
  padding: 0 20px;
}
.btn:hover, .btn-large:hover, .btn-small:hover,
.btn:focus, .btn-large:focus, .btn-small:focus {
  background-color: #E5822F;
  color: var(--ink-on-brand);
  box-shadow: 0 2px 6px rgba(238, 150, 75, .35);
}
.btn i, .btn-large i, .btn-small i { color: inherit; }
.btn-flat { border-radius: 999px; color: var(--ink); text-transform: none; font-weight: 600; }
.btn-flat:hover { background: var(--brand-soft); }
.btn.disabled, .btn:disabled { background-color: #E7E3DE !important; color: #9A97A3 !important; }
.btn.red, .btn.danger { background-color: var(--rose-text); color: #fff; }

/* ---------- Champs de formulaire ---------- */
input:not([type]):focus:not([readonly]),
input[type=text]:not(.browser-default):focus:not([readonly]),
input[type=password]:not(.browser-default):focus:not([readonly]),
input[type=email]:not(.browser-default):focus:not([readonly]),
input[type=url]:not(.browser-default):focus:not([readonly]),
input[type=time]:not(.browser-default):focus:not([readonly]),
input[type=date]:not(.browser-default):focus:not([readonly]),
input[type=datetime-local]:not(.browser-default):focus:not([readonly]),
input[type=tel]:not(.browser-default):focus:not([readonly]),
input[type=number]:not(.browser-default):focus:not([readonly]),
input[type=search]:not(.browser-default):focus:not([readonly]),
textarea.materialize-textarea:focus:not([readonly]) {
  border-bottom: 1px solid var(--brand);
  box-shadow: 0 1px 0 0 var(--brand);
}
.input-field input:focus + label,
.input-field textarea:focus + label,
.input-field input:focus:not([readonly]) + label { color: var(--brand-text) !important; }
.input-field > label, label { color: var(--ink-soft); }
.input-field { margin-top: 1.2rem; }
textarea, input:not([type]),
input[type=text]:not(.browser-default), input[type=password]:not(.browser-default),
input[type=email]:not(.browser-default), input[type=tel]:not(.browser-default),
input[type=number]:not(.browser-default), input[type=date]:not(.browser-default),
input[type=search]:not(.browser-default) {
  background-color: transparent;
  color: var(--ink);
}
textarea { border: 1px solid var(--line); border-radius: 8px; padding: 8px; min-height: 80px; }
.dropdown-content li > a, .dropdown-content li > span { color: var(--ink); }
.dropdown-content li:hover, .dropdown-content li.active, .dropdown-content li.selected { background-color: var(--brand-soft); }
.select-wrapper input.select-dropdown:focus { border-bottom: 1px solid var(--brand); }
[type="checkbox"]:checked + span:not(.lever):before { border-right-color: var(--teal-text); border-bottom-color: var(--teal-text); }
[type="checkbox"].filled-in:checked + span:not(.lever):after { border-color: var(--teal-text); background-color: var(--teal-text); }
[type="radio"]:checked + span:after, [type="radio"].with-gap:checked + span:after { background-color: var(--brand); border-color: var(--brand); }
.switch label input[type=checkbox]:checked + .lever { background-color: #F9C7A0; }
.switch label input[type=checkbox]:checked + .lever:after { background-color: var(--rose-text); }
.help { color: var(--ink-soft); font-size: .85rem; }
.errorlist { color: var(--rose-text); padding-left: 0; list-style: none; font-size: .9rem; }

/* Bouton "Enregistrer" des formulaires : toujours visible en bas d'écran sur mobile */
button.save.btn { margin: 16px auto 8px; display: block; float: none; }

/* Formulaires en 2 colonnes -> 1 colonne sur téléphone */
@media only screen and (max-width: 600px) {
  main form .row .col, main form > .col, main form .input-field.col {
    width: 100% !important; margin-left: 0 !important; left: auto !important; right: auto !important;
  }
  button.save.btn { width: 100%; position: sticky; bottom: 12px; z-index: 5;
    box-shadow: 0 4px 14px rgba(60, 58, 71, .25); }
}

/* ---------- Onglets, sélecteur de dates ---------- */
.tabs { background: transparent; }
.tabs .tab a { color: var(--ink-soft); text-transform: none; font-weight: 600; }
.tabs .tab a:hover, .tabs .tab a.active { color: var(--ink); background: transparent; }
.tabs .indicator { background-color: var(--brand); height: 3px; }
.datepicker-date-display, .datepicker-table td.is-selected { background-color: var(--brand); color: var(--ink-on-brand); }
.datepicker-table td.is-today, .datepicker-cancel, .datepicker-clear, .datepicker-today, .datepicker-done,
.month-prev svg, .month-next svg { color: var(--brand-text); }
.timepicker-digital-display, .timepicker-canvas line, .timepicker-tick.active { background-color: var(--brand); }
.pagination li.active { background-color: var(--brand); }

/* ---------- Tableaux ---------- */
table { color: var(--ink); }
table thead th {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-soft); font-weight: 700;
}
table tr { border-bottom: 1px solid var(--line); }
table.striped > tbody > tr:nth-child(odd), table.dataTable.stripe tbody tr.odd { background-color: #FBFAF8; }
table.dataTable tbody tr:hover, main table:not(.dataTable) tbody tr:hover { background-color: var(--brand-soft); }
/* pas de surlignage au survol dans les plannings (FullCalendar utilise des tableaux) */
.fc table tbody tr:hover, .fc tr:hover { background-color: transparent !important; }
td, th { padding: 10px 10px; }
td .material-icons.small { font-size: 1.6rem; color: var(--brand-text); }

.dataTables_wrapper { border: 0; }
.dataTables_wrapper .dataTables_filter { width: 100%; padding: 12px 12px 4px; float: none; text-align: left; }
.dataTables_wrapper .dataTables_filter label { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: .9rem; }
.dataTables_wrapper .dataTables_filter input {
  flex: 1; max-width: 420px; height: 40px; margin: 0 !important;
  border: 1px solid var(--line) !important; border-radius: 999px; padding: 0 16px !important;
  background: var(--bg) !important; box-shadow: none !important;
}
.dataTables_wrapper .dataTables_filter input:focus { border-color: var(--brand) !important; background: #fff !important; }
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: var(--brand) !important; color: var(--ink-on-brand) !important; border: 0 !important; border-radius: 999px;
}
.dataTables_wrapper .dataTables_paginate .paginate_button { border-radius: 999px; }
.footer-wrapper { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; }
.footer-wrapper .dataTables_length select { display: inline-block; width: auto; }
.dataTables_wrapper .dataTables_info { color: var(--ink-soft); font-size: .85rem; }

/* Tableaux en "cartes" sur téléphone : une ligne = une carte, chaque valeur avec son titre */
@media only screen and (max-width: 600px) {
  main table.cards-mobile thead,
  .dataTables_wrapper .dataTables_scrollHead { display: none !important; }
  main table.cards-mobile { border: 0; }
  main table.cards-mobile > tbody > tr {
    display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px;
    background: var(--surface) !important; border: 1px solid var(--line); border-radius: var(--radius);
    margin: 0 0 10px; padding: 10px 12px;
  }
  main table.cards-mobile > tbody > tr > td {
    display: block; padding: 4px 0; border: 0; text-align: left !important; min-width: 0; overflow-wrap: anywhere;
  }
  main table.cards-mobile > tbody > tr > td[data-label]::before {
    content: attr(data-label); display: block; font-size: .7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft);
  }
  main table.cards-mobile > tbody > tr > td.dataTables_empty { grid-column: 1 / -1; }
  .dataTables_wrapper .dataTables_scrollBody { height: auto !important; max-height: none !important; overflow: visible !important; }
  .dataTables_wrapper .dataTables_scroll { overflow: visible; }
  table.dataTable { width: 100% !important; }
  .card table.dataTable { margin: 0; }
  main .col.card:has(.dataTables_wrapper) { padding: 0; background: transparent; border: 0; box-shadow: none; }
  /* Liste des jeunes : nom et prénom en tête de carte */
  #table-elements.cards-mobile > tbody > tr > td:nth-child(3),
  #table-elements.cards-mobile > tbody > tr > td:nth-child(4) { font-weight: 700; font-size: 1.05rem; }
}

/* ---------- En-tête de page (titre + bouton) ---------- */
.page-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  margin: 8px 0 16px;
}
.page-head h2, .page-head h4 { margin: 0; }
.page-head .page-sub { color: var(--ink-soft); margin: 4px 0 0; }
.badge-alert {
  display: inline-flex; align-items: center; gap: 4px; vertical-align: middle;
  background: #FDE6EB; color: var(--rose-text); font-size: .8rem; font-weight: 700;
  border-radius: 999px; padding: 2px 10px; margin-left: 8px;
}
.badge-alert i { font-size: 18px; }

/* ---------- Dossier jeune : onglets ---------- */
.folder-tabs {
  position: sticky; top: var(--topbar-h); z-index: 20;
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin;
  background: var(--bg); padding: 8px 0 10px; margin: 0 0 12px;
  -webkit-overflow-scrolling: touch;
}
.folder-tabs a {
  flex: 0 0 auto; white-space: nowrap; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-weight: 600; font-size: .9rem;
}
.folder-tabs a:hover { border-color: var(--brand); }
.folder-tabs a.active { background: var(--brand); border-color: var(--brand); color: var(--ink-on-brand); }
.folder-section > h3 { margin-top: .6rem; }
.js-tabs .folder-section { display: none; }
.js-tabs .folder-section.active { display: block; }
.folder-section > .col.card { width: 100%; padding: 8px 12px 16px; float: none; }
.folder-section > .col.card::after, main .card::after { content: ''; display: table; clear: both; }

/* Fenêtre d'historique (iframe) adaptée à l'écran */
.modal { width: 92%; max-width: 1000px; max-height: 85%; }
.modal iframe { width: 100%; height: 70vh; border: 0; }

/* ---------- Planning (FullCalendar) ---------- */
.fc { background: var(--surface); border-radius: var(--radius); padding: 8px; }
.fc-toolbar.fc-header-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; padding: 0 4px; }
.fc-toolbar.fc-header-toolbar > div { float: none; }
.fc-toolbar.fc-header-toolbar .fc-center { flex: 1; text-align: center; }
.fc-toolbar.fc-header-toolbar h2 { font-size: 1.15rem; font-weight: 600; color: var(--ink); line-height: 36px; margin: 0; }
.fc-toolbar.fc-header-toolbar .fc-button {
  background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 999px;
  height: 34px; padding: 0 12px; text-shadow: none; box-shadow: none; font-weight: 600; text-transform: none;
}
.fc-toolbar.fc-header-toolbar .fc-button.fc-state-active,
.fc-toolbar.fc-header-toolbar .fc-button:active {
  background: var(--brand); color: var(--ink-on-brand); border-color: var(--brand);
}
.fc-toolbar .fc-button-group > .fc-button { margin-left: 4px; }
.fc-unthemed td.fc-today { background: var(--brand-soft); }
.fc-now-indicator { border-color: var(--rose) !important; }
.fc-event { border-radius: 6px; font-size: .8rem; }
.fc-day-header { font-weight: 600; color: var(--ink); }
.fc-agenda-view .fc-day-header { font-size: 1rem; }
@media only screen and (max-width: 768px) {
  .fc-toolbar.fc-header-toolbar .fc-center { order: -1; flex-basis: 100%; }
  .fc-toolbar.fc-header-toolbar .fc-left, .fc-toolbar.fc-header-toolbar .fc-right { flex: 1; }
  .fc-toolbar.fc-header-toolbar .fc-right { text-align: right; }
  .fc-agenda-view .fc-day-header { font-size: .9rem; }
  .fc { padding: 4px; }
}

/* Panneau "Détails de l'évènement" du planning des membres */
.event-details-panel {
  position: sticky; top: calc(var(--topbar-h) + 8px); z-index: 30;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 10px 14px; margin: 8px 0 12px; min-height: 64px;
  font-size: .9rem;
}
@media only screen and (max-width: 600px) {
  .event-details-panel { position: static; }
}

/* Boîte de dialogue jQuery UI (planning) */
.ui-dialog { border-radius: var(--radius); font-family: 'Open Sans', sans-serif; z-index: 1003 !important; max-width: 95vw; }
.ui-widget-header { background: var(--brand-soft); border: 0; color: var(--ink); border-radius: 8px; }
.ui-dialog input[type=button] {
  background: var(--brand); color: var(--ink-on-brand); border: 0; border-radius: 999px;
  padding: 8px 16px; font-weight: 600; margin: 8px 6px 0 0; cursor: pointer;
}
.ui-dialog textarea { width: 100%; }

/* ---------- Page de connexion ---------- */
body.no-nav main > .container { max-width: 440px; padding-top: 8vh; }
.card.card-login { border-radius: 16px; overflow: hidden; border-top: 6px solid var(--brand); }
.card-login .card-login-splash { padding: 28px 24px 4px; text-align: center; background: var(--surface); }
.card-login .card-login-splash img { max-width: 240px; height: auto; }
.card-login .card-title { font-weight: 600 !important; font-size: 1.3rem !important; display: block; text-align: center; }
.card-login input[type=submit].btn { width: 100%; float: none !important; margin-top: 12px; height: 44px; }
.card-login .login-hint { color: var(--ink-soft); font-size: .85rem; text-align: center; margin-top: 16px; }

/* ---------- Divers ---------- */
.highlight { background-color: var(--brand-soft); }
.history-header { background-color: var(--bg); }
.material-icons.medium { font-size: 2.2rem; vertical-align: middle; }
.toast { border-radius: 999px; background: var(--ink); }

@media print {
  nav.topbar, .sidenav, .folder-tabs { display: none !important; }
  body.with-nav main, body.with-nav header { padding-left: 0 !important; }
}

/* ---------- Ajustements ---------- */
@media only screen and (min-width: 993px) {
  nav.topbar a.topbar-menu, nav.topbar .topbar-brand { display: none !important; }
}
/* Menu latéral : rubriques sans cadres ni majuscules */
.sidenav .collapsible, .sidenav .collapsible > li { border: 0 !important; box-shadow: none !important; border-radius: 0; background: transparent; }
.sidenav .collapsible-header { border: 0 !important; text-transform: none; display: flex; align-items: center; }
.sidenav li > a { display: flex; align-items: center; gap: 12px; }
.sidenav li > a > i.material-icons { margin: 0 !important; float: none; }
.sidenav .collapsible-body li a { justify-content: space-between; }
.sidenav .collapsible-body li a > i.material-icons { color: var(--brand-text); }
.sidenav li.sidenav-quick > a { justify-content: flex-start; }
/* Connexion : logo au-dessus du formulaire */
.card.card-login { display: block; }
.card.card-login .card-login-splash, .card.card-login .card-content { display: block; width: auto; float: none; }
.card-login .card-login-splash img { margin: 0 auto; }
/* Liste des jeunes sur mobile : nom et prénom en premier */
@media only screen and (max-width: 600px) {
  #table-elements > tbody > tr > td:nth-child(3),
  #table-elements > tbody > tr > td:nth-child(4) { order: -1; }
}

.card-login .card-login-splash { height: auto !important; overflow: visible !important; position: static !important; background: none !important; }
.card-login .card-login-splash img { position: static !important; transform: none !important; width: 240px; max-width: 100%; height: auto; display: block; }
.card-login .card-login-splash img { min-width: 0 !important; margin: 0 auto; }
.sidenav .collapsible-header { text-transform: none !important; letter-spacing: 0 !important; }
.sidenav .collapsible-header > i.chevron { margin-left: auto !important; margin-right: 0 !important; width: auto !important; }

/* ---------- Planning des membres : lisibilité ---------- */
.planning-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 8px; }
.planning-filter { position: relative; flex: 0 1 340px; }
.planning-filter .material-icons { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted, #6b6a75); font-size: 20px; }
.planning-filter input[type=search] {
  box-sizing: border-box; width: 100%; height: 40px; margin: 0; padding: 0 12px 0 38px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: .95rem;
}
.planning-filter input[type=search]:focus { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.planning-count { font-size: .9rem; color: var(--muted, #6b6a75); }

/* Légende des types d'activité (cliquable) */
.activity-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 10px; }
.activity-legend-title { font-size: .85rem; font-weight: 600; color: var(--ink); margin-right: 4px; }
.activity-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font: inherit; font-size: .85rem; color: var(--ink); cursor: pointer;
}
.activity-chip:hover { border-color: var(--brand); }
.activity-chip.is-off { opacity: .45; text-decoration: line-through; }
/* statuts des actions dans les plannings */
.activity-legend-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; flex-basis: 100%; }
.activity-chip .ev-state { font-size: 17px; }
.activity-chip.st-todo .ev-state { color: #8A5A00; }
.fc-event .ev-state { font-size: 14px; vertical-align: -2px; margin-right: 3px; }
/* même rendu partout (planning, ligne « Statuts », fiche, pages Couleurs) :
   Venu·e = couleur normale ; Pas venu·e = hachuré ; Annulé = couleur du type estompée et barrée */
.ev-st-absent { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.38) 0 4px, transparent 4px 9px) !important; }
.ev-st-cancelled { opacity: .45; background-image: none !important; }
.ev-st-cancelled .fc-title, .ev-st-cancelled .fc-time, .ev-st-cancelled .co-st-label { text-decoration: line-through; }
.st-swatch { display: inline-block; width: 26px; height: 16px; border-radius: 4px; background-color: var(--teal-text); flex: none;
  position: relative; vertical-align: middle; }
.st-swatch.ev-st-cancelled::after { content: ""; position: absolute; left: 3px; right: 3px; top: 50%; border-top: 2px solid #fff; }
.activity-chip .st-swatch { margin-right: 2px; }
.rc-state .st-swatch { width: 18px; height: 12px; margin-right: 6px; }
.rc-status { display: flex; flex-wrap: wrap; gap: 6px; }
.co-st-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.co-st-sample { background-color: #2E86AB; color: #fff; border-radius: 6px; padding: 8px 10px; font-weight: 600; font-size: .9rem; }
.co-st p { margin: 6px 0 0; font-size: .85rem; color: var(--ink-soft); }
.co-st p b { color: var(--ink); }
.rc-state { display: inline-flex; align-items: center; }
.rc-state.is-on { font-weight: 700; border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--brand-soft); }
.rc-status-msg { display: block; font-size: .8rem; color: var(--ink-soft); margin-top: 4px; }
.fc-event.ev-st-todo .ev-state { color: inherit; opacity: .9; }
.activity-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }

/* Infobulle d'un évènement (remplace le grand panneau) */
.event-tip {
  position: fixed; z-index: 1002; max-width: 320px; pointer-events: none;
  background: var(--ink); color: #fff; border-radius: 10px; padding: 8px 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,.25); font-size: .88rem; line-height: 1.35;
}
.event-tip[hidden] { display: none; }
.event-tip strong { display: block; margin-bottom: 2px; }
.event-tip .tip-time { display: block; opacity: .85; }
.event-tip .tip-desc:not(:empty) { display: block; margin-top: 4px; opacity: .9; }

/* Colonne des membres : nom lisible et cliquable */
.fc-resource-area .fc-cell-text { font-size: .92rem; font-weight: 600; white-space: nowrap; }
.fc-resource-area a.member-link { color: var(--ink); text-decoration: none; border-bottom: 1px dotted var(--brand); }
.fc-resource-area a.member-link:hover { color: var(--brand-dark, #c86a1e); border-bottom-style: solid; }
.fc-timeline .fc-body .fc-resource-area tr:nth-child(even) td,
.fc-timeline .fc-body .fc-time-area .fc-rows tr:nth-child(even) td { background: rgba(60,58,71,.03); }

/* Évènements : texte lisible, sans ombre ni coupure sale */
.fc-timeline-event { border-radius: 4px; padding: 1px 3px; }
.fc-timeline-event .fc-title, .fc-time-grid-event .fc-title { font-weight: 600; }
.fc-event.act { text-shadow: none; }
.fc-time-grid-event .fc-time { font-weight: 400; }

/* Flèches précédent / suivant bien centrées */
.fc-toolbar .fc-prev-button, .fc-toolbar .fc-next-button { display: inline-flex; align-items: center; justify-content: center; width: 38px; padding: 0 !important; }
.fc-toolbar .fc-button .fc-icon { top: 0; height: auto; line-height: 1; margin: 0; vertical-align: middle; }

/* Le thème admin ajoutait le jour en anglais ("Mon", "Tue"...) au-dessus du jour en français */
.fc-day-header::before { content: none !important; display: none !important; }
@media only screen and (max-width: 600px) {
  .activity-legend { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .activity-chip { flex: none; }
  .activity-legend-title { flex: none; }
}
/* Couleurs d'activité franches : pas de voile blanc de FullCalendar */
.fc-event.act .fc-bg { opacity: 0; }

/* ---------- Bouton « Prendre un rendez-vous » (barre du haut) ---------- */
nav.topbar ul.topbar-actions a.topbar-cta {
  background: var(--brand); color: var(--ink-on-brand); border-radius: 999px;
  height: 38px; line-height: 38px; padding: 0 16px; margin: 0 6px; font-weight: 600; display: inline-flex; align-items: center;
}
nav.topbar ul.topbar-actions a.topbar-cta i { color: var(--ink-on-brand); margin-right: 6px; line-height: 38px; height: 38px; }
nav.topbar ul.topbar-actions a.topbar-cta:hover { filter: brightness(.95); }
@media only screen and (max-width: 600px) {
  nav.topbar ul.topbar-actions a.topbar-cta { padding: 0 10px; }
  nav.topbar ul.topbar-actions a.topbar-cta i { margin-right: 0; }
}

/* ---------- Prise de rendez-vous en 3 étapes ---------- */
.rdv-steps { display: grid; gap: 14px; margin: 0 0 16px; }
.rdv-step.card { margin: 0; padding: 16px 18px; }
.rdv-step-title { font-size: 1.1rem; font-weight: 700; margin: 0 0 12px; display: flex; align-items: center; gap: 10px; color: var(--ink); }
.rdv-step-num { display: inline-flex; width: 28px; height: 28px; border-radius: 50%; align-items: center; justify-content: center; background: var(--brand); color: var(--ink-on-brand); font-size: .95rem; }
.rdv-label { display: block; font-size: .85rem; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.rdv-help { font-size: .85rem; color: var(--ink-soft); margin: 8px 0; }
.rdv-error { color: #B3261E; font-weight: 600; margin: 8px 0 0; }
.rdv-error[hidden] { display: none; }
.young-picked { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; background: var(--brand-soft); font-weight: 600; }
.young-picked[hidden], .young-search[hidden] { display: none; }
.young-picked .btn-flat { margin-left: auto; }
.young-search .planning-filter { max-width: 520px; }
.young-results { list-style: none; margin: 6px 0 0; padding: 0; max-width: 520px; border-radius: 10px; overflow: hidden; }
.young-results li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-top: 0; cursor: pointer; background: var(--surface); }
.young-results li:first-child { border-top: 1px solid var(--line); border-radius: 10px 10px 0 0; }
.young-results li:last-child { border-radius: 0 0 10px 10px; }
.young-results li:only-child { border-radius: 10px; }
.young-results li:hover, .young-results li:focus { background: var(--brand-soft); outline: none; }
.young-results .young-num { color: var(--ink-soft); font-size: .85rem; }
.young-results .young-empty { cursor: default; color: var(--ink-soft); }
.rdv-type-filter { max-width: 340px; margin-bottom: 10px; }
.type-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.type-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; background: var(--surface); font-size: .92rem; color: var(--ink); }
.type-chip input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.type-chip:hover { border-color: var(--brand); }
.type-chip:has(input:checked) { border-color: var(--ink); background: var(--brand-soft); font-weight: 700; box-shadow: inset 0 0 0 1px var(--ink); }
.type-chip:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.rdv-when { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; margin-bottom: 6px; }
.rdv-field { flex: 0 1 200px; }
.rdv-field-wide { flex: 1 1 300px; }
.rdv-field input[type=date], .rdv-field input[type=time], .rdv-field select:not(.browser-default) + *, .rdv-textarea { font-size: 1rem; }
.rdv-textarea { width: 100%; min-height: 60px; border: 1px solid var(--line); border-radius: 8px; padding: 8px; font: inherit; resize: vertical; }
.rdv-field .select-wrapper input.select-dropdown { margin: 0; }
.rdv-results { margin: 6px 0 24px; }
.rdv-results[hidden] { display: none; }
.slot-day { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 16px; margin: 0 0 12px; }
.slot-day h4 { font-size: 1rem; font-weight: 700; margin: 4px 0 8px; color: var(--ink); }
.slot-day h4::first-letter, .rdv-summary #c-day::first-letter { text-transform: uppercase; }
.slot-list { margin: 0; padding: 0; list-style: none; }
.slot { display: grid; grid-template-columns: 130px 1fr 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.slot:first-child { border-top: 0; }
.slot-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.slot-place, .slot-who { color: var(--ink); }
.rdv-empty, .rdv-loading { color: var(--ink-soft); }
#more-btn[hidden] { display: none; }
@media only screen and (max-width: 600px) {
  .slot { grid-template-columns: 1fr auto; }
  .slot-who, .slot-place { grid-column: 1; font-size: .9rem; }
  .slot-pick { grid-row: 1 / span 3; grid-column: 2; }
}
.rdv-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 1001; }
.rdv-backdrop[hidden], .rdv-confirm[hidden], .rdv-done[hidden] { display: none !important; }
.rdv-confirm.card { position: fixed; z-index: 1002; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, 94vw); max-height: 92vh; overflow: auto; margin: 0; padding: 18px 20px; }
.rdv-confirm h3 { font-size: 1.2rem; font-weight: 700; margin: 0 0 12px; }
.rdv-summary { display: grid; grid-template-columns: 120px 1fr; gap: 4px 12px; margin: 0 0 14px; }
.rdv-summary dt { color: var(--ink-soft); }
.rdv-summary dd { margin: 0; font-weight: 600; }

.rdv-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.rdv-done.card { display: flex; gap: 16px; align-items: flex-start; padding: 18px 20px; }
.rdv-done > .material-icons { font-size: 40px; color: #1E9E3E; }
.rdv-done h3 { font-size: 1.2rem; font-weight: 700; margin: 0 0 6px; }
.rdv-actions-left { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.type-chip .type-chip-text { font-weight: inherit; }
.type-chip .activity-dot { display: inline-block; }
.type-chip input.type-radio + i::before, .type-chip input.type-radio + i::after { content: none !important; }

/* ---------- Menu latéral : icônes partout + version réduite ---------- */
.sidenav i.material-icons.nav-icon { color: var(--brand-text); font-size: 22px; width: 24px; flex: none; margin: 0 !important; }
.sidenav .collapsible-header { gap: 12px; }
.sidenav .collapsible-body li a { justify-content: flex-start !important; gap: 12px; }
.sidenav .collapsible-body li a i.material-icons.nav-icon { font-size: 20px; }
.sidenav .nav-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidenav .sidenav-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.nav-collapse-btn {
  display: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; align-items: center; justify-content: center; padding: 0; flex: none;
}
.nav-collapse-btn:hover { background: var(--brand-soft); }
.nav-collapse-btn i.material-icons { color: var(--ink); font-size: 22px; height: auto; line-height: 1; margin: 0; }
@media only screen and (min-width: 993px) {
  .nav-collapse-btn { display: inline-flex; }
  body.nav-collapsed { --sidenav-w: 72px; }
  body.nav-collapsed .sidenav { overflow-x: hidden; }
  body.nav-collapsed .sidenav .nav-text,
  body.nav-collapsed .sidenav .chevron,
  body.nav-collapsed .sidenav .subheader,
  body.nav-collapsed .sidenav .collapsible-body,
  body.nav-collapsed .sidenav .sidenav-logo { display: none !important; }
  body.nav-collapsed .sidenav .sidenav-head { justify-content: center; padding: 14px 0 10px; }
  body.nav-collapsed .sidenav .nav-collapse-btn i.material-icons { transform: rotate(180deg); }
  body.nav-collapsed .sidenav li > a, body.nav-collapsed .sidenav .collapsible-header { justify-content: center; padding: 0; margin: 0 10px; }
  body.nav-collapsed .sidenav .divider { margin: 8px 10px; }
  body.nav-collapsed .sidenav li.sidenav-quick > a { margin-bottom: 6px; }
}
.activity-dot.activity-square { border-radius: 3px; opacity: 1; border: 1px solid rgba(0,0,0,.15); margin-left: 4px; }

/* Prise de rendez-vous : le type d'abord, le dossier seulement si besoin */
.rdv-step[hidden], .rdv-summary [hidden], .rdv-field[hidden], .rdv-steps .btn[hidden], .rdv-done .btn[hidden], .young-search [hidden] { display: none !important; }
.type-group + .type-group { margin-top: 14px; }
.type-group-title { display: flex; align-items: center; gap: 6px; font-size: .9rem; font-weight: 700; color: var(--ink-soft); margin: 0 0 8px; text-transform: none; }
.type-group-title .material-icons { font-size: 18px; }
.kind-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.kind-tab { cursor: pointer; }
.kind-tab input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.kind-tab span { display: inline-block; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: .9rem; color: var(--ink); background: var(--surface); }
.kind-tab input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--ink-on-brand); font-weight: 700; }
.kind-tab input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.kind-tab input[type=radio] + span::before, .kind-tab input[type=radio] + span::after { content: none !important; }
.kind-tab input[type=radio] + span { padding-left: 14px !important; height: auto; line-height: 1.4; }

/* ---------- Calendrier de choix de date (imaje-datepicker.js) ---------- */
.idp-field { position: relative; display: flex; flex-wrap: wrap; align-items: center; max-width: 260px; }
.idp-original { display: none !important; }
input.idp-text { flex: 1 1 auto; width: 100%; height: 42px; margin: 0; padding: 0 44px 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font: inherit; font-size: 1rem; color: var(--ink); box-sizing: border-box; box-shadow: none; transition: border-color .15s, box-shadow .15s; }
input.idp-text:hover { border-color: #CFC9C2; }
input.idp-text:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(238, 150, 75, .25); }
input.idp-text.is-invalid { border-color: var(--rose); }
.idp-btn { position: absolute; right: 4px; top: 4px; width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--brand-text); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.idp-btn:hover, .idp-btn[aria-expanded="true"] { background: var(--brand-soft); }
.idp-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.idp-btn .material-icons { font-size: 20px; }
.idp-hint { flex-basis: 100%; font-size: .8rem; color: var(--ink-soft); min-height: 1.2em; margin-top: 3px; }
.idp-hint::first-letter { text-transform: uppercase; }
input.idp-text.is-invalid ~ .idp-hint { color: var(--rose-text); }
.idp-pop { position: fixed; z-index: 2000; width: 304px; max-width: calc(100vw - 16px); box-sizing: border-box; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 30px rgba(60, 58, 71, .18); font-family: 'Open Sans', Helvetica, Arial, sans-serif; color: var(--ink); }
.idp-head { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.idp-nav { width: 32px; height: 32px; flex: 0 0 32px; border: 0; border-radius: 50%; background: transparent; font-size: 22px; line-height: 1; color: var(--ink); cursor: pointer; padding: 0; }
.idp-nav:hover { background: var(--brand-soft); color: var(--brand-text); }
select.idp-select { flex: 1 1 auto; text-overflow: clip; height: 32px; min-width: 0; padding: 0 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font: inherit; font-size: .9rem; font-weight: 700; color: var(--ink); cursor: pointer; }
select.idp-select:first-of-type { text-transform: capitalize; }
.idp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.idp-dow { text-align: center; font-size: .75rem; font-weight: 700; color: var(--ink-soft); padding: 4px 0; }
.idp-day { height: 36px; border: 0; border-radius: 50%; background: transparent; font: inherit; font-size: .9rem; color: var(--ink); cursor: pointer; padding: 0; }
.idp-day.is-weekend { color: var(--ink-soft); }
.idp-day.is-out { color: #B9B4AE; }
.idp-day:hover:not(:disabled) { background: var(--brand-soft); color: var(--brand-text); }
.idp-day.is-today { box-shadow: inset 0 0 0 2px var(--brand); font-weight: 700; }
.idp-day.is-selected, .idp-day.is-selected:hover { background: var(--brand); color: var(--ink-on-brand); font-weight: 700; box-shadow: none; }
.idp-day:disabled { color: #D5D0CA; cursor: not-allowed; text-decoration: line-through; }
.idp-day:focus-visible, .idp-short:focus-visible, .idp-nav:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.idp-foot { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.idp-short { border: 1px solid var(--line); border-radius: 999px; background: var(--surface); padding: 5px 11px; font: inherit; font-size: .82rem; font-weight: 600; color: var(--ink); cursor: pointer; }
.idp-short:hover:not(:disabled) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-text); }
.idp-short:disabled { opacity: .45; cursor: not-allowed; }
.idp-clear { margin-left: auto; color: var(--ink-soft); }
/* dans les formulaires Materialize (.input-field), l'étiquette reste au-dessus du champ */
.input-field .idp-field { margin-top: 22px; }
.input-field > label.idp-label { transform: none !important; top: 0; left: 0; font-size: .85rem; font-weight: 600; color: var(--ink); pointer-events: none; }
select.idp-select:first-of-type { flex: 1.5 1 0; }
select.idp-select:last-of-type { flex: 1 1 0; }
.idp-pop.idp-sheet { left: 0; right: 0; bottom: 0; top: auto; width: auto; max-width: none; border-radius: 16px 16px 0 0; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 30px rgba(60, 58, 71, .25); }
.idp-sheet .idp-day { height: 42px; font-size: 1rem; }

/* Prise de rdv : durée et membres en puces */
.rdv-steps select[hidden] { display: none !important; }
.pick-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pick-chips-more { margin-top: 6px; }
.pick-chips[hidden] { display: none !important; }
.pick-chip { cursor: pointer; display: inline-flex; }
.pick-chip input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.pick-chip input[type=radio] + span { display: inline-flex; align-items: baseline; gap: 5px; height: auto; line-height: 1.3; padding: 8px 14px !important; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: .92rem; color: var(--ink); }
.pick-chip input[type=radio] + span::before, .pick-chip input[type=radio] + span::after { content: none !important; }
.pick-chip input[type=radio] + span small { font-size: .78rem; color: var(--ink-soft); }
.pick-chip:hover input + span, button.pick-more:hover { border-color: var(--brand); }
.pick-chip input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--ink-on-brand); font-weight: 700; }
.pick-chip input:checked + span small { color: var(--ink-on-brand); }
.pick-chip input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
button.pick-more { border: 1px dashed #CFC9C2; border-radius: 999px; background: transparent; padding: 8px 14px; font: inherit; font-size: .92rem; color: var(--ink-soft); }
button.pick-more[aria-expanded="true"] { border-style: solid; color: var(--ink); }
.rdv-members { margin: 14px 0 6px; }
.rdv-members-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 8px; }
.rdv-members-head .rdv-label { margin: 0; }
.rdv-members-count { font-size: .85rem; font-weight: 700; color: var(--brand-text); }
.rdv-members-filter { max-width: 240px; flex: 1 1 180px; margin: 0; }
.members-link { border: 0; background: none; padding: 4px 2px; font: inherit; font-size: .85rem; font-weight: 600; color: var(--brand-text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.members-link:hover { color: var(--ink); }
.members-link[hidden] { display: none !important; }
.member-chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 260px; overflow-y: auto; padding: 2px; }
.member-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px 4px 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer; font-size: .92rem; color: var(--ink); white-space: nowrap; user-select: none; }
.member-chip input[type=checkbox] { position: absolute; opacity: 0; pointer-events: none; }
.member-avatar { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%; background: var(--c, #999); color: #fff; font-style: normal; font-size: .72rem; font-weight: 700; letter-spacing: .02em; line-height: 1; text-shadow: 0 0 2px rgba(0,0,0,.35); }
.member-chip:hover { border-color: var(--brand); }
.member-chip:has(input:checked) { background: var(--brand-soft); border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); font-weight: 700; }
.member-chip:has(input:checked) .member-avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--brand); }
.member-chip:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
/* interrupteur « L'une ou l'autre / Ensemble » */
.seg-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--surface); }
.seg-toggle[hidden] { display: none !important; }
.seg-toggle label { cursor: pointer; display: inline-flex; }
.seg-toggle input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.seg-toggle input[type=radio] + span { display: inline-block; height: auto; line-height: 1.3; padding: 5px 12px !important; border-radius: 999px; font-size: .85rem; font-weight: 600; color: var(--ink-soft); }
.seg-toggle input[type=radio] + span::before, .seg-toggle input[type=radio] + span::after { content: none !important; }
.seg-toggle input:checked + span { background: var(--brand); color: var(--ink-on-brand); }
.seg-toggle input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 1px; }
/* Prise de rdv : choix du lieu */
.rdv-places { margin: 14px 0 6px; }
.rdv-places[hidden] { display: none !important; }
.place-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer; font-size: .92rem; color: var(--ink); user-select: none; }
.place-chip input[type=checkbox] { position: absolute; opacity: 0; pointer-events: none; }
.place-swatch { width: 14px; height: 14px; border-radius: 4px; background: var(--c, #999); border: 1px solid rgba(0,0,0,.15); flex: 0 0 14px; }
.place-chip:hover { border-color: var(--brand); }
.place-chip:has(input:checked) { background: var(--brand-soft); border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); font-weight: 700; }
.place-chip:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.rdv-why { margin: 8px 0 0; padding: 10px 14px; border-radius: 10px; background: var(--brand-soft); color: var(--ink); font-size: .9rem; }
.fc-event .ev-group { font-size: 13px; vertical-align: -2px; margin-right: 2px; color: inherit; }

/* Mon agenda sur téléphone */
.agenda-card.card { padding: 16px 18px; margin: 0 0 14px; }
.agenda-card h3 { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; font-weight: 700; margin: 0 0 10px; color: var(--ink); }
.agenda-warning { display: flex; gap: 14px; align-items: flex-start; border-left: 4px solid var(--brand); }
.agenda-warning > .material-icons { color: var(--brand-text); font-size: 28px; }
.agenda-warning p { margin: 0 0 6px; }
.agenda-https { color: var(--rose-text); }
.agenda-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.agenda-grid .agenda-card.card { margin: 0; }
.agenda-link { display: flex; gap: 8px; flex-wrap: wrap; }
.agenda-link input { flex: 1 1 200px; min-width: 0; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: .85rem; color: var(--ink-soft); background: var(--bg); }
#copy-ok[hidden] { display: none; }

/* ---------- Dossier jeune : résumé, rubriques en lecture, suivi ---------- */
.btn.btn-light, .btn-small.btn-light { background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.btn.btn-light:hover, .btn.btn-light:focus { background: var(--brand-soft); border-color: var(--brand); box-shadow: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.yf-head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.yf-tab-n { font-weight: 400; opacity: .7; font-size: .85em; margin-left: 2px; }
.yf-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.yf-stack { display: grid; gap: 16px; }
main .card.yf-card { margin: 0 0 16px; padding: 16px 20px; }
.yf-grid .card.yf-card, .yf-stack .card.yf-card { margin: 0; }
.yf-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.yf-card-head h3 { font-size: 1.15rem; margin: 0; font-weight: 700; }
.yf-more { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: .9rem; color: var(--brand-text); }
.yf-more i { font-size: 18px; }
.yf-next { border-left: 4px solid var(--brand); background: var(--brand-soft); border-radius: 8px; padding: 10px 14px; margin-bottom: 8px; }
.yf-next-k { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--brand-text); }
.yf-next-k span { text-transform: none; font-weight: 600; letter-spacing: 0; }
.yf-next-t { font-weight: 700; font-size: 1.05rem; }
.yf-next-s { color: var(--ink-soft); }
.yf-recent { margin: 0; }
.yf-recent li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.yf-recent li:last-child { border-bottom: 0; }
.yf-recent-d { flex: 0 0 96px; color: var(--ink-soft); font-size: .9rem; }
.yf-recent-t { flex: 1; min-width: 0; }
.yf-arrow { color: var(--ink-soft); }
.yf-state { display: inline-block; font-size: .78rem; font-weight: 600; border-radius: 999px; padding: 1px 9px; background: #EFEDEA; color: var(--ink-soft); white-space: nowrap; }
.yf-state[data-state^="realis"] { background: #E3F6EF; color: var(--teal-text); }
.yf-state[data-state^="prev"], .yf-state[data-state^="planif"] { background: var(--brand-soft); color: var(--brand-text); }
.yf-state[data-state^="annul"] { background: #F3F2F0; color: #8A8794; }
.yf-none { color: var(--ink-soft); margin: 4px 0; }
.yf-kv { display: grid; grid-template-columns: minmax(120px, 40%) 1fr; row-gap: 8px; column-gap: 12px; margin: 0; }
.yf-kv dt { color: var(--ink-soft); }
.yf-kv dd { margin: 0; overflow-wrap: anywhere; }
.yf-missing { color: var(--brand-text); font-weight: 600; }
.yf-progress { margin: 0; }
.yf-progress a { display: flex; align-items: center; gap: 10px; padding: 6px 0; color: var(--ink); border-radius: 6px; }
.yf-progress a:hover .yf-progress-n { color: var(--brand-text); }
.yf-progress-n { flex: 0 0 42%; }
.yf-bar { flex: 1; height: 8px; border-radius: 4px; background: #EFEDEA; overflow: hidden; }
.yf-bar i { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
.yf-progress-c { flex: 0 0 52px; text-align: right; color: var(--ink-soft); font-size: .85rem; }
/* rubriques */
.yf-section { scroll-margin-top: calc(var(--topbar-h) + 64px); transition: box-shadow .3s; }
.yf-section.just-saved { box-shadow: 0 0 0 3px var(--teal); }
.yf-section.editing { box-shadow: 0 0 0 2px var(--brand); }
.yf-count { font-weight: 400; font-size: .85rem; color: var(--ink-soft); margin-left: 6px; }
.yf-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px 24px; margin: 0; }
.yf-field dt { font-size: .8rem; color: var(--ink-soft); }
.yf-field dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.yf-field.yf-long { grid-column: 1 / -1; }
.yf-edit-link { background: none; border: 0; padding: 0; margin-top: 12px; font: inherit; font-size: .9rem; font-weight: 600; color: var(--brand-text); cursor: pointer; }
.yf-edit-link:hover { text-decoration: underline; }
.yf-form[hidden], .yf-read[hidden], .yf-edit-btn[hidden], .yf-action-edit[hidden], .yf-toast[hidden] { display: none !important; }
.yf-form-actions { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.yf-history { margin-top: 14px; font-size: .9rem; }
.yf-history summary { cursor: pointer; color: var(--ink-soft); font-weight: 600; display: flex; align-items: center; gap: 6px; list-style: none; }
.yf-history summary::-webkit-details-marker { display: none; }
.yf-history summary .material-icons { font-size: 18px; }
.yf-history summary small { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 0 7px; font-weight: 600; }
/* historique : liste lisible */
.hl-list { list-style: none; margin: 8px 0 0; padding: 0 0 0 4px; border-left: 2px solid var(--line); }
.hl-item { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 0 8px 16px; border-bottom: 1px solid var(--line); }
.hl-item:last-child { border-bottom: 0; }
.hl-dot { position: absolute; left: -7px; top: 50%; margin-top: -6px; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); border: 2px solid var(--surface); }
.hl-dot.hl-add { background: var(--teal); }
.hl-dot.hl-del { background: var(--rose); }
.hl-text { flex: 1; display: flex; flex-wrap: wrap; gap: 2px 10px; min-width: 0; }
.hl-when { font-weight: 600; color: var(--ink); }
.hl-who { color: var(--ink-soft); }
.hl-fields { flex-basis: 100%; color: var(--ink); overflow-wrap: anywhere; }
.hl-fields.hl-none { color: var(--ink-soft); font-style: italic; }
.hl-open { flex: none; color: var(--brand-text) !important; font-weight: 600; text-transform: none; padding: 0 10px; }
@media (max-width: 600px) { .hl-item { flex-wrap: wrap; } .hl-open { margin-left: -10px; } }
/* historique : détail d'une modification */
.hv-modal .modal-content { padding: 20px 24px; }
.hv-modal-title { font-size: 1.25rem; margin: 0 0 12px; font-weight: 600; }
.hv-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 8px; }
.hv-when { margin: 0; color: var(--ink-soft); }
.hv-when::first-letter { text-transform: uppercase; }
.hv-badge { display: inline-block; border-radius: 12px; padding: 2px 10px; font-size: .8rem; font-weight: 600; background: var(--brand-soft); color: var(--brand-text); }
.hv-badge.hv-add { background: #E3F7F1; color: var(--teal-text); }
.hv-badge.hv-del { background: #FDE6EC; color: var(--rose-text); }
.hv-title { font-size: 1rem; font-weight: 600; margin: 14px 0 2px; }
.hv-help, .hv-empty, .hv-loading { color: var(--ink-soft); font-size: .9rem; margin: 0 0 8px; }
.hv-list { list-style: none; margin: 8px 0 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); }
.hv-item { display: grid; grid-template-columns: minmax(140px, 30%) 1fr; gap: 4px 16px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.hv-item:last-child { border-bottom: 0; }
.hv-label { font-size: .85rem; color: var(--ink-soft); font-weight: 600; }
.hv-values { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; overflow-wrap: anywhere; }
.hv-long .hv-values { display: block; }
.hv-long .hv-before, .hv-long .hv-after { display: block; white-space: pre-line; padding: 6px 8px; border-radius: 8px; margin: 2px 0; }
.hv-before { text-decoration: line-through; color: var(--ink-soft); background: #FDE6EC55; padding: 1px 6px; border-radius: 6px; }
.hv-after { background: #E3F7F1; color: var(--ink); padding: 1px 6px; border-radius: 6px; font-weight: 600; }
.hv-nil { color: var(--ink-soft); font-style: italic; }
.hv-long .hv-nil { display: block; margin: 2px 0; }
.hv-long .hv-arrow { display: none; }
.hv-arrow { font-size: 18px; color: var(--ink-soft); }
.hv-state { margin-top: 14px; }
.hv-state summary { cursor: pointer; color: var(--brand-text); font-weight: 600; }
.hv-dl { display: grid; grid-template-columns: minmax(140px, 30%) 1fr; gap: 6px 16px; margin: 10px 0 0; }
.hv-dl dt { color: var(--ink-soft); font-size: .85rem; }
.hv-dl dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) { .hv-item, .hv-dl { grid-template-columns: 1fr; } .hv-modal .modal-content { padding: 16px; } }
/* suivi */
.yf-hint { color: var(--ink-soft); font-size: .9rem; margin: 0 0 6px; }
.yf-actions tbody tr[data-action-id] { cursor: pointer; }
.yf-actions tbody tr[data-action-id]:hover, .yf-actions tbody tr[data-action-id]:focus { background: var(--brand-soft); outline: none; }
.yf-actions tr.yf-future td:first-child { font-weight: 700; }
.yf-actions tr.yf-group td { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--brand-text); padding-top: 14px; background: transparent; }
.yf-menu-cell { width: 48px; text-align: right; position: relative; }
.yf-menu { display: inline-block; position: relative; }
.yf-menu summary { list-style: none; cursor: pointer; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--ink-soft); }
.yf-menu summary::-webkit-details-marker { display: none; }
.yf-menu summary:hover, .yf-menu[open] summary { background: var(--brand-soft); color: var(--ink); }
.yf-menu-list { position: absolute; right: 0; top: 38px; z-index: 30; min-width: 170px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 6px 0; text-align: left; }
.yf-menu-list button, .yf-menu-list a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 14px; background: none; border: 0; font: inherit; color: var(--ink); cursor: pointer; }
.yf-menu-list button:hover, .yf-menu-list a:hover { background: var(--brand-soft); }
.yf-menu-list i { font-size: 20px; color: var(--ink-soft); }
.yf-menu-list .yf-danger, .yf-menu-list .yf-danger i { color: var(--rose-text); }
.yf-action-edit { box-shadow: 0 0 0 2px var(--brand); scroll-margin-top: calc(var(--topbar-h) + 64px); }
.yf-toast { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 1100; display: flex; align-items: center; gap: 12px; background: var(--ink); color: #fff; border-radius: 12px; padding: 10px 14px; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
.yf-toast .btn { flex: 0 0 auto; }
@media only screen and (max-width: 992px) {
  .yf-grid { grid-template-columns: 1fr; }
}
@media only screen and (max-width: 600px) {
  .yf-head-actions { width: 100%; }
  .yf-head-actions .btn { flex: 1 1 auto; }
  .yf-kv { grid-template-columns: 1fr; row-gap: 0; }
  .yf-kv dt { font-size: .8rem; margin-top: 8px; }
  .yf-recent-d { flex-basis: 78px; }
  main table.cards-mobile.yf-actions > tbody > tr.yf-group { display: block; border: 0; background: transparent !important; padding: 6px 0 0; margin: 0; }
  main table.cards-mobile.yf-actions > tbody > tr.yf-group > td::before { display: none; }
  main table.cards-mobile.yf-actions > tbody > tr > td.yf-menu-cell { position: absolute; top: 4px; right: 6px; width: auto; padding: 0; }
  main table.cards-mobile.yf-actions > tbody > tr > td.yf-menu-cell::before { display: none; }
  main table.cards-mobile.yf-actions > tbody > tr[data-action-id] { position: relative; padding-right: 44px; }
}
.yf-card-head h3 { text-align: left; flex: 1 1 auto; }
p.yf-none { font-size: 1rem; }
.yf-err { color: var(--rose-text); font-size: .8rem; font-weight: 600; margin: 2px 0 0; }

/* ---------- Inviter un collègue à un rendez-vous ---------- */
body.rdv-invite-open { overflow: hidden; }
.rdv-invite { position: fixed; inset: 0; z-index: 1200; background: rgba(43, 41, 51, .45); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; }
.rdv-invite[hidden] { display: none; }
.rdv-invite-box { background: var(--surface); border-radius: 14px; box-shadow: 0 10px 40px rgba(0,0,0,.25); width: 100%; max-width: 520px; max-height: 86vh; display: flex; flex-direction: column; overflow: hidden; }
.rdv-invite-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 16px 18px 8px; }
.rdv-invite-head h3 { font-size: 1.2rem; font-weight: 700; margin: 0; }
.rdv-invite-sub { margin: 2px 0 0; color: var(--ink-soft); }
.rdv-invite-close { padding: 0 8px; }
.rdv-invite-filter { display: flex; align-items: center; gap: 6px; margin: 0 18px; border: 1px solid var(--line); border-radius: 999px; padding: 0 12px; }
.rdv-invite-filter i { color: var(--ink-soft); font-size: 20px; }
.rdv-invite-filter input[type=search] { border: 0 !important; box-shadow: none !important; margin: 0 !important; height: 38px !important; }
.rdv-invite-msg { margin: 8px 18px 0; color: var(--teal-text); font-weight: 600; min-height: 1.2em; }
.rdv-invite-list { overflow-y: auto; padding: 0 18px 16px; }
.rdv-invite-group h4 { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin: 14px 0 2px; color: var(--ink-soft); }
.rdv-invite-group[data-status="free"] h4 { color: var(--teal-text); }
.rdv-invite-group h4 span { font-weight: 400; }
.rdv-invite-hint { margin: 0 0 4px; font-size: .8rem; color: var(--ink-soft); }
.rdv-invite-group ul { margin: 0; }
.rdv-invite-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.rdv-invite-row[hidden], .rdv-invite-group[hidden] { display: none; }
.rdv-invite-name { min-width: 0; }
.rdv-invite-name small { display: block; color: var(--ink-soft); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 300px; }
.rdv-invite-done { display: inline-flex; align-items: center; gap: 4px; color: var(--teal-text); font-weight: 600; font-size: .9rem; }
.rdv-invite-done i { font-size: 18px; }
@media only screen and (max-width: 600px) {
  .rdv-invite { padding: 0; align-items: flex-end; }
  .rdv-invite-box { max-width: none; border-radius: 14px 14px 0 0; max-height: 92vh; }
}

/* ---------- Planning d'un membre : retour au planning de tous ---------- */
.member-head .back-all { margin-bottom: 8px; }
.member-head h2 { font-size: 1.8rem; }

/* ---------- Statistiques : tableau de bord et rapports ---------- */
.st-page { padding-bottom: 32px; }
.st-page .page-head .btn-light { margin-bottom: 8px; }
.st-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.st-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0 0 18px; }
.st-chips, .st-selects { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.st-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 14px; font-size: .9rem; color: var(--ink); cursor: pointer; line-height: 1.4; }
.st-chip:hover { border-color: var(--brand); }
.st-chip.on { background: var(--brand); border-color: var(--brand); color: var(--ink-on-brand); font-weight: 600; }
.st-chip input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.st-chip:focus-within { outline: 2px solid var(--brand-text); outline-offset: 2px; }
.st-select select { border: 0; background: transparent; font-weight: 600; height: auto; padding: 0 2px; width: auto; max-width: 200px; color: var(--ink); }
.st-custom { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.st-custom[hidden] { display: none; }
.st-custom input[type=date] { width: auto; height: 2.2rem; margin: 0 0 0 4px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; background: var(--surface); }
.st-drop { position: relative; }
.st-drop > summary { list-style: none; }
.st-drop > summary::-webkit-details-marker { display: none; }
.st-drop-box { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; min-width: 280px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; }
.st-check { display: flex; align-items: center; gap: 8px; padding: 4px 0; color: var(--ink); cursor: pointer; }
.st-check input[type=checkbox] { position: static; opacity: 1; pointer-events: auto; width: 18px; height: 18px; margin: 0; }
.st-hint, .st-period { color: var(--ink-soft); font-size: .85rem; margin: 6px 0; }
.st-period { flex-basis: 100%; margin: 0; }
.st-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 14px; }
.st-kpi { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; }
.st-kpi-label { font-size: .85rem; color: var(--ink-soft); min-height: 2.4em; }
.st-kpi-value { font-size: 1.9rem; font-weight: 700; line-height: 1.2; }
.st-kpi-value small { font-size: 1rem; font-weight: 600; }
.st-kpi-delta { font-size: .8rem; font-weight: 600; color: var(--ink-soft); }
.st-kpi-delta span { font-weight: 400; }
.st-kpi-delta.is-good { color: var(--teal-text); }
.st-kpi-delta.is-bad { color: var(--rose-text); }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; align-items: start; }
.st-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 18px; min-width: 0; }
.st-wide { grid-column: 1 / -1; }
.st-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.st-card-head h3 { font-size: 1.02rem; font-weight: 700; margin: 0; }
.st-dl { font-size: .8rem; font-weight: 600; color: var(--brand-text); white-space: nowrap; }
.st-empty, .st-note { color: var(--ink-soft); font-size: .85rem; margin: 6px 0 0; }
.st-bars { margin: 0; }
.st-bars li { display: grid; grid-template-columns: minmax(90px, 40%) 1fr auto auto; align-items: center; gap: 8px; font-size: .88rem; padding: 3px 0; }
.st-bar-label { overflow-wrap: anywhere; }
.st-bar-track { background: var(--brand-soft); border-radius: 4px; height: 12px; overflow: hidden; }
.st-bar-track i { display: block; height: 100%; background: var(--brand); border-radius: 4px; min-width: 2px; }
.st-bars b { font-weight: 700; text-align: right; min-width: 2.2em; }
.st-bars em { font-style: normal; color: var(--ink-soft); font-size: .8rem; min-width: 3.2em; text-align: right; }
.st-table-wrap { overflow-x: auto; }
.st-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.st-table th, .st-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: right; border-radius: 0; }
.st-table th:first-child { text-align: left; font-weight: 600; }
.st-table thead th { color: var(--ink-soft); font-size: .8rem; font-weight: 600; }
.st-months { display: flex; align-items: flex-end; gap: 6px; height: 200px; padding-top: 4px; }
.st-month { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.st-month-bar { width: 100%; max-width: 44px; background: var(--brand); border-radius: 4px 4px 0 0; min-height: 2px; }
.st-month-val { font-size: .75rem; font-weight: 600; color: var(--ink-soft); }
.st-month-label { font-size: .75rem; color: var(--ink-soft); margin-top: 4px; white-space: nowrap; }
.st-method { margin-top: 18px; background: var(--surface); border-radius: var(--radius); padding: 12px 18px; }
.st-method summary { cursor: pointer; font-weight: 600; }
.st-method li, .st-method-print li { list-style: disc; margin-left: 20px; font-size: .9rem; }
.st-more { margin-top: 12px; color: var(--ink-soft); }
.st-more a { font-weight: 600; color: var(--brand-text); }
.st-report-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.st-report-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; display: flex; flex-direction: column; }
.st-report-card h3 { font-size: 1.2rem; font-weight: 700; margin: 0 0 4px; }
.st-report-card > p:not(.st-report-for) { flex: 1; color: var(--ink); font-size: .92rem; }
.st-report-for { color: var(--brand-text); font-weight: 600; font-size: .9rem; margin: 0; }
.st-report-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.st-cover { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; margin-bottom: 14px; border-left: 6px solid var(--brand); }
.st-cover h1 { font-size: 1.9rem; font-weight: 700; margin: 0 0 6px; }
.st-cover p { margin: 0 0 4px; }
.st-cover-org { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; color: var(--ink-soft); }
.st-part { font-size: 1.35rem; font-weight: 700; margin: 26px 0 10px; }
.st-text h2, .st-method-print h2 { font-size: 1.2rem; font-weight: 700; margin: 22px 0 8px; }
.st-editable { min-height: 90px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 12px 14px; }
.st-editable:empty::before { content: attr(data-placeholder); color: var(--ink-soft); }
.st-editable:focus { outline: 2px solid var(--brand); }
.st-method-print { margin-top: 22px; color: var(--ink-soft); font-size: .9rem; }
@media (max-width: 600px) {
  .st-grid { grid-template-columns: 1fr; }
  .st-kpis { grid-template-columns: 1fr 1fr; }
  .st-kpi-value { font-size: 1.5rem; }
  .st-months { height: 160px; gap: 2px; }
  .st-month-val { font-size: .65rem; }
  .st-month-label { font-size: .65rem; }
  .st-bars li { grid-template-columns: minmax(80px, 38%) 1fr auto; }
  .st-bars em { display: none; }
  .st-drop-box { min-width: 240px; }
}
@media print {
  body.with-nav > header, .no-print, .st-dl, .st-filters, .st-method summary { display: none !important; }
  main#contenu, body.with-nav main { margin: 0 !important; padding: 0 !important; }
  .container { width: 100% !important; max-width: none !important; }
  body { background: #fff !important; font-size: 11pt; }
  .st-card, .st-kpi, .st-cover { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  .st-part { break-after: avoid; }
  .st-grid { grid-template-columns: 1fr 1fr; }
  .st-editable { border: 0; padding: 0; min-height: 0; }
  .st-editable:empty { display: none; }
  .st-text:has(.st-editable:empty) { display: none; }
  .st-bar-track i, .st-month-bar { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .st-bar-track { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
/* Croiser deux critères */
.st-steps { display: grid; grid-template-columns: 1fr; gap: 6px; }
.st-step h3 { font-size: 1.05rem; font-weight: 700; margin: 6px 0 0; display: flex; align-items: center; gap: 8px; }
.st-step h3 small { font-weight: 400; color: var(--ink-soft); }
.st-num { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--brand); color: var(--ink-on-brand); font-size: .85rem; font-weight: 700; }
.st-cross .row { margin-bottom: 0; }
.st-cross-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 8px; }
#st-cross-result { margin-top: 14px; }
@media (max-width: 600px) { .st-table { font-size: .8rem; } .st-table th, .st-table td { padding: 5px 4px; } }

/* ---------- Annuaire ---------- */
.dir-tools { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.dir-search { flex: none; width: 100%; max-width: 520px; }
.dir-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.dir-cats .st-chip { font-family: inherit; }
.dir-cats .st-chip i { font-size: 18px; }
.dir-cats .st-chip span { color: var(--ink-soft); font-weight: 400; }
.dir-cats .st-chip.on span { color: var(--ink-on-brand); }
.dir-group { margin-bottom: 20px; }
.dir-group[hidden], .dir-card[hidden] { display: none; }
.dir-group-title { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; font-weight: 700; margin: 8px 0 10px; }
.dir-group-title small { color: var(--ink-soft); font-weight: 400; font-size: .9rem; }
.dir-cat-icon { display: inline-flex; width: 34px; height: 34px; border-radius: 10px; align-items: center; justify-content: center; background: var(--brand-soft); color: var(--brand-text); }
.dir-cat-urgences { background: #FDE6EB; color: var(--rose-text); }
.dir-cat-equipe { background: #E3F7F2; color: var(--teal-text); }
.dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.dir-card { display: flex; gap: 12px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; min-width: 0; }
.dir-avatar { flex: none; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 1rem; text-shadow: 0 1px 1px rgba(0,0,0,.25); }
.dir-avatar i { font-size: 22px; }
.dir-body { min-width: 0; flex: 1; }
.dir-name { font-weight: 700; overflow-wrap: anywhere; }
.dir-name a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); }
.dir-sub { color: var(--ink-soft); font-size: .88rem; display: flex; align-items: center; gap: 4px; }
.dir-sub i { font-size: 16px; }
.dir-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.dir-link { display: inline-flex; align-items: center; gap: 4px; background: var(--brand-soft); color: var(--brand-text); border-radius: 999px;
  padding: 4px 10px; font-size: .85rem; font-weight: 600; overflow-wrap: anywhere; max-width: 100%; }
.dir-link i { font-size: 16px; }
.dir-missing { color: var(--ink-soft); font-size: .82rem; font-style: italic; }
.dir-note { margin-top: 6px; font-size: .85rem; }
.dir-note summary { cursor: pointer; color: var(--ink-soft); }
.dir-note p { margin: 4px 0 0; }
.dir-none { color: var(--ink-soft); }

/* ---------- Rapports : page de garde et impression soignée ---------- */
.st-cover { display: grid; grid-template-columns: auto 1fr; gap: 8px 24px; align-items: center; }
.st-cover-logo { width: 180px; height: auto; grid-row: span 1; }
.st-cover-kicker { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--brand-text); margin: 0 0 2px !important; }
.st-cover-period { color: var(--ink-soft); }
.st-toc, .st-cover-foot { display: none; }
.st-part { display: flex; align-items: center; gap: 10px; }
.st-part span { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; border-radius: 50%;
  background: var(--brand); color: var(--ink-on-brand); font-size: 1rem; }
@media (max-width: 600px) { .st-cover { grid-template-columns: 1fr; } .st-cover-logo { width: 150px; } }

@media print {
  .st-report { font-family: 'Open Sans', system-ui, sans-serif; color: #3C3A47; padding: 0 15mm !important; }
  main#contenu .container { padding: 0 !important; margin: 0 !important; }
  .st-report * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  /* page de garde : toute la première page */
  .st-report .st-cover { display: flex; flex-direction: column; justify-content: space-between; height: 296mm; margin: 0 -15mm; padding: 28mm 24mm 20mm 30mm;
    border: 0; border-radius: 0; box-shadow: none; background: #fff; break-after: page; position: relative; overflow: hidden; }
  .st-report .st-cover::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 9mm; background: #EE964B; }
  .st-report .st-cover::after { content: ""; position: absolute; right: -40mm; bottom: -40mm; width: 140mm; height: 140mm; border-radius: 50%; background: #FDF0E4; z-index: 0; }
  .st-report .st-cover > * { position: relative; z-index: 1; }
  .st-report .st-cover-logo { width: 70mm; }
  .st-report .st-cover-main { margin-top: 30mm; }
  .st-report .st-cover-kicker { font-size: 10pt; }
  .st-report .st-cover h1 { font-size: 30pt; line-height: 1.15; font-weight: 700; margin: 4mm 0 6mm; color: #3C3A47; }
  .st-report .st-cover-period { font-size: 13pt; color: #3C3A47; margin: 0 0 3mm; }
  .st-report .st-cover .st-report-for { font-size: 11pt; }
  .st-report .st-toc { display: block; margin: 16mm 0 0; padding: 6mm 0 0; border-top: 1px solid #E7E3DE; counter-reset: toc; font-size: 11pt; }
  .st-report .st-toc li { list-style: none; padding: 1.6mm 0; counter-increment: toc; }
  .st-report .st-toc li::before { content: counter(toc) "."; display: inline-block; width: 9mm; color: #A9530F; font-weight: 700; }
  .st-report .st-cover-foot { display: block; font-size: 9pt; color: #6B6876; margin: 0; }
  /* contenu */
  .st-report .st-part { font-size: 17pt; margin: 0 0 5mm; padding-bottom: 2.5mm; border-bottom: 2px solid #EE964B; break-before: page; break-after: avoid; }
  .st-report .st-part span { min-width: 9mm; height: 9mm; font-size: 12pt; }
  .st-report .st-kpis { grid-template-columns: repeat(4, 1fr); gap: 3mm; margin-bottom: 4mm; }
  .st-report .st-kpi { border: 0; border-top: 3px solid #EE964B; border-radius: 0; background: #FDF0E4; padding: 3mm 3.5mm; }
  .st-report .st-kpi-label { font-size: 8pt; min-height: 0; }
  .st-report .st-kpi-value { font-size: 18pt; }
  .st-report .st-kpi-delta { font-size: 7.5pt; }
  .st-report .st-grid { grid-template-columns: 1fr 1fr; gap: 4mm; }
  .st-report .st-card { border: 1px solid #E7E3DE; border-radius: 2mm; padding: 3.5mm 4mm; }
  .st-report .st-card-head h3 { font-size: 10.5pt; color: #A9530F; }
  .st-report .st-bars li { font-size: 8.5pt; padding: 1px 0; }
  .st-report .st-bar-track { height: 3mm; }
  .st-report .st-table { font-size: 8.5pt; }
  .st-report .st-table th, .st-report .st-table td { padding: 1.2mm 1.5mm; }
  .st-report .st-table tbody tr:nth-child(even) { background: #FBF8F5; }
  .st-report .st-note { font-size: 7.5pt; }
  .st-report .st-text h2, .st-report .st-method-print h2 { font-size: 13pt; color: #A9530F; break-after: avoid; }
  .st-report .st-method-print { break-before: page; font-size: 9pt; }
  .st-report .st-text { break-inside: avoid; }
}
@media print { .st-report .st-part-first { break-before: auto; margin-top: 8mm; } }
@media print {
  .st-report .st-cover { align-items: flex-start; }
  .st-report .st-cover-main, .st-report .st-toc { align-self: stretch; }
  .st-report .st-toc { padding-left: 0 !important; margin-left: 0 !important; max-width: 110mm; }
  .st-report .st-cover::after { right: -55mm; bottom: -55mm; width: 120mm; height: 120mm; }
}

/* ---------- Page d'accueil ---------- */
.hm-hello { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 8px 0 14px; }
.hm-hello h2 { margin: 0; font-size: 2rem; font-weight: 700; }
.hm-logo { width: 170px; height: auto; opacity: .95; }
.hm-search { position: relative; max-width: 860px; margin-bottom: 14px; display: flex; gap: 10px; align-items: center; }
.hm-search .planning-filter { flex: 1; min-width: 0; width: auto; }
.hm-new-young { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 999px; margin-right: 8px;
  background: var(--surface); box-shadow: var(--shadow); color: var(--brand-text); font-weight: 600; white-space: nowrap; }
.hm-new-young:hover, .hm-new-young:focus { background: var(--brand-soft); }

.hm-search .planning-filter input[type=search] { height: 48px; font-size: 1rem; box-shadow: var(--shadow); border-color: transparent; }
.hm-results { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border-radius: var(--radius);
  box-shadow: 0 6px 24px rgba(60,58,71,.16); margin: 0; padding: 6px 0; max-height: 360px; overflow: auto; }
.hm-results[hidden] { display: none; }
.hm-results a { display: block; padding: 8px 16px; color: var(--ink); }
.hm-results a:hover, .hm-results a:focus { background: var(--brand-soft); }
.hm-results .hm-empty { padding: 8px 16px; }
.hm-shortcuts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 16px; }
.hm-shortcut { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 16px; color: var(--ink); font-weight: 600; line-height: 1.25; }
.hm-shortcut i { color: var(--brand-text); }
.hm-shortcut:hover, .hm-shortcut:focus { background: var(--brand-soft); }
.hm-shortcut.is-main { background: var(--brand); color: var(--ink-on-brand); }
.hm-shortcut.is-main i { color: var(--ink-on-brand); }
.hm-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.hm-main, .hm-side { display: grid; gap: 14px; min-width: 0; }
.hm-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
/* bandeau de chiffres en haut de l'accueil */
.hm-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 10px; margin-bottom: 16px; }
.hm-kpi { --k: var(--brand); --kt: var(--brand-text); position: relative; overflow: hidden; display: flex; align-items: center; gap: 12px;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px 14px 18px; color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease; }
.hm-kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--k); }
.hm-kpi:hover, .hm-kpi:focus { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(60,58,71,.12); }
.hm-kpi > i { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 24px;
  color: var(--kt); background: color-mix(in srgb, var(--k) 16%, var(--surface)); }
.hm-kpi > span { display: flex; flex-direction: column; font-size: .86rem; font-weight: 600; line-height: 1.25; min-width: 0; }
.hm-kpi b { font-size: 1.75rem; line-height: 1.1; font-weight: 800; color: var(--kt); }
.hm-kpi small { font-weight: 400; color: var(--ink-soft); font-size: .78rem; margin-top: 2px; }
.hm-kpi.is-teal, .hm-kpi.is-ok { --k: var(--teal); --kt: var(--teal-text); }
.hm-kpi.is-rose { --k: var(--rose); --kt: var(--rose-text); }
.hm-kpi.is-warn { --k: #F2B33D; --kt: #8A5A00; }
.hm-kpi.is-violet { --k: #8E6BBF; --kt: #6A4A99; }
.hm-kpi.is-soft { --k: #A9A4B3; --kt: var(--ink-soft); }
@media (prefers-reduced-motion: reduce) { .hm-kpi { transition: none; } .hm-kpi:hover { transform: none; } }
.hm-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.hm-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.hm-card-head h3 { display: flex; align-items: center; gap: 8px; font-size: 1.08rem; font-weight: 700; margin: 0; }
.hm-card-head h3 i { color: var(--brand-text); font-size: 22px; }
.hm-card-head h3 small { color: var(--ink-soft); font-weight: 400; }
.hm-card-head a { font-size: .85rem; font-weight: 600; color: var(--brand-text); white-space: nowrap; }
.hm-day { font-size: .95rem; font-weight: 700; margin: 14px 0 6px; }
.hm-day small { color: var(--ink-soft); font-weight: 400; margin-left: 4px; }
.hm-list { margin: 0; }
.hm-list li a { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; color: var(--ink); border-left: 4px solid var(--brand); margin-bottom: 6px; background: #FBF8F5; }
.hm-list li a:hover, .hm-list li a:focus { background: var(--brand-soft); }
.hm-list li.is-past a { opacity: .6; border-left-color: var(--line); }
.hm-list li.is-now a { border-left-color: var(--teal); background: #E8F8F3; }
.hm-time { display: flex; flex-direction: column; font-weight: 700; min-width: 3.4em; }
.hm-time small { font-weight: 400; color: var(--ink-soft); font-size: .78rem; }
.hm-what { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.hm-what em { font-style: normal; font-size: .72rem; font-weight: 700; background: var(--teal-text); color: #fff; border-radius: 999px; padding: 1px 8px; margin-left: 8px; }
.hm-list li a > i { color: var(--ink-soft); }
.hm-list li.is-cancelled a { border-left-color: var(--rose); }
.hm-list li.is-cancelled .hm-title { text-decoration: line-through; opacity: .6; }
.hm-what em.hm-off { background: var(--rose-text); }
/* accueil : évènements annulés à venir, bien en évidence */
.hm-calloff { display: flex; gap: 12px; align-items: flex-start; background: #FDECEF; border: 1px solid #F3B6C4; border-left: 6px solid var(--rose);
  border-radius: var(--radius); padding: 12px 16px; margin-bottom: 14px; color: var(--ink); }
.hm-calloff > i { color: var(--rose-text); font-size: 28px; }
.hm-calloff h3 { font-size: 1.05rem; font-weight: 700; margin: 2px 0 6px; color: var(--rose-text); }
.hm-calloff ul { margin: 0; }
.hm-calloff li a { color: var(--ink); display: block; padding: 2px 0; }
.hm-calloff li a:hover { text-decoration: underline; }
.hm-calloff small { color: var(--ink-soft); }
.hm-empty, .hm-note { color: var(--ink-soft); font-size: .88rem; margin: 4px 0; }
.hm-empty[hidden] { display: none; }
.hm-figures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hm-figures div { background: var(--brand-soft); border-radius: 10px; padding: 10px; }
.hm-figures b { display: block; font-size: 1.7rem; line-height: 1.1; }
.hm-figures span { font-size: .8rem; color: var(--ink-soft); }
.hm-links { margin: 0; }
.hm-links li a { display: flex; align-items: center; gap: 8px; padding: 7px 4px; border-bottom: 1px solid var(--line); color: var(--ink); }
.hm-links li:last-child a { border-bottom: 0; }
.hm-links li a:hover { color: var(--brand-text); }
.hm-links small { color: var(--ink-soft); margin-left: auto; }
.hm-kind { font-size: .72rem; font-weight: 700; color: var(--brand-text); background: var(--brand-soft); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.hm-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rose); flex: none; }
.hm-alert-icon { color: var(--rose-text) !important; }
@media (max-width: 1100px) { .hm-pair { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .hm-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .hm-logo { display: none; }
  .hm-hello h2 { font-size: 1.6rem; }
  .hm-shortcuts { grid-template-columns: 1fr 1fr; }
  .hm-shortcut { padding: 12px; font-size: .9rem; }
  .hm-figures b { font-size: 1.4rem; }
  .hm-kpis { grid-template-columns: 1fr 1fr; }
  .hm-kpi { padding: 12px; gap: 8px; }
  .hm-kpi > i { width: 36px; height: 36px; font-size: 20px; }
  .hm-kpi b { font-size: 1.4rem; }
}

/* ---------- Rendez-vous sur une période ou répété ---------- */
.rpt { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 10px; }
.rpt-select { height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; background: var(--surface); font-size: 1rem; width: 100%; }
.rpt-preview { margin-top: 8px; }
.rpt-preview[hidden], .rpt [hidden] { display: none !important; }
.rpt-head { margin: 0 0 2px; font-weight: 600; font-size: .95rem; line-height: 1.4; color: var(--ink); }
.rpt-warn { color: var(--rose-text); }
.rpt-help, .rpt-empty { margin: 0 0 6px; color: var(--ink-soft); font-size: .88rem; }
.rpt-list { list-style: none; margin: 0; padding: 0; max-height: 34vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.rpt-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 4px 10px; border-bottom: 1px solid var(--line); }
.rpt-row:last-child { border-bottom: 0; }
.rpt-row label { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: .95rem; cursor: pointer; }
.rpt-row [type=checkbox].rpt-check + span { padding-left: 30px; height: auto; line-height: 1.6; font-size: .95rem; color: var(--ink); }
.rpt-day::first-letter { text-transform: uppercase; }
.rpt-day small { color: var(--ink-soft); }
.rpt-off .rpt-day { color: var(--ink-soft); text-decoration: line-through; }
.rpt-notes { display: flex; flex-wrap: wrap; gap: 4px; }
.rpt-tag { font-size: .78rem; border-radius: 10px; padding: 1px 8px; background: var(--bg); color: var(--ink-soft); }
.rpt-tag.rpt-conf { background: #FDE8EC; color: var(--rose-text); }
.rpt-tag.rpt-abs { background: var(--brand-soft); color: var(--brand-text); }

/* fenêtre d'un rendez-vous du planning : ce rendez-vous ou toute la série */
.series-choice { margin: 10px 0 6px; padding: 8px 10px; border-radius: 8px; background: var(--bg); font-size: .92rem; }
.series-choice[hidden] { display: none !important; }
.series-choice label { display: flex; align-items: center; gap: 8px; color: var(--ink); margin: 2px 0; cursor: pointer; font-size: .92rem; }
.series-choice [type=radio], .series-choice [type=checkbox] { position: static; opacity: 1; pointer-events: auto; width: 16px; height: 16px; margin: 0; accent-color: var(--brand-text); }
.series-choice p { margin: 0 0 4px; font-weight: 600; font-size: .92rem; line-height: 1.4; color: var(--ink); }

/* raccourci « Mon agenda sur téléphone » dans la barre du haut et l'accueil */
nav.topbar ul.topbar-actions a.topbar-agenda { color: var(--ink); }
@media only screen and (max-width: 992px) { nav.topbar ul.topbar-actions a.topbar-agenda i.left { margin-right: 0; } }
.hm-card-links { display: inline-flex; flex-wrap: wrap; gap: 4px 14px; justify-content: flex-end; }

/* Prise de rendez-vous : « Trouver un créneau libre » / « Je connais déjà le jour »
   et, dans la fenêtre de confirmation, « Une seule fois / Plusieurs jours de suite / Régulièrement » */
.when-how, .rpt-kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 0 0 14px; }
.when-how[hidden], .rpt-freq-box[hidden], #from-field[hidden] { display: none !important; }
.how-card, .rpt-kind { cursor: pointer; display: flex; }
.how-card input[type=radio], .rpt-kind input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.how-card input[type=radio] + span, .rpt-kind input[type=radio] + span {
  display: grid; grid-template-columns: auto 1fr; align-items: center; align-content: start; column-gap: 10px; row-gap: 2px; width: 100%; height: auto;
  line-height: 1.35; padding: 12px 14px 12px 44px !important; position: relative;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font-size: .95rem; }
.rpt-kind input[type=radio] + span { grid-template-columns: 1fr; padding: 10px 12px 10px 40px !important; }
.how-card input[type=radio] + span::before, .rpt-kind input[type=radio] + span::before {
  content: '' !important; position: absolute; left: 14px; top: 14px; width: 18px; height: 18px; margin: 0; border-radius: 50%;
  border: 2px solid var(--ink-soft); background: var(--surface); transform: none; }
.rpt-kind input[type=radio] + span::before { left: 12px; top: 12px; }
.how-card input[type=radio] + span::after, .rpt-kind input[type=radio] + span::after { content: none !important; }
.how-card input:checked + span::before, .rpt-kind input:checked + span::before { border-color: var(--brand); box-shadow: inset 0 0 0 4px var(--surface); background: var(--brand); }
.how-card input:checked + span, .rpt-kind input:checked + span { border-color: var(--brand); background: var(--brand-soft); }
.how-card:hover input + span, .rpt-kind:hover input + span { border-color: var(--brand); }
.how-card input:focus-visible + span, .rpt-kind input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.how-card .material-icons { color: var(--brand-text); font-size: 22px; grid-row: span 1; }
.how-card b, .rpt-kind b { font-weight: 700; }
.how-card small, .rpt-kind small { grid-column: 1 / -1; color: var(--ink-soft); font-size: .84rem; }
.rpt-kinds { grid-template-columns: 1fr; gap: 6px; margin: 6px 0 10px; }
.rpt-kind input[type=radio] + span { display: block; }
.rpt-kind small { display: block; }
.rpt-sentence b { font-weight: 700; }
.rpt-freq-box { margin: 0 0 10px; }
.rpt-freq-box .pick-chips { margin-top: 4px; }
.rpt-sentence { margin: 4px 0; font-size: 1rem; line-height: 1.45; color: var(--ink); }
.rpt-sentence::first-letter { text-transform: uppercase; }
.rpt-details { margin-top: 6px; }
.rpt-details > summary { cursor: pointer; color: var(--brand-text); font-weight: 600; font-size: .9rem; margin-bottom: 6px; }


/* ---------- Equipe : liste des membres et fiche membre ---------- */
.mb-page { padding-bottom: 32px; }
.mb-flash { display: flex; align-items: center; gap: 8px; background: #E3F7F2; color: var(--teal-text); border-radius: var(--radius); padding: 10px 14px; margin: 0 0 14px; font-weight: 600; }
.mb-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.mb-list { display: flex; flex-direction: column; gap: 8px; }
.mb-row { display: grid; grid-template-columns: minmax(200px, 1.3fr) minmax(140px, 1fr) minmax(200px, 1.4fr) auto; align-items: center; gap: 12px;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 14px; }
.mb-row[hidden] { display: none; }
.mb-row.mb-off { opacity: .75; }
.mb-row.mb-off .dir-avatar { filter: grayscale(1); }
.mb-who { display: flex; align-items: center; gap: 12px; color: var(--ink); min-width: 0; }
.mb-who:hover strong { text-decoration: underline; }
.mb-name { display: flex; flex-direction: column; min-width: 0; }
.mb-name small { color: var(--ink-soft); }
.mb-specs { display: flex; flex-wrap: wrap; gap: 6px; }
.mb-spec { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: .85rem; }
.mb-contact { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.mb-contact .dir-link { max-width: 100%; }
.mb-mail { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 210px; display: inline-block; }
.mb-actions { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.mb-actions form { margin: 0; }
.mb-actions .btn-small { display: inline-flex; align-items: center; gap: 4px; padding: 0 10px; }
.mb-actions .btn-small i { font-size: 18px; }
.mb-confirm { position: relative; }
.mb-confirm > summary { list-style: none; cursor: pointer; }
.mb-confirm > summary::-webkit-details-marker { display: none; }
.mb-confirm-box { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 300px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: 0 6px 24px rgba(60, 58, 71, .18); padding: 12px 14px; font-size: .9rem; }
.mb-confirm-box p { margin: 0 0 10px; color: var(--ink); font-size: .88rem; line-height: 1.45; font-weight: 400; }
.btn-small.mb-danger { background: var(--rose); color: #fff; }
.mb-former { margin-top: 22px; }
.mb-former > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.05rem; margin-bottom: 10px; flex-wrap: wrap; }
.mb-former > summary::-webkit-details-marker { display: none; }
.mb-former > summary i { transition: transform .2s; }
.mb-former[open] > summary i { transform: rotate(180deg); }
.mb-former small { color: var(--ink-soft); font-weight: 400; }
.mb-former-help { color: var(--ink-soft); font-weight: 400; font-size: .85rem; }
@media (max-width: 1100px) {
  .mb-row { grid-template-columns: 1fr auto; }
  .mb-specs, .mb-contact { grid-column: 1 / -1; }
  .mb-actions { grid-column: 2; grid-row: 1; }
}
@media (max-width: 600px) {
  .mb-act-text { display: none; }
  .mb-confirm-box { width: min(300px, 80vw); }
}

.ms-page { max-width: 860px; }
.ms-back { padding-left: 0; margin-bottom: 4px; }
.ms-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ms-head > div { flex: 1; min-width: 200px; }
.ms-avatar { width: 56px; height: 56px; font-size: 1.2rem; transition: background .2s; }
.ms-error-box { display: flex; align-items: center; gap: 8px; background: #FDE6EB; color: var(--rose-text); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 12px; font-weight: 600; }
.ms-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 14px; }
.ms-card h3 { display: flex; align-items: center; gap: 8px; font-size: 1.1rem; font-weight: 700; margin: 0 0 12px; }
.ms-card h3 i { color: var(--brand-text); }
.ms-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
@media (max-width: 600px) { .ms-grid { grid-template-columns: 1fr; } }
.ms-field label { display: block; font-size: .85rem; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.ms-field input[type=text], .ms-field input[type=email], .ms-field input[type=tel] { border: 1px solid var(--line); border-radius: 8px; padding: 0 10px;
  height: 2.6rem; margin: 0; background: var(--surface); box-sizing: border-box; width: 100%; box-shadow: none; }
.ms-field input:focus { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.ms-field.has-error input, .ms-field.is-taken input { border-color: var(--rose); }
.ms-field .errorlist, .ms-card .errorlist { list-style: none; padding: 0; margin: 4px 0 0; color: var(--rose-text); font-size: .85rem; }
.ms-field .errorlist li, .ms-card .errorlist li { list-style: none; }
.ms-field { margin-bottom: 8px; }
.ms-help, .ms-hint { color: var(--ink-soft); font-size: .85rem; margin: 4px 0 8px; }
.ms-field.is-taken .ms-hint { color: var(--rose-text); }
.ms-specs { display: flex; flex-wrap: wrap; gap: 8px; }
.ms-spec input { position: absolute; opacity: 0; pointer-events: none; }
.ms-spec > span { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; cursor: pointer; color: var(--ink); font-size: .92rem; }
.ms-spec input:checked + span { background: var(--brand-soft); border-color: var(--brand); font-weight: 600; }
.ms-spec input:focus-visible + span { outline: 2px solid var(--brand-text); outline-offset: 2px; }
.ms-pw > summary { cursor: pointer; color: var(--brand-text); font-weight: 600; font-size: .9rem; margin-bottom: 8px; padding-top: 22px; }
.ms-pw-row { display: flex; gap: 8px; align-items: center; }
.ms-pw-row input { flex: 1; font-family: monospace; }
.ms-pw-row .btn-small { display: inline-flex; align-items: center; white-space: nowrap; }
.ms-active { margin-top: 12px; }
.ms-active label { color: var(--ink); font-size: .92rem; }
.ms-bar { display: flex; justify-content: flex-end; gap: 10px; padding: 4px 0 12px; }
/* neutralise les cases et boutons radio dessines par Materialize */
.ms-spec [type="checkbox"] + span:not(.lever) {
  padding-left: 14px; height: auto; line-height: 1.4; font-size: .92rem; }
.ms-spec [type="checkbox"] + span:not(.lever)::before, .ms-spec [type="checkbox"] + span:not(.lever)::after { display: none; }
.ms-spec .mb-dot { margin-right: 6px; }
.mb-former[hidden] { display: none; }

/* Types de rendez-vous rangés par catégories (planifier/type_groups.py) */
.type-group-title .type-group-kind { font-weight: 400; font-size: .8rem; color: var(--ink-soft); margin-left: 6px; padding: 1px 8px; border: 1px solid var(--line); border-radius: 999px; }
.type-group-title .type-group-kind { font-weight: 400; font-size: .8rem; color: var(--ink-soft); margin-left: 6px; padding: 1px 8px; border: 1px solid var(--line); border-radius: 999px; }
/* « Pour qui ? » pour un évènement sans dossier : membre de l'équipe */
#who-team[hidden], #who-folder[hidden] { display: none !important; }
.who-team-tag { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 6px 14px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-text); font-weight: 700; }
.who-team-tag .material-icons { font-size: 20px; }
.who-team-tag small { font-weight: 400; color: var(--ink-soft); }
/* Encadré « Attention avant d'enregistrer » (jour férié, rendez-vous à cheval, hors présence) */
.rpt-alert { border: 1px solid #F3C27A; border-left: 4px solid #E08A00; background: #FFF8EC; border-radius: 10px; padding: 10px 14px; }
.rpt-alert-title { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-weight: 700; color: #8A4B00; }
.rpt-alert-title .material-icons { font-size: 20px; color: #E08A00; }
.rpt-alert ul { margin: 0; padding: 0; list-style: none; }
.rpt-alert li { display: flex; align-items: flex-start; gap: 8px; margin: 4px 0; color: var(--ink); line-height: 1.4; list-style: none; }
.rpt-alert li .material-icons { font-size: 18px; color: #8A4B00; margin-top: 1px; }
.rpt-alert-foot { margin: 6px 0 0; font-size: .85rem; color: var(--ink-soft); }

/* Menu : lien de la page en cours */
.sidenav .collapsible-body li a.is-current { background: var(--brand-soft); color: var(--brand-text); font-weight: 700; box-shadow: inset 3px 0 0 var(--brand); }

/* ---------- Exports : page d'export, file active, rendez-vous, fiche imprimable ---------- */
.ex-page { padding-bottom: 8px; }
.ex-step { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; font-weight: 700; margin: 0 0 12px; }
.ex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.ex-tile, .ex-inline { display: flex; align-items: flex-start; gap: 10px; color: var(--ink); cursor: pointer; font-size: .95rem; }
.ex-tile { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: var(--surface); }
.ex-tile:hover { border-color: var(--brand); }
.ex-tile:has(input:checked:not(:disabled)) { border-color: var(--brand); background: var(--brand-soft); }
.ex-tile:focus-within { outline: 2px solid var(--brand-text); outline-offset: 2px; }
.ex-tile.off { opacity: .55; cursor: not-allowed; }
.ex-tile small { display: block; color: var(--ink-soft); font-size: .82rem; line-height: 1.35; margin-top: 2px; }
.ex-tile [type="checkbox"], .ex-tile [type="radio"], .ex-inline [type="checkbox"] { position: static !important; opacity: 1 !important; pointer-events: auto !important; flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--brand-text); }
.ex-inline { padding: 4px 0; }
.ex-health { font-style: normal; font-size: .72rem; font-weight: 700; background: #FDE6EB; color: var(--rose-text); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.ex-dates { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; }
.ex-dates[hidden] { display: none; }
.ex-dates > div { width: 220px; }
.ex-sentence, .ex-bar p { color: var(--ink); }
.ex-sentence { font-weight: 600; margin: 12px 0 0; }
.ex-errors { margin-bottom: 14px; }
.ex-bar { position: sticky; bottom: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 -2px 10px rgba(60, 58, 71, .10); padding: 12px 18px; }
.ex-bar p { margin: 0; font-weight: 700; }
.ex-bar .btn { flex: none; white-space: nowrap; }
.ex-table { font-size: .9rem; }
.ex-table td, .ex-table th { text-align: left !important; vertical-align: top; }
.ex-sort-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; }
.ex-sort-btn::after { content: " \2195"; opacity: .5; }
th[aria-sort="ascending"] .ex-sort-btn::after { content: " \2191"; opacity: 1; }
th[aria-sort="descending"] .ex-sort-btn::after { content: " \2193"; opacity: 1; }
.ex-options { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; margin-bottom: 14px; }
.ex-print-logo { display: none; }
.ex-sheet-head { display: flex; align-items: center; gap: 20px; background: var(--surface); border-radius: var(--radius); border-left: 6px solid var(--brand); padding: 16px 20px; margin-bottom: 14px; }
.ex-sheet-head img { width: 150px; height: auto; }
.ex-sheet-head h1 { font-size: 1.6rem; margin: 0; }
.ex-sheet-head p { margin: 2px 0 0; color: var(--ink-soft); }
.ex-sheet { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 20px; margin-bottom: 14px; }
.ex-sheet h2 { font-size: 1.15rem; font-weight: 700; color: var(--brand-text); margin: 0 0 10px; }
@media only screen and (max-width: 600px) {
  .ex-bar { padding: 10px 12px; }
  .ex-sheet-head { flex-direction: column; align-items: flex-start; gap: 8px; }
}
@media print {
  .ex-print .ex-print-logo { display: block; width: 42mm; margin-bottom: 3mm; }
  .ex-print * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .ex-print .ex-sheet, .ex-print .ex-flat { break-inside: auto; box-shadow: none; border: 0; padding: 0; margin: 0 0 5mm; }
  .ex-print .ex-sheet h2 { font-size: 12pt; border-bottom: 1px solid #EE964B; padding-bottom: 1mm; break-after: avoid; }
  .ex-print .ex-sheet-head h1 { font-size: 18pt; }
  .ex-print .yf-fields { grid-template-columns: 1fr 1fr; gap: 2mm 6mm; }
  .ex-print .yf-field, .ex-print tr { break-inside: avoid; }
  .ex-print thead { display: table-header-group; }
  .ex-print .ex-table { font-size: 8.5pt; }
  .ex-print .ex-table td, .ex-print .ex-table th { padding: 1.2mm 1.5mm; }
  .ex-print a { color: inherit; }
}

/* ---------- File active et Rendez-vous d'une période ---------- */
.ex-filters { align-items: flex-start; flex-direction: column; gap: 10px; }
.ex-filters > * { max-width: 100%; min-width: 0; }
.ex-filters .st-selects { width: 100%; }
.ex-filters .st-chip { position: relative; }
.ex-check-chip input[type=checkbox] { position: absolute; opacity: 0; pointer-events: none; }
.ex-check-chip b, .ex-count-chip b { font-weight: inherit; }
.ex-count-chip b { color: var(--ink-soft); font-weight: 700; }
.ex-count-chip.on b { color: var(--ink-on-brand); }
button.st-chip { font-family: inherit; }
.ex-search { flex: 1 1 240px; max-width: 360px; cursor: text; }
.ex-search i { font-size: 18px; color: var(--ink-soft); }
.ex-search input[type=search].browser-default { border: 0; background: transparent; box-shadow: none; outline: 0; width: 100%; min-width: 0; height: auto; margin: 0; padding: 0; font: inherit; color: var(--ink); }
.ex-reset { font-weight: 600; font-size: .9rem; color: var(--brand-text); padding: 6px 0; }
.ex-only-print { display: none; }
.ex-tag { font-style: normal; font-size: .72rem; font-weight: 700; border-radius: 999px; padding: 1px 8px; background: #EFEDEA; color: var(--ink-soft); white-space: nowrap; }
.ex-tag-new { background: #E3F6EF; color: var(--teal-text); }
.ex-fa th a { color: inherit; white-space: nowrap; }
.ex-fa th[aria-sort] a { color: var(--brand-text); }
.ex-fa .fa-name { font-weight: 600; }
.ex-fa .fa-old { color: var(--rose-text); font-weight: 600; }
.ex-move { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 14px; }
.ex-move h3 { font-size: 1.1rem; font-weight: 700; margin: 0; }
.ex-move .btn { width: 38px; padding: 0; }
.ex-split { margin: 0 0 14px; }
.ex-split h4 { font-size: .95rem; font-weight: 700; margin: 10px 0 4px; }
.ex-day { margin-bottom: 12px; }
.ex-day.is-today { box-shadow: 0 0 0 2px var(--brand); }
.ex-day > h3 { font-size: 1.05rem; font-weight: 700; margin: 0 0 4px; }
.ex-day > h3::first-letter { text-transform: uppercase; }
.ex-day > h3 small { font-weight: 400; color: var(--ink-soft); font-size: .88rem; margin-left: 6px; }
.ex-day ul { margin: 0; }
.ex-rdv { display: grid; grid-template-columns: 70px minmax(0, 1.4fr) minmax(0, 1.2fr) minmax(0, 1.2fr) 100px; gap: 4px 14px; padding: 8px 0; border-top: 1px solid var(--line); font-size: .92rem; }
.ex-rdv small { display: block; color: var(--ink-soft); font-size: .82rem; }
.ex-rdv-title { font-weight: 600; overflow-wrap: anywhere; }
.ex-rdv-state { text-align: right; }
.ex-rdv.is-canceled { color: var(--ink-soft); }
.ex-rdv.is-canceled .ex-rdv-time b, .ex-rdv.is-canceled .ex-rdv-title, .ex-rdv.is-canceled .ex-rdv-title a, .ex-rdv.is-canceled .ex-rdv-who, .ex-rdv.is-canceled .ex-rdv-where { text-decoration: line-through; }
.ex-rdv .yf-state[data-state^="absen"], .ex-rdv .yf-state[data-state^="manqu"] { background: #FDE6EB; color: var(--rose-text); }
@media only screen and (max-width: 600px) {
  .ex-search { max-width: none; flex-basis: 100%; }
  .ex-filters .st-selects { display: grid; grid-template-columns: 1fr 1fr; }
  .ex-filters .st-selects > .ex-search, .ex-filters .st-selects > .ex-reset { grid-column: 1 / -1; }
  .ex-filters .st-select { flex-direction: column; align-items: stretch; gap: 0; border-radius: 12px; padding: 5px 12px; font-size: .78rem; color: var(--ink-soft); min-width: 0; }
  .ex-filters .st-select select { width: 100%; max-width: none; font-size: .92rem; }
  .ex-move { flex-wrap: nowrap; }
  .ex-move h3 { flex: 1; text-align: center; font-size: 1rem; }
  .ex-move .btn { flex: none; }
  .ex-move .ex-reset { flex: none; max-width: 90px; line-height: 1.2; }
  .ex-filters > .st-chips { flex-wrap: nowrap; overflow-x: auto; padding: 2px; scrollbar-width: none; width: 100%; }
  .ex-filters > .st-chips::-webkit-scrollbar { display: none; }
  .ex-filters > .st-chips .st-chip { flex: none; white-space: nowrap; }
  .st-kpi-label { min-height: 0; }
  .ex-rdv { grid-template-columns: 58px minmax(0, 1fr) auto; }
  .ex-rdv-state { grid-column: 3; grid-row: 1; }
  .ex-rdv-who, .ex-rdv-where { grid-column: 2 / -1; font-size: .85rem; color: var(--ink-soft); }
  .ex-rdv-where:empty { display: none; }
  .ex-fa, .ex-fa tbody { display: block; }
  .ex-fa thead { display: none; }
  .ex-fa tbody tr { display: flex; flex-wrap: wrap; gap: 0 14px; padding: 10px 0; }
  .ex-fa td { display: block; padding: 1px 0; font-size: .85rem; }
  .ex-fa .fa-name { flex: 1 1 60%; font-size: 1rem; }
  .ex-fa .fa-kind { color: var(--ink-soft); }
  .ex-fa .fa-members { flex: 1 1 100%; color: var(--ink-soft); }
  .ex-fa td[data-k]::before { content: attr(data-k) " : "; color: var(--ink-soft); }
  .ex-fa td[data-k="Premier"] { display: none; }
}
@media print {
  .ex-print .ex-only-print { display: inline; }
  .ex-print .st-kpis { grid-template-columns: repeat(4, 1fr); gap: 3mm; margin-bottom: 4mm; }
  .ex-print .st-kpi { padding: 2mm 3mm; }
  .ex-print .st-kpi-label { min-height: 0; font-size: 8pt; }
  .ex-print .st-kpi-value { font-size: 13pt; }
  .ex-print .ex-fa th span { display: none; }
  .ex-print .ex-day { break-inside: auto; box-shadow: none !important; }
  .ex-print .ex-day > h3 { font-size: 11pt; color: #A9530F; break-after: avoid; }
  .ex-print .ex-rdv { grid-template-columns: 22mm 1.4fr 1.2fr 1.2fr 24mm; font-size: 8.5pt; padding: 1mm 0; break-inside: avoid; }
  .ex-print .ex-rdv small { font-size: 8pt; }
}

/* ---------- Annuaire : fiche détaillée ---------- */
.dir-card { cursor: pointer; }
.dir-card:hover { box-shadow: 0 0 0 2px var(--brand); }
.dir-card.is-target { box-shadow: 0 0 0 3px var(--teal); }
.dir-open { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--ink); text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.modal.dir-modal { max-width: 560px; width: calc(100% - 24px); }
.dir-modal .modal-content { padding: 20px; }
.dir-modal-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.dir-modal-head h3 { font-size: 1.25rem; font-weight: 700; margin: 0; overflow-wrap: anywhere; }
.dir-modal-head p { margin: 0; color: var(--ink-soft); font-size: .9rem; }
.dir-modal .yf-kv dd { white-space: pre-line; }
.dir-modal .dir-links { margin: 0; }
.dir-modal .modal-footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; height: auto; padding: 10px 20px 16px; }
.dir-saved { display: flex; align-items: center; gap: 8px; background: #E3F6EF; color: var(--teal-text); border-radius: 10px; padding: 8px 14px; font-weight: 600; margin: 0 0 12px; }

/* ---------- Droits : rôles, droits d'une personne, tableau par rôle, accès refusé ---------- */
.mb-flash.is-error { background: #FDE6EB; color: var(--rose-text); }
.dr-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.dr-pill { border-radius: 999px; padding: 1px 10px; font-size: .78rem; font-weight: 700; }
.dr-pill.is-administrateur { color: #B3173E; background: #fde3e9; }
.dr-pill.is-professionnel { color: #038a6e; background: #d9f6ee; }
.dr-pill.is-accueil { color: #5a5478; background: #e8e6f2; }
.dr-custom { border: 1px solid var(--brand); color: var(--brand-text); border-radius: 999px; padding: 0 9px; font-size: .78rem; font-weight: 600; }
.dr-lock { font-size: 18px; vertical-align: -4px; margin-right: 6px; color: var(--brand-text); }
.dr-roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dr-role, .dr-check { display: flex; align-items: flex-start; gap: 10px; color: var(--ink); cursor: pointer; font-size: .95rem; }
.dr-role { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.dr-role:hover { border-color: var(--brand); }
.dr-role:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.dr-role:focus-within { outline: 2px solid var(--brand-text); outline-offset: 2px; }
.dr-role small, .dr-check small, .dr-matrix small { display: block; color: var(--ink-soft); font-size: .82rem; font-weight: 400; line-height: 1.35; }
.dr-role [type="radio"], .dr-check [type="checkbox"], .dr-cell [type="checkbox"] { position: static !important; opacity: 1 !important; pointer-events: auto !important; flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--brand-text); }
.dr-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 14px; margin-top: 12px; }
.dr-reset { display: flex; align-items: center; gap: 8px; margin: 0; }
.dr-reset[hidden] { display: none; }
.dr-reset button { background: none; border: 0; padding: 0; font: inherit; font-size: .9rem; font-weight: 600; color: var(--brand-text); text-decoration: underline; cursor: pointer; }
.dr-families { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 22px; margin-top: 6px; }
.dr-families fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.dr-families legend { font-weight: 700; font-size: .9rem; color: var(--brand-text); padding: 0; margin-bottom: 4px; }
.dr-check { padding: 6px 8px; border-radius: 8px; }
.dr-check b { font-weight: 600; }
.dr-check:hover { background: var(--bg); }
.dr-check.is-diff { background: var(--brand-soft); }
.dr-page { max-width: 900px; }
.dr-card { padding: 6px 12px; }
.dr-matrix { width: 100%; border-collapse: collapse; }
.dr-matrix th, .dr-matrix td { padding: 8px 6px; border-radius: 0; }
.dr-matrix thead th { text-align: center; font-size: .9rem; }
.dr-matrix thead th:first-child { text-align: left; }
.dr-matrix tbody th { text-align: left; font-weight: 400; }
.dr-matrix tbody th b { font-weight: 600; }
.dr-matrix td { width: 120px; text-align: center; }
.dr-matrix tr { border-bottom: 1px solid var(--line); }
.dr-matrix .dr-family { background: var(--brand-soft); }
.dr-matrix .dr-family th { font-weight: 700; color: var(--brand-text); font-size: .9rem; padding: 6px; }
.dr-cell { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 40px; cursor: pointer; }
.dr-cell:has(:disabled) { cursor: not-allowed; }
.dr-cell [type="checkbox"]:focus-visible, .dr-check [type="checkbox"]:focus-visible { outline: 2px solid var(--brand-text); outline-offset: 2px; }
.dr-short { display: none; }
.dr-403 { max-width: 460px; margin: 8vh auto; text-align: center; }
.dr-403 > i { font-size: 56px; color: var(--brand); }
.dr-403 h2 { margin: 8px 0; }
.dr-403 p { font-size: 1.05rem; margin: 0 0 18px; }
@media (max-width: 700px) {
  .dr-roles, .dr-families { grid-template-columns: 1fr; }
  .dr-long { display: none; }
  .dr-short { display: inline; }
  .dr-matrix td { width: 56px; padding: 4px 0; }
  .dr-matrix thead th { font-size: .78rem; padding: 8px 2px; }
  .dr-matrix thead th:first-child { padding-left: 6px; }
}

/* ---------- Menu de gauche (2026-11) : rubriques visibles, sous-menus repliables ---------- */
.sidenav { padding-bottom: 24px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.sidenav .sidenav-head { padding: 12px 12px 8px 18px; position: sticky; top: 0; z-index: 2; background: var(--surface); }
.sidenav li.nv-item > details { margin: 0; padding: 0; }
.sidenav li.nv-item > a, .sidenav summary, .sidenav li.nv-label { box-sizing: border-box; }
.sidenav li.nv-item, .sidenav li.nv-label, .sidenav li.nv-sub, .sidenav li.nv-find, .sidenav li.nv-none { line-height: normal; }
.sidenav li[hidden] { display: none; }
.sidenav li.nv-item > a, .sidenav .nv-group > summary, .sidenav .nv-subgroup > summary {
  display: flex; align-items: center; justify-content: flex-start; gap: 12px; height: auto; min-height: 36px; line-height: 1.25;
  margin: 1px 10px; padding: 4px 12px; border-radius: 10px; color: var(--ink); font-size: .95rem; font-weight: 600; cursor: pointer; }
.sidenav details > summary { list-style: none; }
.sidenav details > summary::-webkit-details-marker { display: none; }
.sidenav li.nv-item > a:hover, .sidenav details > summary:hover { background: var(--bg); }
.sidenav li.nv-item > a:focus-visible, .sidenav details > summary:focus-visible { outline: 2px solid var(--brand-text); outline-offset: -2px; }
.sidenav li.nv-item > a > i.material-icons.nav-icon, .sidenav summary > i.material-icons.nav-icon { height: auto; line-height: 1; font-size: 22px; width: 24px; color: var(--ink-soft); }
.sidenav li.nv-item > a:hover > i.material-icons.nav-icon, .sidenav summary:hover > i.material-icons.nav-icon { color: var(--brand-text); }
.sidenav li.nv-item > a.is-current { background: var(--brand-soft); color: var(--brand-text); font-weight: 700; box-shadow: inset 3px 0 0 var(--brand); }
.sidenav li.nv-item > a.is-current > i.material-icons.nav-icon, .sidenav .has-current > summary > i.material-icons.nav-icon { color: var(--brand-text); }
.sidenav .has-current > summary { color: var(--brand-text); }
.sidenav li.nv-label { padding: 0 22px; margin: 10px 0 2px; }
.sidenav li.nv-label > span { font-size: .75rem; font-weight: 700; color: var(--ink-soft); }
.sidenav summary > i.nv-chevron { margin: 0 0 0 auto !important; width: auto; height: auto; line-height: 1; font-size: 20px; color: var(--ink-soft); transition: transform .2s; float: none; }
.sidenav details[open] > summary > i.nv-chevron { transform: rotate(180deg); }
.sidenav details > ul { margin: 2px 0 6px 33px; padding-left: 0; border-left: 2px solid var(--line); }
.sidenav details > ul li.nv-item > a { min-height: 34px; margin: 0 10px 0 6px; font-size: .9rem; font-weight: 400; }
.sidenav details > ul li.nv-item > a.is-current { font-weight: 700; }
.sidenav li.nv-sub { padding: 10px 18px 4px; font-size: .78rem; color: var(--ink-soft); }
.sidenav .nv-subgroup > summary { min-height: 36px; margin: 0 10px 0 6px; font-size: .9rem; }
.sidenav .nv-subgroup > ul { margin-left: 18px; }
.sidenav .nv-count { margin-left: auto; font-size: .75rem; font-weight: 400; color: var(--ink-soft); }
.sidenav .nv-subgroup > summary > i.nv-chevron { margin-left: 0 !important; }
.sidenav li.nv-find { padding: 4px 12px 6px 8px; }
.sidenav li.nv-find input.browser-default { width: 100%; height: 36px; box-sizing: border-box; border: 1px solid var(--line); border-radius: 999px; padding: 0 14px; font: inherit; font-size: .88rem; color: var(--ink); background: var(--surface); }
.sidenav li.nv-find input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.sidenav li.nv-none { padding: 6px 18px; font-size: .88rem; color: var(--ink-soft); }
@media (min-width: 993px) {
  body.nav-collapsed .sidenav li.nv-item > a, body.nav-collapsed .sidenav .nv-group > summary { justify-content: center; padding: 4px 0; margin: 1px 10px; }
  body.nav-collapsed .sidenav li.nv-label { margin: 8px 18px; padding: 0; width: auto; height: 1px; background: var(--line); }
  body.nav-collapsed .sidenav li.nv-label > span, body.nav-collapsed .sidenav .nv-chevron, body.nav-collapsed .sidenav details > ul { display: none !important; }
}
@media (max-width: 992px) {
  .sidenav li.nv-item > a, .sidenav .nv-group > summary, .sidenav details > ul li.nv-item > a, .sidenav .nv-subgroup > summary { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .sidenav summary > i.nv-chevron { transition: none; } }

/* ---------- Message « Chargement en cours » (page-loader.js) ---------- */
.page-loader { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center;
  background: rgba(247, 245, 241, .72); opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility 0s linear .2s; }
.page-loader.is-on { opacity: 1; visibility: visible; transition: opacity .2s ease; }
.page-loader-card { display: flex; flex-direction: column; align-items: center; gap: 6px; max-width: 340px; margin: 0 16px;
  padding: 22px 26px; background: #fff; border-radius: 16px; box-shadow: 0 10px 30px rgba(60, 58, 71, .18); text-align: center; color: #3C3A47; }
.page-loader-card strong { font-size: 1.05rem; }
.page-loader-text { font-size: .92rem; color: #6b6977; min-height: 2.6em; }
.page-loader-spin { width: 42px; height: 42px; margin-bottom: 6px; border-radius: 50%;
  border: 4px solid #fbe3cf; border-top-color: #EE964B; animation: page-loader-turn .8s linear infinite; }
.page-loader-close { margin-top: 4px; border: 0; background: none; color: #b8621c; font-size: .85rem; text-decoration: underline; cursor: pointer; }
@keyframes page-loader-turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .page-loader-spin { animation-duration: 2.4s; } }
.page-loader-close[hidden] { display: none; }

/* ---------- Pages « Paramètres » (settings-list-base.html, settings-form-base.html) ---------- */
.sp-page { max-width: none; }
.sp-head { align-items: flex-end; }
.sp-kicker { display: flex; align-items: center; gap: 6px; margin: 0 0 2px; color: var(--ink-soft); font-size: .85rem; font-weight: 600; }
.sp-kicker .material-icons { font-size: 18px; color: var(--brand-text); }
.sp-twice { font-size: .6em; font-weight: 600; color: var(--brand-text); background: var(--brand-soft); border-radius: 999px; padding: 2px 10px; vertical-align: middle; }
.sp-add { display: inline-flex; align-items: center; }
.sp-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.sp-search { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.sp-search .material-icons { color: var(--ink-soft); }
.sp-search input { flex: 1; border: 0; outline: 0; font-size: 1rem; background: transparent; height: 2.2rem; }
.sp-table { width: 100%; border-collapse: collapse; }
.sp-table th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); font-weight: 700; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.sp-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.sp-table tbody tr:last-child td { border-bottom: 0; }
.sp-table tbody tr[data-href] { cursor: pointer; }
.sp-table tbody tr[data-href]:hover, .sp-table tbody tr[data-href]:focus { background: var(--brand-soft); outline: none; }
.sp-table .sp-act { text-align: right; width: 1%; white-space: nowrap; }
.sp-edit { display: inline-flex; align-items: center; gap: 4px; color: var(--brand-text); font-weight: 600; font-size: .9rem; }
.sp-edit .material-icons { font-size: 18px; }
.sp-name { font-weight: 600; }
.sp-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 10px; vertical-align: -2px; border: 1px solid rgba(0,0,0,.08); }
.sp-empty { display: flex; align-items: center; gap: 14px; padding: 26px 20px; color: var(--ink-soft); }
.sp-empty .material-icons { font-size: 40px; color: #D8D2CA; }
.sp-empty p { margin: 0; }
.sp-none { padding: 14px 16px; color: var(--ink-soft); margin: 0; }
.sp-none[hidden], .sp-error[hidden] { display: none; }
.sp-error { color: var(--rose-text); font-weight: 600; margin: 8px 0 0; }
.sp-former { margin-top: 16px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 16px; }
.sp-former summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.sp-former ul { margin: 6px 0 0; padding: 0; }
.sp-former li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); list-style: none; }
.sp-former li form { margin: 0; }
.sp-modal { max-width: 520px; border-radius: var(--radius); }
.sp-modal h4 { font-size: 1.3rem; font-weight: 700; margin: 0 0 14px; }
.sp-modal .modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 20px 16px; height: auto; }
.sp-input, .sp-field select.sp-input, .sp-field textarea.sp-input { border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; height: 2.6rem; margin: 0;
  background: var(--surface); box-sizing: border-box; width: 100%; box-shadow: none; font-size: 1rem; color: var(--ink); }
.sp-field textarea.sp-input { height: auto; min-height: 5rem; padding: 8px 10px; }
.sp-field select[multiple].sp-input { height: auto; min-height: 7rem; padding: 4px; }
.sp-input:focus { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); outline: none; }
.sp-field.has-error .sp-input { border-color: var(--rose); }
.sp-colors { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sp-color-input { width: 52px; height: 40px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; }
.sp-swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.sp-swatch.is-on { box-shadow: 0 0 0 2px var(--ink); }
.sp-check { display: flex; align-items: center; gap: 8px; }
.sp-check input { position: static !important; opacity: 1 !important; pointer-events: auto !important; width: 18px; height: 18px; }
.sp-danger-zone { margin-top: 18px; font-size: .9rem; color: var(--ink-soft); }
.sp-danger-zone a { display: inline-flex; align-items: center; gap: 6px; color: var(--rose-text); font-weight: 600; }
.sp-danger-zone .material-icons { font-size: 18px; }
@media (max-width: 600px) {
  .sp-table td, .sp-table th { padding: 10px 12px; }
  .sp-edit span { display: none; }
}

/* ---------- Listes de dossiers (folder-list-base.html et liste des jeunes) ---------- */
.fl-table tbody tr[data-href] { cursor: pointer; }
.fl-table tbody tr[data-href]:hover td { background: var(--brand-soft); }
.fl-table td.fl-name a { color: var(--ink); font-weight: 700; }
.fl-table .fl-first-inline { display: none; }
.fl-plan-btn { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--brand-text); font-weight: 600; font-size: .85rem; white-space: nowrap; }
.fl-plan-btn:hover { background: var(--brand-soft); border-color: var(--brand); }
.fl-plan-btn .material-icons { font-size: 18px; }
@media only screen and (max-width: 600px) {
  /* carte compacte : « NOM Prénom » + Planifier sur la 1re ligne, n°, âge, dernière action en petit dessous */
  #table-elements.fl-table.cards-mobile > tbody > tr { display: flex; flex-wrap: wrap; align-items: center; gap: 0 12px; padding: 10px 12px; }
  #table-elements.fl-table.cards-mobile > tbody > tr > td { padding: 0; font-weight: 400; font-size: .85rem; color: var(--ink-soft); }
  #table-elements.fl-table.cards-mobile > tbody > tr > td::before { display: none !important; }
  #table-elements.fl-table.cards-mobile > tbody > tr > td.fl-name { order: 0; flex: 1 1 calc(100% - 64px); min-width: 0; font-size: 1.05rem; color: var(--ink); padding-bottom: 2px; }
  #table-elements.fl-table.cards-mobile .fl-first-inline { display: inline; font-weight: 600; color: var(--ink); }
  #table-elements.fl-table.cards-mobile > tbody > tr > td.fl-first { display: none; }
  #table-elements.fl-table.cards-mobile > tbody > tr > td.fl-plan { order: 1; margin-left: auto; }
  #table-elements.fl-table.cards-mobile > tbody > tr > td.fl-num { order: 2; }
  #table-elements.fl-table.cards-mobile > tbody > tr > td.fl-age { order: 3; }
  #table-elements.fl-table.cards-mobile > tbody > tr > td.fl-last { order: 4; }
  #table-elements.fl-table.cards-mobile > tbody > tr > td.fl-alert { order: 5; margin-left: auto; }
  #table-elements.fl-table.cards-mobile > tbody > tr > td[data-short]::before { content: attr(data-short) !important; display: inline !important;
    font-size: inherit; font-weight: 400; text-transform: none; letter-spacing: 0; color: inherit; }
  #table-elements.fl-table.cards-mobile .fl-plan-btn span { display: none; }
  #table-elements.fl-table.cards-mobile .fl-plan-btn { padding: 6px; }
  #table-elements.fl-table.cards-mobile .fl-alert .switch label { font-size: 0; }
}
.sp-check [type="checkbox"] + span { padding-left: 0 !important; height: auto; line-height: 1.4; }
.sp-check [type="checkbox"] + span::before, .sp-check [type="checkbox"] + span::after { display: none !important; }
.sp-field.sp-check-wrap, .ms-grid > .sp-check { align-self: end; }
/* Modifier une action (onglet Suivi) : bouton « Fermer » sur la ligne du titre, « Enregistrer » ne cache plus de champ */
@media only screen and (max-width: 600px) {
  .yf-action-edit .yf-card-head { flex-wrap: nowrap; align-items: flex-start; }
  .yf-action-edit .yf-close { padding: 0 6px; flex: 0 0 auto; }
  .yf-action-edit .yf-close .material-icons { margin-right: 0; }
  .yf-action-edit .yf-close { font-size: 0; }
  .yf-action-edit .yf-close .material-icons { font-size: 24px; }
  .yf-action-edit button.save.btn { position: static; box-shadow: none; margin-top: 8px; }
}
/* Mon mot de passe */
.pw-page { max-width: 560px; }
.pw-row { display: flex; gap: 6px; align-items: center; }
.pw-row input { flex: 1; }
.pw-eye { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; height: 2.6rem; width: 2.8rem; cursor: pointer; color: var(--ink-soft); display: inline-flex; align-items: center; justify-content: center; }
.pw-ok { display: flex; align-items: center; gap: 8px; background: #E3F7F1; color: var(--teal-text); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 12px; font-weight: 600; }
/* Planning d'un lieu / d'une salle (consultation) */
.pl-page h2 .sp-dot { width: 18px; height: 18px; vertical-align: 0; }
.pl-rooms { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.pl-rooms-label { color: var(--ink-soft); font-weight: 600; font-size: .9rem; }
.pl-room { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; background: var(--surface); color: var(--ink); font-size: .9rem; }
.pl-room:hover { border-color: var(--brand); background: var(--brand-soft); }
.pl-room .material-icons { font-size: 18px; color: var(--brand-text); }
.pl-tabs { display: inline-flex; gap: 4px; margin-bottom: 10px; }
.pl-tab { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 16px; font-weight: 600; color: var(--ink); cursor: pointer; }
.pl-tab.is-on { background: var(--brand); border-color: var(--brand); color: var(--ink-on-brand); }
.pl-card { padding: 12px; }
.pl-card .fc-time-grid-event .fc-title { white-space: normal; font-size: .8rem; line-height: 1.25; }
/* Croiser deux critères : choix du type de dossier et de ce qu'on compte */
.st-cross-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0 0 14px; }
.st-cross-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.st-cross-pick > span { color: var(--ink-soft); font-weight: 600; font-size: .9rem; margin-right: 2px; }
.st-cross-pick .st-chip { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; background: var(--surface); color: var(--ink); font-weight: 600; font-size: .9rem; }
.st-cross-pick .st-chip.is-on { background: var(--brand); border-color: var(--brand); color: var(--ink-on-brand); }
/* Planning des membres sur téléphone : prénom + initiale, sur deux lignes si besoin */
@media only screen and (max-width: 600px) {
  .fc-resource-area .member-link { white-space: normal; line-height: 1.15; display: inline-block; font-size: .82rem; }
}
/* Onglets du dossier sur téléphone : léger fondu à droite pour montrer qu'on peut faire glisser */
@media only screen and (max-width: 600px) {
  .folder-tabs { -webkit-mask-image: linear-gradient(to right, #000 82%, transparent); mask-image: linear-gradient(to right, #000 82%, transparent); padding-right: 24px; }
  .folder-tabs.at-end { -webkit-mask-image: none; mask-image: none; }
}

/* Tri des listes : les images de DataTables n'existent pas sur le serveur, petites flèches en texte */
table.dataTable thead .sorting, table.dataTable thead .sorting_asc, table.dataTable thead .sorting_desc { background-image: none !important; cursor: pointer; }
table.dataTable thead .sorting::after { content: " ↕"; color: #b0b7bf; font-size: .85em; }
table.dataTable thead .sorting_asc::after { content: " ↑"; font-size: .85em; }
table.dataTable thead .sorting_desc::after { content: " ↓"; font-size: .85em; }
.dataTables_scrollBody thead th::after { content: none !important; }
.ms-avatar:not([style]) { background: var(--brand-soft); color: var(--brand-text); text-shadow: none; }

/* Planning d'un lieu : une ligne par personne + ligne « Nombre de présents » */
.pl-help { display: flex; gap: 6px; align-items: flex-start; color: var(--ink-soft); font-size: .9rem; margin: 0 0 10px; }
.pl-help .material-icons { font-size: 18px; color: var(--brand-text); }
.pl-card .fc-timeline-event { border-radius: 6px; border: 0; padding: 2px 4px; cursor: pointer; }
.pl-card .fc-timeline-event .fc-title { font-size: .8rem; font-weight: 600; }
.pl-card .pl-count { border-radius: 0; }
.pl-card .pl-count .fc-title { font-weight: 700; }
.pl-card .pl-total-cell { background: var(--brand-soft); font-weight: 700; }
.pl-card .fc-time-grid-event { cursor: pointer; }
.pl-who { position: relative; color: var(--ink); font-size: .95rem; margin: 12px 0 0; padding: 12px 40px 12px 14px; border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 10px; background: var(--brand-soft); }
.pl-who strong { display: block; text-transform: capitalize; }
.pl-who-sub { display: block; color: var(--ink); margin-top: 2px; }
.pl-who ul { margin: 6px 0 0; padding-left: 18px; columns: 2; }
.pl-who ul li { list-style: disc; }
.pl-who a { display: inline-block; margin-top: 6px; font-weight: 600; color: var(--brand-text); }
.pl-who p { margin: 6px 0 0; }
.pl-who-close { position: absolute; top: 6px; right: 8px; border: 0; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--ink-soft); }
.pl-empty { color: var(--ink-soft); margin: 10px 0 0; }
@media only screen and (max-width: 600px) { .pl-who ul { columns: 1; } }
.pl-who ul li, .pl-who span, .pl-who strong { color: var(--ink); }
.pl-places { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 0 0 20px; }
.pl-place { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; margin: 0; color: var(--ink); border: 1px solid var(--line); min-height: 0; }
.pl-place:hover { border-color: var(--brand); }
.pl-place .sp-dot { width: 16px; height: 16px; flex: none; margin-top: 4px; }
.pl-place-text { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.pl-place-text strong { display: block; font-size: 1.05rem; line-height: 1.3; overflow-wrap: anywhere; }
.pl-place-text small { color: var(--ink-soft); }
.pl-place-go { display: inline-flex; align-items: center; color: var(--brand-text); font-weight: 600; font-size: .9rem; margin-top: 4px; }
.pl-place-go .material-icons { font-size: 20px; }
.pl-sub { font-size: 1.1rem; font-weight: 700; margin: 8px 0 10px; color: var(--ink); }
.pl-card .fc-timeline .fc-cell-text a { color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--line); }

/* Materialize ajoute du padding à toutes les cellules : il empêchait les plannings en lignes de tenir sur un téléphone */
.fc-timeline .fc-time-area .fc-slats td, .fc-timeline .fc-head .fc-time-area th, .fc-timeline .fc-body .fc-time-area .fc-rows td { padding: 0; }
/* Accueil : fête du jour et météo */
.hm-day { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.hm-day-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-size: .9rem; }
.hm-day-chip[hidden] { display: none; }
.hm-meteo-city { font-weight: 700; }
.hm-meteo-part { display: inline-flex; align-items: center; gap: 4px; padding-left: 10px; border-left: 1px solid var(--line); }
.hm-meteo-ico { font-size: 1.15rem; line-height: 1; }
#hm-meteo { gap: 10px; flex-wrap: wrap; }

/* Demandes RGPD */
.rg-card { display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 0 0 14px; box-shadow: var(--shadow); }
.rg-card h3 { font-size: 1.15rem; font-weight: 700; margin: 2px 0 6px; }
.rg-card p { margin: 0 0 10px; }
.rg-num { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-text); font-weight: 700; display: flex; align-items: center; justify-content: center; }
.rg-body { flex: 1 1 auto; min-width: 0; }
.rg-tag { display: inline-block; vertical-align: middle; font-size: .75rem; font-weight: 700; color: var(--teal-text); background: rgba(2,195,154,.12); border-radius: 999px; padding: 2px 8px; margin-left: 6px; }
.rg-list { margin: 0 0 12px; padding-left: 18px; color: var(--ink-soft); }
.rg-list li { list-style: disc; }
.rg-hint, .rg-row-sub { color: var(--ink-soft); font-size: .9rem; }
.rg-confirm { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 12px; color: var(--ink); font-size: .95rem; cursor: pointer; }
.rg-confirm input[type=checkbox] { position: static; opacity: 1; pointer-events: auto; width: 18px; height: 18px; margin-top: 2px; flex: none; }
.rg-confirm input[type=checkbox] + span { padding-left: 0 !important; height: auto !important; line-height: 1.45 !important; font-size: .95rem !important; color: var(--ink) !important; }
.rg-confirm input[type=checkbox] + span::before, .rg-confirm input[type=checkbox] + span::after { display: none !important; }
.rg-error { color: var(--rose-text); font-weight: 600; }
.rg-danger { border-color: rgba(234,44,89,.35); }
.rg-danger .rg-num { background: rgba(234,44,89,.1); color: var(--rose-text); }
.btn.rg-btn-danger, .btn.rg-btn-danger:hover { background: var(--rose-text); color: #fff; }
.rg-note, .rg-empty { display: flex; gap: 8px; align-items: flex-start; color: var(--ink-soft); margin: 16px 0; }
.rg-note .material-icons, .rg-empty .material-icons { color: var(--brand-text); }
.rg-trash { display: flex; flex-direction: column; gap: 10px; }
.rg-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.rg-row.is-new { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.rg-row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rg-days { font-size: .85rem; font-weight: 600; color: var(--ink-soft); }
.rg-days.is-soon { color: var(--rose-text); }
.rg-row-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.rg-forget summary { cursor: pointer; color: var(--rose-text); font-size: .9rem; }
.rg-forget[open] { background: #FFF5F7; border-radius: 8px; padding: 8px; }
.ex-rgpd { border-left: 4px solid var(--brand); background: var(--brand-soft); padding: 10px 14px; border-radius: 8px; margin: 0 0 16px; }
@media only screen and (max-width: 600px) { .rg-card { padding: 14px; } .rg-row-actions { align-items: stretch; width: 100%; } }

/* ---------------------------------------------------------------- export croisé */
.cx-hint { font-weight: 400; font-size: .8rem; color: var(--ink-soft); margin-left: 6px; }
.cx-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cx-group h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); margin: 0 0 6px; font-weight: 600; }
.cx-dim { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; background: #fff; }
.cx-dim[open] { border-color: var(--brand); }
.cx-dim summary { display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer; list-style: none; font-weight: 600; }
.cx-dim summary::-webkit-details-marker { display: none; }
.cx-dim summary span { flex: 1; }
.cx-dim summary .material-icons { color: var(--ink-soft); transition: transform .15s; }
.cx-dim[open] summary .material-icons { transform: rotate(180deg); }
.cx-count { background: var(--brand); color: #fff; border-radius: 10px; padding: 0 8px; font-size: .75rem; line-height: 1.5; }
.cx-options { padding: 0 12px 10px; display: grid; grid-template-columns: 1fr; gap: 2px; }
.cx-options.is-long { max-height: 260px; overflow-y: auto; }
.cx-option { display: flex !important; align-items: center; gap: 8px; color: var(--ink) !important; font-size: .9rem !important; cursor: pointer; padding: 3px 4px; border-radius: 6px; }
.cx-option:hover { background: var(--brand-soft); }
.cx-option input[type=checkbox] { position: static !important; opacity: 1 !important; pointer-events: auto !important; width: 16px; height: 16px; flex: none; margin: 0; }
.cx-option input[type=checkbox] + span { padding-left: 0 !important; height: auto !important; line-height: 1.35 !important; font-size: .9rem !important; color: var(--ink) !important; flex: 1; }
.cx-option input[type=checkbox] + span::before, .cx-option input[type=checkbox] + span::after { display: none !important; }
.cx-option em { font-style: normal; color: var(--ink-soft); font-size: .8rem; }
.cx-none { color: var(--ink-soft); font-size: .85rem; margin: 4px 0; }
.cx-axes { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; }
.cx-axes label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--ink-soft); }
.cx-axes select { min-width: 200px; height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; background: #fff; color: var(--ink); font-size: .95rem; }
.cx-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 14px; }
.cx-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--brand-soft); color: var(--ink); border-radius: 16px; padding: 4px 6px 4px 12px; font-size: .85rem; }
.cx-chip span { color: var(--brand-text); font-weight: 600; }
.cx-chip .material-icons { font-size: 16px; color: var(--ink-soft); }
.cx-chip:hover .material-icons { color: var(--brand-text); }
.cx-title { font-size: 1.3rem; margin: 8px 0 10px; }
.cx-table-card { margin-bottom: 16px; }
.cx-table td, .cx-table tfoot th { text-align: right; white-space: nowrap; }
.cx-table td:not(.cx-hot):not(.cx-total) { color: var(--ink-soft); }
.cx-table .cx-hot { font-weight: 600; }
.cx-table .cx-total { font-weight: 700; background: var(--brand-soft); }
.cx-table tfoot th, .cx-table tfoot td { border-top: 2px solid var(--line); font-weight: 700; }
.cx-people { margin-top: 16px; }
.cx-new { background: #E3F4EC; color: #1E7A4C; border-radius: 8px; padding: 0 6px; font-size: .7rem; font-weight: 600; vertical-align: middle; }
.cx-method { margin-top: 14px; }
.cx-names.on { background: var(--brand-soft); }
@media (max-width: 800px) {
  .cx-groups { grid-template-columns: 1fr; }
  .cx-axes label, .cx-axes select { width: 100%; }
  .cx-axes .btn { width: 100%; height: auto; min-height: 40px; line-height: 1.3; padding-top: 8px; padding-bottom: 8px; white-space: normal; }
}
@media print {
  .cx-page .cx-title { display: none; }
  .cx-page .st-card { break-inside: avoid; }
  .cx-page .cx-people { break-inside: auto; }
  .cx-page .cx-table { font-size: 8pt; }
}
.cx-page .st-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.cx-people th[scope=row] { white-space: nowrap; }
@media (max-width: 800px) { .cx-page .st-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* export croisé : types de suivi, modèles, graphique */
.cx-scopes { display: flex; flex-wrap: wrap; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin: 0 0 12px; width: fit-content; max-width: 100%; }
.cx-scope { padding: 7px 14px; border-radius: 9px; color: var(--ink); font-weight: 600; font-size: .92rem; }
.cx-scope:hover { background: var(--brand-soft); }
.cx-scope.on { background: var(--brand); color: #fff; }
.cx-presets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 14px; }
.cx-presets-title { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--ink-soft); font-size: .85rem; margin-right: 4px; }
.cx-presets-title .material-icons { font-size: 18px; }
.cx-preset { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 16px; padding: 4px 12px; font-size: .85rem; }
.cx-preset:hover { border-color: var(--brand); color: var(--brand-text); }
.cx-preset.mine { border-color: var(--brand); background: var(--brand-soft); border-radius: 16px 0 0 16px; }
#cx-mine { display: contents; }
.cx-mine-item { display: inline-flex; }
.cx-preset-del { border: 1px solid var(--brand); border-left: 0; background: var(--brand-soft); border-radius: 0 16px 16px 0; padding: 0 6px; cursor: pointer; color: var(--ink-soft); display: inline-flex; align-items: center; }
.cx-preset-del .material-icons { font-size: 15px; }
.cx-preset-del:hover { color: var(--brand-text); }
.cx-save summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 2px; color: var(--brand-text); font-size: .85rem; font-weight: 600; padding: 4px 8px; }
.cx-save summary::-webkit-details-marker { display: none; }
.cx-save summary .material-icons { font-size: 18px; }
.cx-save-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
.cx-save-form input { height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; min-width: 240px; background: #fff; }
.cx-save-form small { flex-basis: 100%; color: var(--ink-soft); }
.cx-find { display: block; width: calc(100% - 24px); margin: 0 12px 6px; height: 32px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; font-size: .88rem; background: #fff; }
.cx-option[hidden] { display: none !important; }
.cx-compare { flex-direction: row !important; align-items: center; gap: 8px !important; color: var(--ink) !important; height: 40px; cursor: pointer; }
.cx-compare input[type=checkbox] { position: static !important; opacity: 1 !important; pointer-events: auto !important; width: 18px; height: 18px; margin: 0; }
.cx-compare input[type=checkbox] + span { padding-left: 0 !important; height: auto !important; line-height: 1.3 !important; font-size: .95rem !important; color: var(--ink) !important; }
.cx-compare input[type=checkbox] + span::before, .cx-compare input[type=checkbox] + span::after { display: none !important; }
.cx-table .cx-hot { background: rgba(238, 150, 75, calc(var(--heat) / 250)); }
.cx-table td a { color: inherit; display: block; }
.cx-table td a:hover { color: var(--brand-text); text-decoration: underline; }
.cx-table .cx-delta { color: var(--ink-soft); font-size: .85rem; }
.cx-chart { margin-bottom: 16px; }
.cx-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 10px; padding: 0; list-style: none; font-size: .82rem; color: var(--ink-soft); }
.cx-legend li { display: inline-flex; align-items: center; gap: 6px; }
.cx-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.cx-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cx-bars li { display: grid; grid-template-columns: minmax(120px, 28%) 1fr 48px; gap: 10px; align-items: center; font-size: .88rem; }
.cx-bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-bar-track { display: flex; height: 16px; background: #F4F1ED; border-radius: 4px; overflow: hidden; }
.cx-bar-track i { display: block; height: 100%; }
.cx-bars b { text-align: right; }
@media (max-width: 800px) {
  .cx-scopes { width: 100%; }
  .cx-scope { flex: 1 1 45%; text-align: center; }
  .cx-bars li { grid-template-columns: 1fr 40px; }
  .cx-bar-label { grid-column: 1 / -1; }
  .cx-compare { width: 100%; }
}
@media print {
  .cx-bar-track, .cx-bar-track i, .cx-legend i, .cx-table .cx-hot { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cx-chart { break-inside: avoid; }
}
.rpt-ranks-box { margin-top: 8px; }
.pick-chip input[type=checkbox] { position: absolute; opacity: 0; pointer-events: none; }
.pick-chip input[type=checkbox] + span { display: inline-flex; align-items: baseline; gap: 5px; height: auto; line-height: 1.3; padding: 8px 14px !important; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: .92rem; color: var(--ink); cursor: pointer; }
.pick-chip input[type=checkbox] + span::before, .pick-chip input[type=checkbox] + span::after { content: none !important; }
.rpt-hint { margin: 6px 0 0; font-size: .85rem; color: var(--ink-soft); line-height: 1.4; }
/* fenêtre d'un rendez-vous : suppression confirmée, puis « Annuler » */
.series-choice .series-who { margin-top: 8px; }

#cancel-occurrence.is-danger { background: #B3261E; color: #fff; border-color: #B3261E; }
.series-warning { margin: 8px 0 0; padding: 8px 10px; border-radius: 8px; background: #FDECEA; color: #7A1C14; font-size: .9rem; line-height: 1.4; }
.undo-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 2000; display: flex; align-items: center; gap: 14px;
  max-width: calc(100vw - 32px); padding: 12px 16px; border-radius: 10px; background: #2B2930; color: #fff; box-shadow: 0 6px 24px rgba(0,0,0,.25); font-size: .95rem; }
.undo-toast .undo-btn { background: none; border: 0; color: #FFB77C; font-weight: 700; cursor: pointer; font-size: .95rem; padding: 4px 6px; }
.undo-toast .undo-link { color: #fff; opacity: .8; text-decoration: underline; font-size: .88rem; }
.pick-chip input[type=checkbox]:checked + span { background: var(--brand); border-color: var(--brand); color: var(--ink-on-brand); font-weight: 700; }
.pick-chip input[type=checkbox]:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.series-choice .series-sub { font-weight: 400; color: var(--ink-soft); }
.series-people { margin: 2px 0 0 24px; }
.series-people[hidden] { display: none !important; }
#edit-occurrence.is-armed { outline: 2px solid var(--brand-text); }
.series-warning.is-info { background: var(--bg); color: var(--ink); }
.rdv-invite-scope { margin: 8px 0; padding: 8px 10px; border-radius: 8px; background: var(--bg); font-size: .92rem; }
.rdv-invite-scope[hidden] { display: none !important; }
.rdv-invite-scope p { margin: 0 0 4px; font-weight: 600; color: var(--ink); }
.rdv-invite-scope .rdv-invite-hint { font-weight: 400; color: var(--ink-soft); margin: 4px 0 0; }
.rdv-invite-scope label { display: flex; align-items: center; gap: 8px; color: var(--ink); margin: 2px 0; cursor: pointer; font-size: .92rem; }
.rdv-invite-scope [type=radio] { position: static; opacity: 1; pointer-events: auto; width: 16px; height: 16px; margin: 0; accent-color: var(--brand-text); }
.rdv-steps[hidden], .rdv-results[hidden] { display: none !important; }   /* après l'enregistrement : seul le récapitulatif reste */
.rdv-copy-note { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 14px; padding: 12px 14px; border-radius: 10px; background: var(--brand-soft, #FDEBDD); color: var(--ink); line-height: 1.45; }
.rdv-copy-note .material-icons { color: var(--brand-text); }
/* rôles ajoutés le 2026-11-25 */
.dr-pill.is-medecin { color: #1f5fbf; background: #e1ecfb; }
.dr-pill.is-psychologue { color: #7b3fb5; background: #efe4f9; }
.dr-pill.is-social { color: #a0570c; background: #fbebd9; }
.dr-pill.is-stagiaire { color: #4d6b16; background: #ebf3da; }
.dr-roles { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.dr-matrix th[scope=col] { font-size: .78rem; }
.dr-page { max-width: 1200px; }
.dr-card { overflow-x: auto; }
.dr-matrix td { width: 90px; }
.dr-matrix tbody th { min-width: 240px; }
@media (max-width: 700px) { .dr-matrix tbody th { min-width: 170px; } .dr-matrix td { width: 52px; } }
.dr-pill.is-infirmier { color: #0f7c86; background: #dcf2f4; }
.dr-pill.is-professionnel { color: #8a6d00; background: #fbf1cc; }

/* ---------- Planning des membres : fiche d'un rendez-vous, filtre par rôle, créneau vide ---------- */
.rdv-dialog .ui-dialog-titlebar-close { width: 32px; height: 32px; margin-top: -16px; }
.rdv-card-title { font-size: 1.15rem; font-weight: 700; margin: 0 0 10px; line-height: 1.3; }
.rdv-card-rows { margin: 0 0 12px; display: grid; gap: 8px; }
.rdv-card-row { display: grid; grid-template-columns: 120px 1fr; gap: 8px; align-items: start; }
.rdv-card-row[hidden] { display: none; }
.rdv-card-row dt { display: flex; align-items: center; gap: 6px; color: var(--muted, #6b6a75); font-size: .9rem; }
.rdv-card-row dt .material-icons { font-size: 18px; }
.rdv-card-row dd { margin: 0; font-weight: 600; }
.rdv-card-open { display: inline-block; margin-left: 6px; font-weight: 600; font-size: .85rem; padding: 2px 10px; border-radius: 999px;
  background: var(--brand-soft); color: var(--ink); }
.rdv-card-remark span { display: block; font-size: .9rem; color: var(--muted, #6b6a75); margin-bottom: 4px; }
.rdv-card-remark textarea { min-height: 70px; border: 1px solid var(--line, #ddd); border-radius: 8px; padding: 8px; font: inherit; resize: vertical; }
@media (max-width: 480px) { .rdv-card-row { grid-template-columns: 1fr; gap: 2px; } }

.role-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.role-chip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line, #ddd); background: var(--surface, #fff);
  color: var(--ink); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: .88rem; cursor: pointer; }
.role-chip .material-icons { font-size: 17px; }
.role-chip:hover { border-color: var(--brand); }
.role-chip.is-on { background: var(--brand); border-color: var(--brand); color: var(--ink-on-brand); font-weight: 600; }

.slot-pop { position: fixed; z-index: 1004; background: var(--surface, #fff); border-radius: 12px; box-shadow: 0 8px 28px rgba(0,0,0,.2);
  padding: 12px 14px; max-width: min(360px, calc(100vw - 16px)); }
.slot-pop[hidden] { display: none; }
.slot-pop-text { margin: 0 0 10px; font-weight: 600; }
.slot-pop-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.slot-pop-actions .btn { height: 36px; line-height: 36px; padding: 0 14px; }
.slot-close { margin-left: auto; border: 0; background: none; cursor: pointer; color: var(--muted, #6b6a75); padding: 4px; }
/* semaine plus lisible : séparation nette des jours, aujourd'hui surligné, ligne de l'heure actuelle */
#calendar .fc-time-area .fc-slats td.is-daystart, #calendar .fc-head .fc-time-area th.is-daystart { border-left: 2px solid #b9b6c3; }
#calendar .fc-slats td.is-today { background: rgba(240, 145, 70, .08); }
#calendar .fc-head th.is-today { background: var(--brand-soft); }
#calendar .fc-now-indicator-line { border-left: 2px solid #d93025; z-index: 4; }
#calendar .fc-now-indicator-arrow { border-top-color: #d93025; }
#calendar .fc-timeline-event { border-radius: 4px; }
#calendar .fc-timeline-event .fc-title { font-weight: 600; }
.rdv-card-title, .slot-pop-text { color: var(--ink); }
.rdv-dialog .ui-dialog-titlebar-close { border: 0; background: none; }
.rdv-dialog .ui-dialog-titlebar-close .ui-icon { display: none; }
.rdv-dialog .ui-dialog-titlebar-close::after { content: '\2715'; font-size: 18px; color: var(--ink); }
.fc-timelineWeek-view .fc-head .fc-time-area tr:last-child .fc-cell-text { font-size: .72rem; padding: 0 2px; }
/* « Liste du jour » du planning des membres */
/* le calendrier reste dessiné (invisible, hauteur 0) derrière la liste : sinon il revient écrasé */
#calendar.as-list .fc-view-container { height: 0; overflow: hidden; visibility: hidden; }
.day-list { margin-top: 8px; }
.day-list[hidden] { display: none; }
.day-list-title { font-size: 1.15rem; margin: 4px 0 12px; }
.day-list-empty { color: var(--muted, #6b6a75); }
.day-list-member { margin-bottom: 14px; }
.day-list-member h4 { font-size: .95rem; font-weight: 700; margin: 0 0 6px; }
.day-list-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left; cursor: pointer;
  background: var(--surface, #fff); border: 1px solid var(--line, #ddd); border-left: 5px solid var(--brand); border-radius: 8px;
  padding: 8px 10px; margin-bottom: 6px; font: inherit; color: var(--ink); }
.day-list-item:hover { border-color: var(--brand); }
.dl-time { font-size: .85rem; color: var(--muted, #6b6a75); font-weight: 600; }
.dl-title { font-weight: 600; }
.move-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.ui-dialog input[type=button].btn-light { background: var(--surface, #fff); color: var(--ink); border: 1px solid var(--line, #ddd); }
#move-ok.is-danger { background: #c62828; color: #fff; }
#move-warning ul { margin: 6px 0 0 18px; list-style: disc; }
#move-warning li { list-style: disc; }
.rdv-dialog .ui-dialog-content, .rdv-dialog .ui-dialog-content p { color: var(--ink); }
.rdv-dialog .ui-dialog-titlebar-close { position: absolute; right: 8px; top: 50%; padding: 0; cursor: pointer; overflow: hidden; }
.rdv-dialog .ui-dialog-titlebar-close::after { position: absolute; inset: 0; text-indent: 0; display: flex; align-items: center; justify-content: center; }
.dr-profession { margin: 10px 0 4px; display: grid; gap: 4px; max-width: 420px; }
.dr-profession[hidden] { display: none; }
.dr-profession small { color: var(--muted, #6b6a75); font-weight: 400; }
.dr-profession select { height: 40px; border: 1px solid var(--line, #ddd); border-radius: 8px; padding: 0 8px; }
.dr-own { display: flex; gap: 6px; align-items: flex-start; background: var(--brand-soft); border-radius: 8px; padding: 8px 10px; }
.dr-own .material-icons { font-size: 18px; }
/* Planning d'un membre */
.mp-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 10px; }
.mp-switch { display: flex; align-items: center; gap: 4px; }
.mp-switch select { height: 38px; border: 1px solid var(--line, #ddd); border-radius: 999px; padding: 0 12px; max-width: 260px; background: var(--surface, #fff); }
.mp-arrow { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line, #ddd); color: var(--ink); background: var(--surface, #fff); }
.mp-arrow:hover { border-color: var(--brand); }
.mp-presence { margin-left: auto; }
.mp-summary { background: var(--surface, #fff); border-radius: 10px; padding: 8px 12px; margin: 0 0 10px; box-shadow: var(--shadow); font-size: .92rem; }
.mp-summary:empty { display: none; }
#calendar .fc-agenda-view .fc-bgevent { opacity: .35; }
#calendar .fc-now-indicator-line { border-color: #d93025; }
#calendar .fc-now-indicator-arrow { border-color: #d93025; border-top-color: transparent; border-bottom-color: transparent; }
#calendar .fc-agenda-view .fc-day.fc-today { background: rgba(240, 145, 70, .08); }
@media (max-width: 768px) { .mp-presence { margin-left: 0; } .mp-switch select { max-width: 200px; } }
#calendar .fc-list-view .fc-list-item, #calendar .fc-list-view .fc-list-item td { background: var(--surface, #fff) !important; color: var(--ink) !important; }
#calendar .fc-list-view .fc-list-item:hover td { background: var(--brand-soft) !important; }
/* listes : type d'activité en couleur */
.dl-type { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; color: var(--muted, #6b6a75); font-weight: 600; }
.dl-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
#calendar .fc-list-item-title .dl-type { display: block; margin-top: 2px; }
#calendar .fc-list-view .fc-event-dot { width: 12px; height: 12px; }
.day-list-title.is-sub { font-size: 1rem; margin: 16px 0 8px; padding-top: 10px; border-top: 1px solid var(--line, #ddd); }
/* Gérer les présences (member_planning.html) */
.pr-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.pr-actions [hidden] { display: none !important; }
.pr-overlaps { margin: 0 0 10px; }
.pr-overlaps ul, .pr-confirm-list { margin: 4px 0 0 18px; padding: 0; list-style: disc; }
.pr-overlaps li, .pr-confirm-list li { list-style: disc; }
.pr-confirm-list[hidden] { display: none; }
.pr-form { display: grid; gap: 12px; }
.pr-row { margin: 0; padding: 0; border: 0; }
.pr-row legend { font-weight: 600; font-size: .92rem; color: var(--ink); margin-bottom: 6px; padding: 0; }
.pr-times { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 10px; }
.pr-times label, .pr-repeat label { display: flex; flex-direction: column; gap: 2px; font-size: .9rem; color: var(--ink-soft, #555); }
.pr-form input[type=date], .pr-form input[type=time] { height: 40px; border: 1px solid var(--line, #ddd); border-radius: 8px; padding: 0 8px; margin: 0; box-sizing: border-box; background: var(--surface, #fff); color: var(--ink); font: inherit; }
.pr-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pr-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line, #ddd); border-radius: 999px; cursor: pointer; font-size: .9rem; color: var(--ink); background: var(--surface, #fff); }
.pr-chip:has(input:checked) { border-color: var(--brand); background: rgba(240, 145, 70, .14); font-weight: 600; }
.pr-form [type=radio], .pr-form [type=checkbox] { position: static; opacity: 1; pointer-events: auto; width: 16px; height: 16px; margin: 0; accent-color: var(--brand-text, #b85f1a); }
.pr-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; border: 1px solid rgba(0,0,0,.15); }
.pr-repeat { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.pr-repeat .pr-check { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; cursor: pointer; }
.pr-repeat label[hidden] { display: none; }
.pr-repeat #pr-until-box { flex-direction: row; align-items: center; gap: 6px; }
.pr-hint { color: var(--muted, #6b6a75); font-size: .82rem; }
.pr-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.pr-buttons [hidden] { display: none; }
#calendar .fc-event.pr-overlap { outline: 2px solid #d93025; outline-offset: -2px; }
.pr-repeat-icon { font-size: 13px; vertical-align: -2px; opacity: .85; }
@media (max-width: 480px) { .pr-times { grid-template-columns: 1fr 1fr; } .pr-times label:first-child { grid-column: 1 / -1; } .pr-actions { margin-left: 0; } }


/* Listes à plusieurs choix en pastilles (formulaires « modernes ») */
.ch-box { display: flex; flex-direction: column; gap: 6px; }
.ch-filter { max-width: 320px; }
.ch-list { display: flex; flex-wrap: wrap; gap: 6px; max-height: 220px; overflow-y: auto; padding: 2px; }
.ch-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  cursor: pointer; font-size: .9rem; color: var(--ink); user-select: none; line-height: 1.4; }
.ch-chip[hidden] { display: none; }
.ch-chip input[type=checkbox] { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.ch-chip:hover { border-color: var(--brand); }
.ch-chip:has(input:checked) { background: var(--brand-soft); border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); font-weight: 700; }
.ch-chip:has(input:checked)::before { content: '✓'; color: var(--brand-text); font-weight: 700; }
.ch-chip:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.ch-avatar { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin-left: -8px; border-radius: 50%;
  background: var(--bg); color: var(--ink-soft); font-size: .7rem; font-weight: 700; }
.ch-chip:has(input:checked) .ch-avatar { background: var(--brand); color: var(--ink-on-brand); }
.ms-field.sp-multi, .ms-field.sp-textarea { grid-column: 1 / -1; }
/* Modifier une action (suivi) */
.ae-label { display: block; font-size: .85rem; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.ae-form .ms-bar { padding-bottom: 0; margin-top: 6px; }
@media (max-width: 600px) { .ae-form .ms-grid { grid-template-columns: 1fr; } }
.ch-chip [type="checkbox"] + span, .ch-chip [type="checkbox"] + .ch-avatar { padding-left: 0 !important; height: auto; line-height: inherit; }
.ch-chip [type="checkbox"] + span::before, .ch-chip [type="checkbox"] + span::after { display: none !important; content: none !important; }
.ch-chip .ch-avatar { padding-left: 0 !important; height: 24px !important; line-height: 24px !important; }
.ch-chip .ch-avatar { font-size: .68rem !important; margin-left: 0; flex: none; }
.ch-chip:has(.ch-avatar) { padding-left: 4px; }
.ch-chip:has(.ch-avatar):has(input:checked)::before { content: none; }
.ch-chip .ch-avatar { display: inline-flex !important; align-items: center; justify-content: center; width: 24px !important; min-width: 24px; position: static !important; }

/* ---------- Paramètres > Couleurs (page colors.html) ---------- */
.co-saved { display: flex; align-items: center; gap: 8px; padding: 10px 14px; margin: 0 0 14px; border-radius: 10px; background: #E3F7F1; color: var(--teal-text); font-weight: 600; }
.co-card h3 { margin-bottom: 4px; }
.co-palettes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 12px 0 16px; }
.co-palettes-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.co-palette { display: grid; gap: 6px; align-content: start; text-align: left; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.co-palette:hover { border-color: var(--brand); }
.co-palette.is-on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); background: var(--brand-soft); }
.co-palette:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.co-strip { display: flex; height: 14px; border-radius: 6px; overflow: hidden; }
.co-strip span { flex: 1; }
.co-pal-desc { color: var(--ink-soft); font-size: .85rem; line-height: 1.4; }
.co-pal-use { color: var(--brand-text); font-weight: 600; font-size: .85rem; }
.co-list { display: grid; gap: 2px; }
.co-row { display: grid; grid-template-columns: minmax(120px, 1.1fr) auto minmax(140px, 1fr) minmax(0, 1fr); align-items: center; gap: 12px; padding: 6px 8px; border-radius: 8px; }
.co-row:nth-child(odd) { background: var(--bg); }
.co-row-sm { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 4px 6px; }
.co-row-sm .co-ev { display: none; }
.co-name { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.co-tag { display: inline-block; font-size: .72rem; font-weight: 600; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 999px; padding: 0 6px; margin-left: 4px; vertical-align: 1px; }
.co-pick { display: inline-flex; align-items: center; gap: 6px; }
.co-color { width: 42px; height: 34px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; }
.co-pick-sm .co-color { width: 34px; height: 28px; }
input.co-hex { width: 86px; height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-family: monospace; font-size: .9rem; text-transform: uppercase; }
.co-pick-sm input.co-hex { width: 78px; height: 28px; font-size: .82rem; }
.co-row.is-bad input.co-hex { border-color: var(--rose); background: #FDECEF; }
.co-ev { display: inline-block; padding: 5px 10px; border-radius: 6px; font-size: .85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.co-warn { color: var(--rose-text); font-size: .82rem; }
.co-row.is-close .co-warn::before { content: "⚠ "; }
.co-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.co-group { border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.co-group h4 { display: flex; align-items: center; gap: 8px; font-size: .95rem; font-weight: 700; margin: 0 0 6px; }
.co-group .co-row:nth-child(odd) { background: transparent; }
.co-group .co-row:nth-child(even) { background: var(--bg); }
.co-preview { margin-top: 14px; }
.co-preview summary { cursor: pointer; font-weight: 600; color: var(--brand-text); padding: 4px 0; }
.co-cal-scroll { overflow-x: auto; margin-top: 8px; }
.co-cal { display: grid; grid-template-columns: 48px repeat(5, minmax(110px, 1fr)); grid-template-rows: auto repeat(5, 44px); min-width: 600px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); font-size: .78rem; }
.co-hd { padding: 6px; font-weight: 700; text-align: center; background: var(--bg); border-bottom: 1px solid var(--line); }
.co-hr { padding: 4px 6px; color: var(--ink-soft); border-top: 1px solid var(--line); }
.co-col { position: relative; grid-row: 2 / span 5; border-left: 1px solid var(--line); }
.co-cal-ev { position: absolute; left: 3px; right: 3px; padding: 3px 6px; border-radius: 6px; font-weight: 600; line-height: 1.25; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.co-bar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; padding: 10px 14px; margin-top: 6px; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 12px rgba(60,58,71,.08); border-radius: 10px 10px 0 0; }
.co-count { margin-right: auto; color: var(--ink-soft); font-size: .9rem; }
.co-count.is-on { color: var(--brand-text); font-weight: 600; }
.co-count.is-bad { color: var(--rose-text); font-weight: 600; }
.co-count.is-saved { color: #017A61; font-weight: 700; }
@media (max-width: 760px) {
  .co-palettes, .co-palettes-2 { grid-template-columns: 1fr; }
  .co-row { grid-template-columns: minmax(0, 1fr) auto; }
  .co-row .co-ev { grid-column: 1 / -1; justify-self: start; }
  .co-row .co-warn { grid-column: 1 / -1; }
  .co-groups { grid-template-columns: 1fr; }
}

/* fiche : couleur personnalisée avec son code */
.sp-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sp-custom { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 10px; border: 1px dashed var(--line); border-radius: 10px; }
.sp-custom-label { font-size: .85rem; font-weight: 600; color: var(--ink-soft); }
input.sp-hex, .sp-custom input.sp-hex { width: 96px !important; flex: none; margin: 0 !important; box-sizing: border-box; height: 36px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-family: monospace; text-transform: uppercase; }
input.sp-hex.is-bad { border-color: var(--rose); background: #FDECEF; }
.sp-color-preview { display: inline-block; padding: 6px 12px; border-radius: 6px; font-size: .85rem; font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.sp-colors { gap: 10px 12px; }

.co-group h4 .co-base { width: 34px; height: 28px; flex: none; }

/* Mon compte > Mes couleurs */
.mc-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.mc-card { display: grid; gap: 8px; align-content: start; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; color: var(--ink); }
.mc-card.is-on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); background: var(--brand-soft); }
.mc-head { display: flex; align-items: center; gap: 8px; font-size: 1rem; }
.mc-head input[type=radio] { position: static !important; opacity: 1 !important; pointer-events: auto !important; width: 18px; height: 18px; margin: 0; }
.mc-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); margin-top: 4px; }
.mc-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.mc-chip { font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
@media (max-width: 900px) { .mc-cards { grid-template-columns: 1fr; } }

.mc-option { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; cursor: pointer; }
.mc-option input[type=checkbox] { position: static !important; opacity: 1 !important; pointer-events: auto !important; width: 18px; height: 18px; margin: 3px 0 0; }
.mc-option .ms-hint { display: block; margin: 2px 0 0; }
/* la case reste la case du navigateur : on retire le second carré dessiné par Materialize */
.mc-option input[type=checkbox] + span.mc-text { padding-left: 0 !important; height: auto !important; line-height: 1.4 !important; display: block; }
.mc-option input[type=checkbox] + span.mc-text:before, .mc-option input[type=checkbox] + span.mc-text:after { display: none !important; content: none !important; }
.mc-option input[type=checkbox] { accent-color: var(--brand-text); flex: none; }
.mc-demo { display: flex; flex-direction: column; gap: 5px; margin-top: 6px; }
.mc-demo-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.mc-demo-label { width: 42px; font-size: .75rem; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .03em; }
.mc-demo-label + .mc-chip { margin-left: 0; }
.mc-demo .mc-chip { display: inline-block; font-size: .78rem; font-weight: 600; padding: 2px 8px; border-radius: 4px; }
.mc-demo .mc-chip.is-line { box-shadow: inset 0 0 0 2px rgba(20, 18, 28, .75); }
.fc-event.is-contrast { border: 2px solid rgba(20, 18, 28, .75) !important; }

/* Couleurs : tirage au hasard + choix Vives / Pastel */
.co-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 4px 0 14px; }
.co-tools .ms-hint { margin: 0; flex: 1 1 220px; }
.co-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; vertical-align: middle; }
.co-seg button { border: 0; background: transparent; padding: 5px 14px; font: inherit; font-size: .88rem; cursor: pointer; color: var(--ink-soft); }
.co-seg button + button { border-left: 1px solid var(--line); }
.co-seg button.is-on { background: var(--ink, #2B2933); color: #fff; font-weight: 600; }
.co-seg button:focus-visible { outline: 2px solid #0072CE; outline-offset: -2px; }
.btn-flat.co-random { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; height: 34px; line-height: 32px; padding: 0 14px; text-transform: none; }
.btn-flat.co-random i { font-size: 18px; }
.sp-colors .co-seg { margin-bottom: 6px; }
.sp-colors .sp-swatches[hidden] { display: none !important; }

/* Couleurs de l'équipe : carte « Personnaliser » et zone de réglages repliée */
.co-strip-custom { background: repeating-linear-gradient(90deg, #EE964B 0 12%, #02C39A 12% 24%, #EA2C59 24% 36%, #0072CE 36% 48%, #F6C89F 48% 60%, #9FE3CF 60% 72%, #F5A9BB 72% 84%, #A7C8EC 84% 100%); opacity: .35; display: flex; align-items: center; justify-content: center; }
.co-strip-custom i { font-size: 14px; color: #2B2933; opacity: 1; }
.co-custom[hidden] { display: none !important; }
.co-custom { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 12px; }
.co-saved.co-saved-error { background: #FDECEF; color: #A3123A; border-color: #F3B6C4; }
.co-seg[hidden] { display: none !important; }

/* Rendez-vous répété : « Jusqu'à quand ? » (une date / sans date de fin) */
#rpt-end-label { display: block; margin-top: 10px; }
.rpt-freq-box .pick-chip .material-icons.tiny { font-size: 1rem; vertical-align: -3px; }

/* Menu : libellé long sur deux lignes (ex. « Rapports prédéfinis et personnalisés ») */
.sidenav .nav-text.nav-two { white-space: normal; line-height: 1.2; }
.sidenav li > a:has(.nav-two) { height: auto; min-height: 48px; line-height: 1.2; padding-top: 6px; padding-bottom: 6px; }

/* Listes à plusieurs choix rangées en catégories (Administration > Listes des dossiers) */
.ch-group { flex-basis: 100%; font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--teal-text); margin: 6px 0 0; }

/* bouton « Corbeille » discret en haut à droite (planning, présences) */
.page-head .pl-head-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; flex: 0 0 auto; margin-left: auto; }
.page-head .pl-head-actions .btn-flat { flex: none; width: auto; background: transparent; color: var(--brand-ink, #9A4708);
    border: 1px solid var(--line, #E7E3EC); box-shadow: none; border-radius: 999px; padding: 0 14px; }
.page-head .pl-head-actions .btn-flat:hover { background: rgba(238, 150, 75, .12); }
html.a11y-sombre .page-head .pl-head-actions .btn-flat { color: #F2B27A; }
.member-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }

/* Paramètres > Types d'évènements : rubriques à ranger */
.tr-board { display: flex; flex-direction: column; gap: 12px; }
.tr-group.sp-card { padding: 12px 16px; margin: 0; }
.tr-board .tr-group { text-align: left; display: block; }
.tr-board .tr-head { display: flex; align-items: center; justify-content: flex-start; gap: 8px; flex-wrap: wrap; width: 100%; }
.tr-icon { color: var(--ink-soft, #6B6875); font-size: 20px; }
.tr-name { font-size: 1rem; font-weight: 700; margin: 0; color: var(--ink); }
.tr-count { color: var(--ink-soft, #6B6875); font-size: .85rem; }
.tr-tools { margin-left: auto; display: flex; gap: 2px; }
.tr-btn { border: 0; background: transparent; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; color: var(--ink-soft, #6B6875); display: inline-flex; align-items: center; justify-content: center; }
.tr-btn:hover:not(:disabled) { background: var(--brand-soft, #FDEBDD); color: var(--ink); }
.tr-btn:disabled { opacity: .3; cursor: default; }
.tr-btn[hidden] { display: none; }
.tr-btn.is-armed { background: #B3173E; color: #fff; }
.tr-input { font: inherit; font-weight: 700; padding: 4px 8px; border: 1px solid var(--brand, #EE964B); border-radius: 8px; min-width: 240px; }
.tr-board .tr-items { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 8px; min-height: 40px; margin: 10px 0 0; padding: 6px; border-radius: 10px; list-style: none; }
.is-dragging .tr-items { background: var(--brand-soft, #FDEBDD); outline: 1px dashed var(--brand, #EE964B); }
.tr-board .tr-item { flex: 0 0 auto; width: auto; justify-content: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 4px; border: 1px solid var(--line, #E7E3EC); border-radius: 999px; background: var(--surface, #fff); cursor: grab; list-style: none; }
.tr-item.ui-sortable-helper { box-shadow: 0 6px 16px rgba(0,0,0,.18); cursor: grabbing; }
.tr-grip { font-size: 18px; color: var(--ink-soft, #6B6875); }
.tr-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.tr-label { color: var(--ink); text-decoration: none; }
.tr-label:hover { text-decoration: underline; }
.tr-move { width: auto; max-width: 150px; height: 30px; padding: 0 4px; border: 0; background: transparent; color: var(--ink-soft, #6B6875); font-size: .8rem; cursor: pointer; }
.tr-placeholder { width: 120px; height: 34px; border: 2px dashed var(--brand, #EE964B); border-radius: 999px; list-style: none; }
.tr-empty { display: none; margin: 0; color: var(--ink-soft, #6B6875); font-size: .85rem; }
.tr-group.is-empty .tr-empty { display: block; margin-top: -34px; padding: 0 12px; pointer-events: none; min-height: 28px; }
.tr-group.is-loose { border: 1px dashed var(--brand, #EE964B); }
.tr-add { align-self: flex-start; }
.tr-status { margin: 0; min-height: 1.4em; color: var(--ink-soft, #6B6875); font-size: .9rem; }
.tr-status.is-error { color: #B3173E; }

/* Annuaire : numéros d'urgence modifiables, chargement progressif */
.ur-card.sp-card { padding: 14px 16px; }
.ur-head, .ur-row { display: grid; grid-template-columns: 1fr 1.2fr 1.6fr 1fr auto; gap: 8px; align-items: center; }
.ur-head { font-weight: 700; font-size: .85rem; color: var(--ink-soft, #6B6875); padding: 0 0 6px; }
.ur-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ur-row input { padding: 8px 10px; border: 1px solid var(--line, #E7E3EC); border-radius: 8px; font: inherit; width: 100%; background: var(--surface, #fff); color: var(--ink); }
.ur-tools { display: flex; }
.ur-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: space-between; margin-top: 14px; }
@media (max-width: 700px) { .ur-head { display: none; } .ur-row { grid-template-columns: 1fr; padding: 8px 0; border-bottom: 1px solid var(--line, #E7E3EC); } }
.dir-saved.is-error { color: #B3173E; }
.dir-loading { display: flex; align-items: center; gap: 10px; padding: 24px 4px; color: var(--ink-soft, #6B6875); }
.dir-loading .dir-spin { width: 22px; height: 22px; border: 3px solid var(--line, #E7E3EC); border-top-color: var(--brand, #EE964B); border-radius: 50%; animation: dir-spin .8s linear infinite; }
@keyframes dir-spin { to { transform: rotate(360deg); } }
.dir-more { margin: 10px 0 0; }
.dir-group-edit { margin-left: auto; font-size: .85rem; font-weight: 600; }
.dir-group-title { display: flex; align-items: center; gap: 8px; }

.dir-subgroup { font-size: .95rem; font-weight: 700; color: var(--ink-soft, #6B6875); margin: 14px 0 6px; text-transform: none; }
.ur-help { margin: 10px 0 0; font-size: .9rem; }
html.a11y-sombre .hm-calloff { background: #3A1F27; border-color: #6B2D3D; }
html.a11y-sombre .hm-calloff li a { color: inherit; }

/* ---------- Jours fériés et fermetures ---------- */
.jf-card { margin-bottom: 14px; }
.jf-card h3 { display: flex; align-items: center; gap: 8px; font-size: 1.1rem; font-weight: 700; margin: 0 0 4px; }
.jf-card h3 i { color: var(--brand-text); }
.jf-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.jf-years { display: flex; gap: 6px; }
.jf-list { margin: 8px 0 0; }
.jf-list li { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); }
.jf-list li:last-child { border-bottom: 0; }
.jf-date { font-weight: 600; }
.jf-date small { color: var(--ink-soft); font-weight: 400; }
.jf-name { color: var(--ink-soft); }
.jf-toggle { min-width: 100px; justify-content: center; }
.jf-toggle.is-off { text-decoration: none; }
.jf-closures { margin: 8px 0 10px; padding: 0; list-style: none; }
.jf-row { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 0; }
.jf-row label { display: flex; align-items: center; gap: 6px; color: var(--ink-soft); font-size: .9rem; }
.jf-row input { height: 38px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; background: var(--surface); color: var(--ink); font: inherit; }
.jf-row.is-past { opacity: .6; }
@media (max-width: 700px) { .jf-row { grid-template-columns: 1fr 1fr; } .jf-row input[name=libelle] { grid-column: 1 / -1; } .jf-list li { grid-template-columns: 1fr auto; } .jf-name { grid-column: 1; } }
/* plannings : jour férié ou fermeture, grisé avec son nom */
.fc-bgevent.fc-dayoff { background: repeating-linear-gradient(135deg, rgba(120,116,130,.16) 0 6px, rgba(120,116,130,.08) 6px 12px) !important; opacity: 1 !important; }
.fc-dayoff .dayoff-label { position: absolute; top: 50%; left: 4px; right: 4px; transform: translateY(-50%); text-align: center; font-size: 1.35rem; font-weight: 800; line-height: 1.2; color: rgba(94,90,104,.8); overflow-wrap: anywhere; pointer-events: none; }
html.a11y-sombre .fc-dayoff .dayoff-label { color: rgba(207,203,216,.85); }
/* semaine, jour, planning de l'équipe : le nom est dans l'en-tête du jour */
.fc-agenda-view .dayoff-label { display: none; }
/* planning de l'équipe : le nom du jour férié écrit à la verticale, en haut de la colonne grisée */
.fc-timeline .fc-dayoff .dayoff-label { top: 10px; bottom: auto; left: 50%; right: auto; transform: translateX(-50%) rotate(180deg); writing-mode: vertical-rl;
  font-size: 1.05rem; white-space: nowrap; max-height: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis; text-align: right; }
/* accueil : jours fériés et fermetures à venir */
.hm-daysoff { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; background: var(--surface); border: 1px solid var(--line); border-left: 6px solid #8E8A99;
  border-radius: var(--radius); padding: 10px 14px; margin-bottom: 14px; font-size: .92rem; }
.hm-daysoff > i { color: #6B6876; }
.hm-daysoff b { font-weight: 700; }
.hm-daysoff span + span::before { content: "·"; margin-right: 10px; color: var(--ink-soft); }
.fc-head .is-dayoff { background: rgba(120,116,130,.14); }
.fc-head .hd-off { display: block; font-size: 1.05rem; font-weight: 800; line-height: 1.25; text-transform: none; letter-spacing: 0; color: #5E5A68; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.a11y-sombre .fc-head .hd-off { color: #CFCBD8; }
.fc-bg .fc-day.is-dayoff { background: repeating-linear-gradient(135deg, rgba(120,116,130,.16) 0 6px, rgba(120,116,130,.08) 6px 12px); }
.fc-day-top .hd-off { float: left; padding: 2px 6px; max-width: calc(100% - 24px); font-size: 1.05rem; font-weight: 800; color: #5E5A68; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.a11y-sombre .fc-day-top .hd-off { color: #CFCBD8; }

/* ---------- Espace utilisé par les documents (Super Admin) ---------- */
.es-secret { display: flex; gap: 10px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--brand); border-radius: var(--radius); padding: 10px 14px; margin: 0 0 14px; }
.es-secret i { color: var(--brand-text); }
.es-total { display: flex; flex-wrap: wrap; gap: 28px; margin-bottom: 14px; }
.es-total b { display: block; font-size: 1.6rem; font-weight: 800; }
.es-total span { color: var(--ink-soft); }
.es-list { margin: 0; }
.es-person { border-bottom: 1px solid var(--line); }
.es-person:last-child { border-bottom: 0; }
.es-person summary { display: grid; grid-template-columns: minmax(140px, 1.2fr) minmax(80px, 2fr) auto; grid-template-areas: "name bar size" "count count warn"; gap: 4px 14px; align-items: center; padding: 10px 4px; cursor: pointer; list-style: none; }
.es-person summary::-webkit-details-marker { display: none; }
.es-person summary:focus-visible { outline: 3px solid var(--brand); border-radius: 8px; }
.es-name { grid-area: name; font-weight: 700; }
.es-name small { color: var(--ink-soft); font-weight: 400; }
.es-bar { grid-area: bar; height: 10px; border-radius: 6px; background: var(--line); overflow: hidden; }
.es-bar span { display: block; height: 100%; background: #8E8A99; border-radius: 6px; }
.es-person.is-heavy .es-bar span { background: var(--brand); }
.es-size { grid-area: size; font-weight: 700; text-align: right; }
.es-count { grid-area: count; color: var(--ink-soft); font-size: .88rem; }
.es-warn { grid-area: warn; display: inline-flex; align-items: center; gap: 4px; color: var(--brand-text); font-weight: 700; font-size: .88rem; justify-self: end; }
.es-warn i { font-size: 18px; }
.es-docs { width: 100%; margin: 0 0 12px; font-size: .9rem; }
.es-docs th { text-align: left; color: var(--ink-soft); font-weight: 600; padding: 4px 6px; }
.es-docs td { padding: 4px 6px; border-top: 1px solid var(--line); word-break: break-word; }
.es-docs tr.is-deleted td { color: var(--ink-soft); }
@media (max-width: 700px) { .es-docs thead { display: none; } .es-docs tr { display: grid; grid-template-columns: 1fr auto; padding: 6px 0; border-top: 1px solid var(--line); } .es-docs td { border: 0; padding: 1px 6px; } .es-docs td:first-child { grid-column: 1 / -1; font-weight: 600; } }
/* Droits par rôle : ce qui ne se règle pas */
.dr-fixed { margin-top: 14px; }
.dr-fixed h3 { font-size: 1.05rem; font-weight: 700; margin: 0 0 8px; }
.dr-fixed-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 20px; }
.dr-fixed-grid b { display: flex; align-items: center; gap: 6px; font-weight: 700; margin-bottom: 4px; }
.dr-fixed-grid b i { font-size: 20px; color: var(--brand-text); }
.dr-fixed-grid ul { margin: 0; padding-left: 18px; }
.dr-fixed-grid li { list-style: disc; color: var(--ink-soft); font-size: .92rem; margin: 2px 0; }
/* accueil : mes évènements prévus un jour férié ou de fermeture (à reprogrammer) */
.hm-tomove { background: #FFF4E5; border-color: #F6CB94; border-left-color: var(--brand); }
.hm-tomove > i, .hm-tomove h3 { color: var(--brand-text); }
.hm-tomove-help { margin: 0 0 4px; color: var(--ink-soft); font-size: .88rem; }
html.a11y-sombre .hm-tomove { background: #3A2A17; border-color: #6B4A22; }

/* Double authentification (connexion en deux temps, page du Super Admin) */
.sec-card .sec-lead { color: var(--ink-soft); font-size: .92rem; margin: 6px 0 12px; }
.sec-msg { border-radius: 10px; padding: 8px 12px; margin: 8px 0; font-size: .9rem; background: var(--surface); border-left: 4px solid var(--brand); }
.sec-msg-error, .sec-msg-warning { border-left-color: #c62828; background: rgba(198, 40, 40, .07); }
.sec-msg-success { border-left-color: #2e7d32; background: rgba(46, 125, 50, .08); }
.sec-code { font-size: 1.6rem !important; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; }
.sec-trust { display: block; margin: 10px 0 4px; cursor: pointer; }
.sec-trust > span { height: auto !important; line-height: 1.4 !important; font-size: .85rem !important; color: var(--ink-soft); display: block; }
.sec-enroll { max-width: 520px; }
.sec-steps { padding-left: 20px; margin: 8px 0 12px; font-size: .92rem; }
.sec-steps li { margin-bottom: 10px; }
.sec-qr { width: 210px; max-width: 100%; margin: 10px auto; background: #fff; padding: 4px; border-radius: 8px; }
.sec-qr svg { display: block; width: 100%; height: auto; }
.sec-manual summary { cursor: pointer; color: var(--brand); font-size: .88rem; }
.sec-secret { font-family: ui-monospace, Consolas, monospace; font-size: 1.05rem; letter-spacing: .08em; word-break: break-all; background: var(--surface); padding: 8px 10px; border-radius: 8px; user-select: all; }
.sec-page .sec-h { font-size: 1.1rem; font-weight: 700; margin: 0 0 10px; }
.sec-page .sec-h small { color: var(--ink-soft); font-weight: 600; margin-left: 6px; }
.sec-modes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.sec-help { color: var(--ink-soft); font-size: .88rem; margin: 6px 0; }
.sec-table { width: 100%; border-collapse: collapse; }
.sec-table th { text-align: left; color: var(--ink-soft); font-weight: 600; padding: 6px; }
.sec-table td { padding: 6px; border-top: 1px solid var(--line); }
.sec-on { color: #2e7d32; display: inline-flex; align-items: center; gap: 4px; }
.sec-on .material-icons { font-size: 18px; }
.sec-off { color: var(--ink-soft); }
.sec-off { font-size: .85rem; }
/* connexion Microsoft */
.sec-ms-btn { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 46px; margin: 6px 0 4px;
  background: #fff; color: #1b1b1b; border: 1px solid #8c8c8c; border-radius: 6px; font: 600 1rem/1.2 inherit; cursor: pointer; }
.sec-ms-btn:hover { background: #f3f3f3; }
.sec-ms-btn:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
html.a11y-sombre .sec-ms-btn { background: #2b2b2b; color: #fff; border-color: #6b6b6b; }
.sec-ms-address { text-align: center; word-break: break-all; }
.sec-table-wrap { overflow-x: auto; }
.sec-inline { display: inline-flex; align-items: center; gap: 6px; margin: 2px 6px 2px 0; vertical-align: middle; }
.sec-address input[type=email] { height: 34px !important; margin: 0 !important; min-width: 220px; max-width: 100%; font-size: .9rem !important; }
.sec-table td { vertical-align: middle; }
.sec-table .sec-off, .sec-block { display: block; }
.sec-address { margin: 0 0 2px; }
.sec-page .sp-card + .sp-card { margin-top: 14px; }
.sec-table .btn-flat { white-space: nowrap; padding: 0 10px; }
@media (max-width: 640px) {
  .sec-table thead { display: none; }
  .sec-table tr { display: block; border-top: 1px solid var(--line); padding: 6px 0; }
  .sec-table td { display: block; border: 0; padding: 3px 0; }
  .sec-table td:first-child { font-weight: 700; }
  .sec-address input[type=email] { min-width: 0; flex: 1 1 auto; }
  .sec-address { display: flex; width: 100%; }
  .sec-table .btn-flat { padding: 0 6px 0 0; }
}
