/* ============================================================
   Page Signin (/signin) — style aligne sur le design system BO
   Utilise les tokens --bo-* definis dans bo-foundation.css.
   Toutes les regles sont scopees sous .signin-page pour ne pas
   impacter le reste du site.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap');

/* Reset typo : neutralise _typography.scss et _login.scss qui ciblent
   p / a / span / h2 / input directement et casseraient l'heritage. */
.signin-page,
.signin-page * {
    box-sizing: border-box;
}
.signin-page,
.signin-page p,
.signin-page a,
.signin-page span,
.signin-page label,
.signin-page input,
.signin-page button,
.signin-page h1,
.signin-page h2 {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #004643;
}

/* Fond pleine page : on neutralise le body legacy via background sur le wrapper.
   Le footer du layouts.default reste visible en bas. */
.signin-page {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 16px 32px;
    background: linear-gradient(180deg, #FFFFFF 0%, #E7ECF2 100%);
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #004643;
    line-height: 1.4;
}

/* ---------- Card centrale ---------- */
/* Largeur fluide :
   - minimum 360px (mobile)
   - 45% de la largeur viewport au milieu
   - maximum 680px sur grand ecran
   La card s'adapte donc continument a la resolution. */
.signin-card {
    width: 100%;
    max-width: clamp(360px, 45vw, 680px);
    background: #fff;
    border: 1px solid #E7ECF2;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 70, 67, 0.08);
    overflow: hidden;
}

/* ---------- Header de la card : logo + brand ---------- */
.signin-card__header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 28px 40px;
    border-bottom: 1px solid #E7ECF2;
    background: #004643;
    color: #fff;
}

.signin-card__logo {
    width: 32px;
    height: 32px;
    background: #97C63F;
    color: #004643;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: -0.3px;
    font-family: 'DM Sans', sans-serif;
    flex-shrink: 0;
}

.signin-card__brand {
    font-family: Georgia, serif;
    font-size: 18px;
    color: #fff;
    letter-spacing: -0.3px;
}

/* ---------- Corps de la card ---------- */
.signin-card__body {
    padding: 40px;
}

.signin-eyebrow {
    font-size: 11px;
    color: #5A6770;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    font-weight: 500;
    margin-bottom: 6px;
}

.signin-title {
    margin: 0;
    font-family: Georgia, serif;
    font-size: 26px;
    font-weight: 400;
    color: #004643;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.signin-subtitle {
    margin: 8px 0 0;
    font-size: 14px;
    color: #5A6770;
    line-height: 1.5;
}

/* ---------- Flash messages ---------- */
.signin-alert {
    margin: 20px 0 0;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.4;
    border: 1px solid transparent;
}

.signin-alert--danger {
    background: #FDF3F3;
    border-color: #E8B5B5;
    color: #B14545;
}

.signin-alert--success {
    background: #EAFAF0;
    border-color: #C5E5D3;
    color: #1E7B4A;
}

/* ---------- Formulaire ---------- */
.signin-form {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.signin-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.signin-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #004643;
    letter-spacing: 0.2px;
}

.signin-input-wrap {
    position: relative;
}

.signin-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #5A6770;
    font-size: 16px;
    pointer-events: none;
    line-height: 1;
}

.signin-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #E7ECF2;
    background: #fff;
    border-radius: 8px;
    padding: 11px 14px 11px 42px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: #004643;
    line-height: 1.3;
    margin: 0;
    height: auto;
    box-shadow: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.signin-input::placeholder {
    color: #8FA0AB;
}

.signin-input:focus,
.signin-input:focus-visible {
    outline: none;
    border-color: #004643;
    box-shadow: 0 0 0 3px rgba(0, 70, 67, 0.18);
}

/* ---------- Actions ---------- */
.signin-actions {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.signin-submit {
    width: 100%;
    border: 1px solid #004643;
    background: #004643;
    color: #fff !important;
    border-radius: 8px;
    padding: 12px 16px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    text-align: center;
    text-transform: none;
    letter-spacing: 0.2px;
    margin: 0;
    height: auto;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.signin-submit:hover {
    background: #003532;
    border-color: #003532;
    color: #fff !important;
}

.signin-submit:focus,
.signin-submit:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 70, 67, 0.18);
}

.signin-link {
    display: block;
    text-align: center;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    color: #5A6770 !important;
    text-decoration: none;
    padding: 4px 0;
    transition: color 0.15s ease;
}

.signin-link:hover {
    color: #004643 !important;
    text-decoration: underline;
}

/* ---------- Neutralise le body global pour cette page ---------- */
/* Sticky footer : body en flex column, footer poussé en bas via margin-top:auto.
   Garantit que le footer reste en bas de viewport meme si la signin-card est
   courte. */
body:has(.signin-page) {
    background: #E7ECF2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body:has(.signin-page) #footer {
    margin-top: auto;
}
