/* PAGE CONDITIONS */

.conditions-page {
    max-width: 1200px;
    margin: 50px auto;
    padding: 20px;
}

/* HEADER */

.conditions-header {
    text-align: center;
    margin-bottom: 40px;
}

.conditions-header h1 {
    font-size: 42px;
    font-weight: 800;
    color: #111;
    margin-bottom: 10px;
}

.conditions-header p {
    color: #666;
    font-size: 18px;
}

/* TABLE */

.conditions-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* HEADER TABLE */

.table-head {
    display: grid;
    grid-template-columns: 
        110px
        110px
        1fr
        150px
        150px;

    background: #0f4c81;
    color: white;
    padding: 18px;
    font-weight: bold;
    align-items: center;
}

.table-head span:nth-child(1),
.table-head span:nth-child(2),
.table-head span:nth-child(3),
.table-head span:nth-child(4),
.table-head span:nth-child(5) {
    text-align: center;
}


/* ROWS */

.table-row {
    display: grid;
    grid-template-columns: 
        110px
        110px
        1fr
        150px
        150px;

    padding: 18px;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.table-row span:first-child {
    text-align: center;
    font-weight: bold;
}

.table-row span.open,
.table-row span.closed {
    justify-self: center;
}

.table-row:nth-child(even) {
    background: #f8f9fb;
}


/* NOM DE PISTE */

.trail-name {
    font-weight: 600;
    text-align: center;
}


/* BADGES OPEN/CLOSED */

.open {
    background: #2ecc71;
    color: white;
    padding: 8px 14px;
    border-radius: 25px;
    text-align: center;
    font-weight: bold;
    width: fit-content;
}

.closed {
    background: #e74c3c;
    color: white;
    padding: 8px 14px;
    border-radius: 25px;
    text-align: center;
    font-weight: bold;
    width: fit-content;
}


/* DIFFICULTÉ */

.trail-difficulty {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* Base */
.difficulty {
    display: inline-block;
}

.green-circle {
    width: 18px;
    height: 18px;
    background-color: #2ecc71;
    border-radius: 50%;
}

.blue-square {
    width: 18px;
    height: 18px;
    background-color: #3498db;
}

.black-diamond {
    width: 16px;
    height: 16px;
    background-color: #000;
    transform: rotate(45deg);
}


/* =========================
   STATION MAP SECTION
========================= */

.station-map-section {
    max-width: 1200px;
    margin: 60px auto;
    padding: 20px;
    text-align: center;
}

.station-map-section h2 {
    font-size: 38px;
    font-weight: 800;
    color: var(--bleu-fonce);
    margin-bottom: 30px;
}

.station-map-container img {
    width: 100%;
    max-width: 1100px;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
}

.station-map-text {
    margin-top: 30px;
    background: #f8f9fb;
    padding: 25px;
    border-radius: 12px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.station-map-text p {
    font-size: 18px;
    color: #444;
    line-height: 1.6;
}

/* =========================
   MAP BUTTONS
========================= */

.map-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.map-btn {
    background: var(--bleu-fonce);
    color: white;
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 30px;
    font-weight: 700;
    transition: 0.3s ease;
    min-width: 220px;
    text-align: center;
}

.map-btn:hover {
    background: var(--turquoise);
    transform: translateY(-3px);
}

.map-btn.secondary {
    background: var(--bleu-fonce);
}

.map-btn.secondary:hover {
    background: var(--turquoise);
}

/* Image cliquable */
.station-map-container img {
    cursor: pointer;
}

/* Modal plein écran */
.map-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

/* Image agrandie */
.map-modal-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

/* Bouton fermer */
.map-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

/* MOBILE */

@media (max-width: 768px) {

    .table-head {
        display: none;
    }

    .table-row {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 20px;
    }

    .conditions-header h1 {
        font-size: 30px;
    }

    .trail-difficulty {
        justify-content: flex-start;
    }

    .table-row span.open,
    .table-row span.closed {
        justify-self: start;
    }

    .trail-name {
        padding-left: 0;
    }
}

.map-buttons {
    flex-direction: column;
    align-items: center;
}

.map-btn {
    width: 100%;
    max-width: 300px;
}
