/* ============================================
 * Composants portés depuis olympiades-robotique
 * (classes absentes du style.css MM180)
 * ============================================ */

/* Bouton Auth dans le header */
.header-auth {
    flex-shrink: 0;
}

.btn-header-auth {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--blue);
    color: var(--white);
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-header-auth:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-1px);
}

.countdown-label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    opacity: 0.9;
}

.countdown-label i {
    color: var(--golden);
    margin-right: 4px;
}

.mobile-cd-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary);
    margin-bottom: 10px;
}

.mobile-cd-label i {
    color: var(--golden);
    margin-right: 5px;
}

/* Footer du panneau mobile */
.mobile-menu-footer {
    padding: 20px;
    border-top: 1px solid var(--gray-200);
    text-align: center;
    flex-shrink: 0;
}

.mobile-logos-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 10px;
}

.mobile-logos-row img {
    height: 32px;
    width: auto;
    opacity: 0.7;
}

.mobile-menu-copy {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.flash-close {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
    font-size: 1rem;
}

/* ======================================================
   PAGE MATCHS
   ====================================================== */
.groupes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.groupe-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    border: 1px solid rgba(27, 58, 107, 0.06);
}

.groupe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(27, 58, 107, 0.15);
}

.groupe-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    padding: 14px 20px;
}

.groupe-lettre {
    color: var(--white);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 1px;
}

.groupe-table {
    width: 100%;
    border-collapse: collapse;
}

.groupe-table th {
    background: rgba(27, 58, 107, 0.05);
    padding: 10px 12px;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: center;
    letter-spacing: 0.5px;
}

.th-equipe {
    text-align: left !important;
}

.groupe-table td {
    padding: 12px;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--gray-100);
    text-align: center;
}

.groupe-table tr.qualifie {
    background: rgba(5, 150, 105, 0.04);
}

.groupe-table tr.qualifie td:first-child {
    border-left: 3px solid #059669;
}

.col-v {
    color: #059669;
    font-weight: 600;
}

.col-d {
    color: var(--red);
    font-weight: 600;
}

/* Matchs list */
.matchs-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 850px;
    margin: 0 auto;
}

.match-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    overflow: hidden;
    border: 1px solid rgba(27, 58, 107, 0.06);
    position: relative;
}

.match-card::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--primary), var(--golden));
    opacity: 0;
    transition: opacity 0.3s;
}

.match-card:hover {
    box-shadow: 0 12px 30px rgba(27, 58, 107, 0.12);
    transform: translateY(-3px);
}

.match-card:hover::after {
    opacity: 1;
}

.match-phase-badge {
    display: inline-block;
    background: var(--blue-pale);
    color: var(--blue);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.badge-finished {
    background: var(--golden-pale);
    color: var(--golden);
}

.match-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.match-team {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.team-left {
    justify-content: flex-start;
}

.team-right {
    justify-content: flex-end;
}

.match-card:hover .team-avatar {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(27, 58, 107, 0.15);
}

.team-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
}

.team-winner .team-name {
    color: var(--primary);
    font-weight: 700;
}

.match-vs {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.vs-label {
    font-family: var(--font-tech);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--red);
    text-shadow: 0 1px 4px rgba(200, 16, 46, 0.2);
    padding: 4px 12px;
    background: rgba(200, 16, 46, 0.08);
    border-radius: 20px;
}

.match-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.match-score-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.match-score {
    display: flex;
    align-items: center;
    gap: 6px;
}

.score {
    font-family: var(--font-tech);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-muted);
}

.score-sep {
    color: var(--gray-300);
    font-size: 1.2rem;
}

.resultat-team {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.resultat-team span {
    font-weight: 600;
    font-size: 0.92rem;
}

.resultat-score-center {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.score-divider {
    font-size: 1.5rem;
    color: var(--gray-300);
    font-weight: 300;
}

.td-duree {
    font-family: var(--font-tech);
    font-size: 0.78rem;
    color: var(--text-muted);
}

.trend-up {
    color: #059669;
}

.trend-down {
    color: var(--red);
}

.trend-same {
    color: var(--gray-400);
}

/* ======================================================
   PAGE DÉTAILS ÉDITION
   ====================================================== */

/* Hero bannière avec image de fond */
.detail-hero {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--white);
    padding: 0;
    padding-top: var(--header-height);
    min-height: 420px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.detail-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.4) 0%, rgba(15, 23, 42, 0.75) 60%, rgba(15, 23, 42, 0.92) 100%);
    z-index: 1;
}

.detail-hero-content {
    position: relative;
    z-index: 2;
    padding: 60px 20px 50px;
    text-align: center;
}

.detail-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(212, 160, 23, 0.2);
    color: var(--golden-light);
    border: 1px solid rgba(212, 160, 23, 0.3);
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 18px;
    backdrop-filter: blur(8px);
    animation: heroFadeUp 0.5s ease-out;
}

.detail-hero h1 {
    font-family: var(--font-tech);
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 14px;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
    animation: heroFadeUp 0.6s ease-out 0.1s both;
}

.detail-hero-theme {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
    font-style: italic;
    animation: heroFadeUp 0.6s ease-out 0.2s both;
}

.detail-hero-theme i {
    color: var(--golden);
    margin-right: 6px;
}

.detail-hero-meta {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    animation: heroFadeUp 0.6s ease-out 0.3s both;
}

.detail-hero-meta span {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.75);
}

.detail-hero-meta i {
    margin-right: 6px;
    color: var(--golden);
}

/* Intro : Résumé + Description côte à côte */
.detail-intro {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 40px;
    align-items: start;
}

.detail-resume {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: var(--white);
    padding: 35px;
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}

.detail-resume::after {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 120px;
    height: 120px;
    background: rgba(212, 160, 23, 0.1);
    border-radius: 50%;
    pointer-events: none;
}

.detail-resume-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--golden-light);
    margin-bottom: 16px;
}

.detail-resume h3 {
    font-family: var(--font-tech);
    font-size: 1.1rem;
    margin-bottom: 14px;
    color: var(--golden-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-resume p {
    font-size: 0.95rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.88);
}

.detail-description h2 {
    font-family: var(--font-tech);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
}

.detail-description-body p {
    font-size: 1rem;
    line-height: 1.85;
    color: var(--text-light);
    margin-bottom: 14px;
    text-align: justify;
}

.detail-description-body strong {
    color: var(--primary);
    font-weight: 600;
}

/* Grille des équipes */
.equipes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.equipe-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.equipe-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.equipe-slogan {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 16px;
    min-height: 36px;
}

.equipe-card-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

/* Podium détails */
.detail-podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 30px;
    padding-top: 20px;
}

.detail-podium-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 180px;
    text-align: center;
}

.detail-podium-medal {
    font-size: 1.6rem;
    margin-bottom: 4px;
}

.podium-gold .detail-podium-medal {
    color: #D4A017;
    filter: drop-shadow(0 2px 6px rgba(212, 160, 23, 0.5));
}

.podium-silver .detail-podium-medal {
    color: #A0A0A0;
}

.podium-bronze .detail-podium-medal {
    color: #CD7F32;
}

.detail-podium-avatar {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: var(--gray-50);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--gray-300);
    margin-bottom: 2px;
}

.podium-gold .detail-podium-avatar {
    border-color: #D4A017;
    box-shadow: 0 0 20px rgba(212, 160, 23, 0.3);
}

.detail-podium-avatar i {
    font-size: 1.5rem;
    color: var(--primary);
}

.detail-podium-rank {
    font-family: var(--font-tech);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted);
}

.podium-gold .detail-podium-rank {
    color: #D4A017;
}

.detail-podium-item h4 {
    font-family: var(--font-tech);
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

.detail-podium-pts {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--golden);
}

.detail-podium-stats {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.detail-podium-bar {
    width: 100%;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    min-height: 30px;
}

.programme-jour {
    margin-bottom: 50px;
}

.programme-jour:last-child {
    margin-bottom: 0;
}

.programme-date-badge {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-blue);
}

.date-jour-num {
    background: var(--primary-blue);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.date-full {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.programme-activites {
    position: relative;
    padding-left: 24px;
}

.programme-activites::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary-blue) 0%, rgba(37, 99, 235, 0.1) 100%);
}

.programme-item {
    display: flex;
    gap: 20px;
    padding: 16px 0;
    position: relative;
}

.programme-item-time {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 55px;
    flex-shrink: 0;
}

.item-heure {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1;
}

.item-heure-fin {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.programme-item-dot {
    position: absolute;
    left: -24px;
    top: 22px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-color);
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px var(--accent-color);
    z-index: 1;
    transform: translateX(-1px);
}

.programme-item-content {
    flex: 1;
    background: var(--bg-card);
    border-radius: 12px;
    padding: 16px 20px;
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--accent-color);
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.programme-item-content:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.programme-item-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.programme-item-header i {
    color: var(--accent-color);
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.programme-item-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.programme-item-desc {
    margin: 6px 0 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.programme-item-lieu {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 0.82rem;
    color: var(--text-muted);
    background: var(--bg-secondary);
    padding: 3px 10px;
    border-radius: 20px;
}

.programme-item-lieu i {
    font-size: 0.75rem;
    color: var(--accent-color);
}

/* ======================================================
   PRIX & RÉCOMPENSES
   ====================================================== */
.prix-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.prix-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 28px;
    text-align: center;
    border: 1px solid var(--border-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.prix-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.prix-card .prix-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.4rem;
    color: #fff;
}

.prix-card h4 {
    margin: 0 0 8px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.prix-card .prix-laureate {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 8px;
}

.prix-card .prix-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

