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

        :root {
            --bg-dark: #050814;
            --bg-panel: rgba(10, 18, 35, 0.85);
            --cyan: #00e5ff;
            --cyan-dim: #00b8cc;
            --cyan-glow: rgba(0, 229, 255, 0.4);
            --text-main: #c8d6e5;
            --text-dim: #6b7c93;
            --border-color: #1a2a40;
            --font-mono: 'Courier New', Courier, monospace;
            --font-sans: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        html, body { height: 100%; }

        body {
            background-color: var(--bg-dark);
            background-image: 
                radial-gradient(circle at 50% 0%, #0a1428 0%, transparent 70%),
                linear-gradient(rgba(0, 229, 255, 0.03) 1px, transparent 1px),
                linear-gradient(90deg, rgba(0, 229, 255, 0.03) 1px, transparent 1px);
            background-size: 100% 100%, 40px 40px, 40px 40px;
            color: var(--text-main);
            font-family: var(--font-sans);
            display: flex;
            flex-direction: column;
            height: 100vh;
            overflow: hidden;
        }

        a {
            color: var(--cyan);
            text-decoration: none;
            transition: all 0.2s ease;
        }
        a:hover {
            color: #fff;
            text-shadow: 0 0 8px var(--cyan), 0 0 15px var(--cyan-glow);
        }

        ::-webkit-scrollbar { width: 6px; height: 6px; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
        ::-webkit-scrollbar-thumb:hover { background: var(--cyan-dim); }
        * { scrollbar-width: thin; scrollbar-color: var(--border-color) transparent; }

        .container {
            max-width: 1600px;
            margin: 0 auto;
            padding: 20px;
            width: 100%;
            flex: 1;
            min-height: 0;
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .main-grid {
            display: grid;
            grid-template-columns: 320px 1fr 320px;
            gap: 20px;
            align-items: stretch;
            flex: 1;
            min-height: 0;
        }

        .side-panel {
            background: var(--bg-panel);
            border: 1px solid var(--border-color);
            border-radius: 4px;
            padding: 15px;
            box-shadow: inset 0 0 20px rgba(0,0,0,0.5), 0 5px 15px rgba(0,0,0,0.3);
            backdrop-filter: blur(5px);
            display: flex;
            flex-direction: column;
            min-height: 0;
            overflow: hidden;
        }

        .side-panel h2 {
            font-family: var(--font-mono);
            font-size: 0.95rem;
            color: var(--cyan);
            text-transform: uppercase;
            letter-spacing: 2px;
            border-bottom: 1px solid var(--border-color);
            padding-bottom: 8px;
            margin-bottom: 15px;
            text-shadow: 0 0 10px var(--cyan-glow);
            flex-shrink: 0;
        }

        .service-list {
            list-style: none;
            display: flex;
            flex-direction: column;
            gap: 8px;
            flex: 1 1 auto;
            overflow-y: auto;
            padding-right: 5px;
            min-height: 0;
            mask-image: linear-gradient(to bottom, transparent 0, black 12px, black calc(100% - 12px), transparent 100%);
            -webkit-mask-image: linear-gradient(to bottom, transparent 0, black 12px, black calc(100% - 12px), transparent 100%);
        }
        .service-list::-webkit-scrollbar { width: 5px; }
        .service-list::-webkit-scrollbar-track { background: transparent; }
        .service-list::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, var(--cyan-dim), var(--cyan));
            border-radius: 3px;
        }
        .service-list::-webkit-scrollbar-thumb:hover { box-shadow: 0 0 8px var(--cyan-glow); }
        .service-list { scrollbar-width: thin; scrollbar-color: var(--cyan-dim) transparent; }

        .service-list li {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            padding: 8px;
            border-radius: 3px;
            transition: background 0.2s;
            border-left: 2px solid transparent;
            flex-shrink: 0;
        }
        .service-list li:hover {
            background: rgba(0, 229, 255, 0.05);
            border-left-color: var(--cyan);
        }
        .service-icon { font-size: 1.2rem; filter: drop-shadow(0 0 5px var(--cyan-glow)); }
        .service-info a { font-family: var(--font-mono); font-size: 0.9rem; font-weight: bold; display: block; }
        .service-desc { font-size: 0.75rem; color: var(--text-dim); line-height: 1.3; margin-top: 2px; }
        .badge-auth {
            display: inline-block;
            font-size: 0.65rem;
            background: rgba(255, 68, 68, 0.15);
            color: #ff6b6b;
            border: 1px solid rgba(255, 68, 68, 0.3);
            padding: 1px 5px;
            border-radius: 3px;
            margin-top: 3px;
        }

        .legend-box {
            background: rgba(0, 0, 0, 0.3);
            border: 1px dashed var(--border-color);
            padding: 10px;
            border-radius: 4px;
            font-size: 0.7rem;
            color: var(--text-dim);
            margin-top: 12px;
            line-height: 1.6;
            flex-shrink: 0;
        }
        .legend-box strong { color: var(--cyan); }
        .legend-box .public { color: #4ade80; }
        .legend-box .authent { color: #ff6b6b; }
        .legend-box .tools { color: var(--cyan); }

        .app-list {
            list-style: none;
            display: flex;
            flex-direction: column;
            gap: 10px;
            flex: 1 1 auto;
            overflow-y: auto;
            padding-right: 5px;
            min-height: 0;
            mask-image: linear-gradient(to bottom, transparent 0, black 12px, black calc(100% - 12px), transparent 100%);
            -webkit-mask-image: linear-gradient(to bottom, transparent 0, black 12px, black calc(100% - 12px), transparent 100%);
        }
        .app-list::-webkit-scrollbar { width: 5px; }
        .app-list::-webkit-scrollbar-track { background: transparent; }
        .app-list::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, var(--cyan-dim), var(--cyan));
            border-radius: 3px;
        }
        .app-list::-webkit-scrollbar-thumb:hover { box-shadow: 0 0 8px var(--cyan-glow); }
        .app-list { scrollbar-width: thin; scrollbar-color: var(--cyan-dim) transparent; }

        .app-item {
            display: flex;
            gap: 10px;
            padding: 8px;
            border-radius: 3px;
            border: 1px solid transparent;
            transition: all 0.2s;
            flex-shrink: 0;
        }
        .app-item:hover {
            background: rgba(0, 229, 255, 0.03);
            border-color: var(--border-color);
        }
        .app-item img {
            width: 40px;
            height: 40px;
            object-fit: contain;
            filter: drop-shadow(0 0 4px var(--cyan-glow));
            flex-shrink: 0;
        }
        .app-info h3 { font-family: var(--font-mono); font-size: 0.9rem; margin-bottom: 3px; }
        .app-info h3 a { text-transform: uppercase; }
        .app-desc { font-size: 0.7rem; color: var(--text-dim); line-height: 1.3; margin-bottom: 5px; }
        .app-links a {
            font-size: 0.7rem;
            font-family: var(--font-mono);
            margin-right: 10px;
            padding: 2px 6px;
            border: 1px solid var(--border-color);
            border-radius: 2px;
            display: inline-block;
        }
        .app-links a:hover { border-color: var(--cyan); background: rgba(0, 229, 255, 0.1); }

        /* =========================================
           ZONE CENTRALE : space-between
           - bloc haut (host + hr)
           - bloc central (logo + texte + badge)
           - bloc bas (hr)
           ========================================= */
        .center-hero {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: space-between; /* pousse le bloc haut en haut et le hr bas en bas */
            text-align: center;
            padding: 0 20px;               /* padding horizontal seulement */
            position: relative;
            min-height: 0;
            overflow-y: auto;
        }
        .center-hero::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 500px;
            height: 500px;
            background: radial-gradient(circle, rgba(0, 229, 255, 0.15) 0%, transparent 70%);
            z-index: -1;
            pointer-events: none;
        }
        .center-hero::-webkit-scrollbar { width: 5px; }
        .center-hero::-webkit-scrollbar-track { background: transparent; }
        .center-hero::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, var(--cyan-dim), var(--cyan));
            border-radius: 3px;
        }
        .center-hero { scrollbar-width: thin; scrollbar-color: var(--cyan-dim) transparent; }

        /* --- Bloc haut : host + hr --- */
        .center-hero .hero-top {
            width: 100%;
            flex-shrink: 0;
            display: flex;
            flex-direction: column;
            align-items: center;
            /* padding bas du bloc haut = espace entre le hr haut et le bloc central */
            padding-bottom: 25px;
        }

        /* --- Bloc central : logo + titre + desc + badge --- */
        .center-hero .hero-core {
            flex: 1 1 auto;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center; /* centre verticalement dans son espace */
            width: 100%;
            min-height: 0;
            /* espace au dessus du hr bas */
            padding-bottom: 25px;
        }

        /* --- Bloc bas : hr --- */
        .center-hero .hero-bottom {
            width: 100%;
            flex-shrink: 0;
            display: flex;
            flex-direction: column;
            align-items: center;
            /* espace entre le hr bas et le footer / bas du panneau */
            padding-bottom: 20px;
        }

        .host-display {
            width: 100%;
            font-family: var(--font-mono);
            font-size: 0.8rem;
            color: var(--cyan);
            text-align: center;
            padding: 10px 0 12px;
            letter-spacing: 1px;
            text-shadow: 0 0 8px var(--cyan-glow);
            min-height: 24px;
            flex-shrink: 0;
        }
        .host-display > * { display: inline-block; }

        /* Style commun aux deux hr */
        .center-hero hr.cyan-sep {
            width: 100%;
            border: none;
            height: 1px;
            background: linear-gradient(90deg, transparent, var(--cyan), transparent);
            box-shadow: 0 0 8px var(--cyan-glow);
            opacity: 0.7;
            flex-shrink: 0;
            margin: 0; /* les marges sont gérées par les paddings des blocs */
        }

        .hero-logo {
            max-width: 340px;
            width: 100%;
            height: auto;
            filter: drop-shadow(0 0 25px var(--cyan-glow)) drop-shadow(0 0 50px rgba(0, 229, 255, 0.15));
            transition: transform 0.4s ease;
            animation: float 6s ease-in-out infinite;
            flex-shrink: 0;
        }
        .hero-logo:hover { transform: scale(1.03); }
        @keyframes float {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-10px); }
        }

        .hero-title {
            font-family: var(--font-mono);
            font-size: 2.6rem;
            font-weight: bold;
            color: #fff;
            letter-spacing: 4px;
            margin-top: 15px;
            text-shadow: 0 0 10px var(--cyan), 0 0 30px var(--cyan-glow);
            flex-shrink: 0;
        }
        .hero-subtitle {
            font-family: var(--font-mono);
            color: var(--cyan-dim);
            font-size: 1rem;
            letter-spacing: 2px;
            margin-top: 8px;
            text-transform: uppercase;
            flex-shrink: 0;
        }
        .hero-desc {
            color: var(--text-dim);
            font-size: 0.9rem;
            max-width: 500px;
            margin-top: 15px;
            line-height: 1.6;
            flex-shrink: 0;
        }
        .info-badge {
            margin-top: 25px;
            display: inline-block;
            padding: 8px 20px;
            border: 1px solid var(--cyan-dim);
            border-radius: 30px;
            color: var(--cyan);
            font-family: var(--font-mono);
            font-size: 0.8rem;
            letter-spacing: 1px;
            background: rgba(0, 229, 255, 0.05);
            box-shadow: 0 0 15px rgba(0, 229, 255, 0.1);
            animation: pulse 3s infinite;
            flex-shrink: 0;
        }
        @keyframes pulse {
            0%, 100% { box-shadow: 0 0 10px rgba(0, 229, 255, 0.1); }
            50% { box-shadow: 0 0 25px rgba(0, 229, 255, 0.3); }
        }

        .custom-footer {
            flex-shrink: 0;
            background: var(--bg-panel);
            border: 1px solid var(--border-color);
            border-radius: 4px;
            padding: 12px 20px;
            font-family: var(--font-mono);
            font-size: 0.78rem;
            color: var(--text-dim);
            text-align: center;
            box-shadow: inset 0 0 20px rgba(0,0,0,0.5), 0 -3px 15px rgba(0,0,0,0.3);
            position: relative;
        }
        .custom-footer::before {
            content: '';
            position: absolute;
            top: -1px;
            left: 50%;
            transform: translateX(-50%);
            width: 200px;
            height: 2px;
            background: var(--cyan);
            box-shadow: 0 0 10px var(--cyan);
            border-radius: 2px;
        }
        .footer-links { margin: 3px 0; line-height: 1.7; }
        .footer-links a { margin: 0 5px; }
        .footer-sep { color: var(--border-color); margin: 0 5px; }

        @media (max-width: 1200px) {
            html, body { height: auto; }
            body { overflow-y: auto; display: block; }
            .container { height: auto; min-height: 100vh; padding-bottom: 20px; }
            .main-grid {
                grid-template-columns: 1fr;
                gap: 20px;
                flex: none;
                min-height: auto;
            }
            .center-hero {
                order: -1;
                padding: 10px 10px 20px;
                min-height: auto;
                overflow: visible;
                justify-content: flex-start;
            }
            .hero-logo { max-width: 280px; }
            .hero-title { font-size: 2rem; }
            .side-panel { min-height: auto; max-height: none; overflow: visible; }
            .service-list, .app-list {
                display: grid;
                grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
                max-height: none;
                overflow-y: visible;
                mask-image: none;
                -webkit-mask-image: none;
            }
            .hero-top, .hero-core, .hero-bottom { padding-bottom: 15px; }
        }

        @media (max-width: 600px) {
            .hero-title { font-size: 1.5rem; letter-spacing: 2px; }
            .hero-subtitle { font-size: 0.8rem; }
            .container { padding: 10px; }
        }
