* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    width: 100%;
    min-height: 100vh;
    background: var(--color-background, #fdf7f8);
    color: var(--color-text, #1d1d1d);
}

body.auth-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    row-gap: 24px;
}

a {
    color: inherit;
}

header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px 24px;
    width: 100%;
    max-width: 520px;
    height: auto;
    background: var(--color-surface);
    border-radius: 24px;
    /*box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);*/
    margin-bottom: 0;
    position: relative;
}

/* Empêche la règle globale "header { height: 20px }" (navbar site) de
   s'appliquer aux pages d'authentification, qui réutilisent <header>
   pour la carte du logo. */
body.auth-page header {
    height: auto !important;
}

body.auth-page{
  margin-top: 5px;
}

/* make header a positioning context for the centered return button */
header { position: relative; }

.logo-link {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--color-text);
    font-weight: 700;
    text-align: center;
    max-width: 100%;
}

.logo-link img {
    width: 56px;
    height: auto;
    display: block;
}

.logo-text {
    display: block;
    font-size: 1.25rem;
    line-height: 1.05;
    letter-spacing: 0.18em;
    color: var(--color-accent);
    font-weight: 900;
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

/* Circular badge around the logo image */
.logo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--color-surface-strong, rgba(255,255,255,0.06));
    border: 1px solid var(--color-border);
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}
.logo-badge img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    display: block;
}

.contenue {
    width: 100%;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

section.ensemble {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 0;
}

section.ensemble .container,
.box {
    width: 100%;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 24px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
    padding: 34px 30px;
    /*margin-top : 20px;*/
}

.container {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

h3,
h1 {
    margin: 0;
    color: var(--color-text);
}

h3 {
    font-size: 2rem;
    font-weight: 700;
}

h1 {
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--color-accent);
}

.texte,
.box p {
    color: var(--color-muted);
    line-height: 1.6;
    font-size: 1rem;
}

.texte {
    margin-top: 4px;
}

.labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
}

.labels span {
    color: var(--color-muted);
    font-size: 0.9rem;
}

.input-wrapper,
.password-wrapper {
    display: block;
    width: 100%;
}

.input-wrapper input,
.password-wrapper input {
    width: 100%;
    min-height: 50px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-wrapper input:focus,
.password-wrapper input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 4px rgba(232, 118, 132, 0.14);
}

.password-wrapper {
    position: relative;
}

.password-wrapper .password-icon {
    position: absolute;
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--color-muted);
    cursor: pointer;
}

.password-wrapper .password-icon:hover {
    color: var(--color-accent);
}

.password-wrapper .password-icon .feather-eye-off {
    display: none;
}

.send,
.btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 18px;
    margin-top: 18px;
    border: none;
    border-radius: 14px;
    background: var(--color-accent);
    color: var(--color-text-inverse);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.send:hover,
.btn:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}

.btn-secondary {
    width: auto;
    min-width: 180px;
    padding: 12px 20px;
    margin: 22px auto 0;
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.btn-secondary i {
    margin-right: 10px;
    font-size: 0.95rem;
}

/* Small round return button used in password reset footer */
.btn-return {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
    background: var(--color-surface-strong, rgba(255,255,255,0.06));
    border: 1px solid var(--color-border);
    color: var(--color-text);
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}
.btn-return i {
    font-size: 1.05rem;
}
.btn-return:hover {
    transform: translateY(-2px);
    opacity: 0.95;
    box-shadow: 0 10px 22px rgba(0,0,0,0.12);
}

/* center the return button inside its header area */
.header .btn-return {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

/* preserve centered hover movement */
.header .btn-return:hover {
    transform: translate(-50%, -52%);
    opacity: 0.95;
    box-shadow: 0 10px 22px rgba(0,0,0,0.12);
}

.auth-footer {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 12px 0 24px;
}

.forgot-password {
    display: block;
    margin-top: 8px;
    color: var(--color-accent-strong);
    font-size: 0.95rem;
}

.erreur {
    display: block;
    margin-top: 16px;
    color: var(--color-danger);
    font-weight: 700;
}

html.theme-dark header,
html.theme-dark section.ensemble .container,
html.theme-dark .contenue,
html.theme-dark .box {
    background: var(--color-surface);
    color: var(--color-text);
}

html.theme-dark .logo-link {
    color: var(--color-text);
}

html.theme-dark .logo-badge {
    background: var(--color-surface-strong);
    border-color: var(--color-border);
}

html.theme-dark .password-wrapper .password-icon {
    color: var(--color-muted);
}

html.theme-dark .password-wrapper .password-icon:hover {
    color: var(--color-accent);
}

html.theme-dark .btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
}

.compte {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    color: var(--color-muted);
    font-size: 0.95rem;
}

.compte a {
    color: var(--color-accent);
    font-weight: 700;
}

.loader {
    margin: 30px auto;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 6px solid var(--color-surface-strong);
    border-top: 6px solid var(--color-accent);
    animation: spin 0.8s linear infinite;
}

.auth-actions {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.auth-actions .btn {
    max-width: 240px;
}

img.ime {
    display: none;
    max-width: 180px;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media screen and (max-width: 900px) {
    section.ensemble {
        padding: 0;
        flex-direction: column;
    }

    section.ensemble .container,
    .box {
        padding: 28px 22px;
        /*margin-top: 50px;*/
    }
}

@media screen and (max-width: 425px) {
    header {
        padding: 18px 14px;
    }

    .logo-link {
        gap: 8px;
    }

    .logo-text {
        font-size: 1.35rem;
        letter-spacing: 0.2em;
    }

    .contenue {
        padding: 0 8px;
    }

    /* smaller badge on mobile */
    .logo-badge {
        width: 64px;
        height: 64px;
    }
    .logo-badge img {
        width: 40px;
        height: 40px;
    }

    /* slightly smaller centered return button on mobile */
    .header .btn-return {
        top: 50%;
        transform: translate(-50%, -50%);
        width: 44px;
        height: 44px;
    }

    h3 {
        font-size: 1.75rem;
    }

    h1 {
        font-size: 2.1rem;
    }

    .send,
    .btn {
        font-size: 0.95rem;
    }

    .compte {
        flex-direction: column;
        align-items: flex-start;
    }
}

.input-wrapper input {
  font-size: 1em;
  color: var(--color-text);
  background: var(--color-surface);
  padding: 1rem 1.2rem;
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--color-border);
  transition: all 0.2s;
  box-sizing: border-box;
}



.password-wrapper .password-icon {
  display: flex;
  align-items: center;
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  width: 20px;
  color: #7a7a7a;
  transition: all 0.2s;
}

.password-wrapper .password-icon:hover {
  cursor: pointer;
  color: #ff4754;
}

.password-wrapper .password-icon .feather-eye-off {
  display: none;
}
/* MDP FIELD */