/* =============================================================================
    RESETS & BASE
    ============================================================================= */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

body {
    background-color: var(--color-bg-base);
    color: var(--color-text-primary);
    font-family: var(--font-body);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--color-text-primary);
    line-height: var(--leading-tight);
}

a { 
    color: inherit; 
    text-decoration: none; 
    transition: var(--transition-base); 
}

ul { 
    list-style: none; 
}

.container { 
    max-width: var(--container-lg); 
    margin: 0 auto; 
    padding: 0 var(--space-6); 
}

/* =============================================================================
    UI COMPONENTS
    ============================================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3) var(--space-8);
    border-radius: 6px;
    font-weight: var(--font-semibold);
    cursor: pointer;
    transition: all var(--transition-base);
    border: none;
    font-size: var(--text-sm);
    font-family: var(--font-display);
}

.btn-primary { 
    background: var(--color-gold-400); 
    color: var(--color-bg-base); 
}

.btn-primary:hover {
    background: var(--color-gold-300);
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

.btn-outline { 
    background: transparent; 
    border: 1px solid var(--color-border-strong); 
    color: var(--color-text-primary); 
}

.btn-outline:hover {
    background: var(--color-bg-surface);
    border-color: var(--color-gold-400);
}

.btn-outline:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--color-border-default);
    color: var(--color-text-secondary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--color-text-secondary);
    color: var(--color-text-primary);
}

.btn-secondary:active {
    transform: scale(0.98);
}

.btn-danger {
    background: var(--color-error);
    color: var(--color-text-primary);
}

.btn-danger:hover {
    background: var(--color-error-light);
    transform: translateY(-2px);
}

.btn-danger:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* =============================================================================
    SECTIONS — containers background/border
    ============================================================================= */
.section {
    background: var(--color-white-subtle);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    margin-bottom: var(--space-6);
}

.section__title {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.section__description {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-4);
}

.section__actions {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-4);
}

.section--danger {
    background: var(--color-error-surface);
    border-color: rgba(220, 50, 50, 0.2);
    margin-top: var(--space-8);
}

.section--danger .section__title {
    color: var(--color-error-light);
    opacity: 1;
}

/* =============================================================================
    FIELDS — label + value pairs
    ============================================================================= */
.field {
    padding: var(--space-4) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.field:last-child {
    border-bottom: none;
}

.field--row {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: var(--space-4);
    align-items: center;
}

.field__label {
    display: block;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    font-weight: var(--font-medium);
    margin-bottom: var(--space-2);
}

.field--row .field__label {
    margin-bottom: 0;
}

.field__value {
    font-size: var(--text-sm);
    color: var(--color-text-primary);
    word-break: break-word;
}

.field__value--empty {
    color: var(--color-text-muted);
    font-style: italic;
}

.field__helper {
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
    margin-top: var(--space-2);
    opacity: 0.7;
}

.field__input {
    width: 100%;
    max-width: 400px;
}

/* =============================================================================
    BADGES
    ============================================================================= */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
}

.badge--blue {
    background: var(--color-blue-surface);
    border: 1px solid rgba(94, 196, 232, 0.3);
    color: var(--color-blue-200);
}

.badge--success {
    background: var(--color-success-surface);
    border: 1px solid rgba(42, 107, 62, 0.3);
    color: var(--color-success-light);
}

.badge--warning {
    background: var(--color-warning-surface);
    border: 1px solid rgba(155, 106, 16, 0.3);
    color: var(--color-warning-light);
}

.badge--error {
    background: var(--color-error-surface);
    border: 1px solid rgba(139, 32, 32, 0.3);
    color: var(--color-error-light);
}

/* =============================================================================
    SAVE ZONE — sticky footer with status + buttons
    ============================================================================= */
.save-zone {
    position: sticky;
    bottom: 0;
    background: linear-gradient(to top, var(--color-bg-base), transparent);
    padding: var(--space-6) 0;
    margin-top: var(--space-8);
    border-top: 1px solid var(--color-border-subtle);
    display: flex;
    gap: var(--space-4);
    align-items: center;
    justify-content: space-between;
}

.save-zone__status {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.save-zone__status--unsaved {
    color: var(--color-warning-light);
    font-weight: var(--font-medium);
}

.save-zone__status--saved {
    color: var(--color-success-light);
    font-weight: var(--font-medium);
}

.save-zone__buttons {
    display: flex;
    gap: var(--space-3);
}

/* =============================================================================
    CARDS
    ============================================================================= */
.card {
    background: linear-gradient(135deg, var(--color-bg-elevated) 0%, var(--color-bg-card) 100%);
    border: 1px solid var(--color-gold-400);
    padding: var(--space-10);
    clip-path: polygon(0 30px, 30px 0, 100% 0, 100% calc(100% - 30px), calc(100% - 30px) 100%, 0 100%);
    box-shadow:
        inset 0 0 20px rgba(200, 155, 60, 0.1),
        0 0 30px rgba(43, 158, 212, 0.25),
        0 0 50px rgba(43, 158, 212, 0.1),
        0 4px 20px rgba(0, 0, 0, 0.6);
}

.card h1,
.card h2 {
    text-align: center;
    margin-bottom: var(--space-8);
    font-size: var(--text-2xl);
}


/* =============================================================================
    LINKS
    ============================================================================= */
a {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    transition: var(--transition-base);
}

a:hover {
    color: var(--color-text-link-hover);
}

a:active {
    opacity: 0.8;
}

/* =============================================================================
    FORMS
    ============================================================================= */

/* Form Group — wrapper pour label + input + hint/error */
.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: var(--space-6);
    gap: var(--space-2);
}

/* Labels */
label {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    cursor: pointer;
}

label.required::after {
    content: ' *';
    color: var(--color-error-light);
}

/* Input fields — text, email, password, url, etc */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="search"],
textarea,
select {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border-default);
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    transition: all var(--transition-base);
    line-height: 1.5;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="url"]::placeholder,
input[type="tel"]::placeholder,
input[type="number"]::placeholder,
input[type="date"]::placeholder,
input[type="time"]::placeholder,
input[type="search"]::placeholder,
textarea::placeholder {
    color: var(--color-text-muted);
    opacity: 0.7;
}

/* Focus state */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="url"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-text-link);
    background-color: var(--color-bg-elevated);
    box-shadow: 0 0 0 3px rgba(43, 158, 212, 0.15);
}

/* Disabled state */
input:disabled,
textarea:disabled,
select:disabled {
    background-color: var(--color-bg-surface);
    color: var(--color-text-muted);
    cursor: not-allowed;
    opacity: 0.6;
    border-color: var(--color-border-subtle);
}

/* Valid state */
input:valid,
textarea:valid,
select:valid {
    border-color: var(--color-success);
}

/* Invalid state */
input:invalid,
textarea:invalid,
select:invalid {
    border-color: var(--color-error);
}

/* Textarea specific */
textarea {
    resize: vertical;
    min-height: 120px;
    font-family: var(--font-body);
}

/* Select dropdown */
select {
    appearance: none;
    padding-right: var(--space-8);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%232b9ed4' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-4) center;
    background-size: 12px;
    cursor: pointer;
}

select::-ms-expand {
    display: none;
}

/* Checkbox & Radio */
input[type="checkbox"],
input[type="radio"] {
    width: auto;
    padding: 0;
    margin-right: var(--space-2);
    cursor: pointer;
    accent-color: var(--color-gold-400);
}

/* Checkbox & Radio wrapper (form-check) */
.form-check {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    margin-right: 0;
}

.form-check label {
    margin-bottom: 0;
    font-weight: var(--font-regular);
    cursor: pointer;
}

/* Submit button */
input[type="submit"],
input[type="reset"],
input[type="button"],
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3) var(--space-8);
    border-radius: var(--radius-md);
    font-weight: var(--font-semibold);
    cursor: pointer;
    transition: all var(--transition-base);
    border: none;
    font-size: var(--text-sm);
    font-family: var(--font-display);
    background: var(--color-gold-400);
    color: var(--color-bg-base);
}

input[type="submit"]:hover,
input[type="reset"]:hover,
input[type="button"]:hover,
button:hover {
    background: var(--color-gold-300);
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

input[type="submit"]:active,
input[type="reset"]:active,
input[type="button"]:active,
button:active {
    transform: translateY(0);
}

input[type="submit"]:disabled,
input[type="reset"]:disabled,
input[type="button"]:disabled,
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Form validation messages */
.form-error {
    font-size: var(--text-xs);
    color: var(--color-error-light);
    margin-top: var(--space-1);
}

.form-success {
    font-size: var(--text-xs);
    color: var(--color-success-light);
    margin-top: var(--space-1);
}

.form-hint {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-top: var(--space-1);
    font-weight: var(--font-light);
}

/* Form container */
form {
    width: 100%;
}

/* Fieldset */
fieldset {
    border: none;
    padding: 0;
    margin: 0;
    margin-bottom: var(--space-6);
}

fieldset legend {
    font-size: var(--text-md);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-4);
    font-family: var(--font-display);
}

/* =============================================================================
    PAGE SECTIONS
    ============================================================================= */
.page-section {
    padding-top: var(--space-16);
    padding-bottom: var(--space-16);
}

.page-section--tall {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.page-section--alt {
    background: linear-gradient(135deg, rgba(7, 14, 26, 0.85) 0%, rgba(13, 22, 38, 0.85) 100%);    
}

.page-section__header {
    text-align: center;
    margin-bottom: var(--space-12);
}

.page-section__title {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--color-text-primary);
    font-family: var(--font-display);
    margin-bottom: var(--space-4);
    position: relative;
    padding-bottom: var(--space-4);
}

.page-section__title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--color-gold-400) 20%, var(--color-gold-400) 80%, transparent 100%);
}

.page-section__subtitle {
    font-size: var(--text-base);
    color: var(--color-text-secondary);
    font-weight: var(--font-light);
    line-height: var(--leading-relaxed);
    max-width: 560px;
    margin: 0 auto;
}

.page-section__cta-row {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--space-8);
}

/* =============================================================================
    DIVIDERS
    ============================================================================= */
.divider--gold {
    height: 1px;
    border: none;
    background: linear-gradient(90deg, transparent 0%, var(--color-border-gold) 30%, var(--color-border-gold) 70%, transparent 100%);
}

/* =============================================================================
   SCROLL REVEAL
   ============================================================================= */

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition:
        opacity 600ms var(--ease-out-expo),
        transform 600ms var(--ease-out-expo);
}

.reveal--visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal--delay-1 { transition-delay: 80ms; }
.reveal--delay-2 { transition-delay: 160ms; }
.reveal--delay-3 { transition-delay: 240ms; }
.reveal--delay-4 { transition-delay: 320ms; }
.reveal--delay-5 { transition-delay: 400ms; }
.reveal--delay-6 { transition-delay: 480ms; }

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* =============================================================================
   STICKY SPLIT LAYOUT
   ============================================================================= */
.sticky-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    align-items: start;
}

.sticky-split__pin {
    position: sticky;
    top: 50vh;
    transform: translateY(-50%);
}

.sticky-split__flow {
    padding: var(--space-8) 0;
}

@media (max-width: 768px) {
    .sticky-split {
        grid-template-columns: 1fr;
    }

    .sticky-split__pin {
        position: static;
        transform: none;
        margin-bottom: var(--space-8);
    }
}
