/* Portail public — panneau d'affichage des départs et arrivées.
   Feuille autonome, volontairement séparée de brand.css : le portail est la
   seule page à jouer le registre « tableau de hall de gare » (fond sombre,
   chiffres tabulaires, statuts lumineux), et cette esthétique n'a pas à peser
   sur l'application de gestion. Les couleurs de marque sont redéclarées ici
   pour que Voyage::couleurStatut(), qui renvoie des var(--ln-*), fonctionne
   aussi sur cette page. */
:root {
    --ln-navy: #0B1F3C;
    --ln-navy-dark: #071426;
    --ln-navy-light: #16305A;
    --ln-green: #208040;
    --ln-red: #D3191A;
    --ln-gold: #F7C210;

    --pt-fond: #050d1a;
    --pt-panneau: #0a1729;
    --pt-panneau-entete: #0e2140;
    --pt-trait: rgba(255, 255, 255, .08);
    --pt-texte: #e8eefb;
    --pt-texte-doux: #93a4c4;
    --pt-texte-faible: #64769a;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.pt-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(1200px 600px at 50% -10%, rgba(22, 48, 90, .55), transparent 70%),
        var(--pt-fond);
    color: var(--pt-texte);
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* --- En-tête --- */
.pt-entete {
    position: sticky;
    top: 0;
    z-index: 10;
    background: linear-gradient(180deg, var(--ln-navy) 0%, var(--ln-navy-dark) 100%);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, .45);
}

.pt-entete-haut {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 28px;
}

.pt-logo img {
    display: block;
    width: 100%;
    max-width: 190px;
    height: auto;
}

.pt-horloge {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
}

/* Chiffres tabulaires : sans cela, l'horloge « danse » à chaque seconde,
   chaque glyphe n'ayant pas la même largeur. */
.pt-heure {
    font-size: 32px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: .04em;
    color: var(--ln-gold);
}

.pt-date {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--pt-texte-doux);
}

.pt-lien-pro {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding: 10px 18px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 10px;
    color: var(--pt-texte);
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: .15s;
}

.pt-lien-pro:hover {
    border-color: var(--ln-gold);
    color: var(--ln-gold);
}

/* Les deux liens de droite de l'en-tête : réserver (action principale) et
   accès professionnel (secondaire). */
.pt-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Or plein sur fond marine : le seul élément de la page à porter cette
   couleur en aplat, pour qu'aucun autre ne lui dispute l'attention. */
.pt-btn-reserver {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding: 11px 22px;
    border-radius: 10px;
    background: var(--ln-gold);
    color: var(--ln-navy);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(247, 194, 16, .25);
    transition: .15s;
}

.pt-btn-reserver:hover {
    background: #ffd23f;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(247, 194, 16, .35);
}

@media (max-width: 720px) {
    .pt-actions {
        width: 100%;
        justify-content: space-between;
    }

    .pt-btn-reserver {
        flex: 1;
        justify-content: center;
    }
}

.pt-brand-bar {
    height: 4px;
    background: linear-gradient(
        to right,
        var(--ln-green) 0%,
        var(--ln-green) 30%,
        var(--ln-gold) 45%,
        var(--ln-gold) 55%,
        var(--ln-red) 70%,
        var(--ln-red) 100%
    );
}

/* --- Filtre de ville --- */
.pt-filtre {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 18px 28px;
    background: rgba(5, 13, 26, .6);
}

.pt-filtre-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ln-gold);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.pt-select {
    min-width: 220px;
    height: 46px;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 10px;
    background: var(--pt-panneau-entete);
    color: var(--pt-texte);
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
}

.pt-select:focus {
    outline: none;
    border-color: var(--ln-gold);
    box-shadow: 0 0 0 4px rgba(247, 194, 16, .18);
}

.pt-btn-filtre {
    height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 10px;
    background: var(--ln-gold);
    color: var(--ln-navy-dark);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.pt-btn-filtre:hover {
    background: #ffd644;
}

/* La légende passe à la ligne entière : elle explique le panneau, elle n'est
   pas un contrôle du formulaire. */
.pt-filtre-legende {
    flex-basis: 100%;
    color: var(--pt-texte-faible);
    font-size: 12.5px;
}

.pt-filtre-legende strong {
    color: var(--pt-texte-doux);
}

/* --- Panneaux --- */
.pt-panneaux {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 22px 28px 32px;
}

.pt-panneau {
    border: 1px solid var(--pt-trait);
    border-radius: 16px;
    background: var(--pt-panneau);
    box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, .35);
    overflow: hidden;
}

.pt-panneau-titre {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: var(--pt-panneau-entete);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.pt-panneau-titre .bi {
    font-size: 19px;
}

.pt-panneau-departs .pt-panneau-titre .bi {
    color: var(--ln-gold);
}

.pt-panneau-arrivees .pt-panneau-titre .bi {
    color: #5fd08a;
}

.pt-panneau-compte {
    margin-left: auto;
    min-width: 30px;
    padding: 2px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    color: var(--pt-texte-doux);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0;
    text-align: center;
}

/* Un panneau étroit ne casse pas la mise en page : il défile horizontalement
   plutôt que d'élargir la page. Verticalement, environ 10 lignes tiennent
   avant de défiler (max-height calé sur la hauteur réelle d'une ligne —
   voir .pt-table tbody td) : au-delà, chaque bloc défile indépendamment
   plutôt que d'allonger toute la page. */
.pt-table-wrap {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 1100px;
}

.pt-table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

.pt-table thead th {
    position: sticky;
    top: 0;
    padding: 9px 20px;
    background: var(--pt-panneau-entete);
    border-bottom: 1px solid var(--pt-trait);
    color: var(--pt-texte-faible);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .12em;
    text-align: left;
    text-transform: uppercase;
}

.pt-table tbody td {
    padding: 11px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, .05);
    font-size: 14px;
    vertical-align: middle;
}

.pt-table tbody tr:last-child td {
    border-bottom: 0;
}

.pt-table tbody tr:hover {
    background: rgba(255, 255, 255, .03);
}

.pt-heure-vol {
    font-size: 21px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: .03em;
    color: var(--ln-gold);
}

.pt-panneau-arrivees .pt-heure-vol {
    color: #5fd08a;
}

.pt-col-ville {
    white-space: normal;
}

.pt-ville-nom {
    display: block;
    font-size: 15.5px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.pt-ligne-nom {
    display: block;
    margin-top: 1px;
    color: var(--pt-texte-faible);
    font-size: 12px;
}

.pt-veille {
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
    color: var(--pt-texte-doux);
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.pt-col-compagnie {
    color: var(--pt-texte);
    font-weight: 600;
    white-space: normal;
}

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

.pt-compagnie-logo {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    object-fit: cover;
    flex: none;
}

.pt-compagnie-logo-vide {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ln-navy-light);
    color: var(--pt-texte);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .03em;
}

.pt-compagnie-ident {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    min-width: 0;
}

.pt-compagnie-nom {
    font-size: 14px;
}

.pt-compagnie-sigle {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    color: var(--pt-texte-doux);
}

.pt-col-vehicule {
    color: var(--pt-texte-doux);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px;
}

.pt-heure-sec {
    font-variant-numeric: tabular-nums;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--pt-texte-doux);
}

/* Mention de jour (« Demain », « Hier ») accolée à un horaire : le panneau
   couvre trois jours glissants, une heure seule serait ambiguë. */
.pt-jour {
    display: block;
    color: var(--ln-gold);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.pt-non-communique {
    color: var(--pt-texte-faible);
    font-size: 12px;
}

/* États : les quatre tons produits par PanneauVoyagesService, transposés sur
   fond sombre (les couleurs de marque brutes manquent de luminance ici). */
.pt-etat {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 12px;
    border: 1px solid color-mix(in srgb, var(--pt-etat-couleur) 55%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--pt-etat-couleur) 16%, transparent);
    color: var(--pt-etat-couleur);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.pt-etat::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--pt-etat-couleur);
    box-shadow: 0 0 8px var(--pt-etat-couleur);
}

.pt-etat-green {
    --pt-etat-couleur: #3ecf7a;
}

.pt-etat-gold {
    --pt-etat-couleur: var(--ln-gold);
}

.pt-etat-red {
    --pt-etat-couleur: #ff6b6b;
}

.pt-etat-navy {
    --pt-etat-couleur: #6ea8ff;
}

.pt-etat-grey {
    --pt-etat-couleur: #93a4c4;
}

/* Voyage annulé : la ligne reste lisible mais visiblement hors service, comme
   sur un panneau réel où l'information n'est pas retirée d'un coup. */
.pt-ligne-annulee .pt-heure-vol,
.pt-ligne-annulee .pt-ville-nom {
    color: var(--pt-texte-faible);
    text-decoration: line-through;
    text-decoration-thickness: 2px;
}

.pt-vide {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 44px 20px;
    color: var(--pt-texte-faible);
    text-align: center;
    white-space: normal;
}

.pt-vide .bi {
    font-size: 30px;
    opacity: .5;
}

.pt-vide-global {
    grid-column: 1 / -1;
    border: 1px dashed var(--pt-trait);
    border-radius: 16px;
    background: var(--pt-panneau);
}

/* --- Pied --- */
.pt-pied {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 14px 28px;
    border-top: 1px solid var(--pt-trait);
    color: var(--pt-texte-faible);
    font-size: 12px;
}

.pt-pied-refresh {
    font-variant-numeric: tabular-nums;
}

@media (max-width: 640px) {
    .pt-entete-haut {
        flex-wrap: wrap;
        justify-content: center;
        gap: 14px;
        padding: 14px 18px;
    }

    .pt-heure {
        font-size: 26px;
    }

    .pt-filtre,
    .pt-panneaux,
    .pt-pied {
        padding-left: 16px;
        padding-right: 16px;
    }

    .pt-select {
        flex: 1;
        min-width: 0;
    }
}
