/* ToulouseMaroc Collecte — composants de réservation (autonomes, indépendants du thème) */
:root{--tm-red:#A61E2B;--tm-red-d:#8A1622;--tm-red-l:#FBEDEE;--tm-ink:#1F2328;--tm-mut:#5B616B;--tm-bg2:#F5F6F8;--tm-line:#E4E6EA;--tm-ok:#1E7A4C;--tm-r:16px}
.tm-app-root,.tm-confirm,.tm-tour,.tm-contact{color:var(--tm-ink);font-size:16px;line-height:1.5;-webkit-font-smoothing:antialiased}
.tm-app-root *,.tm-confirm *,.tm-tour *,.tm-contact *{box-sizing:border-box}
.tm-app-root [hidden],.tm-contact [hidden]{display:none!important}
.tm-loading{padding:48px 0;text-align:center;color:var(--tm-mut)}
.tm-h1{font-size:clamp(24px,6vw,30px);line-height:1.2;font-weight:700;letter-spacing:-.01em;margin:8px 0 20px;outline:none}
.tm-sub{margin:-12px 0 20px;color:var(--tm-mut);font-weight:600}
.tm-muted{color:var(--tm-mut)}
.tm-center{text-align:center}
.tm-kicker{font-size:13px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--tm-red);margin:0}
.tm-note{background:var(--tm-bg2);border-radius:12px;padding:12px 14px;font-size:14px;color:var(--tm-mut);margin:20px 0}
.tm-card{background:#fff;border:1px solid var(--tm-line);border-radius:var(--tm-r);padding:20px;box-shadow:0 1px 2px rgba(16,24,40,.04)}
.tm-btn{display:flex;align-items:center;justify-content:center;width:100%;min-height:56px;padding:0 24px;border:0;border-radius:12px;background:var(--tm-red);color:#fff!important;font:inherit;font-size:17px;font-weight:700;letter-spacing:.02em;text-decoration:none!important;cursor:pointer;transition:background .15s,transform .1s}
.tm-btn:hover{background:var(--tm-red-d)}
.tm-btn:active{transform:scale(.98)}
.tm-btn:disabled{opacity:.55;cursor:default}
.tm-btn-ghost{background:#fff;color:var(--tm-ink)!important;border:1.5px solid var(--tm-line)}
.tm-btn-ghost:hover{background:var(--tm-bg2)}
.tm-link{background:none;border:0;padding:0;font:inherit;font-size:15px;color:var(--tm-red);text-decoration:underline;text-underline-offset:3px;cursor:pointer;display:inline-block}
.tm-error{background:var(--tm-red-l);color:var(--tm-red-d);border-radius:12px;padding:12px 14px;font-size:15px;font-weight:600;margin:0 0 12px}
.tm-hp{position:absolute!important;left:-9999px!important;width:1px;height:1px;overflow:hidden}

/* ---------- Parcours ---------- */
.tm-flow{max-width:560px;margin:0 auto;padding-bottom:120px}
.tm-top{position:sticky;top:0;z-index:5;display:flex;align-items:center;gap:12px;background:#fff;padding:12px 0 14px;margin-bottom:8px}
.tm-back{flex:0 0 44px;height:44px;border-radius:50%;border:1px solid var(--tm-line);background:#fff;font-size:26px;line-height:1;color:var(--tm-ink);cursor:pointer}
.tm-prog{flex:1;min-width:0}
.tm-prog span{display:block;font-size:13px;font-weight:600;color:var(--tm-mut);margin-bottom:6px}
.tm-bar{height:6px;background:var(--tm-bg2);border-radius:6px;overflow:hidden}
.tm-bar i{display:block;height:100%;background:var(--tm-red);border-radius:6px;transition:width .3s ease}
.tm-foot{position:fixed;left:0;right:0;bottom:0;z-index:20;background:rgba(255,255,255,.96);backdrop-filter:blur(8px);border-top:1px solid var(--tm-line);padding:12px 16px calc(12px + env(safe-area-inset-bottom))}
.tm-foot>*{max-width:560px;margin-left:auto;margin-right:auto}

.tm-days{display:grid;gap:12px}
.tm-day{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:2px;width:100%;min-height:84px;padding:18px 48px 18px 20px;border:1.5px solid var(--tm-line);border-radius:var(--tm-r);background:#fff;font:inherit;text-align:left;color:var(--tm-ink);cursor:pointer;transition:border-color .15s,box-shadow .15s}
.tm-day:hover{border-color:var(--tm-red);box-shadow:0 4px 16px rgba(166,30,43,.08)}
.tm-day em{font-style:normal;font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--tm-red)}
.tm-day strong{font-size:19px}
.tm-day span{font-size:14px;color:var(--tm-ok);font-weight:600}
.tm-day b{position:absolute;right:20px;top:50%;transform:translateY(-50%);font-size:26px;color:var(--tm-mut);font-weight:400}
.tm-day.is-on{border-color:var(--tm-red);background:var(--tm-red-l)}
.tm-day:disabled{opacity:.5;cursor:not-allowed;box-shadow:none;border-color:var(--tm-line)}
.tm-day:disabled span{color:var(--tm-mut)}

.tm-slots{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
.tm-slot{min-height:56px;border:1.5px solid var(--tm-line);border-radius:12px;background:#fff;font:inherit;font-size:18px;font-weight:700;color:var(--tm-ink);cursor:pointer}
.tm-slot:hover{border-color:var(--tm-red);color:var(--tm-red)}
.tm-slot.is-on{background:var(--tm-red);border-color:var(--tm-red);color:#fff}
.tm-slot:disabled{background:var(--tm-bg2);color:#A7ACB3;text-decoration:line-through;cursor:not-allowed;border-color:transparent}

.tm-field{display:flex;flex-direction:column;gap:6px;margin-bottom:16px;font-size:15px;font-weight:600}
.tm-field input,.tm-field textarea{width:100%;min-height:54px;padding:14px 16px;border:1.5px solid var(--tm-line);border-radius:12px;background:#fff;font:inherit;font-size:17px;font-weight:400;color:var(--tm-ink);-webkit-appearance:none;appearance:none}
.tm-field textarea{min-height:120px}
.tm-field input:focus,.tm-field textarea:focus{outline:none;border-color:var(--tm-red);box-shadow:0 0 0 3px var(--tm-red-l)}
.tm-field small{font-weight:400;color:var(--tm-mut);font-size:13px}
.tm-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.tm-more{margin:4px 0 16px}
.tm-more summary{cursor:pointer;color:var(--tm-red);font-weight:600;padding:8px 0;list-style:none}
.tm-more summary::before{content:'+ '}
.tm-more[open] summary::before{content:'− '}

.tm-group{margin-bottom:20px}
.tm-label{font-size:14px;font-weight:700;color:var(--tm-mut);margin:14px 0 8px}
.tm-group .tm-label{margin-top:0}
.tm-chips{display:flex;flex-wrap:wrap;gap:8px}
.tm-chip{min-height:44px;padding:0 16px;border:1.5px solid var(--tm-line);border-radius:999px;background:#fff;font:inherit;font-size:15px;font-weight:600;color:var(--tm-ink);cursor:pointer;text-decoration:none;display:inline-flex;align-items:center}
.tm-chip:hover{border-color:var(--tm-red)}
.tm-chip.is-on{background:var(--tm-ink);border-color:var(--tm-ink);color:#fff}
.tm-parcel{border:1px solid var(--tm-line);border-radius:var(--tm-r);padding:16px;margin-bottom:12px;background:#fff}
.tm-parcel-head{display:flex;justify-content:space-between;align-items:center}
.tm-add{width:100%;min-height:52px;border:1.5px dashed #C9CDD3;border-radius:12px;background:transparent;font:inherit;font-weight:700;color:var(--tm-ink);cursor:pointer}
.tm-add:hover{border-color:var(--tm-red);color:var(--tm-red)}

.tm-consent{display:flex;gap:12px;align-items:flex-start;padding:14px;border-radius:12px;background:var(--tm-bg2);font-size:15px;cursor:pointer}
.tm-consent input{width:22px;height:22px;flex:0 0 22px;margin-top:1px;accent-color:var(--tm-red)}
.tm-consent a{color:var(--tm-red)}

.tm-recap{padding:22px}
.tm-recap-big{font-size:22px;font-weight:800;letter-spacing:.01em}
.tm-recap-time{font-size:34px;font-weight:800;color:var(--tm-red);line-height:1.1;margin:4px 0 14px}
.tm-recap-time small{display:block;font-size:13px;font-weight:600;color:var(--tm-mut)}
.tm-recap-sub{color:var(--tm-mut);margin-bottom:14px}
.tm-rec{display:flex;justify-content:space-between;gap:12px;padding:14px 0;border-top:1px solid var(--tm-line)}
.tm-rec span{font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--tm-mut)}
.tm-rec p{margin:2px 0 0}
.tm-rec small{color:var(--tm-mut)}
.tm-recap>.tm-edit{margin-top:6px}
.tm-pay{display:flex;flex-direction:column;gap:2px;margin:16px 0;padding:14px 16px;border-radius:12px;border:1.5px solid var(--tm-ink)}
.tm-pay span{font-size:14px;color:var(--tm-mut)}

/* ---------- Confirmation ---------- */
.tm-confirm{max-width:520px;margin:0 auto;display:flex;flex-direction:column;gap:14px;padding:12px 0 40px}
.tm-confirm .tm-h1{margin:0}
.tm-check{width:72px;height:72px;border-radius:50%;background:var(--tm-ok);color:#fff;display:grid;place-items:center;font-size:38px;font-weight:700;animation:tm-pop .35s ease-out}
@keyframes tm-pop{from{transform:scale(.6);opacity:0}to{transform:none;opacity:1}}
.tm-dl{display:grid;grid-template-columns:auto 1fr;gap:10px 16px;margin:0;padding-top:14px;border-top:1px solid var(--tm-line)}
.tm-dl dt{font-size:13px;color:var(--tm-mut);font-weight:600}
.tm-dl dd{margin:0}

/* ---------- Tournée ---------- */
.tm-tour{max-width:560px;margin:0 auto;padding-bottom:40px}
.tm-tour-head{position:sticky;top:0;z-index:5;background:#fff;padding:8px 0 12px;margin-bottom:8px}
.tm-tour-head .tm-h1{margin:2px 0 4px}
.tm-tour-head .tm-muted{margin:0 0 10px}
.tm-tour .tm-chips{flex-wrap:nowrap;overflow-x:auto;padding-bottom:4px}
.tm-tour .tm-chip{white-space:nowrap;min-height:38px}
.tm-stop{background:#fff;border:1px solid var(--tm-line);border-left:5px solid var(--tm-red);border-radius:var(--tm-r);padding:16px;margin-bottom:14px;transition:opacity .2s}
.tm-stop.is-collected{border-left-color:var(--tm-ok);opacity:.7}
.tm-stop.is-absent{border-left-color:#A7ACB3;opacity:.7}
.tm-stop.is-busy{opacity:.4;pointer-events:none}
.tm-stop-top{display:flex;justify-content:space-between;align-items:center}
.tm-stop-time{font-size:26px;font-weight:800}
.tm-badge{font-size:12px;font-weight:700;padding:4px 10px;border-radius:999px;background:var(--tm-bg2);color:var(--tm-mut)}
.tm-stop.is-collected .tm-badge{background:#E3F4EA;color:var(--tm-ok)}
.tm-stop.is-to_collect .tm-badge{background:var(--tm-red-l);color:var(--tm-red-d)}
.tm-stop-name{font-size:19px;margin:6px 0 2px}
.tm-stop-addr,.tm-stop-meta{margin:4px 0;font-size:15px}
.tm-stop-addr small,.tm-stop-meta small{color:var(--tm-mut)}
.tm-stop-ref{font-size:12px;color:var(--tm-mut);margin:4px 0 12px}
.tm-stop-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:8px}
.tm-act{display:flex;align-items:center;justify-content:center;min-height:52px;border-radius:12px;background:var(--tm-ink);color:#fff!important;font-weight:700;text-decoration:none!important}
.tm-act:first-child{background:var(--tm-red)}
.tm-stop-status{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
.tm-stop-status button{min-height:46px;border:1.5px solid var(--tm-line);border-radius:10px;background:#fff;font:inherit;font-size:14px;font-weight:700;color:var(--tm-ink);cursor:pointer}
.tm-stop.is-to_collect [data-s=to_collect],.tm-stop.is-collected [data-s=collected],.tm-stop.is-absent [data-s=absent]{background:var(--tm-ink);border-color:var(--tm-ink);color:#fff}

/* ---------- Contact ---------- */
.tm-contact{max-width:560px}
.tm-contact-quick{display:grid;gap:10px;margin-bottom:16px}
.tm-form .tm-btn{margin-top:4px}
.tm-ok{background:#E3F4EA;color:var(--tm-ok);border-radius:12px;padding:12px 14px;font-weight:600;margin:12px 0 0}

@media (min-width:768px){
	.tm-slots{grid-template-columns:repeat(4,1fr)}
	.tm-flow{padding-bottom:40px}
	.tm-foot{position:static;background:none;backdrop-filter:none;border:0;padding:24px 0 0}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
