        body {
            font-family: 'Helvetica', 'Arial', sans-serif;
            background-color: #f0f0f0;
            display: flex;
            flex-direction: column;
            align-items: center;
            min-height: 100vh;
            margin: 0;
            padding: 10px;
        }
        
        h1 { color: #333; margin-bottom: 20px; font-size: 1.8em; text-align: center; }
        
        .game-container {
            display: flex;
            flex-direction: row; 
            background: white;
            padding: 20px;
            border-radius: 15px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.1);
            gap: 30px;
            justify-content: center;
            align-items: flex-start;
            max-width: 100%;
        }

        .canvas-area { display: flex; justify-content: center; align-items: center; }

        canvas {
            background-color: white;
            border: 1px solid #ccc;
            cursor: crosshair;
            max-width: 100%;
            height: auto;
        }

        .controls { display: flex; flex-direction: column; min-width: 250px; }

        .score-box {
            background-color: #333;
            color: white;
            padding: 15px;
            border-radius: 8px;
            text-align: center;
            margin-bottom: 20px;
            font-size: 1.2em;
            box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        }
        .score-number { font-size: 1.5em; font-weight: bold; color: #4CAF50; transition: color 0.3s; }
        .low-ammo { color: #ff3333 !important; animation: pulse 1s infinite; }

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

        .score-panel {
            display: flex;
            justify-content: space-between;
            background: #333;
            color: white;
            padding: 15px;
            border-radius: 8px;
            margin-bottom: 20px;
            box-shadow: 0 4px 10px rgba(0,0,0,0.2);
        }
        .score-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            width: 33%;
        }
        .score-item span { font-size: 0.8em; color: #aaa; font-weight: bold; margin-bottom: 5px; }
        .score-item strong { font-size: 1.5em; }
        
        .floating-score {
            position: absolute;
            font-weight: bold;
            font-size: 1.5em;
            text-shadow: 1px 1px 2px black, -1px -1px 2px black, 1px -1px 2px black, -1px 1px 2px black;
            pointer-events: none;
            animation: floatUp 1s ease-out forwards;
            z-index: 10;
        }

        @keyframes floatUp {
            0% { transform: translate(-50%, 0); opacity: 1; }
            100% { transform: translate(-50%, -40px); opacity: 0; }
        }

        .targets { 
            margin-bottom: 20px; 
            background: #f9f9f9;
            padding: 15px;
            border-radius: 8px;
        }
        .target-item { margin: 5px 0; color: #333; font-size: 0.95em; }
        .sunk { text-decoration: line-through; color: grey; }

        .input-group {
            margin: 15px 0;
            display: flex;
            align-items: center;
            justify-content: flex-start; 
            gap: 10px; 
        }
        .input-group label { font-weight: bold; font-size: 1.2em; width: 30px; }
        .input-group input {
            padding: 8px;
            font-size: 1.2em;
            width: 50px;
            text-align: center;
            border: 2px solid #ddd;
            border-radius: 5px;
            font-weight: bold;
            /* vscode-stylint-disable-line */
            -moz-appearance: textfield;
            appearance: textfield;
        }
        .input-group input::-webkit-outer-spin-button,
        .input-group input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

        .btn-nav {
            background-color: #e0e0e0;
            color: #333;
            border: none;
            width: 40px;
            height: 40px;
            border-radius: 5px;
            font-size: 1.5em;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0;
            padding: 0;
        }
        .btn-nav:hover { background-color: #ccc; }
        .btn-nav:active { background-color: #bbb; }

        .btn-feu {
            background-color: #d32f2f;
            color: white;
            border: none;
            padding: 15px 20px;
            font-size: 1.2em;
            font-weight: bold;
            border-radius: 5px;
            cursor: pointer;
            margin-top: 20px;
            width: 100%;
            transition: background 0.3s;
        }
        .btn-feu:hover { background-color: #b71c1c; }
        .btn-feu:disabled { background-color: #ccc; cursor: not-allowed; }

        #info-msg {
            margin-top: 20px;
            font-weight: bold;
            min-height: 40px;
            text-align: center;
            padding: 10px;
            background: #fafafa;
            border-radius: 5px;
        }

        .footer { margin-top: 30px; font-size: 0.9em; color: #666; text-align: center; line-height: 1.6; }
        .author-name { font-weight: bold; font-size: 1.1em; color: #333; }
        a { color: #d32f2f; text-decoration: none; }

        /* --- HALL OF FAME --- */
        .hall-of-fame {
            background: #fafafa;
            padding: 15px;
            border-radius: 8px;
            border: 2px dashed #ddd;
            min-width: 200px;
        }
        .hall-of-fame h3 {
            margin-top: 0;
            color: #ff9800;
            text-align: center;
            font-size: 1.3em;
        }
        #hof-list {
            list-style-type: none;
            padding: 0;
            margin: 0;
            max-height: 250px;
            overflow-y: auto;
        }
        #hof-list li {
            padding: 8px 0;
            border-bottom: 1px solid #eee;
            font-size: 0.95em;
            display: flex;
            justify-content: space-between;
        }
        #hof-list li:last-child {
            border-bottom: none;
        }
        .hof-pseudo {
            font-weight: bold;
            color: #333;
        }
        .hof-score {
            color: #4CAF50;
            font-weight: bold;
        }

        /* --- MODALES --- */
        .modal-overlay {
            display: none; 
            position: fixed;
            top: 0; left: 0;
            width: 100%; height: 100%;
            background-color: rgba(0, 0, 0, 0.8);
            z-index: 1000;
            justify-content: center;
            align-items: center;
        }

        .modal-content {
            background: white;
            padding: 30px;
            border-radius: 15px;
            text-align: center;
            max-width: 90%;
            width: 550px;
            box-shadow: 0 10px 25px rgba(0,0,0,0.5);
            animation: popIn 0.3s ease-out;
        }

        @keyframes popIn {
            from { transform: scale(0.8); opacity: 0; }
            to { transform: scale(1); opacity: 1; }
        }

        .victory-icon { font-size: 60px; margin-bottom: 10px; }
        .victory-title { color: #d32f2f; margin: 10px 0; font-size: 2em; }
        .defeat-title { color: #333; margin: 10px 0; font-size: 2em; }
        
        .victory-stats { font-size: 1.2em; margin: 10px 0; color: #555; line-height: 1.5; }
        .victory-rank { font-size: 1.4em; font-weight: bold; color: #333; margin-top: 10px; }
        .rank-label { font-size: 0.8em; text-transform: uppercase; color: #999; letter-spacing: 1px; }

        /* --- JAUGE (5 ZONES) --- */
        .gauge-container {
            position: relative;
            width: 100%;
            height: 30px;
            /* 0-41.6% : Rouge foncé (Moussaillon)
               41.6-53.3% : Orange (Matelot)
               53.3-66.6% : Jaune (Lieutenant)
               66.6-83.3% : Vert clair (Grand Amiral)
               83.3%+ : Vert foncé (Légende)
            */
            background: linear-gradient(90deg, 
                #d32f2f 0%, #d32f2f 41.6%,   
                #ff9800 41.6%, #ff9800 53.3%, 
                #ffc107 53.3%, #ffc107 66.6%,  
                #8bc34a 66.6%, #8bc34a 83.3%,  
                #4CAF50 83.3%, #4CAF50 100% 
            );
            border-radius: 15px;
            margin: 20px 0 0 0;
            overflow: hidden;
            box-shadow: inset 0 2px 5px rgba(0,0,0,0.2);
        }
        
        .gauge-mask {
            position: absolute;
            top: 0; right: 0;
            height: 100%;
            width: 100%;
            background-color: #ddd; 
            border-left: 1px solid rgba(255,255,255,0.5);
            transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1);
            z-index: 1;
        }

        .gauge-tick {
            position: absolute;
            top: 0; bottom: 0;
            width: 2px;
            background-color: rgba(255,255,255,0.8);
            z-index: 2;
        }
        
        .gauge-tick-danger {
            background-color: rgba(255, 0, 0, 0.8);
            width: 3px;
        }

        .gauge-title {
            position: absolute;
            top: 50%;
            transform: translate(-50%, -50%);
            font-size: 0.65em;
            font-weight: bold;
            color: rgba(0, 0, 0, 0.5);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            z-index: 3;
            pointer-events: none;
            white-space: nowrap;
        }

        .tick-label {
            position: absolute;
            top: 5px;
            font-size: 0.8em;
            color: #777;
            font-weight: bold;
            transform: translateX(-50%);
        }

        .btn-replay {
            background-color: #4CAF50;
            color: white;
            border: none;
            padding: 15px 30px;
            font-size: 1.2em;
            font-weight: bold;
            border-radius: 50px;
            cursor: pointer;
            margin-top: 30px;
            transition: transform 0.2s;
        }
        .btn-replay:hover { transform: scale(1.05); background-color: #45a049; }

        /* --- MOBILE --- */
        @media (max-width: 768px) {
            .game-container { flex-direction: column; align-items: center; padding: 10px; gap: 15px; }
            .controls { width: 100%; }
            h3, .input-group, .btn-feu, #info-msg { order: 1; }
            .score-box { display: none; }
            .targets { order: 3; margin-top: 20px; border-top: 2px dashed #eee; }
            .input-group { justify-content: center; } 
            canvas { width: 320px; height: 320px; }
            .modal-content { width: 95%; padding: 20px; }
        }
