:root {
    --ink: #12304a;
    --muted: #5f7180;
    --line: #d7e7ef;
    --water: #0f65a8;
    --water-dark: #084f8f;
    --water-light: #dff4fb;
    --leaf: #39a35b;
    --leaf-dark: #1f7a3f;
    --sun: #f2b84b;
    --soft: #f4fbfd;
    --white: #ffffff;
    --danger: #b42318;
    --success: #0f766e;
    --shadow: 0 16px 45px rgba(18, 48, 74, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: "Poppins", Arial, Helvetica, sans-serif;
    line-height: 1.6;
    background: var(--white);
}

html {
    scroll-behavior: smooth;
}

a {
    color: var(--water);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.site-header,
.admin-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px clamp(18px, 5vw, 72px);
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    text-decoration: none;
    min-width: 220px;
}

.brand-mark,
.brand-logo {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    color: var(--white);
    font-weight: 800;
    background: var(--water);
    border-radius: 8px;
}

.brand-logo {
    display: block;
    object-fit: contain;
    padding: 2px;
    background: var(--white);
}

.brand strong,
.brand small {
    display: block;
}

.brand small {
    color: var(--muted);
    font-size: 0.78rem;
}

.site-nav,
.admin-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.site-nav a,
.admin-nav a {
    color: var(--ink);
    font-weight: 700;
    font-size: 0.95rem;
}

.site-nav a.is-active {
    color: var(--water);
}

.language-switch {
    display: inline-flex;
    gap: 4px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--white);
}

.language-switch a {
    padding: 4px 8px;
    font-size: 0.78rem;
    border-radius: 999px;
}

.language-switch a.is-active {
    color: var(--white);
    background: var(--water);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: var(--ink);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 760px);
    gap: clamp(28px, 6vw, 76px);
    align-items: center;
    min-height: 640px;
    padding: clamp(54px, 8vw, 105px) clamp(18px, 5vw, 72px);
    background:
        linear-gradient(90deg, rgba(244, 251, 253, 0.96) 0%, rgba(244, 251, 253, 0.88) 42%, rgba(244, 251, 253, 0.18) 100%),
        url("../images/hero-laboratoire.png");
    background-color: var(--soft);
    background-size: cover;
    background-position: center;
}

.hero-slider {
    position: relative;
    overflow: hidden;
    min-height: clamp(620px, 100vh, 920px);
    color: var(--white);
    background: var(--ink);
}

.hero-slider-track,
.hero-slide,
.hero-slide img,
.hero-slide-overlay {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity .9s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1);
}

.hero-slide.is-active img {
    animation: heroKenBurns 7s ease forwards;
}

.hero-slide-overlay {
    background:
        linear-gradient(90deg, rgba(8, 35, 56, .88), rgba(8, 79, 143, .62), rgba(31, 122, 63, .28)),
        linear-gradient(0deg, rgba(8, 35, 56, .52), transparent 44%);
}

.hero-slide-content {
    position: relative;
    z-index: 2;
    display: grid;
    align-content: center;
    min-height: inherit;
    width: min(920px, calc(100% - 44px));
    padding: clamp(90px, 12vw, 150px) clamp(22px, 7vw, 92px);
    opacity: 0;
    transform: translateY(18px);
}

.hero-slide.is-active .hero-slide-content {
    animation: heroTextIn .8s ease .2s forwards;
}

.hero-slide-content h1 {
    max-width: 920px;
    margin: 0;
    font-size: clamp(2rem, 4.2vw, 4rem);
    line-height: 1.04;
}

.hero-slide-content p:not(.eyebrow) {
    max-width: 720px;
    color: rgba(255, 255, 255, .88);
    font-size: clamp(1rem, 1.45vw, 1.22rem);
}

.hero-slider-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 999px;
    background: rgba(8, 35, 56, .34);
    backdrop-filter: blur(8px);
    cursor: pointer;
    transform: translateY(-50%);
}

.hero-slider-prev {
    left: 22px;
}

.hero-slider-next {
    right: 22px;
}

.hero-slider-dots {
    position: absolute;
    right: 0;
    bottom: 32px;
    left: 0;
    z-index: 4;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.hero-slider-dots button {
    width: 11px;
    height: 11px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .78);
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
}

.hero-slider-dots button.is-active {
    width: 30px;
    background: var(--leaf);
    border-color: var(--leaf);
}

.equipment-section {
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff, var(--soft));
}

.equipment-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    max-width: 1400px;
    margin: 0 auto 22px;
}

.equipment-controls {
    display: flex;
    gap: 10px;
}

.equipment-arrow {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    color: var(--water-dark);
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--white);
    box-shadow: 0 10px 24px rgba(18, 48, 74, .08);
    cursor: pointer;
}

.equipment-carousel {
    max-width: 1400px;
    margin: 0 auto;
    overflow: hidden;
}

.equipment-track {
    display: flex;
    gap: 18px;
    transition: transform .55s ease;
    will-change: transform;
}

.equipment-card {
    flex: 0 0 calc((100% - 54px) / 4);
    overflow: hidden;
    min-height: 420px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: 0 16px 34px rgba(16, 32, 39, .08);
    transition: transform .25s ease, box-shadow .25s ease;
}

.equipment-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 48px rgba(16, 32, 39, .13);
}

.equipment-card img {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: var(--soft);
    transition: transform .45s ease;
}

.equipment-card:hover img {
    transform: scale(1.06);
}

.equipment-card-body {
    display: grid;
    gap: 10px;
    padding: 18px;
}

.equipment-card h3 {
    margin: 0;
    line-height: 1.25;
}

.equipment-card p {
    min-height: 76px;
    margin: 0;
    color: var(--muted);
    font-size: .94rem;
}

.equipment-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.equipment-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 1px solid var(--water);
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
}

.equipment-dots button.is-active {
    width: 28px;
    background: var(--water);
}

@keyframes heroKenBurns {
    from { transform: scale(1); }
    to { transform: scale(1.08); }
}

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

.hero h1,
.page-hero h1,
.article-layout h1 {
    max-width: 820px;
    margin: 0;
    font-size: clamp(2.4rem, 5vw, 4.8rem);
    line-height: 1.05;
}

.hero p {
    max-width: 660px;
    font-size: 1.15rem;
    color: var(--muted);
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 18px;
    border: 1px solid var(--water);
    border-radius: 6px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
    transform: translateY(-2px);
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(18, 48, 74, 0.14);
}

.button.primary {
    color: var(--white);
    background: linear-gradient(135deg, var(--water-dark), var(--water));
}

.button.secondary {
    color: var(--water-dark);
    background: rgba(255, 255, 255, 0.88);
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--leaf-dark);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.section,
.page-hero,
.article-layout {
    padding: clamp(42px, 7vw, 86px) clamp(18px, 5vw, 72px);
}

.page-hero {
    position: relative;
    overflow: hidden;
    min-height: 330px;
    color: var(--white);
    background:
        linear-gradient(90deg, rgba(8, 79, 143, 0.94) 0%, rgba(15, 101, 168, 0.82) 42%, rgba(31, 122, 63, 0.58) 100%),
        var(--page-bg, url("../images/page-hero-lab.png"));
    background-size: cover;
    background-position: center;
}

.page-hero .eyebrow {
    color: #b9f2d0;
}

.page-intro {
    max-width: 760px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.08rem;
}

.two-columns {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: clamp(24px, 5vw, 68px);
}

.section-heading {
    max-width: 740px;
    margin-bottom: 26px;
}

.section-heading h2,
.two-columns h2,
.contact-card h2,
.admin-panel h1 {
    margin: 0 0 12px;
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    line-height: 1.15;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.feature-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    background: var(--soft);
}

.feature-strip article {
    padding: 22px;
    border-left: 5px solid var(--leaf);
    background: var(--white);
}

.feature-strip strong,
.feature-strip span {
    display: block;
}

.feature-strip span {
    color: var(--muted);
}

.process-section {
    background: var(--soft);
}

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

.process-grid article {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
}

.process-grid span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: var(--white);
    font-weight: 800;
    background: linear-gradient(135deg, var(--water), var(--leaf));
    border-radius: 50%;
}

.process-grid h3 {
    margin: 16px 0 8px;
}

.process-grid p {
    margin: 0;
    color: var(--muted);
}

.home-final {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 28px;
    align-items: start;
}

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

.mini-news-list article,
.contact-cta {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: 0 8px 24px rgba(16, 32, 39, 0.05);
}

.mini-news-list h3,
.contact-cta h2 {
    margin: 8px 0;
}

.mini-news-list p,
.contact-cta p {
    color: var(--muted);
}

.contact-cta {
    position: sticky;
    top: 105px;
}

.card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: 0 8px 24px rgba(16, 32, 39, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.service-card {
    display: flex;
    min-width: 0;
    min-height: 100%;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
}

.service-card > :not(.service-card-image) {
    margin-left: 24px;
    margin-right: 24px;
}

.service-card > :last-child {
    margin-bottom: 24px;
}

.service-card-image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: center 28%;
    transition: transform 0.45s ease, filter 0.45s ease;
}

/* Preserve faces and field actions when portrait photos are cropped into cards. */
.service-card-image[src*="analyses-physico-chimiques"] {
    object-position: center 18%;
}

.service-card-image[src*="analyses-microbiologiques"] {
    object-position: center 30%;
}

.service-card-image[src*="analyse-forages-prives"] {
    object-position: center 20%;
}

.service-card-image[src*="suivi-trimestriel-eaux"] {
    object-position: center 24%;
}

.service-card-image[src*="intervention-pollution"] {
    object-position: center 22%;
}

.service-card:hover .service-card-image {
    transform: scale(1.045);
    filter: saturate(1.04) contrast(1.02);
}

.service-card .card-icon {
    margin-top: 20px;
}

.service-card p {
    flex: 1;
}

.admin-service-thumb {
    width: 88px;
    height: 62px;
    display: block;
    border-radius: 7px;
    object-fit: cover;
    box-shadow: 0 6px 18px rgba(18, 48, 74, .12);
}

.admin-service-preview {
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border-radius: 8px;
    background: #edf3f8;
}

.admin-service-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card:hover,
.process-grid article:hover,
.mini-news-list article:hover,
.role-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 34px rgba(16, 32, 39, 0.1);
}

.card h2,
.card h3 {
    margin: 12px 0 8px;
    line-height: 1.25;
}

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

.card-icon {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    color: var(--white);
    font-weight: 900;
    background: linear-gradient(135deg, var(--water), var(--leaf));
    border-radius: 8px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    background: linear-gradient(135deg, var(--water-dark), var(--ink));
}

.stats div {
    padding: 24px;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
}

.stats strong {
    display: block;
    font-size: 2.4rem;
    line-height: 1;
}

.stats span {
    color: rgba(255, 255, 255, 0.76);
}

.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
}

.contact-form,
.admin-form,
.login-card {
    display: grid;
    gap: 16px;
}

.inline-form {
    display: inline;
}

label {
    display: grid;
    gap: 7px;
    color: var(--ink);
    font-weight: 800;
}

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

textarea {
    resize: vertical;
}

.notice {
    padding: 12px 14px;
    border-radius: 6px;
    font-weight: 700;
}

.notice.success {
    color: var(--success);
    background: var(--water-light);
}

.notice.error {
    color: var(--danger);
    background: #fff0ed;
}

.contact-card,
.admin-panel,
.login-card {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.team-grid,
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.role-list {
    display: grid;
    gap: 22px;
}

.role-card {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 28px;
    align-items: center;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: 0 8px 24px rgba(16, 32, 39, 0.05);
}

.role-card img {
    display: block;
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 8px;
}

.role-card h2,
.role-card h3 {
    margin: 0 0 8px;
}

.role-card h2 {
    color: var(--water-dark);
}

.role-card h3 {
    color: var(--ink);
    font-size: 1.1rem;
}

.role-card p:last-child {
    color: var(--muted);
    margin-bottom: 0;
}

.person-card,
.gallery-grid figure {
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: 0 8px 24px rgba(16, 32, 39, 0.05);
}

.person-card img,
.gallery-grid img {
    display: block;
    width: 100%;
    height: 260px;
    object-fit: cover;
}

.person-card h3,
.person-card p,
.gallery-grid figcaption {
    margin: 0;
    padding: 0 16px 16px;
}

.person-card h3 {
    padding-top: 16px;
}

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

.gallery-grid figcaption {
    padding-top: 14px;
    font-weight: 800;
}

.document-list {
    display: grid;
    gap: 16px;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    color: var(--water-dark);
    font-size: 0.82rem;
    font-weight: 800;
    background: #e7f7f3;
    border-radius: 999px;
}

.floating-whatsapp {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 30;
    display: block;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 50%;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease;
}

.floating-whatsapp:hover {
    transform: scale(1.06);
}

.floating-whatsapp img {
    display: block;
    width: 100%;
    height: 100%;
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.animate-on-scroll.in-view {
    opacity: 1;
    transform: translateY(0);
}

.article-layout {
    max-width: 900px;
    margin: 0 auto;
}

.lead {
    color: var(--muted);
    font-size: 1.2rem;
}

.article-body {
    margin-top: 28px;
    font-size: 1.08rem;
}

.article-cover {
    display: block;
    width: 100%;
    max-height: 430px;
    margin-bottom: 28px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(16, 32, 39, 0.1);
}

.admin-version-list {
    display: grid;
    gap: 8px;
    margin-top: 22px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--soft);
}

.admin-version-list h3 {
    margin: 0;
}

.site-footer {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    padding: 42px clamp(18px, 5vw, 72px);
    color: rgba(255, 255, 255, 0.82);
    background: linear-gradient(135deg, var(--ink), #082238);
}

.site-footer a {
    color: var(--white);
}

.site-footer strong {
    color: var(--white);
}

.footer-logo {
    display: block;
    width: 58px;
    height: 58px;
    object-fit: contain;
    margin-bottom: 10px;
    padding: 4px;
    border-radius: 12px;
    background: var(--white);
}

.footer-socials {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.footer-socials a {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    transition: transform .2s ease, background .2s ease;
}

.footer-socials a:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, .2);
}

.footer-socials svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.admin-body {
    background: var(--soft);
}

.admin-main {
    padding: 28px clamp(18px, 5vw, 72px);
}

.dashboard-hero,
.dashboard-grid,
.dashboard-layout {
    max-width: 1280px;
    margin: 0 auto 24px;
}

.dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: stretch;
    padding: 30px;
    color: var(--white);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(8, 79, 143, 0.96), rgba(15, 101, 168, 0.88), rgba(31, 122, 63, 0.72)),
        url("../images/hero-laboratoire.png");
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow);
}

.dashboard-hero h1 {
    margin: 0;
    font-size: clamp(2.2rem, 4vw, 4rem);
    line-height: 1.05;
}

.dashboard-hero p {
    max-width: 780px;
    color: rgba(255, 255, 255, 0.86);
}

.dashboard-hero .eyebrow {
    color: #b9f2d0;
}

.dashboard-hero-card {
    display: grid;
    align-content: center;
    gap: 8px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
}

.dashboard-hero-card span,
.dashboard-hero-card small {
    color: rgba(255, 255, 255, 0.78);
}

.dashboard-hero-card strong {
    font-size: 1.25rem;
}

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

.kpi-card {
    display: grid;
    gap: 8px;
    min-height: 150px;
    padding: 22px;
    color: var(--white);
    border-radius: 16px;
    box-shadow: 0 14px 36px rgba(18, 48, 74, 0.14);
}

.kpi-card span,
.kpi-card small {
    color: rgba(255, 255, 255, 0.82);
}

.kpi-card strong {
    font-size: 2.7rem;
    line-height: 1;
}

.kpi-blue {
    background: linear-gradient(145deg, #084f8f, #0f65a8);
}

.kpi-green {
    background: linear-gradient(145deg, #1f7a3f, #39a35b);
}

.kpi-cyan {
    background: linear-gradient(145deg, #08758f, #21a8b6);
}

.kpi-gold {
    background: linear-gradient(145deg, #b7791f, #f2b84b);
}

.dashboard-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    align-items: start;
}

.dashboard-main,
.dashboard-side {
    display: grid;
    gap: 24px;
}

.dashboard-side {
    position: sticky;
    top: 110px;
}

.dashboard-panel {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 30px rgba(18, 48, 74, 0.08);
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.panel-heading h2,
.dashboard-panel h2 {
    margin: 0;
}

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

.workflow-modern a,
.module-grid a {
    color: var(--ink);
    text-decoration: none;
}

.workflow-modern a {
    display: grid;
    gap: 8px;
    min-height: 145px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff, #f7fcfd);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.workflow-modern a:hover,
.module-grid a:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(18, 48, 74, 0.1);
}

.workflow-modern span {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: var(--white);
    font-weight: 800;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--water), var(--leaf));
}

.workflow-modern small,
.module-grid span,
.status-list span,
.progress-item span {
    color: var(--muted);
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.module-grid a {
    display: grid;
    gap: 8px;
    min-height: 105px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.progress-item {
    display: grid;
    gap: 8px;
    margin-top: 18px;
}

.progress-item div,
.status-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

meter {
    width: 100%;
    height: 14px;
}

.status-list {
    display: grid;
    gap: 14px;
    padding: 0;
    margin: 18px 0 0;
    list-style: none;
}

.status-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.admin-panel {
    max-width: 1100px;
    margin: 0 auto 28px;
}

.admin-workflow,
.admin-shortcuts {
    display: grid;
    gap: 16px;
}

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

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

.admin-workflow a,
.admin-shortcuts a {
    color: var(--ink);
    text-decoration: none;
}

.admin-workflow a {
    display: grid;
    gap: 8px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: 0 8px 24px rgba(16, 32, 39, 0.05);
}

.admin-workflow span,
.admin-shortcuts span {
    color: var(--muted);
}

.table-wrap {
    overflow-x: auto;
    margin-top: 24px;
}

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

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

.message-list {
    display: grid;
    gap: 16px;
}

.cms-panel .dashboard-grid {
    margin-top: 18px;
}

.cms-seed-form {
    margin-top: 18px;
}

.checkbox-line {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-line input {
    width: auto;
}

.permission-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    margin: 6px 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(37, 99, 235, 0.04);
}

.permission-grid legend {
    padding: 0 8px;
    color: var(--dark);
    font-weight: 800;
}

.permission-grid .checkbox-line {
    align-items: flex-start;
    padding: 10px 12px;
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 14px;
    background: var(--white);
}

.cms-tabs {
    display: flex;
    gap: 8px;
    margin: 0 0 22px;
    padding: 6px;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--white);
}

.cms-tabs a {
    flex: 0 0 auto;
    padding: 11px 18px;
    border-radius: 11px;
    color: var(--muted);
    font-weight: 700;
}

.cms-tabs a.is-active {
    color: #fff;
    background: #2563eb;
}

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

.cms-overview-layout {
    margin-bottom: 22px;
}

.cms-page-list,
.cms-recent-list {
    display: grid;
    gap: 10px;
}

.cms-page-list article {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 16px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.cms-page-list article > div:first-child,
.cms-recent-list a {
    display: grid;
    gap: 4px;
}

.cms-row-actions {
    display: flex;
    gap: 12px;
}

.cms-row-actions a {
    color: #2563eb;
    font-weight: 700;
}

.cms-recent-list a {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.cms-recent-list .badge {
    justify-self: start;
}

.cms-status-published {
    color: #087443;
    background: #dcfce7;
}

.cms-status-draft,
.cms-status-pending {
    color: #92400e;
    background: #fef3c7;
}

.cms-section-filter {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.cms-section-filter form {
    width: min(100%, 440px);
}

.cms-media-editor {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 10px 0;
}

.cms-media-editor summary {
    cursor: pointer;
    color: #2563eb;
    font-weight: 700;
}

.cms-media-editor .admin-form {
    margin-top: 12px;
}

.admin-version-list article {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.cms-workspace .dashboard-side {
    top: 18px;
}

.cms-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
}

.cms-media-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--white);
}

.cms-media-card img,
.cms-section-image {
    width: 100%;
    height: 190px;
    object-fit: cover;
    border-radius: 8px;
}

.cms-media-card small {
    overflow-wrap: anywhere;
}

.cms-file-icon {
    display: grid;
    place-items: center;
    min-height: 150px;
    border-radius: 8px;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: 1.4rem;
    font-weight: 800;
}

.cms-settings-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.cms-settings-grid .button {
    align-self: end;
}

.cms-footer-settings {
    margin-bottom: 22px;
}

.cms-bulk-publish {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 440px);
    gap: 24px;
    align-items: end;
    margin-bottom: 22px;
}

.cms-bulk-publish .admin-form {
    margin: 0;
}

.cms-related-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.cms-related-tools .erp-head-actions {
    flex-wrap: wrap;
}

.cms-preview-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 12px 18px;
    color: #fff;
    background: #0f172a;
}

.cms-preview-banner a {
    color: #93c5fd;
    font-weight: 700;
}

.cms-content-section .cms-rich-text {
    color: var(--muted);
    line-height: 1.85;
}

.cms-faq {
    display: grid;
    gap: 12px;
}

.cms-faq details {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
}

.cms-faq summary {
    cursor: pointer;
    font-weight: 700;
}

.team-contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.team-contact-actions .button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.whatsapp-button {
    color: #fff;
    background: #168a50;
    border-color: #168a50;
}

.whatsapp-button:hover {
    color: #fff;
    background: #10713f;
}

.whatsapp-button img,
.public-contact-whatsapp img {
    width: 20px;
    height: 20px;
}

.public-contact-list {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.public-contact-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
}

.public-contact-item > div {
    display: grid;
    gap: 3px;
}

.public-contact-item small {
    color: var(--muted);
}

.public-contact-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: .75rem;
    font-weight: 800;
}

.public-contact-whatsapp {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #168a50;
}

.site-nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.site-submenu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 30;
    display: none;
    min-width: 220px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: 0 16px 40px rgba(15, 23, 42, .14);
}

.site-nav-dropdown:hover .site-submenu,
.site-nav-dropdown:focus-within .site-submenu {
    display: grid;
}

.site-submenu a {
    padding: 10px 12px;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .cms-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cms-bulk-publish {
        grid-template-columns: 1fr;
    }

    .cms-related-tools {
        align-items: stretch;
        flex-direction: column;
    }

    .site-nav-dropdown {
        display: grid;
        width: 100%;
    }

    .site-submenu {
        position: static;
        display: grid;
        margin-left: 14px;
        border: 0;
        box-shadow: none;
    }

    .cms-preview-banner {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }
}

@media (max-width: 560px) {
    .cms-overview-grid {
        grid-template-columns: 1fr;
    }

    .cms-page-list article {
        grid-template-columns: 1fr;
    }

    .cms-section-filter,
    .admin-version-list article {
        align-items: stretch;
        flex-direction: column;
    }

    .team-contact-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .team-contact-actions .button {
        justify-content: center;
        width: 100%;
    }

    .public-contact-item {
        grid-template-columns: 38px minmax(0, 1fr) auto;
        padding: 12px;
    }
}

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

.media-list article {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--white);
}

.media-list img {
    width: 100%;
    max-height: 150px;
    object-fit: cover;
    border-radius: 10px;
}

.cms-admin-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    overflow: visible;
}

.cms-admin-layout .dashboard-side {
    position: static;
    min-width: 0;
}

.cms-admin-layout .dashboard-main {
    min-width: 0;
}

.cms-admin-layout .table-wrap {
    max-width: 100%;
    overflow-x: auto;
}

.cms-admin-layout table {
    min-width: 900px;
}

.cms-admin-layout .admin-panel {
    overflow: hidden;
}

.login-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 18px;
    background: var(--soft);
}

.maintenance-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(244, 251, 253, .96), rgba(255, 255, 255, .9)),
        url("../images/hero-laboratoire.png") center/cover;
}

.maintenance-card {
    width: min(100%, 620px);
    padding: clamp(28px, 5vw, 52px);
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .94);
    box-shadow: var(--shadow);
}

.maintenance-card .brand-logo {
    margin: 0 auto 18px;
}

.maintenance-card h1 {
    margin: 0 0 12px;
    font-size: clamp(2rem, 5vw, 3.5rem);
}

.login-card {
    width: min(100%, 430px);
}

.admin-login-page {
    min-height: 100vh;
    padding: clamp(18px, 4vw, 46px);
    background:
        radial-gradient(circle at 18% 18%, rgba(37, 99, 235, .18), transparent 28%),
        linear-gradient(135deg, #f8fbff 0%, #eef6fb 48%, #ffffff 100%);
}

.admin-login-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 470px);
    align-items: stretch;
    width: min(1120px, 100%);
    min-height: min(720px, calc(100vh - 80px));
    overflow: hidden;
    border: 1px solid rgba(215, 231, 239, .9);
    border-radius: 22px;
    background: rgba(255, 255, 255, .84);
    box-shadow: 0 28px 70px rgba(18, 48, 74, .16);
    backdrop-filter: blur(18px);
}

.admin-login-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    padding: clamp(30px, 6vw, 68px);
    color: #fff;
    background:
        linear-gradient(rgba(8, 79, 143, .82), rgba(18, 48, 74, .9)),
        url('../images/hero-laboratoire.png') center/cover;
}

.admin-login-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: fit-content;
    color: #fff;
    text-decoration: none;
}

.admin-login-brand span {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 16px;
    color: var(--water);
    background: #fff;
    font-weight: 800;
}

.admin-login-panel h1 {
    max-width: 620px;
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.05;
}

.admin-login-panel p {
    max-width: 620px;
    margin: 0;
    color: rgba(255, 255, 255, .84);
}

.admin-login-security {
    display: grid;
    gap: 10px;
    max-width: 520px;
    padding: 0;
    margin: 18px 0 0;
    list-style: none;
}

.admin-login-security li {
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 14px;
    background: rgba(255, 255, 255, .1);
    font-weight: 700;
}

.admin-login-card {
    align-content: center;
    width: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: clamp(28px, 5vw, 58px);
}

.admin-login-card h2 {
    margin: 0;
    font-size: 1.8rem;
}

.admin-login-card p {
    margin: 0;
    color: var(--muted);
}

.admin-login-card input {
    min-height: 52px;
    border-radius: 12px;
}

.admin-login-card .button {
    min-height: 52px;
    border-radius: 12px;
}

.admin-login-card .login-help {
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--soft);
}

@media (max-width: 900px) {
    .menu-toggle {
        display: block;
    }

    .site-nav {
        position: absolute;
        top: 75px;
        right: 18px;
        left: 18px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        background: var(--white);
        border: 1px solid var(--line);
        border-radius: 8px;
        box-shadow: var(--shadow);
    }

    .site-nav.is-open {
        display: flex;
    }

    .hero,
    .two-columns,
    .contact-layout {
        grid-template-columns: 1fr;
    }

    .card-grid,
    .feature-strip,
    .process-grid,
    .home-final,
    .dashboard-hero,
    .dashboard-grid,
    .dashboard-layout,
    .workflow-modern,
    .module-grid,
    .team-grid,
    .gallery-grid,
    .role-card,
    .stats,
    .admin-workflow,
    .admin-shortcuts,
    .site-footer {
        grid-template-columns: 1fr;
    }

    .admin-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .equipment-card {
        flex-basis: calc((100% - 18px) / 2);
    }

    .equipment-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-nav {
        flex-wrap: wrap;
    }
}

/* Interface ERP/CRM premium du backend LARQEK. */
:root {
    --erp-primary: #2563eb;
    --erp-primary-dark: #1d4ed8;
    --erp-bg: #f6f8fb;
    --erp-surface: #ffffff;
    --erp-surface-soft: #f8fafc;
    --erp-text: #0f172a;
    --erp-muted: #64748b;
    --erp-border: #e2e8f0;
    --erp-success: #10b981;
    --erp-warning: #f59e0b;
    --erp-danger: #ef4444;
    --erp-shadow: 0 18px 45px rgba(15, 23, 42, .08);
    --erp-radius: 18px;
}

[data-theme="dark"] {
    --erp-bg: #0f172a;
    --erp-surface: #111827;
    --erp-surface-soft: #1f2937;
    --erp-text: #f8fafc;
    --erp-muted: #94a3b8;
    --erp-border: #334155;
    --erp-shadow: 0 18px 45px rgba(0, 0, 0, .32);
}

.erp-shell {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    min-height: 100vh;
    background:
        radial-gradient(circle at 82% 0%, rgba(37, 99, 235, .12), transparent 28%),
        var(--erp-bg);
    color: var(--erp-text);
    font-family: "Poppins", Arial, sans-serif;
}

.erp-sidebar {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-self: stretch;
    min-height: 100vh;
    height: auto;
    overflow: visible;
    padding: 24px 18px;
    background: rgba(255, 255, 255, .88);
    border-right: 1px solid var(--erp-border);
    box-shadow: 18px 0 55px rgba(15, 23, 42, .04);
    backdrop-filter: blur(18px);
}

[data-theme="dark"] .erp-sidebar {
    background: rgba(17, 24, 39, .9);
}

.erp-logo,
.erp-profile,
.erp-logout,
.erp-nav a {
    color: inherit;
    text-decoration: none;
}

.erp-logo {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 4px;
}

.erp-logo-mark,
.erp-avatar,
.erp-kpi-icon {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    color: #fff;
    background: linear-gradient(145deg, var(--erp-primary), #60a5fa);
    box-shadow: 0 12px 24px rgba(37, 99, 235, .25);
}

.erp-logo-mark {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    font-weight: 800;
}

.erp-logo strong,
.erp-profile strong {
    display: block;
    font-size: 1rem;
}

.erp-logo small,
.erp-profile small,
.erp-welcome span,
.erp-card small,
.erp-client-table small {
    display: block;
    color: var(--erp-muted);
}

.erp-nav,
.erp-sidebar-group {
    display: grid;
    gap: 6px;
}

.erp-nav-section {
    display: grid;
    gap: 6px;
}

.erp-nav-section summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 38px;
    padding: 8px 12px;
    color: var(--erp-muted);
    border-radius: 12px;
    cursor: pointer;
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
    list-style: none;
}

.erp-nav-section summary::-webkit-details-marker {
    display: none;
}

.erp-nav-section summary::after {
    content: "+";
    color: var(--erp-primary);
    font-size: 1rem;
}

.erp-nav-section[open] summary {
    color: var(--erp-text);
    background: rgba(37, 99, 235, .08);
}

.erp-nav-section[open] summary::after {
    content: "-";
}

.erp-nav-section-links {
    display: grid;
    gap: 6px;
}

.erp-sidebar-group {
    padding-top: 8px;
    border-top: 1px solid var(--erp-border);
}

.erp-sidebar-group p {
    margin: 0 0 2px;
    color: var(--erp-muted);
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.erp-nav a,
.erp-logout {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 40px;
    padding: 8px 12px;
    border-radius: 12px;
    color: var(--erp-muted);
    font-weight: 600;
    transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}

.erp-nav a .admin-icon,
.erp-logout span {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 10px;
    color: var(--erp-primary);
    background: rgba(37, 99, 235, .1);
    font-size: .68rem;
    font-weight: 800;
}

.admin-icon::before {
    content: "";
    display: block;
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-radius: 4px;
}

.admin-icon-grid::before {
    box-shadow: inset 5px 0 0 transparent, inset -5px 0 0 transparent;
}

.admin-icon-clipboard::before,
.admin-icon-file::before {
    border-radius: 3px;
    border-top-width: 4px;
}

.admin-icon-vial::before {
    width: 10px;
    height: 16px;
    border-radius: 2px 2px 6px 6px;
}

.admin-icon-chart::before {
    width: 16px;
    height: 12px;
    border-top: 0;
    border-right: 0;
    transform: skew(-8deg);
}

.admin-icon-check::before {
    width: 15px;
    height: 8px;
    border-top: 0;
    border-right: 0;
    border-radius: 0;
    transform: rotate(-45deg);
}

.admin-icon-wallet::before {
    height: 12px;
    border-radius: 5px;
}

.admin-icon-users::before,
.admin-icon-presence::before {
    width: 15px;
    height: 15px;
    border-radius: 999px;
}

.admin-icon-layout::before {
    width: 16px;
    height: 12px;
    border-radius: 3px;
    box-shadow: inset 0 5px 0 currentColor;
}

.admin-icon-message::before {
    width: 16px;
    height: 12px;
    border-radius: 5px;
}

.admin-icon-folder::before {
    width: 16px;
    height: 11px;
    border-radius: 3px;
}

.admin-icon-audit::before,
.admin-icon-settings::before {
    width: 14px;
    height: 14px;
    border-radius: 999px;
}

.erp-nav a:hover,
.erp-nav a.is-active {
    color: #fff;
    background: linear-gradient(135deg, var(--erp-primary), var(--erp-primary-dark));
    box-shadow: 0 14px 30px rgba(37, 99, 235, .28);
    transform: translateY(-1px);
}

.erp-nav a:hover .admin-icon,
.erp-nav a.is-active .admin-icon {
    color: #fff;
    background: rgba(255, 255, 255, .18);
}

.erp-logout {
    margin-top: 4px;
    color: var(--erp-danger);
}

.erp-main {
    min-width: 0;
}

.erp-topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) minmax(240px, .8fr) auto auto auto auto auto;
    align-items: center;
    gap: 14px;
    padding: 24px 34px;
    background: rgba(246, 248, 251, .82);
    border-bottom: 1px solid rgba(226, 232, 240, .7);
    backdrop-filter: blur(18px);
}

[data-theme="dark"] .erp-topbar {
    background: rgba(15, 23, 42, .82);
    border-color: var(--erp-border);
}

.erp-welcome p {
    margin: 0 0 3px;
    color: var(--erp-text);
    font-size: clamp(1.1rem, 1.8vw, 1.45rem);
    font-weight: 800;
}

.erp-search input {
    width: 100%;
    min-height: 46px;
    padding: 0 16px;
    border: 1px solid var(--erp-border);
    border-radius: 15px;
    color: var(--erp-text);
    background: var(--erp-surface);
    box-shadow: 0 10px 22px rgba(15, 23, 42, .04);
    font: inherit;
}

.erp-icon-btn {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 1px solid var(--erp-border);
    border-radius: 15px;
    color: var(--erp-text);
    background: var(--erp-surface);
    box-shadow: 0 10px 22px rgba(15, 23, 42, .04);
    font-size: .7rem;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.erp-dot {
    position: absolute;
    top: 9px;
    right: 9px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--erp-danger);
}

.erp-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 190px;
    padding: 8px 10px;
    border: 1px solid var(--erp-border);
    border-radius: 18px;
    background: var(--erp-surface);
    box-shadow: 0 10px 22px rgba(15, 23, 42, .04);
}

.erp-session-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 16px;
    border-radius: 15px;
    color: #fff;
    background: linear-gradient(135deg, var(--erp-primary), var(--erp-primary-dark));
    box-shadow: 0 12px 24px rgba(37, 99, 235, .22);
    font-size: .86rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.erp-session-link:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.erp-avatar {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-weight: 800;
    object-fit: cover;
}

.profile-photo-preview {
    width: 118px;
    height: 118px;
    margin-bottom: 18px;
    overflow: hidden;
    border: 3px solid var(--water-light);
    border-radius: 24px;
    box-shadow: 0 14px 30px rgba(18, 48, 74, .12);
}

.profile-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-admin-preview {
    width: 150px;
    height: 150px;
    overflow: hidden;
    border: 1px solid var(--erp-border);
    border-radius: 18px;
    background: var(--erp-surface-soft);
    box-shadow: 0 14px 30px rgba(15, 23, 42, .08);
}

.team-admin-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.erp-content {
    width: min(100%, 1520px);
    margin: 0 auto;
    padding: 30px 34px 44px;
}

.erp-dashboard-head,
.erp-card-heading,
.erp-kpi-top,
.erp-head-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.erp-dashboard-head {
    margin-bottom: 24px;
}

.erp-dashboard-head h1 {
    margin: 4px 0 6px;
    color: var(--erp-text);
    font-size: clamp(1.7rem, 3vw, 2.6rem);
    line-height: 1.05;
}

.erp-dashboard-head span {
    color: var(--erp-muted);
}

.erp-kpi-grid,
.erp-widget-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.erp-kpi-card,
.erp-card {
    border: 1px solid var(--erp-border);
    border-radius: var(--erp-radius);
    background: var(--erp-surface);
    box-shadow: var(--erp-shadow);
}

.erp-kpi-card {
    padding: 20px;
    transition: transform .22s ease, box-shadow .22s ease;
}

.erp-kpi-card:hover,
.erp-card:hover {
    transform: translateY(-3px);
}

.erp-module-card {
    color: inherit;
    text-decoration: none;
}

.erp-module-card:hover {
    text-decoration: none;
}

.erp-module-card .erp-kpi-top small {
    color: var(--erp-muted);
    font-weight: 700;
}

.erp-kpi-icon {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    font-size: .72rem;
    font-weight: 800;
}

.erp-kpi-card p {
    margin: 18px 0 4px;
    color: var(--erp-muted);
    font-weight: 600;
}

.erp-kpi-card strong {
    display: block;
    color: var(--erp-text);
    font-size: clamp(1.35rem, 2vw, 1.85rem);
    line-height: 1.12;
}

.erp-change {
    display: block;
    margin-top: 12px;
    font-size: .83rem;
    font-weight: 700;
}

.erp-change.up {
    color: var(--erp-success);
}

.erp-change.down {
    color: var(--erp-danger);
}

.erp-sparkline {
    width: 92px;
    height: 34px;
}

.erp-sparkline polyline,
.erp-mini-curve path {
    fill: none;
    stroke: var(--erp-primary);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.erp-analytics-grid {
    display: grid;
    grid-template-columns: 1.7fr 1fr 1fr;
    gap: 18px;
    margin-top: 18px;
}

.erp-lab-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.erp-workflow {
    margin-top: 18px;
}

.finance-layout {
    margin-top: 18px;
}

.dynamic-table-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 18px 0;
}

.dynamic-table-toolbar input,
.dynamic-table-toolbar select {
    min-height: 44px;
    border: 1px solid var(--erp-border);
    border-radius: 12px;
    padding: 0 14px;
    background: var(--erp-panel);
    color: var(--erp-text);
    font: inherit;
}

.dynamic-table-toolbar input {
    min-width: min(320px, 100%);
    flex: 1 1 280px;
}

.security-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.admin-maintenance-alert {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid #facc15;
    border-radius: 14px;
    background: #fef9c3;
    color: #713f12;
}

.admin-maintenance-alert strong {
    color: #854d0e;
}

.admin-maintenance-alert a {
    margin-left: auto;
    color: #1d4ed8;
    font-weight: 700;
}

.form-help {
    margin: -4px 0 6px;
    color: var(--erp-muted, #64748b);
    font-size: .92rem;
}

.document-file-type {
    display: inline-grid;
    min-width: 42px;
    height: 30px;
    margin-right: 8px;
    place-items: center;
    border-radius: 8px;
    background: rgba(37, 99, 235, .12);
    color: var(--erp-primary, #2563eb);
    font-size: .75rem;
    font-weight: 800;
}

.erp-card {
    padding: 22px;
    transition: transform .22s ease;
}

.erp-card h2 {
    margin: 0;
    color: var(--erp-text);
    font-size: 1.05rem;
}

.erp-revenue-card {
    grid-row: span 2;
}

.erp-line-chart {
    width: 100%;
    height: 320px;
    margin-top: 16px;
}

.erp-line-chart .grid {
    stroke: var(--erp-border);
    stroke-width: 1;
}

.erp-line-chart .area {
    fill: url(#revenueFill);
}

.erp-line-chart .line {
    fill: none;
    stroke: var(--erp-primary);
    stroke-width: 5;
    stroke-linecap: round;
}

.erp-line-chart circle {
    fill: var(--erp-surface);
    stroke: var(--erp-primary);
    stroke-width: 5;
}

.erp-pie-wrap {
    display: grid;
    grid-template-columns: 150px 1fr;
    align-items: center;
    gap: 18px;
    margin-top: 18px;
}

.erp-pie-chart {
    display: grid;
    place-items: center;
    width: 150px;
    aspect-ratio: 1;
    border-radius: 999px;
    background: conic-gradient(#2563eb 0 40%, #10b981 40% 65%, #f59e0b 65% 85%, #8b5cf6 85% 100%);
}

.erp-pie-chart span {
    display: grid;
    place-items: center;
    width: 82px;
    aspect-ratio: 1;
    border-radius: inherit;
    color: var(--erp-text);
    background: var(--erp-surface);
    font-weight: 800;
}

.erp-legend {
    display: grid;
    gap: 11px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.erp-legend li {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--erp-muted);
    font-size: .88rem;
}

.erp-legend b {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--erp-primary);
}

.erp-legend li:nth-child(2) b {
    background: var(--erp-success);
}

.erp-legend li:nth-child(3) b {
    background: var(--erp-warning);
}

.erp-legend li:nth-child(4) b {
    background: #8b5cf6;
}

.erp-legend strong {
    margin-left: auto;
    color: var(--erp-text);
}

.erp-bars,
.erp-histogram {
    display: flex;
    align-items: end;
    gap: 12px;
    height: 150px;
    margin-top: 20px;
}

.erp-bars span,
.erp-histogram span {
    flex: 1;
    height: var(--bar);
    min-height: 22px;
    border-radius: 12px 12px 5px 5px;
    background: linear-gradient(180deg, #60a5fa, var(--erp-primary));
    animation: growBar .75s ease both;
}

.erp-histogram span {
    background: linear-gradient(180deg, #34d399, #059669);
}

.erp-mini-curve {
    width: 100%;
    height: 145px;
    margin-top: 18px;
}

.erp-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 11px;
    border-radius: 999px;
    color: var(--erp-primary);
    background: rgba(37, 99, 235, .1);
    font-size: .75rem;
    font-weight: 800;
}

.erp-chip.success {
    color: var(--erp-success);
    background: rgba(16, 185, 129, .12);
}

.erp-chip.warning {
    color: var(--erp-warning);
    background: rgba(245, 158, 11, .14);
}

.erp-data-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(320px, .75fr);
    gap: 18px;
    margin-top: 18px;
}

.erp-table-wrap {
    overflow-x: auto;
    margin-top: 14px;
}

.erp-client-table {
    width: 100%;
    min-width: 860px;
    border-collapse: collapse;
}

.erp-client-table th,
.erp-client-table td {
    padding: 15px 12px;
    text-align: left;
    border-bottom: 1px solid var(--erp-border);
}

.erp-client-table th {
    color: var(--erp-muted);
    background: var(--erp-surface-soft);
    font-size: .8rem;
    font-weight: 700;
}

.erp-client-table th:first-child {
    border-radius: 12px 0 0 12px;
}

.erp-client-table th:last-child {
    border-radius: 0 12px 12px 0;
}

.erp-client-table td {
    color: var(--erp-text);
    font-size: .9rem;
}

.erp-status {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--erp-primary);
    background: rgba(37, 99, 235, .1);
    font-size: .78rem;
    font-weight: 800;
}

.erp-actions {
    white-space: nowrap;
}

.erp-actions a {
    margin-right: 10px;
    color: var(--erp-primary);
    font-weight: 700;
    text-decoration: none;
}

.erp-feed {
    display: grid;
    gap: 16px;
    margin-top: 16px;
}

.erp-feed article {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 12px;
    align-items: start;
}

.erp-feed article > span {
    width: 36px;
    height: 36px;
    border-radius: 13px;
    background: linear-gradient(145deg, rgba(37, 99, 235, .16), rgba(16, 185, 129, .14));
}

.erp-feed strong {
    display: block;
    color: var(--erp-text);
    font-size: .9rem;
}

.erp-widget-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-top: 18px;
}

.erp-widget-number {
    margin: 12px 0 4px;
    color: var(--erp-primary);
    font-size: 2.2rem;
    font-weight: 800;
}

.erp-progress {
    height: 10px;
    margin: 18px 0 12px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--erp-surface-soft);
}

.erp-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--erp-primary), var(--erp-success));
}

.erp-footer {
    display: flex;
    justify-content: center;
    gap: 22px;
    padding: 0 34px 28px;
    color: var(--erp-muted);
    font-size: .85rem;
}

.erp-footer a {
    color: var(--erp-primary);
    text-decoration: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@keyframes growBar {
    from {
        transform: scaleY(.35);
        transform-origin: bottom;
        opacity: .45;
    }
    to {
        transform: scaleY(1);
        transform-origin: bottom;
        opacity: 1;
    }
}

@media (max-width: 1280px) {
    .erp-shell {
        grid-template-columns: 240px minmax(0, 1fr);
    }

    .erp-topbar {
        grid-template-columns: 1fr 1fr auto auto auto;
    }

    .erp-profile,
    .erp-kpi-grid,
    .erp-widget-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .erp-analytics-grid,
    .erp-lab-grid,
    .erp-data-grid,
    .cms-admin-layout {
        grid-template-columns: 1fr;
    }

    .cms-admin-layout .dashboard-side {
        position: static;
    }
}

@media (max-width: 820px) {
    .erp-shell {
        display: block;
    }

    .erp-sidebar {
        position: static;
        height: auto;
        padding: 18px;
    }

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

    .erp-topbar {
        position: static;
        grid-template-columns: 1fr;
        padding: 18px;
    }

    .erp-icon-btn {
        display: none;
    }

    .erp-content {
        padding: 20px 18px 32px;
    }

    .erp-dashboard-head,
    .erp-head-actions,
    .erp-card-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .erp-kpi-grid,
    .erp-widget-grid {
        grid-template-columns: 1fr;
    }

    .equipment-card {
        flex-basis: 100%;
    }

    .erp-pie-wrap {
        grid-template-columns: 1fr;
    }

    .erp-footer {
        flex-direction: column;
        padding: 0 18px 24px;
    }

    .admin-login-shell {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .admin-login-panel {
        min-height: 360px;
    }
}

/* Couche responsive finale : stabilise le site public et le backend sur desktop, tablette et mobile. */
img,
video,
iframe {
    max-width: 100%;
}

.table-wrap,
.erp-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-wrap table,
.erp-table-wrap table {
    min-width: 760px;
}

@media (max-width: 1180px) {
    .site-header {
        padding-inline: 24px;
    }

    .brand {
        min-width: auto;
    }

    .site-nav {
        gap: 12px;
    }

    .site-nav a {
        font-size: .88rem;
    }

    .hero-slider {
        min-height: 720px;
    }

    .hero-slide-content {
        width: min(820px, calc(100% - 36px));
    }

    .section,
    .page-hero {
        padding-inline: 28px;
    }

    .erp-shell {
        grid-template-columns: 260px minmax(0, 1fr);
    }

    .erp-topbar {
        grid-template-columns: minmax(0, 1fr) minmax(220px, 360px) auto auto;
    }

    .erp-profile {
        display: none;
    }
}

@media (max-width: 900px) {
    body {
        overflow-x: hidden;
    }

    .site-header {
        min-height: 72px;
        padding: 12px 18px;
    }

    .brand span {
        max-width: min(62vw, 360px);
    }

    .brand small {
        white-space: normal;
        line-height: 1.25;
    }

    .site-nav {
        max-height: calc(100vh - 96px);
        overflow-y: auto;
    }

    .site-nav a,
    .language-switch {
        width: 100%;
    }

    .language-switch {
        justify-content: center;
    }

    .hero-slider {
        min-height: 620px;
    }

    .hero-slide-content {
        width: 100%;
        padding: 110px 22px 92px;
    }

    .hero-slide-content h1,
    .page-hero h1 {
        font-size: clamp(2rem, 8vw, 3.5rem);
        line-height: 1.12;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
        width: min(100%, 360px);
    }

    .hero-actions .button {
        justify-content: center;
        width: 100%;
    }

    .hero-slider-arrow {
        top: auto;
        bottom: 72px;
        transform: none;
    }

    .hero-slider-prev {
        left: 18px;
    }

    .hero-slider-next {
        right: 18px;
    }

    .section,
    .page-hero {
        padding: 56px 20px;
    }

    .equipment-carousel,
    .equipment-track,
    .dynamic-table-toolbar {
        min-width: 0;
    }

    .dynamic-table-toolbar {
        flex-direction: column;
    }

    .dynamic-table-toolbar input,
    .dynamic-table-toolbar select,
    .dynamic-table-toolbar .button {
        width: 100%;
    }
}

@media (max-width: 820px) {
    .erp-sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--erp-border);
        max-height: none;
    }

    .erp-logo {
        margin-bottom: 8px;
    }

    .erp-nav {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .erp-nav-section-links {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .erp-nav a {
        min-height: 44px;
        padding: 10px;
        font-size: .9rem;
    }

    .erp-topbar {
        gap: 12px;
    }

    .erp-search,
    .erp-search input {
        width: 100%;
    }

    .erp-session-link {
        justify-self: start;
    }

    .dashboard-layout,
    .finance-layout,
    .cms-admin-layout {
        grid-template-columns: 1fr;
    }

    .dashboard-side {
        position: static;
    }
}

@media (max-width: 560px) {
    body {
        font-size: 15px;
    }

    .brand-logo {
        width: 38px;
        height: 38px;
    }

    .brand strong {
        font-size: .95rem;
    }

    .hero-slider {
        min-height: 560px;
    }

    .hero-slide-content {
        padding: 96px 18px 92px;
    }

    .hero-slide-content p,
    .page-intro,
    .section-heading p {
        font-size: .98rem;
    }

    .hero-slider-arrow {
        width: 40px;
        height: 40px;
    }

    .card,
    .admin-panel,
    .erp-kpi-card,
    .contact-card,
    .login-card {
        border-radius: 14px;
    }

    .admin-panel,
    .erp-kpi-card {
        padding: 18px;
    }

    .erp-nav-section-links {
        grid-template-columns: 1fr;
    }

    .erp-content {
        padding: 16px 12px 28px;
    }

    .erp-dashboard-head {
        padding: 20px;
    }

    .erp-dashboard-head h1,
    .admin-panel h1 {
        font-size: clamp(1.6rem, 8vw, 2.2rem);
    }

    .table-wrap table,
    .erp-table-wrap table {
        min-width: 680px;
    }

    .site-footer {
        gap: 18px;
        padding: 32px 20px;
    }

    .floating-whatsapp {
        right: 14px;
        bottom: 14px;
    }
}

.report-workspace {
    align-items: start;
}

.report-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.report-document {
    background: #fff;
    border: 1px solid #dbe8f5;
    border-radius: 18px;
    color: #0b1f36;
    display: grid;
    gap: 22px;
    padding: clamp(20px, 3vw, 38px);
}

.report-document-header {
    align-items: center;
    border-bottom: 2px solid #dbe8f5;
    display: grid;
    gap: 16px;
    grid-template-columns: auto 1fr auto;
    padding-bottom: 18px;
}

.report-document-header img {
    height: 72px;
    object-fit: contain;
    width: 72px;
}

.report-document-header div {
    display: grid;
    gap: 4px;
}

.report-document-header strong {
    color: #0d5ea8;
    font-size: 1.15rem;
}

.report-document-header em {
    background: #e8f7f1;
    border-radius: 999px;
    color: #15705a;
    font-style: normal;
    font-weight: 800;
    padding: 8px 12px;
}

.report-document h1 {
    font-size: clamp(1.5rem, 3vw, 2.4rem);
    margin: 0;
}

.report-document h2 {
    color: #0d5ea8;
    font-size: 1.05rem;
    margin: 0 0 10px;
}

.report-meta-grid {
    background: #f5f9fd;
    border-radius: 14px;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 16px;
}

.report-meta-grid p {
    margin: 0;
}

.report-document table {
    border-collapse: collapse;
    width: 100%;
}

.report-document th,
.report-document td {
    border: 1px solid #dbe8f5;
    padding: 10px;
    text-align: left;
}

.report-document th {
    background: #edf5ff;
}

.report-signature-zone {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 16px;
}

.report-signature-zone div {
    border-top: 1px solid #7892ad;
    padding-top: 10px;
}

.report-signature-zone span {
    display: block;
    color: #667995;
    margin-top: 6px;
}

.report-thread {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.report-thread article {
    background: #f6f9fd;
    border: 1px solid #dbe8f5;
    border-radius: 12px;
    padding: 12px;
}

.report-thread p {
    margin: 6px 0;
}

.report-thread small {
    color: #667995;
}

@media (max-width: 720px) {
    .report-document-header,
    .report-meta-grid,
    .report-signature-zone {
        grid-template-columns: 1fr;
    }
}

/* Responsive final du tableau de bord admin */
.admin-body.erp-shell {
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
}

.admin-body .erp-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.admin-body .erp-main {
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-height: 0;
    overflow: hidden;
}

.admin-body .erp-topbar {
    grid-template-columns: auto minmax(220px, 1.1fr) minmax(240px, .8fr) auto auto auto auto auto;
}

.admin-body .erp-content {
    flex: 1 1 auto;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.admin-body .erp-footer {
    flex: 0 0 auto;
}

.erp-mobile-menu,
.erp-back-button {
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border: 1px solid var(--erp-border);
    border-radius: 15px;
    color: var(--erp-text);
    background: var(--erp-surface);
    box-shadow: 0 10px 22px rgba(15, 23, 42, .04);
    cursor: pointer;
    font: inherit;
    font-size: .86rem;
    font-weight: 800;
}

.erp-mobile-menu {
    display: none;
    gap: 4px;
    width: 52px;
}

.erp-mobile-menu span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.erp-mobile-menu strong {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.erp-back-button {
    display: inline-flex;
    gap: 6px;
    padding: 0 14px;
    white-space: nowrap;
}

.erp-back-button span {
    font-size: 1.4rem;
    line-height: 1;
}

.erp-sidebar-backdrop {
    display: none;
}

.admin-body .admin-panel,
.admin-body .erp-kpi-card,
.admin-body .erp-dashboard-head,
.admin-body .dashboard-layout,
.admin-body .finance-layout,
.admin-body .cms-admin-layout,
.admin-body .table-wrap,
.admin-body .erp-table-wrap {
    min-width: 0;
}

.admin-body .table-wrap,
.admin-body .erp-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-body img,
.admin-body video,
.admin-body canvas,
.admin-body iframe {
    max-width: 100%;
}

@media (max-width: 1180px) {
    .admin-body.erp-shell {
        grid-template-columns: 260px minmax(0, 1fr);
    }

    .admin-body .erp-topbar {
        grid-template-columns: auto auto minmax(180px, 1fr) minmax(220px, .9fr) auto auto auto;
        padding: 18px 22px;
    }

    .admin-body .erp-profile span {
        display: none;
    }

    .admin-body .erp-profile {
        min-width: 0;
    }
}

@media (max-width: 980px) {
    .admin-body.erp-shell {
        display: block;
    }

    .admin-body .erp-mobile-menu {
        display: inline-grid;
    }

    .admin-body .erp-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 50;
        width: min(84vw, 330px);
        height: 100dvh;
        max-height: 100dvh;
        border-right: 1px solid var(--erp-border);
        border-bottom: 0;
        transform: translateX(-105%);
        transition: transform .24s ease;
    }

    .admin-sidebar-open .erp-sidebar {
        transform: translateX(0);
    }

    .admin-sidebar-open .erp-sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 45;
        display: block;
        background: rgba(15, 23, 42, .45);
        backdrop-filter: blur(3px);
    }

    .admin-body .erp-main {
        height: 100dvh;
    }

    .admin-body .erp-topbar {
        position: sticky;
        top: 0;
        grid-template-columns: auto auto 1fr auto auto;
        gap: 10px;
        padding: 12px;
    }

    .admin-body .erp-welcome {
        min-width: 0;
    }

    .admin-body .erp-welcome span {
        display: none;
    }

    .admin-body .erp-search {
        grid-column: 1 / -1;
        order: 8;
        width: 100%;
    }

    .admin-body .erp-session-link {
        display: none;
    }

    .admin-body .erp-icon-btn {
        display: inline-grid;
    }

    .admin-body .erp-content {
        width: 100%;
        padding: 18px 14px 28px;
    }

    .admin-body .erp-nav {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .admin-body .erp-nav-section-links {
        grid-template-columns: 1fr;
    }

    .admin-body .dashboard-layout,
    .admin-body .finance-layout,
    .admin-body .cms-admin-layout,
    .admin-body .erp-analytics-grid,
    .admin-body .erp-lab-grid,
    .admin-body .erp-data-grid {
        grid-template-columns: 1fr;
    }

    .admin-body .dashboard-side {
        position: static;
    }

    .admin-body .erp-footer {
        flex-wrap: wrap;
        justify-content: flex-start;
        padding: 14px;
    }
}

@media (max-width: 640px) {
    .admin-body .erp-topbar {
        grid-template-columns: auto auto 1fr auto;
    }

    .admin-body .erp-welcome p {
        max-width: 42vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .admin-body .erp-profile {
        display: none;
    }

    .admin-body .erp-icon-btn {
        width: 42px;
        height: 42px;
        border-radius: 13px;
    }

    .admin-body .erp-back-button {
        min-width: 44px;
        padding: 0 10px;
    }

    .admin-body .erp-back-button:not(:focus-visible) {
        font-size: 0;
        gap: 0;
    }

    .admin-body .erp-back-button span {
        font-size: 1.45rem;
    }

    .admin-body .erp-dashboard-head,
    .admin-body .erp-card-heading,
    .admin-body .erp-head-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-body .erp-dashboard-head .button,
    .admin-body .erp-card-heading .button,
    .admin-body .admin-form .button {
        width: 100%;
    }

    .admin-body .admin-panel,
    .admin-body .erp-kpi-card {
        padding: 16px;
    }

    .admin-body .erp-kpi-grid,
    .admin-body .erp-widget-grid {
        grid-template-columns: 1fr;
    }

    .admin-body .table-wrap table,
    .admin-body .erp-table-wrap table {
        min-width: 720px;
    }
}

.cms-seo-fields {
    display: grid;
    gap: 14px;
    min-width: 0;
    margin: 4px 0;
    padding: 16px;
    border: 1px solid #dce7f2;
    border-radius: 10px;
    background: #f8fbfe;
}

.cms-seo-fields legend {
    padding: 0 8px;
    color: #1759a6;
    font-weight: 700;
}

.cms-partner-grid,
.cms-testimonial-grid {
    width: min(100%, 1400px);
    margin: 32px auto 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
    gap: 20px;
}

.cms-partner-grid article,
.cms-testimonial-grid blockquote {
    min-width: 0;
    margin: 0;
    padding: 24px;
    border: 1px solid #dce8f2;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 36px rgba(18, 48, 74, .08);
}

.cms-partner-grid img {
    width: 100%;
    height: 100px;
    object-fit: contain;
    margin-bottom: 18px;
}

.cms-testimonial-grid blockquote > img {
    width: 58px;
    height: 58px;
    object-fit: cover;
    border-radius: 50%;
}

.cms-testimonial-grid blockquote > p {
    color: #334e68;
    font-size: 1rem;
    line-height: 1.75;
}

.cms-testimonial-grid footer {
    display: grid;
    gap: 3px;
}

.cms-testimonial-grid footer span {
    color: #718399;
    font-size: .86rem;
}

@media (max-width: 640px) {
    .cms-partner-grid,
    .cms-testimonial-grid {
        grid-template-columns: 1fr;
    }
}
/* Administration 2026: final layout and responsive safeguards. */
html,
body {
    max-width: 100%;
}

body {
    overflow-x: hidden;
}

.admin-login-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: clamp(18px, 4vw, 56px);
    background:
        linear-gradient(135deg, rgba(37, 99, 235, .08), rgba(20, 184, 166, .05)),
        #f5f8fc;
}

.admin-login-page .admin-login-shell {
    display: block;
    width: min(100%, 520px);
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 18px;
    overflow: visible;
    background: transparent;
    box-shadow: none;
}

.admin-login-page .admin-login-card {
    width: 100%;
    max-width: none;
    display: grid;
    gap: 20px;
    padding: clamp(26px, 6vw, 48px);
    border: 1px solid #dbe5f1;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 38, 71, .13);
}

.admin-login-heading {
    display: grid;
    gap: 8px;
    text-align: center;
}

.admin-login-heading h1 {
    margin: 12px 0 0;
    color: #102a43;
    font-size: clamp(1.65rem, 5vw, 2.25rem);
    line-height: 1.15;
}

.admin-login-heading p {
    margin: 0;
    color: #66788d;
}

.admin-login-page .admin-login-brand {
    justify-self: center;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #102a43;
    text-decoration: none;
    text-align: left;
}

.admin-login-page .admin-login-brand img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 12px;
}

.admin-login-page .admin-login-brand span {
    display: grid;
}

.admin-login-page .admin-login-brand strong {
    font-size: 1.2rem;
}

.admin-login-page .admin-login-brand small {
    color: #66788d;
}

.admin-login-page .admin-login-card label {
    display: grid;
    gap: 8px;
    min-width: 0;
    color: #102a43;
    font-weight: 700;
}

.admin-login-page .admin-login-card input {
    width: 100%;
    min-width: 0;
    min-height: 52px;
    padding: 0 15px;
    border: 1px solid #ccd9e8;
    border-radius: 10px;
    background: #f9fbfe;
    font: inherit;
}

.admin-login-page .admin-login-card input:focus {
    border-color: #2563eb;
    outline: 3px solid rgba(37, 99, 235, .13);
}

.password-field {
    position: relative;
    display: block;
}

.password-field input {
    padding-right: 92px !important;
}

.password-field button {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    padding: 8px 10px;
    border: 0;
    border-radius: 7px;
    color: #1759a6;
    background: #eaf2ff;
    font: 600 .78rem/1 Poppins, sans-serif;
    cursor: pointer;
}

.login-captcha {
    display: grid;
    gap: 8px;
}

.login-captcha > label {
    display: block !important;
}

.login-captcha > div {
    display: grid;
    grid-template-columns: auto minmax(90px, 1fr);
    align-items: center;
    gap: 12px;
    padding: 8px 8px 8px 15px;
    border: 1px solid #d9e5f1;
    border-radius: 10px;
    background: #f5f9fd;
}

.login-captcha input {
    min-height: 44px !important;
    background: #fff !important;
}

.login-forgot-link,
.login-copyright {
    justify-self: center;
    text-align: center;
}

.login-forgot-link {
    color: #1759a6;
    font-weight: 600;
}

.login-copyright {
    color: #7c8da1;
}

.admin-password-help .notice {
    margin: 0;
    line-height: 1.7;
}

.admin-body.erp-shell {
    --admin-sidebar-width: 270px;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: var(--admin-sidebar-width) minmax(0, 1fr);
    overflow: hidden;
}

.admin-body .erp-sidebar {
    position: relative;
    inset: auto;
    width: auto;
    height: 100vh;
    height: 100dvh;
    min-width: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    z-index: 40;
}

.admin-body .erp-main {
    width: 100%;
    min-width: 0;
    height: 100vh;
    height: 100dvh;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
}

.admin-body .erp-topbar {
    position: relative;
    top: auto;
    z-index: 30;
    min-width: 0;
    min-height: 78px;
    display: grid;
    grid-template-columns: auto minmax(160px, 240px) minmax(220px, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 12px clamp(16px, 2vw, 28px);
    border-bottom: 1px solid #dfe8f2;
}

.erp-topbar-navigation,
.erp-topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.erp-welcome {
    min-width: 0;
}

.erp-welcome p,
.erp-welcome span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erp-welcome p {
    margin: 0;
    color: #102a43;
    font-size: 1rem;
    font-weight: 700;
}

.erp-welcome span {
    display: block;
    color: #6c7e93;
    font-size: .78rem;
}

.admin-body .erp-search {
    width: 100%;
    min-width: 0;
}

.admin-body .erp-search input {
    width: 100%;
    min-width: 0;
    min-height: 46px;
}

.admin-body .erp-profile {
    max-width: 210px;
    min-width: 0;
}

.admin-body .erp-profile > span:last-child {
    min-width: 0;
}

.admin-body .erp-profile strong,
.admin-body .erp-profile small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-body .erp-content {
    width: 100%;
    min-width: 0;
    min-height: 0;
    max-width: none;
    overflow-x: hidden;
    overflow-y: auto;
    padding: clamp(18px, 2.2vw, 34px);
    overscroll-behavior: contain;
}

.admin-body .erp-footer {
    position: relative;
    inset: auto;
    z-index: 10;
    min-width: 0;
    padding: 10px 20px;
    flex-wrap: wrap;
}

.admin-body .admin-page-heading,
.admin-body .erp-card-heading,
.admin-body .cms-row-actions,
.admin-body td:last-child {
    min-width: 0;
}

.admin-body .admin-page-heading,
.admin-body .erp-card-heading {
    flex-wrap: wrap;
    gap: 14px;
}

.admin-body .admin-panel,
.admin-body .dashboard-main,
.admin-body .dashboard-side,
.admin-body .admin-form,
.admin-body form,
.admin-body label {
    min-width: 0;
    max-width: 100%;
}

.admin-body input,
.admin-body select,
.admin-body textarea,
.admin-body button {
    max-width: 100%;
}

.admin-body textarea {
    resize: vertical;
}

.admin-body .dashboard-layout,
.admin-body .cms-workspace {
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
    align-items: start;
    gap: 22px;
}

.admin-body .dashboard-side {
    position: sticky;
    top: 0;
    width: 100%;
}

.admin-body .table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
}

.admin-body .table-wrap table {
    width: 100%;
    min-width: 700px;
}

.admin-body .table-wrap th,
.admin-body .table-wrap td {
    vertical-align: top;
    overflow-wrap: anywhere;
}

.admin-body td .button,
.admin-body td .inline-form {
    margin: 3px 2px;
}

.admin-body .button {
    white-space: normal;
    text-align: center;
}

.admin-body .cms-media-grid,
.admin-body .kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
}

@media (max-width: 1360px) {
    .admin-body .dashboard-layout,
    .admin-body .cms-workspace {
        grid-template-columns: minmax(0, 1fr);
    }

    .admin-body .dashboard-side {
        position: static;
    }

    .admin-body .erp-topbar {
        grid-template-columns: auto minmax(180px, 1fr) auto;
    }

    .admin-body .erp-welcome {
        display: none;
    }

    .admin-body .erp-profile > span:last-child,
    .admin-body .erp-session-link {
        display: none;
    }
}

@media (max-width: 980px) {
    .admin-body.erp-shell {
        display: block;
        overflow: hidden;
    }

    .admin-body .erp-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        width: min(84vw, 310px);
        height: 100dvh;
        transform: translateX(-105%);
        transition: transform .25s ease;
        box-shadow: 18px 0 50px rgba(15, 38, 71, .2);
    }

    .admin-body.admin-sidebar-open .erp-sidebar {
        transform: translateX(0);
    }

    .admin-body .erp-sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 35;
        visibility: hidden;
        opacity: 0;
        background: rgba(9, 24, 46, .48);
        transition: opacity .25s ease, visibility .25s ease;
    }

    .admin-body.admin-sidebar-open .erp-sidebar-backdrop {
        visibility: visible;
        opacity: 1;
    }

    .admin-body .erp-main {
        width: 100%;
        height: 100dvh;
    }

    .admin-body .erp-mobile-menu {
        display: inline-flex;
    }

    .admin-body .erp-topbar {
        grid-template-columns: auto minmax(0, 1fr) auto;
        min-height: 68px;
        padding: 10px 14px;
    }

    .admin-body .erp-back-button b {
        display: none;
    }

    .admin-body .erp-icon-btn:nth-of-type(n+2) {
        display: none;
    }

    .admin-body .erp-profile {
        padding: 0;
        border: 0;
        background: transparent;
    }

    .admin-body .erp-content {
        padding: 18px 14px 28px;
    }
}

@media (max-width: 640px) {
    .admin-login-page {
        display: block;
        padding: 12px;
    }

    .admin-login-page .admin-login-card {
        gap: 17px;
        padding: 24px 18px;
        border-radius: 14px;
    }

    .admin-body .erp-topbar {
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 8px;
    }

    .admin-body .erp-topbar-actions .erp-icon-btn {
        display: none;
    }

    .admin-body .erp-search input {
        min-height: 42px;
        padding-inline: 11px;
        font-size: .78rem;
    }

    .admin-body .erp-footer {
        display: none;
    }

    .admin-body .admin-page-heading h1 {
        font-size: clamp(1.55rem, 9vw, 2.15rem);
    }

    .admin-body .admin-panel {
        padding: 16px;
        border-radius: 12px;
    }

    .admin-body .table-wrap table {
        min-width: 640px;
    }

    .admin-body .button,
    .admin-body button {
        min-height: 42px;
    }
}

/* Responsive consolidation: public website and ERP administration. */
html {
    width: 100%;
    overflow-x: clip;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

body,
main,
section,
header,
footer,
nav,
form,
fieldset,
table,
img,
video,
iframe {
    min-width: 0;
}

img,
video,
iframe {
    max-width: 100%;
}

img,
video {
    height: auto;
}

input,
select,
textarea,
button {
    max-width: 100%;
    font: inherit;
}

.site-header {
    width: 100%;
    min-height: 72px;
    padding: 10px clamp(16px, 4vw, 54px);
}

.site-header .brand {
    min-width: 0;
}

.site-header .brand-logo {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    object-fit: contain;
}

.site-header .brand span,
.site-header .brand strong,
.site-header .brand small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-nav {
    min-width: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.section,
.page-hero,
.hero-slider-content {
    width: 100%;
    max-width: 100%;
}

.card-grid,
.role-list,
.process-grid,
.feature-strip {
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
}

.card,
.role-card,
.equipment-card,
.process-grid article {
    min-width: 0;
    overflow-wrap: break-word;
}

.page-hero h1,
.section-heading h2,
.hero-slide h1 {
    max-width: 100%;
    overflow-wrap: break-word;
}

.admin-body.erp-shell {
    --admin-sidebar-width: clamp(230px, 15vw, 270px);
    grid-template-columns: var(--admin-sidebar-width) minmax(0, 1fr);
}

.admin-body .erp-sidebar {
    width: 100%;
    padding: 18px 14px;
}

.admin-body .erp-logo {
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 8px 16px;
    overflow: hidden;
}

.admin-body .erp-logo img {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px;
    flex: 0 0 48px;
    object-fit: contain;
    border-radius: 8px;
}

.admin-body .erp-logo span {
    min-width: 0;
}

.admin-body .erp-logo strong,
.admin-body .erp-logo small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-body .erp-nav-section summary,
.admin-body .erp-nav-section-links a {
    min-width: 0;
}

.admin-body .erp-nav-section-links a > span:last-child {
    min-width: 0;
    overflow-wrap: break-word;
}

.admin-body .erp-mobile-menu {
    display: inline-flex;
    flex: 0 0 auto;
}

.admin-body .erp-topbar {
    grid-template-columns: auto minmax(150px, 220px) minmax(220px, 1fr) auto;
    min-height: 72px;
    padding: 10px clamp(12px, 1.8vw, 26px);
    overflow: visible;
}

.admin-body .erp-topbar-actions {
    justify-content: flex-end;
}

.admin-body .erp-icon-btn,
.admin-body .erp-avatar {
    flex: 0 0 auto;
}

.admin-body .erp-content {
    container-type: inline-size;
    width: 100%;
    max-width: 100%;
    padding: clamp(16px, 2vw, 30px);
}

.admin-body .erp-dashboard-head,
.admin-body .admin-page-heading,
.admin-body .erp-card-heading {
    width: 100%;
    max-width: 100%;
    align-items: flex-start;
}

.admin-body .erp-dashboard-head > div,
.admin-body .admin-page-heading > div,
.admin-body .erp-card-heading > div {
    min-width: 0;
    flex: 1 1 320px;
}

.admin-body .erp-dashboard-head h1,
.admin-body .admin-page-heading h1 {
    max-width: 100%;
    font-size: clamp(1.8rem, 3.2vw, 3rem);
    overflow-wrap: break-word;
}

.admin-body .dashboard-layout,
.admin-body .cms-workspace {
    width: 100%;
    max-width: 100%;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
}

.admin-body .admin-panel {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.admin-body .admin-form,
.admin-body .cms-settings-grid {
    width: 100%;
    max-width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
}

.admin-body .admin-form > label,
.admin-body .cms-settings-grid > label,
.admin-body .admin-form input,
.admin-body .admin-form select,
.admin-body .admin-form textarea {
    width: 100%;
    min-width: 0;
}

.admin-body .table-wrap,
.admin-body .erp-table-wrap {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 8px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.admin-body .table-wrap table,
.admin-body .erp-table-wrap table {
    width: max(100%, 820px);
    min-width: 820px;
    table-layout: auto;
}

.admin-body .table-wrap th,
.admin-body .erp-table-wrap th {
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
}

.admin-body .table-wrap td,
.admin-body .erp-table-wrap td {
    word-break: normal;
    overflow-wrap: break-word;
}

.admin-body .table-wrap th:last-child,
.admin-body .table-wrap td:last-child,
.admin-body .erp-table-wrap th:last-child,
.admin-body .erp-table-wrap td:last-child {
    min-width: 190px;
}

.admin-body td .inline-form,
.admin-body td .button {
    display: inline-flex;
    vertical-align: top;
}

.admin-body [role="dialog"],
.admin-body .modal,
.admin-body .dialog,
.admin-body .drawer-panel {
    width: min(94vw, 680px);
    max-width: 94vw;
    max-height: 90dvh;
    overflow: auto;
}

@media (min-width: 981px) {
    .admin-body.admin-sidebar-collapsed {
        --admin-sidebar-width: 84px;
    }

    .admin-body.admin-sidebar-collapsed .erp-sidebar {
        padding-inline: 10px;
    }

    .admin-body.admin-sidebar-collapsed .erp-logo {
        justify-content: center;
        padding-inline: 0;
    }

    .admin-body.admin-sidebar-collapsed .erp-logo span,
    .admin-body.admin-sidebar-collapsed .erp-nav-section summary,
    .admin-body.admin-sidebar-collapsed .erp-nav-section-links a > span:last-child,
    .admin-body.admin-sidebar-collapsed .erp-logout:not(:hover) {
        font-size: 0;
    }

    .admin-body.admin-sidebar-collapsed .erp-nav-section summary {
        min-height: 10px;
        padding: 5px 0;
        pointer-events: none;
    }

    .admin-body.admin-sidebar-collapsed .erp-nav-section summary::after {
        display: none;
    }

    .admin-body.admin-sidebar-collapsed .erp-nav-section-links {
        display: grid !important;
    }

    .admin-body.admin-sidebar-collapsed .erp-nav-section-links a {
        justify-content: center;
        min-height: 48px;
        padding-inline: 0;
    }

    .admin-body.admin-sidebar-collapsed .erp-logout {
        justify-content: center;
        gap: 0;
    }
}

@media (max-width: 1360px) {
    .admin-body .dashboard-layout,
    .admin-body .cms-workspace {
        grid-template-columns: minmax(0, 1fr);
    }

    .admin-body .dashboard-side {
        position: static;
        width: 100%;
    }

    .admin-body .erp-topbar {
        grid-template-columns: auto minmax(220px, 1fr) auto;
    }

    .admin-body .erp-welcome {
        display: none;
    }

    .admin-body .erp-profile > span:last-child,
    .admin-body .erp-session-link {
        display: none;
    }
}

@media (max-width: 980px) {
    .site-header {
        position: sticky;
        top: 0;
        z-index: 100;
        flex-wrap: nowrap;
    }

    .menu-toggle {
        display: inline-flex;
        flex: 0 0 46px;
    }

    .site-nav {
        position: absolute;
        top: 100%;
        right: 12px;
        left: 12px;
        display: none;
        max-height: calc(100dvh - 90px);
        padding: 14px;
        overflow-y: auto;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #fff;
        box-shadow: 0 18px 44px rgba(18, 48, 74, .18);
    }

    .site-nav.is-open {
        display: grid;
    }

    .site-nav a,
    .site-nav-dropdown {
        width: 100%;
    }

    .site-submenu {
        position: static;
        width: 100%;
        box-shadow: none;
    }

    .section,
    .page-hero {
        padding-inline: clamp(16px, 4vw, 28px);
    }

    .two-columns,
    .dashboard-grid,
    .contact-layout {
        grid-template-columns: 1fr;
    }

    .admin-body.erp-shell {
        display: block;
    }

    .admin-body .erp-sidebar {
        width: min(88vw, 310px);
        padding: 16px 12px;
    }

    .admin-body .erp-topbar {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .admin-body .erp-back-button b,
    .admin-body .erp-profile > span:last-child,
    .admin-body .erp-session-link {
        display: none;
    }

    .admin-body .erp-icon-btn:nth-of-type(n+2) {
        display: none;
    }
}

@media (max-width: 640px) {
    .site-header .brand small {
        display: none;
    }

    .site-header .brand strong {
        font-size: .95rem;
    }

    .page-hero {
        min-height: 300px;
    }

    .hero-slide-content {
        width: 100%;
        padding: 20px 52px;
    }

    .hero-actions,
    .erp-head-actions,
    .cms-row-actions,
    .admin-page-heading > div + *,
    .erp-dashboard-head > div + * {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .hero-actions .button,
    .erp-head-actions .button,
    .admin-page-heading .button,
    .erp-dashboard-head .button {
        width: 100%;
        justify-content: center;
    }

    .admin-body .erp-topbar {
        min-height: 62px;
        padding: 8px 10px;
    }

    .admin-body .erp-search input {
        min-height: 42px;
        font-size: 16px;
    }

    .admin-body .erp-topbar-actions .erp-icon-btn,
    .admin-body .erp-profile {
        display: none;
    }

    .admin-body .erp-content {
        padding: 14px 10px 24px;
    }

    .admin-body .admin-panel {
        padding: 14px;
    }

    .admin-body .admin-form,
    .admin-body .cms-settings-grid,
    .admin-body .kpi-grid,
    .admin-body .cms-overview-grid {
        grid-template-columns: 1fr;
    }

    .admin-body .admin-form .button,
    .admin-body .admin-form button[type="submit"] {
        width: 100%;
        justify-content: center;
    }

    .admin-body .table-wrap table,
    .admin-body .erp-table-wrap table {
        width: 760px;
        min-width: 760px;
    }

    .admin-body .table-wrap::after,
    .admin-body .erp-table-wrap::after {
        content: "Faites défiler horizontalement pour voir toutes les colonnes";
        position: sticky;
        left: 0;
        display: block;
        width: max-content;
        max-width: calc(100vw - 48px);
        margin: 8px 0 0;
        color: #6b7d91;
        font-size: .72rem;
    }
}
