/* PORTAIL CLIENT PAR MAGIC LINK (Prompt 11, module 3) - styles du simulateur (.pc-*, dans le hub /outils/) et de la page du maitre d'ouvrage (.pce-*).
   Mobile d'abord : tout tient dans 375 px sans defilement horizontal (grilles minmax(0,1fr), mots longs coupes, tableaux remplaces par des listes). */

/* ====================================================================== simulateur (cadre du hub) */
.pc { --pc-b: #E2E8F0; --pc-t: #1E293B; --pc-s: #475569; --pc-bleu: #2563EB; --pc-bleu-f: #1D4ED8; --pc-ambre: #B45309; }
.pc, .pc * { box-sizing: border-box; }
.pc-avert { margin: 0 0 18px; padding: 12px 14px; border: 1px solid #FDE68A; border-radius: 12px; background: #FFFBEB; color: #78350F; font-size: 14px; line-height: 1.55; }
.pc-etape { display: grid; gap: 14px; padding-top: 6px; margin-top: 8px; border-top: 1px solid var(--pc-b); scroll-margin-top: calc(var(--ot-decal, 72px) + 12px); }
.pc-etape[hidden] { display: none; }
.pc-h3 { display: flex; align-items: center; gap: 10px; margin: 16px 0 4px; font-size: 1.0625rem; font-weight: 700; line-height: 1.35; }
.pc-h4 { margin: 0 0 6px; font-size: 1rem; font-weight: 700; }
.pc-num { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 999px; background: var(--pc-bleu); color: #fff; font-size: 14px; font-weight: 700; }
.pc-aide { margin: 0; color: var(--pc-s); font-size: 14px; line-height: 1.55; }
.pc-form { display: grid; gap: 16px; min-width: 0; }
.pc-grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pc-large { grid-column: 1 / -1; }
.pc-champ { display: grid; gap: 5px; min-width: 0; align-content: start; }
.pc-champ label, .pc-liste legend { font-size: 13.5px; font-weight: 600; color: var(--pc-t); }
.pc input[type="text"], .pc select, .pc textarea { width: 100%; max-width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid #CBD5E1; border-radius: 10px; background: #fff; color: var(--pc-t); font: inherit; font-size: 15px; }
.pc textarea { resize: vertical; min-height: 78px; }
.pc input:disabled { background: #F1F5F9; color: var(--pc-s); }
.pc input:focus, .pc select:focus, .pc textarea:focus { outline: none; border-color: var(--pc-bleu); box-shadow: 0 0 0 3px rgba(37,99,235,.16); }
.pc-ex { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #FEF3C7; color: #92400E; font-size: 11.5px; font-weight: 700; vertical-align: middle; }
.pc-liste { min-width: 0; margin: 0; padding: 14px; border: 1px dashed #CBD5E1; border-radius: 14px; background: #F8FAFC; display: grid; gap: 12px; }
.pc-liste[hidden] { display: none; }
.pc-ligne { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 10px; align-items: end; padding: 12px; border: 1px solid var(--pc-b); border-radius: 12px; background: #fff; min-width: 0; }
.pc-ligne-regie { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr) auto; }
.pc-ligne-num { grid-column: 1 / -1; font-size: 12.5px; font-weight: 700; color: var(--pc-bleu-f); }
.pc-petit { min-height: 40px; padding: 8px 14px; font-size: 14px; }
.pc-total { margin: 0; font-size: 15px; }
.pc-erreur { margin: 0; padding: 10px 12px; border: 1px solid #FECACA; border-radius: 10px; background: #FEF2F2; color: #991B1B; font-size: 14px; }
.pc-erreur[hidden], .pc-resultat[hidden] { display: none; }
.pc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.pc-aide-bouton { font-size: 13px; }
.pc-resultat { display: grid; gap: 12px; padding: 18px; border: 1px solid #BBF7D0; border-radius: 14px; background: #F0FDF4; }
.pc-lien { display: flex; gap: 8px; min-width: 0; }
.pc-lien input { flex: 1 1 auto; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
/* le telephone et le suivi se mettent cote a cote seulement si la place le permet (la zone centrale du hub est etroite : 300 px de menu a gauche) */
.pc-duo { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start; min-width: 0; }
.pc-duo > .pc-telephone { flex: 0 1 430px; min-width: 0; }
.pc-duo > .pc-suivi { flex: 1 1 280px; min-width: 0; }
.pc-suivi .pc-dl > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
.pc-telephone { width: 100%; max-width: 430px; padding: 10px; border: 1px solid #CBD5E1; border-radius: 28px; background: #0F172A; box-shadow: 0 18px 40px -22px rgba(15,23,42,.6); }
.pc-telephone iframe { display: block; width: 100%; height: 720px; border: 0; border-radius: 20px; background: #fff; }
.pc-suivi { min-width: 0; padding: 16px; border: 1px solid var(--pc-b); border-radius: 14px; background: #F8FAFC; }
.pc-dl { margin: 0; display: grid; gap: 8px; }
.pc-dl > div { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--pc-b); }
.pc-dl > div[hidden] { display: none; }
.pc-dl dt { color: var(--pc-s); font-size: 13.5px; }
.pc-dl dd { margin: 0; min-width: 0; font-size: 14.5px; overflow-wrap: anywhere; }
.pc-hash { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; word-break: break-all; }
.pc-texte { line-height: 1.65; color: var(--pc-s, #475569); }
.pc-texte h2 { color: var(--ot-txt, #1E293B); }
.pc-texte p, .pc-texte li { overflow-wrap: anywhere; }
.pc-texte code { padding: 1px 6px; border-radius: 6px; background: #F1F5F9; color: #0F172A; font-size: .9em; }
.pc-etapes { margin: 0; padding-left: 1.3rem; display: grid; gap: 10px; }
.pc-limites { border-color: #FDE68A; background: #FFFBEB; }
.pc-limites ul, .pc-texte ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 8px; }
.pc-dl-champs > div { grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); }
.pc-verif { display: flex; gap: 8px; min-width: 0; }
.pc-verif input { flex: 1 1 auto; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.pc-svg { width: 100%; height: auto; display: block; }

@media (max-width: 899.98px) {
  .pc-duo > .pc-telephone { margin: 0 auto; flex-basis: 100%; }
}
@media (max-width: 639.98px) {
  .pc.ot-carte, .pc-texte.ot-carte { padding: 18px 16px; }
  .pc-grille { grid-template-columns: minmax(0, 1fr); }
  .pc-ligne { grid-template-columns: minmax(0, 1fr); }
  .pc-ligne-regie { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 8px; }
  .pc-ligne-regie .pc-champ-lib, .pc-ligne-regie .pc-retirer { grid-column: 1 / -1; }
  .pc-ligne-regie .pc-champ label { font-size: 12.5px; }
  .pc-ligne .pc-retirer { justify-self: start; }
  .pc-dl > div, .pc-dl-champs > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .pc-lien { flex-direction: column; }
  .pc-verif { flex-direction: column; }
  .pc-telephone { padding: 6px; border-radius: 22px; }
  .pc-telephone iframe { height: 680px; border-radius: 16px; }
  .pc-actions .ot-btn { width: 100%; }
}

/* ====================================================================== page du maitre d'ouvrage (autonome) */
.pce { margin: 0; background: #F1F5F9; color: #0F172A; font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
.pce *, .pce *::before, .pce *::after { box-sizing: border-box; }
.pce [hidden] { display: none !important; }
.pce .ot-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.pce-haut { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; background: #1E293B; color: #fff; }
.pce-marque { font-weight: 700; letter-spacing: .01em; }
.pce-ruban { padding: 3px 10px; border-radius: 999px; background: #FDE68A; color: #78350F; font-size: 12px; font-weight: 700; }
.pce-main { width: 100%; max-width: 640px; margin: 0 auto; padding: 14px 16px 40px; display: grid; gap: 14px; }
.pce-main:focus { outline: none; }
.pce-avert { margin: 0; padding: 10px 12px; border: 1px solid #FDE68A; border-radius: 12px; background: #FFFBEB; color: #78350F; font-size: 14px; }
.pce-carte { margin: 0; padding: 18px 16px; border: 1px solid #E2E8F0; border-radius: 16px; background: #fff; box-shadow: 0 1px 2px rgba(15,23,42,.04); min-width: 0; }
.pce-sur { margin: 0 0 4px; color: #475569; font-size: 13px; }
.pce-h1 { margin: 0 0 6px; font-size: 1.35rem; line-height: 1.25; letter-spacing: -.01em; overflow-wrap: anywhere; }
.pce-h2 { margin: 0 0 10px; padding: 0; font-size: 1.05rem; font-weight: 700; line-height: 1.3; }
.pce-meta { margin: 0 0 10px; color: #334155; font-size: 14.5px; overflow-wrap: anywhere; }
.pce-desc { margin: 0 0 10px; color: #334155; overflow-wrap: anywhere; }
.pce-expire { margin: 0; color: #64748B; font-size: 13px; }
.pce-aide { margin: 8px 0 0; color: #475569; font-size: 13.5px; line-height: 1.5; }
.pce-formulaire { display: grid; gap: 14px; min-width: 0; }
.pce-choix { display: grid; gap: 12px; min-width: 0; }
.pce-choix legend { padding: 0 6px; }
.pce-option { position: relative; min-width: 0; border: 2px solid #E2E8F0; border-radius: 14px; background: #fff; overflow: hidden; }
.pce-option input[type="radio"] { position: absolute; top: 14px; right: 14px; width: 22px; height: 22px; accent-color: #2563EB; }
.pce-option:has(input:checked) { border-color: #2563EB; box-shadow: 0 0 0 3px rgba(37,99,235,.14); }
.pce-option label { display: grid; gap: 3px; padding: 14px 48px 14px 14px; cursor: pointer; }
.pce-o-num { color: #1D4ED8; font-size: 12.5px; font-weight: 700; }
.pce-o-lib { font-size: 1.02rem; font-weight: 700; overflow-wrap: anywhere; }
.pce-o-det { color: #475569; font-size: 14px; overflow-wrap: anywhere; }
.pce-o-prix { margin-top: 4px; font-weight: 700; }
.pce-plus { color: #B91C1C; }
.pce-moins { color: #15803D; }
.pce-fig { margin: 0; padding: 0 12px 12px; }
.pce-fig svg { width: 100%; height: auto; display: block; border-radius: 10px; border: 1px solid #E2E8F0; }
.pce-fig figcaption { margin-top: 6px; color: #64748B; font-size: 12.5px; line-height: 1.45; }
.pce-carte > .pce-fig { padding: 0 0 12px; }
.pce-lignes { margin: 0 0 10px; padding: 0; list-style: none; display: grid; gap: 8px; }
.pce-lignes li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 10px 12px; border: 1px solid #E2E8F0; border-radius: 12px; }
.pce-l-lib { font-weight: 600; overflow-wrap: anywhere; }
.pce-l-det { grid-column: 1; color: #475569; font-size: 13.5px; }
.pce-l-tot { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.pce-total { margin: 0; text-align: right; }
.pce-dl { margin: 0; display: grid; gap: 0; }
.pce-dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #E2E8F0; }
.pce-dl > div:last-child { border-bottom: 0; }
.pce-dl dt { color: #475569; font-size: 14px; min-width: 0; }
.pce-dl dd { margin: 0; text-align: right; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.pce-fort { background: #EFF6FF; margin: 0 -8px; padding-left: 8px !important; padding-right: 8px !important; border-radius: 8px; }
.pce-fort dd { font-size: 1.1rem; color: #1D4ED8; }
.pce-champ { display: grid; gap: 5px; margin-bottom: 12px; min-width: 0; }
.pce-champ label, .pce-methodes legend { font-size: 14px; font-weight: 600; }
.pce input[type="text"] { width: 100%; max-width: 100%; min-height: 46px; padding: 9px 12px; border: 1px solid #CBD5E1; border-radius: 10px; font: inherit; font-size: 16px; background: #fff; color: #0F172A; }
.pce input[type="text"]:focus { outline: none; border-color: #2563EB; box-shadow: 0 0 0 3px rgba(37,99,235,.18); }
.pce-methodes { margin: 0 0 12px; padding: 0; border: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; min-width: 0; }
.pce-methodes legend { grid-column: 1 / -1; padding: 0; margin-bottom: 6px; }
.pce-methode { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 8px 12px; border: 1px solid #CBD5E1; border-radius: 12px; background: #fff; cursor: pointer; font-size: 14.5px; }
.pce-methode:has(input:checked) { border-color: #2563EB; background: #EFF6FF; font-weight: 600; }
.pce-zone { margin-bottom: 12px; min-width: 0; }
.pce-toile { margin: 8px 0; border: 2px dashed #94A3B8; border-radius: 12px; background: #fff; overflow: hidden; }
.pce-toile canvas { display: block; width: 100%; height: auto; aspect-ratio: 3 / 1; touch-action: none; cursor: crosshair; }
.pce-code { margin: 10px 0; padding: 10px 12px; border-radius: 10px; background: #F1F5F9; font-size: 1.1rem; overflow-wrap: anywhere; }
.pce-code strong { letter-spacing: .25em; font-size: 1.35rem; }
.pce-consent { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; margin: 4px 0 12px; font-size: 14px; line-height: 1.5; cursor: pointer; }
.pce-consent input { width: 22px; height: 22px; margin-top: 2px; accent-color: #2563EB; }
.pce-erreur { margin: 0 0 12px; padding: 10px 12px; border: 1px solid #FECACA; border-radius: 10px; background: #FEF2F2; color: #991B1B; font-size: 14.5px; }
.pce-actions { display: grid; gap: 10px; }
.pce-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 11px 18px; border: 1px solid transparent; border-radius: 12px; font: inherit; font-size: 15.5px; font-weight: 600; text-align: center; text-decoration: none; cursor: pointer; }
.pce-btn:disabled { opacity: .55; cursor: not-allowed; }
.pce-btn-1 { background: #2563EB; color: #fff; }
.pce-btn-1:hover:not(:disabled) { background: #1D4ED8; }
.pce-btn-2 { background: #fff; border-color: #94A3B8; color: #0F172A; }
.pce-btn-3 { background: transparent; border-color: #CBD5E1; color: #334155; }
.pce :focus-visible { outline: 3px solid rgba(37,99,235,.5); outline-offset: 2px; }
.pce-details { margin-top: 14px; font-size: 13.5px; color: #334155; }
.pce-details summary { cursor: pointer; font-weight: 600; }
.pce-details ul { margin: 8px 0 0; padding-left: 1.1rem; display: grid; gap: 6px; }
.pce-details code, .pce-hash-ligne code { overflow-wrap: anywhere; word-break: break-all; font-size: 12px; }
.pce-hash-ligne { overflow-wrap: anywhere; font-size: 13px; }
.pce-decision { border-color: #86EFAC; background: #F0FDF4; }
.pce-pied { margin: 6px 0 0; color: #64748B; font-size: 12.5px; text-align: center; overflow-wrap: anywhere; }
.pce-vide { text-align: center; padding: 28px 18px; }
.pce-ok { color: #166534; }
.pce-ko { color: #991B1B; }
@media (min-width: 560px) {
  .pce-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
