@import url("https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700&family=Fraunces:opsz,wght@9..144,600;9..144,700&display=swap");

:root {
    --ink: #192132;
    --muted: #5b667c;
    --bg: #eff3f8;
    --panel: #ffffff;
    --line: #dbe4ef;
    --brand: #004f7a;
    --brand-dark: #003c5d;
    --accent: #f17a30;
    --danger: #ac2f2f;
    --status-todo: #5f6b7a;
    --status-progress: #006ca8;
    --status-blocked: #9a5300;
    --status-done: #157f3c;
    --radius: 14px;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: "Sora", "Avenir Next", "Trebuchet MS", sans-serif;
    color: var(--ink);
    line-height: 1.45;
    background:
        radial-gradient(circle at 12% -8%, #d9ecff 0%, rgba(217, 236, 255, 0) 36%),
        radial-gradient(circle at 100% 0%, #ffe7d7 0%, rgba(255, 231, 215, 0) 30%),
        linear-gradient(165deg, #f8fbff 0%, #eff3f8 58%, #e8eef7 100%);
}

h1,
h2,
h3 {
    font-family: "Fraunces", Georgia, serif;
    letter-spacing: 0.01em;
}

.container {
    width: min(1100px, 92vw);
    margin: 0 auto;
}

.page {
    padding: 28px 0 44px;
}

.topbar {
    border-bottom: 1px solid var(--line);
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 5;
}

.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 64px;
}

.brand {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    color: var(--brand);
    text-decoration: none;
}

.topbar nav {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.topbar nav a {
    text-decoration: none;
    color: var(--ink);
    font-weight: 600;
}

.user-chip {
    background: #e6f6f6;
    color: #0f5756;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.9rem;
}

.inline-form {
    margin: 0;
}

.btn,
.btn-link {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.btn:hover,
.btn-link:hover {
    border-color: #c1cedf;
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}

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

.btn-danger {
    background: #fff1f1;
    color: var(--danger);
    border-color: #f0cbcb;
}

.btn-link {
    padding: 0;
    border: none;
    background: transparent;
}

.landing-hero {
    position: relative;
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 18px;
    padding: 30px;
    margin-bottom: 20px;
    background: linear-gradient(138deg, #fcfeff 0%, #f3f7ff 44%, #f4fbff 100%);
    border: 1px solid #d6e2f1;
    border-radius: calc(var(--radius) + 4px);
    overflow: hidden;
}

.landing-hero::before {
    content: "";
    position: absolute;
    width: 240px;
    height: 240px;
    right: -80px;
    top: -85px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(241, 122, 48, 0.32) 0%, rgba(241, 122, 48, 0) 72%);
}

.landing-copy {
    position: relative;
    z-index: 1;
}

.landing-copy h1 {
    margin: 0 0 10px;
    font-size: clamp(1.95rem, 4.2vw, 3rem);
    line-height: 1.15;
}

.lead {
    margin: 0;
    max-width: 58ch;
    color: #46526a;
}

.landing-cta {
    display: flex;
    gap: 10px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.landing-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(110px, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.landing-metrics div {
    padding: 10px;
    border: 1px solid #d9e3f0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.78);
}

.landing-metrics strong {
    display: block;
    font-size: 0.94rem;
}

.landing-metrics span {
    color: var(--muted);
    font-size: 0.8rem;
}

.landing-preview {
    position: relative;
    border: 1px solid #d2dfef;
    border-radius: 14px;
    background: linear-gradient(165deg, #ffffff 0%, #eef5ff 100%);
    padding: 14px;
    display: grid;
    gap: 10px;
    align-self: start;
    animation: riseIn 0.55s ease-out;
}

.landing-elephant-media {
    margin: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #dde7f5;
}

.landing-elephant-media img {
    width: 100%;
    display: block;
    height: 170px;
    object-fit: cover;
}

.preview-ribbon {
    justify-self: start;
    background: var(--brand);
    color: #fff;
    font-size: 0.74rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 6px 10px;
}

.preview-card {
    border-radius: 10px;
    border: 1px solid #dde7f5;
    background: #fff;
    padding: 12px;
}

.preview-card h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
}

.preview-title {
    margin: 0 0 8px;
    font-weight: 600;
}

.preview-meta {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 0.88rem;
}

.preview-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.eyebrow {
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.75rem;
    color: var(--muted);
    font-weight: 700;
}

.brand-mark-line {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.title-with-mark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.title-with-mark h1 {
    margin: 0;
}

.client-logo-mark {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.38);
    box-shadow: 0 2px 8px rgba(24, 37, 62, 0.18);
    background: #fff;
    opacity: 0.88;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.card,
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
}

.feature-card {
    position: relative;
    overflow: hidden;
}

.feature-card::after {
    content: "";
    position: absolute;
    height: 4px;
    left: 0;
    right: 0;
    top: 0;
    background: linear-gradient(90deg, var(--brand), var(--accent));
}

.home-steps {
    border: 1px solid #dce6f3;
    border-radius: var(--radius);
    background: #ffffffcc;
    padding: 18px;
}

.home-steps h2 {
    margin: 0 0 12px;
}

.home-welcome-strip {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 12px;
    align-items: center;
    background: #ffffffcc;
    border: 1px solid #dce6f3;
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 14px;
}

.home-welcome-strip > img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #d9e4f2;
}

.home-elephant-banner {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #d5e2f2;
    margin-bottom: 14px;
    min-height: 170px;
}

.home-elephant-banner img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.home-elephant-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(10, 30, 60, 0.6) 0%, rgba(10, 30, 60, 0.2) 62%, rgba(10, 30, 60, 0) 100%);
    color: #fff;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.home-elephant-overlay .eyebrow {
    color: #d9e8ff;
    margin-bottom: 6px;
}

.home-elephant-overlay .client-logo-mark {
    border-color: rgba(255, 255, 255, 0.7);
    opacity: 0.95;
}

.home-elephant-overlay h1 {
    margin: 0;
    font-size: clamp(1.2rem, 2.6vw, 1.7rem);
}

.kanban-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(250px, 1fr));
    gap: 14px;
}

.kanban-col {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid #d9e3f2;
    border-radius: 14px;
    padding: 10px;
    min-height: 220px;
}

.kanban-col header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding: 4px;
}

.kanban-col header h2 {
    margin: 0;
    font-size: 1.1rem;
}

.kanban-col header span {
    min-width: 28px;
    text-align: center;
    border-radius: 999px;
    background: #e8eef7;
    color: #34435f;
    font-size: 0.82rem;
    padding: 4px 8px;
}

.kanban-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid #e1e8f4;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 8px;
}

.kanban-card:hover {
    border-color: #c6d5ea;
}

.kanban-title {
    margin: 0 0 6px;
    font-weight: 700;
    line-height: 1.3;
}

.kanban-meta {
    margin: 0 0 6px;
    color: var(--muted);
    font-size: 0.83rem;
}

.kanban-enjeu {
    margin: 0 0 10px;
    color: #38445c;
    font-size: 0.88rem;
}

.kanban-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.kanban-empty {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    padding: 6px 4px;
}

.step-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.step-card {
    background: #fff;
    border: 1px solid #e3ebf7;
    border-radius: 12px;
    padding: 14px;
}

.step-card span {
    font-size: 0.82rem;
    color: var(--brand);
    letter-spacing: 0.08em;
    font-weight: 700;
}

.step-card h3 {
    margin: 8px 0;
    font-size: 1.05rem;
}

.step-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.section-header h1 {
    margin: 0;
}

.dashboard-hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 14px;
    align-items: stretch;
    margin-bottom: 14px;
}

.dashboard-hero-copy {
    background: linear-gradient(140deg, #f8fcff 0%, #edf4ff 100%);
    border: 1px solid #dbe6f5;
    border-radius: var(--radius);
    padding: 16px;
}

.dashboard-hero-copy h2 {
    margin: 0 0 8px;
}

.dashboard-hero-copy p {
    margin: 0;
    color: #4b5871;
}

.dashboard-hero-media {
    margin: 0;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid #dbe6f5;
    min-height: 170px;
}

.dashboard-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.filter-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

input,
select,
textarea {
    border: 1px solid #cbd7e6;
    border-radius: 8px;
    padding: 10px;
    font: inherit;
    width: 100%;
    background: #fff;
}

.form-grid {
    display: grid;
    gap: 8px;
}

.form-actions {
    margin-top: 8px;
}

.table-wrap {
    overflow-x: auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

table {
    border-collapse: collapse;
    width: 100%;
    min-width: 780px;
}

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

th {
    background: #f7f9fd;
    font-size: 0.92rem;
}

.clickable-action-row {
    cursor: pointer;
}

.clickable-action-row:hover td {
    background: #f8fbff;
}

.clickable-action-row:focus-visible {
    outline: 2px solid #8ab4d9;
    outline-offset: -2px;
}

.badge {
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    border: 1px solid transparent;
    display: inline-block;
}

.status-a_faire {
    background: #f0f2f6;
    color: var(--status-todo);
    border-color: #dde2ea;
}

.status-en_cours {
    background: #e3f2fa;
    color: var(--status-progress);
    border-color: #c4e4f7;
}

.status-bloquee {
    background: #fdf1df;
    color: var(--status-blocked);
    border-color: #f7ddb5;
}

.status-terminee {
    background: #e7f7ed;
    color: var(--status-done);
    border-color: #cbeed7;
}

.flash {
    border-radius: 10px;
    padding: 11px 12px;
    margin-bottom: 10px;
}

.flash-success {
    background: #e9f8ef;
    border: 1px solid #c8ebd4;
}

.flash-error {
    background: #fff1f1;
    border: 1px solid #f1cdcd;
}

.columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.meta-grid {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 8px;
    margin-bottom: 14px;
}

.meta-grid dt {
    color: var(--muted);
}

.meta-grid dd {
    margin: 0;
}

.timeline {
    display: grid;
    gap: 10px;
}

.timeline-item {
    border: 1px solid #e4ecf6;
    border-radius: 10px;
    padding: 10px;
    background: #fbfdff;
}

.timeline-meta {
    margin-top: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.impact {
    color: #0a4f80;
}

.share-form {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 8px;
    margin-bottom: 14px;
}

.role-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
}

.user-row-actions {
    display: grid;
    gap: 8px;
}

.panel-subtitle {
    margin: 6px 0 12px;
    color: var(--muted);
}

.visit-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.visit-stat-card {
    border: 1px solid #dde7f3;
    border-radius: 12px;
    padding: 10px 12px;
    background: #fff;
}

.visit-stat-card span {
    color: var(--muted);
    font-size: 0.82rem;
}

.visit-stat-card strong {
    display: block;
    font-size: 1.45rem;
    margin-top: 4px;
}

.visit-state-a_venir {
    background: #e3f2fa;
    color: #006ca8;
    border-color: #c4e4f7;
}

.visit-state-passee {
    background: #f4f1ff;
    color: #5f4ea8;
    border-color: #ded5fb;
}

.visit-state-realisee {
    background: #e7f7ed;
    color: #157f3c;
    border-color: #cbeed7;
}

.visit-state-annulee {
    background: #fff1f1;
    color: #a33535;
    border-color: #f1cdcd;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.85rem;
    color: #1b426b;
    overflow-wrap: anywhere;
}

.collab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.empty-state {
    background: #fff;
    border: 1px dashed #bfd1e5;
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 680px) {
    .container {
        width: min(1100px, 95vw);
    }

    .page {
        padding: 18px 0 30px;
    }

    .topbar-inner {
        align-items: flex-start;
        flex-direction: column;
        padding: 10px 0;
        gap: 8px;
    }

    .topbar nav {
        width: 100%;
        gap: 8px;
    }

    .client-logo-mark {
        width: 26px;
        height: 26px;
    }

    .landing-hero {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .home-elephant-banner img {
        height: 190px;
    }

    .home-welcome-strip {
        grid-template-columns: 1fr;
    }

    .home-welcome-strip > img {
        height: 160px;
    }

    .landing-metrics {
        grid-template-columns: 1fr;
    }

    .landing-copy h1 {
        font-size: 2rem;
    }

    .kanban-board {
        grid-template-columns: 1fr;
    }

    .dashboard-hero {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        width: 100%;
    }

    .action-buttons .btn {
        flex: 1;
    }

    .share-form {
        grid-template-columns: 1fr;
    }

    .role-form {
        grid-template-columns: 1fr;
    }

    .meta-grid {
        grid-template-columns: 1fr;
    }

    .landing-cta .btn {
        width: 100%;
    }

    .filter-form {
        display: grid;
        grid-template-columns: 1fr;
    }

    .table-wrap {
        border: none;
        background: transparent;
        overflow: visible;
    }

    table {
        min-width: 0;
    }

    table thead {
        display: none;
    }

    table tbody {
        display: grid;
        gap: 10px;
    }

    table tbody tr {
        display: block;
        border: 1px solid #d8e2f0;
        border-radius: 12px;
        background: #fff;
        padding: 6px 10px;
    }

    table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 12px;
        border-bottom: 1px solid #eef3fa;
        padding: 8px 2px;
    }

    table tbody td:last-child {
        border-bottom: none;
    }

    table tbody td[data-label]::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 0.82rem;
        font-weight: 600;
        min-width: 36%;
    }

    .clickable-action-row:focus-visible {
        outline-offset: 0;
    }

    input,
    select,
    textarea,
    button {
        font-size: 16px;
    }
}
