/* Global styles - Gradient background vert pour toutes les pages */
body, .page-root {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f766e 0%, #047857 25%, #10b981 75%, #34d399 100%);
    background-attachment: fixed;
    margin: 0;
    padding: 0;
}

/* Variables CSS globales */
:root {
    --primary: #10b981;
    --primary-hover: #059669;
    --primary-light: #d1fae5;
    --secondary: #64748b;
    --secondary-hover: #475569;
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --error: #ef4444;
    --error-bg: #fef2f2;
    --error-border: #fecaca;
    --success: #10b981;
    --success-bg: #ecfdf5;
    --success-border: #bbf7d0;
    --radius: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
}

/* ===========================
   = Auth Pages Styles       =
   =========================== */

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
    padding: 2rem;
}

.auth-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 2.5rem;
    width: 100%;
    max-width: 450px;
}

.auth-card-large {
    max-width: 700px;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.auth-logo svg {
    width: 32px;
    height: 32px;
    color: white;
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.auth-subtitle {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.95rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ===========================
   = Form Elements           =
   =========================== */

.form-section {
    background: #f8fafc;
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 0.5rem;
}

.form-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1rem;
}

.form-section-title svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-input {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.form-input::placeholder {
    color: var(--text-muted);
}

/* Password input */
.password-input-wrapper {
    position: relative;
}

.password-input-wrapper .form-input {
    padding-right: 2.75rem;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: var(--text-muted);
    transition: color 0.2s;
}

.password-toggle:hover {
    color: var(--text-secondary);
}

.password-toggle svg {
    width: 20px;
    height: 20px;
}

/* Password strength indicator */
.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.strength-fill {
    height: 100%;
    width: 0;
    transition: width 0.3s, background-color 0.3s;
    border-radius: 3px;
}

.strength-text {
    font-size: 0.75rem;
    font-weight: 500;
}

.password-requirements {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem 1rem;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

@media (max-width: 640px) {
    .password-requirements {
        grid-template-columns: 1fr;
    }
}

.requirement {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.2s;
}

.requirement.fulfilled {
    color: var(--success);
}

.req-icon {
    font-size: 0.875rem;
}

.password-match {
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 0.25rem;
    min-height: 1.25rem;
}

.match-success {
    color: var(--success);
}

.match-error {
    color: var(--error);
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 0.25rem;
}

.form-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.consent-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-actions-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ===========================
   = Buttons                 =
   =========================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
}

.btn svg {
    width: 20px;
    height: 20px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, #047857 100%);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: var(--text-muted);
}

.btn-full {
    width: 100%;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-sm svg {
    width: 16px;
    height: 16px;
}

.mt-2 {
    margin-top: 0.5rem;
}

.ml-4 {
    margin-left: 1rem;
}

/* ===========================
   = Alerts                  =
   =========================== */

.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.alert svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.alert-error {
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    color: #991b1b;
}

.alert-error svg {
    color: var(--error);
}

.alert-success {
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    color: #166534;
}

.alert-success svg {
    color: var(--success);
}

/* ===========================
   = Links                   =
   =========================== */

.link-text {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.link-text:hover {
    text-decoration: underline;
}

