*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --danger: #dc2626;
    --bg: #f8fafc;
    --surface: #ffffff;
    --border: #e2e8f0;
    --text: #1e293b;
    --text-muted: #64748b;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    /* Logo palette */
    --logo-pink:   #E5446D;
    --logo-orange: #E8A33D;
    --logo-green:  #2E9D5C;
    --logo-blue:   #2F6FE5;
    --logo-purple: #7A4FE0;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

/* ── Navbar ─────────────────────────────────────────── */
.navbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 1.5rem;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary);
    text-decoration: none;
}
.nav-brand img {
    height: 32px;
    width: auto;
    vertical-align: middle;
    flex-shrink: 0;
}
.nav-brand span {
    color: var(--primary);
}

.nav-greeting {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.95rem;
}
.nav-links a:hover { color: var(--primary); }

.nav-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    transition: color 0.15s, background 0.15s;
}
.nav-icon-btn:hover { color: var(--primary); background: rgba(37,99,235,0.08); }
.theme-dark .nav-icon-btn { color: #7a95ae; }
.theme-dark .nav-icon-btn:hover { color: #dce4ee; background: rgba(255,255,255,0.1); }

/* Hamburger button */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius);
}
.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}
.nav-hamburger:hover span { background: var(--primary); }

/* ── Container ──────────────────────────────────────── */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* ── Boutons ─────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: background 0.15s;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--border); color: var(--text); }
.btn-secondary:hover { background: #cbd5e1; }
.btn-link { background: none; border: none; color: var(--text); cursor: pointer; font-size: 0.95rem; padding: 0; }
.btn-link:hover { color: var(--primary); }

/* ── Formulaires ─────────────────────────────────────── */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}
.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}
.form-group input,
.form-group textarea,
.form-group select {
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--surface);
    transition: border-color 0.15s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* ── Auth (ancien, conservé pour compatibilité) ──────── */
.auth-card {
    max-width: 420px;
    margin: 3rem auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}
.auth-card h1 { margin-bottom: 1.5rem; }
.auth-link { margin-top: 1.25rem; text-align: center; font-size: 0.9rem; color: var(--text-muted); }
.auth-link a { color: var(--primary); }

/* ── Auth — thème sombre (login / register) ──────────── */

/* Fond enrichi pour les pages auth */
.auth-bg {
    background:
        radial-gradient(ellipse 1000px 600px at 50% -80px, rgba(37,99,235,.16) 0%, transparent 65%),
        radial-gradient(ellipse 600px 500px at 95% 100%,   rgba(122,79,224,.1) 0%, transparent 60%),
        #151f2e;
}
.auth-bg .navbar { background: rgba(13,26,40,.7); backdrop-filter: blur(8px); }

.auth-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 56px);
    padding: 2rem 1rem;
    gap: 2rem;
}

/* Brand au-dessus de la carte */
.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .6rem;
}
.auth-brand-logo {
    width: 60px;
    height: 60px;
    filter: drop-shadow(0 6px 24px rgba(37,99,235,.55));
}
.auth-brand-name {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(130deg, #93c5fd 0%, #c4b5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: .3px;
}

/* Carte */
.auth-card-dark {
    width: 100%;
    max-width: 400px;
    background: #182436;
    border-radius: 18px;
    padding: 2.25rem 2rem;
    box-shadow:
        0 0 0 1px rgba(99,157,255,.18),
        0 30px 70px rgba(0,0,0,.55),
        0 0 90px rgba(37,99,235,.08);
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    position: relative;
    overflow: hidden;
}
/* Liseré lumineux en haut de la carte */
.auth-card-dark::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(99,157,255,.8) 35%,
        rgba(167,139,250,.6) 65%,
        transparent 100%);
    pointer-events: none;
}

.auth-card-header { display: flex; flex-direction: column; gap: .3rem; }
.auth-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #e8f0fa;
}
.auth-card-sub {
    font-size: .85rem;
    color: #5d7a96;
}

.auth-inline-error {
    display: flex;
    align-items: center;
    gap: .45rem;
    background: rgba(74,16,16,.65);
    border: 1px solid rgba(127,32,32,.8);
    border-radius: 8px;
    color: #fca5a5;
    font-size: .83rem;
    padding: .55rem .8rem;
}

.auth-form { display: flex; flex-direction: column; gap: 1.1rem; }

/* Champs spécifiques auth (redéfinit account-field dans ce contexte) */
.auth-form .account-field input {
    background: #0f1e2f;
    border-color: rgba(99,157,255,.2);
    border-radius: 9px;
    padding: .65rem .9rem;
    font-size: .95rem;
}
.auth-form .account-field input:focus {
    border-color: rgba(99,157,255,.6);
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.auth-form .account-field input::placeholder { color: #2e4460; }
.auth-form .account-field label { letter-spacing: .6px; font-size: .73rem; }

.auth-submit { margin-top: .2rem; border-radius: 10px; padding: .75rem 1rem; font-size: .95rem; }

.auth-switch-link {
    text-align: center;
    font-size: .83rem;
    color: #4a6480;
}
.auth-switch-link a {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 600;
}
.auth-switch-link a:hover { color: #93c5fd; }

/* Account page card */
.account-card {
    max-width: 520px;
    margin: 3rem auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}
.account-card h1 { margin-bottom: 1.5rem; }

/* ── Alertes ─────────────────────────────────────────── */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.alert-error   { background: #fef2f2; border: 1px solid #fecaca; color: var(--danger); }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }

/* ── Thème sombre (portail) ──────────────────────────── */
.theme-dark {
    --bg: #2a3a4e;
    --surface: #344255;
    --border: #4a5e72;
    --text: #dce4ee;
    --text-muted: #7a95ae;
    --shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.theme-dark .navbar {
    background: #0d1a28;
    border-bottom-color: #1e3a5a;
}
.theme-dark .nav-brand span { color: #dce4ee; }
.theme-dark .nav-links a { color: #dce4ee; }
.theme-dark .nav-links a:hover { color: #ffffff; }
.theme-dark .nav-hamburger span { background: #dce4ee; }
.theme-dark .btn-link { color: #dce4ee; }
.theme-dark .btn-link:hover { color: #ffffff; }
.theme-dark .nav-greeting { color: var(--text-muted); }

.theme-dark .app-card {
    background: #182436;
    border-color: rgba(255,255,255,.06);
    box-shadow: 0 4px 20px rgba(0,0,0,.4);
}
.theme-dark .app-card:hover {
    background: #1e2d41;
    transform: translateY(-4px);
}
.theme-dark .app-card--cuisine:hover { box-shadow: 0 12px 36px rgba(0,0,0,.5), 0 0 30px rgba(232,163,61,.08); }
.theme-dark .app-card--finance:hover { box-shadow: 0 12px 36px rgba(0,0,0,.5), 0 0 30px rgba(46,157,92,.08); }
.theme-dark .app-card h2 { color: #e8f0fa; }
.theme-dark .app-card p  { color: #4a6480; }

.theme-dark .portal-hero-text h1 {
    background: linear-gradient(130deg, #93c5fd 0%, #c4b5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Modal de déconnexion ────────────────────────────── */
.logout-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.65);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn .15s ease;
}
.logout-modal-backdrop.hidden { display: none; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }

.logout-modal-card {
    background: #182436;
    border-radius: 20px;
    padding: 2.25rem 2rem 1.75rem;
    width: 100%;
    max-width: 360px;
    box-shadow:
        0 0 0 1px rgba(239,68,68,.18),
        0 30px 70px rgba(0,0,0,.65),
        0 0 80px rgba(220,38,38,.06);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .9rem;
    text-align: center;
    animation: slideUp .2s ease;
}
/* Liseré rouge en haut */
.logout-modal-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(239,68,68,.9) 35%,
        rgba(252,165,165,.6) 65%,
        transparent);
    pointer-events: none;
}

.logout-modal-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(239,68,68,.1);
    border: 1px solid rgba(239,68,68,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f87171;
    margin-top: .5rem;
    flex-shrink: 0;
}

.logout-modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #e8f0fa;
}
.logout-modal-sub {
    font-size: .85rem;
    color: #4a6480;
    margin-top: -.4rem;
    line-height: 1.5;
}

.logout-modal-actions {
    display: flex;
    gap: .75rem;
    width: 100%;
    margin-top: .6rem;
}
.logout-btn-cancel {
    flex: 1;
    padding: .7rem;
    border-radius: 10px;
    border: 1px solid rgba(99,157,255,.18);
    background: transparent;
    color: #7a95ae;
    font-size: .9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, color .15s;
    font-family: inherit;
}
.logout-btn-cancel:hover { background: rgba(99,157,255,.08); color: #dce4ee; }

.logout-btn-confirm {
    flex: 1;
    padding: .7rem;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #dc2626, #991b1b);
    color: #fff;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: filter .15s, transform .1s;
    font-family: inherit;
}
.logout-btn-confirm:hover  { filter: brightness(1.12); }
.logout-btn-confirm:active { transform: scale(.97); }

/* ── Portail ─────────────────────────────────────────── */
.portal-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 3rem;
    padding: 3.5rem 1rem 1rem;
    gap: .75rem;
    position: relative;
}
.portal-hero::before {
    content: '';
    position: absolute;
    width: 700px;
    height: 400px;
    background: radial-gradient(ellipse, rgba(37,99,235,.13) 0%, transparent 65%);
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}
.portal-hero-logo {
    width: 96px;
    height: 96px;
    filter: drop-shadow(0 6px 28px rgba(37,99,235,.55));
    position: relative;
}
.portal-hero-text h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.1;
}
.portal-hero-sub {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-top: .1rem;
}

.portal h1 { margin-bottom: 1.5rem; }

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

.app-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 1.25rem 1.25rem;
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow);
    transition: box-shadow 0.15s, transform 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    border-top-width: 4px;
    border-top-style: solid;
    min-height: 220px;
}
.app-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.12); transform: translateY(-2px); }

.app-card--cuisine { border-top-color: var(--logo-orange); }
.app-card--finance { border-top-color: var(--logo-green); }
.app-card--soon    { border-top-color: var(--logo-purple); opacity: 0.55; cursor: default; pointer-events: none; }

.app-icon {
    flex: 1;
    width: 100%;
    border-radius: calc(var(--radius) - 2px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    line-height: 1;
    min-height: 130px;
}
.app-icon--cuisine { background: rgba(232,163,61,0.15); color: var(--logo-orange); }
.app-icon--finance { background: rgba(46,157,92,0.15); }
.app-icon--finance img { width: 8rem; height: 8rem; }
.app-icon--soon    { background: rgba(122,79,224,0.15); color: var(--logo-purple); }

.app-card h2 { font-size: 1rem; font-weight: 600; }
.app-card p  { font-size: 0.8rem; color: var(--text-muted); }

/* ── Page header ─────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.75rem;
}

/* ── Catalogue recettes — liste ──────────────────────── */
.recettes-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow);
}
.recette-list-item + .recette-list-item {
    border-top: 1px solid var(--border);
}
.recette-list-link {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    text-decoration: none;
    color: var(--text);
    transition: background 0.12s;
    flex-wrap: wrap;
}
.recette-list-link:hover { background: #f1f5f9; }
.recette-list-title {
    font-size: 0.95rem;
    font-weight: 600;
    flex-shrink: 0;
}
.recette-list-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.recette-list-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-left: auto;
}
.badge {
    display: inline-block;
    background: #eff6ff;
    color: var(--primary);
    border-radius: 99px;
    padding: 0.15rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 500;
}

/* ── Formulaire recette ──────────────────────────────── */
.recette-form {
    max-width: 720px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

/* ── Empty state ─────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* ── Page compte ─────────────────────────────────────── */
.account-page {
    max-width: 780px;
    margin: 0 auto;
    padding-top: 1.75rem;
}

/* Carte de profil */
.account-profile-card {
    background: linear-gradient(170deg, #0c1825 0%, #0f2035 60%, #0c1825 100%);
    border: 1px solid rgba(99,157,255,.12);
    border-radius: 18px;
    padding: 2.75rem 2rem 2.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .85rem;
    margin-bottom: 1.75rem;
    box-shadow:
        0 0 0 1px rgba(99,157,255,.06),
        0 8px 40px rgba(0,0,0,.5),
        0 0 80px rgba(37,99,235,.07);
    position: relative;
    overflow: hidden;
}
/* Halo radial derrière l'avatar */
.account-profile-card::before {
    content: '';
    position: absolute;
    width: 320px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(37,99,235,.2) 0%, transparent 70%);
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}
/* Liseré lumineux en haut */
.account-profile-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99,157,255,.7) 40%, rgba(167,139,250,.5) 65%, transparent);
    pointer-events: none;
}

.account-avatar {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: linear-gradient(140deg, #2563eb 0%, #7a4fe0 100%);
    box-shadow: 0 0 0 4px rgba(37,99,235,.2), 0 0 0 8px rgba(37,99,235,.06), 0 10px 30px rgba(0,0,0,.5);
    color: rgba(255,255,255,.9);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.account-username {
    font-size: 1.4rem;
    font-weight: 700;
    color: #e8f0fa;
    letter-spacing: .2px;
}

/* Alerte succès globale */
.account-alert {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .65rem 1rem;
    border-radius: 8px;
    font-size: .875rem;
    margin-bottom: 1.5rem;
}
.account-alert.alert-success {
    background: rgba(13,61,32,.8);
    border: 1px solid rgba(26,92,51,.8);
    color: #86efac;
}

/* Grille des deux cartes */
.account-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    align-items: start;
}

/* Carte générique */
.account-card {
    background: #182436;
    border-radius: 16px;
    padding: 1.6rem 1.5rem 1.4rem;
    box-shadow: 0 4px 20px rgba(0,0,0,.4);
    display: flex;
    flex-direction: column;
    gap: 1.3rem;
    position: relative;
    overflow: hidden;
}
/* Liseré coloré en haut de chaque carte */
.account-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    pointer-events: none;
}
.account-card--blue {
    box-shadow: 0 0 0 1px rgba(59,130,246,.15), 0 4px 24px rgba(0,0,0,.45);
}
.account-card--blue::before {
    background: linear-gradient(90deg, transparent, rgba(59,130,246,.9) 40%, rgba(99,157,255,.6) 70%, transparent);
}
.account-card--purple {
    box-shadow: 0 0 0 1px rgba(139,92,246,.15), 0 4px 24px rgba(0,0,0,.45);
}
.account-card--purple::before {
    background: linear-gradient(90deg, transparent, rgba(139,92,246,.9) 40%, rgba(167,139,250,.6) 70%, transparent);
}

/* En-tête de carte */
.account-card-header {
    display: flex;
    align-items: center;
    gap: .9rem;
}

.account-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.account-card-icon--blue   { background: rgba(59,130,246,.12); color: #60a5fa; border: 1px solid rgba(59,130,246,.2); }
.account-card-icon--purple { background: rgba(139,92,246,.12);  color: #a78bfa; border: 1px solid rgba(139,92,246,.2); }

.account-card-title {
    font-size: .95rem;
    font-weight: 700;
    color: #e0eaf8;
    margin-bottom: .2rem;
}
.account-card-sub { font-size: .8rem; color: #5d7a96; }
.account-email-current {
    font-family: ui-monospace, monospace;
    font-size: .78rem;
    color: #7a95ae;
}

/* Erreur inline */
.account-inline-error {
    display: flex;
    align-items: center;
    gap: .45rem;
    background: rgba(74,16,16,.65);
    border: 1px solid rgba(127,32,32,.8);
    border-radius: 8px;
    color: #fca5a5;
    font-size: .82rem;
    padding: .55rem .8rem;
}

/* Formulaire */
.account-form { display: flex; flex-direction: column; gap: .95rem; }

.account-field { display: flex; flex-direction: column; gap: .3rem; }
.account-field label {
    font-size: .73rem;
    font-weight: 600;
    color: #4a6480;
    text-transform: uppercase;
    letter-spacing: .6px;
}
.account-field input {
    padding: .6rem .85rem;
    background: #0f1e2f;
    border: 1px solid rgba(99,157,255,.18);
    border-radius: 9px;
    color: #dce4ee;
    font-size: .9rem;
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
}
.account-field input:focus {
    outline: none;
    border-color: rgba(59,130,246,.6);
    box-shadow: 0 0 0 3px rgba(37,99,235,.14);
}
.account-card--purple .account-field input:focus {
    border-color: rgba(139,92,246,.6);
    box-shadow: 0 0 0 3px rgba(122,79,224,.14);
}
.account-field input::placeholder { color: #243448; }

/* Bouton */
.account-submit {
    width: 100%;
    padding: .7rem 1rem;
    border: none;
    border-radius: 10px;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: .2rem;
    transition: filter .15s, transform .1s;
    letter-spacing: .2px;
}
.account-submit:hover  { filter: brightness(1.12); }
.account-submit:active { transform: scale(.98); }
.account-submit--blue   { background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%); color: #fff; }
.account-submit--purple { background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%); color: #fff; }

/* Dark mode — alertes et boutons réutilisés par cuisine */
.theme-dark .alert-error   { background: #4a1010; border-color: #7f2020; color: #fca5a5; }
.theme-dark .alert-success { background: #0d3d20; border-color: #1a5c33; color: #86efac; }
.theme-dark .btn-primary   { background: #2563eb; color: #fff; }
.theme-dark .btn-primary:hover { background: #1d4ed8; }

@media (max-width: 640px) {
    .account-sections { grid-template-columns: 1fr; }
    .account-profile-card { padding: 2.25rem 1.25rem 1.75rem; }
}

/* ── Responsive — tablette (≤768px) ─────────────────── */
@media (max-width: 768px) {
    .app-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
    .portal-hero {
        flex-direction: column;
        text-align: center;
    }
    .portal-hero-logo { width: 64px; height: 64px; }
    .portal-hero-text h1 { font-size: 1.5rem; }
}

/* ── Responsive — mobile (≤480px) ───────────────────── */
@media (max-width: 480px) {
    .container { padding: 1rem; }
    .navbar { padding: 0 1rem; }

    /* Show hamburger, hide links by default */
    .nav-hamburger { display: flex; }
    .nav-links {
        display: none;
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 0.5rem 1rem 1rem;
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
        z-index: 99;
    }
    .nav-links.open { display: flex; }
    .nav-links a,
    .nav-links .nav-greeting,
    .nav-links form { padding: 0.5rem 0; width: 100%; }

    .app-grid { grid-template-columns: 1fr; }
    .app-icon { min-height: 110px; font-size: 4rem; }
    .app-icon--finance img { width: 6.5rem; height: 6.5rem; }
    .portal-hero { padding: 1.25rem 0.5rem 1rem; }
    .portal-hero-logo { width: 56px; height: 56px; }
    .portal-hero-text h1 { font-size: 1.3rem; }

    .page-header { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
    .recette-form { padding: 1.25rem; }
    .form-actions { flex-direction: column; }
    .auth-card { margin: 1.5rem auto; padding: 1.25rem; }
    .account-card { margin: 1.5rem auto; padding: 1.25rem; }
    .recettes-grid { grid-template-columns: 1fr; }
}
