/* Recettio — thème par défaut — pages/public-header.css
   Styles du site public (views/public/header.php). */
body {
    margin: 0;
    padding: 0;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Cg transform='translate(17.92,21.44)' fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='14.08' cy='6.16' r='5.28'/%3E%3Ccircle cx='7.04' cy='10.12' r='3.96'/%3E%3Ccircle cx='21.12' cy='10.12' r='3.96'/%3E%3Crect x='7.04' y='10.12' width='14.08' height='10.12'/%3E%3C/g%3E%3C/svg%3E"),
        linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    background-repeat: repeat, no-repeat;
    background-size: 64px 64px, cover;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: background-color 0.3s ease;
}
:root[data-theme="light"] body {
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Cg transform='translate(17.92,21.44)' fill='%23334155' fill-opacity='0.025'%3E%3Ccircle cx='14.08' cy='6.16' r='5.28'/%3E%3Ccircle cx='7.04' cy='10.12' r='3.96'/%3E%3Ccircle cx='21.12' cy='10.12' r='3.96'/%3E%3Crect x='7.04' y='10.12' width='14.08' height='10.12'/%3E%3C/g%3E%3C/svg%3E"),
        linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}
.header-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: rgba(var(--ink-rgb), 0.8);
    backdrop-filter: blur(10px);
    transition: background 0.3s ease;
}
:root[data-theme="light"] .header-nav {
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}
.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f1f5f9;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: color 0.3s ease;
}
:root[data-theme="light"] .logo {
    color: #1e293b;
}
.logo:hover {
    text-decoration: none !important;
}
.logo span {
    text-decoration: none;
}
.logo img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}
.header-actions {
    display: flex;
    gap: 12px;
}
.btn-nav {
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none !important;
    font-weight: 500;
    transition: background 0.2s;
}
.btn-nav:hover {
    text-decoration: none !important;
}
.btn-nav-primary {
    background: var(--site-500, var(--c-info, #3b82f6));
    color: var(--site-on, white);
}
.btn-nav-primary:hover {
    background: var(--site-600, #2563eb);
    text-decoration: none !important;
}
.btn-nav-secondary {
    background: transparent;
    color: #f1f5f9;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
}
.btn-nav-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none !important;
}
:root[data-theme="light"] .btn-nav-secondary {
    color: #1e293b;
    border-color: rgba(var(--ink-2-rgb), 0.2);
}
:root[data-theme="light"] .btn-nav-secondary:hover {
    background: rgba(var(--ink-2-rgb), 0.1);
}
.modal {
    position: fixed;
    inset: 0;
    background: rgba(var(--ink-rgb), 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 16px;
}
.modal-content {
    background: var(--color-bg-elevated, #1e293b);
    border-radius: 12px;
    border: 1px solid var(--color-border, rgba(var(--ink-3-rgb), 0.3));
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}
.modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: var(--color-text, #f1f5f9);
}
.close-btn {
    border: none;
    background: transparent;
    color: var(--color-text-muted, #94a3b8);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}
.close-btn:hover {
    background: rgba(var(--line-rgb), 0.25);
    color: var(--color-text, #f1f5f9);
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}
.form-label {
    font-weight: 500;
    font-size: 14px;
    color: var(--color-text, #f1f5f9);
}
.form-input {
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid var(--color-border, rgba(var(--ink-3-rgb), 0.3));
    background: var(--color-bg, #0f172a);
    color: var(--color-text, #f1f5f9);
    font-size: 15px;
    transition: border-color 0.2s;
}
.form-input:focus {
    outline: none;
    border-color: var(--site-link, var(--c-info, #3b82f6));
    box-shadow: 0 0 0 3px rgba(var(--site-500-rgb, 59, 130, 246), 0.1);
}
.form-hint {
    font-size: 12px;
    color: var(--color-text-muted, #94a3b8);
}
.btn-primary {
    padding: 12px 24px;
    background: var(--site-500, var(--c-info, #3b82f6));
    color: var(--site-on, white);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-primary:hover {
    background: var(--site-600, #2563eb);
}
.theme-toggle-public {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: #f1f5f9;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.theme-toggle-public:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}
.theme-toggle-public:active {
    transform: scale(0.95);
}
:root[data-theme="light"] .theme-toggle-public {
    color: #1e293b;
    border-color: rgba(var(--ink-2-rgb), 0.2);
}
:root[data-theme="light"] .theme-toggle-public:hover {
    background: rgba(var(--ink-2-rgb), 0.1);
    border-color: rgba(var(--ink-2-rgb), 0.3);
}
.header-nav {
    position: relative;
    z-index: 40;
}
.header-actions {
    flex-wrap: nowrap;
    align-items: center;
}
.public-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}
.btn-nav.is-current {
    background: rgba(var(--site-500-rgb, 59, 130, 246), 0.2);
    border-color: var(--site-link, var(--c-info, #3b82f6));
    font-weight: 600;
}
@media (max-width: 768px) {
    .header-nav {
        padding: 12px 16px;
    }
    .logo {
        font-size: 1.25rem;
        gap: 10px;
    }
    .logo img {
        width: 34px;
        height: 34px;
    }
    .header-actions,
    .public-nav {
        gap: 8px;
    }
    /* Mobile : seule l'action principale reste (Connexion / tableau de bord) ;
       Fonctionnalités est accessible depuis la page et le pied de page. */
    .public-nav .nav-desktop-only {
        display: none;
    }
    .public-nav .btn-nav {
        padding: 9px 16px;
    }
    .btn-nav .label-long {
        display: none;
    }
}
@media (min-width: 769px) {
    .btn-nav .label-short {
        display: none;
    }
}

/* Connexion : saisie du code de double authentification */
.two-factor-card { max-width: 460px; margin: 0 auto; }
.two-factor-card .field-label { display: block; margin-bottom: 6px; }
.two-factor-card .field-input { display: block; width: 100%; box-sizing: border-box; background: transparent; color: inherit; letter-spacing: 0.08em; }
