/* ============================================================
   Chaarei Hessed — Onglet Profil / Dashboard de suivi
   ============================================================ */

/* En-tête profil + anneau objectif du mois */
.prof-hero{
  display:flex;align-items:center;justify-content:space-between;gap:14px;
  background:var(--navy);color:var(--cream);
  border-radius:var(--radius);padding:18px;box-shadow:var(--shadow);
}
.prof-hero-info{min-width:0;flex:1;}
.prof-kicker{color:var(--gold-soft);font-size:.72rem;text-transform:uppercase;letter-spacing:1px;}
.prof-hero-title{font-size:1.25rem;font-weight:800;margin-top:2px;}
.prof-hero-sub{font-size:.8rem;opacity:.85;margin-top:5px;}

.prof-ring{
  flex:0 0 auto;width:104px;height:104px;border-radius:50%;
  background:conic-gradient(var(--gold) calc(var(--pct,0)*1%), rgba(255,255,255,.18) 0);
  display:flex;align-items:center;justify-content:center;
}
.prof-ring-in{
  width:80px;height:80px;border-radius:50%;background:var(--navy);
  display:flex;align-items:center;justify-content:center;
}
.prof-ring-in b{color:var(--cream);font-size:1.4rem;font-weight:800;}

/* Statistiques rapides */
.prof-stats{display:flex;gap:10px;margin-top:12px;}
.prof-pill{
  flex:1;min-width:0;background:var(--paper);border:1px solid var(--line);border-radius:14px;
  padding:11px 8px;text-align:center;
}
.prof-pill b{display:block;font-size:1.1rem;font-weight:800;color:var(--navy);}
.prof-pill span{font-size:.72rem;color:var(--ink-soft);}

/* Bloc compte / connexion */
.prof-account{
  display:flex;align-items:center;gap:12px;margin-top:14px;
  background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);padding:14px;
}
.prof-avatar{
  width:46px;height:46px;flex:0 0 46px;border-radius:50%;
  background:var(--cream);border:2px solid var(--gold);
  display:flex;align-items:center;justify-content:center;
  font-weight:800;color:var(--navy);font-size:1.05rem;
}
.prof-avatar.guest{font-size:1.3rem;}
.prof-acc-info{flex:1;min-width:0;}
.prof-acc-name{font-weight:700;color:var(--navy);display:flex;align-items:center;gap:8px;}
.prof-acc-mail{font-size:.8rem;color:var(--ink-soft);margin-top:1px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.prof-badge{font-size:.62rem;text-transform:uppercase;letter-spacing:.5px;
  padding:2px 7px;border-radius:999px;background:var(--line);color:var(--ink-soft);font-weight:700;}
.prof-badge.premium{background:var(--gold);color:#fff;}
.prof-badge.trial{background:var(--gold-soft);color:var(--navy);}
.prof-btn{
  flex:0 0 auto;border:0;border-radius:10px;cursor:pointer;
  background:var(--navy);color:var(--cream);font-weight:700;font-size:.82rem;padding:9px 13px;
}
.prof-btn.ghost{background:transparent;color:var(--ink-soft);border:1px solid var(--line);}
.prof-btn:active{transform:scale(.97);}

/* Objectifs personnels */
.prof-goals{
  margin-top:14px;background:var(--paper);border:1px solid var(--line);
  border-radius:var(--radius);padding:14px;box-shadow:0 2px 10px rgba(15,42,68,.06);
}
.prof-goals-head{display:flex;align-items:center;justify-content:space-between;gap:12px;}
.prof-goals-title{font-weight:800;color:var(--navy);}
.prof-goals-count{font-size:.75rem;color:var(--ink-soft);margin-top:2px;line-height:1.35;}
.prof-goals-edit{margin:0;}
.prof-goal-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:11px;}
.prof-goal-chip{
  display:inline-flex;align-items:center;border-radius:999px;padding:5px 9px;
  background:var(--cream);color:var(--navy);font-size:.72rem;font-weight:700;
}
.prof-goal-editor{border-top:1px solid var(--line);margin-top:13px;padding-top:12px;}
.prof-goal-editor p{font-size:.78rem;color:var(--ink-soft);line-height:1.4;margin:0 0 10px;}
.prof-goal-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
.prof-goal-choice{
  width:100%;min-width:0;display:flex;align-items:center;gap:7px;text-align:inherit;
  border:1px solid var(--line);border-radius:11px;background:var(--paper);
  color:var(--ink);padding:9px;cursor:pointer;font-size:.75rem;font-weight:600;
}
.prof-goal-choice.on{border-color:var(--gold);background:var(--cream);color:var(--navy);}
.prof-goal-icon{font-size:1rem;flex:0 0 auto;}
.prof-goal-choice>span:nth-child(2){flex:1;min-width:0;}
.prof-goal-check{
  width:20px;height:20px;flex:0 0 20px;border-radius:50%;display:flex;
  align-items:center;justify-content:center;background:var(--line);color:var(--navy);font-weight:800;
}
.prof-goal-choice.on .prof-goal-check{background:var(--gold);color:#fff;}
.prof-empty{padding:18px 4px;text-align:center;color:var(--ink-soft);font-size:.82rem;line-height:1.4;}

/* En-tête de section + compteur */
.prof-head{display:flex;align-items:center;justify-content:space-between;margin-top:20px;}
.prof-head .section-label{margin:0;}
.prof-count{font-weight:800;color:var(--gold);font-size:.9rem;}
.prof-date{font-size:.78rem;color:var(--ink-soft);margin:2px 0 10px;text-transform:capitalize;}

/* Carte générique */
.prof-card{
  background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);
  padding:0 14px;box-shadow:0 2px 10px rgba(15,42,68,.06);
}

/* Lignes de l'emploi du temps */
.prof-row{
  width:100%;display:flex;align-items:center;gap:12px;padding:13px 0;
  background:none;border:0;border-top:1px solid var(--line);cursor:pointer;text-align:inherit;
}
.prof-row:first-child{border-top:0;}
.prof-row-lead{flex:0 0 48px;display:flex;align-items:center;justify-content:center;}
.prof-time{font-weight:800;color:var(--navy);font-size:.92rem;}
.prof-ico{font-size:1.3rem;}
.prof-row-mid{flex:1;min-width:0;display:flex;flex-direction:column;align-items:flex-start;}
.prof-he{font-family:'Frank Ruhl Libre',serif;font-size:1.1rem;font-weight:700;color:var(--navy);}
.prof-fr{font-size:.8rem;color:var(--ink-soft);margin-top:1px;}

/* Case à cocher */
.prof-check{
  flex:0 0 auto;width:26px;height:26px;border-radius:50%;
  border:2px solid var(--line);display:flex;align-items:center;justify-content:center;
  color:#fff;font-weight:800;font-size:.9rem;transition:.15s;
}
.prof-check.on{background:var(--gold);border-color:var(--gold);}

/* Halakhot */
.prof-hal{
  width:100%;display:flex;flex-direction:column;gap:4px;padding:14px 0;
  background:none;border:0;border-top:1px solid var(--line);cursor:pointer;text-align:inherit;
}
.prof-hal:first-child{border-top:0;}
.prof-hal-top{display:flex;align-items:center;justify-content:space-between;gap:10px;}
.prof-hal-theme{font-size:.72rem;text-transform:uppercase;letter-spacing:.5px;color:var(--gold);font-weight:700;}
.prof-hal-text{font-size:.86rem;color:var(--ink);line-height:1.45;}

/* Barres « objectif du mois » */
.prof-bar{display:flex;align-items:center;gap:12px;padding:12px 0;border-top:1px solid var(--line);}
.prof-bar:first-child{border-top:0;}
.prof-bar-ico{flex:0 0 24px;text-align:center;font-size:1.05rem;}
.prof-bar-mid{flex:1;min-width:0;}
.prof-bar-top{display:flex;align-items:center;justify-content:space-between;gap:8px;}
.prof-bar-lbl{font-size:.82rem;font-weight:600;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.prof-bar-pct{font-size:.82rem;font-weight:800;color:var(--navy);}
.prof-bar-track{display:block;height:8px;border-radius:4px;background:var(--line);margin-top:6px;overflow:hidden;}
.prof-bar-fill{display:block;height:8px;border-radius:4px;background:var(--gold);}

/* Bilan & verrou */
.prof-bilan-row{display:flex;gap:12px;align-items:flex-start;padding:13px 0;border-top:1px solid var(--line);
  font-size:.88rem;color:var(--ink);line-height:1.45;}
.prof-bilan-row:first-child{border-top:0;}
.prof-bilan-ico{flex:0 0 22px;text-align:center;font-size:1.1rem;}
.prof-locked{
  background:var(--paper);border:1px dashed var(--line);border-radius:var(--radius);
  padding:18px;text-align:center;
}
.prof-lock-ico{font-size:1.4rem;}
.prof-lock-title{font-weight:800;color:var(--navy);margin-top:6px;}
.prof-lock-text{font-size:.82rem;color:var(--ink-soft);margin-top:6px;line-height:1.4;}
.prof-lock-pct{font-size:.82rem;font-weight:800;color:var(--gold);margin-top:10px;}

/* Pages dédiées : Halakhot du jour & Daf Yomi */
.prof-page-date{font-size:.82rem;color:var(--ink-soft);text-transform:capitalize;margin-bottom:12px;}
.prof-page-note{font-size:.78rem;color:var(--ink-soft);text-align:center;margin-top:16px;line-height:1.4;}
.prof-halpage{
  background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);
  padding:16px;margin-bottom:14px;box-shadow:0 2px 10px rgba(15,42,68,.06);
}
.prof-halpage-he{font-size:1.4rem;margin:4px 0 8px;}
.prof-halpage-text{font-size:.95rem;color:var(--ink);line-height:1.55;}
.prof-study{
  margin-top:12px;border:0;border-radius:10px;cursor:pointer;
  background:var(--navy);color:var(--cream);font-weight:700;font-size:.85rem;padding:10px 16px;
}
.prof-study.on{background:var(--gold);color:#fff;}
.prof-study:active{transform:scale(.97);}

.prof-daf{
  background:var(--navy);color:var(--cream);border-radius:var(--radius);
  padding:24px 18px;text-align:center;box-shadow:var(--shadow);
}
.prof-daf-he{font-family:'Frank Ruhl Libre',serif;font-size:2rem;font-weight:800;}
.prof-daf-en{font-size:1.05rem;opacity:.92;margin-top:4px;}
.prof-daf-link{display:inline-block;margin-top:16px;background:var(--gold);color:#fff;text-decoration:none;}

/* RTL */
[dir="rtl"] .prof-row-mid,[dir="rtl"] .prof-hero-info{align-items:flex-end;text-align:right;}
[dir="rtl"] .prof-goal-choice{text-align:right;}

@media (max-width:380px){
  .prof-hero{gap:10px;padding:14px;}
  .prof-ring{width:82px;height:82px;}
  .prof-ring-in{width:62px;height:62px;}
  .prof-ring-in b{font-size:1.1rem;}
  .prof-hero-title{font-size:1.05rem;}
  .prof-account{align-items:flex-start;flex-wrap:wrap;}
  .prof-btn{margin-inline-start:58px;}
  .prof-pill{padding:9px 4px;}
  .prof-pill span{font-size:.64rem;overflow-wrap:anywhere;}
  .prof-goals-head{align-items:flex-start;flex-direction:column;}
  .prof-goals-edit{margin:0;width:100%;}
  .prof-goal-grid{grid-template-columns:1fr;}
}

/* Carte « formule / plan » (interface selon l'abonnement) */
.prof-plan{
  margin-top:14px;background:var(--paper);border:1px solid var(--line);
  border-radius:var(--radius);padding:16px;box-shadow:0 2px 10px rgba(15,42,68,.06);
}
.prof-plan.expired{border-color:var(--gold);background:var(--cream);}
.prof-plan-head{display:flex;align-items:center;justify-content:space-between;gap:10px;}
.prof-plan-name{font-weight:800;color:var(--navy);font-size:1.02rem;}
.prof-plan-feats{margin-top:12px;display:flex;flex-direction:column;gap:8px;}
.prof-plan-line{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  font-size:.85rem;color:var(--ink-soft);
}
.prof-plan-line.on{color:var(--ink);}
.prof-plan-mark{flex:0 0 auto;font-weight:800;}
.prof-plan-line.on .prof-plan-mark{color:var(--gold);}
.prof-plan-note{font-size:.82rem;color:var(--ink-soft);line-height:1.45;margin:12px 0 0;}
.prof-plan-note.ok{color:var(--navy);font-weight:600;}
.prof-plan-cta{margin-top:13px;width:100%;text-align:center;}

/* Modale de paiement Tranzila (iframe page hébergée) */
.tz-backdrop{
  position:fixed;inset:0;z-index:1000;background:rgba(10,21,30,.7);
  display:flex;align-items:center;justify-content:center;padding:16px;
}
.tz-modal{
  position:relative;width:100%;max-width:440px;height:min(86vh,640px);
  background:#fff;border-radius:16px;overflow:hidden;box-shadow:0 18px 50px rgba(0,0,0,.4);
}
.tz-frame{width:100%;height:100%;border:0;display:block;}
.tz-close{
  position:absolute;top:8px;right:10px;z-index:2;width:32px;height:32px;border:0;
  border-radius:50%;background:rgba(0,0,0,.55);color:#fff;font-size:1.3rem;line-height:1;cursor:pointer;
}

/* Connexion sociale (Apple / Google) sur l'écran d'auth */
.auth-or{ display:flex; align-items:center; gap:10px; margin:14px 0 8px;
  color:var(--ink-soft); font-size:.8rem; }
.auth-or::before,.auth-or::after{ content:""; flex:1; height:1px; background:rgba(0,0,0,.12); }
.auth-oauth{ width:100%; display:flex; align-items:center; justify-content:center; gap:8px;
  border:1px solid rgba(0,0,0,.16); border-radius:11px; padding:12px; margin-top:9px;
  font-weight:700; font-size:.95rem; cursor:pointer; background:#fff; color:#1a1a1a; }
.auth-oauth.apple{ background:#000; color:#fff; border-color:#000; }
.auth-oauth.google{ background:#fff; color:#3c4043; }
.auth-oauth.maglink{ background:var(--navy); color:var(--cream); border-color:var(--navy); }
.auth-oauth:active{ transform:scale(.985); }
