/*
 * apio-ssp.css — Thème Apio Systems pour Self Service Password (LTB)
 * Fidèle au CSS de la page parking Apio Systems
 *
 * INSTALLATION :
 *   1. Copier dans : htdocs/html/css/apio-ssp.css
 *   2. Dans conf/config.inc.local.php :
 *        $custom_css = "css/apio-ssp.css";
 */

/* ══════════════════════════════════════════
   Variables — copiées à l'identique du parking
   ══════════════════════════════════════════ */
:root {
    --brand-dark:        #0d1f2d;
    --brand-mid:         #1a3a52;
    --brand-teal:        #007cba;
    --brand-teal-light:  #0099e0;
    --brand-accent:      #00b4d8;
    --text-primary:      #ffffff;
    --text-muted:        rgba(255,255,255,0.60);
    --text-subtle:       rgba(255,255,255,0.35);
    --border-subtle:     rgba(255,255,255,0.10);
}

/* ══════════════════════════════════════════
   Reset — copié du parking
   ══════════════════════════════════════════ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ══════════════════════════════════════════
   html / body — identique au parking
   ══════════════════════════════════════════ */
html, body {
    height: 100%;
    padding: 0;
}

html {
    background-color: var(--brand-dark);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--brand-dark) !important;
    color: var(--text-primary) !important;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Filet de sécurité — couvre les zones hors flux */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-color: var(--brand-dark);
    z-index: -1;
}

/* ══════════════════════════════════════════
   Navbar → joue le rôle du <header> parking
   padding / border-bottom identiques
   ══════════════════════════════════════════ */
.navbar.bg-body-tertiary {
    background-color: var(--brand-dark) !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 20px 32px !important;
    margin-bottom: 0 !important;
}

/* navbar interne à la card (celle dans card-body > container) */
.card-body .navbar.bg-body-tertiary {
    padding: 12px 20px !important;
    margin-bottom: 32px !important;
    border-radius: 10px !important;
    background-color: rgba(255,255,255,0.04) !important;
}

.navbar-brand {
    display: inline-block;
    line-height: 0;
    color: var(--text-primary) !important;
    padding: 0 !important;
}

.navbar-brand:hover {
    color: var(--text-primary) !important;
}

/* Logo navbar — même traitement que header img du parking */
.menu-logo {
    height: 36px !important;
    width: auto;
    opacity: 0.9;
}

.nav-link {
    color: var(--text-muted) !important;
    font-size: 14px;
    transition: color 0.15s;
}

.nav-link:hover {
    color: var(--text-primary) !important;
}

.navbar-toggler {
    border-color: var(--border-subtle) !important;
}

.navbar-toggler-icon {
    filter: invert(1);
}

/* ══════════════════════════════════════════
   Header Apio — identique au parking
   ══════════════════════════════════════════ */
header {
    padding: 20px 32px;
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

header a {
    display: inline-block;
    line-height: 0;
}

header img {
    height: 42px !important;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

/* ══════════════════════════════════════════
   .container Bootstrap → joue le rôle du <main> parking
   flex:1 + centrage vertical/horizontal
   ══════════════════════════════════════════ */
body > .container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px !important;
}

/* ══════════════════════════════════════════
   .card → reprend exactement le .card du parking
   ══════════════════════════════════════════ */
.card {
    width: 100% !important;
    max-width: 620px !important;
    background: var(--brand-mid) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: 16px !important;
    box-shadow: none !important;
    color: var(--text-primary) !important;
    margin: 0 auto;
}

/* Retire la surcharge Bootstrap .card-success (border-top vert) */
.card.card-success {
    border-top: 1px solid var(--border-subtle) !important;
}

.card-body {
    padding: 48px 40px !important;
}

/* ══════════════════════════════════════════
   Logo centré (sous la navbar interne)
   ══════════════════════════════════════════ */
.logo {
    max-height: 44px;
    width: auto;
    opacity: 0.9;
}

/* ══════════════════════════════════════════
   Alertes résultat (.result.alert-success / alert-warning)
   → style badge/pill inspiré du parking
   ══════════════════════════════════════════ */
.result.alert-success {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0,124,186,0.18) !important;
    border: 1px solid rgba(0,124,186,0.35) !important;
    color: var(--brand-accent) !important;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 6px 14px;
    border-radius: 999px !important;
    box-shadow: none !important;
    margin-bottom: 16px;
}

.result.alert-warning {
    background: rgba(255,193,7,0.10) !important;
    border: 1px solid rgba(255,193,7,0.25) !important;
    color: #ffd966 !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    font-size: 13px;
    margin-bottom: 20px;
}

/* Alertes génériques */
.alert {
    border-radius: 10px !important;
    font-size: 14px;
    box-shadow: none !important;
}

.alert-success {
    background-color: rgba(0,124,186,0.15) !important;
    border: 1px solid rgba(0,124,186,0.35) !important;
    color: var(--brand-accent) !important;
}

.alert-warning {
    background-color: rgba(255,193,7,0.10) !important;
    border: 1px solid rgba(255,193,7,0.25) !important;
    color: #ffd966 !important;
}

/* alert-info contient le formulaire */
.alert-info {
    background-color: rgba(255,255,255,0.04) !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-primary) !important;
}

.alert-danger {
    background-color: rgba(220,53,69,0.15) !important;
    border: 1px solid rgba(220,53,69,0.30) !important;
    color: #ff8fa3 !important;
}

/* ══════════════════════════════════════════
   Formulaire
   ══════════════════════════════════════════ */
.col-form-label {
    color: var(--text-muted) !important;
    font-size: 13px;
    font-weight: 500;
}

.form-control {
    background-color: rgba(255,255,255,0.06) !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
    border-radius: 8px !important;
    color: var(--text-primary) !important;
    font-size: 14px;
    height: 42px;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.form-control:focus {
    background-color: rgba(255,255,255,0.10) !important;
    border-color: var(--brand-teal) !important;
    box-shadow: 0 0 0 3px rgba(0,124,186,0.25) !important;
    color: var(--text-primary) !important;
    outline: none;
}

.form-control::placeholder {
    color: var(--text-subtle) !important;
}

.input-group-text {
    background-color: rgba(255,255,255,0.08) !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
    border-right: none !important;
    color: var(--text-muted) !important;
    border-radius: 8px 0 0 8px !important;
}

/* Captcha */
.captcha img {
    border-radius: 6px;
    opacity: 0.9;
    max-height: 42px;
}

#captcha-refresh {
    color: var(--brand-accent) !important;
    cursor: pointer;
    transition: color 0.15s;
}

#captcha-refresh:hover {
    color: var(--brand-teal-light) !important;
}

/* ══════════════════════════════════════════
   Bouton — calqué sur .cta du parking
   ══════════════════════════════════════════ */
.btn-success,
.btn-primary {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    background-color: var(--brand-teal) !important;
    border: none !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    padding: 11px 22px !important;
    text-shadow: none !important;
    box-shadow: none !important;
    transition: background 0.18s !important;
}

.btn-success:hover,
.btn-primary:hover,
.btn-success:focus,
.btn-primary:focus {
    background-color: var(--brand-teal-light) !important;
    color: #ffffff !important;
    box-shadow: none !important;
    outline: none !important;
}

/* ══════════════════════════════════════════
   Politique de mot de passe
   ══════════════════════════════════════════ */
.ppolicy {
    font-size: 13px;
    margin-top: 16px;
}

.ppolicy ul {
    margin-top: 10px;
    margin-bottom: 0;
}

.ppolicy li {
    margin-bottom: 5px;
}

/* Icônes feedback ppolicy */
.fa-check.text-success { color: #6dffb0 !important; }
.fa-times.text-danger  { color: #ff8fa3 !important; }

/* ══════════════════════════════════════════
   Liens — cohérents avec la charte Apio
   ══════════════════════════════════════════ */
a {
    color: var(--brand-accent) !important;
    text-decoration: none !important;
    transition: color 0.15s;
}

a:hover {
    color: var(--brand-teal-light) !important;
}

/* ══════════════════════════════════════════
   Footer — calqué sur <footer> parking
   flex-shrink:0 pour qu'il reste en bas sans être sticky
   ══════════════════════════════════════════ */
#footer {
    flex-shrink: 0;
    padding: 18px 32px !important;
    border-top: 1px solid var(--border-subtle);
    text-align: center;
    font-size: 12px !important;
    color: var(--text-subtle) !important;
    background: transparent !important;
    position: static !important;
}

/* ══════════════════════════════════════════
   Responsive — identique au parking
   ══════════════════════════════════════════ */
@media (max-width: 480px) {
    .navbar.bg-body-tertiary {
        padding: 16px 20px !important;
    }

    .card-body {
        padding: 36px 24px !important;
    }

    .col-form-label.text-end {
        text-align: left !important;
    }

    #footer {
        padding: 16px 20px !important;
    }
}
