/* assets/css/fecircuit.css  */

.circuits-container {
    display: grid;
    gap: 1px;
    background-color: grey;
    padding: 5px;
    margin-bottom: 10px
}

.circuits-container-col2 {
    grid-template-columns: auto auto;
} 

.circuits-container-col3 {
    grid-template-columns: auto auto auto;
} 

.circuits-container > div {
    background-color: white;
    text-align: center;
    padding: 5px 0;
    font-size: 15px;
}

p.titre {
    color: orange;
    font-size: 25px;
    font-style: italic;
}

p.avertissement {
    color: orange;
    font-size: 15px;
    font-style: italic;
    text-align: center;
}

/* En-tête tableau circuit */
.circuits-header {
    background-color: transparent;
    color: black;
    text-align: left;
    font-size: 18px;
    padding: 0px;
    margin-top: 0px;
}



/* Tableau parcours */
.circuits-container > .table-entete {
    background-color: grey;
    color: white;
  
}

/* ============================================
   SHORTCODE [ShowParcours] — à ajouter dans assets/css/circuit.css
   ============================================ */

/* Conteneur global */
.sp-wrapper {
    margin-bottom: 16px;
}

/* Bloc par circuit */
.sp-circuit-block {
    margin-bottom: 18px;
}

/* Titre du circuit (code + description) */
.sp-circuit-title {
    background-color: grey;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    padding: 5px 10px;
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.sp-circuit-desc {
    font-size: 13px;
    font-weight: normal;
    font-style: italic;
    opacity: .85;
}

/* Grille tableau : 3 colonnes */
.sp-table {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;  /* Distance | Dénivelé | Openrunner */
    gap: 1px;
    background-color: grey;   /* couleur des "bordures" (gap visible) */
}

/* Grille tableau : 2 colonnes */
.sp-table2 {
    display: grid;
    grid-template-columns: 2fr 1fr;  /* Distance | Dénivelé | Openrunner */
    gap: 1px;
    background-color: grey;   /* couleur des "bordures" (gap visible) */
}

/* Ligne (header + data) */
.sp-row {
    display: contents; /* les enfants directs participent directement à la grille */
}

/* Cellule */
.sp-col {
    background-color: #fff;
    padding: 5px 10px;
    font-size: 15px;
    text-align: center;
}

/* En-tête colonnes */
.sp-header .sp-col {
    background-color: grey;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    padding: 4px 10px;
}

/* Colonne Distance : texte aligné à gauche (type + km) */
.sp-col-distance {
    text-align: left;
    padding-left: 14px;
}

/* Lien GPX : soulignement + couleur héritée du thème */
a.sp-gpx-link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

a.sp-gpx-link:hover {
    color: orange;
}

/* Lignes alternées (zèbre léger) */
.sp-table .sp-row:not(.sp-header):nth-child(even) .sp-col {
    background-color: #f9f9f9;
}
/* ============================================
   SHORTCODE [ShowParcours] — à ajouter dans assets/css/circuit.css
   ============================================ */

/* Conteneur global */
.sp-wrapper {
    margin-bottom: 16px;
}

/* Bloc par circuit */
.sp-circuit-block {
    margin-bottom: 18px;
}

/* Titre du circuit (code + description) */
.sp-circuit-title {
    background-color: grey;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    padding: 5px 10px;
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.sp-circuit-desc {
    font-size: 13px;
    font-weight: normal;
    font-style: italic;
    opacity: .85;
}

/* Tableau des parcours */
.sp-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid grey;
    font-size: 15px;
}

/* En-tête colonnes */
.sp-table thead th {
    background-color: grey;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    padding: 4px 10px;
    text-align: center;
    border: none;
}

/* Cellules de données */
.sp-table tbody td {
    background-color: #fff;
    padding: 5px 10px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

/* Colonne Distance : texte aligné à gauche (type + km) */
.sp-table th.sp-col-distance,
.sp-table td.sp-col-distance {
    text-align: left;
    padding-left: 14px;
}

/* Lien GPX : soulignement + couleur héritée du thème */
a.sp-gpx-link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

a.sp-gpx-link:hover {
    color: orange;
}

/* Lignes alternées (zèbre léger) */
.sp-table tbody tr:nth-child(even) td {
    background-color: #f9f9f9;
}

/* ------ En-tête ShowParcours : compteur + recherche ------ */
.sp-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.sp-title {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.sp-search {
    padding: 5px 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 3px;
    width: 220px;
    max-width: 100%;
    outline: none;
    transition: border-color .2s;
}

.sp-search:focus {
    border-color: grey;
}

/* ------ Groupe contrôles (bouton filtre + champ recherche) ------ */
.sp-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Bouton filtre numérique */
.sp-btn {
    padding: 5px 12px;
    font-size: 14px;
    border: 1px solid #999;
    border-radius: 3px;
    background-color: #f5f5f5;
    color: #333;
    cursor: pointer;
    transition: background-color .15s, border-color .15s, color .15s;
    white-space: nowrap;
}

.sp-btn:hover {
    border-color: grey;
    background-color: #e8e8e8;
}

/* État actif : bouton enfoncé (filtre activé) */
.sp-btn.sp-btn-active {
    background-color: grey;
    border-color: grey;
    color: #fff;
    font-weight: bold;
}

/* ============================================
   RESPONSIVE — [ShowParcours]
   En dessous de 540px : chaque ligne devient
   un bloc empilé avec label devant la valeur.
   ============================================ */
@media (max-width: 540px) {

    /* Masquer l'en-tête de colonnes — les labels passent en ::before */
    .sp-table thead {
        display: none;
    }

    /* Chaque ligne = un bloc séparé */
    .sp-table tbody tr {
        display: block;
        border: 1px solid #ddd;
        border-radius: 3px;
        margin-bottom: 8px;
        background-color: #fff;
    }

    /* Chaque cellule = une ligne label : valeur */
    .sp-table tbody td {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        padding: 6px 12px;
        border-bottom: 1px solid #f0f0f0;
        text-align: right;
    }

    .sp-table tbody td:last-child {
        border-bottom: none;
    }

    /* Label généré depuis data-label */
    .sp-table tbody td::before {
        content: attr(data-label);
        font-weight: bold;
        font-size: 13px;
        color: #666;
        text-align: left;
        margin-right: 10px;
        flex-shrink: 0;
    }

    /* Distance : on annule l'alignement gauche spécifique au desktop */
    .sp-table td.sp-col-distance {
        text-align: right;
        padding-left: 12px;
    }

    /* Zèbre désactivé en mobile (blocs déjà bien séparés) */
    .sp-table tbody tr:nth-child(even) td {
        background-color: #fff;
    }

    /* En-tête circuit : passe en colonne sur très petit écran */
    .sp-circuit-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    /* Barre contrôles : colonne sur mobile */
    .sp-header-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .sp-controls {
        width: 100%;
    }

    .sp-search {
        width: 100%;
        box-sizing: border-box;
    }
}