        /* ============================================ */
        /* THEME: OCEAN DEEP                           */
        /* ============================================ */
        :root {
            --bg-dark: var(--bg-dark);
            --bg-bar: var(--bg-bar);
            --bg-subbar: #111d2a;
            --bg-card: #152535;
            --border: #1e3a50;
            --text: #e0e8f0;
            --text-dim: #6a8fa8;
            --accent: var(--accent);
            --accent-glow: rgba(236, 230, 214, 0.135);
            --accent-dim: var(--accent-dim);
            --green: var(--green);
            --red: var(--red);
            --orange: #ffa502;
            --gold: #ffd700;
        }
        
        * { margin: 0; padding: 0; box-sizing: border-box; }
        
        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            background: var(--bg-dark);
            color: var(--text);
            height: 100vh;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        
        /* ============ BARRE PRINCIPALE ============ */
        .main-bar {
            height: 48px;
            background: linear-gradient(180deg, var(--bg-bar) 0%, var(--bg-dark) 100%);
            border-bottom: 1px solid var(--border);
            box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
            display: flex;
            align-items: center;
            padding: 0 0.5rem;
            gap: 0.25rem;
            z-index: 1000;
            position: relative;
        }
        
        .logo {
            font-size: 1.5rem;
            font-weight: 800;
            padding: 0 1rem;
            letter-spacing: 3px;
            border-right: 1px solid var(--border);
            margin-right: 0.5rem;
            background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dim) 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        
        .main-btn {
            padding: 0.6rem 1rem;
            background: transparent;
            border: none;
            color: var(--text);
            font-size: 0.8rem;
            font-weight: 500;
            cursor: pointer;
            border-radius: 6px;
            display: flex;
            align-items: center;
            gap: 0.4rem;
            transition: all 0.15s;
            font-family: inherit;
        }
        
        .main-btn:hover {
            background: var(--accent-glow);
            color: var(--accent);
        }
        
        .main-btn.active {
            background: var(--accent-glow);
            color: var(--accent);
            border-bottom: 2px solid var(--accent);
            border-radius: 6px 6px 0 0;
        }
        
        .main-btn .icon { font-size: 1rem; }
        
        .spacer { flex: 1; }
        
        .status-badge {
            padding: 0.3rem 0.6rem;
            background: var(--bg-card);
            border-radius: 4px;
            font-size: 0.7rem;
            color: var(--text-dim);
            display: flex;
            align-items: center;
            gap: 0.4rem;
            border: 1px solid var(--border);
        }
        
        .status-badge.ok { 
            color: var(--green); 
            border-color: rgba(0, 255, 163, 0.3);
        }
        
        .status-badge .dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: var(--green);
        }
        
        .user-btn {
            padding: 0.4rem 0.8rem;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 6px;
            color: var(--text);
            font-size: 0.75rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.4rem;
            margin-left: 0.5rem;
            font-family: inherit;
            transition: all 0.15s;
        }
        
        .user-btn:hover {
            border-color: var(--accent);
            color: var(--accent);
        }
        
        /* ============ SOUS-BARRE ============ */
        .sub-bar {
            height: 0;
            background: linear-gradient(180deg, var(--bg-subbar) 0%, var(--bg-bar) 100%);
            border-bottom: 1px solid var(--border);
            overflow-x: auto;
            overflow-y: hidden;
            transition: height 0.2s ease, max-height 0.2s ease;
            display: flex;
            align-items: flex-start;
            padding: 0 1rem;
            gap: 1rem;
            white-space: nowrap;
            flex-wrap: wrap;
        }
        
        .sub-bar.open {
            height: auto;
            min-height: 78px;
            max-height: 300px;
            overflow-y: auto;
            overflow-x: hidden;
            padding-top: 12px;
            padding-bottom: 12px;
        }
        
        .sub-bar::-webkit-scrollbar {
            height: 4px;
            width: 6px;
        }
        .sub-bar::-webkit-scrollbar-track {
            background: var(--bg-dark);
        }
        .sub-bar::-webkit-scrollbar-thumb {
            background: var(--border);
            border-radius: 2px;
        }
        .sub-bar::-webkit-scrollbar-thumb:hover {
            background: var(--accent);
        }
        
        .sub-section {
            display: flex;
            align-items: center;
            gap: 0.4rem;
            flex-shrink: 0;
        }
        
        .sub-section-title {
            font-size: 0.6rem;
            color: var(--text-dim);
            letter-spacing: 1px;
            margin-right: 0.3rem;
            font-weight: 600;
        }
        
        .sub-divider {
            width: 1px;
            height: 32px;
            background: var(--border);
        }
        
        .sub-btn {
            padding: 0.4rem 0.7rem;
            background: rgba(236, 230, 214, 0.045);
            border: 1px solid var(--border);
            border-radius: 4px;
            color: var(--text);
            font-size: 0.7rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.3rem;
            transition: all 0.15s;
            font-family: inherit;
        }
        
        .sub-btn:hover {
            background: var(--accent-glow);
            border-color: var(--accent);
            box-shadow: 0 0 15px var(--accent-glow);
            color: var(--accent);
        }
        
        .sub-btn.active {
            background: var(--accent);
            color: var(--bg-dark);
            border-color: var(--accent);
        }
        
        .sub-btn.primary {
            background: var(--accent);
            color: var(--bg-dark);
            border-color: var(--accent);
            font-weight: 600;
        }
        
        .sub-btn.primary:hover {
            background: #00b8e0;
            box-shadow: 0 0 20px var(--accent-glow);
        }
        
        .sub-btn:disabled {
            opacity: 0.4;
            cursor: not-allowed;
        }
        
        .sub-btn .lock {
            font-size: 0.6rem;
            opacity: 0.7;
        }
        
        .sub-btn.locked {
            opacity: 0.5;
            cursor: not-allowed;
        }
        
        .sub-btn.locked:hover {
            background: rgba(236, 230, 214, 0.045);
            border-color: var(--border);
            box-shadow: none;
            color: var(--text);
        }
        
        .toggle-opt.locked {
            opacity: 0.5;
            cursor: not-allowed;
        }
        
        .sub-input {
            padding: 0.4rem 0.6rem;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 4px;
            color: var(--text);
            font-size: 0.7rem;
            font-family: var(--font-num);
        }
        
        .sub-input:focus {
            outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 10px var(--accent-glow);
        }
        
        .sub-select {
            padding: 0.4rem 0.6rem;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 4px;
            color: var(--text);
            font-size: 0.7rem;
            font-family: inherit;
            cursor: pointer;
        }
        
        .sub-select:focus {
            outline: none;
            border-color: var(--accent);
        }
        
        .point-indicator {
            display: flex;
            align-items: center;
            gap: 0.4rem;
            padding: 0.4rem 0.7rem;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 4px;
            font-size: 0.7rem;
            font-family: var(--font-num);
        }
        
        .point-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
        }
        
        .point-dot.start { background: var(--green); box-shadow: 0 0 6px var(--green); }
        .point-dot.end { background: var(--red); box-shadow: 0 0 6px var(--red); }
        .point-dot.waypoint { background: var(--orange); }
        
        .checkbox-label {
            display: flex;
            align-items: center;
            gap: 0.3rem;
            font-size: 0.7rem;
            cursor: pointer;
            color: var(--text-dim);
            transition: color 0.15s;
        }
        
        .checkbox-label:hover {
            color: var(--text);
        }
        
        .checkbox-label input {
            width: 14px;
            height: 14px;
            accent-color: var(--accent);
        }
        
        .toggle-group {
            display: flex;
            border: 1px solid var(--border);
            border-radius: 4px;
            overflow: hidden;
        }
        
        .toggle-opt {
            padding: 0.4rem 0.6rem;
            background: var(--bg-card);
            color: var(--text-dim);
            font-size: 0.65rem;
            cursor: pointer;
            border-right: 1px solid var(--border);
            transition: all 0.15s;
        }
        
        .toggle-opt:last-child { border-right: none; }
        
        .toggle-opt:hover {
            color: var(--text);
        }
        
        .toggle-opt.active {
            background: var(--accent-glow);
            color: var(--accent);
        }
        
        /* ============ CARTE ============ */
        .map-container {
            flex: 1;
            position: relative;
            overflow: hidden;
        }
        
        #map {
            width: 100%;
            height: 100%;
            background: var(--bg-dark);
        }
        
        .wind-canvas, .route-canvas {
            position: absolute;
            top: 0;
            left: 0;
            pointer-events: none;
            z-index: 400;
        }
        
        .route-canvas { z-index: 450; }
        
        .coords-display {
            background: rgba(13, 21, 32, 0.95);
            padding: 0.3rem 0.6rem;
            border-radius: 4px;
            font-size: 0.7rem;
            font-family: var(--font-num);
            color: var(--text-dim);
            border: 1px solid var(--border);
            margin-left: auto;
        }
        
        .map-instructions {
            position: absolute;
            top: 10px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(13, 21, 32, 0.95);
            padding: 0.4rem 0.8rem;
            border-radius: 6px;
            font-size: 0.7rem;
            color: var(--accent);
            border: 1px solid var(--accent);
            z-index: 1000;
        }
        
        .zoom-controls {
            position: absolute;
            bottom: 60px;
            right: 10px;
            display: flex;
            flex-direction: column;
            gap: 0.2rem;
            z-index: 1000;
        }
        
        .zoom-btn {
            width: 32px;
            height: 32px;
            background: rgba(13, 21, 32, 0.95);
            border: 1px solid var(--border);
            border-radius: 4px;
            color: var(--text);
            font-size: 1.2rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.15s;
        }
        
        .zoom-btn:hover {
            border-color: var(--accent);
            color: var(--accent);
        }
        
        /* Panneau résultat flottant */
        .result-float {
            position: absolute;
            top: 10px;
            right: 10px;
            background: rgba(13, 21, 32, 0.98);
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 0.8rem;
            min-width: 180px;
            z-index: 1000;
            display: none;
            backdrop-filter: blur(10px);
        }
        
        .result-float.visible { display: block; }
        
        .result-float-title {
            font-size: 0.7rem;
            color: var(--accent);
            margin-bottom: 0.6rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-weight: 600;
        }
        
        .result-float-close {
            cursor: pointer;
            opacity: 0.5;
            font-size: 1rem;
            transition: opacity 0.15s;
        }
        
        .result-float-close:hover { opacity: 1; }
        
        .result-row {
            display: flex;
            justify-content: space-between;
            font-size: 0.75rem;
            margin-bottom: 0.4rem;
            padding: 0.2rem 0;
            border-bottom: 1px solid rgba(30, 58, 80, 0.5);
        }
        
        .result-row:last-child { border-bottom: none; }
        
        .result-label { color: var(--text-dim); }
        .result-value { 
            color: var(--accent); 
            font-family: var(--font-num);
            font-weight: 600;
        }
        
        /* Loading */
        .loading {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: var(--bg-card);
            padding: 1.5rem 2rem;
            border-radius: 10px;
            text-align: center;
            z-index: 2000;
            border: 1px solid var(--border);
        }
        
        .loading-spinner {
            width: 32px;
            height: 32px;
            border: 3px solid var(--border);
            border-top-color: var(--accent);
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin: 0 auto 0.6rem;
        }
        
        @keyframes spin { to { transform: rotate(360deg); } }
        
        .hidden { display: none !important; }
        
        /* ============ TIMELINE ============ */
        .timeline {
            height: 44px;
            background: linear-gradient(180deg, var(--bg-dark) 0%, #050a0f 100%);
            border-top: 1px solid var(--border);
            display: flex;
            align-items: center;
            padding: 0 1rem;
            gap: 0.8rem;
            z-index: 100;
        }
        
        .timeline-controls {
            display: flex;
            gap: 0.2rem;
        }
        
        .timeline-btn {
            width: 28px;
            height: 28px;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 4px;
            color: var(--text);
            font-size: 0.7rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.15s;
        }
        
        .timeline-btn:hover {
            border-color: var(--accent);
            color: var(--accent);
        }
        
        .timeline-track {
            flex: 1;
            height: 8px;
            background: var(--bg-card);
            border-radius: 4px;
            position: relative;
            cursor: pointer;
        }
        
        .timeline-progress {
            position: absolute;
            left: 0;
            top: 0;
            height: 100%;
            width: 0%;
            background: linear-gradient(90deg, var(--accent) 0%, var(--green) 100%);
            border-radius: 4px;
            box-shadow: 0 0 10px var(--accent-glow);
            transition: width 0.1s;
        }
        
        .timeline-thumb {
            position: absolute;
            left: 0%;
            top: 50%;
            transform: translate(-50%, -50%);
            width: 16px;
            height: 16px;
            background: var(--accent);
            border-radius: 50%;
            box-shadow: 0 0 15px var(--accent-glow);
            cursor: grab;
            transition: left 0.1s;
        }
        
        .timeline-time {
            font-family: var(--font-num);
            font-size: 0.9rem;
            color: var(--accent);
            font-weight: 600;
            min-width: 50px;
        }
        
        .timeline-date {
            font-size: 0.7rem;
            color: var(--text-dim);
            margin-left: 0.3rem;
        }
        
        .timeline-info {
            display: flex;
            gap: 0.5rem;
            font-size: 0.7rem;
        }
        
        .timeline-info-item {
            display: flex;
            align-items: center;
            gap: 0.2rem;
            padding: 0.15rem 0.4rem;
            background: var(--bg-card);
            border-radius: 4px;
            border: 1px solid var(--border);
        }
        
        .timeline-info-value {
            color: var(--accent);
            font-family: var(--font-num);
        }
        
        .timeline-status {
            color: var(--green);
            font-size: 0.75rem;
            min-width: 80px;
        }
        
        /* ============ MODALS ============ */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.8);
            z-index: 3000;
            display: flex;
            align-items: center;
            justify-content: center;
            backdrop-filter: blur(4px);
        }
        
        .modal {
            background: var(--bg-card);
            border-radius: 12px;
            border: 1px solid var(--border);
            max-width: 90vw;
            max-height: 90vh;
            overflow: auto;
            padding: 1.5rem;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
        }
        
        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
            padding-bottom: 0.8rem;
            border-bottom: 1px solid var(--border);
        }
        
        .modal-title {
            font-size: 1.1rem;
            font-weight: 600;
            color: var(--accent);
        }
        
        .modal-close {
            background: none;
            border: none;
            color: var(--text-dim);
            font-size: 1.5rem;
            cursor: pointer;
            transition: color 0.15s;
        }
        
        .modal-close:hover {
            color: var(--red);
        }
        
        /* Auth Modal */
        .auth-tabs {
            display: flex;
            gap: 0.5rem;
            margin-bottom: 1rem;
        }
        
        .auth-tab {
            flex: 1;
            padding: 0.6rem;
            background: var(--bg-dark);
            border: 1px solid var(--border);
            border-radius: 6px;
            color: var(--text-dim);
            cursor: pointer;
            font-family: inherit;
            transition: all 0.15s;
        }
        
        .auth-tab.active {
            background: var(--accent-glow);
            border-color: var(--accent);
            color: var(--accent);
        }
        
        .auth-form {
            display: flex;
            flex-direction: column;
            gap: 0.8rem;
        }
        
        .auth-form input {
            padding: 0.7rem;
            background: var(--bg-dark);
            border: 1px solid var(--border);
            border-radius: 6px;
            color: var(--text);
            font-size: 0.85rem;
            font-family: inherit;
        }
        
        .auth-form input:focus {
            outline: none;
            border-color: var(--accent);
        }
        
        .auth-form button {
            padding: 0.8rem;
            background: var(--accent);
            border: none;
            border-radius: 6px;
            color: var(--bg-dark);
            font-weight: 600;
            cursor: pointer;
            font-family: inherit;
            transition: background 0.15s;
        }
        
        .auth-form button:hover {
            background: #00b8e0;
        }
        
        /* User dropdown */
        .user-dropdown {
            position: relative;
            z-index: 10000;
        }
        
        .user-dropdown-menu {
            position: absolute;
            top: 100%;
            right: 0;
            margin-top: 0.5rem;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 8px;
            min-width: 180px;
            display: none;
            z-index: 10000;
            overflow: hidden;
            box-shadow: 0 10px 40px rgba(0,0,0,0.5);
        }
        
        .user-dropdown-menu.open {
            display: block;
        }
        
        /* File dropdown dans la sub-bar */
        .file-dropdown {
            position: relative;
            z-index: 2000;
        }
        
        .file-dropdown-menu {
            position: absolute;
            top: 100%;
            left: 0;
            margin-top: 0.3rem;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 6px;
            min-width: 160px;
            z-index: 2000;
            overflow: hidden;
            box-shadow: 0 10px 30px rgba(0,0,0,0.4);
        }
        
        .file-dropdown-menu.hidden {
            display: none;
        }
        
        .dropdown-header {
            padding: 0.6rem 0.8rem;
            background: var(--bg-dark);
            font-size: 0.7rem;
            color: var(--text-dim);
            border-bottom: 1px solid var(--border);
        }
        
        .dropdown-item {
            padding: 0.6rem 0.8rem;
            font-size: 0.75rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            transition: background 0.15s;
            border: none;
            background: none;
            color: var(--text);
            width: 100%;
            font-family: inherit;
        }
        
        .dropdown-item:hover {
            background: var(--accent-glow);
            color: var(--accent);
        }
        
        .dropdown-divider {
            height: 1px;
            background: var(--border);
        }
        
        /* Status messages */
        .status-msg {
            font-size: 0.7rem;
            padding: 0.4rem 0.6rem;
            border-radius: 4px;
            margin-top: 0.5rem;
        }
        
        .status-msg.success {
            background: rgba(0, 255, 163, 0.1);
            color: var(--green);
            border: 1px solid rgba(0, 255, 163, 0.3);
        }
        
        .status-msg.error {
            background: rgba(255, 95, 126, 0.1);
            color: var(--red);
            border: 1px solid rgba(255, 95, 126, 0.3);
        }
        
        /* Messages de l'appli (erreurs de calcul, etc.) */
        #statusMsg {
            position: fixed; left: 50%; bottom: 70px; transform: translateX(-50%);
            z-index: 5000; max-width: min(90vw, 560px); margin: 0;
            font-size: 0.85rem; padding: 0.6rem 1rem; cursor: pointer;
            background: rgba(10, 20, 35, 0.95); color: #e6f1ff;
            border: 1px solid rgba(236, 230, 214, 0.18); box-shadow: 0 4px 16px rgba(0,0,0,0.4);
        }
        #statusMsg.success { background: rgba(8, 40, 30, 0.95); }
        #statusMsg.error { background: rgba(50, 12, 22, 0.95); }
        
        /* Leaflet customization */
        .leaflet-control-zoom {
            display: none;
        }
        
        .leaflet-control-attribution {
            background: rgba(13, 21, 32, 0.8) !important;
            color: var(--text-dim) !important;
            font-size: 0.6rem !important;
        }
        
        .leaflet-control-attribution a {
            color: var(--accent) !important;
        }
        
        /* Tooltip de mesure */
        .measure-tooltip {
            background: transparent !important;
            border: none !important;
            box-shadow: none !important;
        }
        .measure-tooltip::before {
            display: none !important;
        }
        
        /* ============ RESPONSIVE MOBILE ============ */
        @media screen and (max-width: 768px) {
            /* Barre principale */
            .main-bar {
                padding: 0 0.5rem;
                gap: 0.3rem;
                flex-wrap: nowrap;
                overflow-x: auto;
            }
            
            .logo {
                font-size: 1rem;
                padding: 0 0.3rem;
            }
            
            .main-btn {
                padding: 0.4rem 0.5rem;
                font-size: 0.65rem;
                min-width: auto;
            }
            
            .main-btn span:not(.icon) {
                display: none;
            }
            
            .main-btn .icon {
                font-size: 1.1rem;
            }
            
            /* Status badges */
            .status-badge {
                display: none;
            }
            
            /* User dropdown */
            .user-btn {
                padding: 0.3rem 0.5rem;
            }
            
            .user-btn #userName {
                display: none;
            }
            
            .dropdown-arrow {
                display: none;
            }
            
            /* Sous-barre */
            .sub-bar {
                padding: 0 0.5rem;
                gap: 0.5rem;
                overflow-x: auto;
                overflow-y: visible;
            }
            
            .sub-bar.open {
                height: auto;
                min-height: 72px;
                max-height: 375px;
                flex-wrap: wrap;
                padding: 0.6rem 0.5rem;
                overflow-y: auto;
            }
            
            .sub-section {
                gap: 0.3rem;
            }
            
            .sub-section-title {
                display: none;
            }
            
            .sub-btn {
                padding: 0.4rem 0.6rem;
                font-size: 0.7rem;
            }
            
            .sub-input, .sub-select {
                padding: 0.3rem 0.4rem;
                font-size: 0.7rem;
            }
            
            #departDate {
                width: 100px !important;
            }
            
            #departTime {
                width: 65px !important;
            }
            
            .sub-divider {
                display: none;
            }
            
            .point-indicator {
                padding: 0.2rem 0.4rem;
                font-size: 0.65rem;
            }
            
            .point-dot {
                width: 6px;
                height: 6px;
            }
            
            /* File dropdown */
            .file-dropdown-menu {
                min-width: 140px;
                right: 0;
                left: auto;
            }
            
            /* Timeline */
            .timeline {
                padding: 0.4rem 0.5rem;
                gap: 0.5rem;
            }
            
            .timeline-controls {
                gap: 0.2rem;
            }
            
            .timeline-controls button {
                width: 28px;
                height: 28px;
                font-size: 0.8rem;
            }
            
            .timeline-track {
                min-width: 80px;
            }
            
            .timeline-time {
                font-size: 0.8rem;
                min-width: 45px;
            }
            
            .timeline-date {
                font-size: 0.65rem;
                display: none;
            }
            
            .timeline-info {
                gap: 0.5rem;
            }
            
            .timeline-info > div {
                font-size: 0.65rem;
            }
            
            .coords-display {
                font-size: 0.6rem;
                display: none;
            }
            
            /* Panneau résultat */
            .result-panel {
                right: 10px;
                top: auto;
                bottom: 70px;
                width: calc(100% - 20px);
                max-width: 300px;
            }
            
            .result-panel h3 {
                font-size: 0.85rem;
            }
            
            .result-row {
                font-size: 0.75rem;
            }
            
            /* Instructions carte */
            .map-instructions {
                font-size: 0.65rem;
                padding: 0.4rem 0.8rem;
                max-width: 90%;
            }
            
            /* Modals */
            .modal {
                width: 95% !important;
                max-width: 350px !important;
                margin: 1rem;
            }
            
            .modal-header {
                padding: 0.8rem;
            }
            
            .modal-title {
                font-size: 0.9rem;
            }
            
            .auth-form input,
            .auth-form textarea,
            .auth-form button {
                padding: 0.6rem;
                font-size: 0.85rem;
            }
            
            /* User menu */
            .user-dropdown-menu {
                right: 0;
                min-width: 160px;
            }
        }
        
        /* Très petits écrans */
        @media screen and (max-width: 480px) {
            .main-bar {
                height: 44px;
            }
            
            .sub-bar.open {
                min-height: 66px;
                max-height: 270px;
                overflow-y: auto;
            }
            
            .main-btn {
                padding: 0.3rem 0.4rem;
            }
            
            .main-btn .icon {
                font-size: 1rem;
            }
            
            .sub-btn {
                padding: 0.3rem 0.5rem;
                font-size: 0.65rem;
            }
            
            .point-indicator span {
                max-width: 60px;
                overflow: hidden;
                text-overflow: ellipsis;
            }
            
            #departDate {
                width: 85px !important;
            }
            
            #departTime {
                width: 55px !important;
            }
            
            .timeline {
                padding: 0.3rem;
            }
            
            .timeline-controls button {
                width: 26px;
                height: 26px;
            }
            
            .result-panel {
                bottom: 60px;
                padding: 0.8rem;
            }
        }
        
        /* Mode paysage sur mobile */
        @media screen and (max-width: 768px) and (orientation: landscape) {
            .main-bar {
                height: 40px;
            }
            
            .sub-bar.open {
                height: auto;
                min-height: 60px;
                max-height: 225px;
                flex-wrap: wrap;
                overflow-y: auto;
            }
            
            .timeline {
                padding: 0.3rem 0.5rem;
            }
            
            .result-panel {
                top: 90px;
                bottom: auto;
                max-height: calc(100vh - 150px);
                overflow-y: auto;
            }
        }
        /* ========== MODULE REGATE ========== */
        .regate-timer {
            position: fixed;
            top: 60px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(0, 20, 40, 0.95);
            border: 2px solid var(--accent);
            border-radius: 12px;
            padding: 0;
            z-index: 1000;
            display: none;
            text-align: center;
            box-shadow: 0 4px 20px rgba(236, 230, 214, 0.135);
            min-width: 200px;
            user-select: none;
        }
        .regate-timer.visible {
            display: block;
        }
        .regate-timer-header {
            background: rgba(236, 230, 214, 0.068);
            padding: 6px 12px;
            cursor: move;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid rgba(236, 230, 214, 0.135);
            border-radius: 10px 10px 0 0;
        }
        .regate-timer-header span {
            color: var(--accent);
            font-size: 11px;
            font-weight: 500;
        }
        .regate-timer-close {
            background: none;
            border: none;
            color: #666;
            font-size: 14px;
            cursor: pointer;
            padding: 2px 6px;
            border-radius: 4px;
        }
        .regate-timer-close:hover {
            color: #ff6b6b;
            background: rgba(255, 107, 107, 0.2);
        }
        .regate-timer-body {
            padding: 15px 25px;
        }
        .regate-timer-display {
            font-size: 52px;
            font-weight: bold;
            font-family: var(--font-num);
            color: var(--accent);
            line-height: 1;
        }
        .regate-timer-display.countdown {
            color: #ff6b6b;
        }
        .regate-timer-display.running {
            color: #51cf66;
        }
        .regate-timer-label {
            font-size: 11px;
            color: #888;
            margin-top: 5px;
        }
        .regate-timer-time-select {
            margin-top: 10px;
            display: flex;
            gap: 5px;
            justify-content: center;
            flex-wrap: wrap;
        }
        .regate-timer-time-btn {
            padding: 5px 10px;
            border: 1px solid #333;
            background: rgba(236, 230, 214, 0.045);
            color: var(--accent);
            border-radius: 4px;
            cursor: pointer;
            font-size: 12px;
            font-weight: 500;
        }
        .regate-timer-time-btn:hover {
            background: rgba(236, 230, 214, 0.113);
            border-color: var(--accent);
        }
        .regate-timer-time-btn.active {
            background: var(--accent);
            color: #000;
            border-color: var(--accent);
        }
        .regate-timer-controls {
            margin-top: 12px;
            display: flex;
            gap: 8px;
            justify-content: center;
        }
        .regate-timer-btn {
            padding: 8px 14px;
            border: 1px solid var(--accent);
            background: transparent;
            color: var(--accent);
            border-radius: 6px;
            cursor: pointer;
            font-size: 13px;
        }
        .regate-timer-btn:hover {
            background: rgba(236, 230, 214, 0.09);
        }
        .regate-timer-btn.start {
            background: #51cf66;
            border-color: #51cf66;
            color: #000;
        }
        .regate-timer-btn.stop {
            background: #ff6b6b;
            border-color: #ff6b6b;
            color: #fff;
        }
        .regate-timer-btn.reset {
            background: transparent;
            border-color: #ffd43b;
            color: #ffd43b;
        }
        .regate-timer-btn.reset:hover {
            background: rgba(255, 212, 59, 0.2);
        }
        .regate-info-panel {
            position: fixed;
            bottom: 20px;
            left: 20px;
            background: rgba(0, 20, 40, 0.95);
            border: 1px solid var(--accent);
            border-radius: 8px;
            padding: 15px;
            z-index: 900;
            min-width: 250px;
            display: none;
        }
        .regate-info-panel.visible {
            display: block;
        }
        .regate-info-title {
            font-size: 14px;
            font-weight: bold;
            color: var(--accent);
            margin-bottom: 10px;
            border-bottom: 1px solid #333;
            padding-bottom: 5px;
        }
        .regate-info-row {
            display: flex;
            justify-content: space-between;
            margin: 5px 0;
            font-size: 13px;
        }
        .regate-info-label {
            color: #888;
        }
        .regate-info-value {
            color: #fff;
            font-weight: bold;
        }
        .regate-next-mark {
            margin-top: 10px;
            padding-top: 10px;
            border-top: 1px solid #333;
        }
        
        .buoy-marker {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            border: 3px solid;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 10px;
            font-weight: bold;
            color: #fff;
            cursor: pointer;
        }
        .buoy-marker.tribord {
            background: #ff6b6b;
            border-color: #c92a2a;
        }
        .buoy-marker.babord {
            background: #51cf66;
            border-color: #2f9e44;
        }
        .buoy-marker.start {
            background: #ffd43b;
            border-color: #fab005;
            color: #000;
        }
        .buoy-marker.finish {
            background: #339af0;
            border-color: #1c7ed6;
        }
        
        .buoy-label {
            position: absolute;
            top: -20px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(0,0,0,0.8);
            padding: 2px 6px;
            border-radius: 3px;
            font-size: 11px;
            white-space: nowrap;
        }
        
        .regate-wind-indicator {
            position: fixed;
            top: 130px;
            right: 20px;
            background: rgba(0, 20, 40, 0.9);
            border: 1px solid var(--accent);
            border-radius: 8px;
            padding: 10px;
            z-index: 900;
            display: none;
            text-align: center;
        }
        .regate-wind-indicator.visible {
            display: block;
        }
        .regate-wind-arrow {
            width: 60px;
            height: 60px;
            margin: 0 auto;
        }
        .regate-wind-arrow svg {
            width: 100%;
            height: 100%;
        }
        .regate-wind-info-text {
            margin-top: 5px;
            font-size: 14px;
            color: #fff;
        }
        
        .passage-times {
            max-height: 200px;
            overflow-y: auto;
            margin-top: 10px;
        }
        .passage-time-row {
            display: flex;
            justify-content: space-between;
            padding: 5px;
            border-bottom: 1px solid #333;
            font-size: 12px;
        }
        .passage-time-row.current {
            background: rgba(236, 230, 214, 0.09);
        }
        /* Info curseur en bas à gauche */
        .cursor-info {
            position: fixed;
            bottom: 70px;
            left: 10px;
            background: rgba(13, 17, 23, 0.9);
            border: 1px solid var(--border);
            border-radius: 6px;
            padding: 6px 10px;
            font-size: 0.7rem;
            z-index: 1500;
            pointer-events: none;
            backdrop-filter: blur(5px);
        }
        .cursor-info-row {
            display: flex;
            justify-content: space-between;
            gap: 10px;
            margin: 1px 0;
        }
        .cursor-info-label {
            color: var(--text-dim);
        }
        .cursor-info-value {
            color: var(--text);
            font-family: var(--font-num);
            font-size: 0.7rem;
        }
        .cursor-info-wind {
            display: flex;
            align-items: center;
            gap: 6px;
            margin-top: 3px;
            padding-top: 3px;
            border-top: 1px solid var(--border);
        }
        .wind-indicator {
            width: 20px;
            height: 20px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .wind-arrow {
            font-size: 14px;
            transition: transform 0.1s;
        }

        /* Notification téléchargement en arrière-plan */
        .download-notification {
            position: fixed;
            bottom: 140px;
            left: 10px;
            background: var(--bg-darker);
            border: 1px solid var(--accent);
            border-radius: 10px;
            padding: 12px 16px;
            min-width: 250px;
            z-index: 2000;
            box-shadow: 0 4px 20px rgba(0,0,0,0.4);
            transition: all 0.3s ease;
        }
        .download-notification.hidden {
            opacity: 0;
            transform: translateY(20px);
            pointer-events: none;
        }
        .download-notification-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 8px;
        }
        .download-notification-title {
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--accent);
        }
        .download-notification-close {
            background: none;
            border: none;
            color: var(--text-dim);
            cursor: pointer;
            font-size: 1rem;
            padding: 0;
        }
        .download-notification-close:hover {
            color: var(--text);
        }
        .download-notification-progress {
            height: 6px;
            background: var(--bg-dark);
            border-radius: 3px;
            overflow: hidden;
            margin-bottom: 6px;
        }
        .download-notification-bar {
            height: 100%;
            background: linear-gradient(90deg, var(--accent), #00d4aa);
            border-radius: 3px;
            transition: width 0.3s ease;
        }
        .download-notification-text {
            font-size: 0.75rem;
            color: var(--text-dim);
        }
        
        /* Style liste GRIB - Style F */
        .grib-list-container {
            display: flex;
            flex-direction: column;
            gap: 0.4rem;
        }
        .grib-item {
            display: flex;
            align-items: center;
            padding: 0.7rem 0.9rem;
            background: var(--bg-dark);
            border-radius: 6px;
            transition: all 0.2s;
        }
        .grib-item:hover { background: var(--bg-tertiary); }
        .grib-item.active { outline: 1px solid #00ff88; }
        .grib-item-info { flex: 1; min-width: 0; }
        .grib-item-row1 {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin-bottom: 0.25rem;
        }
        .grib-item-name {
            font-size: 0.8rem;
            font-weight: 500;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .grib-item-tag {
            font-size: 0.55rem;
            padding: 0.12rem 0.4rem;
            border-radius: 3px;
            background: var(--bg-tertiary);
            color: var(--text-dim);
            flex-shrink: 0;
        }
        .grib-item.active .grib-item-tag {
            background: #00ff88;
            color: #000;
        }
        .grib-item-meta {
            font-size: 0.65rem;
            color: var(--text-dim);
        }
        .grib-item-meta span {
            margin-right: 0.7rem;
        }
        .grib-item-actions {
            display: flex;
            gap: 0.3rem;
            margin-left: 0.5rem;
        }
        .grib-item-actions .sub-btn {
            padding: 0.3rem 0.6rem;
            font-size: 0.65rem;
        }
        .grib-btn-delete {
            background: transparent !important;
            color: #ff6b6b !important;
            border: none !important;
            padding: 0.3rem 0.4rem !important;
        }
        .grib-btn-delete:hover {
            background: rgba(255,107,107,0.2) !important;
        }

