/* shared/pages/mon-psychologue.css — feuille de mon-psychologue.html, sortie de son bloc <style> le 17/10/2026 (lot 8 du dossier 1 : CSP sans
   style en ligne). Chargée par une balise <link> à la place exacte de l’ancien bloc : même ordre dans la cascade. */
/* ==============================================================================
 * Fiche psychologue — aligné sur le design Claude (Mon psychologue.html, 575 lignes
 * JSX → vanilla JS). 7 sections : breadcrumb, hero, booking semaine, about
 * (À propos + Approche + Pratiques), practice rows, formation & exp, reviews,
 * related psys.
 *
 * 2 modes d'ENTRÉE :
 *   - Par défaut (URL nue) : affiche le psy attitré (subscription)
 *   - ?psy_id=X en URL : affiche directement ce psy (depuis Consultation)
 *
 * 2 versions selon le RÔLE (déterminé via GET /patient-profile/status, robuste
 * quel que soit le mode d'entrée — y compris ?psy_id) :
 *   - PATIENT abonné (patient_abonne / patient_en_resiliation) : version pleine
 *     INCHANGÉE — créneaux, bloc prix, bandeau meta, CTAs « Prendre rendez-vous »
 *     + « Envoyer un message ».
 *   - LEAD (tout le reste : lead, patient one-shot, ex-abonné…) : version ÉPURÉE
 *     — créneaux masqués, bandeau meta masqué, bloc prix masqué ; les 2 CTAs du
 *     header deviennent « Démarrer un suivi » (principal → demarrer-suivi.html,
 *     le funnel d'abonnement) + « Envoyez un message » (secondaire →
 *     conversation.html, le funnel qui transforme). Hero / à propos / formation /
 *     avis gardés.
 * ============================================================================== */

[hidden] { display: none !important; }

.main { background: var(--bg); }
.page { max-width: 1080px; margin: 0 auto; padding: 28px 40px 60px; width: 100%; }

/* Breadcrumb */
.breadcrumb { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; margin-bottom: 22px; padding: 6px 10px 6px 6px; border-radius: 9px; border: 1px solid transparent; cursor: pointer; text-decoration: none; }
.breadcrumb:hover { background: var(--surface-2); color: var(--ink-2); }

/* ===== HERO ===== */
.hero { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px 32px; box-shadow: var(--shadow-card); display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: flex-start; }
.hero-av { width: 120px; height: 120px; border-radius: 50%; background: linear-gradient(135deg, #E8E0FA, #8B7EE8); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 38px; font-weight: 600; letter-spacing: -0.02em; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line-strong), 0 8px 24px -8px rgba(19,32,85,.2); flex: 0 0 120px; position: relative; overflow: hidden; }
.hero-av img { width: 100%; height: 100%; object-fit: cover; }
.hero-info { min-width: 0; }
.hero-name-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.hero h1 { font-size: 30px; letter-spacing: -0.02em; margin: 0; font-weight: 700; color: var(--ink); }
.badge-sat { display: inline-flex; align-items: center; gap: 5px; background: var(--success-soft, #E1F5EA); color: #0f8a48; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.hero .title { font-size: 15px; color: var(--muted); margin: 2px 0 16px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tag { font-size: 12px; padding: 5px 11px; border-radius: 999px; background: var(--accent-softer); color: var(--accent-ink); border: 1px solid var(--accent-soft); font-weight: 500; }
.hero-meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.hero-meta .item { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta .item .ico { color: var(--accent); width: 15px; height: 15px; display: inline-flex; }
.hero-meta b { font-weight: 600; color: var(--ink); }
.hero-right { text-align: right; min-width: 180px; display: flex; flex-direction: column; gap: 14px; align-items: flex-end; }
.price-block .lbl { font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-weight: 600; }
.price-block .amt { font-size: 36px; font-weight: 700; letter-spacing: -0.02em; color: var(--accent); margin-top: 2px; line-height: 1; }
.price-block .sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
/* "ou 1 crédit" — affiché sous le prix uniquement si le patient a des crédits */
.price-block .credit-or { margin-top: 7px; font-size: 13px; font-weight: 700; color: var(--accent); line-height: 1.3; }
.price-block .credit-or .cnt { display: block; font-size: 11px; font-weight: 500; color: var(--muted); margin-top: 1px; }
.hero-cta { display: flex; flex-direction: column; gap: 8px; width: 200px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: 11px; font-size: 13.5px; font-weight: 600; border: 1px solid transparent; text-decoration: none; transition: all .15s; cursor: pointer; font-family: inherit; }
.btn-primary { background: var(--accent); color: #fff; width: 100%; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: var(--surface); color: var(--ink-2); border-color: var(--line-strong); width: 100%; }
.btn-ghost:hover { background: var(--surface-2); }

/* ===== SECTIONS ===== */
.section { margin-top: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px 28px; box-shadow: var(--shadow-card); }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-head h2 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .14em; margin: 0; color: var(--muted); font-weight: 600; }
.section-head .subline { font-size: 13px; color: var(--muted); margin-top: 2px; font-weight: 400; text-transform: none; letter-spacing: 0; }

/* ===== BOOKING ===== */
.week-nav { display: inline-flex; align-items: center; gap: 4px; }
.week-nav button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: all .15s; font-family: inherit; }
.week-nav button:hover:not(:disabled) { background: var(--surface-2); }
.week-nav button:disabled { opacity: .4; cursor: not-allowed; }
.week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.day-col { display: flex; flex-direction: column; gap: 6px; }
.day-hd { text-align: center; padding: 8px 0 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.day-hd .dow { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; }
.day-hd .dom { font-size: 18px; font-weight: 700; color: var(--ink); margin-top: 2px; letter-spacing: -0.01em; }
.day-hd.today .dom { color: var(--accent); }
.slot { padding: 10px 8px; border-radius: 10px; border: 1px solid var(--accent-soft); background: var(--accent-softer); color: var(--accent-ink); font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s; font-variant-numeric: tabular-nums; text-align: center; font-family: inherit; }
.slot:hover { background: var(--accent); color: #fff; border-color: var(--accent); transform: translateY(-1px); }
.slot.empty { background: transparent; border: 1px dashed var(--line-strong); color: var(--muted-2); cursor: default; font-weight: 400; }
.slot.empty:hover { background: transparent; color: var(--muted-2); transform: none; }
/* Semaine sans aucun créneau : un message et un bouton (17/09/2026) */
.week-vide { grid-column: 1 / -1; text-align: center; padding: 22px 12px; border: 1px dashed var(--line-strong); border-radius: 12px; color: var(--muted); font-size: 14px; }
.week-vide p { margin: 0 0 12px; }
.week-vide-btn { padding: 10px 18px; border-radius: 10px; border: 1px solid var(--accent); background: var(--accent); color: #fff; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }

/* ===== TWO-COL (About + InfoSide) ===== */
.two-col { display: grid; grid-template-columns: 1fr 340px; gap: 20px; margin-top: 20px; align-items: start; }
.prose h3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .14em; margin: 0 0 12px; color: var(--muted); font-weight: 600; }
.prose p { margin: 0 0 12px; font-size: 15.5px; color: var(--ink-2); line-height: 1.7; }
.prose p strong { color: var(--ink); font-weight: 700; }
.prose p:last-child { margin-bottom: 0; }
.tag-group { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.prose + .prose { margin-top: 22px; }

/* Sidebar info (Formation & exp) */
.info-card { display: flex; flex-direction: column; gap: 2px; }
.info-card .row { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.info-card .row:last-child { border-bottom: 0; }
.info-card .row .ico { width: 32px; height: 32px; border-radius: 8px; background: var(--accent-softer); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px; }
.info-card .row .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; }
.info-card .row .val { font-size: 14px; color: var(--ink); font-weight: 500; margin-top: 2px; }

/* ===== PRACTICES ROWS ===== */
.practices { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 18px; }
.practice-row { display: flex; align-items: center; gap: 10px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.practice-row .ico { color: var(--accent); display: inline-flex; }
.practice-row .t { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .1em; }
.practice-row .v { font-size: 13.5px; color: var(--ink-2); }

/* ===== REVIEWS ===== */
.reviews-head { display: flex; align-items: center; gap: 12px; background: var(--success-soft, #E1F5EA); color: #0f8a48; padding: 10px 14px; border-radius: 10px; font-weight: 600; font-size: 13px; margin-bottom: 14px; }
.reviews-head .count { font-size: 12.5px; color: #0f8a48; font-weight: 500; margin-left: auto; }
.review { display: flex; flex-direction: column; gap: 4px; padding: 14px 0; border-top: 1px solid var(--line); }
.review:first-of-type { border-top: 0; padding-top: 0; }
.review-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.review-author { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); font-size: 13.5px; }
.review-author .dot { width: 15px; height: 15px; border-radius: 50%; background: #22b566; color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 15px; }
.review-date { font-size: 12px; color: var(--muted); }
.review-text { font-size: 13.5px; color: var(--ink-2); line-height: 1.55; margin-top: 2px; }
.reviews-empty { padding: 20px; text-align: center; color: var(--muted); font-size: 13.5px; }

/* ===== RELATED ===== */
.rel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; }
.rel-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; text-align: center; transition: transform .18s ease, border-color .15s, box-shadow .18s ease; cursor: pointer; }
.rel-card:hover { border-color: var(--line-strong); transform: scale(1.01) translateY(-2px); box-shadow: 0 1px 0 rgba(19,32,85,.04), 0 16px 36px -20px rgba(19,32,85,.22); }
.rel-card:active { transform: scale(0.998); }
.rel-av { width: 60px; height: 60px; border-radius: 50%; margin: 0 auto 10px; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 600; background: linear-gradient(135deg, var(--accent-soft), var(--accent)); overflow: hidden; }
.rel-av img { width: 100%; height: 100%; object-fit: cover; }
.rel-name { font-size: 15px; font-weight: 600; letter-spacing: -0.005em; color: var(--ink); }
.rel-title { font-size: 12.5px; color: var(--muted); margin: 2px 0 10px; }
.rel-tags { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin-bottom: 12px; }
.rel-tag { font-size: 10.5px; padding: 3px 8px; border-radius: 999px; background: var(--accent-softer); color: var(--accent-ink); border: 1px solid var(--accent-soft); font-weight: 500; }
.rel-price { font-size: 14px; color: var(--accent); font-weight: 700; margin-bottom: 10px; }
.rel-price span { font-weight: 400; color: var(--muted); font-size: 11.5px; }
.rel-link { font-size: 13px; color: var(--accent); font-weight: 600; display: inline-flex; align-items: center; gap: 5px; justify-content: center; }

/* État chargement / empty */
.loading-row { padding: 40px; text-align: center; color: var(--muted); }
.empty-hero { background: var(--surface); border: 1px dashed var(--line-strong); border-radius: 16px; padding: 50px 40px; text-align: center; margin-top: 20px; }
.empty-hero h2 { font-size: 22px; margin: 0 0 10px; color: var(--ink); }
.empty-hero p { color: var(--muted); margin: 0 auto 22px; max-width: 480px; }

/* Skeleton : placeholders gris qui imitent la structure pendant le chargement.
   Animation shimmer subtile pour donner l'impression de chargement actif. */
@keyframes sk-shimmer { 0%,100% { background-position: -200% 0; } 50% { background-position: 200% 0; } }
.sk { background: linear-gradient(90deg, var(--surface-2) 0%, var(--bg-soft) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: sk-shimmer 1.6s ease-in-out infinite; border-radius: 8px; }
.sk-hero { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px 32px; }
.sk-hero .sk-av { width: 120px; height: 120px; border-radius: 50%; }
.sk-hero .sk-lines { display: flex; flex-direction: column; gap: 10px; min-width: 0; flex: 1; }
.sk-hero .sk-line1 { width: 60%; height: 28px; }
.sk-hero .sk-line2 { width: 40%; height: 14px; }
.sk-hero .sk-line3 { width: 80%; height: 12px; margin-top: 8px; }
.sk-hero .sk-right { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.sk-hero .sk-right .sk-amt { width: 90px; height: 32px; }
.sk-hero .sk-right .sk-btn { width: 200px; height: 42px; border-radius: 11px; }
.sk-section { margin-top: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px 28px; }
.sk-section .sk-h { width: 30%; height: 14px; margin-bottom: 18px; }
.sk-section .sk-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.sk-section .sk-week .sk-day { display: flex; flex-direction: column; gap: 6px; }
.sk-section .sk-week .sk-day .sk-dh { height: 38px; }
.sk-section .sk-week .sk-day .sk-slot { height: 36px; }

@media (max-width: 1100px) {
  .hero { grid-template-columns: auto 1fr; }
  .hero-right { grid-column: 1/-1; flex-direction: row; align-items: center; justify-content: space-between; text-align: left; min-width: 0; }
  .hero-cta { width: auto; flex-direction: row; }
  .two-col { grid-template-columns: 1fr; }
  .practices { grid-template-columns: repeat(2, 1fr); }
  .rel-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Mobile mon-psychologue (@640) — refonte 20/05/2026
   Layout desktop écrasait tout (hero 3 cols, week-grid 7 cols,
   practices 4 cols) sur petit écran → page totalement KO.
   ============================================================ */
@media (max-width: 640px) {
  /* .page padding compact (héritage layout.css 32px → 14px) */
  .page { padding-left: 14px !important; padding-right: 14px !important; padding-top: 14px !important; }

  /* Breadcrumb : font plus petite, padding réduit */
  .breadcrumb { font-size: 13px; padding: 8px 10px; }

  /* ─── HERO : compact + stack vertical ───────────────────────── */
  .hero {
    padding: 16px;
    border-radius: 16px;
    grid-template-columns: 1fr;
    gap: 14px;
  }
  /* Avatar + info en 1ère ligne (côte à côte), CTA + price en 2e */
  .hero-av {
    width: 72px; height: 72px; flex: 0 0 72px;
    font-size: 26px;
    grid-row: 1; grid-column: 1;
    justify-self: center;
  }
  .hero-info { text-align: center; }
  .hero-name-row { justify-content: center; gap: 8px; }
  .hero h1 { font-size: 22px; }
  .hero .title { font-size: 13px; margin: 2px 0 12px; }
  .hero-tags { justify-content: center; }
  .hero-meta {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    font-size: 12.5px;
  }
  /* Hero-right : column + price plus discret + CTAs pleins largeur */
  .hero-right {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
    text-align: center;
    min-width: 0;
    margin-top: 4px;
  }
  .price-block .amt { font-size: 26px; }
  .price-block .sub { font-size: 11.5px; }
  .hero-cta { width: 100%; flex-direction: column; gap: 8px; }
  .hero-cta .btn { width: 100%; padding: 12px 16px; font-size: 14px; }

  /* ─── Section base ──────────────────────────────────────────── */
  .section { padding: 16px; border-radius: 14px; margin-top: 14px; }
  .section-head { margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }

  /* ─── Booking : week-grid 7 cols → scroll horizontal ────────── */
  .week-grid {
    grid-template-columns: repeat(7, minmax(72px, 1fr));
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 8px;
    padding-bottom: 6px;
    overscroll-behavior-x: contain;
  }
  .day-col { scroll-snap-align: start; }
  /* 17/09/2026 (Alexandre : « il faut que les dispos s'affichent mieux ») — sur mobile, seuls les jours qui ONT des
     créneaux sont affichés, 3 par écran (les suivants en glissant) : avant, quatre jours vides occupaient l'écran
     et le premier jour réservable était coupé à droite. */
  .week-grid.a-des-creneaux { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: calc((100% - (var(--jours, 3) - 1) * 8px) / var(--jours, 3)); }
  .week-grid.a-des-creneaux .day-col.vide { display: none; }
  .week-grid:not(.a-des-creneaux) { grid-template-columns: 1fr; overflow: visible; }
  .day-hd { padding: 6px 0 8px; margin-bottom: 4px; }
  .day-hd .dom { font-size: 15px; }
  .day-hd .dow { font-size: 10px; }
  .slot { padding: 9px 6px; font-size: 12.5px; min-height: 36px; }
  .week-nav button { width: 36px; height: 36px; }

  /* ─── About / Two-col déjà 1 col à @1100, padding ajusté ─── */
  .prose h3 { font-size: 11px; }
  .prose p { font-size: 15px; line-height: 1.65; }

  /* Info-card (formation) compact */
  .info-card .row { padding: 10px 0; gap: 12px; }
  .info-card .row .ico { width: 28px; height: 28px; flex: 0 0 28px; }
  .info-card .row .lbl { font-size: 10px; }
  .info-card .row .val { font-size: 13px; }

  /* ─── Practices : 2 col → 1 col en mobile très étroit ─────── */
  .practices { grid-template-columns: 1fr; gap: 8px; }
  .practice-row { padding: 12px 14px; }

  /* ─── Reviews compact ───────────────────────────────────────── */
  .reviews-head { font-size: 12.5px; padding: 8px 12px; }
  .review-text { font-size: 13px; }

  /* ─── Related : déjà 1 col à @1100. Padding compact ─────── */
  .rel-card { padding: 14px; }
  .rel-av { width: 52px; height: 52px; font-size: 16px; }

  /* ─── Empty / loading states ────────────────────────────── */
  .empty-hero { padding: 36px 18px; }
  .empty-hero h2 { font-size: 19px; }
  .loading-row { padding: 24px 14px; }

  /* ─── Skeleton : aligne sur le hero mobile ──────────────── */
  .sk-hero {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
    text-align: center;
  }
  .sk-hero .sk-av { width: 72px; height: 72px; justify-self: center; }
  .sk-hero .sk-lines { align-items: center; }
  .sk-hero .sk-line1 { width: 70%; height: 22px; }
  .sk-hero .sk-line2 { width: 50%; height: 12px; }
  .sk-hero .sk-line3 { width: 90%; height: 11px; }
  .sk-hero .sk-right { align-items: stretch; width: 100%; }
  .sk-hero .sk-right .sk-amt { width: 80px; height: 24px; align-self: center; }
  .sk-hero .sk-right .sk-btn { width: 100%; height: 40px; }
  .sk-section { padding: 14px; margin-top: 14px; }
  .sk-section .sk-week {
    grid-template-columns: repeat(7, minmax(72px, 1fr));
    overflow-x: auto;
  }
}
