:root {
    color-scheme: dark;
    font-family: "Segoe UI", Aptos, Arial, sans-serif;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    background: #171713;
    color: #f8f2e5;
}

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

html {
    min-width: 320px;
    background: #171713;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    background: #171713;
    color: #f8f2e5;
    font-family: "Segoe UI", Aptos, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
    font: inherit;
}

a {
    color: #f4b72b;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #68a85e;
}

.invalid {
    outline: 1px solid #e05d4f;
}

.validation-message,
.text-danger {
    color: #ff8a7c;
}

.blazor-error-boundary {
    margin: 1rem 0;
    padding: 1rem 1rem 1rem 3.7rem;
    border: 1px solid rgba(255, 125, 110, 0.4);
    border-radius: 12px;
    background: #411f1b;
    color: white;
}

.blazor-error-boundary::after {
    content: "Une erreur est survenue.";
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: #8f8a80;
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Base simple pour les futurs écrans et les pages Identity du template. */
input.form-control,
select.form-control,
textarea.form-control {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    outline: none;
    background: #26251f;
    color: #fffaf0;
}

input.form-control:focus,
select.form-control:focus,
textarea.form-control:focus {
    border-color: rgba(244, 183, 43, 0.72);
    box-shadow: 0 0 0 3px rgba(244, 183, 43, 0.09);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 1rem;
    border: 0;
    border-radius: 10px;
    text-decoration: none;
    cursor: pointer;
}

.btn-primary {
    background: #f4b72b;
    color: #211f19;
    font-weight: 800;
}

.btn-link {
    background: transparent;
    color: #ffd664;
}

.w-100 {
    width: 100%;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mx-auto {
    margin-inline: auto;
}

.d-flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

.text-secondary {
    color: #aaa395;
}

hr {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* --------------------------------------------------------------------------
   Comptes utilisateurs
   -------------------------------------------------------------------------- */
.account-page {
    width: min(980px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.72fr);
    gap: 1.25rem;
    align-items: stretch;
}

.account-card,
.account-side-card,
.manage-nav-card,
.manage-content-card {
    border: 1px solid rgba(255, 214, 100, 0.12);
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(42, 41, 34, 0.98), rgba(31, 30, 25, 0.98));
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.22);
}

.account-card {
    padding: clamp(1.5rem, 4vw, 2.5rem);
}

.account-card-kicker,
.manage-section-heading > span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.55rem;
    color: #f4b72b;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.account-card h1,
.manage-heading h1 {
    margin: 0;
    color: #fff7e5;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 5vw, 3.15rem);
    line-height: 1;
    letter-spacing: -0.045em;
}

.account-intro,
.manage-heading p,
.manage-section-heading p,
.account-side-card p,
.profile-info-box p {
    color: #aca598;
    line-height: 1.65;
}

.account-intro {
    max-width: 34rem;
    margin: 0.8rem 0 1.7rem;
}

.account-form {
    display: grid;
    gap: 1rem;
}

.account-field {
    display: grid;
    gap: 0.45rem;
}

.account-field label {
    color: #e8e0d1;
    font-size: 0.82rem;
    font-weight: 800;
}

.account-field .form-control {
    min-height: 50px;
    padding: 0 0.9rem;
    border-radius: 12px;
    background: #22211c;
}

.account-check {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: #bdb5a6;
    font-size: 0.84rem;
    cursor: pointer;
}

.account-check input {
    width: 17px;
    height: 17px;
    accent-color: #f4b72b;
}

.account-submit {
    min-height: 50px;
    margin-top: 0.25rem;
    border-radius: 12px;
    font-size: 0.92rem;
}

.account-submit:hover {
    background: #ffd05a;
}

.account-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    padding-top: 0.55rem;
    color: #8f897e;
    font-size: 0.83rem;
}

.account-links a {
    color: #ffd664;
    font-weight: 800;
    text-decoration: none;
}

.account-links a:hover {
    text-decoration: underline;
}

.account-external-section {
    margin-top: 1.2rem;
}

.account-external-separator {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
    color: #827c72;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.account-external-separator::before,
.account-external-separator::after {
    content: "";
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

.account-google-form {
    margin: 0;
}

.account-google-button {
    width: 100%;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0 1rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    background: #fff;
    color: #24211b;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 850;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
    transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.account-google-button:hover {
    transform: translateY(-1px);
    background: #f8f8f8;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

.account-google-logo {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.account-google-logo svg {
    width: 22px;
    height: 22px;
    display: block;
}

.account-password-note {
    margin: -0.2rem 0 0;
    color: #898378;
    font-size: 0.76rem;
    line-height: 1.5;
}

.account-validation {
    margin: 0;
    padding: 0.7rem 0.85rem;
    border: 1px solid rgba(255, 138, 124, 0.25);
    border-radius: 10px;
    background: rgba(224, 93, 79, 0.08);
    font-size: 0.8rem;
}

.account-validation:empty {
    display: none;
}

.account-side-card {
    position: relative;
    overflow: hidden;
    padding: clamp(1.4rem, 3vw, 2rem);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 390px;
    background:
        radial-gradient(circle at 80% 12%, rgba(255, 214, 100, 0.16), transparent 13rem),
        linear-gradient(150deg, #2f2d24 0%, #201f1a 70%);
}

.account-side-card::before {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    top: -90px;
    right: -65px;
    border: 1px solid rgba(255, 214, 100, 0.13);
    border-radius: 50%;
    box-shadow: 0 0 0 34px rgba(255, 214, 100, 0.025), 0 0 0 68px rgba(255, 214, 100, 0.018);
}

.account-side-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    margin-bottom: auto;
    border-radius: 14px;
    background: #f4b72b;
    color: #211f19;
    font-size: 1.25rem;
    font-weight: 900;
}

.account-side-card h2 {
    position: relative;
    margin: 0;
    color: #fff5df;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.55rem;
    line-height: 1.12;
}

.account-side-card p {
    position: relative;
    margin-bottom: 0;
    font-size: 0.9rem;
}

.manage-page {
    width: min(1050px, 100%);
    margin: 0 auto;
}

.manage-heading {
    margin-bottom: 1.5rem;
}

.manage-heading p {
    margin: 0.7rem 0 0;
}

.manage-grid {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.manage-nav-card {
    padding: 0.6rem;
}

.manage-nav {
    display: grid;
    gap: 0.25rem;
}

.manage-nav-link {
    min-height: 46px;
    display: grid;
    grid-template-columns: 28px 1fr;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.65rem;
    border-radius: 11px;
    color: #d8d0c2;
    text-decoration: none;
    font-size: 0.86rem;
}

.manage-nav-link span {
    color: #f4b72b;
    text-align: center;
}

.manage-nav-link:hover,
.manage-nav-link.active {
    background: rgba(244, 183, 43, 0.1);
    color: #fff7e5;
}

.manage-content-card {
    min-height: 320px;
    padding: clamp(1.3rem, 3vw, 2rem);
}

.manage-section-heading h2 {
    margin: 0;
    color: #fff7e5;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.75rem;
}

.manage-section-heading p {
    margin: 0.55rem 0 1.35rem;
    font-size: 0.88rem;
}

.profile-summary {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    background: #22211c;
}

.profile-avatar {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 14px;
    background: #f4b72b;
    color: #211f19;
    font-size: 1.1rem;
    font-weight: 900;
}

.profile-summary small,
.profile-summary strong {
    display: block;
}

.profile-summary small {
    margin-bottom: 0.18rem;
    color: #8f897e;
    font-size: 0.72rem;
}

.profile-summary strong {
    color: #fff6e1;
    word-break: break-word;
}

.profile-info-box {
    margin-top: 1rem;
    padding: 1rem;
    border-left: 3px solid #f4b72b;
    border-radius: 0 12px 12px 0;
    background: rgba(244, 183, 43, 0.055);
}

.profile-info-box strong {
    color: #f4b72b;
}

.profile-info-box p {
    margin: 0.4rem 0 0;
    font-size: 0.84rem;
}

.compact-form {
    max-width: 560px;
}

@media (max-width: 820px) {
    .account-page,
    .manage-grid {
        grid-template-columns: 1fr;
    }

    .account-side-card {
        min-height: 250px;
    }

    .manage-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .manage-nav-link {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }
}

@media (max-width: 520px) {
    .account-card,
    .account-side-card,
    .manage-content-card {
        border-radius: 17px;
    }

    .manage-nav {
        grid-template-columns: 1fr;
    }

    .manage-nav-link {
        grid-template-columns: 28px 1fr;
        justify-items: stretch;
        text-align: left;
    }
}

.alert {
    margin: 0 0 1rem;
    padding: 0.8rem 0.95rem;
    border-radius: 11px;
    font-size: 0.84rem;
    line-height: 1.45;
}

.alert-danger {
    border: 1px solid rgba(255, 138, 124, 0.28);
    background: rgba(224, 93, 79, 0.09);
    color: #ffb0a6;
}

.alert-success {
    border: 1px solid rgba(117, 185, 101, 0.25);
    background: rgba(104, 168, 94, 0.08);
    color: #a9d99d;
}
