/* ============================================================
   TurfAI Historique Méthode JSP v4
============================================================ */
.tqhm-wrap{max-width:880px;margin:0 auto;padding:0 20px 60px;font-family:"Barlow",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;}
.tqhm-wrap *{box-sizing:border-box;}
.tqhm-wrap a{text-decoration:none;}

/* ── Header ── */
.tqhm-header{display:flex;align-items:center;gap:14px;padding:20px 0 20px;}
.tqhm-logo-box{width:62px;height:62px;flex-shrink:0;overflow:hidden;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#f8fafc;}
.tqhm-logo-img{width:62px!important;height:62px!important;max-width:62px!important;object-fit:cover!important;display:block!important;border-radius:50%;}
.tqhm-h1{font-size:1.5rem;font-weight:900;color:#0f172a;margin:0 0 3px;line-height:1.2;}
.tqhm-h1-sub{font-size:.85rem;color:#64748b;margin:0;}

/* ── Cagnottes ── */
.tqhm-cagnottes{display:flex;gap:14px;margin-bottom:18px;}
@media(max-width:520px){.tqhm-cagnottes{flex-direction:column;}}
.tqhm-cag{flex:1;border-radius:14px;padding:16px 20px;display:flex;align-items:center;gap:14px;min-height:84px;}

/* Gauche : fond ORANGE (comme ligne orange du graphique) */
.tqhm-cag--orange-dark{background:linear-gradient(135deg,#ea580c,#f97316);border:none;}
.tqhm-cag--orange-dark .tqhm-cag-lbl{color:rgba(255,255,255,.75)!important;}
.tqhm-cag-arrow{font-size:1.5rem;color:#fff;flex-shrink:0;}

/* Droite : fond blanc / bordure orange douce */
.tqhm-cag--white{background:#fff;border:2px solid #fed7aa;}
.tqhm-cag--white .tqhm-cag-lbl{color:#D97706;}
.tqhm-cag-logo{width:42px!important;height:42px!important;max-width:42px!important;object-fit:contain!important;flex-shrink:0;display:block!important;}
.tqhm-cag-lbl{font-size:.64rem;font-weight:700;text-transform:uppercase;letter-spacing:.05em;margin:0 0 4px;line-height:1.3;}
.tqhm-cag-val{font-size:1.7rem;font-weight:900;margin:0;line-height:1;}
.tqhm-pos{color:#fff;}
.tqhm-pos-dark{color:#16a34a;}
.tqhm-neg-dark{color:#dc2626;}

/* ── Graphique ── */
.tqhm-chart-box{background:#fff;border:1px solid #e2e8f0;border-radius:14px;padding:16px 18px 12px;margin-bottom:18px;}
.tqhm-chart-ttl{font-size:.82rem;font-weight:700;color:#64748b;margin:0 0 10px;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:6px;}
.tqhm-chart-note{font-size:.7rem;font-weight:600;color:#94a3b8;background:#f8fafc;border:1px solid #e2e8f0;padding:2px 8px;border-radius:20px;white-space:nowrap;}
.tqhm-chart-area{height:215px;}
.tqhm-chart-leg{display:flex;gap:20px;justify-content:center;margin-top:10px;}
.tqhm-leg{font-size:.76rem;font-weight:700;display:flex;align-items:center;gap:5px;}
.tqhm-leg--green{color:#16a34a;}
.tqhm-leg--orange{color:#f97316;}

/* ── 4 Stats ── */
.tqhm-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:18px;}
@media(max-width:480px){.tqhm-stats{grid-template-columns:repeat(2,1fr);}}
.tqhm-stat{background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:15px 10px;text-align:center;box-shadow:0 1px 3px rgba(0,0,0,.04);}
.tqhm-si{display:flex;align-items:center;justify-content:center;height:26px;margin-bottom:6px;}
.tqhm-sv{display:block;font-size:1.45rem;font-weight:900;color:#0f172a;margin-bottom:3px;}
.tqhm-sl{display:block;font-size:.67rem;color:#64748b;font-weight:700;text-transform:uppercase;letter-spacing:.05em;}

/* ── Archive nav ── */
.tqhm-archive-nav{display:flex;align-items:center;justify-content:center;gap:14px;padding:11px 20px;border-radius:10px;background:linear-gradient(135deg,#fff7e6,#fffbf0);border:1px solid #fed7aa;margin-bottom:16px;}
.tqhm-nav-arr{width:30px;height:30px;border-radius:50%;background:#fff;border:1px solid #fed7aa;display:flex;align-items:center;justify-content:center;font-size:1.1rem;font-weight:700;color:#D97706;transition:all .15s;}
.tqhm-nav-arr:hover{background:#D97706;color:#fff;border-color:#D97706;}
.tqhm-nav-lbl{font-size:.95rem;font-weight:800;color:#0f172a;}
.tqhm-year-sel{padding:4px 8px;border-radius:6px;border:1px solid #fed7aa;background:#fff;font-size:.85rem;font-weight:700;color:#0f172a;cursor:pointer;}

/* ── J / J+1 ── */
.tqhm-today-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:18px;}
@media(max-width:480px){.tqhm-today-grid{grid-template-columns:1fr;}}
.tqhm-today-card{background:#fff;border:1px solid #e2e8f0;border-radius:12px;overflow:hidden;}
.tqhm-today-hd{display:flex;align-items:center;gap:8px;padding:9px 14px;background:#f8fafc;border-bottom:1px solid #e2e8f0;flex-wrap:wrap;}
.tqhm-today-lbl{font-size:.7rem;font-weight:800;color:#0f172a;text-transform:uppercase;letter-spacing:.05em;}
.tqhm-today-hippo{font-size:.68rem;color:#004D25;font-weight:700;}
.tqhm-today-heure{font-size:.66rem;color:#94a3b8;}
.tqhm-today-soon{padding:16px;text-align:center;font-size:.8rem;color:#94a3b8;margin:0;}

/* Abonné : cheval affiché */
.tqhm-today-horse{display:flex;align-items:center;gap:12px;padding:13px;}
.tqhm-today-num{width:42px;height:42px;border-radius:10px;background:#D97706;color:#fff;font-size:1.2rem;font-weight:900;display:flex;align-items:center;justify-content:center;flex-shrink:0;}
.tqhm-today-nom{font-size:.88rem;font-weight:800;color:#0f172a;margin:0 0 2px;}
.tqhm-today-cote{font-size:.74rem;color:#64748b;margin:0;}
.tqhm-today-link{font-size:.7rem;font-weight:700;color:#D97706!important;border:1px solid #D97706;padding:4px 8px;border-radius:6px;margin-left:auto;white-space:nowrap;transition:all .15s;}
.tqhm-today-link:hover{background:#D97706;color:#fff!important;}

/* Cadenas Iris (membre + non connecté) */
.tqhm-lock-card{display:flex;align-items:center;gap:12px;padding:13px;background:linear-gradient(135deg,#004D25 0%,#1a6e35 100%);}
.tqhm-lock-thumb{position:relative;width:46px;height:46px;flex-shrink:0;}
.tqhm-lock-iris{width:46px!important;height:46px!important;border-radius:50%;object-fit:cover;opacity:.7;display:block!important;}
.tqhm-lock-pad{position:absolute;bottom:-2px;right:-2px;background:rgba(0,0,0,.5);border-radius:50%;width:20px;height:20px;display:flex;align-items:center;justify-content:center;}
.tqhm-lock-info{flex:1;}
.tqhm-lock-ttl{font-size:.76rem;font-weight:700;color:#fff;margin:0 0 5px;}
.tqhm-lock-cta{font-size:.72rem;font-weight:700;color:#fbbf24;text-decoration:underline;transition:opacity .15s;}
.tqhm-lock-cta:hover{opacity:.8;}

/* ── Liste ── */
.tqhm-list-hd{font-size:.8rem;font-weight:800;color:#64748b;text-transform:uppercase;letter-spacing:.05em;padding:0 0 10px;border-bottom:2px solid #e2e8f0;margin-bottom:8px;}
.tqhm-list{display:flex;flex-direction:column;gap:3px;}
.tqhm-empty{text-align:center;color:#94a3b8;padding:28px;}

/* Lignes */
.tqhm-row{display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:8px;border-left:4px solid transparent;color:#0f172a;transition:box-shadow .15s;}
a.tqhm-row:hover{box-shadow:0 2px 10px rgba(0,0,0,.08);}
.tqhm-row--placed{background:#f0fdf4;border-left-color:#22c55e;}
.tqhm-row--np{background:#fff5f5;border-left-color:#fca5a5;}
.tqhm-row--ann{background:#f8fafc;border-left-color:#cbd5e1;}
.tqhm-row--pending,.tqhm-row--future{background:#fff;border:1px solid #f1f5f9;border-left:4px solid #e2e8f0;}

.tqhm-row-date{min-width:78px;flex-shrink:0;}
.tqhm-row-day{display:block;font-size:.74rem;font-weight:700;color:#475569;line-height:1.3;}
.tqhm-row-hippo{display:block;font-size:.63rem;color:#94a3b8;font-weight:600;}

/* Cercle numéro */
.tqhm-row-circle{width:32px;height:32px;border-radius:7px;display:flex;align-items:center;justify-content:center;font-size:.9rem;font-weight:900;flex-shrink:0;}
.tqhm-crc--green{background:#16a34a;color:#fff;}
.tqhm-crc--red{background:#dc2626;color:#fff;}
.tqhm-crc--grey{background:#e2e8f0;color:#64748b;}

.tqhm-row-nom{flex:1;font-size:.86rem;font-weight:700;color:#0f172a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.tqhm-row-cote,.tqhm-row-rap{display:flex;flex-direction:column;align-items:center;gap:1px;min-width:54px;flex-shrink:0;}
.tqhm-mlbl{font-size:.58rem;font-weight:700;color:#94a3b8;text-transform:uppercase;letter-spacing:.04em;}
.tqhm-cote-v{font-size:.8rem;font-weight:700;color:#D97706;}
.tqhm-rap-v{font-size:.83rem;font-weight:800;color:#0f172a;}

.tqhm-row-right{flex-shrink:0;margin-left:auto;}
.tqhm-badge{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:.68rem;font-weight:800;}
.tqhm-bdg--green{background:#dcfce7;color:#166534;}
.tqhm-bdg--red{background:#fee2e2;color:#dc2626;}
.tqhm-bdg--grey{background:#f1f5f9;color:#94a3b8;}

.tqhm-row-ann{flex:1;font-size:.8rem;color:#94a3b8;font-style:italic;}

/* Lock lignes futures */
.tqhm-row-lockrow{display:flex;align-items:center;gap:8px;flex:1;}
.tqhm-lock-sm{position:relative;width:32px;height:32px;flex-shrink:0;}
.tqhm-lock-iris-sm{width:32px!important;height:32px!important;border-radius:7px;object-fit:cover;opacity:.55;display:block!important;}
.tqhm-lock-pad-sm{position:absolute;bottom:-2px;right:-2px;background:rgba(0,77,37,.75);border-radius:50%;width:14px;height:14px;display:flex;align-items:center;justify-content:center;}
.tqhm-row-locktext{font-size:.74rem;color:#64748b;flex:1;}
.tqhm-row-lockcta{color:#D97706!important;font-weight:700;text-decoration:underline;}

@media(max-width:480px){
    .tqhm-row-cote,.tqhm-row-rap{display:none;}
    .tqhm-h1{font-size:1.25rem;}
    .tqhm-cag-val{font-size:1.3rem;}
    .tqhm-chart-ttl{flex-direction:column;align-items:flex-start;}
}

/* ── GATE — accès page non connecté ─────────────────── */
.tqhm-gate {
    margin: 32px 0;
    display: flex;
    justify-content: center;
}
.tqhm-gate-inner {
    max-width: 500px;
    width: 100%;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 40px 36px 36px;
    text-align: center;
    box-shadow:
        0 4px 6px rgba(0,0,0,.05),
        0 10px 30px rgba(0,0,0,.10),
        0 20px 60px rgba(0,0,0,.06);
}
.tqhm-gate-lock {
    position: relative;
    width: 110px;
    height: 120px;
    margin: 0 auto 20px;
    display: inline-block;
}
.tqhm-gate-iris {
    width: 110px !important;
    height: 120px !important;
    border-radius: 18px;
    object-fit: cover;
    object-position: center 10%; /* légèrement vers le haut pour voir le visage + buste */
    display: block !important;
}
.tqhm-gate-pad {
    position: absolute;
    bottom: -6px;
    right: -6px;
    background: #004D25;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.tqhm-gate-title {
    font-size: 1.15rem;
    font-weight: 900;
    color: #0f172a;
    margin: 0 0 10px;
}
.tqhm-gate-sub {
    font-size: .88rem;
    color: #64748b;
    margin: 0 0 24px;
    line-height: 1.6;
}
.tqhm-gate-btns {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.tqhm-gate-btn {
    padding: 12px 28px;
    border-radius: 50px;
    font-size: .9rem;
    font-weight: 800;
    text-decoration: none;
    transition: all .18s;
}
.tqhm-gate-btn--green {
    background: #004D25;
    color: #fff !important;
}
.tqhm-gate-btn--green:hover { background: #1a6e35; }
.tqhm-gate-btn--outline {
    background: #fff;
    color: #0f172a !important;
    border: 2px solid #e2e8f0;
}
.tqhm-gate-btn--outline:hover { border-color: #004D25; color: #004D25 !important; }
.tqhm-gate-note {
    font-size: .76rem;
    color: #94a3b8;
    margin: 0;
}

/* White text on orange cagnotte cumul */
.tqhm-cag--orange-dark .tqhm-cag-val,
.tqhm-cag--orange-dark .tqhm-cag-val.tqhm-pos-w,
.tqhm-cag--orange-dark p {
    color: #fff !important;
}
.tqhm-cag--orange-dark .tqhm-cag-lbl {
    color: rgba(255,255,255,.75) !important;
}
.tqhm-pos-w { color: #fff !important; }

.tqhm-bdg--orange { background:#FB8500 !important; color:#fff !important; }
.tqhm-row--disq { background:#fff7ed !important; border-color:#fed7aa !important; opacity:.85; }

.tqhm-row--waiting { background:#f8fafc !important; border-color:#e2e8f0 !important; }
