/* ========================================================================== */
/* LETI COACHING — GLOBAL UI/UX V10                                           */
/* Audit global : Cliente, Coach, Admin, Programmes, Nutrition, Suivi, Modales */
/* ========================================================================== */

:root {
  --font-heading: 'Barlow Condensed', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --leti-ink: #071b31;
  --leti-ink-2: #12324d;
  --leti-green: #08a94f;
  --leti-green-dark: #078743;
  --leti-green-soft: #e9f8ef;
  --leti-bg: #f4f7f6;
  --leti-surface: #ffffff;
  --leti-soft: #f8faf9;
  --leti-border: #dde5e1;
  --leti-muted: #667085;
  --leti-shadow: 0 16px 44px rgba(7,27,49,.08);
  --leti-shadow-strong: 0 28px 90px rgba(3,16,27,.22);
  --leti-radius: 20px;
  --leti-radius-sm: 14px;
}

html { background: var(--leti-bg); }
body {
  background:
    linear-gradient(rgba(255,255,255,.82),rgba(255,255,255,.82)),
    radial-gradient(circle at 85% 0%,rgba(8,169,79,.08),transparent 34rem),
    var(--leti-bg);
  color: var(--leti-ink);
}
body, button, input, select, textarea { font-family: var(--font-body); }
h1,h2,h3,h4,h5,h6 { font-family: var(--font-heading); letter-spacing: -.015em; }
h1 { font-size: clamp(2.15rem,4vw,3.5rem); line-height: .96; }
h2 { font-size: clamp(1.65rem,3vw,2.35rem); line-height: 1; }
h3 { font-size: 1.25rem; line-height: 1.08; }

/* -------------------------------------------------------------------------- */
/* Global safeguards                                                          */
/* -------------------------------------------------------------------------- */
#app, .app-layout, .app-main-wrapper, .app-main, .react-layout,
.client-hub-shell, .hub-content, .coach-shell, .coach-main, .admin-shell,
.modal-content, .react-modal { min-width: 0; }
img, video, canvas, svg { max-width: 100%; }
button, input, select, textarea { max-width: 100%; }
button { touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(8,169,79,.22);
  outline-offset: 2px;
}

/* -------------------------------------------------------------------------- */
/* Client shell / navigation                                                   */
/* -------------------------------------------------------------------------- */
.app-main-wrapper { background: transparent; }
.app-header {
  min-height: 72px;
  height: auto;
  padding: .7rem clamp(1rem,2.4vw,2.2rem);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(16px);
  border-bottom-color: rgba(7,27,49,.08);
}
.app-main {
  width: min(100%, 1180px);
  max-width: 1180px;
  padding: clamp(1.1rem,2.2vw,2rem) clamp(1rem,2.4vw,2rem) calc(var(--mobile-nav-height) + 2rem);
}
.desktop-sidebar.react-sidebar {
  width: 272px;
  padding: 1.5rem 1.05rem 1rem;
  background: linear-gradient(180deg,#082235 0%,#061a2c 100%);
  border-right: 0;
  box-shadow: 16px 0 34px rgba(7,27,49,.08);
}
.react-sidebar .desktop-nav-item {
  min-height: 54px;
  padding: .82rem .9rem;
  border-radius: 14px;
  color: rgba(255,255,255,.68);
  gap: .9rem;
  font-size: .98rem;
}
.react-sidebar .desktop-nav-item:hover { color:#fff; background:rgba(255,255,255,.07); }
.react-sidebar .desktop-nav-item.active {
  color:#fff;
  background: linear-gradient(135deg,rgba(8,169,79,.24),rgba(8,169,79,.10));
  box-shadow: inset 3px 0 0 var(--leti-green);
}
.react-nav-icon svg { width: 22px; height: 22px; }
.react-user-card { border-top-color: rgba(255,255,255,.14); }
.role-switch-box { margin-top: .7rem; padding: .85rem; border-radius:14px; background:rgba(255,255,255,.06); }
.role-switch-box small { color:rgba(255,255,255,.6); }
.role-switch-box .btn { margin-top:.45rem; color:#fff; border-color:rgba(255,255,255,.24); }
.header-right-actions { display:flex; align-items:center; gap:.65rem; min-width:0; }
.header-sub-pill {
  display:inline-flex; align-items:center; gap:.5rem; min-height:40px;
  padding:.55rem .8rem; border:1px solid var(--leti-border); border-radius:999px;
  background:#fff; color:var(--leti-ink); box-shadow:0 4px 14px rgba(7,27,49,.05); font-weight:700;
}
.status-dot { width:10px; height:10px; border-radius:50%; background:#f0a31a; box-shadow:0 0 0 4px rgba(240,163,26,.12); }
.status-dot.active { background:#18b766; box-shadow:0 0 0 4px rgba(24,183,102,.12); }
.nav-bubble { margin-left:auto; display:grid; place-items:center; min-width:22px; height:22px; padding:0 6px; border-radius:999px; background:var(--leti-green); color:#fff; font-size:.7rem; }
.mobile-nav-dot { position:absolute; top:10px; right:25%; width:8px; height:8px; border-radius:50%; background:#ef4444; box-shadow:0 0 0 3px #fff; }
.local-mode-notice.server-sync-notice {
  margin: 0 0 1rem;
  padding: .72rem .9rem;
  border: 1px solid rgba(8,169,79,.18);
  border-radius: 12px;
  color: #476057;
  background: rgba(235,249,240,.78);
  font-size: .78rem;
  line-height: 1.45;
}

/* -------------------------------------------------------------------------- */
/* Common page hierarchy                                                       */
/* -------------------------------------------------------------------------- */
.react-page-head, .coach-view-head, .admin-view-head {
  align-items:flex-start;
  gap:1rem 2rem;
  margin-bottom:1.35rem;
}
.react-page-head h1, .coach-view-head h1, .admin-view-head h1 { margin:.15rem 0 .45rem; }
.react-page-head p, .coach-view-head p, .admin-view-head p { max-width:68ch; line-height:1.6; }
.eyebrow { color:var(--leti-green-dark); font-size:.72rem; letter-spacing:.14em; }
.flex-between { display:flex; justify-content:space-between; gap:1rem; }
.align-center { align-items:center; }
.card-section { margin-top:1.35rem; }
.section-divider { height:1px; background:rgba(7,27,49,.08); margin:1.5rem 0; }
.text-link, .text-back-btn, .back-to-list-btn {
  display:inline-flex; align-items:center; gap:.35rem; color:var(--leti-green-dark); font-weight:800;
}
.text-danger, .danger-text-btn { color:#b42318 !important; }
.btn-danger, .danger-btn { background:#b42318; color:#fff; }
.btn-danger:hover, .danger-btn:hover { background:#8e1d15; }
.btn-xs { min-height:32px; padding:.36rem .62rem; border-radius:9px; font-size:.75rem; }
.btn { min-height:42px; border-radius:12px; }
.btn-lg { min-height:50px; border-radius:14px; }
.btn-primary { background:linear-gradient(135deg,#08a94f,#12c864); box-shadow:0 10px 24px rgba(8,169,79,.20); }
.btn-primary:hover { transform:translateY(-1px); }
.btn-outline { background:#fff; border-color:#d8e1dd; }
.text-button { font-weight:800; }
.status-pill, .checkin-status-pill, .saved-pill-badge, .payment-method-tag, .sub-banner-badge, .badge-count {
  display:inline-flex; align-items:center; gap:.35rem; width:max-content; max-width:100%;
  padding:.35rem .6rem; border-radius:999px; background:#f0f4f2; color:#54645d; font-size:.72rem; font-weight:800;
}
.status-pill.active, .checkin-status-pill.active, .saved-pill-badge { background:#e7f8ee; color:#08783c; }
.status-pill.pending, .status-pill.warning { background:#fff4d9; color:#8a5a00; }
.status-pill.suspended, .status-pill.danger { background:#feeceb; color:#b42318; }

/* -------------------------------------------------------------------------- */
/* Cards / groups                                                              */
/* -------------------------------------------------------------------------- */
.card, .coach-panel-card, .dash-panel, .dash-progression-card, .react-settings,
.admin-panel-box, .admin-panel, .dossier-content-panel, .assessment-card-dossier,
.client-access-info-card, .client-payment-history-card, .tracking-history-section,
.client-programs-list-section, .client-nutrition-list-section, .alert-panel {
  border:1px solid rgba(7,27,49,.08);
  border-radius:var(--leti-radius);
  background:#fff;
  box-shadow:var(--leti-shadow);
}
.coach-panel-card, .dash-panel, .dash-progression-card, .admin-panel-box, .admin-panel,
.dossier-content-panel, .assessment-card-dossier, .client-access-info-card,
.client-payment-history-card, .tracking-history-section,
.client-programs-list-section, .client-nutrition-list-section, .alert-panel { padding:1.25rem; }
.empty-state-panel, .empty-inline-notice, .empty-chat-state, .empty-search-state {
  display:grid; place-items:center; gap:.55rem; min-height:120px; padding:1.35rem;
  border:1px dashed #cdd9d3; border-radius:16px; color:var(--leti-muted); background:#fbfdfc; text-align:center;
}
.empty-icon { font-size:2rem; opacity:.65; }
.empty-sub { color:var(--leti-muted); font-size:.82rem; }
.notice-banner, .alert-panel {
  padding:.9rem 1rem; border-radius:13px; border:1px solid #dce5e1; background:#f8fbf9; color:#334a40;
}
.notice-banner.success { background:#e9f8ef; border-color:#bce7cd; color:#08783c; }
.notice-banner.warning { background:#fff7e6; border-color:#f1d7a0; color:#815400; }
.notice-banner.danger, .notice-banner.error { background:#fff0ef; border-color:#f4c3bf; color:#b42318; }

/* -------------------------------------------------------------------------- */
/* Section switcher / accordions                                               */
/* -------------------------------------------------------------------------- */
.section-switcher {
  padding:.45rem;
  border:1px solid rgba(7,27,49,.08);
  border-radius:18px;
  background:rgba(255,255,255,.82);
  box-shadow:0 8px 24px rgba(7,27,49,.04);
}
.section-switcher-desktop { gap:.35rem; }
.section-switcher-btn { border-radius:13px; padding:.82rem .9rem; }
.section-switcher-btn.active { color:#fff; background:var(--leti-ink); box-shadow:0 10px 22px rgba(7,27,49,.16); }
.section-switcher-hint { padding-top:.2rem; }
.ux-expandable { overflow:hidden; border:1px solid rgba(7,27,49,.08); border-radius:18px; background:#fff; box-shadow:0 8px 26px rgba(7,27,49,.04); }
.ux-expandable > summary { min-height:68px; padding:1rem 1.1rem; }
.ux-expandable[open] > summary { background:#fbfdfc; }
.ux-expandable-content { padding:0 1rem 1rem; }
.ux-hub-content { width:100%; min-width:0; }

/* -------------------------------------------------------------------------- */
/* Form system                                                                 */
/* -------------------------------------------------------------------------- */
.react-form, .admin-editor-form, .assign-form, .assign-mini-form, .coach-create-client-form,
.checkin-entry-form, .checkin-express-form, .wa-dispatcher-form, .shopping-list-builder {
  display:grid; gap:1rem;
}
.react-form label, .admin-editor-form label, .assign-form label, .assign-mini-form label,
.coach-create-client-form label, .checkin-entry-form label, .wa-dispatcher-form label,
.onboarding-field, .highlight-field {
  display:grid; gap:.38rem; color:#334155; font-size:.8rem; font-weight:800;
}
.form-input, .react-form input, .react-form select, .react-form textarea,
.admin-editor-form input, .admin-editor-form select, .admin-editor-form textarea,
.assign-form input, .assign-form select, .assign-form textarea,
.assign-mini-form input, .assign-mini-form select, .assign-mini-form textarea,
.coach-create-client-form input, .coach-create-client-form select, .coach-create-client-form textarea,
.admin-panel-box input, .admin-panel-box select, .admin-panel-box textarea,
.onboarding-field input, .onboarding-field select, .onboarding-field textarea,
.search-input, .gram-input-box input, .meal-title-input, .meal-time-input,
.wo-title-field, .wo-duration-field, .inspector-date-picker {
  width:100%; min-height:48px; padding:.75rem .85rem;
  border:1px solid #d8e1dd; border-radius:12px; background:#fff; color:var(--leti-ink); font:inherit;
  box-shadow:0 1px 2px rgba(7,27,49,.02);
}
textarea.form-input, .react-form textarea, .admin-editor-form textarea, .onboarding-field textarea { min-height:100px; resize:vertical; }
.form-input:focus, .react-form input:focus, .react-form select:focus, .react-form textarea:focus,
.admin-editor-form input:focus, .admin-editor-form select:focus, .admin-editor-form textarea:focus,
.onboarding-field input:focus, .onboarding-field select:focus, .onboarding-field textarea:focus,
.search-input:focus {
  outline:none; border-color:var(--leti-green); box-shadow:0 0 0 4px rgba(8,169,79,.10);
}
.form-split, .form-row-2, .two-col { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }
.form-grid-three, .three-col { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1rem; }
.form-grid-four { gap:1rem; }
.grid-span-two { grid-column:span 2; }
.form-legend { margin-top:.2rem; color:var(--leti-ink); font-size:.8rem; font-weight:900; letter-spacing:.07em; text-transform:uppercase; }
.form-actions-row, .editor-actions, .reply-editor-actions, .sub-panel-actions { display:flex; flex-wrap:wrap; gap:.7rem; align-items:center; }
.checkbox-field, .check-box-label, .checkbox-card {
  display:flex !important; align-items:flex-start; gap:.7rem !important; min-height:48px; padding:.8rem .9rem;
  border:1px solid #dce5e1; border-radius:13px; background:#fbfdfc; color:var(--leti-ink); font-weight:700;
}
.checkbox-field input[type=checkbox], .check-box-label input[type=checkbox], .checkbox-card input[type=checkbox] {
  flex:0 0 auto; width:19px; height:19px; min-height:19px; margin-top:2px; accent-color:var(--leti-green);
}
.role-selector { min-height:38px; padding:.45rem .6rem; border:1px solid #d8e1dd; border-radius:9px; background:#fff; }

/* -------------------------------------------------------------------------- */
/* Auth                                                                        */
/* -------------------------------------------------------------------------- */
.react-auth { min-height:100dvh; }
.auth-private-note { margin-top:1rem; padding:1rem; border-radius:14px; background:#f7faf8; border:1px solid #dfe8e3; }
.auth-private-note strong { display:block; color:var(--leti-ink); margin-bottom:.25rem; }
.auth-private-note p { margin:0; }

/* -------------------------------------------------------------------------- */
/* Client dashboard                                                            */
/* -------------------------------------------------------------------------- */
.client-dashboard { display:flex; flex-direction:column; gap:1.05rem; }
.client-dash-header { padding:.3rem 0; }
.dash-greeting h1 { margin:.3rem 0 .3rem; }
.dash-badge { display:inline-flex; padding:.35rem .6rem; border-radius:999px; background:var(--leti-green-soft); color:var(--leti-green-dark); font-size:.72rem; font-weight:900; letter-spacing:.08em; text-transform:uppercase; }
.dash-sub-pill { display:flex; align-items:center; gap:.7rem; min-width:230px; padding:.8rem 1rem; border:1px solid #dce5e1; border-radius:16px; background:#fff; box-shadow:0 8px 24px rgba(7,27,49,.05); text-align:left; }
.sub-pill-text { display:grid; flex:1; }
.sub-pill-text small { color:var(--leti-muted); }
.sub-arrow { color:var(--leti-green); font-size:1.25rem; }
.status-flow-grid { gap:.75rem; }
.status-flow-grid > div { min-height:104px; display:flex; flex-direction:column; justify-content:center; border-color:#e0e8e4; }
.today-support-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }
.dash-alert-card { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:1rem; align-items:center; padding:1rem 1.1rem; border:1px solid #dfe7e3; border-radius:16px; background:#fff; }
.dash-alert-card.highlight { border-color:#bde6cc; background:linear-gradient(135deg,#f1fbf5,#fff); }
.alert-icon { font-size:1.5rem; }
.alert-body h3 { margin:0 0 .2rem; }
.alert-body p { margin:0; }
.dash-action-card { width:100%; display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:1rem; align-items:center; padding:1.15rem; border-radius:18px; color:#fff; background:linear-gradient(120deg,#071b31,#0b314d); box-shadow:0 16px 36px rgba(7,27,49,.18); text-align:left; }
.action-workout { background:linear-gradient(120deg,#087d42,#0fbd5d); }
.action-icon-circle { display:grid; place-items:center; width:48px; height:48px; border-radius:14px; background:rgba(255,255,255,.14); font-size:1.3rem; }
.action-content { display:grid; gap:.15rem; }
.action-label { font-size:.7rem; opacity:.75; font-weight:900; letter-spacing:.08em; text-transform:uppercase; }
.action-btn-arrow { font-weight:900; }
.dash-checkin-express-card { padding:1.2rem; border:1px solid rgba(7,27,49,.08); border-radius:20px; background:#fff; box-shadow:var(--leti-shadow); }
.express-head { margin-bottom:.85rem; }
.express-head h2 { margin:.15rem 0 0; }
.express-sliders-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.8rem; }
.express-rating-row { padding:.85rem; border:1px solid #e1e8e4; border-radius:14px; background:#fafcfb; }
.rating-label { display:block; margin-bottom:.6rem; color:var(--leti-ink); font-weight:800; }
.emoji-rating-buttons { display:flex; flex-wrap:wrap; gap:.35rem; }
.rating-emoji-btn { width:42px; height:42px; border:1px solid #dce4e0; border-radius:12px; background:#fff; font-size:1rem; }
.rating-emoji-btn.active { color:#fff; border-color:var(--leti-green); background:var(--leti-green); transform:translateY(-1px); }
.express-pain-row { display:grid; gap:.65rem; }
.checkin-footer-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:.7rem; align-items:center; }
.checkin-summary-pills { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.65rem; }
.checkin-metric-pill, .kpi-pill { display:flex; gap:.65rem; align-items:center; padding:.75rem; border:1px solid #e0e8e4; border-radius:14px; background:#fff; }
.checkin-metric-pill small { display:block; color:var(--leti-muted); }
.checkin-metric-pill.alert { border-color:#f0c7c3; background:#fff7f6; }
.metric-icon { font-size:1.2rem; }
.checkin-coach-tip { grid-column:1 / -1; padding:.8rem 1rem; border-left:4px solid var(--leti-green); border-radius:12px; background:#f0faf4; }
.checkin-toast-banner { padding:.75rem .9rem; margin-bottom:.75rem; border-radius:12px; background:#ecf9f1; color:#08783c; font-weight:700; }
.dash-grid-two { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }
.panel-header, .progression-head, .feedback-head { display:flex; justify-content:space-between; align-items:center; gap:1rem; }
.panel-list { display:grid; gap:.65rem; margin-top:.75rem; }
.panel-item { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:.75rem; align-items:center; padding:.75rem; border-radius:13px; background:#f9fbfa; }
.highlight-item { background:#eef9f2; }
.item-icon { font-size:1.25rem; }
.coach-feedback-box { padding:.9rem; border:1px solid #e0e7e3; border-radius:14px; background:#fbfcfb; }
.feedback-avatar { width:38px; height:38px; border-radius:11px; object-fit:cover; }
.feedback-quote { margin:.75rem 0 0; color:#42554c; font-size:.88rem; line-height:1.6; }
.progression-stats-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.75rem; margin-top:1rem; }
.prog-stat { padding:1rem; border:1px solid #e0e7e3; border-radius:14px; background:#fbfcfb; }
.prog-stat strong { display:block; margin-top:.25rem; font:800 1.6rem/1 var(--font-heading); }

/* -------------------------------------------------------------------------- */
/* Client programs / nutrition / tracking / messages                           */
/* -------------------------------------------------------------------------- */
.client-programs-view, .food-tracker-page, .tracking-page, .messages-page { display:flex; flex-direction:column; gap:1rem; min-width:0; }
.program-tab-content { display:grid; gap:1rem; }
.hero-meta { display:flex; flex-wrap:wrap; gap:.5rem; align-items:center; color:var(--leti-muted); }
.nutrition-hero, .assigned-program-hero { padding:1.35rem; border:1px solid #dfe7e3; border-radius:20px; background:#fff; box-shadow:var(--leti-shadow); }
.week-workouts-container { display:grid; gap:.8rem; margin-top:1rem; }
.client-floating-toast { position:fixed; right:1rem; bottom:1rem; z-index:999; padding:.8rem 1rem; border-radius:12px; background:var(--leti-ink); color:#fff; box-shadow:var(--leti-shadow-strong); }

.search-input-wrap { position:relative; width:100%; }
.search-input { padding-left:2.5rem; }
.search-input-wrap::before { content:'⌕'; position:absolute; left:.85rem; top:50%; transform:translateY(-50%); color:#87948e; z-index:1; }
.food-search-modal, .replace-modal, .receipt-view-modal, .client-access-modal { background:#fff; }
.food-modal-tabs { gap:.4rem; }
.food-tab-btn { border-radius:11px; }
.empty-search-state { min-height:180px; }
.gram-field { display:grid; gap:.35rem; }
.gram-input-box { display:flex; align-items:center; gap:.5rem; }
.macro-name { font-weight:900; color:var(--leti-ink); }
.macro-values { display:flex; gap:.5rem; flex-wrap:wrap; }
.protein { color:#08783c; }
.carbs { color:#9a5c00; }
.fat { color:#8c3f7c; }
.habits-checklist { display:grid; gap:.55rem; }
.habits-mode { display:flex; flex-wrap:wrap; gap:.5rem; }
.tab-explainer, .premium-note { padding:.8rem .9rem; border-radius:12px; background:#f4f8f6; color:#586a62; font-size:.82rem; }
.highlight-field { padding:.85rem; border:1px solid #cde5d6; border-radius:13px; background:#f2fbf6; }
.highlight-text { color:#08783c; font-weight:800; }

.tracking-history-section { display:grid; gap:1rem; }
.comp-head, .inspector-head, .meal-builder-head, .offer-head, .panel-head, .sub-panel-header {
  display:flex; align-items:flex-start; justify-content:space-between; gap:1rem;
}
.inspector-summary-box { padding:.85rem; border:1px solid #dfe7e3; border-radius:13px; background:#fafcfb; }
.metrics-pill-grid { display:flex; flex-wrap:wrap; gap:.5rem; }

.empty-chat-state { min-height:260px; }
.coach-reply-editor, .coach-existing-comment, .coach-prev-feedback { padding:.9rem; border:1px solid #dfe7e3; border-radius:14px; background:#fafcfb; }
.quick-reply-grid { margin-top:.65rem; }

/* -------------------------------------------------------------------------- */
/* Cycle modal — real React component (V10 removes V9 runtime hijack)           */
/* -------------------------------------------------------------------------- */
.cycle-profile-modal-backdrop {
  position:fixed !important; inset:0 !important; z-index:120000 !important;
  display:flex !important; align-items:center !important; justify-content:center !important;
  padding:clamp(.75rem,2vw,1.5rem) !important; overflow:auto !important;
  background:rgba(3,16,27,.78) !important; backdrop-filter:blur(12px) saturate(80%);
}
.cycle-profile-modal {
  width:min(100%,880px) !important; max-width:880px !important; max-height:calc(100dvh - 2rem) !important;
  padding:0 !important; overflow:auto !important; border:1px solid rgba(255,255,255,.45) !important;
  border-radius:24px !important; background:#fff !important; box-shadow:0 36px 110px rgba(3,16,27,.45) !important;
}
.cycle-profile-modal-head { padding:1.4rem 1.5rem 1rem !important; background:#fff !important; border-bottom:1px solid #e7ece9; }
.cycle-profile-modal-head h2 { font-size:2.15rem; margin:.15rem 0 .35rem; }
.cycle-profile-form { gap:1rem; padding:1.2rem 1.5rem 0; }
.cycle-profile-intro-card { border-color:#cfe5d7; background:linear-gradient(135deg,#f1fbf5,#fff); }
.cycle-profile-intro-icon { background:#daf4e4; color:#08783c; }
.cycle-enable-box, .cycle-consent-box {
  display:flex; align-items:flex-start; gap:.8rem; padding:1rem; border:1px solid #dce6e1; border-radius:15px; background:#fbfdfc;
}
.cycle-enable-box input, .cycle-consent-box input { flex:0 0 auto; width:20px; height:20px; margin-top:2px; accent-color:var(--leti-green); }
.cycle-enable-box span { display:grid; gap:.2rem; }
.cycle-enable-box small { color:var(--leti-muted); }
.cycle-profile-grid.three { gap:1rem; }
.cycle-profile-grid.two { gap:1rem; }
.cycle-symptom-fieldset { padding:1rem; }
.cycle-symptom-chip { min-height:40px; }
.cycle-profile-actions { background:#fff; }

/* -------------------------------------------------------------------------- */
/* Subscription / access                                                       */
/* -------------------------------------------------------------------------- */
.client-access-modal { width:min(100%,760px) !important; }
.client-access-info-card { display:grid; gap:.75rem; }
.client-payment-history-card { display:grid; gap:.75rem; }
.sub-banner-details { display:grid; gap:.2rem; }
.sub-info { display:grid; gap:.2rem; }
.receipt-view-modal { width:min(100%,660px) !important; }
.payment-method-tag { background:#f4f7f5; }

/* -------------------------------------------------------------------------- */
/* Workout runner                                                              */
/* -------------------------------------------------------------------------- */
.workout-runner-screen, .active-screen { min-height:100dvh; background:#f5f8f6; }
.runner-progress-info { display:flex; justify-content:space-between; gap:1rem; align-items:center; }
.runner-phase-tag { display:inline-flex; padding:.35rem .55rem; border-radius:999px; color:#08783c; background:#e8f8ee; font-size:.72rem; font-weight:900; }
.exercise-video-box { overflow:hidden; border-radius:18px; background:#061827; }
.exercise-video-box video { display:block; width:100%; max-height:62dvh; background:#061827; }
.exercise-video-placeholder { min-height:260px; display:grid; place-items:center; color:rgba(255,255,255,.72); background:#061827; }
.exercise-cues-content { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }
.cues-column, .mistakes-column { padding:1rem; border:1px solid #dfe6e2; border-radius:15px; background:#fff; }
.cue-breathing, .cue-variant { padding:.75rem; border-radius:12px; background:#f4f8f6; }
.adaptation-checkbox-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.6rem; }
.replace-exercise-trigger { width:100%; margin-top:.75rem; }
.replace-alternatives-title { margin-bottom:.75rem; }
.replace-reason-select { width:100%; min-height:46px; }
.modal-actions-stacked { display:grid; gap:.65rem; }
.cand-info { display:grid; gap:.15rem; }
.briefing { padding:1rem; border-left:4px solid var(--leti-green); border-radius:14px; background:#f0faf4; }
.briefing-desc { margin-top:.3rem; }

/* -------------------------------------------------------------------------- */
/* Coach workspace                                                             */
/* -------------------------------------------------------------------------- */
.coach-shell { background:#f4f7f6; }
.coach-sidebar { background:linear-gradient(180deg,#082235,#061a2c); }
.coach-view-head { padding-bottom:.4rem; }
.coach-action-item, .coach-list-item, .apt-card, .log-entry-item, .version-row {
  border:1px solid #dfe7e3; border-radius:14px; background:#fff;
}
.coach-action-item, .coach-list-item, .apt-card, .log-entry-item { padding:.9rem; }
.action-main-text, .item-main-info { min-width:0; }
.action-client-mark { display:inline-flex; padding:.25rem .5rem; border-radius:999px; color:#08783c; background:#eaf8ef; font-size:.68rem; font-weight:900; }
.coach-card-actions, .item-action-btns, .dossier-header-actions, .coach-sidebar-actions, .admin-sidebar-actions { display:flex; flex-wrap:wrap; gap:.5rem; }
.coach-checkins-stack, .coach-items-list, .reminder-logs-list { display:grid; gap:.7rem; }
.chk-metrics-row, .log-metrics-brief { display:flex; flex-wrap:wrap; gap:.45rem; }
.chk-notes-body, .log-comment { margin-top:.55rem; color:var(--leti-muted); line-height:1.55; }
.coach-logs-table { width:100%; border-collapse:collapse; }
.coach-logs-table th, .coach-logs-table td { padding:.7rem; border-bottom:1px solid #e7ece9; text-align:left; vertical-align:top; }
.coach-prev-feedback, .coach-existing-comment { margin-top:.6rem; }
.dossier-email, .log-phone, .notes-italic { color:var(--leti-muted); font-size:.8rem; }
.dossier-tags { display:flex; flex-wrap:wrap; gap:.4rem; }
.apt-head { display:flex; justify-content:space-between; gap:.7rem; }
.apt-date { color:#08783c; font-weight:900; }
.appointments-cards-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.75rem; }

/* Program / nutrition builders */
.editor-weeks-flow, .workouts-builder-list, .exercises-builder-stack, .meals-builder-list { display:grid; gap:.85rem; }
.editor-week-block, .week-builder-section, .workout-builder-card, .meal-builder-card {
  padding:1rem; border:1px solid #dfe7e3; border-radius:16px; background:#fafcfb;
}
.editor-desc { color:var(--leti-muted); }
.editor-actions { justify-content:flex-end; }
.wo-builder-top, .meal-builder-head { display:flex; justify-content:space-between; gap:1rem; align-items:flex-start; }
.wo-title-inputs { display:grid; grid-template-columns:minmax(0,1fr) 170px; gap:.7rem; flex:1; }
.wo-phases-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.7rem; margin-top:.8rem; }
.wo-exercises-container { margin-top:1rem; }
.wo-exercises-title { display:flex; justify-content:space-between; gap:.7rem; align-items:center; margin-bottom:.65rem; }
.exercise-picker-row { display:grid; grid-template-columns:34px minmax(180px,1.2fr) minmax(180px,1fr) minmax(220px,1.1fr) auto; gap:.55rem; align-items:start; padding:.7rem; border:1px solid #e1e8e4; border-radius:13px; background:#fff; }
.ex-order-num { display:grid; place-items:center; width:30px; height:30px; border-radius:9px; background:var(--leti-ink); color:#fff; font-weight:900; }
.ex-select-cell, .ex-metrics-cell, .ex-cues-cell { display:grid; gap:.45rem; }
.danger-icon-btn { display:grid; place-items:center; min-width:34px; width:34px; height:34px; padding:0; color:#b42318; border:1px solid #f0c9c5; border-radius:9px; background:#fff6f5; }
.meal-title-group { display:grid; grid-template-columns:minmax(0,1fr) 130px; gap:.6rem; flex:1; }
.shopping-list-builder { padding:.9rem; border:1px solid #dfe7e3; border-radius:14px; background:#fff; }

/* Exercise manager */
.coach-card-actions { align-items:center; }
.exercise-media-upload-card { min-width:0; }

/* -------------------------------------------------------------------------- */
/* Admin                                                                       */
/* -------------------------------------------------------------------------- */
.admin-section-view { display:flex; flex-direction:column; gap:1rem; min-width:0; }
.admin-sidebar-actions { margin-top:auto; }
.admin-panel-box { display:grid; gap:.9rem; }
.admin-table-wrap { width:100%; overflow:auto; border:1px solid #e0e7e3; border-radius:16px; background:#fff; box-shadow:var(--leti-shadow); }
.admin-table { width:100%; min-width:760px; border-collapse:collapse; }
.admin-table th { position:sticky; top:0; z-index:1; padding:.8rem; color:#52645b; background:#f6f9f7; font-size:.72rem; text-transform:uppercase; letter-spacing:.06em; text-align:left; }
.admin-table td { padding:.8rem; border-top:1px solid #edf1ef; vertical-align:top; }
.offer-head { align-items:center; }
.offer-summary { color:var(--leti-muted); }
.table-action-stack { gap:.4rem; }

/* -------------------------------------------------------------------------- */
/* Misc utilities / detailed content                                           */
/* -------------------------------------------------------------------------- */
.challenge-icon { font-size:1.3rem; }
.premium-note { border-left:4px solid #8b5b7d; }
.pain-alert-box { padding:.85rem; border:1px solid #f0c7c3; border-radius:13px; background:#fff5f4; }
.pain-alert-text { color:#9f241c; }
.step-note { margin-top:.6rem; color:var(--leti-muted); font-size:.8rem; }
.replace-modal { width:min(100%,700px) !important; }
.highlight-field { box-shadow:0 8px 20px rgba(8,169,79,.04); }
.log-date { color:#08783c; font-weight:900; }
.log-meta-right { display:grid; gap:.2rem; justify-items:end; color:var(--leti-muted); font-size:.78rem; }
.comp-head { margin-bottom:.75rem; }
.wa-dispatch-success-box { padding:.8rem; border-radius:12px; background:#e9f8ef; color:#08783c; }

/* -------------------------------------------------------------------------- */
/* Modal system global                                                         */
/* -------------------------------------------------------------------------- */
.modal-overlay.active, .react-modal-overlay {
  background:rgba(3,16,27,.76) !important; backdrop-filter:blur(12px) saturate(82%) !important;
}
.modal-content, .react-modal {
  color:var(--leti-ink); background:#fff !important; border:1px solid rgba(255,255,255,.5) !important;
  box-shadow:var(--leti-shadow-strong) !important;
}
.modal-close-btn {
  display:grid; place-items:center; flex:0 0 auto; width:42px; height:42px;
  border-radius:50%; color:var(--leti-ink); background:#f1f5f3; font-size:1rem;
}
.modal-close-btn:hover { background:#e7eeea; }
.modal-footer-actions { display:flex; justify-content:flex-end; gap:.7rem; }

/* -------------------------------------------------------------------------- */
/* Responsive                                                                  */
/* -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .progression-stats-grid, .checkin-summary-pills { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .exercise-picker-row { grid-template-columns:34px minmax(160px,1fr) minmax(180px,1fr); }
  .ex-cues-cell { grid-column:2 / -1; }
  .danger-icon-btn { grid-column:1; }
  .appointments-cards-grid { grid-template-columns:1fr; }
}

@media (max-width: 900px) {
  .app-main { padding-inline:1rem; }
  .today-support-grid, .dash-grid-two, .express-sliders-grid { grid-template-columns:1fr; }
  .form-grid-three, .three-col { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .wo-phases-grid { grid-template-columns:1fr; }
  .checkin-footer-row { grid-template-columns:1fr; }
  .exercise-picker-row { grid-template-columns:34px minmax(0,1fr); }
  .ex-metrics-cell, .ex-cues-cell { grid-column:2; }
  .danger-icon-btn { grid-column:1; grid-row:2; }
}

@media (max-width: 720px) {
  body { background:#f7f9f8; }
  .app-header { min-height:58px; padding:.5rem .75rem; }
  .brand-logo-img { height:32px; }
  .header-sub-pill { min-height:36px; padding:.45rem .6rem; font-size:.76rem; }
  .user-badge { padding-right:.45rem; }
  .user-badge > span { display:none; }
  .app-main { padding:.85rem .75rem calc(var(--mobile-nav-height) + 1.3rem); }
  .local-mode-notice.server-sync-notice { font-size:.72rem; }
  .react-page-head, .coach-view-head, .admin-view-head { margin-bottom:.9rem; }
  .react-page-head h1, .coach-view-head h1, .admin-view-head h1 { font-size:2rem; }
  .section-switcher { padding:.35rem; }
  .form-split, .form-row-2, .two-col, .form-grid-three, .three-col, .form-grid-four { grid-template-columns:1fr !important; }
  .grid-span-two { grid-column:auto; }
  .dash-alert-card, .dash-action-card, .panel-item { grid-template-columns:auto minmax(0,1fr); }
  .dash-alert-card > .btn, .dash-action-card .action-btn-arrow, .panel-item > .btn { grid-column:1 / -1; width:100%; }
  .dash-sub-pill { width:100%; min-width:0; }
  .checkin-summary-pills, .progression-stats-grid { grid-template-columns:1fr 1fr; }
  .progression-stats-grid { gap:.55rem; }
  .coach-panel-card, .dash-panel, .dash-progression-card, .admin-panel-box, .admin-panel { padding:1rem; border-radius:16px; }
  .cycle-profile-modal-backdrop { align-items:flex-end !important; padding:0 !important; }
  .cycle-profile-modal { width:100% !important; max-width:100% !important; max-height:96dvh !important; border-radius:22px 22px 0 0 !important; }
  .cycle-profile-modal-head { padding:1rem !important; }
  .cycle-profile-modal-head h2 { font-size:1.9rem; }
  .cycle-profile-form { padding:1rem 1rem 0; }
  .cycle-profile-actions { flex-direction:column-reverse; margin-inline:-1rem; padding:1rem calc(1rem + env(safe-area-inset-right)) calc(1rem + env(safe-area-inset-bottom)); }
  .cycle-profile-actions .btn { width:100%; }
  .modal-footer-actions { flex-direction:column-reverse; }
  .modal-footer-actions .btn { width:100%; }
  .wo-title-inputs, .meal-title-group { grid-template-columns:1fr; }
  .adaptation-checkbox-grid, .exercise-cues-content { grid-template-columns:1fr; }
  .admin-table { min-width:680px; }
}

@media (max-width: 480px) {
  .header-sub-pill > span:last-child { display:none; }
  .header-sub-pill { width:38px; justify-content:center; padding:0; }
  .checkin-summary-pills, .progression-stats-grid { grid-template-columns:1fr; }
  .emoji-rating-buttons { justify-content:space-between; }
  .rating-emoji-btn { flex:1; min-width:38px; }
  .mobile-bottom-nav { padding-bottom:env(safe-area-inset-bottom); height:calc(var(--mobile-nav-height) + env(safe-area-inset-bottom)); }
}

/* Coverage finale des composants détectés sans règle dédiée */
.client-smart-hub { display:flex; flex-direction:column; gap:1rem; min-width:0; }
.editor-workouts-list, .editor-wo-item, .meals-preview-list { display:grid; gap:.75rem; }
.editor-wo-item, .meal-preview-box { padding:.85rem; border:1px solid #dfe7e3; border-radius:13px; background:#fff; }
.item-title-row, .tmpl-card-head, .tmpl-card-footer { display:flex; justify-content:space-between; align-items:center; gap:.7rem; }
.prog-weeks-summary { display:flex; flex-wrap:wrap; gap:.45rem; margin:.7rem 0; }
.template-details-col { display:grid; gap:.45rem; min-width:0; }
.tmpl-level, .week-tag { display:inline-flex; width:max-content; padding:.28rem .5rem; border-radius:999px; background:#edf7f1; color:#08783c; font-size:.7rem; font-weight:900; }
.whatsapp-grid-two { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }
.macro-values .p, .macro-values .c, .macro-values .f,
.p, .c, .f { font-weight:800; }
@media (max-width:720px){ .whatsapp-grid-two { grid-template-columns:1fr; } }

/* Final layout harmonization after full visual audit */
.ux-focus-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; align-items:start; }
.cycle-status-card, .cycle-adaptation-panel {
  width:100%; min-width:0; min-height:180px; padding:1.15rem;
  border:1px solid #dfe7e3; border-left:5px solid var(--cycle-color,#846c79); border-radius:18px;
  background:#fff; box-shadow:var(--leti-shadow);
}
.cycle-status-card { display:grid; grid-template-columns:52px minmax(0,1fr); gap:1rem; align-items:start; }
.cycle-status-card > .btn, .cycle-status-card .cycle-actions { grid-column:1 / -1; }
.cycle-empty > .btn { justify-self:start; width:auto; min-width:0; }
.cycle-phase-icon { display:grid; place-items:center; width:48px; height:48px; border-radius:14px; background:#f2f5f4; font-size:1.4rem; }
.cycle-phase-icon.small { width:38px; height:38px; font-size:1.05rem; }
.cycle-status-main { min-width:0; }
.cycle-status-main h3, .cycle-adaptation-panel h3 { margin:.2rem 0 .4rem; }
.cycle-status-main p, .cycle-adaptation-panel p { margin:0; line-height:1.55; }
.cycle-meta-row { display:flex; flex-wrap:wrap; gap:.55rem 1rem; margin-top:.8rem; color:var(--leti-muted); font-size:.77rem; }
.cycle-confidence { display:block; margin-top:.5rem; color:#7b8881; }
.cycle-actions { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:.55rem; align-items:end; padding-top:.85rem; border-top:1px solid #e7ece9; }
.cycle-actions label { display:grid; gap:.3rem; color:#52645b; font-size:.75rem; font-weight:800; }
.cycle-actions input { min-height:42px; padding:.55rem .7rem; border:1px solid #d8e1dd; border-radius:10px; }
.cycle-actions .link-button { grid-column:1 / -1; justify-self:start; color:var(--leti-green-dark); font-weight:800; }
.cycle-adaptation-panel header { display:flex; gap:.75rem; align-items:center; margin-bottom:.85rem; }
.cycle-adaptation-panel ul { margin:.8rem 0 .8rem 1.1rem; color:#4f6259; }
.cycle-adaptation-panel li { margin:.35rem 0; }
.cycle-adaptation-panel > small { display:block; padding-top:.75rem; border-top:1px solid #e9eeeb; color:#7c8983; line-height:1.5; }

/* Any unscoped native field in the application must still look intentional. */
#app input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]),
#app select,
#app textarea {
  font:inherit;
  color:var(--leti-ink);
  background:#fff;
  border:1px solid #d8e1dd;
  border-radius:11px;
}
#app input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]):focus,
#app select:focus,
#app textarea:focus {
  outline:none;
  border-color:var(--leti-green);
  box-shadow:0 0 0 3px rgba(8,169,79,.10);
}
#app input[type="file"] { padding:.55rem; background:#f9fbfa; }
#app table { border-collapse:collapse; }
#app th { font-weight:800; }

@media (max-width:900px){
  .ux-focus-grid { grid-template-columns:1fr; }
}
@media (max-width:720px){
  .cycle-status-card { grid-template-columns:44px minmax(0,1fr); padding:1rem; }
  .cycle-phase-icon { width:42px; height:42px; }
  .cycle-actions { grid-template-columns:1fr; }
  .cycle-actions .btn, .cycle-actions .link-button { width:100%; justify-content:center; }
}


/* V13 — Empty cycle card layout fix */
.cycle-status-card.cycle-empty {
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  align-items:center !important;
  gap:1.25rem !important;
  min-height:0 !important;
  padding:1.35rem 1.5rem !important;
  background:linear-gradient(135deg,#ffffff 0%,#fbf8fa 100%) !important;
}
.cycle-status-card.cycle-empty .cycle-phase-icon { display:none !important; }
.cycle-status-card.cycle-empty > div:not(.cycle-phase-icon) {
  grid-column:1 !important;
  grid-row:1 !important;
  min-width:0 !important;
  width:auto !important;
  max-width:760px;
}
.cycle-status-card.cycle-empty .eyebrow {
  display:inline-flex !important;
  width:max-content;
  max-width:100%;
  margin-bottom:.45rem;
  padding:.28rem .55rem;
  border-radius:999px;
  background:#f3edf1;
  color:#775b6d;
  font-size:.7rem;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  overflow-wrap:normal;
  word-break:normal;
}
.cycle-status-card.cycle-empty h3 {
  margin:0 0 .35rem !important;
  font-size:clamp(1.2rem,2vw,1.55rem) !important;
  line-height:1.15 !important;
  max-width:34ch;
  overflow-wrap:normal !important;
  word-break:normal !important;
  hyphens:none !important;
}
.cycle-status-card.cycle-empty p {
  margin:0 !important;
  max-width:58ch;
  color:#66756e;
  font-size:.95rem !important;
  line-height:1.55 !important;
  overflow-wrap:normal !important;
  word-break:normal !important;
  hyphens:none !important;
}
.cycle-status-card.cycle-empty > .btn {
  grid-column:2 !important;
  grid-row:1 !important;
  align-self:center;
  justify-self:end !important;
  width:auto !important;
  min-width:190px !important;
  min-height:46px;
  white-space:nowrap !important;
}
@media (max-width:760px) {
  .cycle-status-card.cycle-empty {
    grid-template-columns:minmax(0,1fr) !important;
    padding:1.1rem !important;
    gap:1rem !important;
  }
  .cycle-status-card.cycle-empty > div:not(.cycle-phase-icon),
  .cycle-status-card.cycle-empty > .btn {
    grid-column:1 !important;
  }
  .cycle-status-card.cycle-empty > div:not(.cycle-phase-icon) { grid-row:1 !important; }
  .cycle-status-card.cycle-empty > .btn {
    grid-row:2 !important;
    justify-self:stretch !important;
    width:100% !important;
    min-width:0 !important;
    white-space:normal !important;
  }
}
