:root {
    --accent: #1560F1;
    --bg: #f5f7fb;
    --card: #ffffff;
    --text: #121826;
    --muted: #667085;
    --border: #e4e7ec;
    --danger: #d92d20;
    --success: #039855;
    --warning: #f79009;
    --shadow: 0 20px 60px rgba(16, 24, 40, .10);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    background: radial-gradient(circle at top left, rgba(21, 96, 241, .12), transparent 32rem), var(--bg);
    color: var(--text);
}

a {
    color: inherit;
    text-decoration: none;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px clamp(20px, 5vw, 72px);
    background: rgba(245, 247, 251, .82);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(228, 231, 236, .8);
}

.logo,
.admin-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.logo-mark,
.brand-dot {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    background: var(--accent);
    color: white;
    box-shadow: 0 12px 30px rgba(21, 96, 241, .25);
}

.site-header nav {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--muted);
    font-weight: 650;
}

.nav-cta {
    padding: 10px 14px;
    border-radius: 999px;
    background: var(--text);
    color: white;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
    gap: 28px;
    padding: clamp(34px, 6vw, 86px) clamp(20px, 5vw, 72px) 38px;
}

.hero-content,
.profile-card,
.panel,
.info-card,
.document-row,
.contact-form,
.admin-card,
.login-card,
.install-card,
.stat-card,
.message-card {
    background: rgba(255, 255, 255, .86);
    border: 1px solid rgba(228, 231, 236, .95);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-content {
    padding: clamp(28px, 5vw, 56px);
}

.badge,
.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(21, 96, 241, .10);
    color: var(--accent);
    font-weight: 800;
    font-size: 13px;
    letter-spacing: .02em;
}

.badge.light {
    background: rgba(255, 255, 255, .16);
    color: white;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

.hero h1 {
    margin: 18px 0;
    font-size: clamp(36px, 6vw, 70px);
    letter-spacing: -.055em;
    line-height: .95;
}

.hero p,
.section-title p,
.strength p,
.profile-card p,
.contact-section p,
.install-card p,
.login-card p {
    color: var(--muted);
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 14px;
    padding: 12px 18px;
    cursor: pointer;
    font-weight: 800;
    font-size: 14px;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn.primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 16px 34px rgba(21, 96, 241, .22);
}

.btn.ghost {
    background: white;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn.small {
    padding: 8px 11px;
    border-radius: 10px;
    background: #f2f4f7;
}

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

.btn.full {
    width: 100%;
}

.mini-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 34px;
}

.mini-grid div {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #f9fafb;
}

.mini-grid strong {
    display: block;
    font-size: 18px;
}

.mini-grid span {
    color: var(--muted);
    font-size: 13px;
}

.profile-card {
    padding: 28px;
    align-self: stretch;
}

.profile-avatar {
    width: 92px;
    height: 92px;
    border-radius: 30px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--accent), #0b2c74);
    color: white;
    font-size: 44px;
    font-weight: 900;
}

.profile-photo {
    width: 92px;
    height: 92px;
    border-radius: 30px;
    object-fit: cover;
}

.profile-card h2 {
    margin: 20px 0 4px;
}

.profile-card ul {
    list-style: none;
    padding: 0;
    margin: 22px 0 0;
    display: grid;
    gap: 12px;
}

.profile-card li {
    padding: 14px;
    border-radius: 16px;
    background: #f9fafb;
    border: 1px solid var(--border);
}

.profile-card li span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 4px;
}

.section {
    padding: 40px clamp(20px, 5vw, 72px);
}

.section-title {
    max-width: 760px;
    margin: 0 auto 24px;
    text-align: center;
}

.section-title.left {
    text-align: left;
    margin-left: 0;
}

.section-title h2,
.contact-section h2,
.admin-top h1 {
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1;
    letter-spacing: -.035em;
    margin: 12px 0;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}

.info-card {
    padding: 22px;
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: rgba(21, 96, 241, .08);
    font-size: 24px;
}

.info-card h3 {
    margin: 18px 0 8px;
}

.info-card p {
    color: var(--muted);
}

.split-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    padding: 40px clamp(20px, 5vw, 72px);
}

.panel {
    padding: 26px;
}

.zones,
.strengths {
    display: grid;
    gap: 12px;
}

.zone,
.strength {
    display: flex;
    gap: 14px;
    padding: 16px;
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: 18px;
}

.zone {
    justify-content: space-between;
    align-items: center;
}

.zone span,
.document-row span {
    color: var(--muted);
    font-size: 14px;
}

.strength > span {
    font-size: 24px;
}

.document-list {
    max-width: 900px;
    margin: auto;
    display: grid;
    gap: 12px;
}

.document-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px;
}

.document-row strong,
.document-row span {
    display: block;
}

.document-row em {
    color: var(--muted);
    font-style: normal;
}

.contact-section {
    margin: 40px clamp(20px, 5vw, 72px) 60px;
    display: grid;
    grid-template-columns: .85fr 1.15fr;
    gap: 28px;
    padding: clamp(28px, 5vw, 48px);
    border-radius: 32px;
    background: linear-gradient(135deg, var(--accent), #0b2c74);
    color: white;
}

.contact-section p {
    color: rgba(255, 255, 255, .8);
}

.contact-form {
    padding: 22px;
    color: var(--text);
}

label {
    display: grid;
    gap: 7px;
    color: #344054;
    font-weight: 750;
    font-size: 14px;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 13px;
    font: inherit;
    background: white;
    color: var(--text);
    outline: none;
}

textarea {
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(21, 96, 241, .10);
}

.contact-form {
    display: grid;
    gap: 14px;
}

.hp {
    display: none;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 26px clamp(20px, 5vw, 72px);
    color: var(--muted);
    border-top: 1px solid var(--border);
}

.public-flash {
    margin: 18px clamp(20px, 5vw, 72px) 0;
    padding: 14px 16px;
    border-radius: 16px;
    font-weight: 750;
}

.alert,
.public-flash {
    border: 1px solid var(--border);
    background: white;
}

.alert {
    padding: 14px 16px;
    border-radius: 16px;
    margin-bottom: 16px;
}

.alert.success,
.public-flash.success {
    border-color: rgba(3, 152, 85, .25);
    background: #ecfdf3;
    color: #027a48;
}

.alert.error,
.public-flash.error {
    border-color: rgba(217, 45, 32, .25);
    background: #fef3f2;
    color: #b42318;
}

/* Admin */
.admin-body {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
    background: #f6f7fb;
}

.admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: #101828;
    color: white;
}

.admin-nav {
    display: grid;
    gap: 6px;
    margin-top: 26px;
}

.admin-nav a {
    padding: 12px 13px;
    border-radius: 12px;
    color: rgba(255, 255, 255, .72);
    font-weight: 750;
}

.admin-nav a.active,
.admin-nav a:hover {
    background: rgba(255, 255, 255, .10);
    color: white;
}

.admin-user {
    margin-top: auto;
    padding-top: 20px;
    display: grid;
    gap: 8px;
    color: rgba(255, 255, 255, .8);
}

.admin-user a {
    color: white;
    font-weight: 800;
}

.admin-main {
    padding: 28px;
}

.admin-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    padding: 22px;
}

.stat-card strong {
    display: block;
    font-size: 34px;
}

.stat-card span {
    color: var(--muted);
}

.admin-card {
    padding: 22px;
    margin-bottom: 20px;
}

.admin-card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.admin-card-title a {
    color: var(--accent);
    font-weight: 800;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.span-2 {
    grid-column: span 2;
}

.admin-form {
    display: grid;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 13px;
}

.editable-table input[type="number"] {
    width: 90px;
}

.editable-table input[type="checkbox"] {
    width: auto;
}

.new-row {
    background: #f9fafb;
}

.status {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    background: #f2f4f7;
    color: #344054;
}

.status.nouveau {
    background: #eff8ff;
    color: #175cd3;
}

.status.lu {
    background: #ecfdf3;
    color: #027a48;
}

.status.archive {
    background: #f9fafb;
    color: #667085;
}

.check-list {
    color: var(--muted);
    line-height: 1.8;
}

.warning-card {
    border-color: rgba(247, 144, 9, .22);
    background: #fffaeb;
}

.messages-list {
    display: grid;
    gap: 14px;
}

.message-card {
    box-shadow: none;
    padding: 18px;
}

.message-head,
.message-contact,
.inline-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.message-head {
    justify-content: space-between;
}

.message-head span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.message-contact a {
    color: var(--accent);
    font-weight: 800;
}

/* Login / install */
.login-page,
.install-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
}

.login-card,
.install-card {
    width: min(100%, 520px);
    padding: 28px;
}

.login-card form,
.install-card form {
    display: grid;
    gap: 14px;
}

code {
    padding: 2px 6px;
    border-radius: 6px;
    background: #f2f4f7;
    color: #344054;
}

@media (max-width: 1050px) {
    .hero,
    .split-section,
    .contact-section {
        grid-template-columns: 1fr;
    }

    .cards-grid,
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-body {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
        height: auto;
    }

    .admin-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .site-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-header nav {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .mini-grid,
    .cards-grid,
    .stats-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .span-2 {
        grid-column: span 1;
    }

    .document-row,
    .zone,
    .admin-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-nav {
        grid-template-columns: 1fr;
    }

    .admin-main {
        padding: 16px;
    }
}
