/* =========================================================
   Marathon Photo — Public CSS
   Dépend de Font Awesome 6 Free
   ========================================================= */

/* ----- Reset léger pour le widget ----------------------- */
.mp-app *,
.mp-app *::before,
.mp-app *::after { box-sizing: border-box; }

.mp-app {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 700px;
    margin: 32px auto;
    padding: 0 16px;
    position: relative;
    color: #1a1a2e;
    line-height: 1.6;
}

/* Compatibilité Elementor : annule les marges de section */
.elementor-widget-marathon_photo .mp-app { margin-top: 0; }

/* ----- Cartes ------------------------------------------- */
.mp-card {
    background: #fff;
    border: 1px solid #e2e4e7;
    border-radius: 8px;
    padding: 36px 32px 28px;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
    text-align: center;
}
.mp-card__icon {
    font-size: 2.4rem;
    color: #2271b1;
    margin-bottom: 12px;
    display: block;
}
.mp-card__icon--pulse i {
    animation: mp-pulse 2s ease-in-out infinite;
}
@keyframes mp-pulse {
    0%,100% { opacity: 1; }
    50%      { opacity: .5; }
}
.mp-card__title  { margin: 0 0 10px; font-size: 1.5rem; font-weight: 700; }
.mp-card__intro  { color: #555; margin-bottom: 20px; }

/* ----- En-tête écran actif ------------------------------ */
.mp-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 16px;
    background: #1a1a2e;
    border-radius: 8px;
    margin-bottom: 24px;
    color: #fff;
}
.mp-header__icon  { font-size: 1.2rem; color: #90caf9; }
.mp-marathon-name { font-weight: 700; font-size: .95rem; }
.mp-header__sep   { color: rgba(255,255,255,.3); }
.mp-header__team  { display: flex; align-items: center; gap: 6px; font-size: .88rem; color: #c9d6e3; }
.mp-header__remaining {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .85rem;
    color: #c9d6e3;
}

/* ----- Countdown ---------------------------------------- */
.mp-countdown-block  { margin: 24px 0; }
.mp-countdown-label  { font-size: .85rem; color: #888; margin-bottom: 4px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.mp-countdown        { font-size: 3.4rem; font-weight: 800; letter-spacing: 3px; font-variant-numeric: tabular-nums; color: #2271b1; }
.mp-countdown--inline { font-size: 1rem; font-weight: 700; font-variant-numeric: tabular-nums; color: #90caf9; }

/* ----- Formulaire connexion ----------------------------- */
.mp-label {
    display: block;
    text-align: left;
    margin-bottom: 16px;
    font-size: .88rem;
    font-weight: 600;
    color: #333;
}
.mp-label__icon { margin-right: 4px; color: #2271b1; width: 14px; }
.mp-input {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 10px 14px;
    border: 1px solid #ccd0d4;
    border-radius: 5px;
    font-size: .97rem;
    color: #1a1a2e;
    background: #f8f9fa;
    transition: border-color .15s, box-shadow .15s;
}
.mp-input:focus {
    border-color: #2271b1;
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(34,113,177,.2);
}

/* ----- Boutons ------------------------------------------ */
.mp-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: .92rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background .15s, opacity .15s, box-shadow .15s;
    text-decoration: none;
    white-space: nowrap;
}
.mp-btn:disabled { opacity: .5; cursor: not-allowed; }
.mp-btn i        { font-size: .9em; }

.mp-btn--primary      { background: #2271b1; color: #fff; border-color: #2271b1; }
.mp-btn--primary:hover { background: #135e96; box-shadow: 0 2px 6px rgba(34,113,177,.3); }
.mp-btn--secondary    { background: #f0f4ff; color: #2271b1; border-color: #c3d4f0; }
.mp-btn--secondary:hover { background: #e0ecff; }
.mp-btn--ghost        { background: transparent; color: rgba(255,255,255,.7); border-color: transparent; font-weight: 400; }
.mp-btn--ghost:hover  { color: #fff; }
.mp-btn--sm           { padding: 6px 12px; font-size: .82rem; }

/* Centrer le bouton login dans la carte */
#mp-btn-login { width: 100%; justify-content: center; margin-top: 8px; padding: 12px; font-size: 1rem; }

/* ----- Alertes ------------------------------------------ */
.mp-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 5px;
    margin: 14px 0;
    font-size: .9rem;
    text-align: left;
}
.mp-alert i        { margin-top: 2px; flex-shrink: 0; }
.mp-alert__text    { flex: 1; }
.mp-alert--error   { background: #fef2f2; border: 1px solid #fca5a5; color: #b91c1c; }
.mp-alert--success { background: #f0fdf4; border: 1px solid #86efac; color: #15803d; }
.mp-alert--info    { background: #eff6ff; border: 1px solid #93c5fd; color: #1d4ed8; }

/* ----- Cartes défi -------------------------------------- */
.mp-challenges { display: flex; flex-direction: column; gap: 16px; }

.mp-challenge-card {
    background: #fff;
    border: 1px solid #e2e4e7;
    border-left: 4px solid #2271b1;
    border-radius: 8px;
    padding: 20px 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.mp-challenge-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.mp-challenge-num {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #eff6ff;
    color: #2271b1;
    font-size: .75rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
}
.mp-challenge-num i { font-size: .7em; }
.mp-challenge-subject { margin: 0; font-size: 1.1rem; font-weight: 700; color: #1a1a2e; }

.mp-challenge-constraints {
    color: #444;
    font-size: .9rem;
    line-height: 1.65;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: #f8f9fa;
    border-radius: 5px;
}
.mp-challenge-constraints__label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    color: #2271b1;
    font-size: .82rem;
    margin-bottom: 6px;
}

/* ----- Upload ------------------------------------------- */
.mp-upload-section {
    background: #f8f9fa;
    border: 1px dashed #c3d4f0;
    border-radius: 8px;
    padding: 24px;
    margin-top: 20px;
}
.mp-upload-section h3 {
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    color: #1a1a2e;
}
.mp-upload-section h3 i { color: #2271b1; }

.mp-upload-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 12px 16px;
    border: 1px solid #ccd0d4;
    border-radius: 5px;
    background: #fff;
    margin-bottom: 12px;
    color: #333;
    font-size: .9rem;
    transition: border-color .15s;
}
.mp-upload-label:hover { border-color: #2271b1; }
.mp-upload-label i     { color: #2271b1; font-size: 1.2rem; }
.mp-upload-label input { display: none; }

/* ----- Règles (écran attente) --------------------------- */
.mp-rules { color: #444; font-size: .9rem; line-height: 1.7; margin: 16px 0; text-align: left; }
.mp-hint  {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #666;
    font-size: .85rem;
    font-style: italic;
    margin: 16px 0;
    text-align: left;
}
.mp-hint i { color: #2271b1; margin-top: 2px; flex-shrink: 0; }

/* ----- Bouton déconnexion en attente -------------------- */
#mp-btn-logout-waiting { color: #888; margin-top: 8px; font-size: .85rem; }

/* ----- Spinner / loading -------------------------------- */
.mp-loading {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(2px);
}
.mp-loading__icon {
    font-size: 2.5rem;
    color: #2271b1;
}

/* ----- Responsive --------------------------------------- */
@media (max-width: 480px) {
    .mp-card        { padding: 24px 16px; }
    .mp-countdown   { font-size: 2.4rem; }
    .mp-header      { flex-direction: column; align-items: flex-start; gap: 6px; }
    .mp-header__remaining { margin-left: 0; }
    .mp-challenge-card    { padding: 16px; }
}

/* ----- Slots table (interface dépôt) -------------------- */
.mp-slots-table-wrap { margin: 14px 0 16px; }
.mp-slots-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .82rem;
    font-weight: 700;
    color: #2271b1;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.mp-slots-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .88rem;
}
.mp-slots-table thead th {
    background: #f0f4ff;
    padding: 6px 10px;
    text-align: left;
    font-size: .78rem;
    font-weight: 700;
    color: #2271b1;
    border-bottom: 2px solid #c3d4f0;
}
.mp-slots-table thead th:first-child { width: 36px; text-align: center; }
.mp-slots-table thead th:last-child  { width: 44px; }

.mp-slot-table-row { border-bottom: 1px solid #f0f0f0; }
.mp-slot-table-row:last-child { border-bottom: none; }
.mp-slot-table-row.mp-slot-done { background: #f0fdf4; }
.mp-slot-table-row.mp-slot-done .mp-slot-table-label { text-decoration: line-through; color: #aaa; }

.mp-slot-table-pos        { text-align: center; padding: 8px 6px; font-weight: 700; color: #888; font-size: .82rem; }
.mp-slot-table-label      { padding: 8px 10px; font-weight: 600; color: #1a1a2e; }
.mp-slot-table-constraint { padding: 8px 10px; color: #555; }
.mp-slot-table-action     { padding: 6px 8px; text-align: center; }

.mp-slot-specific {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #fff9e6;
    border: 1px solid #f0d060;
    color: #7a5800;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 500;
}
.mp-slot-specific i { font-size: .75em; color: #b89a3e; }
.mp-slot-none { color: #ccc; font-size: .85rem; }

/* Label slot dans la zone upload */
.mp-upload-slot-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #eff6ff;
    color: #2271b1;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: .82rem;
    font-weight: 600;
    margin-left: 6px;
}

/* ---- Onboarding ---- */
.mp-onboard-section {
    margin-top: 20px;
    text-align: left;
}
.mp-onboard-section h3 {
    font-size: .95rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--mp-primary, #1a56db);
}
.mp-members-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.mp-member-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.mp-member-row .mp-input {
    flex: 1;
}
.mp-accept-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 12px;
    font-size: .9rem;
    cursor: pointer;
    line-height: 1.4;
}
.mp-accept-label input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.mp-member-num {
    width: 20px;
    flex-shrink: 0;
    font-size: .85rem;
    font-weight: 600;
    color: #6b7280;
    text-align: right;
}

/* ---- Galerie photos ---- */
.mp-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}
.mp-thumb {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid #e2e8f0;
    background: #f1f5f9;
    flex-shrink: 0;
}
.mp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.mp-thumb-num {
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-size: .65rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,.7);
}
.mp-gallery-empty {
    font-size: .85rem;
    color: #94a3b8;
    margin: 8px 0 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ---- Barre de progression ---- */
.mp-progress-bar-wrap {
    margin-bottom: 16px;
}
.mp-progress-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .85rem;
    color: #475569;
    margin-bottom: 6px;
}
.mp-progress-label i { color: #2271b1; }
.mp-progress-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 99px;
    overflow: hidden;
}
.mp-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2271b1, #38bdf8);
    border-radius: 99px;
    transition: width .4s ease;
}

/* ---- Récap équipe ---- */
.mp-team-recap {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    background: #f8faff;
    border: 1px solid #dde6f8;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 16px;
}
.mp-team-recap__name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: #1e3a8a;
    flex-shrink: 0;
    font-size: .9rem;
}
.mp-team-recap__name i { color: #2271b1; }
.mp-team-recap__members {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    flex: 1;
}
.mp-member-tag {
    background: #e0eaff;
    color: #2251a3;
    border-radius: 99px;
    padding: 2px 10px;
    font-size: .78rem;
    font-weight: 600;
}
/* Boutons du récap : surcharge du ghost pour fond clair */
.mp-team-recap .mp-btn--ghost,
.mp-team-recap .mp-btn-edit-members,
.mp-team-recap .mp-btn-edit-email {
    background: #fff;
    color: #2271b1;
    border: 1px solid #c7d7f9;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background .15s, border-color .15s;
    user-select: none;
    -webkit-user-select: none;
    flex-shrink: 0;
}
.mp-team-recap .mp-btn--ghost:hover,
.mp-team-recap .mp-btn-edit-members:hover,
.mp-team-recap .mp-btn-edit-email:hover {
    background: #eff6ff;
    border-color: #2271b1;
    color: #1a5a94;
}

/* ---- Contrainte globale ---- */
.mp-global-constraint {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.mp-global-constraint__label {
    font-size: .8rem;
    font-weight: 700;
    color: #c2410c;
    text-transform: uppercase;
    letter-spacing: .04em;
    flex-shrink: 0;
}
.mp-global-constraint__label i { margin-right: 4px; }
.mp-global-constraint strong { color: #9a3412; font-size: 1rem; }
.mp-global-constraint__desc { font-size: .85rem; color: #78350f; flex-basis: 100%; margin-top: 2px; }

/* ---- Bouton dépôt principal ---- */
.mp-btn--lg {
    padding: 14px 24px;
    font-size: 1rem;
    width: 100%;
    margin-top: 12px;
    justify-content: center;
}


/* ---- Thumb label contrainte ---- */
.mp-thumb-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: .6rem;
    font-weight: 600;
    text-align: center;
    padding: 2px 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---- Section photos ---- */
.mp-photos-section {
    margin: 8px 0 4px;
}

/* ---- Modaux front ---- */
.mp-simple-modal {
    position: fixed; inset: 0; background: rgba(0,0,0,.5);
    z-index: 100000; display: flex; align-items: center; justify-content: center;
}
.mp-simple-modal-box {
    background: #fff; border-radius: 10px; padding: 24px 28px;
    box-shadow: 0 8px 32px rgba(0,0,0,.25);
}
.mp-simple-modal-box h3 {
    margin: 0 0 12px; display: flex; align-items: center; gap: 8px;
    font-size: 1rem;
}

/* ---- Liste contraintes spécifiques ---- */
.mp-specific-list {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 14px;
}
.mp-specific-list__label {
    font-size: .8rem;
    font-weight: 700;
    color: #0369a1;
    text-transform: uppercase;
    letter-spacing: .04em;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}
.mp-specific-list ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.mp-specific-list li {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: .9rem;
    color: #0c4a6e;
}
.mp-specific-num {
    background: #0369a1;
    color: #fff;
    border-radius: 99px;
    font-size: .7rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ---- Checklist contraintes couvertes ---- */
.mp-constraint-checklist {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.mp-constraint-checklist li {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: .85rem;
    padding: 3px 0;
}
.mp-constraint-done {
    color: #16a34a;
    text-decoration: line-through;
    opacity: .75;
}
.mp-constraint-done i { color: #16a34a; }
.mp-constraint-todo  { color: #64748b; }
.mp-constraint-todo i { color: #cbd5e1; }

/* ---- Bouton supprimer photo ---- */
.mp-thumb-delete {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(220,38,38,.85);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .15s;
    padding: 0;
    color: #fff;
    font-size: .65rem;
    line-height: 1;
}
.mp-thumb:hover .mp-thumb-delete { opacity: 1; }

/* ================================================================
   COMPOSANT UPLOAD MODERNE
   ================================================================ */

/* ---- Section wrapper ---- */
.mp-upload-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-top: 16px;
    user-select: none;
    -webkit-user-select: none;
}
.mp-upload-section h3 {
    margin: 0 0 14px;
    font-size: .95rem;
    font-weight: 700;
    color: #1e3a8a;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ---- Sélecteur contrainte ---- */
.mp-upload-constraint-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .82rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
}
.mp-select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: .88rem;
    background: #f9fafb;
    color: #111;
    margin-bottom: 12px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}
.mp-select:focus { outline: 2px solid #2271b1; outline-offset: 1px; border-color: transparent; }

/* ---- Zone de drop ---- */
.mp-drop-zone {
    position: relative;
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}
.mp-drop-zone:hover,
.mp-drop-zone--over {
    border-color: #2271b1;
    background: #eff6ff;
}
.mp-drop-zone input[type="file"] {
    position: absolute;
    width: 0; height: 0;
    opacity: 0; pointer-events: none;
}

/* État idle */
.mp-drop-zone__idle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 24px 16px;
    pointer-events: none;
}
.mp-drop-zone__icon {
    font-size: 2rem;
    color: #94a3b8;
    transition: color .2s, transform .2s;
}
.mp-drop-zone:hover .mp-drop-zone__icon,
.mp-drop-zone--over .mp-drop-zone__icon {
    color: #2271b1;
    transform: translateY(-3px);
}
.mp-drop-zone__text {
    font-size: .9rem;
    color: #475569;
    text-align: center;
}
.mp-drop-zone__link {
    color: #2271b1;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.mp-drop-zone__hint {
    font-size: .75rem;
    color: #94a3b8;
    letter-spacing: .04em;
}

/* État preview */
.mp-drop-zone__preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    width: 100%;
}
.mp-drop-zone__preview img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}
.mp-preview-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}
.mp-preview-name {
    font-size: .85rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mp-preview-size {
    font-size: .75rem;
    color: #94a3b8;
}
.mp-preview-clear {
    width: 28px; height: 28px;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    background: #f1f5f9;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: .75rem;
    flex-shrink: 0;
    transition: background .15s, color .15s;
    user-select: none;
}
.mp-preview-clear:hover { background: #fee2e2; color: #dc2626; border-color: #fca5a5; }

/* ---- Barre de progression ---- */
.mp-upload-progress {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.mp-upload-progress__bar {
    flex: 1;
    height: 6px;
    background: #e2e8f0;
    border-radius: 99px;
    overflow: hidden;
    position: relative;
}
.mp-upload-progress__bar::after {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: var(--pct, 0%);
    background: linear-gradient(90deg, #2271b1, #38bdf8);
    border-radius: 99px;
    transition: width .15s linear;
}
.mp-upload-progress__pct {
    font-size: .75rem;
    font-weight: 700;
    color: #2271b1;
    width: 36px;
    text-align: right;
    flex-shrink: 0;
}

/* ---- Bouton Envoyer ---- */
.mp-btn-send {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 12px;
    padding: 13px 20px;
    border: none;
    border-radius: 8px;
    font-size: .95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .1s, box-shadow .2s;
    user-select: none;
    -webkit-user-select: none;

    background: #2271b1;
    color: #fff;
    box-shadow: 0 2px 8px rgba(34,113,177,.25);
}
.mp-btn-send:hover:not(:disabled) {
    background: #1a5a94;
    box-shadow: 0 4px 16px rgba(34,113,177,.35);
    transform: translateY(-1px);
}
.mp-btn-send:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(34,113,177,.2);
}
.mp-btn-send:disabled {
    background: #cbd5e1;
    color: #94a3b8;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}
.mp-btn-send--loading {
    background: #2271b1 !important;
    cursor: wait !important;
}
.mp-btn-send--success {
    background: #16a34a !important;
    box-shadow: 0 2px 8px rgba(22,163,74,.3) !important;
}

/* ---- Boutons dans les modaux (fond blanc) ---- */
.mp-simple-modal-box .mp-btn--ghost,
.mp-simple-modal-box .mp-btn--sm,
#mp-modal-btn-add {
    background: #f1f5f9;
    color: #334155 !important;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background .15s;
    user-select: none;
    -webkit-user-select: none;
}
.mp-simple-modal-box .mp-btn--ghost:hover,
#mp-modal-btn-add:hover {
    background: #e2e8f0;
    color: #1e293b !important;
}
.mp-simple-modal-box .mp-btn--primary {
    background: #2271b1;
    color: #fff !important;
    border-color: #2271b1;
}
.mp-simple-modal-box .mp-btn--primary:hover {
    background: #1a5a94;
}

.mp-constraint-count {
    margin-left: auto;
    font-size: .75rem;
    font-weight: 700;
    color: #64748b;
    background: #f1f5f9;
    border-radius: 99px;
    padding: 1px 7px;
}
.mp-constraint-done .mp-constraint-count {
    color: #15803d;
    background: #dcfce7;
}

/* ---- Checklist ticks ---- */
.mp-tick {
    color: #16a34a;
    font-size: .85rem;
    width: 14px;
    flex-shrink: 0;
}
.mp-circle {
    color: #cbd5e1;
    font-size: .85rem;
    width: 14px;
    flex-shrink: 0;
}
.mp-constraint-done {
    color: #15803d;
    text-decoration: none; /* plus de barré */
    font-weight: 600;
}

/* ---- Message participation complète ---- */
.mp-completion-msg {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 2px solid #16a34a;
    border-radius: 10px;
    padding: 14px 16px;
    margin-top: 14px;
}
.mp-completion-msg > i {
    font-size: 1.6rem;
    color: #16a34a;
    flex-shrink: 0;
    margin-top: 2px;
}
.mp-completion-msg p {
    margin: 0;
    font-size: .88rem;
    line-height: 1.5;
    color: #14532d;
}
.mp-completion-msg em {
    color: #b45309;
    font-style: normal;
    font-size: .82rem;
}

/* ---- Sélecteur de marathon (multi-publiés) ---- */
.mp-marathon-selector {
    max-width: 480px;
    margin: 0 auto;
    padding: 24px 16px;
}
.mp-marathon-selector__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e3a8a;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.mp-marathon-selector__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.mp-marathon-selector__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    color: #1e293b;
    transition: border-color .15s, box-shadow .15s;
    user-select: none;
}
.mp-marathon-selector__item:hover {
    border-color: #2271b1;
    box-shadow: 0 2px 8px rgba(34,113,177,.12);
    color: #1e293b;
}
.mp-marathon-selector__name { font-weight: 600; font-size: .95rem; }
.mp-marathon-selector__badge {
    font-size: .75rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 99px;
    flex-shrink: 0;
}

/* ---- Lightbox trigger ---- */
.mp-thumb img { cursor: zoom-in; }


/* ---- Lightbox trigger ---- */
.mp-thumb img { cursor: zoom-in; }

/* ================================================================
   RÉSULTATS — Design moderne marathon photo
   ================================================================ */

/* ── Variables locales ── */
.mpres-root {
    background: #fff;
    --mpres-gold:    #f0c040;
    --mpres-silver:  #94a3b8;
    --mpres-bronze:  #cd7f32;
    --mpres-night:   #0f172a;
    --mpres-blue:    #1e40af;
    --mpres-light:   #f8faff;
    --mpres-border:  #e2e8f0;
    font-family: inherit;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 0 48px;
}

/* ── Hero ── */
.mpres-hero {
    text-align: center;
    padding: 32px 0 24px;
}
.mpres-hero-icon {
    font-size: 2.4rem;
    color: var(--mpres-gold);
    display: block;
    margin-bottom: 10px;
    filter: drop-shadow(0 2px 8px rgba(240,192,64,.4));
}
.mpres-hero-title {
    font-size: clamp(1.4rem, 4vw, 2.2rem);
    font-weight: 900;
    color: var(--mpres-night);
    margin: 0 0 4px;
    letter-spacing: -.02em;
}
.mpres-hero-sub {
    font-size: .85rem;
    font-weight: 600;
    color: var(--mpres-blue);
    text-transform: uppercase;
    letter-spacing: .12em;
    margin: 0;
}

/* ── Onglets ── */
.mpres-tabs {
    display: flex;
    gap: 2px;
    background: var(--mpres-night);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 24px;
    overflow-x: auto;
    scrollbar-width: none;
}
.mpres-tabs::-webkit-scrollbar { display: none; }
.mpres-tab {
    flex: 1;
    min-width: max-content;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,.5);
    font-size: .78rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all .2s;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.mpres-tab:hover { color: #fff; background: rgba(255,255,255,.08); }
.mpres-tab--active {
    background: var(--mpres-gold) !important;
    color: var(--mpres-night) !important;
}
.mpres-tab i { font-size: .85rem; }

/* ── PODIUM ── */
.mpres-podium-stage {
    background: linear-gradient(160deg, #0f172a 0%, #1e293b 100%);
    border-radius: 16px;
    padding: 32px 16px 0;
    margin-bottom: 20px;
    overflow: hidden;
}
.mpres-podium-row {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 8px;
}
.mpres-podium-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    max-width: 220px;
    animation: mpresRise .6s both cubic-bezier(.22,1,.36,1);
}
@keyframes mpresRise {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
}
.mpres-podium-photo {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
    border: 3px solid rgba(255,255,255,.1);
    border-bottom: none;
}
.mpres-podium-col--1 .mpres-podium-photo { border-color: var(--mpres-gold); }
.mpres-podium-col--2 .mpres-podium-photo { border-color: var(--mpres-silver); }
.mpres-podium-col--3 .mpres-podium-photo { border-color: var(--mpres-bronze); }
.mpres-podium-photo img { width:100%; height:100%; object-fit:cover; display:block; }
.mpres-podium-photo--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.05);
    color: rgba(255,255,255,.2);
    font-size: 2rem;
}
.mpres-podium-block {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px 16px;
    border-radius: 0 0 2px 2px;
}
.mpres-podium-col--1 .mpres-podium-block { background: linear-gradient(180deg, rgba(240,192,64,.25) 0%, rgba(240,192,64,.08) 100%); }
.mpres-podium-col--2 .mpres-podium-block { background: rgba(255,255,255,.05); }
.mpres-podium-col--3 .mpres-podium-block { background: rgba(205,127,50,.08); }
.mpres-podium-medal  { font-size: 2rem; line-height: 1; margin-bottom: 4px; }
.mpres-podium-name   { color: #fff; font-weight: 800; font-size: .88rem; text-align: center; margin-bottom: 6px; }
.mpres-podium-pts    { color: var(--mpres-gold); font-size: 1.6rem; font-weight: 900; letter-spacing: -.03em; line-height: 1; }
.mpres-podium-unit   { font-size: .75rem; font-weight: 600; margin-left: 2px; opacity: .7; }
.mpres-podium-pct    { color: rgba(255,255,255,.45); font-size: .72rem; font-weight: 600; margin-top: 2px; }

/* ── Tableau scores ── */
.mpres-score-table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--mpres-border); }
.mpres-score-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.mpres-score-table thead { background: var(--mpres-night); color: #fff; }
.mpres-score-table th {
    padding: 10px 10px;
    text-align: center;
    font-weight: 700;
    font-size: .75rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    white-space: nowrap;
}
.mpres-score-table th:nth-child(2) { text-align: left; }
.mpres-score-table td { padding: 10px; text-align: center; border-bottom: 1px solid var(--mpres-border); }
.mpres-score-table td:nth-child(2) { text-align: left; font-weight: 600; }
.mpres-score-table tbody tr:last-child td { border-bottom: none; }
.mpres-score-table tbody tr:hover td { background: var(--mpres-light); }
.mpres-winner td { background: linear-gradient(90deg, rgba(240,192,64,.08), transparent) !important; }
.mpres-rank-cell  { font-size: 1.1rem; }
.mpres-total-cell { font-weight: 800; color: var(--mpres-blue); }
.mpres-pct-cell   { font-weight: 700; color: var(--mpres-blue); }
.mpres-th-max     { font-size: .65rem; opacity: .6; margin-left: 1px; }

/* ── Par équipe ── */
.mpres-team-section { margin-bottom: 28px; }
.mpres-team-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: var(--mpres-night);
    border-radius: 10px 10px 0 0;
    padding: 12px 16px;
    color: #fff;
}
.mpres-team-medal { font-size: 1.4rem; flex-shrink: 0; }
.mpres-team-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.mpres-team-score { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.mpres-team-name  { font-weight: 800; font-size: .95rem; color: #fff; }
.mpres-chip {
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.08);
    color: rgba(255,255,255,.85);
    font-size: .72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 99px;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.mpres-chip i { color: var(--mpres-gold); }
.mpres-chip-max { opacity: .5; }
.mpres-team-pts   { font-size: 1rem; font-weight: 900; color: var(--mpres-gold); white-space: nowrap; }
.mpres-team-bar   { width: 80px; height: 6px; background: rgba(255,255,255,.15); border-radius: 99px; overflow: hidden; }
.mpres-team-bar-fill { height: 100%; background: var(--mpres-gold); border-radius: 99px; transition: width .6s ease; }
.mpres-team-pct   { font-size: .75rem; font-weight: 700; color: rgba(255,255,255,.55); white-space: nowrap; }


/* ── Grille photos ── */
.mpres-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 4px;
    background: #fff;
    border: 1px solid var(--mpres-border);
    border-top: none;
    border-radius: 0 0 10px 10px;
    overflow: hidden;
    padding: 4px;
}
.mpres-photo-grid--large { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); border-radius: 10px; border-top: 1px solid var(--mpres-border); }
.mpres-photo-card { cursor: zoom-in; position: relative; overflow: hidden; border-radius: 6px; aspect-ratio: 1; background: #000; }
.mpres-photo-inner { position: relative; width: 100%; height: 100%; }
.mpres-photo-card img { width:100%; height:100%; object-fit:cover; display:block; transition: transform .25s ease, opacity .2s; }
.mpres-photo-card:hover img { transform: scale(1.04); }
.mpres-fav-badge {
    position: absolute; top: 5px; right: 5px;
    background: var(--mpres-gold); color: var(--mpres-night);
    width: 22px; height: 22px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .7rem;
    box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
.mpres-constraint-badge {
    position: absolute; bottom: 4px; left: 4px; right: 28px;
    background: rgba(0,0,0,.65); color: #fff;
    font-size: .62rem; font-weight: 700;
    padding: 2px 6px; border-radius: 4px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    backdrop-filter: blur(4px);
}

/* ── Sujets ── */
.mpres-sujets-section { margin-bottom: 24px; }
.mpres-sujets-title {
    font-size: .88rem; font-weight: 800; color: #fff;
    background: var(--mpres-night);
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px;
    border-radius: 10px 10px 0 0;
    margin-bottom: 0;
}
.mpres-sujets-desc {
    font-size: .82rem; color: #6b7280; margin: 0;
    padding: 10px 14px;
    background: var(--mpres-light);
    border: 1px solid var(--mpres-border);
    border-top: none;
    border-bottom: none;
}
.mpres-colors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0;
    border: 1px solid var(--mpres-border);
    border-top: none;
    border-radius: 0 0 10px 10px;
    overflow: hidden;
}
.mpres-color-item {
    background: #fff;
    border-right: 1px solid var(--mpres-border);
    border-bottom: 1px solid var(--mpres-border);
    border-left: 4px solid var(--mpres-blue);
    padding: 10px 12px;
    display: flex; flex-direction: column; gap: 2px;
}
.mpres-color-label { font-weight: 800; font-size: .88rem; color: var(--mpres-night); }
.mpres-color-team  { font-size: .75rem; color: var(--mpres-blue); font-weight: 600; display: flex; align-items: center; gap: 4px; }
.mpres-color-desc  { font-size: .73rem; color: #6b7280; }
.mpres-constraints-list {
    display: flex; flex-direction: column;
    border: 1px solid var(--mpres-border);
    border-top: none;
    border-radius: 0 0 10px 10px;
    overflow: hidden;
}
.mpres-constraint-item {
    display: flex; align-items: flex-start; gap: 12px;
    background: #fff;
    border-bottom: 1px solid var(--mpres-border);
    padding: 10px 14px;
}
.mpres-constraint-item:last-child { border-bottom: none; }
.mpres-constraint-num {
    background: var(--mpres-night); color: #fff;
    width: 24px; height: 24px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .75rem; font-weight: 800; flex-shrink: 0;
}
.mpres-constraint-label { font-weight: 700; font-size: .88rem; color: var(--mpres-night); }
.mpres-constraint-desc  { font-size: .78rem; color: #6b7280; margin-top: 3px; }

/* ── Sujets (contraintes par photo) ── */
.mpres-subject-block {
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--mpres-border);
}
.mpres-subject-title {
    font-size: .88rem; font-weight: 800; color: #fff;
    background: var(--mpres-night);
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px;
    margin: 0;
}
.mpres-subject-count { font-size: .75rem; font-weight: 400; opacity: .7; }
.mpres-subject-block .mpres-photo-grid {
    border: none;
    border-radius: 0;
}

/* ── Favoris ── */
.mpres-favs-intro {
    display: flex; align-items: center; gap: 10px;
    background: var(--mpres-night);
    border-radius: 10px 10px 0 0;
    padding: 12px 16px;
    margin-bottom: 0;
    font-size: .9rem; font-weight: 700; color: #fff;
}
.mpres-favs-intro i { color: var(--mpres-gold); font-size: 1.1rem; }
.mpres-favs-intro + .mpres-photo-grid {
    border-radius: 0 0 10px 10px;
    border-top: none;
}

/* ── Vide ── */
.mpres-empty { color: #9ca3af; font-size: .88rem; padding: 20px 0; text-align: center; }

/* ── Mobile ── */
@media (max-width: 600px) {
    .mpres-podium-row { gap: 4px; }
    .mpres-podium-name { font-size: .75rem; }
    .mpres-podium-pts  { font-size: 1.2rem; }
    .mpres-photo-grid  { grid-template-columns: repeat(2, 1fr); }
    .mpres-tab span    { display: none; }
    .mpres-tab i       { font-size: 1rem; }
    .mpres-tabs        { gap: 1px; }
}

/* ── Lightbox trigger ── */
.mp-thumb img { cursor: zoom-in; }




/* ================================================================
   LIGHTBOX
   ================================================================ */
.mp-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: mpLbIn .15s ease;
}
@keyframes mpLbIn { from { opacity:0 } to { opacity:1 } }

.mp-lightbox__img {
    max-width: min(90vw, 900px);
    max-height: 85vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 8px 40px rgba(0,0,0,.6);
    user-select: none;
}
.mp-lightbox__close {
    position: fixed;
    top: 16px; right: 20px;
    color: #fff;
    font-size: 1.6rem;
    background: none;
    border: none;
    cursor: pointer;
    opacity: .7;
    transition: opacity .15s;
    user-select: none;
    z-index: 10000;
}
.mp-lightbox__close:hover { opacity: 1; }

.mp-lightbox__nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 1.8rem;
    background: rgba(255,255,255,.1);
    border: none;
    cursor: pointer;
    padding: 12px 16px;
    border-radius: 6px;
    transition: background .15s;
    user-select: none;
    z-index: 10000;
}
.mp-lightbox__nav:hover { background: rgba(255,255,255,.25); }
.mp-lightbox__prev { left: 12px; }
.mp-lightbox__next { right: 12px; }
.mp-lightbox__nav:disabled { opacity: .2; cursor: default; }

.mp-lightbox__caption {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    background: rgba(0,0,0,.55);
    border-radius: 99px;
    padding: 6px 18px;
    font-size: .85rem;
    white-space: nowrap;
    user-select: none;
}

