/* LEANDRO · styles de l'espace client et de l'espace pro */
.app{padding:2.4rem 0 4rem;min-height:60vh}
.app h1{font-size:clamp(1.7rem,3.4vw,2.4rem);font-weight:850;text-transform:uppercase;letter-spacing:-.01em;margin-bottom:.4rem;color:#0d1629}
.app h1 span{color:#1f6bff}
.app .sub{color:#55627a;margin-bottom:1.6rem}
.panel{background:#fff;border:1px solid #e3e8f0;border-radius:18px;padding:1.4rem;box-shadow:0 10px 30px -20px rgba(13,22,41,.3);margin-bottom:1.2rem}
.panel h3{font-size:1.05rem;font-weight:800;margin-bottom:.8rem;color:#0d1629}
.panel.warn{border-color:#f5c56b;background:#fffaf0}
.auth{max-width:460px;margin:0 auto}
.seg2{display:grid;grid-template-columns:1fr 1fr;background:#f1f4f9;border-radius:12px;padding:4px;margin-bottom:1.2rem}
.seg2 button{border:0;background:none;padding:.7rem;border-radius:9px;font:inherit;font-weight:800;font-size:.85rem;text-transform:uppercase;letter-spacing:.04em;color:#55627a;cursor:pointer}
.seg2 button.on{background:#fff;color:#1f6bff;box-shadow:0 2px 8px -4px rgba(13,22,41,.3)}
.fld{display:grid;gap:.35rem;margin-bottom:.9rem}
.fld label{font-size:.85rem;font-weight:700;color:#3b475c}
.fld input,.fld select,.fld textarea{width:100%;font:inherit;font-size:1rem;color:#0d1629;background:#fff;border:1px solid #d5dbe5;border-radius:12px;padding:.75rem .9rem}
.fld textarea{min-height:90px;resize:vertical}
.fld input:focus,.fld select:focus,.fld textarea:focus{outline:none;border-color:#1f6bff;box-shadow:0 0 0 3px rgba(31,107,255,.12)}
.row2{display:grid;grid-template-columns:1fr 1fr;gap:.8rem}
.btn-sm{padding:.55rem .9rem!important;font-size:.78rem!important;border-radius:10px!important}
.btn-full{width:100%}
.link{background:none;border:0;color:#1f6bff;font:inherit;font-weight:700;cursor:pointer;text-decoration:underline;padding:0}
.muted{color:#55627a;font-size:.9rem}
.small{font-size:.82rem}
.hello{display:flex;justify-content:space-between;align-items:center;gap:1rem;flex-wrap:wrap;margin-bottom:1.2rem}
.tabs2{display:flex;gap:.4rem;flex-wrap:wrap;margin-bottom:1.2rem}
.tabs2 button{border:1px solid #d5dbe5;background:#fff;border-radius:999px;padding:.55rem 1rem;font:inherit;font-weight:800;font-size:.8rem;text-transform:uppercase;letter-spacing:.04em;color:#3b475c;cursor:pointer}
.tabs2 button.on{background:#1f6bff;border-color:#1f6bff;color:#fff}
.tabs2 .count{display:inline-block;min-width:1.4em;padding:0 .35em;margin-left:.35em;border-radius:999px;background:#ff5d6c;color:#fff;font-size:.7rem;line-height:1.4em}
.card{border:1px solid #e3e8f0;border-radius:16px;padding:1.1rem;margin-bottom:.9rem;background:#fff}
.card-top{display:flex;justify-content:space-between;gap:.8rem;align-items:flex-start;flex-wrap:wrap}
.card h4{font-size:1rem;font-weight:800;color:#0d1629}
.card .meta{font-size:.82rem;color:#55627a;margin-top:.15rem}
.card .desc{margin:.7rem 0;color:#3b475c;font-size:.95rem;white-space:pre-line}
.price-box{display:flex;align-items:center;justify-content:space-between;gap:.8rem;flex-wrap:wrap;background:#f2f6ff;border:1px solid #cfdcff;border-radius:12px;padding:.8rem 1rem;margin:.7rem 0}
.price-box b{font-size:1.3rem;color:#1f6bff}
.badge{display:inline-block;padding:.25rem .6rem;border-radius:999px;font-size:.72rem;font-weight:800;text-transform:uppercase;letter-spacing:.04em;white-space:nowrap}
.st-new{background:#fff1d6;color:#8a5a00}.st-quote{background:#e3ecff;color:#1550e0}.st-ok{background:#dcf7ea;color:#0b7a4d}
.st-ko{background:#ffe3e6;color:#b3202f}.st-work{background:#efe6ff;color:#5b2ec2}.st-done{background:#e8edf3;color:#3b475c}
.st-paid{background:#dcf7ea;color:#0b7a4d}
.thread{border-top:1px solid #eef1f6;margin-top:.8rem;padding-top:.8rem;display:grid;gap:.5rem}
.msg{max-width:85%;padding:.6rem .85rem;border-radius:14px;font-size:.93rem;white-space:pre-line;background:#f1f4f9;color:#0d1629}
.msg.me{justify-self:end;background:#1f6bff;color:#fff}
.msg .when{display:block;font-size:.7rem;opacity:.7;margin-top:.2rem}
.reply{display:flex;gap:.5rem;margin-top:.6rem}
.reply textarea{flex:1;font:inherit;font-size:.95rem;border:1px solid #d5dbe5;border-radius:12px;padding:.6rem .8rem;min-height:44px;resize:vertical}
.actions{display:flex;gap:.5rem;flex-wrap:wrap;margin-top:.7rem}
.empty{text-align:center;color:#55627a;padding:2rem 1rem}
.tbl{width:100%;border-collapse:collapse;font-size:.92rem}
.tbl th,.tbl td{padding:.65rem .5rem;border-bottom:1px solid #eef1f6;text-align:left;vertical-align:middle}
.tbl th{font-size:.72rem;text-transform:uppercase;letter-spacing:.05em;color:#55627a}
.tbl .r{text-align:right}
.tbl-wrap{overflow-x:auto}
.search{width:100%;font:inherit;border:1px solid #d5dbe5;border-radius:12px;padding:.7rem .9rem;margin-bottom:1rem}
.lines .line{display:grid;grid-template-columns:1fr 70px 110px 36px;gap:.4rem;margin-bottom:.4rem}
.lines input{font:inherit;border:1px solid #d5dbe5;border-radius:10px;padding:.55rem .6rem;width:100%}
.lines .x{border:0;background:#ffe3e6;color:#b3202f;border-radius:10px;font-weight:800;cursor:pointer}
.total-line{display:flex;justify-content:space-between;font-weight:800;font-size:1.1rem;margin:.8rem 0}
.toast{position:fixed;left:50%;bottom:24px;transform:translate(-50%,20px);opacity:0;background:#0d1629;color:#fff;padding:.8rem 1.2rem;border-radius:12px;font-weight:700;z-index:200;transition:.25s;max-width:90vw}
.toast.show{opacity:1;transform:translate(-50%,0)}
.toast.err{background:#b3202f}
.modal{position:fixed;inset:0;background:rgba(13,22,41,.55);z-index:150;display:flex;align-items:flex-start;justify-content:center;padding:4vh 1rem;overflow-y:auto}
.modal-box{background:#fff;border-radius:18px;width:min(820px,100%);padding:1.2rem;box-shadow:0 30px 60px -20px rgba(0,0,0,.5)}
.modal-bar{display:flex;justify-content:space-between;align-items:center;gap:.6rem;flex-wrap:wrap;margin-bottom:1rem}
/* Facture */
.invoice{color:#0d1629;font-size:14px;line-height:1.5;padding:1rem}
.inv-head{display:flex;justify-content:space-between;gap:1rem;flex-wrap:wrap;border-bottom:2px solid #1f6bff;padding-bottom:1rem;margin-bottom:1rem}
.inv-brand{font-family:"Arial Black",Arial,sans-serif;font-size:26px;letter-spacing:.02em;color:#0d1629}
.inv-brand span{font-size:15px;letter-spacing:.22em;color:#1f6bff}
.inv-small{font-size:12.5px;color:#3b475c}
.inv-meta{text-align:right}
.inv-meta h2{font-size:22px;text-transform:uppercase;color:#1f6bff;margin:0 0 .3rem}
.inv-paid,.inv-cancel{display:inline-block;margin-top:.4rem;padding:.2rem .6rem;border:2px solid #0b7a4d;color:#0b7a4d;font-weight:900;border-radius:6px}
.inv-cancel{border-color:#b3202f;color:#b3202f}
.inv-client{background:#f6f8fc;border-radius:10px;padding:.8rem 1rem;margin-bottom:1rem}
.inv-label{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:#55627a;font-weight:800}
.inv-table{width:100%;border-collapse:collapse}
.inv-table th{background:#0d1629;color:#fff;font-size:12px;text-transform:uppercase;letter-spacing:.04em;padding:.5rem .6rem;text-align:left}
.inv-table td{padding:.55rem .6rem;border-bottom:1px solid #e3e8f0}
.inv-table .r{text-align:right}
.inv-total{display:flex;justify-content:flex-end;gap:2rem;align-items:center;margin:1rem 0;font-size:16px}
.inv-total b{font-size:22px;color:#1f6bff}
.inv-foot{font-size:12.5px;color:#3b475c;border-top:1px solid #e3e8f0;padding-top:.8rem}
.inv-foot p{margin-bottom:.3rem}
@media (max-width:640px){.row2{grid-template-columns:1fr}.lines .line{grid-template-columns:1fr 54px 84px 32px}.msg{max-width:95%}}
@media print{
  body.printing-invoice > *:not(.inv-modal){display:none!important}
  body.printing-invoice .inv-modal{position:static;background:none;padding:0;display:block}
  body.printing-invoice .modal-box{box-shadow:none;padding:0;width:100%}
  .no-print{display:none!important}
}

/* Ajouts : inscription obligatoire, devis en ligne, langues */
[hidden]{display:none!important}
.auth-wide{max-width:600px}
.gate{max-width:720px}
.gate h3{font-size:1.15rem}
.gate.ok{border-color:#9ee0c0;background:#f3fcf7}
.devis-hello{margin:-.4rem 0 1.2rem;padding:.7rem 1rem;border-radius:12px;background:#f2f6ff;border:1px solid #cfdcff;color:#1a2b4d;font-size:.92rem}
.devis-hello a{color:#1f6bff;font-weight:700;text-decoration:underline}
.quote-box{border:1px solid #cfdcff;background:#f7f9ff;border-radius:14px;padding:.9rem 1rem;margin:.7rem 0}
.quote-box .tbl{margin-top:.6rem}
.tbl.mini td{padding:.4rem .3rem;font-size:.9rem}
.tbl.mini tr.tot td{font-weight:850;border-bottom:0;color:#1f6bff;font-size:1rem}
.tabs2 .count.ok{background:#12a46b}
.sub-tabs{margin-bottom:1rem}
.sub-tabs button{font-size:.72rem;padding:.45rem .85rem}
.reply-box{margin:.8rem 0 0;padding:1rem;border-radius:14px;background:#f9fbfe;border:1px solid #eef1f6}
.reply-box textarea{min-height:70px}
.pattern-mini{margin:-.3rem 0 .7rem}
.kpi{font-size:1.5rem;font-weight:850;color:#0d1629}
.kpi.due{color:#b3202f}
.acts{white-space:nowrap}
.acts .btn{margin:.15rem 0}
select.pay,.card select.st{font:inherit;font-size:.82rem;border:1px solid #d5dbe5;border-radius:10px;padding:.45rem .6rem;background:#fff;color:#0d1629}
.quick{display:flex;flex-wrap:wrap;gap:.35rem;margin:.6rem 0}
.chip{border:1px dashed #b9c8e6;background:#fff;border-radius:999px;padding:.3rem .7rem;font:inherit;font-size:.78rem;font-weight:700;color:#1f6bff;cursor:pointer}
.chip:hover{border-style:solid}
.inv-dev{margin:0 0 .8rem;font-size:13.5px}
.mb-actions{margin-left:auto}

/* Traductions jointes (devis, factures, messages) */
.inv-tr{display:block;font-size:.86em;color:#6b778c;font-weight:400;text-transform:none;letter-spacing:0;margin-top:.1rem}
.inv-table th .inv-tr{color:#c9d4ea;font-size:10px}
.inv-meta h2 + .inv-tr{color:#1f6bff;font-weight:700;text-transform:uppercase;margin:-.2rem 0 .3rem}
.msg .orig{display:block;margin-top:.35rem;padding-top:.35rem;border-top:1px dashed rgba(0,0,0,.15);font-size:.82rem;opacity:.8}
.msg.me .orig{border-top-color:rgba(255,255,255,.35)}
.msg .orig b{font-size:.7rem;text-transform:uppercase;letter-spacing:.04em}
.msg .tr-btn{display:block;margin-top:.3rem;font-size:.78rem}
.tr-opt{display:flex;align-items:center;gap:.45rem;font-size:.85rem;font-weight:700;color:#3b475c;margin:.2rem 0 .6rem;cursor:pointer}
.tr-opt input{width:18px;height:18px;accent-color:#1f6bff}
.tr-preview{margin:.2rem 0 .7rem;padding:.6rem .8rem;border-radius:10px;background:#fff;border:1px dashed #b9c8e6;font-size:.9rem;white-space:pre-line;color:#1a2b4d}
.tr-preview b{display:block;font-size:.72rem;text-transform:uppercase;letter-spacing:.05em;color:#55627a;margin-bottom:.2rem}
/* Acompte de 50 % sur les devis */
.deposit{margin:.6rem 0 0;font-size:.92rem;color:#334}
.deposit.ok{color:#137a3f;font-weight:600}
.deposit.due{display:flex;flex-wrap:wrap;align-items:center;gap:.4rem .8rem;background:#fff7e6;border:1px solid #f3c969;border-radius:12px;padding:.7rem .9rem}
.deposit.due span{flex:1 1 220px;color:#6b4e00;font-size:.88rem}
.dep-line{font-size:.8rem;margin-top:.2rem}
.dep-line.due{color:#9a6a00;font-weight:600}
.dep-line.ok{color:#137a3f}
.inv-dep{display:flex;justify-content:flex-end;gap:2rem;align-items:center;margin:.3rem 0;font-size:14px;text-align:right}
.inv-dep b{min-width:110px;font-size:15px}
.inv-dep.strong b{color:#1f6bff;font-size:17px}
.inv-dep .inv-tr{display:block}

/* Case « Je ne suis pas un robot » */
.robot{position:relative;margin:0 0 1rem;padding:.8rem .95rem;border:1px solid #d5dbe5;border-radius:12px;background:#f7f9fc}
.robot-box{display:flex;align-items:center;gap:.65rem;cursor:pointer;font-weight:700;color:#0d1629}
.robot-box input{width:22px;height:22px;flex:none;accent-color:#12a46b;cursor:pointer}
.robot-box input:disabled{cursor:default}
.robot-txt{flex:1}
.robot-st{font-size:.82rem;font-weight:700;color:#5b6678;white-space:nowrap}
.robot[data-state="busy"] .robot-st::before{content:"";display:inline-block;width:12px;height:12px;margin-right:.35rem;vertical-align:-1px;border:2px solid #1f6bff;border-right-color:transparent;border-radius:50%;animation:robot-spin .7s linear infinite}
.robot[data-state="ok"]{border-color:#12a46b;background:#effaf5}
.robot[data-state="ok"] .robot-st{color:#12a46b}
.robot[data-state="err"]{border-color:#e5484d}
.robot[data-state="err"] .robot-st{color:#e5484d}
.robot-note{display:block;margin-top:.35rem;font-size:.75rem;color:#7a8597}
.hp{position:absolute!important;left:-10000px!important;width:1px;height:1px;overflow:hidden}
@keyframes robot-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.robot[data-state="busy"] .robot-st::before{animation:none}}

/* IMEI et code de l'appareil, visibles seulement par l'atelier */
.secret-line{margin-top:.25rem;word-break:break-word}
.doc-secret{background:#fff8e6;border-color:#f3d48a;font-size:.92rem;line-height:1.6}
/* Mot de passe : œil afficher / masquer, règle et confirmation */
.pw-wrap{position:relative}
.pw-wrap input{padding-right:3rem}
.pw-eye{position:absolute;z-index:2;top:50%;right:.35rem;transform:translateY(-50%);display:inline-flex!important;align-items:center;justify-content:center;width:2.6rem;height:2.6rem;min-width:0;margin:0;padding:0;border:0;border-radius:10px;background:transparent;color:#5b6577;cursor:pointer;-webkit-appearance:none;appearance:none;touch-action:manipulation}
.pw-eye svg{display:block;width:22px;height:22px;flex:none;pointer-events:none}
/* Un seul œil : celui du site (Edge / Internet Explorer ajoutent le leur) */
.pw-wrap input::-ms-reveal,.pw-wrap input::-ms-clear{display:none}
.pw-eye:hover{color:#1f6bff;background:rgba(31,107,255,.08)}
.pw-eye:focus-visible{outline:2px solid #1f6bff;outline-offset:1px}
.pw-help{font-size:.8rem;color:#5b6577;margin:0}
.pw-help .pw-rule{font-weight:700}
.pw-help .pw-rule::before{content:"• "}
.pw-help.ok .pw-rule{color:#0b7a4d}
.pw-help.ok .pw-rule::before{content:"✓ "}
.pw-match{font-size:.85rem;font-weight:700;margin:0}
.pw-match.ok{color:#0b7a4d}
.pw-match.ko{color:#b3202f}
.fld input[aria-invalid=true]{border-color:#b3202f;box-shadow:0 0 0 3px rgba(179,32,47,.12)}
/* Annulation d'un devis */
.btn.btn-danger{border-color:rgba(179,32,47,.45);color:#b3202f;background:rgba(179,32,47,.05)}
.btn.btn-danger:hover{border-color:#b3202f;background:rgba(179,32,47,.12)}
.btn.btn-danger-solid{background:#b3202f;border-color:#b3202f;color:#fff;box-shadow:none}
/* Acompte non remboursable */
.dep-notice{margin:.5rem 0;font-size:.88rem;font-weight:700;color:#7a4b00;background:#fff6e0;border:1px solid #f5c56b;border-radius:10px;padding:.55rem .7rem}
.dep-ack{margin:.4rem 0 .6rem;font-size:.9rem}
.dep-ackbox{flex:1 1 100%}
.dep-ackbox .muted{margin:0}
/* Onglets Devis / Factures : total de l'onglet */
.tab-kpi{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;padding:.9rem 1.2rem}

/* Dons d'appareils (espace pro) */
.don-thumbs{display:flex;flex-wrap:wrap;gap:.6rem;margin:.7rem 0 .2rem}
.don-th{padding:0;border:1px solid #d5dbe5;border-radius:10px;background:#fff;cursor:zoom-in;overflow:hidden}
.don-th img{display:block;width:88px;height:88px;object-fit:cover}
.don-edit{display:grid;grid-template-columns:1fr 1fr auto;gap:.6rem .8rem;align-items:end;margin-top:.8rem;padding-top:.8rem;border-top:1px solid #e3e8f0}
.don-edit .fld{margin:0}
@media (max-width:720px){.don-edit{grid-template-columns:1fr}}

/* Fiche appareil (espace pro) */
.devspec{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:.4rem;margin:.55rem 0 .6rem;padding:.6rem .7rem;border:1px solid #e3e8f0;border-radius:12px;background:#f7f9fc}
.devspec div{min-width:0}
.devspec dt{font-size:.68rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#6b7891}
.devspec dd{margin:0;font-size:.9rem;font-weight:650;color:#0d1629;overflow-wrap:anywhere}
.devspec div:nth-child(6){grid-column:1/-1}
@media (max-width:720px){.devspec{grid-template-columns:1fr 1fr}.devspec div:nth-child(3){grid-column:1/-1}}

/* Choix de l'appareil (demande de réparation et don) */
.dp .types.dp-cats{grid-template-columns:repeat(4,minmax(0,1fr))!important}
.dp .types.dp-cats span{padding:.85rem .3rem;font-size:.82rem;overflow-wrap:anywhere}
@media (max-width:560px){.dp .types.dp-cats{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
.dp-search{position:relative}
.dp-res{position:absolute;z-index:20;left:0;right:0;top:100%;margin-top:.25rem;max-height:320px;overflow-y:auto;background:#fff;border:1px solid #d5dbe5;border-radius:12px;box-shadow:0 12px 30px -10px rgba(13,22,41,.35);padding:.3rem}
.dp-res button{display:flex;flex-direction:column;align-items:flex-start;gap:.1rem;width:100%;text-align:left;padding:.55rem .7rem;border:0;border-radius:9px;background:none;cursor:pointer;font:inherit;color:#0d1629}
.dp-res button:hover,.dp-res button:focus{background:#eef4ff;outline:none}
.dp-res button:focus-visible{outline:2px solid #1f6bff;outline-offset:-2px}
.dp-res button span{font-size:.8rem;color:#6b7891}
.dp-none{padding:.6rem .7rem;font-size:.88rem;color:#55627a;margin:0}
.dp select,.dp input{width:100%}
.dp-variant{margin:.2rem 0 .4rem;padding:.8rem .9rem .2rem;border:1px dashed #c9d3e3;border-radius:14px;background:#fafcff}
.dp-vt{font-size:.78rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#1f6bff;margin:0 0 .5rem}
.dp-vgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:0 .8rem}
.dp-help{margin:.2rem 0 .9rem;font-size:.9rem;color:#3b475c}
.dp-help summary{cursor:pointer;font-weight:700;color:#1f6bff;display:inline-block}
.dp-help ul{margin:.5rem 0 .3rem;padding-left:1.1rem;display:grid;gap:.35rem}
.dp-help li.on{color:#0d1629;font-weight:600}
.dp-help li.on::marker{color:#1f6bff}
.dp .invalid{outline:2px solid #ff5d6c;outline-offset:2px;border-radius:10px}

/* Champ fichier masqué (bouton « Ajouter une photo ») : ne doit jamais élargir la page */
.field input.sr-file,input.sr-file{width:1px!important;height:1px!important;min-width:0!important;padding:0!important;border:0!important;margin:0!important;clip-path:inset(50%)}
/* Les 8 catégories restent en grille régulière (la règle « dernier bouton pleine largeur » ne s'applique pas ici) */
.dp .types.dp-cats label{grid-column:auto!important}
.dp-search input{padding-left:.9rem}
.dp-help li.on{font-weight:500}
