/* ===============================
   PREMIUM.CSS — Base / Desktop
   (fusion des styles inline + premium.css existant)
   =============================== */

/* Palette via variables (cohérente avec votre design) */
:root{
  --background: linear-gradient(to bottom, #f6f9fc, #ffffff);
  --text: #2c3e50;
  --border: #e6e9ef;
  --primary: #4a90e2;
  --primary-dark: #357ab8;
  --chip-bg: #f0f6ff;
  --chip-border: #e2ecff;
  --chip-text: #26539c;
}

/* Générales */
html, body { height: 100%; }
body {
  background: var(--background) !important;
  font-family: 'Inter', sans-serif !important;
  color: var(--text) !important;
}

/* Navbar */
.navbar {
  background: linear-gradient(to right, #f0f7ff, #ffffff) !important;
  border-bottom: 1px solid var(--border) !important;
}
.navbar img { height: 40px !important; }

/* Cartes & boutons */
.card {
  border: none !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.05) !important;
  background: #fff;
}
.btn {
  border-radius: 12px !important;
  font-weight: 500;
  padding: 10px 18px;
}

/* Boutons primaires */
.btn-primary,
.btn-primary-600 {
  background: linear-gradient(90deg, var(--primary), var(--primary-dark)) !important;
  color: #fff !important;
  border: none !important;
}
.btn-outline-primary,
.btn-outline-primary-600 {
  background: transparent !important;
  border: 2px solid var(--primary) !important;
  color: var(--primary) !important;
}

/* Form controls */
.form-control, .form-select {
  border-radius: 10px !important;
  border: 1px solid #dce3eb !important;
  padding: 10px !important;
}
label.form-label {
  font-weight: 500 !important;
  margin-bottom: 6px !important;
}

/* Progress */
.progress {
  height: 8px !important;
  border-radius: 5px;
  background-color: #eaf0f6;
}
.progress-bar {
  background: linear-gradient(90deg, var(--primary), var(--primary-dark)) !important;
  border-radius: 5px;
}

/* Loader (bloc + position) */
#loader {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255,255,255,0.9) !important;
  padding: 20px !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
  z-index: 1000;
}

/* ===============================
   Accueil & cartes "welcome"
   =============================== */

/* Section d’accueil */
#welcome-page{
  position: relative;
  min-height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 28px 18px 36px;
  text-align: center;
  overflow: auto;
  background:
    radial-gradient(800px 400px at 50% -100px, #fff5ec 0%, #ffffff 60%, #ffffff 100%),
    linear-gradient(180deg, #ffffff 0%, #ffffff 100%);
}

/* Topbar du formulaire */
.form-topbar{ display:flex; justify-content:flex-start; }
.form-topbar .btn{ padding:6px 12px; font-size:14px; border-radius:8px; }

/* Carte de bienvenue / cartes sections */
.welcome-card{
  width: 100%;
  max-width: 520px;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(8px);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  padding: 18px 16px 20px;
  border: 1px solid #f1e8e2;
  margin-bottom: 20px;
}
.welcome-note{ margin-top:10px; font-size:14px; color:#334155; }

/* Hero (image ratio 3:2, non déformée) */
.welcome-hero{
  aspect-ratio: 3 / 2;
  width: 100%;
  height: auto;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #eef2f7;
  margin-bottom: 20px;
}
.welcome-hero img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:50% 50%;
}
.welcome-hero i{ font-size:54px; color:#356ac3; }

/* Textes & CTA */
.welcome-brand{ font-weight:800; letter-spacing:.5px; color:#1f2a44; font-size:18px; }
.welcome-title{ font-size:22px; font-weight:800; color:#1f2a44; margin:6px 0 6px; }
.welcome-doctors{ font-size:14px; color:#475569; }

.welcome-cta{
  width:100%;
  margin-top:14px;
  background: linear-gradient(90deg, #4a90e2, #4a90e2);
  color:#fff !important;
  border:none !important;
  border-radius:12px !important;
  padding:12px 18px !important;
  font-size:16px !important;
  box-shadow:0 8px 20px rgba(164,71,34,0.25);
}

/* Badges */
.welcome-badges{
  display:flex; gap:8px; justify-content:center; flex-wrap:wrap; margin-top:8px;
}
.badge-chip{
  font-size:12px; padding:6px 10px; border-radius:999px;
  background: var(--chip-bg); color: var(--chip-text); border:1px solid var(--chip-border);
}

/* Grille tests (accueil échelles) */
.welcome-tests{
  margin-top:12px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}

/* Liste des médecins avec <br> conservés */
.welcome-doctors{
  margin: 28px auto 10px;
  padding-top: 16px;
  border-top: 1px dashed #e6e9ef;
  max-width: 900px;
  color:#6b7280;
  font-size: 13px;
  line-height: 1.4;
  white-space: pre-line;
  text-align: left;
  column-count: 3;
  column-gap: 20px;
}

.welcome-doctors-2{
  margin: 28px auto 10px;
  padding-top: 16px;
  border-top: 1px dashed #e6e9ef;
  max-width: 900px;
  color:#6b7280;
  font-size: 13px;
  line-height: 1.4;
  white-space: pre-line;
  text-align: center;
}


/* Affichage multi-colonnes sur desktop */
@media (min-width: 768px){
  .welcome-doctors{
    column-count: 3;
    column-gap: 20px;
    text-align: left;
  }
}

/* Tuiles d’accès rapide — version compacte, hauteurs uniformes */
.welcome-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px auto 0;
  max-width: 720px;
  align-items: stretch;          /* étire chaque item verticalement */
  grid-auto-rows: 1fr;           /* lignes de même hauteur si nouvelle rangée */
}

.action-card {
  display: flex;
  flex-direction: column;
  justify-content: center;       /* contenu centré verticalement */
  align-items: center;
  gap: 4px;
  text-decoration: none;
  background: #ffffff;
  border: 1px solid #eef2f7;
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.04);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;

  height: 100%;                  /* occupe toute la hauteur de la cellule */
  min-height: 96px;              /* assure une hauteur mini identique */
}

.action-card i   { font-size: 22px; line-height: 1; color: var(--primary); }
.action-card h3  { margin: 0; font-size: 15px; font-weight: 700; color: #1f2a44; }
.action-card p   { margin: 0; font-size: 12px; color: #475569; }

.action-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.06);
  border-color: #dbe7ff;
}



/* =========================================
   Liste des médecins en bas de page
   ========================================= */
.doctor-list{
  margin: 28px auto 10px;
  padding: 16px 0 0;
  border-top: 1px dashed #e6e9ef;
  max-width: 900px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)); /* 3 par ligne sur grand écran */
  gap: 6px 14px;
  justify-items: start;
  color:#6b7280;          /* gris doux */
  font-size: 13px;        /* plus petit que le corps de texte */
  line-height: 1.4;
}
.doctor-list span{
  white-space: nowrap;    /* évite les retours moches sur les noms */
}

/* Empêcher le multi-colonnes / la coupe dans une colonne */
.no-columns {
  column-count: 1 !important;
  column-gap: 0 !important;
}
.no-column-break {
  break-inside: avoid-column;
}

.welcome-doctors.no-columns {
  column-count: 1 !important;
  column-gap: 0 !important;
}




.dashboard-main-body{ display:flex; }
#form-container{ max-width:800px; }

.cabinet-title{ font-weight:600; }
/* Centrage du quiz sur tous les écrans */
#quiz-container {
  margin-left: auto;
  margin-right: auto;
  max-width: 520px; /* cohérent avec tes autres cartes */
  width: 100%;
  background: #fff;
}

/* Sur mobile, on retire les marges latérales qui cassent l'alignement */
@media (max-width: 767px) {
  #quiz-container {
    margin-left: 10px;
    margin-right: 10px;
  }
}
/* Centrage et largeur harmonisés du quiz */
#quiz-container{
  max-width: 520px;   /* même largeur que tes welcome-cards */
  width: 100%;
  margin: 12px auto;  /* centre horizontalement */
}
/* --- Fix “bandes grises” dans les formulaires --- */
#form-container,
#form-container .card-body,
#form-container .card-footer,
#form-container .page {
  background: #fff !important;
}

/* Évite les “trous” entre blocs (marges trop grandes) */
#form-container .page { margin: 0; padding: 0; }
#form-container .page > .mb-6:last-child,
#form-container .page > .mb-3:last-child { margin-bottom: 0; }

/* Les labels/options n’ouvrent pas de zones avec leur propre fond */
#form-container .form-check { background: transparent; }

/* Empêche tout débordement qui montrerait l’arrière-plan */
#form-container .card-body,
#form-container .card-footer {
  border-radius: 0 0 12px 12px; /* optionnel: harmonise le bas */
}

/* Le conteneur flex ne force pas une hauteur fixe : le contenu peut s'étendre et scroller */
.dashboard-main-body {
  align-items: flex-start; /* au lieu de centrer verticalement quand h-100 est appliqué */
}

/* Le contenu du formulaire peut grandir et rester scrollable */
#form-container .card-body,
#form-container .card-footer {
  overflow: visible;
}

/* === Thank You (page de fin) === */
/* Conteneur global pour centrer verticalement */
.thanks-wrap {
  min-height: 100vh;              /* prend toute la hauteur de l'écran */
  display: flex;
  align-items: center;            /* centre verticalement */
  justify-content: center;        /* centre horizontalement */
  padding: 20px;
  box-sizing: border-box;
}

.thanks-card{
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 8px 28px rgba(0,0,0,.06);
  padding: 26px 22px;
  text-align: center;
  border: 1px solid #eef2f7;
}

.thanks-icon{
  width: 96px; height: 96px;
  margin: 6px auto 10px;
  border-radius: 999px;
  background: #cfe0ff; /* bleu pâle, comme sur l’image */
  display: grid; place-items: center;
}
.thanks-icon svg{
  width: 48px; height: 48px;
  fill: #2e5b8a; /* check bleu soutenu */
}

.thanks-title{
  font-size: 40px;
  line-height: 1.1;
  margin: 6px 0 10px;
  color: #1f3b57; /* bleu foncé lisible */
  font-weight: 800;
}

.thanks-text{
  font-size: 18px;
  color: #334155;
  margin: 0 0 18px;
}

.thanks-actions{
  display: grid;
  gap: 12px;
  margin: 10px 0 12px;
}

/* Bouton contour (télécharger) */
.thanks-btn-outline{
  display: inline-block;
  border: 2px solid #2f5f8f !important;
  color: #2f5f8f !important;
  background: transparent !important;
  border-radius: 14px !important;
  padding: 12px 18px !important;
  font-weight: 600;
}

/* Bouton plein (Doctolib) */
.thanks-btn-solid{
  display: inline-block;
  background: #2f5f8f !important;
  color: #fff !important;
  border: none !important;
  border-radius: 14px !important;
  padding: 12px 18px !important;
  font-weight: 600;
}

/* Lien retour */
.thanks-back{
  margin-top: 4px;
  background: none;
  border: 0;
  color: #374151;
  font-size: 18px;
  text-decoration: none;
}
.thanks-back:hover{ text-decoration: underline; }

@media (min-width: 460px){
  .thanks-actions{
    grid-template-columns: 1fr;
  }
}

/* === Modal Avis === */
.review-overlay{
  position: fixed; inset: 0;
  background: rgba(17,24,39,.35);        /* voile sombre */
  backdrop-filter: blur(2px);
  display: grid; place-items: center;
  z-index: 9999;
}
.review-overlay.d-none{ display: none; }

.review-card{
  width: min(92vw, 360px);
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 10px 34px rgba(0,0,0,.15);
  padding: 18px 18px 20px;
  position: relative;
  text-align: center;
  border: 1px solid #eef2f7;
}

.review-close{
  position: absolute;
  top: 10px; right: 12px;
  width: 32px; height: 32px;
  border-radius: 999px; border: 0;
  background: transparent;
  font-size: 22px; line-height: 1;
  color: #6b7280; cursor: pointer;
}

.review-icon{
  width: 76px; height: 76px;
  margin: 6px auto 8px;
  border-radius: 999px;
  background: #cfe0ff;
  display: grid; place-items: center;
}
.review-icon svg{ width: 40px; height: 40px; fill: #2e5b8a; }

.review-title{
  font-size: 24px;
  color: #1f3b57;
  margin: 6px 0 8px;
  font-weight: 800;
}

.review-text{
  font-size: 16px;
  color: #374151;
  margin: 0 0 14px;
}

.review-actions{ display: grid; gap: 10px; }

/* Boutons : texte bien centré */
.review-btn-solid,
.review-btn-outline{
  display: block;
  width: 100%;
  text-align: center;
  padding: 12px 18px !important;
  border-radius: 18px !important;
  font-weight: 700;
  line-height: 1.2;
}

/* Plein (haut) */
.review-btn-solid{
  background: #2f5f8f !important;
  color: #fff !important;
  border: none !important;
}

/* Contour (bas) */
.review-btn-outline{
  background: transparent !important;
  color: #2f5f8f !important;
  border: 2px solid #2f5f8f !important;
}
/* état visuel très léger pendant la protection anti double-clic */
.btn.loading { opacity: .75; }

/* === Stars rating === */
.rating-stars {
  font-size: 28px;
  color: #f1c40f; /* jaune étoiles */
  cursor: pointer;
}
.rating-stars .star-icon {
  margin-right: 6px;
  transition: transform 0.15s ease;
}
.rating-stars .star-icon:hover {
  transform: scale(1.2);
}

.card-header {
    padding: var(--bs-card-cap-padding-y) var(--bs-card-cap-padding-x);
    margin-bottom: 0;
    color: var(--bs-card-cap-color);
    background-color: #4a90e2;
    border-bottom: var(--bs-card-border-width) solid rgb(21 195 233 / 18%);
}

/* === Ressources médicales — alignement icônes & titres === */
#res-cat-list .action-card { padding: 12px 14px; }
#res-cat-list .action-card .d-flex { align-items: center; }

#res-cat-list .res-icon{
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 32px;
  color: var(--primary);
}
#res-cat-list .res-icon i{
  font-size: 20px;
  line-height: 1;          /* évite les décalages verticaux */
  display: block;          /* baseline cohérente */
}

#res-cat-list h3{
  margin: 0;
  line-height: 1.15;
  font-size: 15px;
  font-weight: 700;
  color: #1f2a44;
}
#res-cat-list p{
  margin: 2px 0 0;
  font-size: 12px;
  color: #475569;
}
/* === Ressources médicales — alignement absolu des icônes (desktop) === */
#res-cat-list .action-card.res-cat{
  position: relative;
  display: block;
  padding: 14px 16px 14px 72px !important; /* retrait texte identique pour TOUTES les cartes */
}

#res-cat-list .action-card.res-cat .res-icon{
  position: absolute;
  left: 16px;                 /* icône collée à gauche partout */
  top: 50%;
  transform: translateY(-50%);
  width: 36px;                /* icône PLUS GRANDE sur desktop */
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--primary);
}

#res-cat-list .action-card.res-cat .res-icon i{
  font-size: 24px;            /* taille du pictogramme */
  line-height: 1;
  display: block;
}

#res-cat-list .action-card.res-cat .res-text{
  display: block;
  margin: 0 !important;
}

#res-cat-list .action-card.res-cat .res-text h3{
  margin: 0 !important;
  line-height: 1.15;
  font-size: 16px;            /* un cran lisible */
  font-weight: 800;
  color: #1f2a44;
}

#res-cat-list .action-card.res-cat .res-text p{
  margin: 2px 0 0 !important;
  font-size: 12px;
  color: #475569;
}

.form-header-modern {
  background: white;
  border-bottom: 1px solid #e5e7eb;
}

.form-header-accent {
  height: 3px;
  background: linear-gradient(90deg, #4A90E2, #667EEA, #764BA2);
}

.form-header-content {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-header-logo {
  height: 32px;
  width: auto;
  flex-shrink: 0;
}

.form-header-title {
  flex: 1;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  color: #111827;
  margin: 0;
  letter-spacing: -0.3px;
}

/* Spacer invisible pour équilibrer le centrage */
.form-header-spacer {
  width: 32px;
  flex-shrink: 0;
}

/* Responsive - très petits écrans */
@media (max-width: 360px) {
  .form-header-logo {
    height: 28px;
  }
  
  .form-header-title {
    font-size: 15px;
  }
  
  .form-header-spacer {
    width: 28px;
  }
}
