@font-face {
    font-display: swap;
    font-family: "Naotypo_web";
    font-style: normal;
    font-weight: 500;
    src: url("../fonts/jsp_gppro/styles/fonts/naotypo/Naotypo-Medium.woff") format("woff");
}

* {
    box-sizing: border-box;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
}

body {
    margin: 0;
    height: 100vh;
    background: #d6e4dc;
}

/* ================= INTRO ================= */
#intro {
    position: fixed;
    inset: 0;
    background: linear-gradient(90deg, #0b1f00, #0f3d00);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* GIF NAOLIB */
.intro-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* ================= HEADER ================= */
.hidden { display: none; }

header {
    background: linear-gradient(90deg, #0b1f00, #0f3d00);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center; /* centre verticalement les éléments */
    position: relative;
}

.title {
    font-size: clamp(20px, 4vw, 36px);
    font-family: "Naotypo_web", "Tahoma", "Arial", "Helvetica", sans-serif;
}

.clock {
    text-align: right;
    font-family: "Naotypo_web", "Tahoma", "Arial", "Helvetica", sans-serif;
}

#time {
    font-size: clamp(24px, 5vw, 42px);
    font-weight: bold;
    font-family: "Naotypo_web", "Tahoma", "Arial", "Helvetica", sans-serif;
}

/* ==================== MAIN CONTENT ==================== */
/* LEFT PANEL (desktop) */
.left-panel {
    position: fixed;           /* desktop reste fixed */
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 400px;
    height: auto;              /* laisser la hauteur s'adapter */
    padding: 0;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    background: none;
    overflow: hidden;
}

/* iframe prend la majeure partie de la div, mais pas 100% */
.left-panel iframe {
    width: 100%;
    height: 650px;           /* laisse de la place pour le lien */
    border: none;
    border-radius: 15px;
    overflow: hidden;
}

/* Lien cliquable sous l'iframe, visible tout le temps */
.full-page-link {
    display: block;
    text-align: center;
    margin: 8px auto 15px;    /* espace au-dessus et en dessous */
    font-size: 14px;
    color: #11a8e0;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.3s ease;
}

.full-page-link:hover {
    color: #0a7ca0;
}

/* ===== LOGO ===== */
.logo-link {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
}

.logo-header {
    max-height: 60px; /* ajuste selon la taille souhaitée */
    object-fit: contain;
}

/* ================= CARD ================= */
main {
    display: flex;
    justify-content: center;
    padding: 40px 15px;
}

.card {
    background: white;
    width: 100%;
    max-width: 720px;
    border-radius: 26px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0,0,0,.15);
}

.line {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.badge {
    background: #11a8e0;
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 22px;
    margin-right: 15px;
}

.destination {
    font-size: clamp(22px, 4vw, 32px);
    font-weight: 600;
}

/* ================= NEXT ================= */
.label {
    font-size: 22px;
    color: #7b8c80;
}

.minutes-container {
    display: flex;
    align-items: center;
}

#minutes {
    font-size: clamp(60px, 14vw, 120px);
    font-weight: 800;
    color: #143c00;
}

#minutes.proche {
    animation: pulse 1s infinite;
    color: #6bd400;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

.min {
    font-size: 32px;
    margin-left: 10px;
}

/* ================= WAVES ================= */
.waves {
    display: flex;
    margin-left: 15px;
}

.waves span {
    width: 8px;
    height: 8px;
    border: 2px solid #6bd400;
    border-radius: 50%;
    margin-left: 4px;
    animation: wave 1.5s infinite;
}

.waves span:nth-child(2) { animation-delay: .3s; }
.waves span:nth-child(3) { animation-delay: .6s; }

@keyframes wave {
    0% { transform: scale(0.5); opacity: .3; }
    50% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.4); opacity: 0; }
}

/* ================= INFO TRAFIC FUTURISTE ================= */

/* ===== CARD PRINCIPALE ===== */
.card-stat {
    background: linear-gradient(145deg, #1d3f1d, #2a5a2a);
    border-radius: 25px;
    padding: 30px;
    color: #fff;
    max-width: 900px;
    margin: 30px auto;
    box-shadow: 0 10px 25px rgba(0,0,0,0.35), inset 0 -2px 10px rgba(255,255,255,0.05);
    backdrop-filter: blur(4px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-family: 'Roboto', sans-serif;
}

/* ===== STATUS GLOBAL ===== */
.trafic-status {
    padding: 22px 25px;
    border-radius: 14px;
    margin-bottom: 28px;
    font-weight: 800;
    text-align: center;
    font-size: 1.25rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    background-clip: padding-box;
}
.trafic-status.ok {
    background: #2ecc71;
    box-shadow: 0 0 15px rgba(46,204,113,0.7), 0 4px 12px rgba(46,204,113,0.4);
}
.trafic-status.warning {
    background: #f39c12;
    box-shadow: 0 0 15px rgba(243,156,18,0.7), 0 4px 12px rgba(243,156,18,0.4);
}
.trafic-status.critical {
    background: #e74c3c;
    box-shadow: 0 0 15px rgba(231,76,60,0.7), 0 4px 12px rgba(231,76,60,0.4);
}

/* ===== ALERTS ===== */
.alert {
    background: linear-gradient(135deg, #2e5d2e, #1f3f1f);
    border-radius: 18px;
    padding: 22px 25px;
    margin-bottom: 20px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.3), inset 0 -2px 8px rgba(255,255,255,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}
.alert:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 10px 25px rgba(0,0,0,0.4), inset 0 -2px 12px rgba(255,255,255,0.12);
}

/* ===== LIGNE ET BADGE ===== */
.alert-line {
    display: flex;
    gap: 16px;
    margin-bottom: 14px;
    align-items: center;
}

.alert-badge {
    background: #fff;
    color: #1d3f1d;
    font-weight: 700;
    padding: 10px 16px;
    border-radius: 14px;
    min-width: 50px;
    text-align: center;
    font-size: 1rem;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2), inset 0 -1px 2px rgba(255,255,255,0.15);
}

/* ===== TITRE ET TEXTE ===== */
.alert-title {
    font-weight: 800;
    font-size: 1.3rem;
    flex: 1;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.alert-text {
    font-size: 1.05rem;
    line-height: 1.5;
    color: #e0e0e0;
    margin-bottom: 6px;
}

.alert-dates {
    font-size: 0.85rem;
    color: #b0b0b0;
    font-style: italic;
}

/* ===== NIVEAUX ===== */
.alert.ok {
    border-left: 6px solid #2ecc71;
    background: linear-gradient(135deg, #3db05e, #1f3f1f);
    box-shadow: 0 6px 18px rgba(46,204,113,0.3);
}

.alert.warning {
    border-left: 6px solid #f39c12;
    background: linear-gradient(135deg, #3c6e3c, #2e5d2e);
    box-shadow: 0 6px 18px rgba(243,156,18,0.3);
}

.alert.critical {
    border-left: 6px solid #e74c3c;
    background: linear-gradient(135deg, #7a2a2a, #4b1d1d);
    box-shadow: 0 6px 18px rgba(231,76,60,0.35);
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {

    /* Header : empile les éléments et logo en dessous */
    header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 15px 10px;
    }

    /* Logo passe en dessous du titre */
    .logo-link {
        position: static;
        transform: none;
        margin-top: 10px;
    }

    main {
        display: flex;
        flex-direction: column;   /* empile verticalement */
        justify-content: flex-start;
        align-items: center;
        padding: 20px 10px;
        gap: 20px;                /* espace entre card et iframe */
    }

    main {
        display: flex;
        flex-direction: column; /* empile verticalement */
        justify-content: flex-start;
        align-items: center;
        gap: 20px; /* espace entre card et iframe */
        padding: 20px 10px;
    }

    /* Card : première dans la colonne */
    .card {
        width: 90vw;
        max-width: 90vw;
        height: auto;
        padding: 20px;
        margin: 0 auto;
        box-sizing: border-box;
        order: 1; /* carte en premier */
    }

    /* Left-panel : sous la card */
    .left-panel {
        position: static;  /* suit le flux normal */
        transform: none;
        width: 90vw;
        max-width: 90vw;
        height: 400px;
        margin: 0 auto;    /* centré sous la card */
        border-radius: 15px;
        box-shadow: 0 5px 20px rgba(0,0,0,0.2);
        overflow: hidden;
        background: none;
        order: 2;          /* iframe après la carte */
    }

    .left-panel iframe {
        width: 100%;
        height: 100%;
        border-radius: 15px;
    }

    .card-stat {
        padding: 20px;         /* réduit le padding sur mobile */
        margin: 15px;          /* moins d'espace autour */
        border-radius: 15px;   /* arrondis légèrement plus petits */
        max-width: 100%;       /* prend toute la largeur de l'écran */
    }
}