:root {
    --brand-blue: #075fc7;
    --brand-cyan: #00b8e8;
    --brand-soft: #eaf4ff;
    --text-color: #0d1c2e;
    --text-muted: #607086;
    --surface-muted: #f4f7fa;
    --border-color: #dfe7ef;
    --container-width: 1240px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    background: #fff;
    color: var(--text-color);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

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

img {
    max-width: 100%;
}

.site-container {
    width: min(calc(100% - 3rem), var(--container-width));
    margin-inline: auto;
}

.narrow-container {
    max-width: 940px;
}

.button-primary,
.button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 1.35rem;
    border-radius: 999px;
    font-size: 0.93rem;
    font-weight: 800;
    text-decoration: none;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button-primary {
    background: linear-gradient(105deg, var(--brand-blue), #037dd2);
    color: #fff;
    box-shadow: 0 12px 28px rgba(0, 87, 194, 0.2);
}

.button-primary:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(0, 87, 194, 0.26);
}

.button-secondary {
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--text-color);
}

.button-secondary:hover {
    color: var(--brand-blue);
    transform: translateY(-2px);
}

.page-hero {
    padding: 6rem 0 4.5rem;
    background:
        radial-gradient(circle at 85% 10%, rgba(0, 181, 255, 0.12), transparent 23rem),
        #f7fbff;
}

.page-eyebrow {
    margin: 0 0 1rem;
    color: var(--brand-blue);
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(2.7rem, 6vw, 4.5rem);
    line-height: 1.03;
    letter-spacing: -0.05em;
}

.page-hero p:last-child {
    max-width: 760px;
    margin: 1.6rem 0 0;
    color: var(--text-muted);
    font-size: 1.12rem;
    line-height: 1.75;
}

.content-section {
    padding: 4.5rem 0 6rem;
}

.placeholder-card {
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 20px 55px rgba(8, 38, 73, 0.07);
}

.placeholder-card h2 {
    margin: 0;
    font-size: 1.55rem;
}

.placeholder-card p {
    margin: 0.9rem 0 0;
    color: var(--text-muted);
    line-height: 1.7;
}

h1:focus {
    outline: none;
}

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

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

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: #fff;
}

.blazor-error-boundary::after {
    content: "Une erreur inattendue s'est produite.";
}

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

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

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

@media (max-width: 680px) {
    .site-container {
        width: min(calc(100% - 2rem), var(--container-width));
    }

    .page-hero {
        padding: 4rem 0 3rem;
    }
}

/* Shared forms and account pages */
.account-page {
    min-height: 680px;
    padding: 5.5rem 0 6.5rem;
    background:
        radial-gradient(circle at 82% 14%, rgba(0, 184, 232, 0.13), transparent 25rem),
        linear-gradient(180deg, #f6faff 0%, #ffffff 72%);
}

.account-container {
    max-width: 620px;
}

.account-card,
.form-card {
    border: 1px solid var(--border-color);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 26px 70px rgba(7, 40, 78, 0.1);
}

.account-card {
    padding: clamp(2rem, 5vw, 3.4rem);
}

.account-card-compact {
    max-width: 560px;
    margin-inline: auto;
}

.form-card {
    padding: clamp(1.7rem, 4vw, 3rem);
}

.account-heading {
    margin-bottom: 2rem;
}

.account-heading h1 {
    margin: 0;
    font-size: clamp(2.2rem, 6vw, 3.4rem);
    line-height: 1.02;
    letter-spacing: -0.045em;
}

.account-heading > p:last-child {
    margin: 1rem 0 0;
    color: var(--text-muted);
    line-height: 1.7;
}

.site-form {
    display: grid;
    gap: 1.25rem;
}

.form-grid {
    display: grid;
    align-items: start;
    gap: 1.25rem;
}

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

.form-field {
    display: grid;
    gap: 0.48rem;
}

.form-field label {
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 750;
}

.optional {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 550;
}

.form-field input,
.form-field textarea,
.form-field select {
    width: 100%;
    min-height: 50px;
    border: 1px solid #cad7e4;
    border-radius: 12px;
    background: #fff;
    color: var(--text-color);
    outline: none;
    padding: 0.78rem 0.9rem;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.form-field textarea {
    min-height: 130px;
    resize: vertical;
    line-height: 1.55;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 4px rgba(7, 95, 199, 0.1);
}

.form-field input:disabled {
    background: var(--surface-muted);
    color: var(--text-muted);
}

.field-hint {
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.5;
}

.check-field {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    width: fit-content;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
}

.check-field input {
    width: 17px;
    height: 17px;
}

.form-submit {
    border: 0;
    cursor: pointer;
}

.site-form > .form-submit {
    width: 100%;
}

.account-links {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.25rem;
    font-size: 0.9rem;
}

.account-links.single-link {
    justify-content: center;
}

.account-links a,
.text-link {
    color: var(--brand-blue);
    font-weight: 700;
    text-decoration: none;
}

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

.account-separator {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin: 1.75rem 0;
    color: #8390a1;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.account-separator::before,
.account-separator::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

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

.google-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    min-height: 50px;
    border: 1px solid #cfd9e4;
    border-radius: 999px;
    background: #fff;
    color: var(--text-color);
    font-weight: 750;
    cursor: pointer;
    transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.google-button:hover {
    border-color: #aebdce;
    box-shadow: 0 8px 24px rgba(8, 38, 73, 0.08);
    transform: translateY(-1px);
}

.google-mark {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: #3158a7;
    font-weight: 850;
}

.form-alert {
    margin-bottom: 1.4rem;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.55;
}

.form-alert-error {
    border: 1px solid #f1c1c1;
    background: #fff4f4;
    color: #9d2424;
}

.form-alert-success {
    border: 1px solid #b9dfce;
    background: #f0fbf6;
    color: #176943;
}

.validation-message {
    color: #b32121;
    font-size: 0.8rem;
}

.form-field .invalid {
    border-color: #d83b3b;
    outline: none;
}

.form-field .valid.modified:not([type=checkbox]) {
    outline: none;
}

.form-actions-row,
.project-submit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-top: 0.3rem;
}

.form-actions-row .form-submit,
.project-submit-row .form-submit {
    width: auto;
    flex: 0 0 auto;
}

.form-section-title {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    margin-top: 1rem;
    padding-top: 1.9rem;
    border-top: 1px solid var(--border-color);
}

.form-section-title:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.form-section-title > span {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand-blue);
    font-size: 0.85rem;
    font-weight: 850;
}

.form-section-title h2 {
    margin: 0;
    font-size: 1.05rem;
}

.form-section-title p,
.project-submit-row p {
    margin: 0.25rem 0 0;
    color: var(--text-muted);
    font-size: 0.86rem;
    line-height: 1.5;
}

.project-submit-row {
    margin-top: 0.8rem;
    padding: 1.2rem;
    border-radius: 15px;
    background: var(--surface-muted);
}

.project-submit-row strong {
    font-size: 0.9rem;
}

.spam-trap {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.account-profile-hero {
    padding-bottom: 3.5rem;
}

.account-profile-section {
    padding-top: 3.5rem;
}

@media (max-width: 720px) {
    .account-page {
        min-height: 0;
        padding: 3rem 0 4rem;
    }

    .form-grid.two-columns {
        grid-template-columns: 1fr;
    }

    .account-links,
    .form-actions-row,
    .project-submit-row {
        flex-direction: column;
        align-items: stretch;
    }

    .form-actions-row .form-submit,
    .project-submit-row .form-submit {
        width: 100%;
    }
}

/* Administration */
.admin-module-page {
    min-height: 680px;
    padding-bottom: 6rem;
    background: #f7faff;
}

.admin-action-bar {
    position: sticky;
    top: 82px;
    z-index: 40;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 8px 24px rgba(8, 38, 73, 0.05);
    backdrop-filter: blur(14px);
}

.admin-action-bar-inner {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.admin-actions {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.admin-back-link,
.admin-danger-link {
    font-size: 0.9rem;
    font-weight: 750;
    text-decoration: none;
}

.admin-back-link {
    color: var(--text-muted);
}

.admin-back-link:hover {
    color: var(--brand-blue);
}

.admin-danger-link {
    color: #a52b2b;
}

.admin-danger-link:hover {
    color: #7f1e1e;
    text-decoration: underline;
}

.admin-action-button {
    min-height: 42px;
    padding-inline: 1.05rem;
    cursor: pointer;
}

.admin-action-bar button.admin-action-button {
    border: 0;
}

.button-danger {
    display: inline-flex;
    border: 0;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #b72f2f;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 800;
}

.button-danger:hover {
    background: #962323;
}

.admin-module-content {
    padding-top: 3.4rem;
}

.admin-module-heading {
    max-width: 780px;
    margin-bottom: 2rem;
}

.admin-module-heading h1 {
    margin: 0;
    font-size: clamp(2.25rem, 5vw, 3.55rem);
    line-height: 1.05;
    letter-spacing: -0.045em;
}

.admin-module-heading > p:last-child {
    margin: 1rem 0 0;
    color: var(--text-muted);
    line-height: 1.7;
}

.admin-list-card {
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 14px 42px rgba(8, 38, 73, 0.05);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    vertical-align: middle;
}

.admin-table th {
    background: #f5f8fb;
    color: #44546a;
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.admin-table tbody tr:last-child td {
    border-bottom: 0;
}

.admin-table tbody tr:hover {
    background: #fbfdff;
}

.admin-table .order-column {
    width: 100px;
    text-align: center;
}

.admin-table .visibility-column {
    width: 120px;
    text-align: center;
}

.admin-record-link {
    color: var(--text-color);
    font-weight: 780;
    text-decoration: none;
}

.admin-record-link:hover {
    color: var(--brand-blue);
    text-decoration: underline;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    padding: 0.32rem 0.55rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
}

.status-visible {
    background: #eaf8f0;
    color: #197044;
}

.status-hidden {
    background: #eef1f4;
    color: #68778a;
}

.admin-empty-cell {
    padding: 2.5rem !important;
    color: var(--text-muted);
    text-align: center !important;
}

.admin-checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--surface-muted);
    cursor: pointer;
}

.admin-checkbox-row input {
    width: 18px;
    height: 18px;
    margin-top: 0.15rem;
}

.admin-checkbox-row strong,
.admin-checkbox-row small {
    display: block;
}

.admin-checkbox-row small {
    margin-top: 0.25rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.admin-action-context {
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 800;
}

.admin-action-main {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 0.9rem;
}

.admin-action-status {
    min-width: 0;
    padding: 0.5rem 0.7rem;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.3;
}

.admin-action-status-success {
    border-color: #b9dfce;
    background: #f0fbf6;
    color: #176943;
}

.admin-action-status-error {
    border-color: #f1c1c1;
    background: #fff4f4;
    color: #9d2424;
}


@media (max-width: 1080px) {
    .admin-action-bar {
        top: 130px;
    }
}

@media (max-width: 720px) {
    .admin-action-bar {
        top: 0;
    }

    .admin-action-bar-inner {
        min-height: 62px;
        align-items: stretch;
        flex-direction: column;
        padding-block: 0.65rem;
    }

    .admin-action-main {
        align-items: stretch;
        flex-direction: column;
        gap: 0.45rem;
    }

    .admin-actions {
        flex-wrap: wrap;
    }

    .admin-module-content {
        padding-top: 2.4rem;
    }

    .admin-table th,
    .admin-table td {
        padding: 0.85rem 0.75rem;
    }

    .admin-table .order-column {
        width: 70px;
    }

    .admin-table .visibility-column {
        width: 85px;
    }
}



/* Le formulaire de demande de projet est rendu en SSR statique : cette règle
   garde le libellé du téléphone synchronisé avec la case de rappel sans JS. */
.site-form:has(#project-callback:checked) label[for="project-phone"] .optional {
    display: none;
}

/* Public Static SSR forms: immediate submit feedback and double-submit protection. */
.js-submit-lock .form-submit.is-submitting {
    background: #8a96a5;
    box-shadow: none;
    transform: none;
    cursor: wait;
    pointer-events: none;
}

.js-submit-lock .form-submit.is-submitting::before {
    content: "";
    width: 16px;
    height: 16px;
    margin-right: 0.55rem;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: form-submit-spin 700ms linear infinite;
}

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

