/* Maison Dutton — Registre des transports */
.tr-shell{--tr-gold:#c9a86a;--tr-ink:#e9dfcc;--tr-muted:#a9a398;color:var(--tr-ink);padding-bottom:32px}.tr-shell *,.tr-overlay *{box-sizing:border-box}.tr-hero{background:radial-gradient(ellipse at 90% 0%,#56432955,transparent 55%),linear-gradient(130deg,#22201d,#121415);border:1px solid #79634277;border-radius:14px;padding:36px 38px;margin-bottom:20px;box-shadow:0 18px 50px #0004}.tr-hero-ornament{font-size:10px;letter-spacing:3px;text-align:center;color:#bd9b60;margin-bottom:25px}.tr-hero-row{display:flex;justify-content:space-between;align-items:center;gap:25px}.tr-eyebrow{color:#c9a86a;font-size:11px;font-weight:700;letter-spacing:2.1px;text-transform:uppercase}.tr-hero h2{font-family:Georgia,serif;font-size:clamp(32px,4vw,52px);font-weight:500;line-height:1.15;margin:8px 0 14px;color:#f3e8d5}.tr-hero h2 em{color:#d5b47b;font-style:normal}.tr-hero p{max-width:680px;color:#bcb4a6;line-height:1.7;margin:0}.tr-primary,.tr-secondary,.tr-danger,.tr-view{cursor:pointer;font:inherit}.tr-primary{background:linear-gradient(135deg,#c6a36b,#9b7645);border:1px solid #e3bf81;color:#191713;border-radius:7px;font-weight:800;padding:13px 20px;white-space:nowrap}.tr-primary:hover{filter:brightness(1.12)}.tr-secondary{background:#252624;border:1px solid #7d6949;color:#f0ddba;padding:11px 17px;border-radius:7px}.tr-danger{background:#402222;border:1px solid #8b4a4a;color:#f3bdbd;padding:11px 17px;border-radius:7px}.tr-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:30px}.tr-stats article{background:linear-gradient(145deg,#252622,#191b1b);border:1px solid #6a5b4266;border-radius:10px;padding:20px 22px;display:flex;flex-direction:column;gap:8px}.tr-stats span{color:#b8a17b;font-size:10px;letter-spacing:1.5px;font-weight:700}.tr-stats strong{font-family:Georgia,serif;font-size:35px;color:#f1dfbe}.tr-stats small{color:#aaa69c}.tr-toolbar{display:flex;align-items:end;justify-content:space-between;gap:18px;margin-bottom:18px}.tr-toolbar h3{font-family:Georgia,serif;font-size:25px;font-weight:500;margin:6px 0 0;color:#f1e6d4}.tr-toolbar h3 small{font:12px sans-serif;color:#a9a398;margin-left:10px}.tr-filters{display:flex;gap:9px;flex-wrap:wrap}.tr-filters input,.tr-filters select,.tr-form-dialog input,.tr-form-dialog select,.tr-form-dialog textarea{background:#171918!important;border:1px solid #665b49!important;border-radius:6px!important;color:#eee3d0!important;padding:11px 12px!important;min-height:43px;font:inherit;max-width:100%}.tr-filters input{min-width:245px}.tr-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.tr-card{background:linear-gradient(165deg,#242522,#181a19);border:1px solid #69583c88;border-radius:12px;overflow:hidden;box-shadow:0 12px 30px #0003;min-width:0}.tr-image{display:block;position:relative;width:100%;height:220px;padding:0;border:0;overflow:hidden;background:#292a25;cursor:pointer}.tr-image img,.tr-detail-image img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .3s}.tr-image:hover img{transform:scale(1.04)}.tr-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;height:100%;width:100%;background:radial-gradient(circle,#55472d,#262622 75%);color:#b99b66}.tr-placeholder span{font-size:68px}.tr-placeholder small{font-size:11px;letter-spacing:3px}.tr-status{display:inline-block;background:#283d32;color:#b7e4c4;border:1px solid #63896e;border-radius:4px;padding:6px 10px;font-size:11px;font-weight:700}.tr-image .tr-status{position:absolute;top:14px;right:14px}.tr-status-attribue{background:#2d3445;color:#c6d8f6;border-color:#6a83aa}.tr-status-entretien{background:#4a3b24;color:#ffe0a3;border-color:#a8894c}.tr-status-hors_service{background:#4c2929;color:#ffc4c4;border-color:#a45c5c}.tr-card-content{padding:20px}.tr-card-category{font-size:10px;letter-spacing:1.4px;color:#c9a86a;text-transform:uppercase}.tr-card h3{font:normal 25px Georgia,serif;color:#f2e5ce;margin:8px 0 16px}.tr-card-specs{display:grid;grid-template-columns:repeat(3,1fr);border-top:1px solid #63574466;border-bottom:1px solid #63574466;padding:13px 0;gap:8px}.tr-card-specs span{display:flex;flex-direction:column;gap:3px}.tr-card-specs b{font-size:21px;color:#e3c48b}.tr-card-specs small{font-size:10px;color:#b5b0a6}.tr-assigned{margin-top:15px;display:flex;justify-content:space-between;align-items:center;gap:10px}.tr-assigned small{color:#a89b86;font-size:10px;letter-spacing:1px}.tr-assigned strong{color:#eee1cb;text-align:right;font-size:13px}.tr-excerpt{color:#b9b3a9;font-size:13px;line-height:1.65;min-height:42px;max-height:64px;overflow:hidden;white-space:pre-line}.tr-view{display:flex;justify-content:space-between;width:100%;border:0;border-top:1px solid #65533866;background:transparent;color:#d3b47b;font-weight:700;text-align:left;padding:15px 0 0;margin-top:14px}.tr-view:hover{color:#ffe0a3}.tr-empty{grid-column:1/-1;text-align:center;border:1px dashed #76623f;padding:60px 25px;border-radius:10px;color:#bbb0a0}.tr-empty>div{font-size:55px;color:#c9a86a}.tr-footnote{text-align:center;margin:32px;color:#8f8065;font-size:10px;letter-spacing:3px}.tr-overlay{position:fixed;inset:0;z-index:999999;background:#050606d9;display:flex;align-items:center;justify-content:center;padding:20px;overflow-y:auto}.tr-dialog{background:#20211f;color:#eee1ca;border:1px solid #9b7946;border-radius:12px;max-width:820px;width:100%;max-height:calc(100vh - 40px);overflow:auto;box-shadow:0 35px 100px #000b;position:relative}.tr-close{position:absolute;right:17px;top:15px;z-index:3;width:38px;height:38px;border-radius:50%;border:1px solid #977b52;background:#171817;color:#f1ddbc;cursor:pointer;font-size:25px}.tr-detail-image{height:270px;background:#302d24}.tr-dialog-body{padding:30px}.tr-dialog-body h2,.tr-form-head h2{font:normal 36px Georgia,serif;margin:9px 0 15px;color:#f2dfbd}.tr-detail-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:25px 0}.tr-detail-grid>div{border:1px solid #625339;background:#181a19;padding:15px;border-radius:6px;display:flex;flex-direction:column;gap:9px}.tr-detail-grid small{color:#c3a36b;font-size:10px;letter-spacing:1px}.tr-detail-grid strong{font-size:15px;overflow-wrap:anywhere}.tr-dialog-body h3{font:normal 22px Georgia,serif;color:#e9d5b3}.tr-paragraph{white-space:pre-wrap;line-height:1.8;color:#c8c0b3}.tr-dialog-actions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin-top:25px}.tr-form-dialog{max-width:850px}.tr-form-head{padding:30px 30px 15px;border-bottom:1px solid #655237}.tr-form-head p{color:#b8aea0}.tr-form-dialog form{padding:24px 30px 30px}.tr-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.tr-form-dialog label{display:flex;flex-direction:column;gap:8px;color:#ddcaa8;font-size:12px;font-weight:700;letter-spacing:.3px}.tr-form-dialog label small{color:#a9a195;font-weight:400}.tr-form-dialog input,.tr-form-dialog select,.tr-form-dialog textarea{width:100%;font-weight:400;letter-spacing:normal}.tr-form-dialog input[type=file]{font-size:12px}.tr-form-dialog input[type=checkbox]{width:auto;min-height:0}.tr-preview{margin:18px 0;background:#171918;border:1px dashed #6c5a3c;border-radius:8px;height:155px;display:flex;align-items:center;justify-content:center;color:#ab9166;overflow:hidden}.tr-preview img{width:100%;height:100%;object-fit:contain}.tr-form-dialog .tr-remove-photo{flex-direction:row;align-items:center;margin-bottom:14px}.tr-form-dialog .tr-full{margin-top:17px}.tr-loading{padding:35px;text-align:center;color:#c9a86a}@media(max-width:1150px){.tr-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.tr-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.tr-toolbar{align-items:start;flex-direction:column}}@media(max-width:680px){.tr-grid,.tr-stats,.tr-form-grid,.tr-detail-grid{grid-template-columns:1fr}.tr-hero{padding:26px 20px}.tr-hero-row{align-items:start;flex-direction:column}.tr-filters,.tr-filters input,.tr-filters select{width:100%;min-width:0}.tr-dialog-body,.tr-form-dialog form,.tr-form-head{padding:20px}.tr-detail-image{height:190px}}

/* Registre des chevaux */
.tr-horses{margin-top:48px;padding-top:34px;border-top:1px solid rgba(183,143,76,.35)}
.tr-horse-heading{display:flex;justify-content:space-between;align-items:center;gap:18px;flex-wrap:wrap;margin-bottom:22px}
.tr-horse-heading h3{font-size:clamp(23px,3vw,34px);margin:7px 0;color:#e9d8b7}
.tr-horse-heading h3 small{font-size:13px;font-weight:400;opacity:.7}
.tr-horse-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,270px),1fr));gap:20px}
.tr-horse-card .tr-image{display:block;width:100%;border:0;cursor:default}
.tr-horse-card .tr-card-content p{line-height:1.5;margin:9px 0}
.tr-horse-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:18px}

/* Bouton de fermeture : centrage fiable dans les deux formulaires. */
.tr-overlay .tr-dialog .tr-close {
  position: absolute; top: 15px; right: 17px; left: auto; bottom: auto;
  display: flex !important; align-items: center !important; justify-content: center !important;
  width: 38px !important; height: 38px !important; min-width: 38px; min-height: 38px;
  padding: 0 !important; margin: 0 !important;
  line-height: 1 !important; font-size: 25px; font-weight: 400;
  text-align: center; text-indent: 0; letter-spacing: 0;
  transform: none; box-sizing: border-box; appearance: none;
}
.tr-overlay .tr-form-head { padding-right: 76px; }
@media (max-width:680px) { .tr-overlay .tr-form-head { padding-right: 65px; } }

/* V4 : croix dessinee par deux traits CSS, independante de la police
   et des styles globaux appliques aux boutons. */
.tr-overlay .tr-dialog button.tr-close {
  position: absolute !important;
  top: 15px !important;
  right: 28px !important;
  left: auto !important;
  display: block !important;
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  min-height: 38px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 1px solid #977b52 !important;
  border-radius: 50% !important;
  background: #171817 !important;
  font-size: 0 !important;
  line-height: 0 !important;
  color: transparent !important;
  text-shadow: none !important;
  text-indent: 0 !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  transform: none !important;
  cursor: pointer;
}
.tr-overlay .tr-dialog button.tr-close::before,
.tr-overlay .tr-dialog button.tr-close::after {
  content: '' !important;
  position: absolute !important;
  display: block !important;
  top: 50% !important;
  left: 50% !important;
  width: 15px !important;
  height: 2px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 1px !important;
  background: #f1ddbc !important;
  transform-origin: center center !important;
  pointer-events: none !important;
}
.tr-overlay .tr-dialog button.tr-close::before { transform: translate(-50%, -50%) rotate(45deg) !important; }
.tr-overlay .tr-dialog button.tr-close::after  { transform: translate(-50%, -50%) rotate(-45deg) !important; }
.tr-overlay .tr-dialog button.tr-close:hover { background: #30291e !important; }
.tr-overlay .tr-form-head { padding-right: 88px; }

/* Tableau de bord : trois indicateurs sur une ligne */
.tr-shell .tr-stats{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:800px){.tr-shell .tr-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:540px){.tr-shell .tr-stats{grid-template-columns:1fr}}

/* Deux compteurs principaux : véhicules et chevaux */
.tr-shell .tr-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:540px){.tr-shell .tr-stats{grid-template-columns:1fr}}

/* Photos entieres sans recadrage, vehicules et chevaux */
.tr-shell .tr-image{height:auto;min-height:220px;aspect-ratio:4/3;background:#151716}
.tr-shell .tr-image img{width:100%;height:100%;object-fit:contain;object-position:center;transform:none!important}
.tr-overlay .tr-detail-image{height:auto;min-height:260px;max-height:75vh;display:flex;align-items:center;justify-content:center;background:#151716}
.tr-overlay .tr-detail-image img{width:100%;height:auto;max-height:75vh;object-fit:contain;object-position:center}
@media(max-width:680px){.tr-shell .tr-image{min-height:170px}.tr-overlay .tr-detail-image{min-height:190px}}

/* Images des fiches : remplir le cadre bord a bord */
.tr-shell .tr-card .tr-image{width:100%;height:auto;min-height:0;aspect-ratio:4 / 3;overflow:hidden;background:#151716}
.tr-shell .tr-card .tr-image img{display:block;width:100%;height:100%;position:absolute;inset:0;object-fit:cover;object-position:center;transform:none!important}
.tr-shell .tr-card .tr-image:hover img{transform:scale(1.025)!important}
.tr-shell .tr-horse-card .tr-image img{object-fit:cover}

/* Centrage stable du libelle et de la fleche du bouton Consulter la fiche */
.tr-shell .tr-card .tr-view {
  display:flex!important;align-items:center!important;justify-content:space-between!important;
  gap:14px;min-height:44px;width:100%;padding:11px 14px!important;
  margin-top:14px;line-height:20px!important;text-align:left;
  border:1px solid #65533866;border-radius:8px;box-sizing:border-box;
}
.tr-shell .tr-card .tr-view span {
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  flex:0 0 20px;min-width:20px;height:20px;line-height:1!important;
  margin:0!important;padding:0!important;position:static!important;transform:none!important;
}
.tr-shell .tr-card .tr-view:hover {background:#292d2e;color:#ffe0a3}
