/* ============================================================
   MA PAUSE CAFÉ — Portail — Styles globaux v2
   ============================================================ */

:root {
  /* ── Couleurs de marque (café) — adoucies ──────────── */
  --orange:       #D66E3C;   /* terracotta plus doux (était #D4622A) */
  --orange-light: #E68A57;
  --orange-dark:  #BD5E2C;   /* orange + foncé pour textes si besoin de contraste */
  --orange-pale:  #FCF4ED;   /* fonds très doux (survol, icônes) */
  --brown:        #6E4A2E;   /* brun adouci pour les titres (était #5C3317) */
  --brown-light:  #9A765A;

  /* ── Neutres façon Apple (nuance chaude, éclaircie) ── */
  --cream:        #FEFDFB;   /* fond de page plus clair / aéré */
  --white:        #FFFFFF;   /* surfaces / cartes */
  --border:       #EFE8E1;   /* filet hairline encore plus discret */
  --border-strong:#E6DCD0;
  --text:         #3A2A1C;   /* texte adouci (reste très lisible) */
  --text-muted:   #8E7763;

  /* ── États ─────────────────────────────────────────── */
  --success:      #2E7D32;
  --warning:      #E65100;
  --danger:       #C62828;
  --info:         #1565C0;

  /* ── Ombres douces (façon Apple) ───────────────────── */
  --shadow-sm:    0 1px 2px rgba(0,0,0,0.05);
  --shadow:       0 1px 2px rgba(0,0,0,0.04), 0 8px 28px rgba(0,0,0,0.08);
  --shadow-lg:    0 6px 16px rgba(0,0,0,0.08), 0 24px 56px rgba(0,0,0,0.16);

  /* ── Rayons généreux ───────────────────────────────── */
  --radius-lg:    22px;
  --radius:       16px;
  --radius-sm:    10px;

  /* ── Divers ────────────────────────────────────────── */
  --nav-h:        56px;
  --maxw:         1080px;
  --ease:         cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display',
               'Helvetica Neue', 'Segoe UI', Roboto, sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.47;
  letter-spacing: -0.011em;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(212,98,42,0.18); }

/* Titres : interlettrage serré façon Apple */
.brand-name, .nav-brand-name, .page-title, .card-title, .modal-title,
.welcome-text h2, .profil-info h2, .block-head h3, .stat-value {
  letter-spacing: -0.022em;
}

/* ── LOGIN ─────────────────────────────────────────────────── */
.login-page {
  background:
    radial-gradient(1200px 600px at 50% -10%, #FCEFE6 0%, rgba(252,239,230,0) 60%),
    linear-gradient(180deg, #FDFAF7 0%, #F7F1EB 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem;
}

.login-card {
  background: rgba(255,255,255,0.78);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-radius: var(--radius-lg);
  padding: 2.75rem 2.25rem;
  width: 100%;
  max-width: 410px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,0.6);
}

.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  margin-bottom: 1.5rem;
}

.login-logo img { width: 56px; height: 56px; object-fit: contain; }

.brand-name {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--brown);
  line-height: 1.1;
}

.brand-name sup { font-size: 0.65em; }

.brand-tagline {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--orange);
  text-transform: uppercase;
}

.login-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 1.75rem;
}

.login-form { display: flex; flex-direction: column; gap: 1rem; }

.login-footer {
  margin-top: 1rem;
  text-align: center;
}

.login-footer a {
  font-size: 0.84rem;
  color: var(--orange);
  text-decoration: none;
}

.login-footer a:hover { text-decoration: underline; }

.reset-form { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.75rem; }

.confidential-note {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  justify-content: center;
  font-size: 0.76rem;
  color: var(--text-muted);
  padding-top: 1.25rem;
  margin-top: 1rem;
  border-top: 1px solid var(--border);
}

/* ── CHAMPS ────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }

.field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brown);
}

.field input,
.field select,
.field textarea {
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 0.93rem;
  color: var(--text);
  background: var(--white);
  font-family: inherit;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(212,98,42,0.14);
}

.field input[readonly],
.field textarea[readonly] {
  background: #F9F5F1;
  color: var(--text-muted);
}

.field textarea { resize: vertical; min-height: 80px; }

.error-msg {
  background: #FFEBEE;
  color: var(--danger);
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.83rem;
  border: 1px solid #FFCDD2;
}

/* ── BOUTONS ───────────────────────────────────────────────── */
.btn-primary {
  background: var(--orange);
  color: var(--white);
  border: none;
  padding: 0.72rem 1.6rem;
  border-radius: 980px;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 0.25s var(--ease), box-shadow 0.25s var(--ease), transform 0.12s var(--ease);
  font-family: inherit;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.btn-primary:hover   { background: var(--orange-light); box-shadow: 0 6px 18px rgba(212,98,42,0.28); }
.btn-primary:active  { transform: scale(0.98); box-shadow: none; }
.btn-primary:disabled { background: #D8C7BA; box-shadow: none; cursor: not-allowed; }
.btn-primary.auto   { width: auto; }

.btn-secondary {
  background: var(--white);
  color: var(--orange);
  border: 1px solid var(--orange);
  padding: 0.64rem 1.3rem;
  border-radius: 980px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.25s var(--ease), transform 0.12s var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.btn-secondary:hover  { background: var(--orange-pale); }
.btn-secondary:active { transform: scale(0.98); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 0.45rem 0.85rem;
  border-radius: 980px;
  font-size: 0.84rem;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.btn-ghost:hover { background: var(--orange-pale); color: var(--orange); }

.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.78rem; }

.btn-danger {
  background: #FFEBEE;
  color: var(--danger);
  border: 1px solid #FFCDD2;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

/* ── NAVIGATION ────────────────────────────────────────────── */
.topnav {
  height: var(--nav-h);
  background: rgba(255,255,255,0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 1rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-brand img { width: 40px; height: 40px; object-fit: contain; }

.nav-brand-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--brown);
  line-height: 1.1;
  white-space: nowrap;
}

.nav-brand-name sup { font-size: 0.5em; font-weight: 700; }

.nav-brand-sub {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--orange);
  text-transform: uppercase;
}

.nav-tabs {
  display: flex;
  gap: 0.15rem;
  list-style: none;
  flex: 1;
  justify-content: center;
}

.nav-tabs a {
  text-decoration: none;
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
  white-space: nowrap;
  display: block;
}

.nav-tabs a:hover {
  color: var(--brown);
}
/* Onglet actif : en GRAS, couleur du wordmark « Ma Pause Café » (brun du
   logo), sans pilule → pas de confusion avec les boutons de bascule. */
.nav-tabs a.active {
  color: var(--brown);
  font-weight: 700;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.nav-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--orange-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--orange);
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.nav-user-name {
  font-size: 0.83rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.nav-burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--brown);
  padding: 0.25rem 0.5rem;
  flex-shrink: 0;
}

/* ── BADGES ────────────────────────────────────────────────── */
.badge {
  font-size: 0.64rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.badge-expresso { background: #FFF3E0; color: #E65100; }
.badge-lungo    { background: #E8F5E9; color: #2E7D32; }
.badge-operateur { background: #E3F2FD; color: #1565C0; }
.badge-demo     { background: #F3E5F5; color: #6A1B9A; }
.badge-staff    { background: #EFE3D8; color: #6E4A2E; }

/* ── LAYOUT ────────────────────────────────────────────────── */
.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.page-header { margin-bottom: 1.5rem; }

.page-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--brown);
}

.page-sub {
  font-size: 0.87rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* ── CARDS ─────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}

.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brown);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ── STATS ─────────────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.875rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-value {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--orange);
  line-height: 1;
}

.stat-label {
  font-size: 0.73rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ── PILIERS ───────────────────────────────────────────────── */
.piliers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
}

.pilier-card {
  background: var(--white);
  border: none;
  border-radius: var(--radius);
  padding: 1.4rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease-out);
}

.pilier-card:hover {
  box-shadow: 0 14px 34px rgba(0,0,0,0.12);
  transform: translateY(-4px);
}

.pilier-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
}

.pilier-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pilier-pro  .pilier-icon { background: #FFF3E0; }
.pilier-perso .pilier-icon { background: #E8F5E9; }
.pilier-fam  .pilier-icon { background: #E3F2FD; }
.pilier-aid  .pilier-icon { background: #F3E5F5; }

/* Illustrations des piliers (espace manager) */
.pilier-illus {
  height: 132px;
  margin-bottom: 1rem;
  border-radius: 12px;
  background: #FBF3EC;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0.5rem;
}

.pilier-illus img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.35s var(--ease-out);
}

.pilier-card:hover .pilier-illus img { transform: scale(1.05); }

/* Intro des pages pilier — élégante, chaude (remplace le bandeau bleu) */
.pilier-intro {
  background: linear-gradient(180deg, #FCF4EC, #FBF0E6);
  color: var(--brown);
  border-left: 3px solid var(--orange);
  border-radius: var(--radius-sm);
  padding: 0.95rem 1.2rem;
  font-size: 0.95rem;
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.pilier-name {
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--brown);
  margin-bottom: 0.35rem;
}

.pilier-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.pilier-tags {
  margin-top: 0.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.tag {
  font-size: 0.7rem;
  background: var(--orange-pale);
  color: var(--orange);
  padding: 0.18rem 0.5rem;
  border-radius: 20px;
  font-weight: 500;
}

/* ── SERVICES LIST ─────────────────────────────────────────── */
.service-list { display: flex; flex-direction: column; gap: 0.6rem; }

.service-item {
  padding: 0.95rem 1.15rem;
  background: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease-out);
}

.service-item:hover {
  box-shadow: 0 10px 26px rgba(0,0,0,0.10);
  transform: translateY(-2px);
}

.service-item-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
}

.service-item-cat {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

/* Sous-titre = question « Vous vous reconnaissez ? » dans la liste des services */
.service-item-q {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  line-height: 1.4;
  max-width: 78ch;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.surcoût-badge {
  font-size: 0.67rem;
  background: #FFF3E0;
  color: #E65100;
  padding: 0.13rem 0.45rem;
  border-radius: 20px;
  font-weight: 600;
  white-space: nowrap;
}

/* ── TABLE ─────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.855rem;
}

thead th {
  background: var(--orange-pale);
  color: var(--brown);
  font-weight: 700;
  padding: 0.7rem 0.9rem;
  text-align: left;
  white-space: nowrap;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}

tbody tr:hover { background: var(--orange-pale); }
tbody tr:last-child { border-bottom: none; }
tbody td { padding: 0.7rem 0.9rem; }

/* ── STATUTS ───────────────────────────────────────────────── */
.statut {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.22rem 0.6rem;
  border-radius: 20px;
  font-size: 0.73rem;
  font-weight: 600;
  white-space: nowrap;
}

.statut::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.statut-nouvelle { background: #E3F2FD; color: #1565C0; }
.statut-encours  { background: #FFF3E0; color: #E65100; }
.statut-traite   { background: #E8F5E9; color: #2E7D32; }
.statut-cloture  { background: #F5F5F5; color: #757575; }
.statut-annule   { background: #FFEBEE; color: #C62828; }
.statut-prospect { background: #F3E5F5; color: #6A1B9A; }

/* ── MODAL ─────────────────────────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(28,18,10,0.32);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  animation: overlayIn 0.25s var(--ease) both;
}

@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.32s var(--ease-out) both;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-lg { max-width: 620px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brown);
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1.2rem;
  padding: 0.2rem 0.4rem;
  line-height: 1;
  border-radius: 4px;
  transition: color 0.15s;
}

.modal-close:hover { color: var(--orange); }

.modal-actions {
  display: flex;
  gap: 0.65rem;
  justify-content: flex-end;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* ── FORM GRID ─────────────────────────────────────────────── */
.form-grid { display: flex; flex-direction: column; gap: 0.9rem; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.fiche-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem 0.9rem;
}

/* ── BANNER ────────────────────────────────────────────────── */
.banner {
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.banner-info    { background: #E3F2FD; color: #1565C0; border: 1px solid #BBDEFB; }
.banner-success { background: #E8F5E9; color: #2E7D32; border: 1px solid #C8E6C9; }
.banner-warning { background: #FFF8E1; color: #F57F17; border: 1px solid #FFE082; }
.banner-danger  { background: #FFEBEE; color: #C62828; border: 1px solid #FFCDD2; }

/* ── LOADING / EMPTY ───────────────────────────────────────── */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
  gap: 0.5rem;
  font-size: 0.87rem;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  flex-shrink: 0;
}

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

.empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
}

.empty-icon { font-size: 2.2rem; margin-bottom: 0.6rem; }
.empty p    { font-size: 0.88rem; }

/* ── WELCOME BANNER ────────────────────────────────────────── */
.welcome-card {
  background: linear-gradient(135deg, #FDF5EF, #FFFFFF);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.welcome-text h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--brown);
}

.welcome-text p {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.welcome-confidential {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.77rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

/* ── OPERATEUR SIDEBAR ─────────────────────────────────────── */
.ops-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1rem;
  min-height: calc(100vh - var(--nav-h) - 2.5rem);
}

/* Évite que le contenu (tableaux larges) ne pousse la page hors écran */
.ops-layout > * { min-width: 0; }

.ops-sidebar .card { padding: 0.5rem 0; }

.ops-section-label {
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 0.7rem 1rem 0.2rem;
}

.ops-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 1rem;
  font-size: 0.87rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.12s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
}

.ops-item:hover,
.ops-item.active {
  background: var(--orange-pale);
  color: var(--orange);
  font-weight: 600;
}

/* Icônes SVG du menu opérateur — héritent de la couleur du texte */
.ops-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── KANBAN ────────────────────────────────────────────────── */
.kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.kanban-col {
  background: var(--orange-pale);
  border-radius: var(--radius);
  padding: 0.75rem;
  min-height: 180px;
}

.kanban-col-header {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kanban-count {
  background: var(--white);
  border-radius: 20px;
  padding: 0.1rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
}

.kanban-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
  margin-bottom: 0.45rem;
  cursor: pointer;
  transition: box-shadow 0.12s;
}

.kanban-card:hover { box-shadow: var(--shadow); }

.kanban-card-title {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kanban-card-meta {
  font-size: 0.73rem;
  color: var(--text-muted);
}

/* ── PROFIL ────────────────────────────────────────────────── */
.profil-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.profil-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--orange-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--orange);
  border: 3px solid var(--border);
  flex-shrink: 0;
}

.profil-info h2 { font-size: 1.15rem; font-weight: 700; color: var(--brown); }
.profil-info p  { font-size: 0.86rem; color: var(--text-muted); }

/* ── TOAST ─────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--brown);
  color: var(--white);
  padding: 0.8rem 1.25rem;
  border-radius: 14px;
  font-size: 0.86rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 300;
  transform: translateY(0);
  transition: opacity 0.3s, transform 0.3s;
  max-width: 320px;
}

.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }
.toast.hide    { opacity: 0; transform: translateY(8px); }

/* ── ESPACE MANAGER — NAV (libellé + bouton HELP) ──────────── */
.nav-label {
  display: flex;
  align-items: center;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--brown);
  opacity: 0.8;
  padding: 0.4rem 0.3rem 0.4rem 0.55rem;
  white-space: nowrap;
}

.nav-help { margin: 0 0.6rem; }

.nav-help a,
.nav-help a:hover,
.nav-help a.active {
  background: var(--danger);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 6px rgba(198,40,40,0.35);
}

.nav-help a:hover { background: #a51f1f; }

/* Bouton SOS (remplace l'onglet HELP) — petit rond rouge nu + rayonnement pulsé. */
.nav-panic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--danger);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(198,40,40,0.35);
  transition: background 0.15s ease, box-shadow 0.15s ease;
  animation: navPanicPulse 2.5s ease-out infinite;
}
.nav-panic:hover {
  background: #a51f1f;
  box-shadow: 0 4px 12px rgba(198,40,40,0.45);
  animation: none;
}
@keyframes navPanicPulse {
  0%   { box-shadow: 0 2px 6px rgba(198,40,40,0.35), 0 0 0 0 rgba(198,40,40,0.4); }
  70%  { box-shadow: 0 2px 6px rgba(198,40,40,0.35), 0 0 0 7px rgba(198,40,40,0); }
  100% { box-shadow: 0 2px 6px rgba(198,40,40,0.35), 0 0 0 0 rgba(198,40,40,0); }
}
@media (prefers-reduced-motion: reduce) { .nav-panic { animation: none; } }

/* Infobulle réutilisable (même style que la bascule) : .has-tip + data-tip. */
.has-tip { position: relative; }
.has-tip[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 9px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: #2A211C;
  color: #FAEEDA;
  font-size: 0.58rem;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  z-index: 200;
  box-shadow: 0 4px 14px rgba(58,42,28,0.22);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.has-tip[data-tip]::before {
  content: "";
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-bottom-color: #2A211C;
  opacity: 0;
  pointer-events: none;
  z-index: 200;
  transition: opacity 0.15s ease;
}
.has-tip[data-tip]:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }
.has-tip[data-tip]:hover::before { opacity: 1; }

/* ── ESPACE MANAGER — PROFIL ───────────────────────────────── */
.profil-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 1.25rem;
  align-items: start;
}

.support-col { position: sticky; top: calc(var(--nav-h) + 1rem); }

.support-card {
  background: linear-gradient(160deg, #FDF5EF, #FFFFFF);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.support-phone {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.support-hours { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.2rem; }
.support-illus { width: 100%; border-radius: var(--radius-sm); margin-top: 1rem; }
.support-illus-fallback { font-size: 2.6rem; margin-top: 0.85rem; }

#section-profil input.editable:not([readonly]) {
  border-color: var(--orange);
  background: #fff;
  color: var(--text);
}

.block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.block-head h3 { font-size: 0.95rem; font-weight: 700; color: var(--brown); }

.edit-pencil {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
}

.edit-pencil:hover { background: var(--orange-pale); color: var(--orange); }

.profil-id { display: flex; gap: 1.25rem; flex-wrap: wrap; align-items: flex-start; }

.profil-photo {
  width: 140px;
  height: 160px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--orange-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.4rem;
  color: var(--orange);
  overflow: hidden;
}

.profil-photo img { width: 100%; height: 100%; object-fit: cover; }

.kv-list { min-width: 230px; display: flex; flex-direction: column; gap: 0.55rem; }

.kv-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 0.6rem;
  align-items: center;
}

.kv-row > .kv-label { font-size: 0.8rem; font-weight: 600; color: var(--brown); }
.kv-row input { width: 100%; }

.enfants-head {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
  padding: 0 0.1rem;
}

.enfants-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.enf-date, .enf-prenom {
  width: 100%;
  min-width: 0;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  background: #fff;
}

.enf-date { min-width: 134px; }

.enf-date:focus, .enf-prenom:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(212,98,42,0.1);
}

.profil-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.profil-footer-text { font-size: 0.78rem; color: var(--text-muted); }
.profil-footer-text strong { color: var(--brown); }

.rgpd-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #0A3D91;
  color: #fff;
  border-radius: 8px;
  padding: 0.4rem 0.75rem;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.15;
}

.rgpd-badge .rgpd-stars { color: #FFD200; font-size: 0.95rem; letter-spacing: -1px; }

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-burger { display: block; }
  .topnav { padding: 0 0.85rem; gap: 0.5rem; }
  .nav-brand-name { font-size: 1.05rem; }
  .nav-brand img { width: 34px; height: 34px; }
  .nav-right { gap: 0.4rem; }
  .nav-right .badge { display: none; }
  .nav-extra { display: none; }
  .welcome-card { padding: 1.1rem 1.15rem; gap: 0.75rem; }
  .welcome-card > img { height: 100px !important; margin: 0 auto; }
  .service-item { flex-direction: column; align-items: stretch; gap: 0.7rem; }
  .service-item button { width: 100%; justify-content: center; }
  .nav-tabs   {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 6px 16px rgba(92,51,23,0.12);
    padding: 0.5rem;
    gap: 0.2rem;
    z-index: 200;
  }
  .nav-tabs.open { display: flex; }
  .nav-tabs a   { padding: 0.75rem 1rem; border-radius: 10px; }
  .nav-help     { margin: 0; }
  .fiche-grid { grid-template-columns: 1fr; }
  .nav-user-name { display: none; }
  .grid-2     { grid-template-columns: 1fr; }
  .page       { padding: 1rem; }
  .stats-row  { grid-template-columns: repeat(2, 1fr); }
  .ops-layout { grid-template-columns: 1fr; }
  .kanban     { grid-template-columns: 1fr; }
  .piliers-grid { grid-template-columns: 1fr 1fr; }
  .profil-layout { grid-template-columns: 1fr; }
  .support-col { position: static; }
  .kv-row { grid-template-columns: 100px 1fr; }
  /* Mobile : 16px minimum sur les champs → empêche le zoom auto d'iOS au focus */
  .field input, .field select, .field textarea,
  input[type="text"], input[type="email"], input[type="tel"],
  input[type="password"], input[type="date"], input[type="number"], select, textarea {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .piliers-grid { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════════════════════
   PRÉSENTATION D'UN SERVICE (espace manager)
   ════════════════════════════════════════════════════════════ */
.service-item.clickable { cursor: pointer; }

.service-back { margin-bottom: 0.5rem; }
.service-hero {
  display: flex;
  align-items: flex-end;        /* illustration, texte et bouton alignés en bas */
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.service-hero-main { flex: 1 1 280px; min-width: 0; }
.service-cta-btn  { flex-shrink: 0; }   /* poussé à droite par .service-hero-main, aligné en bas */
.service-hero-cat {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--orange-dark);
  font-weight: 700;
}
.service-accroche {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text);
  max-width: 64ch;
}

/* Question « Vous vous reconnaissez ? » — bloc mis en avant */
.service-question {
  background: var(--orange-pale);
  border: 1px solid var(--border);
  border-left: 4px solid var(--orange);
  border-radius: var(--radius);
  padding: 0.85rem 1.2rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}
.service-question-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--orange-dark);
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.service-question p {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.4;
  font-weight: 600;
  color: var(--brown);
}

/* Contexte (à gauche) + chiffres (à droite) */
.service-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(240px, 0.9fr);
  gap: 1rem;
  align-items: start;
  margin-bottom: 1.25rem;
}
/* Quand la colonne gauche est vide : le panneau chiffres reste à sa largeur naturelle. */
.service-grid--solo { grid-template-columns: minmax(0, 420px); }

.chiffre-grid {
  display: grid;
  grid-template-columns: 1fr;   /* chiffres sur une seule colonne (panneau étroit) */
  gap: 0.6rem;
}
.chiffre-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 0.9rem;
}
.chiffre-val {
  font-size: 1.85rem;
  line-height: 1.05;
  font-weight: 800;
  color: var(--orange-dark);
  letter-spacing: -0.01em;
}
.chiffre-bar {
  height: 7px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin: 0.5rem 0 0.45rem;
}
.chiffre-bar > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--orange-light), var(--orange));
}
.chiffre-label {
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--text-muted);
  margin-top: 0.3rem;
}
.chiffre-sources {
  margin-top: 0.9rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.chiffre-sources a { color: var(--orange-dark); text-decoration: none; }
.chiffre-sources a:hover { text-decoration: underline; }

/* Colonne gauche : contexte + conditions + services inclus empilés */
.service-col-left {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

/* Conditions préférentielles — petit encadré mis en avant */
.conditions-box {
  background: var(--orange-pale);
  border-radius: var(--radius-sm);
  padding: 0.8rem 0.95rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text);
  white-space: pre-wrap;
}

/* Tableau Services inclus (manager) */
.inclus-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.inclus-table th,
.inclus-table td { padding: 0.5rem 0.6rem; text-align: left; border-bottom: 1px solid var(--border); }
.inclus-table th:nth-child(n+2),
.inclus-table td:nth-child(n+2) { text-align: center; width: 92px; }
.inclus-table thead th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 700;
}
.inclus-table tbody tr:last-child td { border-bottom: none; }
.inclus-yes { color: var(--success); font-weight: 800; }
.inclus-no  { color: var(--border-strong); }

/* Éditeur Services inclus (opérateur) */
.inclus-editor-head,
.inclus-editor-row {
  display: grid;
  grid-template-columns: 1fr 92px 92px 32px;
  gap: 0.5rem;
  align-items: center;
}
.inclus-editor-head {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: 0 0.1rem 0.3rem;
  text-align: center;
}
.inclus-editor-head span:first-child { text-align: left; }
.inclus-editor-row { margin-bottom: 0.45rem; }
.inclus-editor-row input.ie-texte {
  width: 100%;
  padding: 0.4rem 0.55rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.82rem;
  background: var(--white);
}
.ie-check { display: flex; justify-content: center; align-items: center; }
.ie-check input { accent-color: var(--orange); width: 16px; height: 16px; }

@media (max-width: 760px) {
  .service-grid { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════════════════════
   ÉDITEUR DE SERVICE (espace opérateur)
   ════════════════════════════════════════════════════════════ */
.svc-toggle {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brown);
  cursor: pointer;
}
.svc-toggle input { width: 16px; height: 16px; accent-color: var(--orange); }

/* Tableau éditeur de chiffres : 5 colonnes + bouton */
.stat-editor-head,
.stat-editor-row {
  display: grid;
  grid-template-columns: 0.7fr 1.6fr 0.55fr 1.1fr 1.3fr 32px;
  gap: 0.5rem;
  align-items: center;
}
.stat-editor-head {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: 0 0.1rem 0.3rem;
}
.stat-editor-row { margin-bottom: 0.45rem; }
.stat-editor-row input {
  width: 100%;
  padding: 0.4rem 0.55rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.82rem;
  background: var(--white);
}

/* Liste des partenaires mobilisables (cases à cocher) */
.svc-part-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.4rem;
}
.svc-part-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  cursor: pointer;
  background: var(--white);
}
.svc-part-check:hover { background: var(--orange-pale); }
.svc-part-check input { accent-color: var(--orange); }

/* Lignes de regroupement par pilier dans le catalogue services */
.svc-pil-row td {
  background: var(--orange-pale);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--brown);
}

@media (max-width: 640px) {
  .stat-editor-head { display: none; }
  .stat-editor-row { grid-template-columns: 1fr 1fr; }
}

/* Nom cliquable dans les listes (remplace le bouton « Éditer ») */
.row-link {
  background: none; border: none; padding: 0; margin: 0;
  font: inherit; font-weight: 700; color: var(--text);
  cursor: pointer; text-align: left;
  transition: color 0.15s var(--ease);
}
.row-link:hover { color: var(--orange); text-decoration: underline; }
