/* jec-frontend.css — styles scopés .jec-* (< 5 Ko) */

/* ── Badge statut [jec_status] ─────────────────────────────── */
.jec-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: .85em;
    font-weight: 600;
    line-height: 1.4;
    vertical-align: middle;
}

.jec-status-badge--green {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.jec-status-badge--orange {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.jec-status-badge--gray {
    background: #e9ecef;
    color: #495057;
    border: 1px solid #dee2e6;
}

.jec-status-date {
    font-size: .9em;
    color: #666;
    vertical-align: middle;
}

/* ── Bloc participations — fiche produit ────────────────────── */
.jec-participation-block {
    margin: 10px 0;
}

.jec-participation-count {
    font-size: .95em;
    color: #555;
}

.jec-product-closed {
    margin: 10px 0;
    padding: 8px 12px;
    background: #fff3cd;
    border-left: 3px solid #ffc107;
    font-size: .9em;
    color: #856404;
}

/* ── Compteur public [jec_counter] — Road Trip ──────────────── */
.jec-counter-wrap {
    font-family: inherit;
    text-align: center;
    margin: 2rem 0;
}

/* ---- En-tête chiffres ---- */
.jec-counter__head {
    padding: 0 0 16px;
}

.jec-counter-number {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    color: #172236;
    line-height: 1;
    letter-spacing: -1px;
}

.jec-counter-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: #667085;
    text-transform: uppercase;
    margin-top: 0.25rem;
}

.jec-counter-sub {
    font-size: 0.8rem;
    color: #667085;
    margin-top: 0.35rem;
}

/* ---- Scène ---- */
.jec-counter-scene {
    position: relative;
    width: 100%;
    height: 130px;
    overflow: hidden;
    border-radius: 12px;
    margin-top: 1.25rem;
    background: #C8E6F5;
}

/* ---- Ciel ---- */
.jec-sky {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 65%;
    background: #C8E6F5;
}

.jec-cloud {
    position: absolute;
    top: 8px;
}
.jec-cloud--1 { left: 12%; }
.jec-cloud--2 { right: 20%; top: 14px; }

/* ---- Herbe ---- */
.jec-grass {
    position: absolute;
    bottom: 38px;
    left: 0;
    right: 0;
    height: 30px;
    background: #5A9E3A;
    border-top: 2px solid #3d7a22;
}

.jec-tree {
    position: absolute;
    bottom: 0;
}
.jec-tree--1 { left: 8%; }
.jec-tree--2 { right: 12%; }
.jec-tree--3 { left: 55%; }

/* ---- Route ---- */
.jec-road {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 38px;
    background: #172236;
}

.jec-road-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: repeating-linear-gradient(
        to right,
        #F7F8F8 0px,
        #F7F8F8 24px,
        transparent 24px,
        transparent 44px
    );
    background-size: 44px 2px;
    transform: translateY(-50%);
    opacity: 0.5;
    animation: jec-road-scroll 0.6s linear infinite;
}

@keyframes jec-road-scroll {
    from { background-position-x: 0; }
    to   { background-position-x: -44px; }
}

/* ---- Van ---- */
.jec-van-wrapper {
    position: absolute;
    bottom: 30px;
    left: 8px;
    transition: left 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.jec-van-svg {
    display: block;
    width: 72px;
    height: auto;
    filter: drop-shadow(2px 2px 3px rgba(23, 34, 54, 0.25));
}

@keyframes jec-van-bounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-2px); }
}
.jec-van-wrapper.jec-moving {
    animation: jec-van-bounce 0.4s ease-in-out infinite;
}

/* ---- Marqueurs ---- */
.jec-markers {
    position: absolute;
    bottom: 4px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 8px;
}
.jec-marker {
    font-size: 10px;
    color: #F7F8F8;
    opacity: 0.7;
    font-weight: 500;
    letter-spacing: 0.05em;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
    .jec-counter-scene { height: 90px; }
    .jec-van-svg { width: 48px; }
    .jec-van-wrapper { bottom: 20px; }
    .jec-cloud--2 { display: none; }
}

/* ── Statut inline [jec_status] ─────────────────────────────── */
.jec-status {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    vertical-align: middle;
}
.jec-status--upcoming { background: #172236; color: #F7F8F8; }
.jec-status--open     { background: #96C11F; color: #172236; }
.jec-status--closed   { background: #667085; color: #F7F8F8; }

/* ── Compteur hors-période — badge + scène statique ─────────── */
.jec-counter-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}
.jec-counter-badge--upcoming { background: #172236; color: #F7F8F8; }
.jec-counter-badge--closed   { background: #667085; color: #F7F8F8; }

.jec-counter-coming-date {
    font-size: 0.9rem;
    color: #667085;
    margin: 0 0 0.75rem;
}

.jec-counter-scene--static .jec-road-line {
    animation: none;
}
.jec-counter-scene--static .jec-sky {
    opacity: 0.75;
}

.jec-van-wrapper--end {
    left: auto !important;
    right: 8px;
}

/* ── Mon Compte — notice état concours ──────────────────────── */
.jec-account-notice {
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
}
.jec-account-notice--upcoming {
    background: #EEF4FF;
    border-left: 4px solid #172236;
    color: #172236;
}
.jec-account-notice--closed {
    background: #F5F5F5;
    border-left: 4px solid #667085;
    color: #667085;
}

/* ── Groupes de concours (Mon Compte) ───────────────────────── */
.jec-contest-group {
    margin-bottom: 2rem;
}

.jec-contest-group__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.jec-contest-group__title {
    font-size: 1rem;
    font-weight: 700;
    color: #172236;
    margin: 0;
}

.jec-contest-group--archived .jec-contest-group__title {
    color: #667085;
}

.jec-contest-group__total {
    font-size: 0.8rem;
    color: #667085;
    margin-left: auto;
}

.jec-participations-table {
    width: 100%;
    margin-bottom: 0;
}

/* ── Section archives collapse ───────────────────────────────── */
.jec-archives {
    margin-top: 2rem;
    border-top: 1px solid #e5e7eb;
    padding-top: 1.25rem;
}

.jec-archives__toggle {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: none;
    border: 1.5px solid #172236;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #172236;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: background 0.15s;
}

.jec-archives__toggle:hover {
    background: #F7F8F8;
}

.jec-archives__chevron {
    margin-left: auto;
    font-size: 0.7rem;
    transition: transform 0.2s;
}

.jec-archives__toggle[aria-expanded="true"] .jec-archives__chevron {
    transform: rotate(180deg);
}

.jec-archives__panel {
    margin-top: 1.25rem;
}

/* ── Mon Compte — badges numéros ────────────────────────────── */
.jec-numero-badge {
    display: inline-block;
    margin: 2px;
    padding: 2px 7px;
    background: #f0f4ff;
    border: 1px solid #c5d0ff;
    border-radius: 3px;
    font-size: .85em;
    font-weight: 600;
    color: #2d3a8c;
}

.jec-account-summary,
.jec-account-status {
    margin: 0 0 8px;
}
