/*
 * Solibox brand foundation — shared layout pass (Issue 14, first iteration).
 *
 * Colors below are a TEMPORARY approximation of L'Atelier du Courrier's visual identity,
 * eyeballed from reference screenshots (docs/Atelier du Courrier-Branding/). They are not
 * official brand values. Everything is centralized as CSS custom properties below so that
 * swapping in the official palette later only requires editing this :root block, not hunting
 * through Razor views.
 *
 * Typography uses a system font stack on purpose: no official Atelier typeface has been
 * confirmed, and no font is currently bundled in this project. --brand-font-heading is
 * isolated so a real webfont can be dropped in later without touching call sites.
 *
 * Scope of this pass: shared layout (navbar, login), and global Bootstrap component
 * overrides (buttons/cards/tables/links) that apply automatically everywhere. Individual
 * pages are not redesigned here.
 */

:root {
    /* --- Brand palette (temporary, approximated from screenshots) --- */
    --brand-navy: #0b2a4a;
    --brand-navy-dark: #081d33;
    --brand-blue: #1e73be;
    --brand-blue-light: #2d9cdb;
    --brand-nav-gradient: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-blue) 100%);
    --brand-blue-gradient: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue-light) 100%);

    --brand-orange: #f7941d;
    --brand-orange-dark: #f1592c;
    --brand-orange-gradient: linear-gradient(135deg, var(--brand-orange) 0%, var(--brand-orange-dark) 100%);

    /* --- Neutrals --- */
    --brand-surface: #ffffff;
    --brand-surface-muted: #f5f7fa;
    --brand-border: #e3e8ef;
    --brand-text: #1c1f26;
    --brand-text-muted: #6c7685;

    /* --- Typography (system stack until an official typeface is confirmed) --- */
    --brand-font-heading: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --brand-font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    /* --- Shape / elevation --- */
    --brand-radius: 0.5rem;
    --brand-radius-lg: 0.75rem;
    --brand-shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.08);
    --brand-shadow-md: 0 4px 16px rgba(16, 24, 40, 0.10);
}

/* --- Base --- */

body {
    background-color: var(--brand-surface-muted);
    font-family: var(--brand-font-body);
    color: var(--brand-text);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--brand-font-heading);
    font-weight: 700;
    color: var(--brand-navy);
}

a {
    color: var(--brand-blue);
}

a:hover,
a:focus {
    color: var(--brand-navy);
}

/* --- Navbar --- */

.brand-navbar {
    background: var(--brand-nav-gradient) !important;
}

.brand-wordmark {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-wordmark-primary {
    font-family: var(--brand-font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.02em;
    color: #ffffff;
}

.brand-wordmark-secondary {
    font-size: 0.7rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
}

/* --- Buttons ---
   Orange = the primary call-to-action of a screen.
   Blue   = normal / secondary actions.
   Success / danger / warning / info are left as Bootstrap defaults on purpose,
   since they carry operational status meaning (see CLAUDE.md / Issue 14 scope notes). */

.btn-primary {
    background: var(--brand-orange-gradient);
    border-color: var(--brand-orange-dark);
    color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background: var(--brand-orange-dark);
    border-color: var(--brand-orange-dark);
    color: #ffffff;
}

.btn-outline-primary {
    color: var(--brand-orange-dark);
    border-color: var(--brand-orange);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    background: var(--brand-orange-gradient);
    border-color: var(--brand-orange-dark);
    color: #ffffff;
}

.btn-secondary {
    background: var(--brand-blue-gradient);
    border-color: var(--brand-blue);
    color: #ffffff;
}

.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active {
    background: var(--brand-navy);
    border-color: var(--brand-navy);
    color: #ffffff;
}

.btn-outline-secondary {
    color: var(--brand-blue);
    border-color: var(--brand-blue);
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-secondary:active {
    background: var(--brand-blue-gradient);
    border-color: var(--brand-blue);
    color: #ffffff;
}

.btn {
    border-radius: var(--brand-radius);
}

/* --- Cards --- */

.card {
    border-color: var(--brand-border);
    border-radius: var(--brand-radius-lg);
    box-shadow: var(--brand-shadow-sm);
}

.card-header {
    background-color: var(--brand-surface);
    border-bottom-color: var(--brand-border);
    font-weight: 600;
}

/* --- Tables --- */

.table thead.table-light th {
    background-color: var(--brand-surface-muted);
    color: var(--brand-text);
}

/* --- Forms --- */

.form-control:focus,
.form-select:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 0.2rem rgba(30, 115, 190, 0.15);
}

/*
 * Required / optional field badges — established here for future, progressive adoption
 * on individual forms (not yet applied anywhere). Mirrors the "Requis" / "Facultatif"
 * pattern from the Atelier reference screenshots.
 */
.field-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.1rem 0.5rem;
    border-radius: 1rem;
    margin-left: 0.4rem;
    vertical-align: middle;
}

.field-badge-required {
    background-color: var(--brand-navy);
    color: #ffffff;
}

.field-badge-optional {
    background-color: var(--brand-border);
    color: var(--brand-text-muted);
}

/* --- Auth pages (login, etc.) --- */

.auth-card {
    max-width: 420px;
    margin: 3rem auto;
    background-color: var(--brand-surface);
    border: 1px solid var(--brand-border);
    border-radius: var(--brand-radius-lg);
    box-shadow: var(--brand-shadow-md);
    padding: 2rem;
}

.auth-card .brand-wordmark-primary {
    color: var(--brand-navy);
    font-size: 1.5rem;
}

.auth-card .brand-wordmark-secondary {
    color: var(--brand-text-muted);
}
