﻿: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-field .account-invitation-email {
    background: #302d22;
    border-color: rgba(244, 183, 43, 0.58);
    color: #f4e5bc;
    cursor: default;
}

.account-invitation-email-note {
    font-size: 0.78rem;
    color: #d2b76b;
}

.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;
}

/* Recuperation du mot de passe : lien discret, accessible au clavier. */
.account-forgot-row {
    display: flex;
    justify-content: flex-end;
    margin-top: -0.35rem;
    font-size: 0.82rem;
}

.account-forgot-row a {
    color: #ffd664;
    font-weight: 750;
    text-decoration: none;
}

.account-forgot-row a:hover,
.account-forgot-row a:focus-visible {
    text-decoration: underline;
}

.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-section--primary {
    margin: 0 0 1.25rem;
}

.account-external-section--primary .account-external-separator {
    margin-top: 1.15rem;
    margin-bottom: 0;
}

.account-google-hint,
.account-google-legal {
    margin: 0.6rem 0 0;
    color: #bdb5a6;
    font-size: 0.78rem;
    line-height: 1.5;
    text-align: center;
}

.account-google-legal {
    color: #a9a294;
    font-size: 0.72rem;
}

.account-google-legal a { color: #e9c96e; }

.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: .8rem .9rem;
    border: 1px solid rgba(255, 138, 124, .22);
    border-left: 3px solid rgba(255, 138, 124, .66);
    border-radius: 10px;
    background: rgba(224, 93, 79, .065);
    color: #f2c0b7;
    font-size: .8rem;
    line-height: 1.5;
}

.account-validation::before {
    content: "Quelques informations sont à corriger";
    display: block;
    margin-bottom: .35rem;
    color: #ffdbd3;
    font-weight: 800;
    font-size: .84rem;
}

.account-validation ul {
    margin: 0;
    padding-left: 1.2rem;
}

.account-validation li + li { margin-top: .18rem; }
.account-validation:empty,
.account-validation:has(ul:empty),
.account-validation.validation-summary-valid { display: none; }

/* Sur les formulaires de compte, une erreur est indiquée dans le récapitulatif
   et par un contour discret, sans répéter le message sous le champ. */
.account-form .account-field .form-control.invalid {
    outline: none;
    border-color: rgba(255, 138, 124, .7);
    box-shadow: 0 0 0 1px rgba(255, 138, 124, .2);
}

.account-form .account-field .form-control.valid.modified { outline: none; }
.account-form .account-legal-consent input.invalid {
    outline: 1px solid rgba(255, 138, 124, .7);
    outline-offset: 3px;
}

/* Le bouton ne modifie ni la valeur, ni le binding du champ de mot de passe. */
.cm-password-input { position: relative; display: block; width: 100%; }
.cm-password-input > input {
    width: 100%;
    padding-right: 3.25rem !important;
}
.cm-password-toggle {
    position: absolute;
    top: 50%;
    right: .55rem;
    transform: translateY(-50%);
    width: 2.35rem;
    height: 2.35rem;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #c5bca9;
    cursor: pointer;
}
.cm-password-toggle:hover { color: #ffcc63; background: rgba(244, 183, 43, .085); }
.cm-password-toggle:focus-visible { outline: 2px solid #f4b72b; outline-offset: 1px; }
.cm-password-toggle svg { width: 20px; height: 20px; display: block; pointer-events: none; }
.cm-password-toggle .cm-eye-off { display: none; }
.cm-password-toggle[aria-pressed="true"] .cm-eye-on { display: none; }
.cm-password-toggle[aria-pressed="true"] .cm-eye-off { display: block; }

/* Panneaux éditoriaux réservés aux écrans de connexion et d'inscription. */
.account-side-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-width: 0;
    min-height: 540px;
    overflow: hidden;
    padding: 0;
    background: linear-gradient(160deg, #33291f 0%, #241c18 54%, #1b1815 100%);
    isolation: isolate;
}

.account-side-illustration {
    position: relative;
    flex: 0 0 auto;
    height: clamp(260px, 31vw, 390px);
    overflow: hidden;
}

.account-side-illustration::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(30, 23, 19, 0.25) 78%, #211a17 100%);
    pointer-events: none;
}

.account-side-illustration img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 44%;
}

.account-side-card--register .account-side-illustration img {
    object-position: center 47%;
}

.account-side-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    flex: 1;
    padding: 0 clamp(1.3rem, 2.7vw, 2rem) clamp(1.5rem, 3vw, 2.2rem);
    margin-top: -0.4rem;
}

.account-side-card h2 {
    margin: 0;
    color: #fff0d2;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.45rem, 2.4vw, 2rem);
    line-height: 1.1;
    letter-spacing: -0.025em;
}

.account-side-card h2::after {
    content: "";
    display: block;
    width: 82px;
    height: 2px;
    margin: 0.75rem 0 1.15rem;
    border-radius: 10px;
    background: linear-gradient(90deg, #f4b72b, rgba(244, 183, 43, 0));
}

.account-side-benefits {
    display: grid;
    gap: clamp(0.9rem, 2vw, 1.2rem);
    margin: 0;
    padding: 0;
    list-style: none;
}

.account-side-benefits li {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    min-width: 0;
}

.account-side-benefit-icon {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    color: #f4b72b;
}

.account-side-benefit-icon svg {
    display: block;
    width: 26px;
    height: 26px;
}

.account-side-benefits strong,
.account-side-benefits small {
    display: block;
}

.account-side-benefits strong {
    color: #f6ebd6;
    font-size: 0.91rem;
    line-height: 1.35;
}

.account-side-benefits small {
    margin-top: 0.18rem;
    color: #c4b6a4;
    font-size: 0.8rem;
    line-height: 1.45;
}

.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: 0;
    }

    .account-side-illustration {
        height: clamp(240px, 45vw, 370px);
    }

    .account-side-content {
        padding-top: 0.25rem;
    }

    .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;
    }

    .account-side-illustration {
        height: 250px;
    }

    .account-side-benefits {
        gap: 0.9rem;
    }

    .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;
}

/* Consentement contractuel lors de l'inscription */
.account-legal-consent { display: flex; align-items: flex-start; gap: .65rem; font-size: .88rem; line-height: 1.5; cursor: pointer; }
.account-legal-consent input[type="checkbox"] { flex-shrink: 0; width: 1.12rem; height: 1.12rem; margin-top: .13rem; accent-color: #d99d24; }
.account-legal-consent a { color: #f3bc58; text-underline-offset: 2px; }
