/* ── Reset & base ──────────────────────────────────────────────────────────── */

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

:root {
    --primary:      #1976D2;
    --primary-dark: #0D47A1;
    --primary-light:#E3F2FD;
    --danger:       #D32F2F;
    --text:         #212121;
    --text-light:   #757575;
    --border:       #E0E0E0;
    --bg:           #F5F5F5;
    --white:        #FFFFFF;
    --radius:       10px;
    --shadow:       0 2px 8px rgba(0,0,0,0.10);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

/* ── Boutons ────────────────────────────────────────────────────────────────── */

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
}

.btn:active { transform: scale(0.97); }

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

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}
.btn-secondary:hover { background: var(--primary-light); }

.btn-full { width: 100%; text-align: center; }

/* ── Alertes ────────────────────────────────────────────────────────────────── */

.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-error {
    background: #FFEBEE;
    color: var(--danger);
    border: 1px solid #FFCDD2;
}

.alert button {
    margin-left: auto;
    padding: 6px 12px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}

/* ── Page Login ─────────────────────────────────────────────────────────────── */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

.login-card {
    background: var(--white);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo h1 {
    font-size: 28px;
    color: var(--primary);
    font-weight: 700;
}

.login-logo p {
    color: var(--text-light);
    font-size: 14px;
    margin-top: 4px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    transition: border-color 0.2s;
    outline: none;
}

.form-group input:focus {
    border-color: var(--primary);
}

/* ── Page Protocols ─────────────────────────────────────────────────────────── */

.protocols-page { display: flex; flex-direction: column; }

.header {
    background: var(--primary);
    color: var(--white);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
}

.header h1 { font-size: 20px; font-weight: 700; }

.header-subtitle {
    font-size: 13px;
    opacity: 0.8;
    margin-left: 12px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.username {
    font-size: 14px;
    opacity: 0.9;
}

.main {
    padding: 24px;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

/* ── Grille protocoles ──────────────────────────────────────────────────────── */

.protocols-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.protocol-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    transition: box-shadow 0.2s;
}

.protocol-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.14);
}

.protocol-info { flex: 1; }

.protocol-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.protocol-desc {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 6px;
}

.protocol-id {
    font-size: 12px;
    color: var(--text-light);
    background: var(--bg);
    padding: 2px 8px;
    border-radius: 20px;
}

.btn-launch {
    white-space: nowrap;
    flex-shrink: 0;
}
