/*
 * CSS spécifique à la page Implantation.
 * style.css fournit les variables et les règles communes du site.
 * Ce fichier ne contient que les règles propres à cette page.
 */

.implantation-page {
    width: 100%;
    max-width: var(--max);
    min-height: calc(100vh - var(--header));
    margin: 0 auto;
    padding: calc(var(--header) + 35px) 25px 55px;

    /* Variables propres à la page */
    --implantation-lead: clamp(1.15rem, 1.8vw, 1.45rem);
    --implantation-route-title: 1.08rem;
    --implantation-route-text: 0.92rem;
    --implantation-advantage-title: 0.98rem;
    --implantation-advantage-text: 0.84rem;
}

/* =========================
   BLOC PRINCIPAL
   ========================= */

.implantation-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
    gap: 45px;
    align-items: center;
}

.implantation-copy {
    min-width: 0;
}

.implantation-page h1 {
    margin: 0 0 25px;
    font-size: var(--font-h1);
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: 0;
}

.implantation-page h1 strong {
    color: var(--ecoe-blue);
    font-weight: 700;
}

.implantation-page .lead {
    margin: 0 0 18px;
    color: var(--ecoe-ink);
    font-size: var(--font-h2);
    line-height: 1.35;
    font-weight: 700;
}

.implantation-page .intro {
    max-width: 590px;
    margin: 0 0 30px;
    color: var(--dark);
    font-size: var(--font-body-large);
    line-height: var(--line-body);
    text-align: justify;
}

/*
 * Les articles de cette page ne doivent pas récupérer
 * le style générique .page article de style.css.
 */
.implantation-page article {
    margin: 0;
    padding: 0;
    background: transparent;
    border-left: 0;
}

/* =========================
   AXES ROUTIERS
   ========================= */

.route-list {
    display: grid;
    gap: 20px;
}

.route {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 15px;
    position: relative;
}

.route:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 28px;
    top: 58px;
    bottom: -20px;
    width: 1px;
    background: var(--ecoe-line);
}

.route-badge {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-weight: 700;
    font-size: var(--font-small);
    line-height: 1;
    box-shadow: 0 6px 18px rgba(20, 40, 59, .12);
    z-index: 1;
}

.route-blue .route-badge {
    background: var(--ecoe-blue);
}

.route-green .route-badge {
    background: var(--ecoe-green);
}

.route-orange .route-badge {
    background: var(--ecoe-orange);
}

.route h2 {
    margin: 5px 0 6px;
    font-size: var(--implantation-route-title);
    line-height: 1.3;
}

.route-blue h2 {
    color: var(--ecoe-blue);
}

.route-green h2 {
    color: var(--ecoe-green);
}

.route-orange h2 {
    color: var(--ecoe-orange);
}

.route p {
    margin: 0;
    max-width: 610px;
    color: var(--dark);
    font-size: var(--implantation-route-text);
    line-height: 1.5;
    text-align: left;
}

/* =========================
   CARTE
   ========================= */

.map-panel {
    min-width: 0;
    border-radius: 18px;
    overflow: hidden;
    background: transparent;
    box-shadow: none;
}

.map-panel img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
}

/* =========================
   BANDEAU DES AVANTAGES
   ========================= */

.advantages {
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 1px solid var(--ecoe-line);
    border-radius: 14px;
    background: linear-gradient(180deg, #fbfcfc, #f7f9f9);
    overflow: hidden;
}

.advantage {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 14px;
    padding: 22px 20px;
    align-items: start;
    position: relative;
    min-width: 0;
}

.advantage + .advantage::before {
    content: "";
    position: absolute;
    left: 0;
    top: 20px;
    bottom: 20px;
    width: 1px;
    background: var(--ecoe-line);
}

.icon {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
}

.icon img {
    display: block;
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.advantage-blue h2 {
    color: var(--ecoe-blue);
}

.advantage-green h2 {
    color: var(--ecoe-green);
}

.advantage-orange h2 {
    color: var(--ecoe-orange);
}

.advantage h2 {
    margin: 2px 0 7px;
    font-size: var(--implantation-advantage-title);
    line-height: 1.3;
}

.advantage p {
    margin: 0;
    color: var(--dark);
    font-size: var(--implantation-advantage-text);
    line-height: 1.45;
    text-align: left;
}

/* =========================
   TABLETTE
   ========================= */

@media (max-width: 1050px) {
    .implantation-page {
        padding-top: calc(var(--header) + 30px);
    }

    .implantation-hero {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .implantation-copy {
        max-width: 850px;
        width: 100%;
        margin: 0 auto;
    }

    .map-panel {
        width: 100%;
        max-width: 850px;
        margin: 0 auto;
    }

    .advantages {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .advantage:nth-child(3)::before {
        display: none;
    }

    .advantage:nth-child(3),
    .advantage:nth-child(4) {
        border-top: 1px solid var(--ecoe-line);
    }
}

/* =========================
   MOBILE
   ========================= */

@media (max-width: 650px) {
    .implantation-page {
        width: 100%;
        padding: calc(var(--header) + 25px) 16px 40px;

        /* Ajustements mobiles des tailles spécifiques */
        --implantation-lead: 1.10rem;
        --implantation-route-title: 1rem;
        --implantation-route-text: 0.88rem;
        --implantation-advantage-title: 0.98rem;
        --implantation-advantage-text: 0.84rem;
    }

    .implantation-page h1 {
        margin-bottom: 20px;
        font-size: var(--font-h1);
    }

    .implantation-page .lead {
        margin-bottom: 15px;
    }

    .implantation-page .intro {
        margin-bottom: 25px;
        line-height: 1.55;
        text-align: left;
    }

    .route-list {
        gap: 18px;
    }

    .route {
        grid-template-columns: 50px minmax(0, 1fr);
        gap: 11px;
    }

    .route-badge {
        width: 48px;
        height: 48px;
        font-size: var(--font-tiny);
    }

    .route:not(:last-child)::after {
        left: 24px;
        top: 50px;
        bottom: -18px;
    }

    .route h2 {
        margin: 3px 0 5px;
    }

    .route p {
        line-height: 1.45;
    }

    .map-panel {
        border-radius: 12px;
    }

    .advantages {
        grid-template-columns: 1fr;
        margin-top: 30px;
        border-radius: 12px;
    }

    .advantage,
    .advantage:nth-child(3),
    .advantage:nth-child(4) {
        border-top: 1px solid var(--ecoe-line);
    }

    .advantage:first-child {
        border-top: 0;
    }

    .advantage + .advantage::before {
        display: none;
    }

    .advantage {
        grid-template-columns: 58px minmax(0, 1fr);
        padding: 18px 16px;
    }
}
