/* ===== Arolle Conseil — Portail Conformité ===== */

:root {
    --sable: #ba9973;
    --sable-light: #d4bfa0;
    --sable-pale: #e8d5c0;
    --ocre: #a9582b;
    --ocre-dark: #8a4522;
    --ocean: #499fa4;
    --ocean-light: #7bbfc3;
    --sun: #eddf9c;
    --sun-light: #f5edc5;
    --grey: #545454;
    --grey-light: #8a8a8a;
    --grey-pale: #b0b0b0;
    --bg: #f8f5f0;
    --bg-card: #ffffff;
    --border: #d4bfa0;
    --border-light: #e8ddd0;
    --white: #ffffff;
    --danger: #c0392b;
    --danger-light: #fdecea;
    --success: #27ae60;
    --success-light: #eafaf1;
    --warning: #f39c12;
    --warning-light: #fef9e7;
    --info: #499fa4;
    --info-light: #e8f6f7;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --transition: 0.2s ease;
}

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

body {
    font-family: 'Barlow', sans-serif;
    color: var(--grey);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    font-size: 15px;
}

/* ===== NAVBAR ===== */
.navbar {
    background: var(--white);
    border-bottom: 2px solid var(--sable);
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}
.nav-brand {
    text-decoration: none;
    display: flex;
    align-items: baseline;
    gap: 6px;
}
.nav-logo-text {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 22px;
    color: var(--ocre);
    letter-spacing: 2px;
}
.nav-logo-sub {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 500;
    font-size: 13px;
    color: var(--sable);
    letter-spacing: 3px;
    text-transform: uppercase;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.nav-link {
    text-decoration: none;
    color: var(--grey);
    font-size: 14px;
    font-weight: 500;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}
.nav-link:hover { color: var(--ocre); border-bottom-color: var(--ocre); }
.nav-link.active { color: var(--ocre); border-bottom-color: var(--ocre); }
.nav-logout { color: var(--grey-light); }
.nav-logout:hover { color: var(--danger); border-bottom-color: var(--danger); }
.nav-user {
    font-size: 13px;
    color: var(--sable);
    padding: 4px 10px;
    background: var(--bg);
    border-radius: var(--radius);
}

/* ===== MAIN ===== */
.main-content {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--white);
    border-top: 1px solid var(--border-light);
    padding: 1rem 2rem;
    margin-top: auto;
}
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--grey-light);
}

/* ===== ALERTS ===== */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
}
.alert-success { background: var(--success-light); color: var(--success); border-left: 3px solid var(--success); }
.alert-error { background: var(--danger-light); color: var(--danger); border-left: 3px solid var(--danger); }
.alert-warning { background: var(--warning-light); color: var(--warning); border-left: 3px solid var(--warning); }
.alert-info { background: var(--info-light); color: var(--info); border-left: 3px solid var(--info); }
.alert-close {
    background: none; border: none; font-size: 18px; cursor: pointer;
    color: inherit; opacity: 0.6; padding: 0 4px;
}
.alert-close:hover { opacity: 1; }

/* ===== HEADINGS ===== */
h1 {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 28px;
    color: var(--ocre-dark);
    margin-bottom: 1.5rem;
}
h2 {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    font-size: 20px;
    color: var(--ocre);
    margin-bottom: 1rem;
}
h3 {
    font-weight: 600;
    font-size: 16px;
    color: var(--sable);
    margin-bottom: 0.5rem;
}

/* ===== CARDS ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}
.card + .card { margin-top: 1rem; }

/* ===== STAT CARDS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    text-align: center;
    box-shadow: var(--shadow);
}
.stat-value {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
}
.stat-label {
    font-size: 13px;
    color: var(--grey-light);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.stat-card.conforme .stat-value { color: var(--success); }
.stat-card.non-conforme .stat-value { color: var(--danger); }
.stat-card.partiel .stat-value { color: var(--warning); }
.stat-card.total .stat-value { color: var(--ocre); }

/* ===== TABLES ===== */
.table-container { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
th {
    background: var(--ocre);
    color: var(--white);
    font-weight: 600;
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
th:first-child { border-radius: var(--radius) 0 0 0; }
th:last-child { border-radius: 0 var(--radius) 0 0; }
td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}
tr:hover td { background: rgba(186,153,115,0.04); }

/* ===== STATUS BADGES ===== */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.badge-pending { background: var(--sun-light); color: #8a6d1b; }
.badge-verified { background: var(--success-light); color: var(--success); }
.badge-rejected { background: var(--danger-light); color: var(--danger); }
.badge-expired { background: #f5e6e6; color: #8b2020; }
.badge-missing { background: #f0eded; color: var(--grey-light); }
.badge-conforme { background: var(--success-light); color: var(--success); }
.badge-non-conforme { background: var(--danger-light); color: var(--danger); }
.badge-partiel { background: var(--warning-light); color: var(--warning); }

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 1.25rem;
}
.form-group label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: var(--grey);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.form-control {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: 'Barlow', sans-serif;
    font-size: 15px;
    color: var(--grey);
    background: var(--white);
    transition: var(--transition);
}
.form-control:focus {
    outline: none;
    border-color: var(--ocre);
    box-shadow: 0 0 0 3px rgba(169,88,43,0.1);
}
.form-control::placeholder { color: var(--grey-pale); }
select.form-control { cursor: pointer; }
.form-hint {
    font-size: 12px;
    color: var(--grey-light);
    margin-top: 3px;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.6rem 1.25rem;
    border: none;
    border-radius: var(--radius);
    font-family: 'Barlow', sans-serif;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.btn-primary {
    background: var(--ocre);
    color: var(--white);
}
.btn-primary:hover { background: var(--ocre-dark); }
.btn-secondary {
    background: var(--sable);
    color: var(--white);
}
.btn-secondary:hover { background: #a08560; }
.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--grey);
}
.btn-outline:hover { border-color: var(--ocre); color: var(--ocre); }
.btn-danger {
    background: var(--danger);
    color: var(--white);
}
.btn-danger:hover { background: #a93226; }
.btn-success {
    background: var(--success);
    color: var(--white);
}
.btn-success:hover { background: #1e8449; }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 12px; }
.btn-full { width: 100%; justify-content: center; }

/* ===== AUTH PAGES ===== */
.auth-container {
    max-width: 440px;
    margin: 4rem auto;
}
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}
.auth-logo {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 32px;
    color: var(--ocre);
    letter-spacing: 3px;
}
.auth-logo-sub {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: var(--sable);
    letter-spacing: 4px;
    display: block;
}
.auth-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 18px;
    color: var(--grey);
    margin-top: 1rem;
}
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 14px;
    color: var(--grey-light);
}
.auth-footer a { color: var(--ocre); text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }

.btn-google {
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--grey);
    font-weight: 500;
}
.btn-google:hover { background: var(--bg); border-color: var(--sable); }

/* ===== ONBOARDING ===== */
.onboarding-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 2rem;
}
.step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--grey-pale);
    font-weight: 500;
}
.step.active { color: var(--ocre); }
.step.done { color: var(--success); }
.step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    border: 2px solid var(--grey-pale);
    color: var(--grey-pale);
}
.step.active .step-number { border-color: var(--ocre); color: var(--white); background: var(--ocre); }
.step.done .step-number { border-color: var(--success); color: var(--white); background: var(--success); }
.step-line {
    width: 40px;
    height: 2px;
    background: var(--border-light);
    margin: 0 8px;
}
.step-line.done { background: var(--success); }

/* ===== DOCUMENT CARDS ===== */
.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}
.doc-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.doc-card:hover { box-shadow: var(--shadow-md); }
.doc-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}
.doc-card-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--grey);
}
.doc-card-meta {
    font-size: 12px;
    color: var(--grey-light);
    margin-bottom: 0.75rem;
}
.doc-card-meta span { display: block; margin-top: 2px; }
.doc-expiry {
    font-size: 13px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: var(--radius);
}
.doc-expiry.safe { background: var(--success-light); color: var(--success); }
.doc-expiry.warning { background: var(--warning-light); color: var(--warning); }
.doc-expiry.danger { background: var(--danger-light); color: var(--danger); }

.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg);
}
.upload-zone:hover { border-color: var(--ocre); background: rgba(169,88,43,0.03); }
.upload-zone input[type="file"] { display: none; }
.upload-zone-text { font-size: 14px; color: var(--grey-light); }
.upload-zone-text strong { color: var(--ocre); }

/* ===== MISC ===== */
a { color: var(--ocre); }
.text-muted { color: var(--grey-light); }
.text-sm { font-size: 13px; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.section { margin-bottom: 2.5rem; }
.divider { border: none; border-top: 1px solid var(--border-light); margin: 1.5rem 0; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav-links { gap: 0.75rem; }
    .nav-link { font-size: 12px; }
    .main-content { padding: 1rem; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .form-row { grid-template-columns: 1fr; }
    .doc-grid { grid-template-columns: 1fr; }
    .footer-content { flex-direction: column; gap: 4px; text-align: center; }
}
