/* ══════════════════════════════════════════════════════════════════════
   portal.css — Design tokens et styles de base du portail SunPortal
   Identité : logo SunSolutions + dégradé de marque #FFC100 → #FF8C00 → #FA3E36
   ══════════════════════════════════════════════════════════════════════ */

:root {
    /* Couleurs */
    --sun-bg:           #F6F8FB;
    --sun-surface:      #FFFFFF;
    --sun-ink:          #292E38;
    --sun-ink-soft:     #64748B;
    --sun-ink-faint:    #94A3B8;
    --sun-border:       #E2E8F0;
    --sun-accent:       #FF7500;
    --sun-accent-soft:  rgba(255, 117, 0, .10);
    --sun-gradient:     linear-gradient(135deg, #FFC100 0%, #FF8C00 45%, #FA3E36 100%);
    --sun-success:      #16A085;
    --sun-success-soft: rgba(22, 160, 133, .10);
    --sun-danger:       #DC2626;
    --sun-danger-soft:  rgba(220, 38, 38, .08);

    /* Géométrie */
    --sun-radius:       16px;
    --sun-radius-sm:    10px;
    --sun-shadow:       0 10px 30px rgba(15, 23, 42, .08);
    --sun-shadow-hover: 0 16px 40px rgba(15, 23, 42, .14);

    /* Typo */
    --sun-font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                "Helvetica Neue", Arial, sans-serif;
}

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

html, body {
    background: var(--sun-bg);
    color: var(--sun-ink);
    font-family: var(--sun-font);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--sun-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Boutons ─────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: var(--sun-radius-sm);
    padding: 10px 20px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: opacity .15s, box-shadow .15s, transform .15s;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn-primary {
    background: var(--sun-gradient);
    color: #fff;
}
.btn-primary:hover:not(:disabled) {
    box-shadow: 0 6px 18px rgba(255, 117, 0, .35);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--sun-ink-soft);
    border: 1px solid var(--sun-border);
}
.btn-ghost:hover:not(:disabled) { background: var(--sun-surface); color: var(--sun-ink); }

.btn-danger {
    background: var(--sun-danger-soft);
    color: var(--sun-danger);
    border: 1px solid rgba(220, 38, 38, .25);
}
.btn-danger:hover:not(:disabled) { background: rgba(220, 38, 38, .14); }

/* ── Champs de formulaire (partagés login + admin) ───────────────────── */
.form-group { margin-bottom: 16px; }
.field-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--sun-ink);
    margin-bottom: 6px;
}
.connexion-info {
    width: 100%;
    border: 1px solid var(--sun-border);
    border-radius: var(--sun-radius-sm);
    background: var(--sun-bg);
    padding: 12px 14px;
    font-family: inherit;
    font-size: 15px;
    color: var(--sun-ink);
    outline: none;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.connexion-info::placeholder { color: var(--sun-ink-faint); }
.connexion-info:focus {
    border-color: var(--sun-accent);
    background: var(--sun-surface);
    box-shadow: 0 0 0 3px var(--sun-accent-soft);
}

/* ── Header commun des pages connectées ──────────────────────────────── */
.portal-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--sun-surface);
    border-bottom: 1px solid var(--sun-border);
    padding: 0 28px;
    height: 64px;
}
.portal-header-logo img { height: 26px; display: block; }
.portal-header-nav { display: flex; align-items: center; gap: 6px; }

.portal-header-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--sun-ink-soft);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: var(--sun-radius-sm);
    text-decoration: none;
    transition: background .15s, color .15s;
}
.portal-header-link:hover { background: var(--sun-bg); color: var(--sun-ink); text-decoration: none; }
.portal-header-link.active { color: var(--sun-accent); background: var(--sun-accent-soft); }
.portal-header-link .la { font-size: 17px; }

/* Menu profil */
.portal-profile { position: relative; }
.portal-profile-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    font-family: inherit;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: var(--sun-radius-sm);
    transition: background .15s;
}
.portal-profile-toggle:hover { background: var(--sun-bg); }
.portal-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--sun-gradient);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: .5px;
    flex: none;
}
.portal-profile-toggle .la-angle-down { color: var(--sun-ink-faint); font-size: 13px; }

.portal-profile-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 230px;
    background: var(--sun-surface);
    border: 1px solid var(--sun-border);
    border-radius: var(--sun-radius-sm);
    box-shadow: var(--sun-shadow);
    padding: 6px;
    display: none;
}
.portal-profile.open .portal-profile-menu { display: block; }
.portal-profile-identity {
    padding: 10px 12px;
    border-bottom: 1px solid var(--sun-border);
    margin-bottom: 6px;
}
.portal-profile-identity .name { font-weight: 600; font-size: 14px; }
.portal-profile-identity .email {
    color: var(--sun-ink-soft);
    font-size: 12.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.portal-profile-menu a {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--sun-ink);
    font-size: 14px;
    text-decoration: none;
}
.portal-profile-menu a:hover { background: var(--sun-bg); text-decoration: none; }
.portal-profile-menu a .la { font-size: 16px; color: var(--sun-ink-soft); }
.portal-profile-menu a.logout { color: var(--sun-danger); }
.portal-profile-menu a.logout .la { color: var(--sun-danger); }

@media (max-width: 700px) {
    .portal-header { padding: 0 16px; }
    .portal-header-link span { display: none; }
}
