/* ═══════════════════════════════════════════════════════════════════════════
   PROFIL CPTS — n'agit QUE sur les sites dont site-profile.js pose
   <html data-profil="cpts">. Partout ailleurs, aucune règle ne s'applique.

   Couleurs : variables posées par site-profile.js depuis le profil du domaine
   (--profil-couleur, --profil-couleur-foncee, --profil-couleur-claire), avec
   la couleur de CPTS SYA en repli. Chargée APRÈS redesign.css ; le sélecteur
   html[data-profil] est plus spécifique que ceux de redesign.css, ses
   !important l'emportent donc.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 1. Couleur principale ── */
html[data-profil="cpts"] {
  --primary: var(--profil-couleur, #40B4A8) !important;
  --primary-dark: var(--profil-couleur-foncee, #2E8F84) !important;
  --rd-accent: var(--profil-couleur, #40B4A8) !important;
  --chip-bg: #EAF7F5 !important;
  --chip-border: #BFE7E2 !important;
  --chip-text: var(--profil-couleur-foncee, #2E8F84) !important;
}

html[data-profil="cpts"] .btn-primary,
html[data-profil="cpts"] .btn-primary-600,
html[data-profil="cpts"] .progress-bar {
  background: linear-gradient(90deg, var(--profil-couleur, #40B4A8), var(--profil-couleur-claire, #6CC7BD)) !important;
}
html[data-profil="cpts"] .btn-primary:hover,
html[data-profil="cpts"] .btn-primary-600:hover {
  background: linear-gradient(90deg, var(--profil-couleur-foncee, #2E8F84), var(--profil-couleur, #40B4A8)) !important;
}
html[data-profil="cpts"] .btn-success:hover {
  background: var(--profil-couleur-foncee, #2E8F84) !important;
  border-color: var(--profil-couleur-foncee, #2E8F84) !important;
}

/* Boutons d'appel à l'action (« Commencer… », remerciement) : couleur CPTS */
html[data-profil="cpts"] .welcome-cta,
html[data-profil="cpts"] .thanks-btn-solid {
  background: var(--profil-couleur, #40B4A8) !important;
  box-shadow: 0 6px 20px rgba(64, 180, 168, 0.28) !important;
}
html[data-profil="cpts"] .welcome-cta:hover {
  background: var(--profil-couleur-foncee, #2E8F84) !important;
}

/* En-tête des formulaires, focus des champs, survols */
html[data-profil="cpts"] .form-header-accent {
  background: linear-gradient(90deg, var(--profil-couleur, #40B4A8), var(--profil-couleur-claire, #6CC7BD), var(--rd-ink)) !important;
}
html[data-profil="cpts"] .form-control:focus,
html[data-profil="cpts"] .form-select:focus {
  border-color: var(--profil-couleur, #40B4A8) !important;
  box-shadow: 0 0 0 3px rgba(64, 180, 168, 0.15) !important;
}
html[data-profil="cpts"] .form-check-input:checked {
  background-color: var(--profil-couleur, #40B4A8) !important;
  border-color: var(--profil-couleur, #40B4A8) !important;
}
html[data-profil="cpts"] .action-card:hover {
  border-color: rgba(64, 180, 168, 0.35) !important;
}
html[data-profil="cpts"] .table-hover > tbody > tr:hover {
  background-color: rgba(64, 180, 168, 0.06) !important;
}
html[data-profil="cpts"] ::selection {
  background: rgba(64, 180, 168, 0.2);
}

/* Bouton « Accès CPTS » (bleu en dur dans index.html) */
html[data-profil="cpts"] #acces-medecin-btn {
  background: var(--profil-couleur, #40B4A8) !important;
}
html[data-profil="cpts"] #acces-medecin-btn:hover {
  background: var(--profil-couleur-foncee, #2E8F84) !important;
}

/* ── 2. Accueil : titre « Bienvenue au cabinet » retiré ── */
html[data-profil="cpts"] #welcome-page h1.welcome-title[data-i18n="home.auto.2"] {
  display: none !important;
}

/* ── 3. Items retirés (liste itemsMasques du profil) : la carte de l'accueil
      ET la section détaillée correspondante ── */
html[data-items-masques~="preconsultation"] #welcome-page a.action-card[href="#section-preconsultation"],
html[data-items-masques~="preconsultation"] #section-preconsultation,
html[data-items-masques~="mdph"] #welcome-page a.action-card[href="#section-mdph"],
html[data-items-masques~="mdph"] #section-mdph,
html[data-items-masques~="tension"] #welcome-page a.action-card[onclick="showView('tension')"] {
  display: none !important;
}
