/* ═══════════════════════════════════════════════════════════════
   MedicAfife — Feuille de style principale
   /medicafife/assets/css/style.css
   ═══════════════════════════════════════════════════════════════ */

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

/* ── Variables ─────────────────────────────────────────────────── */
:root {
  --bg:            #f2f4f7;
  --surface:       #ffffff;
  --surface2:      #f7f8fa;
  --border:        #e0e5ed;
  --border-strong: #c8d0de;
  --text:          #1a2130;
  --text-soft:     #5a6478;
  --text-lighter:  #96a0b4;
  --pierre:        #e8502a;
  --pierre-light:  #fff1ee;
  --pierre-mid:    #f8c4b8;
  --claire:        #0f9e96;
  --claire-light:  #e8f9f8;
  --claire-mid:    #9adbd7;
  --red:           #d63030;
  --red-light:     #fff0f0;
  --orange:        #e07010;
  --orange-light:  #fff5e8;
  --green:         #1a9a5c;
  --green-light:   #e8f8ef;
  --shadow:        0 1px 4px rgba(20,40,80,0.08), 0 4px 16px rgba(20,40,80,0.06);
  --shadow-lg:     0 8px 40px rgba(20,40,80,0.13);
  --shadow-xl:     0 20px 60px rgba(20,40,80,0.22);
  --radius:        16px;
  --radius-sm:     10px;
}

/* ── Reset & base ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Login ─────────────────────────────────────────────────────── */
body.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(150deg, #1a2130 0%, #1e3a4a 50%, #0f9e96 100%);
}

.login-card {
  background: var(--surface);
  border-radius: 24px;
  padding: 60px 52px;
  width: 440px;
  box-shadow: var(--shadow-xl);
  text-align: center;
  border: 1px solid var(--border);
}

.login-app-name {
  font-size: 40px;
  font-weight: 800;
  color: var(--pierre);
  letter-spacing: -1px;
  margin-bottom: 6px;
}

.login-app-name span { color: var(--claire); }

.login-tagline {
  font-size: 15px;
  color: var(--text-soft);
  margin-bottom: 44px;
}

.login-field { margin-bottom: 18px; }

.login-field input {
  width: 100%;
  padding: 15px 20px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: var(--text);
  background: var(--surface2);
  outline: none;
  transition: border-color 0.2s;
  text-align: center;
  letter-spacing: 3px;
}

.login-field input:focus { border-color: var(--pierre); background: white; }

.login-btn {
  width: 100%;
  padding: 15px;
  background: var(--pierre);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  margin-top: 4px;
}

.login-btn:hover  { background: #c83f1a; transform: translateY(-1px); }
.login-btn:active { transform: translateY(0); }

.login-error {
  margin-top: 14px;
  padding: 10px 16px;
  background: var(--red-light);
  color: var(--red);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid #f5c0bb;
}

.login-notice {
  margin-bottom: 16px;
  padding: 10px 16px;
  background: var(--orange-light);
  color: var(--orange);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid #f5d9b0;
}

/* ── Layout principal ──────────────────────────────────────────── */
.app-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Header ────────────────────────────────────────────────────── */
.header {
  background: var(--surface);
  border-bottom: 2px solid var(--border);
  padding: 0 36px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(20,40,80,0.07);
}

.header-logo {
  font-size: 24px;
  font-weight: 800;
  color: var(--pierre);
  cursor: pointer;
  letter-spacing: -0.5px;
  flex-shrink: 0;
  text-decoration: none;
}

.header-logo span { color: var(--claire); }

.header-search {
  flex: 1;
  max-width: 420px;
  margin: 0 40px;
  position: relative;
}

.header-search input {
  width: 100%;
  padding: 10px 18px 10px 42px;
  border: 1.5px solid var(--border);
  border-radius: 30px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--surface2);
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.header-search input:focus { border-color: var(--claire); background: white; }

.search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  opacity: 0.4;
  pointer-events: none;
}

/* Résultats de recherche */
.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  max-height: 360px;
  overflow-y: auto;
  display: none;
}

.search-results.visible { display: block; }

.search-result-item {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--surface2); }

.search-result-personne {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  flex-shrink: 0;
}

.search-result-personne.pierre { background: var(--pierre-light); color: var(--pierre); }
.search-result-personne.claire { background: var(--claire-light); color: var(--claire); }

.search-result-info { flex: 1; min-width: 0; }
.search-result-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-result-sub   { font-size: 12px; color: var(--text-soft); margin-top: 2px; }

.search-no-results { padding: 20px; text-align: center; color: var(--text-lighter); font-size: 14px; }

/* Navigation header */
.header-nav { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }

.nav-btn {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-soft);
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
}

.nav-btn:hover  { background: var(--surface2); color: var(--text); }
.nav-btn.active { background: var(--pierre-light); color: var(--pierre); font-weight: 700; }

.nav-sep { width: 1px; height: 22px; background: var(--border); margin: 0 6px; }

.nav-btn-logout {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-lighter);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  text-decoration: none;
}

.nav-btn-logout:hover { color: var(--red); background: var(--red-light); }

/* ── Page principale ───────────────────────────────────────────── */
.main { padding: 36px; flex: 1; }

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
  letter-spacing: -0.3px;
}

/* ── Tableau de bord ───────────────────────────────────────────── */
.dashboard { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 28px; }

.person-col {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.18s;
  border: 1.5px solid var(--border);
}

.person-col:hover              { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.person-col.pierre:hover       { border-color: var(--pierre); }
.person-col.claire:hover       { border-color: var(--claire); }

.person-header {
  padding: 24px 28px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 2px solid rgba(0,0,0,0.08);
}

.person-header.pierre { background: linear-gradient(130deg, #e8502a 0%, #f07840 100%); }
.person-header.claire { background: linear-gradient(130deg, #0f9e96 0%, #18b8ae 100%); }

.person-initial {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; color: white;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.4);
}

.person-name     { font-size: 22px; font-weight: 800; color: white; letter-spacing: -0.3px; }
.person-subtitle { font-size: 13px; color: rgba(255,255,255,0.8); margin-top: 3px; }

.person-open-btn {
  margin-left: auto;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13px; font-weight: 600;
  background: rgba(255,255,255,0.2);
  color: white;
  border: 1.5px solid rgba(255,255,255,0.45);
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.person-open-btn:hover { background: rgba(255,255,255,0.35); }

.person-body { padding: 0; }

.dash-section { padding: 18px 28px; border-bottom: 1px solid var(--border); }
.dash-section:last-child { border-bottom: none; }

.dash-section-title {
  font-size: 11px; font-weight: 700;
  letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--text);
  margin-bottom: 14px;
}

/* ── Calendrier dashboard ──────────────────────────────────────── */

.calendar-col {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1.5px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.calendar-header {
  padding: 24px 28px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 2px solid rgba(0,0,0,0.08);
  background: linear-gradient(130deg, #3a4a6b 0%, #4e5e8a 100%);
}

.calendar-header-title {
  font-size: 22px; font-weight: 800;
  color: white; letter-spacing: -0.3px;
}

#dash-calendar { padding: 16px 20px; display: flex; flex-direction: column; gap: 20px; }

.cal-month {}

.cal-month-title {
  font-size: 14px; font-weight: 700;
  color: var(--text-soft); text-transform: uppercase;
  letter-spacing: 1px; margin-bottom: 10px;
  text-align: center;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.cal-day-name {
  font-size: 12px; font-weight: 700;
  color: var(--text-soft); text-align: center;
  padding: 4px 0; text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cal-day {
  min-height: 38px;
  border-radius: 6px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px; padding: 3px 1px;
  font-size: 13px; color: var(--text-soft);
  position: relative;
}

.cal-day.empty { background: none; }

.cal-day.today .cal-day-num {
  background: #f5c400;
  color: #1a2130;
  border-radius: 50%;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
}

.cal-day.has-event { font-weight: 600; color: var(--text); }

.cal-day-num { line-height: 1; }

.cal-dots {
  display: flex; gap: 2px;
  align-items: center; justify-content: center;
}

.cal-dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
  flex-shrink: 0;
}

.cal-dot:hover { transform: scale(1.5); opacity: 0.85; }

.cal-dot.pierre { background: var(--pierre); }
.cal-dot.claire { background: var(--claire); }


.fiche {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  border-left: 4px solid transparent;
  transition: filter 0.15s;
  cursor: pointer;
}

.fiche:last-child { margin-bottom: 0; }
.fiche.urgent  { background: var(--red-light);    border-left-color: var(--red); }
.fiche.warning { background: var(--orange-light); border-left-color: var(--orange); }
.fiche.ok      { background: var(--green-light);  border-left-color: var(--green); }
.fiche.neutral { background: var(--surface2);     border-left-color: var(--border-strong); }
.fiche:hover   { filter: brightness(0.97); }

.fiche-content { flex: 1; min-width: 0; }
.fiche-title   { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fiche-meta    { font-size: 13px; color: var(--text-soft); margin-top: 3px; }

.fiche-badge {
  font-size: 12px; font-weight: 700;
  padding: 4px 10px; border-radius: 20px;
  flex-shrink: 0; white-space: nowrap;
}

.badge-red    { background: var(--red-light);    color: var(--red);    border: 1px solid #f5c0bb; }
.badge-orange { background: var(--orange-light); color: var(--orange); border: 1px solid #f5d9b0; }
.badge-green  { background: var(--green-light);  color: var(--green);  border: 1px solid #9dd4b5; }
.badge-neutral{ background: var(--surface2);     color: var(--text-soft); border: 1px solid var(--border); }

.empty-state { font-size: 14px; color: var(--text-lighter); font-style: italic; padding: 4px 0; }

/* ── Profil plein écran ────────────────────────────────────────── */
.profile-band {
  padding: 22px 36px;
  display: flex; align-items: center; gap: 18px;
  border-bottom: 2px solid var(--border);
}

.profile-band.pierre { background: linear-gradient(130deg, #e8502a 0%, #f07840 100%); }
.profile-band.claire { background: linear-gradient(130deg, #0f9e96 0%, #18b8ae 100%); }

.profile-title    { font-size: 26px; font-weight: 800; color: white; letter-spacing: -0.3px; }
.profile-subtitle { font-size: 14px; color: rgba(255,255,255,0.75); margin-top: 2px; }

.back-btn {
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.2);
  border: 1.5px solid rgba(255,255,255,0.4);
  font-size: 14px; font-weight: 600;
  cursor: pointer; color: white;
  transition: background 0.15s;
}

.back-btn:hover { background: rgba(255,255,255,0.32); }

.add-btn {
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 700;
  background: rgba(255,255,255,0.22); color: white;
  border: 1.5px solid rgba(255,255,255,0.45);
  cursor: pointer; transition: background 0.15s;
  white-space: nowrap;
}

#btn-add-fiche { margin-left: auto; }

.add-btn:hover { background: rgba(255,255,255,0.35); }

.profile-body {
  padding: 36px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* Onglets Actif / Archivé dans le profil */
.profile-tabs {
  padding: 0 36px;
  display: flex; gap: 0;
  border-bottom: 2px solid var(--border);
  background: var(--surface);
}

.profile-tab {
  padding: 14px 22px;
  font-size: 15px; font-weight: 500;
  color: var(--text-soft);
  background: none; border: none; cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}

.profile-tab:hover { color: var(--text); }
.profile-tab.active.pierre { color: var(--pierre); border-bottom-color: var(--pierre); font-weight: 700; }
.profile-tab.active.claire { color: var(--claire); border-bottom-color: var(--claire); font-weight: 700; }

/* Rubriques dans le profil */
.rubrique-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--border);
}

.rubrique-header {
  padding: 16px 22px;
  border-bottom: 2px solid;
  display: flex; align-items: center; justify-content: space-between;
}

.rubrique-header.pierre { background: var(--pierre-light); border-bottom-color: var(--pierre-mid); }
.rubrique-header.claire { background: var(--claire-light); border-bottom-color: var(--claire-mid); }

.rubrique-name { font-size: 15px; font-weight: 700; color: var(--text); }
.rubrique-name.pierre { color: var(--text); }
.rubrique-name.claire { color: var(--text); }

.rubrique-count { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.rubrique-count.pierre { background: var(--pierre-mid); color: var(--pierre); }
.rubrique-count.claire { background: var(--claire-mid); color: var(--claire); }

.rubrique-body { padding: 18px 22px; }

/* Fiches dans le profil */
.fiche-full {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px;
  cursor: pointer;
  transition: background 0.15s;
  border-radius: 4px;
}

.fiche-full:last-child  { border-bottom: none; padding-bottom: 0; }
.fiche-full:first-child { padding-top: 0; }
.fiche-full:hover       { background: var(--surface2); padding-left: 8px; padding-right: 8px; margin: 0 -8px; }

.fiche-full-left  { flex: 1; min-width: 0; }
.fiche-full-title { font-size: 15px; font-weight: 600; }
.fiche-full-date  { font-size: 13px; color: var(--text-soft); margin-top: 3px; }

.fiche-doc-link {
  font-size: 13px; font-weight: 600;
  text-decoration: none;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
  white-space: nowrap; flex-shrink: 0;
}

.fiche-doc-link.pierre { color: var(--pierre); border: 1px solid var(--pierre-mid); background: var(--pierre-light); }
.fiche-doc-link.pierre:hover { background: var(--pierre-mid); }
.fiche-doc-link.claire { color: var(--claire); border: 1px solid var(--claire-mid); background: var(--claire-light); }
.fiche-doc-link.claire:hover { background: var(--claire-mid); }

/* ── Modale (fiche saisie / consultation) ──────────────────────── */
.overlay {
  position: fixed; inset: 0;
  background: rgba(15,25,50,0.55);
  backdrop-filter: blur(3px);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}

.overlay.visible { opacity: 1; pointer-events: all; }

.modal {
  background: var(--surface);
  border-radius: 20px;
  width: 680px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
  transform: translateY(16px);
  transition: transform 0.2s;
}

.overlay.visible .modal { transform: translateY(0); }

.modal-header {
  padding: 24px 32px 20px;
  border-bottom: 2px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  border-radius: 20px 20px 0 0;
  position: sticky; top: 0; z-index: 10;
}

.modal-header.pierre { background: linear-gradient(130deg, #e8502a 0%, #f07840 100%); border-bottom-color: #c83f1a; }
.modal-header.claire { background: linear-gradient(130deg, #0f9e96 0%, #18b8ae 100%); border-bottom-color: #0a7a72; }

.modal-header-left { display: flex; align-items: center; gap: 14px; }

.modal-person-badge {
  padding: 5px 14px; border-radius: 20px;
  font-size: 13px; font-weight: 700;
  background: rgba(255,255,255,0.25); color: white;
  border: 1.5px solid rgba(255,255,255,0.4);
}

.modal-title { font-size: 18px; font-weight: 800; color: white; }

.modal-close {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: 1.5px solid rgba(255,255,255,0.35);
  color: white; font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}

.modal-close:hover { background: rgba(255,255,255,0.35); }

.modal-body { padding: 32px; }

.modal-footer {
  padding: 20px 32px;
  border-top: 2px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface2);
  border-radius: 0 0 20px 20px;
  position: sticky; bottom: 0;
}

.footer-info { font-size: 13px; color: var(--text-lighter); }
.footer-info strong { color: var(--text-soft); }

.footer-actions { display: flex; gap: 12px; align-items: center; }

/* ── Formulaires ───────────────────────────────────────────────── */
.form-section { margin-bottom: 28px; }
.form-section:last-child { margin-bottom: 0; }

.form-section-title {
  font-size: 11px; font-weight: 700;
  letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--text-lighter);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.form-row { display: flex; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.form-row:last-child { margin-bottom: 0; }

.form-group { display: flex; flex-direction: column; gap: 7px; flex: 1; min-width: 200px; }
.form-group.half { flex: 0 0 calc(50% - 8px); }

.form-label {
  font-size: 13px; font-weight: 600;
  color: var(--text-soft); letter-spacing: 0.2px;
}

.form-label .required { color: var(--pierre); margin-left: 3px; }

.form-input,
.form-select,
.form-textarea {
  padding: 11px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--surface2);
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  width: 100%;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus { border-color: var(--pierre); background: white; }

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2396a0b4' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-color: var(--surface2);
  padding-right: 40px;
  cursor: pointer;
}

.form-textarea { resize: vertical; min-height: 90px; line-height: 1.5; }

/* Autocomplete dropdown */
.autocomplete-list {
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 300;
  max-height: 220px;
  overflow-y: auto;
  display: none;
}

.autocomplete-list.visible { display: block; }

.autocomplete-item {
  padding: 10px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.1s;
  border-bottom: 1px solid var(--border);
}

.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover,
.autocomplete-item.selected { background: var(--pierre-light); color: var(--pierre); }

.autocomplete-wrapper { position: relative; }

/* Date hint */
.date-with-hint { position: relative; }
.date-hint {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  font-size: 12px; font-weight: 700;
  padding: 3px 8px; border-radius: 12px;
  pointer-events: none;
}

.date-hint.orange { background: var(--orange-light); color: var(--orange); }
.date-hint.green  { background: var(--green-light);  color: var(--green); }
.date-hint.red    { background: var(--red-light);    color: var(--red); }

/* Délai chips */
.delay-chips { display: flex; gap: 10px; flex-wrap: wrap; }

.delay-chip {
  padding: 8px 16px; border-radius: 20px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  border: 2px solid var(--border); background: var(--surface2);
  color: var(--text-soft); transition: all 0.15s;
}

.delay-chip:hover  { border-color: var(--pierre); color: var(--pierre); }
.delay-chip.active { background: var(--pierre-light); color: var(--pierre); border-color: var(--pierre-mid); }

.delay-custom { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.delay-custom input {
  width: 90px; padding: 8px 12px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif; font-size: 15px;
  color: var(--text); background: var(--surface2); outline: none;
}
.delay-custom input:focus { border-color: var(--pierre); background: white; }
.delay-custom span { font-size: 14px; color: var(--text-soft); }

/* Zone Dropbox */
.dropbox-zone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  background: var(--surface2);
  transition: border-color 0.2s, background 0.2s;
}

.dropbox-zone.has-file {
  border-style: solid;
  border-color: var(--green);
  background: var(--green-light);
}

.dropbox-empty {
  display: flex; flex-direction: column;
  align-items: center; gap: 12px; text-align: center;
}

.dropbox-empty-text { font-size: 14px; color: var(--text-soft); line-height: 1.5; }

.btn-dropbox {
  padding: 10px 22px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 700; cursor: pointer;
  background: #0061ff; color: white;
  border: none; transition: background 0.15s;
  display: flex; align-items: center; gap: 8px;
}

.btn-dropbox:hover { background: #0052d6; }

.dropbox-file {
  display: flex; align-items: center; gap: 14px;
}

.dropbox-file-icon {
  width: 40px; height: 40px; border-radius: 8px;
  background: white; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
  box-shadow: var(--shadow);
}

.dropbox-file-info { flex: 1; min-width: 0; }
.dropbox-file-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dropbox-file-path { font-size: 12px; color: var(--text-soft); margin-top: 3px; }

.btn-dropbox-clear {
  padding: 6px 14px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; cursor: pointer;
  background: white; color: var(--red);
  border: 1px solid #f5c0bb; transition: background 0.15s; flex-shrink: 0;
}

.btn-dropbox-clear:hover { background: var(--red-light); }

/* ── Boutons généraux ──────────────────────────────────────────── */
.btn-primary {
  padding: 11px 24px; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 700; cursor: pointer;
  color: white; border: none; transition: background 0.15s;
}

.btn-primary.pierre { background: var(--pierre); }
.btn-primary.pierre:hover { background: #c83f1a; }
.btn-primary.claire { background: var(--claire); }
.btn-primary.claire:hover { background: #0a7a72; }

.btn-cancel {
  padding: 11px 24px; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 600; cursor: pointer;
  background: var(--surface); color: var(--text-soft);
  border: 1.5px solid var(--border); transition: background 0.15s;
}

.btn-cancel:hover { background: var(--border); }

.btn-danger {
  padding: 7px 14px; border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 600; cursor: pointer;
  background: var(--red-light); color: var(--red);
  border: 1.5px solid #f5c0bb; transition: background 0.15s;
  opacity: 0.75;
}

.btn-danger:hover { background: #fdd; opacity: 1; }

/* ── Paramètres ────────────────────────────────────────────────── */
.params-header {
  padding: 22px 36px;
  border-bottom: 2px solid var(--border);
  background: var(--surface);
}

.params-header h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.3px; }

.tabs-bar {
  display: flex; gap: 0;
  border-bottom: 2px solid var(--border);
  background: var(--surface);
  padding: 0 36px;
}

.tab-btn {
  padding: 16px 24px;
  font-size: 15px; font-weight: 500;
  color: var(--text-soft); background: none; border: none;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--pierre); border-bottom-color: var(--pierre); font-weight: 700; }

.tab-content { display: none; padding: 36px; }
.tab-content.active { display: block; }

.param-card {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid var(--border);
  margin-bottom: 24px; overflow: hidden;
}

.param-card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
  display: flex; align-items: center; justify-content: space-between;
}

.param-card-title    { font-size: 16px; font-weight: 700; }
.param-card-subtitle { font-size: 13px; color: var(--text-soft); margin-top: 3px; }
.param-card-body     { padding: 24px; }

.person-tabs { display: flex; gap: 8px; margin-bottom: 20px; }

.person-tab {
  padding: 7px 18px; border-radius: 20px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  border: 2px solid transparent;
  background: var(--surface2); color: var(--text-soft);
  transition: all 0.15s;
}

.person-tab.pierre.active { background: var(--pierre-light); color: var(--pierre); border-color: var(--pierre-mid); }
.person-tab.claire.active { background: var(--claire-light); color: var(--claire); border-color: var(--claire-mid); }
.person-tab:not(.active):hover { background: var(--border); color: var(--text); }

.person-panel { display: none; }
.person-panel.active { display: block; }

.rubrique-list { display: flex; flex-direction: column; gap: 10px; }

.rubrique-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; background: var(--surface2);
  border-radius: var(--radius-sm); border: 1px solid var(--border);
}

.rubrique-item-order { display: flex; flex-direction: column; gap: 2px; flex-shrink: 0; }

.btn-order {
  background: none; border: none; cursor: pointer;
  color: var(--text-lighter); font-size: 10px; padding: 1px 4px;
  line-height: 1; border-radius: 3px; transition: color 0.15s, background 0.15s;
}
.btn-order:hover { color: var(--pierre); background: var(--pierre-light); }

.rubrique-item-name { flex: 1; font-size: 15px; font-weight: 500; }
.rubrique-item-actions { display: flex; gap: 8px; }

.btn-sm { padding: 5px 14px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; cursor: pointer; border: none; transition: background 0.15s; }
.btn-edit   { background: var(--surface); color: var(--text-soft); border: 1px solid var(--border) !important; }
.btn-edit:hover   { background: var(--border); }
.btn-delete { background: var(--red-light); color: var(--red); border: 1px solid #f5c0bb !important; }
.btn-delete:hover { background: #fdd; }

.btn-add {
  margin-top: 14px; padding: 10px 20px;
  border-radius: var(--radius-sm); font-size: 14px; font-weight: 700;
  background: var(--pierre-light); color: var(--pierre);
  border: 1.5px solid var(--pierre-mid); cursor: pointer;
  transition: background 0.15s;
}
.btn-add:hover { background: var(--pierre-mid); }
.btn-add.claire-btn { background: var(--claire-light); color: var(--claire); border-color: var(--claire-mid); }
.btn-add.claire-btn:hover { background: var(--claire-mid); }

.delay-selector { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.delay-option {
  padding: 9px 20px; border-radius: 20px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  border: 2px solid var(--border); background: var(--surface2);
  color: var(--text-soft); transition: all 0.15s;
}
.delay-option:hover { border-color: var(--pierre); color: var(--pierre); }
.delay-option.active { background: var(--pierre-light); color: var(--pierre); border-color: var(--pierre-mid); }

.backup-download-zone {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; background: var(--surface2);
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  margin-bottom: 16px;
}
.backup-download-zone:last-child { margin-bottom: 0; }
.backup-download-info { flex: 1; }
.backup-download-title { font-size: 15px; font-weight: 600; }
.backup-download-desc  { font-size: 13px; color: var(--text-soft); margin-top: 4px; }

.btn-download {
  padding: 10px 22px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 700; cursor: pointer;
  background: var(--claire-light); color: var(--claire);
  border: 1.5px solid var(--claire-mid); transition: background 0.15s; flex-shrink: 0;
}
.btn-download:hover { background: var(--claire-mid); }

.backup-list { display: flex; flex-direction: column; gap: 10px; }

.backup-item {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 18px; background: var(--surface2);
  border-radius: var(--radius-sm); border: 1px solid var(--border);
}

.backup-item-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--claire); flex-shrink: 0; }
.backup-item-dot.old { background: var(--border-strong); }
.backup-item-info { flex: 1; }
.backup-item-date { font-size: 15px; font-weight: 600; }
.backup-item-desc { font-size: 13px; color: var(--text-soft); margin-top: 2px; }

.btn-restore {
  padding: 7px 16px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 700; cursor: pointer;
  background: var(--orange-light); color: var(--orange);
  border: 1.5px solid #f5d9b0; transition: background 0.15s; flex-shrink: 0;
}
.btn-restore:hover { background: #fde8c8; }

.backup-warning {
  margin-top: 16px; padding: 14px 18px;
  background: var(--orange-light); border-radius: var(--radius-sm);
  border-left: 4px solid var(--orange);
  font-size: 13px; color: var(--orange); font-weight: 500; line-height: 1.5;
}

/* ── Toast notifications ───────────────────────────────────────── */
.toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 500;
  display: flex; flex-direction: column; gap: 10px;
}

.toast {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateX(20px);
  transition: opacity 0.2s, transform 0.2s;
  max-width: 320px;
}

.toast.visible { opacity: 1; transform: translateX(0); }
.toast.success { background: var(--green-light); color: var(--green); border: 1px solid #9dd4b5; }
.toast.error   { background: var(--red-light);   color: var(--red);   border: 1px solid #f5c0bb; }
.toast.info    { background: var(--claire-light); color: var(--claire); border: 1px solid var(--claire-mid); }

/* ── Spinner de chargement ─────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px;
  border: 2.5px solid var(--border);
  border-top-color: var(--pierre);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.7);
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  z-index: 10;
}

/* ── Responsive tablette ───────────────────────────────────────── */
@media (max-width: 900px) {
  .dashboard       { grid-template-columns: 1fr; }
  .profile-body    { grid-template-columns: 1fr; }
  .header-search   { max-width: 260px; margin: 0 20px; }
  .main            { padding: 20px; }
  .profile-band    { padding: 16px 20px; }
  .modal           { width: 96vw; }
}

/* ── Navigateur Dropbox ────────────────────────────────────────── */
.db-crumb {
  cursor: pointer;
  color: var(--claire);
  font-weight: 600;
}
.db-crumb:hover { text-decoration: underline; }

.db-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 24px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}

.db-entry:last-child { border-bottom: none; }
.db-entry:hover { background: var(--surface2); }

.db-entry-icon { font-size: 18px; flex-shrink: 0; }
.db-entry-name { flex: 1; font-size: 14px; font-weight: 500; }
.db-entry-date { font-size: 12px; color: var(--text-lighter); flex-shrink: 0; }

.db-file:hover { background: var(--claire-light); }
.db-file:hover .db-entry-name { color: var(--claire); font-weight: 600; }

/* ── Modale de confirmation ────────────────────────────────────── */
#overlay-confirm .modal {
  width: 420px;
  max-width: 95vw;
}

.confirm-body {
  padding: 28px 28px 20px;
}

.confirm-titre {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.confirm-message {
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.6;
}

.confirm-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 28px;
  border-top: 1px solid var(--border);
  background: var(--surface2);
  border-radius: 0 0 var(--radius) var(--radius);
}

.btn-primary.danger {
  background: #d63030;
}
.btn-primary.danger:hover {
  background: #b82020;
}
