/* ====================================================================
   STYLE.CSS - Kiosk Soins Parents
   Version 5.3 - Bandeau 2 lignes + Zone Todo + Layout fixe
   ==================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Public+Sans:wght@400;500;600;700;800;900&display=swap');

:root {
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 88px;
  --footer-h: 60px;
  --tiles-h: 220px;
}

body.theme-dark {
  --bg: #121513;
  --surface: #1B211E;
  --surface-2: #242C28;
  --ink: #F0F4ED;
  --ink-2: #9BA498;
  --border: #2D3731;
  --accent: #0099FF;
  --accent-ink: #FFFFFF;
  --danger: #E05353;
  --success: #22C55E;
  --warning: #F59E0B;

  --statut-planifie: #0E9B3E;
  --statut-preste: #096A09;
  --statut-remplace: #6B7A2A;
  --statut-a-remplacer: #8DA81E;
  --statut-vacant: #DF6D14;
  --statut-annule: #842E1B;
}

body.theme-light {
  --bg: #F5F4EF;
  --surface: #FFFFFF;
  --surface-2: #F0EEE4;
  --ink: #23281F;
  --ink-2: #646B5D;
  --border: #DDD9CD;
  --accent: #234961;
  --accent-ink: #FFFFFF;
  --danger: #B33F3F;
  --success: #16A34A;
  --warning: #B4762A;

  --statut-planifie: #0E9B3E;
  --statut-preste: #096A09;
  --statut-remplace: #6B7A2A;
  --statut-a-remplacer: #8DA81E;
  --statut-vacant: #DF6D14;
  --statut-annule: #842E1B;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--ink);
  min-height: 100vh;
  user-select: none; -webkit-user-select: none;
  touch-action: manipulation;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow: hidden;
}

button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; }

/* --------------------------------------------------------------------
   LOGIN
   -------------------------------------------------------------------- */
.login-overlay {
  position: fixed; inset: 0;
  background: var(--bg); z-index: 5000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.login-overlay.hidden { display: none; }

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  max-width: 400px; width: 100%;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  display: flex; flex-direction: column; gap: 8px;
}
.login-icon { font-size: 40px; text-align: center; margin-bottom: 4px; }
.login-title { font-size: 22px; font-weight: 800; text-align: center; margin: 0; line-height: 1.25; }
.login-sub { font-size: 14px; color: var(--ink-2); text-align: center; margin: 0 0 12px; }
.login-label {
  font-size: 12px; font-weight: 800; color: var(--ink-2);
  text-transform: uppercase; letter-spacing: 0.05em; margin-top: 8px;
}
.login-input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 16px; color: var(--ink);
  width: 100%; outline: none;
  transition: var(--transition);
}
.login-input:focus { border-color: var(--accent); }
.login-btn {
  background: var(--accent); color: var(--accent-ink);
  border: none; border-radius: 10px;
  padding: 14px; font-size: 16px; font-weight: 800;
  margin-top: 14px; transition: var(--transition);
}
.login-btn:hover { filter: brightness(1.1); }
.login-btn:active { transform: scale(0.98); }
.login-erreur {
  font-size: 13px; color: var(--danger);
  min-height: 18px; text-align: center;
  margin-top: 6px; font-weight: 700;
}

/* --------------------------------------------------------------------
   APP CONTAINER (layout fixe : header / main / tiles / footer)
   -------------------------------------------------------------------- */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-width: 100%;
  padding: 0;
  overflow: hidden;
}
.app-container.hidden { display: none; }

/* Bandeau fixe en haut */
.kiosk-header {
  flex-shrink: 0;
  padding: 12px 16px 6px;
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
}

/* Zone centrale scrollable */
.app-main {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0 16px;
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
}
.app-main::-webkit-scrollbar { width: 6px; }
.app-main::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

/* Tuiles fixes en bas (au-dessus du footer) */
.tiles-section {
  flex-shrink: 0;
  padding: 8px 16px;
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
}
.tiles-section.hidden { display: none; }

/* --------------------------------------------------------------------
   BANDEAU GARDE — nouvelle structure 2 lignes
   -------------------------------------------------------------------- */
.garde-banner {
  border-radius: var(--radius-md);
  padding: 14px 18px;
  color: #fff;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  background: var(--statut-vacant);
}
.garde-banner:hover { transform: translateY(-1px); }
.garde-banner:active { transform: scale(0.99); }

.garde-banner.statut-planifie { background: var(--statut-planifie); }
.garde-banner.statut-preste { background: var(--statut-preste); }
.garde-banner.statut-remplace { background: var(--statut-remplace); }
.garde-banner.statut-a-remplacer { background: var(--statut-a-remplacer); }
.garde-banner.statut-vacant { background: var(--statut-vacant); }
.garde-banner.statut-annule { background: var(--statut-annule); }

.garde-row-1 {
  display: flex; align-items: baseline;
  gap: 14px; flex-wrap: wrap;
}
.garde-heure {
  font-size: 24px; font-weight: 800; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.garde-date {
  font-size: 14px; font-weight: 600; opacity: 0.95;
}

.garde-row-2 {
  display: flex; align-items: baseline;
  gap: 20px; margin-top: 10px; flex-wrap: wrap;
}
.garde-plage {
  font-size: 15px; font-weight: 800; white-space: nowrap;
}
.garde-center {
  font-size: 20px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.garde-center strong { font-size: 26px; font-weight: 900; }

/* --------------------------------------------------------------------
   ZONE TODO (À FAIRE AUJOURD'HUI)
   -------------------------------------------------------------------- */
.section-todo { padding-bottom: 8px; }
.section-todo.hidden { display: none; }

.zone-todo-titre {
  font-size: 13px; font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  margin: 10px 0 10px 2px;
}

.todo-container {
  display: flex; flex-direction: column;
  gap: 0;
}

.todo-item {
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 8px;
  display: flex; align-items: center;
  gap: 12px; cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}
.todo-item:hover { transform: translateX(2px); }

.todo-item.rouge-vif    { background: #DC2626; border-color: #991B1B; color: #FDE047; }
.todo-item.rouge-leger  { background: #FCA5A5; border-color: #DC2626; color: #111827; }
.todo-item.orange       { background: #FBBF24; border-color: #F59E0B; color: #451A03; }
.todo-item.vert         { background: #86EFAC; border-color: #16A34A; color: #052E16; }
.todo-item.vert-pale    { background: #BBF7D0; border-color: #22C55E; color: #052E16; }
.todo-item.orange-pale  { background: #FDE68A; border-color: #F59E0B; color: #451A03; }

.todo-heure {
  font-size: 14px; font-weight: 800;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0; min-width: 55px;
}
.todo-heure.sans-heure {
  font-style: italic; opacity: 0.7; font-weight: 600;
}
.todo-content {
  flex: 1; display: flex; flex-direction: column;
  gap: 3px; min-width: 0;
}
.todo-titre {
  font-size: 14px; font-weight: 800; line-height: 1.3;
  display: flex; align-items: center;
  gap: 8px; flex-wrap: wrap;
}
.todo-sub {
  font-size: 12px; font-weight: 600;
  opacity: 0.85; line-height: 1.3;
}

.badge-patient {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px; font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #fff;
}
.badge-patient.papa  { background: #3B5B8C; }
.badge-patient.maman { background: #B5568C; }

.todo-btn {
  background: rgba(0,0,0,0.2);
  color: inherit;
  border: 1px solid currentColor;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 12px; font-weight: 800;
  cursor: pointer; flex-shrink: 0;
}
.todo-btn:hover { background: rgba(0,0,0,0.35); }

.todo-separator {
  display: flex; align-items: center;
  gap: 10px; margin: 22px 0 10px;
  font-size: 11px; font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-2);
}
.todo-separator::before,
.todo-separator::after {
  content: ''; flex: 1; height: 1px;
  background: var(--border);
}

.todo-item-fait {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-bottom: 6px;
  display: flex; align-items: center;
  gap: 10px; opacity: 0.75;
  cursor: pointer;
}
.todo-item-fait:hover { opacity: 1; background: var(--border); }

.todo-check {
  color: var(--success);
  font-size: 16px; font-weight: 900;
  flex-shrink: 0;
}
.todo-fait-heure {
  font-size: 12px; font-weight: 700;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0; min-width: 45px;
}
.todo-fait-nom {
  font-size: 13px; font-weight: 600;
  color: var(--ink-2); flex: 1;
  text-decoration: line-through;
  text-decoration-color: rgba(255,255,255,0.2);
}
.todo-item-fait .badge-patient {
  flex-shrink: 0; margin-left: auto;
}

.todo-vide {
  text-align: center;
  padding: 32px 16px;
  color: var(--ink-2);
  font-size: 14px; font-weight: 600;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
}
.todo-vide .emoji { font-size: 32px; display: block; margin-bottom: 8px; }
.todo-vide.erreur {
  color: var(--danger);
  border-color: var(--danger);
  background: rgba(220, 38, 38, 0.1);
  font-weight: 800;
}

/* --------------------------------------------------------------------
   TUILES MODULES
   -------------------------------------------------------------------- */
.tiles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex; flex-direction: column;
  gap: 10px; text-align: left;
  cursor: pointer; min-height: 95px;
  transition: var(--transition);
  color: var(--ink);
}
.tile:hover { background: var(--surface-2); border-color: var(--accent); }
.tile:active { transform: scale(0.98); }
.tile-head { display: flex; align-items: center; justify-content: space-between; }
.tile-icon { font-size: 24px; }
.tile-counter {
  background: rgba(255,255,255,0.08);
  padding: 3px 9px; border-radius: 99px;
  font-size: 11px; font-weight: 800;
  color: var(--ink-2);
}
body.theme-light .tile-counter { background: rgba(0,0,0,0.06); }
.tile-body { display: flex; flex-direction: column; gap: 2px; margin-top: auto; }
.tile-title { font-size: 15px; font-weight: 800; }
.tile-desc { font-size: 12px; color: var(--ink-2); font-weight: 500; }

/* --------------------------------------------------------------------
   VUES (modules plein écran)
   -------------------------------------------------------------------- */
.view { display: none; animation: fadeIn 0.2s ease-out; padding-bottom: 16px; }
.view.active { display: block; }

/* Cacher la Zone Todo et les tuiles quand on est dans un module */
body.view-module-active .section-todo { display: none; }
body.view-module-active .tiles-section { display: none; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Titre module centré */
.module-header {
  display: flex; align-items: center;
  justify-content: center;
  position: relative;
  padding: 12px 0 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.module-header h2 {
  font-size: 24px; font-weight: 800;
  margin: 0; text-align: center;
}
.module-header .btn-back {
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
}

.btn-back {
  background: var(--success);
  color: #fff; border: none;
  border-radius: 12px;
  width: 48px; height: 48px;
  font-size: 22px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 8px rgba(34, 197, 94, 0.3);
  transition: var(--transition);
}
.btn-back:hover { background: #15803D; transform: translateY(-50%) translateX(-2px); }
.module-header .btn-back:hover { transform: translateY(-50%) translateX(-2px); }

.empty-state {
  text-align: center; color: var(--ink-2);
  padding: 24px; font-size: 14px;
}

/* --------------------------------------------------------------------
   BASCULE JOUR/SEMAINE + BOUTON AUJOURD'HUI
   -------------------------------------------------------------------- */
.presence-nav-row {
  display: flex; align-items: center;
  justify-content: space-between;
  gap: 10px; margin-bottom: 12px;
  flex-wrap: wrap;
}
.vue-bascule {
  display: flex; gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px;
}
.vue-bascule button {
  background: transparent; border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 800; font-size: 13px;
  color: var(--ink-2); cursor: pointer;
  transition: var(--transition);
}
.vue-bascule button.active {
  background: var(--accent); color: var(--accent-ink);
}
.btn-aujourdhui {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  font-size: 13px; font-weight: 800;
  color: var(--ink); cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: var(--transition);
}
.btn-aujourdhui:hover {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

/* --------------------------------------------------------------------
   PRÉSENCE — Navigation jour
   -------------------------------------------------------------------- */
.day-slider {
  display: flex; align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  margin-bottom: 16px;
}
.day-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 14px; font-weight: 800;
  color: var(--ink);
  transition: var(--transition);
}
.day-btn:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.day-label {
  flex: 1; text-align: center;
  font-size: 15px; font-weight: 800;
  text-transform: capitalize;
}

/* --------------------------------------------------------------------
   CRÉNEAUX DE PRÉSENCE
   -------------------------------------------------------------------- */
.creneaux-list { display: flex; flex-direction: column; gap: 12px; }
.creneau {
  display: flex; justify-content: space-between;
  align-items: center; gap: 16px;
  border: 2.5px solid;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  transition: var(--transition);
}
.creneau-left {
  display: flex; flex-direction: column;
  gap: 3px; flex: 1; min-width: 0;
}
.creneau-heure { font-size: 16px; font-weight: 800; color: #fff; white-space: nowrap; }
.creneau-nom { font-size: 15px; font-weight: 700; color: #fff; line-height: 1.3; }
.creneau-remplace { font-size: 12px; font-weight: 600; opacity: 0.85; color: #fff; }
.creneau-right {
  display: flex; flex-direction: column;
  align-items: flex-end; gap: 8px; flex-shrink: 0;
}
.creneau-statut {
  font-size: 11px; font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em; white-space: nowrap;
}
.creneau-actions {
  display: flex; gap: 6px; flex-wrap: wrap;
  justify-content: flex-end;
}
.creneau-actions button {
  border: none; border-radius: 8px;
  padding: 8px 14px; font-size: 12px;
  font-weight: 800; color: #fff;
  white-space: nowrap;
  transition: var(--transition);
}
.btn-reprendre { background: #16A34A; }
.btn-reprendre:hover { background: #22C55E; }
.btn-annuler { background: #B33F3F; }
.btn-annuler:hover { background: #DC2626; }
.btn-confirmer { background: #E5983A; color: #4B1D1D; }
.btn-confirmer:hover { background: #F59E0B; }

.creneau.vacant { background: #4B1D1D; border-color: #DC2626; }
.creneau.vacant .creneau-statut { color: #FCA5A5; }
.creneau.annule { background: #3B0F0F; border-color: #991B1B; }
.creneau.annule .creneau-statut { color: #F87171; }
.creneau.a_remplacer { background: #78350F; border-color: #F59E0B; }
.creneau.a_remplacer .creneau-statut { color: #FDE68A; }
.creneau.planifie { background: #06671E; border-color: #16A34A; }
.creneau.planifie .creneau-statut { color: #86EFAC; }
.creneau.planifie.remplace { background: #064E3B; border-color: #059669; }
.creneau.planifie.remplace .creneau-statut { color: #6EE7B7; }
.creneau.preste { background: #052E16; border-color: #15803D; opacity: 0.9; }
.creneau.preste .creneau-statut { color: #4ADE80; }

/* Vue Semaine Présence */
.presence-semaine-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}
.presence-semaine-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px; min-height: 200px;
}
.presence-semaine-col-titre {
  font-size: 12px; font-weight: 800;
  text-align: center;
  padding-bottom: 6px; margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
  color: var(--ink-2);
}
.presence-semaine-col-titre.aujourdhui { color: var(--accent); }
.presence-semaine-creneau {
  border-radius: 6px; padding: 6px;
  margin-bottom: 4px; font-size: 11px;
  line-height: 1.3; cursor: pointer;
  color: #fff; border: 2px solid transparent;
}
.presence-semaine-creneau .pse-time { font-weight: 800; }
.presence-semaine-creneau .pse-nom { font-weight: 700; }
.presence-semaine-creneau .pse-statut {
  font-size: 9px; text-transform: uppercase;
  font-weight: 800; opacity: 0.9;
}
.presence-semaine-creneau.vacant { background: #4B1D1D; border-color: #DC2626; }
.presence-semaine-creneau.annule { background: #3B0F0F; border-color: #991B1B; }
.presence-semaine-creneau.a_remplacer { background: #78350F; border-color: #F59E0B; }
.presence-semaine-creneau.planifie { background: #06671E; border-color: #16A34A; }
.presence-semaine-creneau.preste { background: #052E16; border-color: #15803D; }

.presence-semaine-liste .jour-bloc { margin-bottom: 16px; }
.presence-semaine-liste .jour-titre {
  font-size: 14px; font-weight: 800;
  padding: 6px 0; margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
  color: var(--ink-2); text-transform: capitalize;
}
.presence-semaine-liste .jour-titre.aujourdhui { color: var(--accent); }

@media (max-width: 700px) {
  .presence-semaine-grid { display: none; }
}
@media (min-width: 701px) {
  .presence-semaine-liste { display: none; }
}

/* --------------------------------------------------------------------
   FOOTER + CARROUSEL BAS
   -------------------------------------------------------------------- */
.kiosk-footer {
  flex-shrink: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 8px 16px;
  display: flex; align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 100;
}
.carrousel-bas {
  flex: 1; min-width: 200px;
  overflow: hidden; white-space: nowrap;
  font-size: 13px; font-weight: 600;
  color: var(--ink-2);
  padding: 4px 0;
}
.carrousel-bas-item {
  display: inline-block;
  animation: defilement 30s linear infinite;
  padding-left: 100%;
}
.carrousel-bas-item.hidden { display: none; }
@keyframes defilement {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

.footer-right { display: flex; align-items: center; gap: 8px; }
.session-pill {
  display: inline-flex; align-items: center;
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 6px 14px;
  font-size: 13px; font-weight: 700;
}
.session-pill.hidden { display: none; }
.session-role {
  font-size: 11px; color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: 0.05em; font-weight: 800;
}
.tool-btn {
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 14px; font-weight: 700;
  transition: var(--transition);
}
.tool-btn:hover { background: var(--border); }
.tool-btn.icon-only {
  width: 40px; height: 40px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px;
}

/* --------------------------------------------------------------------
   MODALES
   -------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; z-index: 1000;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease;
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }

.modal-window {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 440px; width: 100%;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  max-height: 90vh; overflow-y: auto;
}
.modal-title {
  font-size: 20px; font-weight: 800;
  margin: 0 0 6px; text-align: center;
}
.modal-sub {
  font-size: 14px; color: var(--ink-2);
  text-align: center; margin: 0 0 16px;
}
.modal-pin {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  font-size: 24px; font-weight: 800;
  text-align: center;
  letter-spacing: 0.4em;
  color: var(--ink); width: 100%; outline: none;
}
.modal-pin:focus { border-color: var(--accent); }
.modal-erreur {
  font-size: 13px; color: var(--danger);
  min-height: 18px; text-align: center;
  margin-top: 8px; font-weight: 700;
}
.modal-actions-row {
  display: flex; gap: 10px; margin-top: 16px;
}
.btn-cancel, .btn-validate {
  flex: 1; padding: 14px;
  font-size: 15px; font-weight: 800;
  border-radius: 10px; border: none;
  transition: var(--transition);
}
.btn-cancel { background: var(--surface-2); color: var(--ink); }
.btn-cancel:hover { background: var(--border); }
.btn-validate { background: var(--success); color: #fff; }
.btn-validate:hover { filter: brightness(1.1); }
.full-width { width: 100%; margin-top: 14px; }

.motif-choices { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.motif-choice {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 6px 12px;
  font-size: 12px; font-weight: 700;
  color: var(--ink-2); cursor: pointer;
  transition: var(--transition);
}
.motif-choice:hover {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.siblings-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 8px; margin-top: 8px;
}
.sibling-btn {
  padding: 12px; font-size: 13px; font-weight: 700;
  border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--ink);
  transition: var(--transition);
}
.sibling-btn:hover {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.sibling-btn.selected {
  background: var(--success); color: #fff;
  border-color: var(--success);
}

/* --------------------------------------------------------------------
   MODULE TÂCHES
   -------------------------------------------------------------------- */
.taches-bloc { margin-bottom: 20px; }
.bloc-separator {
  display: flex; align-items: center;
  gap: 12px; margin: 20px 0 12px;
  font-size: 12px; font-weight: 800;
  text-transform: uppercase;
  color: var(--warning);
  letter-spacing: 0.05em;
}
.bloc-separator::before,
.bloc-separator::after {
  content: ''; flex: 1; height: 1px;
  background: var(--border);
}
.tache-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 10px;
  display: flex; align-items: center;
  justify-content: space-between;
  gap: 14px;
  transition: var(--transition);
}
.tache-card.faite {
  padding: 8px 14px; opacity: 0.75;
  width: 50%; min-width: 260px; max-width: 100%;
  border-left-color: var(--success);
  background: rgba(34,197,94,0.08);
}
.tache-card.faite .tache-nom {
  font-size: 14px;
  text-decoration: line-through;
  text-decoration-color: rgba(255,255,255,0.3);
}
.tache-card.faite .tache-meta { font-size: 11px; }
.tache-card.retard {
  border-left-color: var(--warning);
  background: rgba(245,158,11,0.08);
}
.tache-info {
  display: flex; flex-direction: column;
  gap: 3px; flex: 1; min-width: 0;
}
.tache-nom { font-size: 15px; font-weight: 800; }
.tache-meta { font-size: 12px; color: var(--ink-2); }
.tache-actions { display: flex; gap: 8px; flex-shrink: 0; }
.btn-sm {
  padding: 8px 14px; font-size: 12px;
  font-weight: 800; border: none;
  border-radius: 8px; cursor: pointer;
  color: #fff; transition: var(--transition);
}
.btn-valider { background: #16A34A; }
.btn-valider:hover { background: #22C55E; }
.btn-cloturer { background: #E5983A; color: #4B1D1D; }
.btn-cloturer:hover { background: #F59E0B; }
.btn-annuler { background: #B33F3F; }
.btn-annuler:hover { background: #DC2626; }

/* --------------------------------------------------------------------
   MODULE RDV
   -------------------------------------------------------------------- */
.rdv-date-nav {
  display: flex; align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  margin-bottom: 16px;
}
.rdv-date-nav button {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 14px; font-weight: 800;
  color: var(--ink);
  cursor: pointer; transition: var(--transition);
}
.rdv-date-nav button:hover { background: var(--accent); color: var(--accent-ink); }
.rdv-date-label {
  flex: 1; text-align: center;
  font-size: 15px; font-weight: 800;
  text-transform: capitalize;
}
.rdv-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: var(--transition);
}
.rdv-card:hover { background: var(--surface-2); transform: translateX(2px); }
.rdv-card.passe { border-left-color: var(--warning); background: rgba(245,158,11,0.08); }
.rdv-card.effectue { border-left-color: var(--success); background: rgba(34,197,94,0.08); }
.rdv-card.manque { border-left-color: var(--danger); background: rgba(220,38,38,0.08); }
.rdv-card.annule { border-left-color: var(--border); opacity: 0.6; }
.rdv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.rdv-titre { font-size: 16px; font-weight: 800; margin: 0; }
.rdv-statut {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.05em; padding: 3px 8px; border-radius: 99px;
  background: rgba(255,255,255,0.08); color: var(--ink-2);
}
.rdv-meta { font-size: 13px; color: var(--ink-2); margin: 4px 0 0; }
.rdv-accompagnant { font-size: 13px; font-weight: 700; margin-top: 6px; }
.rdv-accompagnant.ok { color: var(--success); }
.rdv-accompagnant.recherche {
  color: var(--warning);
  display: flex; align-items: center; gap: 6px;
  background: rgba(245,158,11,0.12);
  padding: 6px 10px; border-radius: 8px;
  margin-top: 8px;
}

/* Semaine RDV */
.rdv-semaine-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.rdv-semaine-col {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 8px; min-height: 200px;
}
.rdv-semaine-col-titre {
  font-size: 12px; font-weight: 800; text-align: center;
  padding-bottom: 6px; margin-bottom: 8px;
  border-bottom: 1px solid var(--border); color: var(--ink-2);
}
.rdv-semaine-col-titre.aujourdhui { color: var(--accent); }
.rdv-semaine-rdv {
  background: var(--surface-2); border-radius: 6px; padding: 6px;
  margin-bottom: 4px; font-size: 11px; line-height: 1.3; cursor: pointer;
}
.rdv-semaine-rdv:hover { background: var(--accent); color: var(--accent-ink); }
.rdv-semaine-time { font-weight: 800; }
.rdv-semaine-liste .rdv-jour-bloc { margin-bottom: 16px; }
.rdv-semaine-liste .rdv-jour-titre {
  font-size: 14px; font-weight: 800; padding: 6px 0;
  margin-bottom: 8px; border-bottom: 1px solid var(--border);
  color: var(--ink-2); text-transform: capitalize;
}
.rdv-semaine-liste .rdv-jour-titre.aujourdhui { color: var(--accent); }

/* Fiche RDV */
.fiche-rdv {
  max-width: 480px; width: 100%;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  max-height: 90vh; overflow-y: auto;
}
.fiche-header {
  display: flex; justify-content: space-between;
  align-items: flex-start; gap: 12px; margin-bottom: 16px;
}
.fiche-type {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--accent);
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 4px 12px; border-radius: 99px;
}
.fiche-close {
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--ink-2); width: 32px; height: 32px; border-radius: 50%;
  cursor: pointer; font-weight: 800;
}
.fiche-titre { font-size: 20px; font-weight: 800; margin: 0 0 4px; }
.fiche-date { font-size: 14px; font-weight: 700; color: var(--accent); margin: 0 0 16px; }
.fiche-ligne {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.fiche-ligne:last-of-type { border-bottom: none; }
.fiche-ligne-label {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  color: var(--ink-2); letter-spacing: 0.04em; min-width: 100px;
}
.fiche-actions {
  display: flex; flex-direction: column; gap: 8px;
  margin-top: 20px; padding-top: 16px;
  border-top: 1px solid var(--border);
}
.fiche-actions button {
  padding: 14px; font-size: 14px; font-weight: 800;
  border-radius: 10px; border: none; color: #fff; cursor: pointer;
}
.fiche-btn-accompagner { background: #234961; }
.fiche-btn-desinscrire { background: #B33F3F; }
.fiche-btn-desinscrire:hover { background: #DC2626; }
.fiche-btn-effectue { background: #16A34A; }
.fiche-btn-manque { background: #B33F3F; }
.fiche-btn-annule { background: #991B1B; }
.fiche-btn-retour {
  background: var(--surface-2) !important;
  color: var(--ink) !important;
  border: 1px solid var(--border) !important;
}

.conflit-bloc {
  background: rgba(245,158,11,0.12);
  border: 1px solid var(--warning);
  border-radius: var(--radius-md);
  padding: 14px; margin-top: 16px;
  font-size: 14px; line-height: 1.6;
}

/* --------------------------------------------------------------------
   TOAST
   -------------------------------------------------------------------- */
.toast {
  position: fixed; bottom: 100px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--accent); color: var(--accent-ink);
  padding: 14px 28px; border-radius: 99px;
  font-weight: 700; font-size: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 3000; opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

/* --------------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------------- */
@media (max-width: 600px) {
  .kiosk-header { padding: 10px 12px 4px; }
  .app-main { padding: 0 12px; }
  .tiles-section { padding: 6px 12px; }

  .garde-banner { padding: 12px 14px; }
  .garde-heure { font-size: 20px; }
  .garde-date { font-size: 12px; }
  .garde-row-2 { gap: 14px; margin-top: 8px; }
  .garde-plage { font-size: 13px; }
  .garde-center { font-size: 16px; }
  .garde-center strong { font-size: 22px; }

  .module-header h2 { font-size: 20px; }
  .btn-back { width: 40px; height: 40px; font-size: 18px; }

  .creneau {
    flex-direction: row; align-items: center;
    gap: 10px; padding: 10px 12px;
  }
  .creneau-heure { font-size: 14px; }
  .creneau-nom { font-size: 13px; line-height: 1.2; }
  .creneau-remplace { font-size: 10px; }
  .creneau-statut { font-size: 10px; }
  .creneau-actions {
    flex-direction: column;
    align-items: flex-end; gap: 4px;
  }
  .creneau-actions button {
    padding: 6px 12px; font-size: 11px;
    min-width: 110px; text-align: center;
  }

  .modal-window { padding: 20px; }
  .modal-title { font-size: 18px; }

  .day-btn { padding: 8px 10px; font-size: 13px; }
  .day-label { font-size: 13px; }

  .kiosk-footer { padding: 6px 12px; }
  .carrousel-bas { font-size: 12px; }
  .session-pill { font-size: 12px; padding: 5px 10px; }
  .tool-btn.icon-only { width: 36px; height: 36px; font-size: 16px; }

  .tile { min-height: 85px; padding: 12px; }
  .tile-icon { font-size: 22px; }
  .tile-title { font-size: 14px; }
  .tile-desc { font-size: 11px; }

  .todo-item { padding: 12px 14px; }
  .todo-titre { font-size: 13px; }
  .todo-sub { font-size: 11px; }
  .todo-heure { font-size: 13px; min-width: 50px; }
}

@media (max-width: 380px) {
  .garde-heure { font-size: 18px; }
  .garde-date { font-size: 11px; }
  .garde-center { font-size: 14px; }
  .garde-center strong { font-size: 18px; }
  .creneau-actions button { min-width: 90px; padding: 5px 10px; font-size: 10px; }
}

/* --------------------------------------------------------------------
   TÂCHES — Bloc compact pour tâche faite
   -------------------------------------------------------------------- */
.tache-faite-compact {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin-bottom: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 5px solid var(--success);
  border-radius: var(--radius-sm);
  opacity: 0.8;
  width: 100%;
}
.tache-faite-compact .todo-check {
  flex-shrink: 0;
}
.tache-faite-nom {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: line-through;
  text-decoration-color: rgba(255,255,255,0.2);
  flex: 1;
}
.tache-faite-par {
  font-size: 11px;
  color: var(--ink-2);
  opacity: 0.8;
  flex-shrink: 0;
}
.tache-faite-compact .btn-annuler {
  flex-shrink: 0;
  padding: 6px 12px;
  font-size: 11px;
}