/* ================================================================
 * PNI - Design Système "Clinique"
 * Inspiré du design Claude : médical professionnel
 * Bleu profond + vert menthe rassurant
 * ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* ====== PALETTE CLINIQUE ====== */
    --primary: #0B6E8C;          /* Bleu profond médical */
    --primary-soft: #E6F2F6;     /* Soft background */
    --primary-dark: #08566D;
    --primary-light: #4A92AD;

    --accent: #10B5A0;           /* Vert menthe rassurant */
    --accent-soft: #E6F7F4;
    --accent-dark: #0E9B8A;

    /* Neutres */
    --bg: #F7F9FB;
    --surface: #FFFFFF;
    --border: #E3E8EE;
    --border-soft: #EEF1F5;

    /* Textes */
    --text: #0F1F2E;
    --text-muted: #5A6B7B;
    --text-faint: #94A3B0;

    /* États */
    --success: #16A671;
    --success-soft: #E6F5EC;
    --warning: #E89B2D;
    --warning-soft: #FDF4E4;
    --danger: #D14545;
    --danger-soft: #FBE8E8;
    --info: #3B7BCA;
    --info-soft: #E8F1FB;

    /* ====== TYPOGRAPHIE ====== */
    --font-head: 'Plus Jakarta Sans', -apple-system, system-ui, sans-serif;
    --font-body: 'Inter', -apple-system, system-ui, sans-serif;

    /* ====== ESPACEMENT ====== */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;

    /* ====== RAYONS ====== */
    --radius-sm: 10px;
    --radius: 14px;
    --radius-lg: 18px;
    --radius-full: 999px;

    /* ====== OMBRES ====== */
    --shadow-xs: 0 1px 2px 0 rgb(11 110 140 / 0.04);
    --shadow-sm: 0 1px 3px 0 rgb(11 110 140 / 0.06), 0 1px 2px -1px rgb(11 110 140 / 0.04);
    --shadow-md: 0 4px 8px -2px rgb(11 110 140 / 0.06), 0 2px 4px -2px rgb(11 110 140 / 0.04);
    --shadow-lg: 0 12px 20px -4px rgb(11 110 140 / 0.08), 0 4px 8px -4px rgb(11 110 140 / 0.04);
    --shadow-xl: 0 20px 35px -5px rgb(11 110 140 / 0.10), 0 8px 12px -4px rgb(11 110 140 / 0.05);
    --shadow-glow: 0 0 0 3px rgb(11 110 140 / 0.12);

    /* ====== TRANSITIONS ====== */
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ====== RESET ====== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
    font-size: 14px;
    font-weight: 400;
    overflow-x: hidden;
}

/* ====== AUTH PAGES ====== */
.auth-page {
    min-height: 100vh;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
    position: relative;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    z-index: 0;
}

.auth-container {
    width: 100%;
    max-width: 460px;
    position: relative;
    z-index: 1;
}

.auth-brand {
    text-align: center;
    margin-bottom: var(--space-6);
    color: white;
}

.auth-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: var(--space-4);
}

.auth-brand-mark svg { width: 36px; height: 36px; }

.auth-brand-name {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 28px;
    color: white;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-1);
}

.auth-brand-tagline {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    letter-spacing: 0.02em;
}

.auth-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-soft);
    position: relative;
}

.auth-card-title {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 22px;
    color: var(--text);
    margin-bottom: var(--space-1);
    letter-spacing: -0.01em;
}

.auth-card-subtitle {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: var(--space-6);
}

.auth-tabs {
    display: flex;
    gap: var(--space-1);
    background: var(--bg);
    padding: var(--space-1);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-6);
}

.auth-tab {
    flex: 1;
    padding: 9px 16px;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 7px;
    transition: all var(--transition);
}

.auth-tab.active {
    background: var(--surface);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.auth-tab:hover:not(.active) { color: var(--text); }

/* ====== FORMULAIRES ====== */
.form-group { margin-bottom: var(--space-4); }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: var(--space-2);
    letter-spacing: 0;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 13.5px;
    color: var(--text);
    background: var(--surface);
    transition: all var(--transition);
    outline: none;
}

.form-input:hover, .form-select:hover, .form-textarea:hover {
    border-color: var(--primary-light);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.form-input::placeholder, .form-textarea::placeholder {
    color: var(--text-faint);
}

.form-textarea {
    min-height: 90px;
    resize: vertical;
}

.form-input[disabled], .form-select[disabled] {
    background: var(--bg);
    color: var(--text-muted);
    cursor: not-allowed;
}

/* ====== BOUTONS ====== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 11px 18px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4;
    position: relative;
}

.btn-block { width: 100%; }
.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-lg { padding: 14px 22px; font-size: 14px; }

.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-accent {
    background: var(--accent);
    color: white;
}
.btn-accent:hover { background: var(--accent-dark); }

.btn-soft {
    background: var(--primary-soft);
    color: var(--primary);
}
.btn-soft:hover { background: #d4e8ee; }

.btn-secondary, .btn-ghost {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover, .btn-ghost:hover {
    background: var(--bg);
    border-color: var(--text-faint);
}

.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #129460; }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #b73c3c; }

.btn-warning { background: var(--warning); color: white; }
.btn-warning:hover { background: #d18a23; }

.btn-info { background: var(--info); color: white; }
.btn-info:hover { background: #2f6db8; }

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ====== ALERTES ====== */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-4);
    font-size: 13px;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    border: 1px solid;
}

.alert i {
    font-size: 14px;
    margin-top: 2px;
    flex-shrink: 0;
}

.alert-success { background: var(--success-soft); color: #0d6e4e; border-color: #b8e2cb; }
.alert-danger { background: var(--danger-soft); color: #9c2c2c; border-color: #f1bcbc; }
.alert-info { background: var(--primary-soft); color: var(--primary-dark); border-color: #b8dde7; }
.alert-warning { background: var(--warning-soft); color: #8a5a18; border-color: #f5d3a3; }

/* ====== UTILITAIRES ====== */
.hidden { display: none !important; }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.flex { display: flex; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.w-full { width: 100%; }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }

/* ====== AUTH FOOTER (v25.49 : carte lisible quel que soit le fond) ====== */
.auth-footer {
    text-align: center;
    margin-top: var(--space-5);
    padding: 14px 18px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(15, 31, 46, 0.08);
    box-shadow: 0 4px 18px rgba(15, 31, 46, 0.10);
    color: #38495A;
    font-size: 12px;
    line-height: 1.7;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.auth-footer-main { font-weight: 600; letter-spacing: .02em; color: #0F1F2E; }
.auth-footer-dev {
    margin-top: 6px;
    display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 6px;
    font-size: 12px;
    color: #38495A;
}
.auth-footer-dev i { opacity: .75; color: #6B7C8D; }
.auth-footer-dev strong { color: #0F1F2E; font-weight: 700; }
.auth-footer-sep { opacity: .35; color: #6B7C8D; }
.auth-footer a {
    color: #1565C0;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex; align-items: center; gap: 5px;
    transition: color .15s ease;
}
.auth-footer a:hover { color: #0D3F7A; text-decoration: underline; }

.demo-accounts {
    margin-top: var(--space-5);
    padding: var(--space-4);
    background: var(--primary-soft);
    border-radius: var(--radius-sm);
    border: 1px dashed #b8dde7;
    font-size: 12px;
    color: var(--primary-dark);
    line-height: 1.7;
}

.demo-accounts strong { color: var(--primary); font-weight: 700; }

.demo-accounts code {
    font-family: 'JetBrains Mono', 'SF Mono', Monaco, monospace;
    background: rgba(255, 255, 255, 0.7);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 11px;
    color: var(--primary-dark);
}

/* ====== RESPONSIVE ====== */
@media (max-width: 600px) {
    .auth-card { padding: var(--space-5); }
    .form-row { grid-template-columns: 1fr; }
    .auth-brand-name { font-size: 24px; }
    .auth-card-title { font-size: 19px; }
}

/* ====== ANIMATIONS ====== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.auth-brand { animation: fadeInUp 0.5s ease both; }
.auth-card { animation: fadeInUp 0.5s 0.1s ease both; }
.auth-footer { animation: fadeIn 0.8s 0.3s ease both; }
