/* ═══════════════════════════════════════════════
   PAGE CRITÉRIUM — CDTT76
   ═══════════════════════════════════════════════ */

:root {
    --navy:       #0D2A6B;
    --navy-light: #1a3a85;
    --red:        #D4192C;
    --red-hover:  #b8152b;
    --light:      #F4F6FB;
    --border:     #e2e6f0;
    --text:       #1a1a2e;
    --muted:      #6b7280;
    --white:      #ffffff;
    --radius:     12px;
    --shadow:     0 2px 16px rgba(13,42,107,.08);
    --shadow-lg:  0 8px 32px rgba(13,42,107,.14);
    --transition: .22s ease;

    --done-color:    #2e7d32;
    --done-bg:       rgba(46,125,50,.1);
    --active-color:  #e65100;
    --active-bg:     rgba(230,81,0,.1);
    --upcoming-color: #6b7280;
    --upcoming-bg:    rgba(107,114,128,.1);
}

.page-criterium .container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ═══ HERO ══════════════════════════════════════ */
.crit-hero {
    position: relative;
    background: var(--navy);
    color: var(--white);
    padding: 64px 0 56px;
    overflow: hidden;
    text-align: center;
}

.crit-hero__bg {
    position: absolute; inset: 0;
    background-image:
        radial-gradient(circle at 10% 70%, rgba(212,25,44,.18) 0%, transparent 45%),
        radial-gradient(circle at 88% 20%, rgba(255,255,255,.05) 0%, transparent 40%);
    pointer-events: none;
}

.page-criterium .section-label {
    display: inline-block;
    font-size: .7rem; font-weight: 700;
    letter-spacing: .14em; text-transform: uppercase;
    color: var(--red); background: rgba(212,25,44,.15);
    padding: 4px 14px; border-radius: 100px; margin-bottom: 16px;
}

.crit-hero__title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 900; line-height: 1.1;
    margin: 0 0 14px; color: var(--white);
}
.crit-hero__title span { color: var(--red); }

.crit-hero__sub {
    font-size: .93rem; color: rgba(255,255,255,.65);
    max-width: 540px; margin: 0 auto 32px; line-height: 1.6;
}

/* Barre progression hero */
.crit-hero__progress-wrap {
    max-width: 560px;
    margin: 0 auto 28px;
}

.crit-progress {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 12px;
    padding: 16px 20px;
}

.crit-progress__header {
    display: flex; justify-content: space-between;
    font-size: .78rem; color: rgba(255,255,255,.65);
    margin-bottom: 12px;
}

.crit-progress__value { font-weight: 700; color: var(--white); }

.crit-progress__bar {
    position: relative;
    height: 8px;
    background: rgba(255,255,255,.15);
    border-radius: 100px;
}

.crit-progress__fill {
    position: absolute; left: 0; top: 0; height: 100%;
    background: linear-gradient(90deg, var(--red), #ff6b35);
    border-radius: 100px;
    transition: width .6s ease;
}

.crit-progress__marker {
    position: absolute; top: 50%;
    transform: translate(-50%, -50%);
    width: 22px; height: 22px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .65rem; font-weight: 800;
    border: 2px solid rgba(255,255,255,.3);
    background: var(--navy);
    color: rgba(255,255,255,.6);
}

.crit-progress__marker--done {
    background: var(--done-color);
    border-color: var(--done-color);
    color: var(--white);
}

.crit-progress__marker--active {
    background: var(--active-color);
    border-color: var(--active-color);
    color: var(--white);
    box-shadow: 0 0 0 4px rgba(230,81,0,.3);
}

/* Stats */
.crit-hero__stats {
    display: inline-flex; align-items: center;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 100px; padding: 10px 28px;
}

.crit-stat { display: flex; align-items: center; gap: 8px; }
.crit-stat__num   { font-size: 1.4rem; font-weight: 800; color: var(--white); }
.crit-stat__label { font-size: .8rem; color: rgba(255,255,255,.65); }
.crit-stat__sep   { width: 1px; height: 26px; background: rgba(255,255,255,.2); margin: 0 18px; }

/* ═══ INTRO ══════════════════════════════════════ */
.crit-intro {
    background: var(--white);
    padding: 40px 0;
    border-bottom: 1px solid var(--border);
}

.crit-intro__card {
    display: flex; align-items: flex-start; gap: 20px;
    background: var(--light);
    border: 1px solid var(--border);
    border-left: 4px solid var(--red);
    border-radius: var(--radius);
    padding: 24px 28px;
    max-width: 800px;
    margin: 0 auto;
}

.crit-intro__icon {
    width: 44px; height: 44px;
    background: var(--red); color: var(--white);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.crit-intro__title {
    font-size: 1rem; font-weight: 800;
    color: var(--navy); margin: 0 0 8px;
}

.crit-intro__text {
    font-size: .9rem; color: var(--muted);
    line-height: 1.65; margin: 0;
}

/* ═══ SECTION HEADERS ════════════════════════════ */
.crit-section-header { margin-bottom: 40px; }

.crit-section-title {
    font-size: clamp(1.4rem, 2.5vw, 1.9rem);
    font-weight: 900; color: var(--navy); margin: 8px 0 0;
}

/* ═══ TIMELINE HORIZONTALE ═══════════════════════ */
.crit-tours {
    background: var(--white);
    padding: 56px 0 64px;
}

.tours-timeline {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}

/* Track horizontale */
.tours-timeline__track {
    position: absolute;
    top: 22px; /* centre des bulles */
    left: 12.5%; right: 12.5%;
    height: 4px;
    background: var(--border);
    border-radius: 100px;
    z-index: 0;
}

.tours-timeline__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--done-color), #66bb6a);
    border-radius: 100px;
    transition: width .6s ease;
}

/* Colonne tour */
.tour-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
    padding: 0 10px;
}

/* Bulle numéro */
.tour-item__bubble {
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .85rem; font-weight: 900;
    border: 3px solid var(--border);
    background: var(--white);
    color: var(--muted);
    position: relative;
    flex-shrink: 0;
    transition: all var(--transition);
}

.tour-item--done .tour-item__bubble {
    background: var(--done-color);
    border-color: var(--done-color);
    color: var(--white);
}

.tour-item--active .tour-item__bubble {
    background: var(--active-color);
    border-color: var(--active-color);
    color: var(--white);
    box-shadow: 0 0 0 6px rgba(230,81,0,.18);
}

/* Pulse animé pour le tour en cours */
.tour-item__pulse {
    position: absolute; inset: -6px;
    border-radius: 50%;
    border: 2px solid var(--active-color);
    opacity: .5;
    animation: pulse-ring 1.8s ease-out infinite;
}

@keyframes pulse-ring {
    0%   { transform: scale(.85); opacity: .5; }
    70%  { transform: scale(1.3); opacity: 0; }
    100% { transform: scale(1.3); opacity: 0; }
}

/* Card tour */
.tour-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}

.tour-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.tour-item--done .tour-card   { border-top: 3px solid var(--done-color); }
.tour-item--active .tour-card { border-top: 3px solid var(--active-color); }
.tour-item--upcoming .tour-card { border-top: 3px solid var(--border); }

.tour-card__header {
    padding: 14px 16px 10px;
    display: flex; flex-direction: column; gap: 6px;
    border-bottom: 1px solid var(--border);
}

.tour-card__status {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: .65rem; font-weight: 700;
    letter-spacing: .07em; text-transform: uppercase;
    padding: 3px 10px; border-radius: 100px;
    width: fit-content;
}

.tour-card__status--done     { background: var(--done-bg);     color: var(--done-color); }
.tour-card__status--active   { background: var(--active-bg);   color: var(--active-color); }
.tour-card__status--upcoming { background: var(--upcoming-bg); color: var(--upcoming-color); }

.dot-pulse {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--active-color);
    display: inline-block;
    animation: dot-blink .9s ease-in-out infinite alternate;
}

@keyframes dot-blink {
    from { opacity: .4; } to { opacity: 1; }
}

.tour-card__num {
    font-size: .9rem; font-weight: 800; color: var(--navy);
}

.tour-card__body {
    padding: 12px 16px;
    display: flex; flex-direction: column; gap: 7px;
    border-bottom: 1px solid var(--border);
}

.tour-card__info {
    display: flex; align-items: center; gap: 7px;
    font-size: .8rem; color: var(--text);
}

.tour-card__info svg { color: var(--muted); flex-shrink: 0; }

.tour-card__info--empty {
    font-size: .78rem; color: var(--muted);
    font-style: italic;
}

/* Boutons documents dans la card */
.tour-card__docs {
    padding: 12px 16px;
    display: flex; flex-direction: column; gap: 6px;
}

.tour-doc-btn {
    display: flex; align-items: center; gap: 7px;
    font-size: .78rem; font-weight: 600;
    padding: 7px 12px; border-radius: 7px;
    text-decoration: none; transition: all var(--transition);
    border: 1.5px solid transparent;
}

.tour-doc-btn--conv {
    background: rgba(13,42,107,.06); color: var(--navy);
    border-color: rgba(13,42,107,.15);
}
.tour-doc-btn--conv:hover  { background: var(--navy); color: var(--white); border-color: var(--navy); }

.tour-doc-btn--res {
    background: var(--done-bg); color: var(--done-color);
    border-color: rgba(46,125,50,.2);
}
.tour-doc-btn--res:hover   { background: var(--done-color); color: var(--white); }

.tour-doc-btn--cls {
    background: rgba(230,81,0,.07); color: var(--active-color);
    border-color: rgba(230,81,0,.2);
}
.tour-doc-btn--cls:hover   { background: var(--active-color); color: var(--white); }

.tour-card__no-docs {
    padding: 12px 16px;
    font-size: .75rem; color: var(--muted);
    font-style: italic; text-align: center;
}

/* ═══ DOCUMENTS UTILES ═══════════════════════════ */
.crit-docs {
    background: var(--white);
    padding: 56px 0 72px;
}

.crit-docs-list {
    display: flex; flex-direction: column; gap: 0;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
    max-width: 700px;
}

.crit-doc-row {
    display: flex; align-items: center; gap: 16px;
    padding: 16px 22px;
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}
.crit-doc-row:last-child { border-bottom: none; }
.crit-doc-row:hover { background: var(--light); }

.crit-doc-row__icon {
    width: 38px; height: 38px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: var(--white); flex-shrink: 0;
}

.crit-doc-row--navy   .crit-doc-row__icon { background: var(--navy); }
.crit-doc-row--blue   .crit-doc-row__icon { background: #1565c0; }
.crit-doc-row--orange .crit-doc-row__icon { background: var(--active-color); }
.crit-doc-row--green  .crit-doc-row__icon { background: var(--done-color); }

.crit-doc-row__label {
    font-size: .92rem; font-weight: 700;
    color: var(--navy); flex: 1;
}

.crit-doc-row__ext {
    font-size: .65rem; font-weight: 800;
    letter-spacing: .06em; color: var(--muted);
    background: var(--light);
    padding: 2px 8px; border-radius: 4px;
}

.crit-doc-row__arrow {
    color: var(--muted);
    opacity: 0; transition: opacity var(--transition), transform var(--transition);
}

.crit-doc-row:hover .crit-doc-row__arrow {
    opacity: 1; transform: translateX(3px);
}

.crit-docs-empty {
    text-align: center; color: var(--muted);
    font-size: .9rem; padding: 32px 0;
}

/* ═══ RESPONSIVE ═════════════════════════════════ */
@media (max-width: 900px) {
    .tours-timeline {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }
    .tours-timeline__track { display: none; }
    .tour-item { padding: 0; }
    .tour-item__bubble { margin-bottom: 0; }
}

@media (max-width: 600px) {
    .crit-hero { padding: 48px 0 44px; }
    .crit-hero__stats {
        flex-direction: column; gap: 8px;
        padding: 14px 22px; border-radius: 14px;
    }
    .crit-stat__sep { width: 36px; height: 1px; margin: 0; }

    .tours-timeline { grid-template-columns: 1fr; gap: 20px; }

    .crit-intro__card { flex-direction: column; gap: 14px; }
}