/* Base mobile-first, très légère, sans framework externe */
* { box-sizing: border-box; }
html, body {
    margin: 0; padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg, #f4f5f7);
    color: var(--text, #222);
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
}

.app-header {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--primary, #2c3e50);
    color: var(--on-primary, #fff);
    padding: 12px 14px;
    position: sticky; top: 0; z-index: 20;
}
.app-header-left, .app-header-right { display: flex; align-items: center; gap: 10px; }
.app-title { font-weight: 700; font-size: 1.1rem; }
.app-logo { height: 30px; width: 30px; object-fit: contain; border-radius: 6px; background: #fff; }
.btn-icon {
    background: none; border: none; color: inherit; font-size: 1.4rem;
    cursor: pointer; text-decoration: none; padding: 4px 8px; border-radius: 8px;
}
.btn-icon:active { background: rgba(255,255,255,0.15); }

.app-nav {
    display: flex; flex-direction: column;
    background: var(--surface, #fff);
    border-bottom: 1px solid #e2e2e2;
}
.app-nav a {
    padding: 12px 16px; text-decoration: none; color: var(--text, #222);
    border-bottom: 1px solid #f0f0f0; font-size: 0.98rem;
}
.app-nav a:active { background: var(--accent-light, #eef2f7); }

.app-main { padding: 14px; max-width: 760px; margin: 0 auto 70px; }

/* Cartes / blocs */
.card {
    background: var(--surface, #fff);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
h1, h2, h3 { color: var(--primary, #2c3e50); margin-top: 0; }

/* Boutons */
.btn {
    display: inline-block; padding: 12px 18px; border-radius: 10px;
    border: none; background: var(--primary, #2c3e50); color: var(--on-primary,#fff);
    font-size: 1rem; font-weight: 600; cursor: pointer; text-decoration: none;
    text-align: center; min-height: 46px;
}
.btn.secondary { background: var(--accent, #7f8c8d); }
.btn.danger { background: #c0392b; }
.btn.success { background: #27ae60; }
.btn-block { display: block; width: 100%; }

/* Formulaires - larges, pensés tactile / mobile "une main" */
label { display: block; font-weight: 600; margin: 12px 0 6px; }
input, select, textarea {
    width: 100%; padding: 12px; font-size: 1rem;
    border: 1px solid #ccc; border-radius: 10px; background: #fff; color: #222;
}
textarea { min-height: 90px; }

/* Badges de statut */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; }
.badge.present { background: #e3f8e8; color: #1e7d3a; }
.badge.absence_justifiee { background: #fff4dd; color: #a6720b; }
.badge.absence_non_justifiee { background: #fde3e1; color: #b3261e; }
.badge.absence_en_attente { background: #eef1fd; color: #354ba8; }
.badge.absence_en_cours { background: #fde9d0; color: #a6570b; }
.badge.weekend { background: #f0f0f0; color: #888; }
.badge.en_attente { background: #eef1fd; color: #354ba8; }
.badge.valide { background: #e3f8e8; color: #1e7d3a; }
.badge.rejete { background: #fde3e1; color: #b3261e; }

table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid #eee; }

.login-box { max-width: 380px; margin: 60px auto; }
.login-box .app-title-big { text-align: center; font-size: 1.5rem; font-weight: 700; margin-bottom: 20px; color: var(--primary,#2c3e50); }

.skin-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.skin-swatch {
    border-radius: 12px; padding: 14px; cursor: pointer; border: 3px solid transparent;
    color: #fff; font-weight: 700; text-align: center;
}
.skin-swatch.active { border-color: #222; }

/* Écran plus large (RH / CI) : tableau de bord */
@media (min-width: 900px) {
    .app-nav { flex-direction: row; }
    .app-nav a { border-bottom: none; border-right: 1px solid #f0f0f0; }
    .app-main { max-width: 1100px; }
    .dashboard-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
}

.install-hint {
    background: var(--accent-light, #eef2f7); border-radius: 12px; padding: 12px 14px;
    font-size: 0.9rem; margin-bottom: 14px; display: none;
}
