/*
    PAS DE FONT-SIZE EN PX, QUE DU REM
    ---
    L'utilisation de l'IA est toujours annoncé par un commentaire suivi de la mention en commentaires :
     IA : [Modèle]
     Prompt : [Prompt]
*/

@import "texts.css";
@import "fonts.css";

:root {
    --bg-primary: #F2F2F2;
    --bg-secondary: #F7F7F7;

    --txt-color: #202324;
    --txt-secondary: #404040;

    --link-color: #006cd1;
}

* {
    box-sizing: border-box;
    font-family: 'IBM Plex Sans', sans-serif;
    /* Débuggage de Layout */
    /*
    border: 1px solid red;
    */
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: all 2s ease-in-out !important;
        animation: none !important;
    }

    *:hover {
        transform: none !important;
        margin-bottom: 0 !important;
    }

    #overlay {
        display: none !important;
    }
}

:focus-visible {
    /*outline: 2px solid #007AEA;*/
    outline: 4px solid var(--link-color);
    outline-offset: 2px;
    border-radius: .375rem;
    transition: outline 0.2s ease-in-out;
}

::selection {
    background: #252525;
    color: #f2f2f2;
}

::-moz-selection {
    background: #252525;
    color: #f2f2f2;
}

body {
    font-size: 1rem;
    background-color: var(--bg-primary);
    color: var(--txt-color);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    width: 100vw;
    scroll-behavior: smooth !important;
}

/* Accessibilité */

.sr-only {
    border: 0 !important;
    clip: rect(1px, 1px, 1px, 1px) !important;
    -webkit-clip-path: inset(50%) !important;
    clip-path: inset(50%) !important;
    height: 1px !important;
    overflow: hidden !important;
    padding: 0 !important;
    position: absolute !important;
    width: 1px !important;
    white-space: nowrap !important;
}

.skip-link {
    position: absolute;
    top: -1000px;
    left: 0;
    background: var(--txt-color);
    color: var(--bg-primary);
    padding: 16px;
    z-index: 1000;
}

.skip-link:focus {
    top: 0;
}

/*
    !important -> Écrase le soulignement par défaut.
*/
u {
    text-decoration: none !important;
}

/* Navbar */
/*
    !important -> Évite les problèmes de z-index avec le header sticky.
*/
header.navHeader {
    position: sticky;
    top: 0;
    background: linear-gradient(180deg, #F2F2F2 0%, #F2F2F250 52%, #F2F2F200 100%);
    z-index: 1005 !important;
}

nav {
    display: flex;
    padding: 0.9375rem 0.625rem;
    justify-content: space-between;
    align-items: center;
    align-self: stretch;
}

nav > ul {
    display: flex;
    list-style: none;
    margin: 0;
    width: 200px;
}

nav > ul.nav-right {
    justify-content: flex-end;
}

li {
    margin-right: 0.625rem;
}

a {
    text-decoration: none;
    color: var(--link-color);
    font-style: normal;
    font-weight: 700;
    line-height: 1.2;
}

a:hover {
    text-decoration: underline;
}

nav > ul > li > a {
    font-size: 1.5rem;
    color: var(--txt-color);
    transition: all 0.3s ease-in-out;
}

.logoDetail {
    display: flex;
    align-items: center;
    gap: 10px;
}

.iconNav {
    height: 40px;
}

@media (width < 920px) {
    .wordmark {
        display: none;
    }

    nav > ul {
        padding: 0;
    }
}

/* Main */
main {
    display: flex;
    /*min-height: 56.25rem;*/
    flex-direction: column;
    align-items: center;
    gap: 0.3125rem;
    align-self: stretch;
    position: relative;
    max-width: 1140px;
    padding: 4.375rem 1.25rem 1.5rem 1.25rem;
    margin: 0 auto;
}

main.noCenter {
    align-items: flex-start;
    padding: 1.5rem 0.625rem;
}

#overlay {
    background: rgba(0, 0, 0, 0);
    position: absolute;
    width: 1px;
    height: 1px;
    top: 50%;
    left: 50%;
    z-index: 1002;
    transition: background .25s ease-in-out;
}

body:has(.bigSearch:focus) #overlay {
    background: rgba(0, 0, 0, 0.33);
    position: absolute;
    width: 100vw;
    height: 100%;
    top: 0;
    left: 0;
}

body:has(.bigSearch:focus) {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Docs */
.locator {
    color: var(--txt-secondary);
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0;
}

ul.unList {
    list-style: none;
    padding: 0;
    margin: 0;
}

ul.bigList li {
    font-size: 1.25rem;
    margin: 0;
}

.docTitle > h1, .docTitle > p, .titleContainer > h1, .titleContainer > * {
    line-height: 1;
}

.mapView {
    width: 100vw;
    max-height: 500px;
    height: 500px;
    overflow: hidden;
    background-image: url("https://upload.wikimedia.org/wikipedia/commons/d/d7/RER_NG_009M.jpg");
    background-size: cover;
    background-position: center;
    margin-left: calc(50% - 50vw);
    position: relative;
}

.mapView > * {
    height: 500px;
    width: 100%;
}

#imgOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /*Léger overlay qui estompe l'image*/
    background: rgba(0, 0, 0, 0.2);
    pointer-events: none;
    z-index: 1001;
}

.attribution {
    position: absolute;
    bottom: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.8);
    width: auto;
    height: auto;
    font-size: 0.625rem;
    padding: 2px 4px;
    z-index: 1003;
}

.mapImg {
    width: 100%;
    height: auto;
    transform: translateY(-30%);
    transition: transform 0.5s ease-in-out;
}

@media (width < 600px) {
    .mapImg {
        transform: translateY(0%);
    }
}

.mapboxgl-ctrl-attrib-inner {
    display: none;
}

/* Form */
form.homeSearch {
    width: 100%;
}

form.search {
    width: 100%;
    padding: 4.375rem 1.25rem 1.5rem 1.25rem;
}

form.adminSearch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.625rem;
    align-self: stretch;
    width: 100%;
    max-width: 800px;
    margin: auto;
}

.inputContainer {
    width: 100%;
    /* Delete fieldset stuffs*/
    border: 0;
    padding: 0;
    margin: 0;
}

h1 > label {
    font-family: 'Meshed Display', serif;
    font-size: 2.25rem;
}

.bigSearch {
    border-radius: 1.25rem;
    border: 2px solid #E5E5E5;
    background: #FDFDFD;
    color: var(--txt-color);
    font-size: 1.5rem;
    font-style: normal;
    font-weight: 700;
    line-height: 1.5rem;
    padding: 1.25rem 1.5625rem 1.25rem 3rem;
    width: 100%;
}

.bigSearch:focus {
    box-shadow: 0 0 4rem 5px rgb(255 255 255 / 46%);
}

.bigSearch::placeholder {
    color: #c3c3c3;
}

.inputWrapper {
    position: relative;
    width: 100%;
    z-index: 1003
}

.iconSearch {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-image: url("../img/icons/magnifying_glass.svg");
    background-size: cover;
    pointer-events: none;
}

/* Last Trains */
.lastTrainsHero {
    gap: 0.625rem;
    padding: 2.5rem 0;
    width: 100%;
}

.tilesContainer {
    display: flex;
    gap: 0.625rem;
    flex-wrap: wrap;
    justify-content: space-between;
    width: 100%;
}

.tile {
    border-radius: 1.25rem;
    background: var(--bg-secondary);
    box-shadow: 0 0 24px 0 rgba(0, 0, 0, 0.05);
    min-width: 290px;
    display: flex;
    flex: 1;
    padding: 1.375rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.625rem;
    flex-shrink: 0;
    align-self: stretch;
    z-index: 1000;
    transition-property: transform, margin-bottom, box-shadow, z-index;
    transition-duration: 1s, 1s, 1s, 0s;
    transition-delay: 0s, 0.2s, 0s, 0s;
    will-change: transform;
    transition-timing-function: cubic-bezier(0.43, -1, 0, 1.63);
}

.tileResult {
    flex-direction: row;
    padding: 1.375rem;
    order: 1;
}

.tileResult.hidden {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.fullHide {
    opacity: 0;
    height: 0;
    max-height: 0;
    padding: 0;
    transition: all 0.5s ease-in-out;
    order: 2;
}

.tileResult > .rame {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1 0 0;
    align-self: stretch;
}

.tile:hover, .tile:focus {
    transform: translateY(-1rem);
    box-shadow: 0 0 24px 0 rgba(0, 0, 0, 0.2);
    z-index: 1001;
}

.tileResult:hover, .tileResult:focus {
    margin-bottom: -.75rem;
}

.tile:focus-visible {
    outline: 4px solid var(--link-color);
    outline-offset: 2px;
}

.rameInfo {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
}

.tileResult > * > .rameInfo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex-direction: column;
    justify-content: center;
}

.rameIcon {
    width: 4.54975rem;
    align-self: stretch;
    aspect-ratio: 72.80/47.00;
}

.rameInfo > * > h3 {
    color: var(--txt-color);
    font-family: "IBM Plex Sans", sans-serif;
    font-size: 1.5rem;
    font-style: normal;
    font-weight: 700;
    line-height: 100%;
    margin-bottom: 0.3125rem;
}

.badgesContainer {
    display: flex;
    align-items: flex-start;
    gap: 0.3125rem;
}

.tileResult > * > .badgesContainer {
    display: flex;
    align-items: flex-start;
    gap: 0.3125rem;
    flex-direction: column;

}

.dateContainer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.625rem;
    align-self: stretch;
}

.tileResult > .rame > .dateContainer {
    justify-content: center;
    align-self: auto;
}

.dateContainer > div {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.date {
    color: var(--txt-color);
    font-size: 1.125rem;
    font-style: normal;
    font-weight: 700;
}

.infosSupp {
    display: flex;
    padding-top: 0.625rem;
    justify-content: space-between;
    align-items: flex-end;
    flex: 1 0 0;
    align-self: stretch;
}

.tileResult > .infosSupp {
    flex: 0 0 0;
}

.iconLigne {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 0.3125rem;
}

.tileResult > .infosSupp {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.625rem;
    flex: 1 0 0;
    align-self: stretch;
}

.iconLigne > img, .iconLigne > svg {
    width: 1.875rem;
    height: 1.875rem;
    aspect-ratio: 1/1;
}

.tileResult > * > .iconLigne {
    align-items: center;
}

.tileResult > * > .iconLigne img, .tileResult > * > .iconLigne svg {
    width: 2.25rem;
    height: 2.25rem;
    aspect-ratio: 1/1;
}

.imgExpl {
    float: right;
    margin-left: 20px;
    margin-bottom: 20px;
}


.buttonContainer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.625rem;
    flex-direction: column;
    align-self: stretch;
    padding-top: .75rem;
    padding-bottom: 0.625rem;
}

.seeMoreBtn {
    position: relative;
}

p .seeMoreBtn {
    padding: 1.25rem 0;
}

.seeMoreBtn > .hoverOnly {
    position: absolute;
    top: 50%;
    right: 0;
    opacity: 0;
    transform: translateY(-50%) scale(0);
    margin-top: .05rem;
    transition: all 0.5s cubic-bezier(0.78, -0.57, 0.2, 1.52);
}

.seeMoreBtn:hover > .hoverOnly {
    right: -15px;
    transform: translateY(-50%) scale(1);
    opacity: 1;
}


/*
    Search Page
*/

.searchResults {
    display: flex;
    max-width: 71.25rem;
    padding: 1.375rem 1.25rem 1.5rem 1.25rem;
    flex-direction: column;
    align-items: flex-start;
    gap: .625rem;
    align-self: stretch;
}

.resultsContainer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.625rem;
    align-self: stretch;
    width: 100%;
}

/*
    Badges
*/

.badge {
    display: flex;
    padding: 0.3125rem 0.625rem;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.625rem;
    border-radius: 3.32rem;
    background: var(--bg-primary);
    color: var(--txt-color);
    font-size: 0.8125rem;
    font-style: normal;
    font-weight: 700;
    line-height: 100%;
}

.badgeMD {
    padding: 0.4375rem 0.78125rem;
    border-radius: 3.3125rem;
    font-size: 1rem;
}

.badgeXL {
    padding: 0.625rem 1.25rem;
    border-radius: 3.3125rem;
    font-size: 1.125rem;
    font-style: normal;
    font-weight: 700;
    line-height: 100%;
}

.detailsBadge {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
}

.blueBadge {
    background: #ACE2FC;
    color: #004A6C;
}

.redBadge {
    background: #F9B7B7;
    color: #690F0F;
}

.greenBadge {
    background: #D8F9B7;
    color: #39690F;
}

.yellowBadge {
    background: #F9ECB7;
    color: #694D0F;
}

.grayBadge {
    background: #FDFDFD;
    color: #4F4F4F;
}

.transilienBadge {
    background: #9cb0f1;
    color: #00196c;
}

.redBerryBadge {
    background: #ffccd7;
    color: #902d42;
}

.ratpBadge {
    background: #d1fff9;
    color: #007a68;
}

.idfmLegerBadge {
    background: rgb(38, 41, 58);
    color: rgb(211, 208, 205);
}

.stifRatpBadge {
    color: #f7f7f7;
    background: #007a68;
}

.stifCarmillonRatpBadge {
    background: linear-gradient(to right, #902d42, #007a68);
    color: #f7f7f7;
}

/*
    Filters
*/

.filterContainer {
    display: flex;
    padding: 0.625rem;
    align-items: center;
    gap: 0.625rem;
    align-self: stretch;
}

.TriBtn, .filterSelect {
    max-width: 31.25rem;
    padding: 0.75rem 1.0625rem;
    border-radius: 0.5625rem;
    background: #FDFDFD;
    border: 0;
    color: #818181;
    font-size: 1.125rem;
    font-style: normal;
    font-weight: 700;
    line-height: 100%;
    display: flex;
    gap: .52rem;
    align-items: center;
}

.filterSelect {
    padding: 0.5rem;
}

#rameUp,
#rameDown,
#livraisonUp,
#livraisonDown {
    opacity: 0;
    margin-top: -7.9px;
    transition: opacity 0.5s ease-in-out, margin-top 0.5s ease-in-out;
    transform-origin: center;
}

#rameUp.visible,
#rameDown.visible,
#livraisonUp.visible,
#livraisonDown.visible {
    margin-top: 0;
    opacity: 1;
}

.TriBtn span {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.vSep::before {
    content: '';
}

.TriBtn span > svg {
    width: 0.825rem;
}

.trainInfo {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    align-self: stretch;
    padding: 3rem 0;
}

.imgTrainBig {
    height: 9.5625rem;
    aspect-ratio: 79/51;
}

.trainInfosDetails {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 0.3125rem;
}

.tableContainer {
    display: flex;
    width: 100%;
    align-items: flex-start;
    gap: 1.5625rem;
    align-self: stretch;
}

.tableContainer > * {
    display: flex;
    padding: 0.875rem 1.5rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    flex: 1 0 0;
}

.tableWrapper {
    border: 1px solid #CBCBCB;
    border-radius: 15px;
    width: 100%;
    overflow: hidden;
}

table {
    background: #F2F2F2;
    width: 100%;
    margin: 0 auto;
    padding: 0;
    border-collapse: collapse;
    border-radius: 15px;
}

thead {
    background: rgba(0, 0, 0, 0.05);
}

.tableTitle {
    padding: 10px 12px;
}

.tableContent {
    padding: 8px;
}

table th:first-child {
    border-top-left-radius: 15px;
    border-left: none;
    border-top: none;
}

table th:last-child {
    border-top-right-radius: 15px;
    border-top: none;
    border-right: none;
}

table tr:last-child td:first-child {
    border-bottom-left-radius: 15px;
    border-bottom: none;
    border-left: none;
}

table tr:last-child td:last-child {
    border-bottom-right-radius: 15px;
    border-bottom: none;
    border-right: none;
}

th:first-child, td:first-child {
    border-right: 1px solid #CBCBCB;
    border-bottom: 1px solid #CBCBCB;
}

th:last-child, td:last-child {
    border-left: 1px solid #CBCBCB;
    border-bottom: 1px solid #CBCBCB;
}

.legalContent {
    padding: 1.25rem 1.5rem;
}

/*
    Footer
*/

footer {
    display: flex;
    max-width: 90rem;
    margin: 0 auto;
    padding: 2.5rem 6.25rem;
    justify-content: space-between;
    align-items: center;
}

.brandContainer {
    display: flex;
    padding: 0 0.625rem;
    align-items: center;
    gap: 0.625rem;
    align-self: stretch;
    width: 15.4375rem;
}

.linkContainer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.875rem;
    flex-shrink: 0;
}

.brandContainer img {
    width: 7.5rem;
}

.brandText {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.625rem;
}

.tagLine {
    color: #202124;
    font-family: "IBM Plex Sans", sans-serif;
    font-size: 1.5rem;
    font-style: normal;
    font-weight: 700;
    line-height: 1.65rem;
}

.wordmark {
    width: 15.4375rem;
    height: 2.1875rem;
}

.catTitle {
    color: var(--txt-color);
    font-family: "Meshed Display", serif;
    font-size: 1.75rem;
    font-style: normal;
    font-weight: 800;
    line-height: 1.925rem;
}

.linkRow {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    align-self: stretch;
}

.linkRow ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    font-family: "IBM Plex Sans", sans-serif;
}

.linkRow ul li a {
    color: var(--txt-color);
    font-size: 1.125rem;
    font-style: normal;
    font-weight: 700;
    line-height: 0.9rem;
}


/*
    Responsive
*/

@media screen and (width < 900px) {
    .tilesContainer {
        flex-direction: column;
    }

    footer {
        padding: 2.5rem 1.25rem;
        flex-direction: column;
        gap: 2.5rem;
    }

    .tagLine {
        font-size: 1.125rem;
        line-height: 1.25rem;
    }

    .tableContainer {
        flex-direction: column;
    }

    .trainInfo {
        flex-direction: column;
        gap: 0.625rem;
        padding: 1rem;
    }

    /* !important -> Écrase le margin persistant */
    .bigTitle {
        margin-top: .75rem !important;
    }

    .tableContainer > * {
        width: 100%;
    }

    nav > ul > li > a {
        font-size: 1.125rem;
    }
}

@media screen and (width < 525px) {
    .searchResults {
        padding: 0 !important;
    }

    .badgeMD {
        padding: 0.3125rem 0.625rem;
        border-radius: 3.3125rem;
        font-size: 0.8125rem;
    }

    .rame {
        flex-wrap: wrap;
    }
}