# Hydrive — raiz pública do site
Options -Indexes
DirectoryIndex index.php

# Forçar HTTPS
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP:X-Forwarded-Proto} !=https
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# Bloquear ficheiros escondidos (.git, .env, ...)
<FilesMatch "^\.">
  Require all denied
</FilesMatch>

# Cabeçalhos de segurança
<IfModule mod_headers.c>
  Header always set X-Content-Type-Options "nosniff"
  Header always set Referrer-Policy "strict-origin-when-cross-origin"
  Header always set X-Frame-Options "SAMEORIGIN"
  Header always set Permissions-Policy "microphone=(self), camera=(), geolocation=()"
</IfModule>
