        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        @font-face {
            font-family: 'AldrichCustom';
            src: url('../fonts/Aldrich.ttf') format('truetype');
            font-weight: normal;
            font-style: normal;
        }

        .header-title,
        .day-header,
        .stream-time,
        .planning-footer {
            font-family: 'AldrichCustom', sans-serif;
        }


        body {
            font-family: 'Arial Black', Arial, sans-serif;
            background: #1a1a1a;
            padding: 20px;
        }

        .planning-container {
            max-width: 1600px;
            margin: 0 auto;
            background: #111;
            border-radius: 10px;

            border: 4px solid #FE7701;

        }

        /* HEADER ORANGE */

        .planning-header {
            background: linear-gradient(90deg,
                    #FE7701 0%,
                    #ffba6c 50%,
                    #FE7701 100%);
            color: white;
            display: flex;
            align-items: center;
            padding: 0px 40px;
            height: 70px;
            /* plus grand comme le Canva */
            position: relative;

        }


        .header-right {
            width: 80px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .header-logo {
            height: 110px;
            /* plus haut que 110px du header */
            width: auto;
            position: absolute;
            left: 10px;
            bottom: -20px;
            /* dépasse légèrement */
            object-fit: contain;
            z-index: 2;
        }

        .header-title {
            font-family: 'AldrichCustom', sans-serif;
            font-size: 3rem;
            letter-spacing: 3px;
            text-transform: uppercase;
            font-weight: 700;
            text-align: center;
            width: 100%;
        }

        .header-twitch-icon {
            height: 70px;
            /* remplit la hauteur du header */
            width: 70px;
            object-fit: contain;
            position: absolute;
            right: 10px;
            border-radius: 80%;
            object-fit: contain;
            position: absolute;
        }

        .header-center {
            flex: 1;
            text-align: center;
        }

        /* GRILLE DES JOURS */

        .planning-main {
            background: #333;
            padding: 10px 10px 0 10px;
        }

        .days-grid {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 6px;
        }

        .day-column {
            background: #e4e4e4;
            /* un gris un peu plus sombre */
            border-radius: 6px 6px 0 0;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            min-height: 420px;
            position: relative;
        }

        .day-name {
            font-family: 'AldrichCustom', sans-serif;
            font-size: 1.1em;
            letter-spacing: 1px;
            text-transform: uppercase;
        }

        .day-date {
            margin-top: 2px;
            font-size: 0.85em;
            opacity: 0.9;
        }

        .day-header {
            background: #FE7701;
            color: white;
            padding: 18px 10px;
            text-align: center;
            text-transform: uppercase;
            display: flex;
            flex-direction: column;
            font-size: 1.05em;
            font-weight: bold;
            letter-spacing: 2px;
            border-bottom: 3px solid #000;
            font-family: 'AldrichCustom', sans-serif;
            align-items: center;
            justify-content: center;
        }

        .streams-container {
            padding: 12px;
            display: flex;
            flex-direction: column;
            gap: 12px;
            flex: 1;
        }

        /* CARDS STREAM */

        .stream-card {
            display: block;
            background: #fff;
            border: 3px solid #FE7701;
            border-radius: 12px;
            overflow: hidden;
            position: relative;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
            box-sizing: border-box;
            transition: transform 0.15s ease, box-shadow 0.15s ease;
            text-decoration: none;
            color: inherit;
        }

        .stream-card:hover {
            transform: translateY(-3px) scale(1.02);
            box-shadow: 0 6px 15px rgba(254, 119, 1, 0.4);
        }

        .stream-time {
            position: absolute;
            top: 8px;
            left: 8px;
            background: rgba(0, 0, 0, 0.8);
            color: white;
            padding: 4px 8px;
            border-radius: 6px;
            font-size: 0.85em;
            border: 1px solid #FE7701;
            z-index: 20;
            /* Priorité très haute */
        }

        .stream-game-image {
            width: 100%;
            height: 100%;
            object-fit: cover;
    background-position: center;
    background-size: cover;      /* équivalent de object-fit: cover */
    background-repeat: no-repeat;
    display: block;
        }

        .stream-game-wrapper {
            width: 100%;
            padding: 4px;
            border-bottom: 2px solid #FE7701;
            height: 140px;
            /* hauteur fixe pour toutes les cartes */
            overflow: hidden;
            border-radius: 10px;
            border: 3px solid #ff8a1a;
            display: flex;
            align-items: center;
            justify-content: center;
            background: #000;
            box-sizing: border-box;
        }


        .stream-info {
            padding: 10px 10px 12px 10px;
            background: #ffffff;
        }

        .stream-game-name {
            font-size: 0.95em;
            font-weight: bold;
            color: #222;
            text-align: center;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .stream-title {
            font-size: 0.85em;
            color: #333;
            font-weight: normal;
            text-align: center;
            font-style: italic;
            margin-top: 5px;
            line-height: 1.3;
        }

        .streamer-info {
            position: absolute;
            top: 10px;
            /* en haut à droite */
            right: 10px;
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 4px;
            /* plus de fond ni de bordure autour du groupe */
            background: transparent;
            padding: 0;
            border: none;
            z-index: 15;
            /* En dessous de l’horaire */
        }

        .streamer-avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            border: 2px solid #FE7701;
            /* contour actuel conservé */
            background: #fff;
        }

        .streamer-avatars {
            display: flex;
            flex-wrap: wrap;
            /* permet de revenir à la ligne */
            gap: 2px;
            /* espace entre les bulles */
            max-width: 100px;
            /* ajuste cette valeur pour influer sur le nb par ligne */
            justify-content: flex-end;
            /* les bulles s’alignent à droite */
        }

        .streamer-name {
            color: white;
            font-size: 0.75em;
        }

        .empty-day {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #999;
            font-size: 0.9em;
            font-style: italic;
            text-align: center;
        }

        /* FOOTER */

        .planning-footer {
            background: #333;
            color: white;
            padding: 10px;
            text-align: center;
            font-size: 2.0em;
        }

        .planning-footer a {
            color: inherit;
            /* même couleur que le footer */
            text-decoration: none;
            /* pas de soulignement */
        }

        .planning-footer a:hover {
            text-decoration: underline;
            /* léger feedback au survol */
        }

        #modal-streamers a {
            color: #d4d4d8;
            /* orange ECN */
            font-weight: bold;
            text-decoration: none;
            /* plus de soulignement */
            transition: 0.15s ease;
        }

        #modal-streamers a:hover {
            color: #ff9f4b;
            /* version claire */
            text-decoration: underline;
            /* souligne seulement au survol */
        }

        .planning-footer a,
        .planning-footer a:link,
        .planning-footer a:visited {
            color: inherit;
            text-decoration: none !important;
            /* on écrase le thème */
        }

        .planning-footer a:hover,
        .planning-footer a:focus {
            text-decoration: underline !important;
            /* petit retour visuel au survol */
        }

        /* RESPONSIVE */



        @media (max-width: 768px) {

            /* Header toujours sur UNE ligne */
            .planning-header {
                height: 70px;
                padding: 0 10px;
            }

            .header-left,
            .header-right {
                width: 50px;
                /* zones logo / twitch plus petites */
            }

            .header-logo {
                height: 90px;
                bottom: -10px;
                left: 5px;
            }

            .header-twitch-icon {
                max-width: 70px;
                max-height: 70px;
                right: 5px;
            }

            .header-center {
                flex: 1;
                text-align: center;
                padding: 0 6px;
            }

            .header-title {
                font-size: 1.6rem;
                letter-spacing: 2px;
                white-space: nowrap;
                /* reste sur une seule ligne */
            }

            .days-grid {
                grid-template-columns: 1fr;
            }

            .day-column {
                min-height: auto;
            }
        }


        .error-message {
            color: white;
            padding: 30px;
            text-align: center;
        }

        .modal-overlay {
            position: fixed !important;
            inset: 0;
            background: rgba(0, 0, 0, 0.7);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 999999 !important;
            position: fixed;
            top: 0 !important;
            left: 0 !important;
            right: 0 !important;
            bottom: 0 !important;
            width: 100vw !important;
            height: 100vh !important;
            margin: 0;
            padding: 0;
        }

        .modal-overlay.show {
            display: flex;
        }

        .modal {
            background: #18181b;
            border-radius: 12px;
            max-width: 600px;
            width: 90%;
            color: #fff;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
            overflow: hidden;
            border: 2px solid #FE7701;
            z-index: 1000000;
            /* juste au-dessus de l’overlay */
            position: relative;
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 14px 18px;
            border-bottom: 1px solid #2f3136;
        }

        .modal-title {
            font-size: 1.1rem;
            font-weight: bold;
        }

        .modal-close {
            background: none;
            border: none;
            color: #aaa;
            font-size: 1.4rem;
            cursor: pointer;
        }

        .modal-close:hover {
            color: #fff;
        }

        .modal-body {
            padding: 0 18px 18px 18px;
        }

        .modal-game-image {
            width: 100%;
            max-height: 220px;
            object-fit: cover;
            border-radius: 8px;
            margin: 12px 0;
        }

        .modal-section {
            margin-top: 18px;
            font-size: 0.95rem;
            margin-bottom: 6px;
            /* espace sous le titre */
        }

        .modal-section-title {
            font-weight: bold;
            color: #f9fafb;
        }

        .modal-body .modal-section:first-of-type {
            margin-top: 10px;
        }

        .modal-section-content {
            margin-top: 2px;
            line-height: 1.4;
            color: #d4d4d8;
        }

        .modal-footer {
            padding: 10px 18px 14px 18px;
            border-top: 1px solid #2f3136;
            display: flex;
            justify-content: flex-end;
        }

        .modal-button {
            background: #FE7701;
            border: none;
            border-radius: 6px;
            padding: 8px 14px;
            color: #fff;
            cursor: pointer;
            font-size: 0.9rem;
            font-weight: bold;
        }

        .modal-button:hover {
            filter: brightness(1.1);
        }

        .stream-card-canceled {
            opacity: 0.8;
            position: relative;
        }

        .stream-canceled-badge {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) rotate(-10deg);
            background: rgba(220, 0, 0, 0.9);
            color: #fff;
            padding: 6px 18px;
            font-weight: 900;
            text-transform: uppercase;
            font-size: 0.9em;
            border-radius: 4px;
            box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
            pointer-events: none;
            /* le clic passe à travers vers la carte */
            z-index: 30;
        }