server {
    listen 80;
    server_name _;

    root /usr/share/nginx/html;
    index index.html;

    # Compression
    gzip on;
    gzip_types text/plain text/css application/javascript image/svg+xml;

    # Cache long durée pour les assets avec hash
    location ~* \.(js|css|woff2?|png|jpg|jpeg|webp|svg|ico)$ {
        expires 1y;
        add_header Cache-Control "public, immutable";
    }

    # Toujours servir index.html (site one-page)
    location / {
        try_files $uri $uri/ /index.html;
    }
}
