/*
 * Maquette dédiée à test.html.
 * Elle conserve les couleurs et le logo Finadoc, tout en modernisant
 * la lecture de la page sans modifier les feuilles de styles existantes.
 */

.test-page {
    --test-ink: #292929;
    --test-muted: #625f5d;
    --test-line: #dfddda;
    --test-surface: #ffffff;
    --test-ground: #f7f7f5;
    --test-accent: #c86b13;
    --test-accent-dark: #9f4f09;
    background: var(--test-ground);
    color: var(--test-ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: 400;
    line-height: 1.65;
    padding-bottom: 0;
}

.test-page *,
.test-page *::before,
.test-page *::after {
    box-sizing: border-box;
}

.test-page .test-header {
    align-items: center;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(41, 41, 41, 0.1);
    display: flex;
    height: 76px;
    justify-content: space-between;
    left: 0;
    padding: 0 clamp(24px, 5vw, 72px);
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 20;
}

.test-page .test-brand {
    border: 0;
    display: block;
    line-height: 0;
    padding: 0;
}

.test-page .test-brand:hover,
.test-page .test-brand:focus {
    border: 0;
}

.test-page .test-brand img {
    display: block;
    height: auto;
    width: 138px;
}

.test-page .nav-icon {
    align-items: center;
    background: transparent;
    border: 1px solid var(--test-line);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    float: none;
    height: 42px;
    justify-content: center;
    padding: 0;
    position: relative;
    width: 42px;
}

.test-page .nav-icon:focus-visible {
    outline: 3px solid rgba(200, 107, 19, 0.35);
    outline-offset: 3px;
}

.test-page .nav-icon span {
    background: var(--test-ink);
    height: 2px;
    left: auto;
    position: absolute;
    width: 17px;
}

.test-page .nav-icon span:nth-child(1) {
    top: 13px;
}

.test-page .nav-icon span:nth-child(2) {
    top: 19px;
}

.test-page .nav-icon span:nth-child(3) {
    right: auto !important;
    top: 25px;
    width: 17px;
}

.test-page.full-open .test-header {
    position: fixed;
}

.test-page .full-menu {
    background: #fafaf8;
    height: calc(100vh - 76px);
    padding: clamp(32px, 7vw, 96px) clamp(24px, 9vw, 160px);
    top: 76px;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    z-index: 15;
}

.test-page.full-open .full-menu {
    transform: translateX(0);
}

.test-page .full-menu .full-inner,
.test-page .full-menu .full-inner nav,
.test-page .full-menu .full-inner nav ul {
    display: block;
    height: auto;
    padding: 0;
}

.test-page .full-menu .full-inner nav ul li {
    border-bottom: 1px solid var(--test-line);
}

.test-page .full-menu .full-inner nav ul li a {
    color: var(--test-ink);
    font-family: "Marcellus", Georgia, serif;
    font-size: clamp(1.15rem, 2.1vw, 1.7rem);
    font-weight: 400;
    padding: 0.48em 0;
    transform: none;
}

.test-page .full-menu .full-inner nav ul li a:hover,
.test-page .full-menu .full-inner nav ul li a:focus {
    border: 0;
    color: var(--test-accent-dark);
}

.test-page.full-open .nav-icon span {
    background: var(--test-ink) !important;
    width: 17px;
}

.test-page.full-open .nav-icon span:nth-child(1) {
    left: 13px;
    top: 12px;
}

.test-page.full-open .nav-icon span:nth-child(3) {
    left: 13px;
    top: 24px;
}

.test-page .test-main {
    background: var(--test-ground);
    min-height: calc(100vh - 76px);
}

.test-page .test-shell {
    margin: 0 auto;
    max-width: 1200px;
    width: min(1200px, calc(100% - 64px));
}

.test-page .test-hero {
    background: linear-gradient(115deg, #ffffff 0%, #f1f0ee 100%);
    border-bottom: 4px solid var(--test-accent);
    color: var(--test-ink);
    padding: clamp(84px, 12vw, 156px) 0 clamp(88px, 10vw, 128px);
}

.test-page .test-eyebrow,
.test-page .test-kicker {
    color: var(--test-accent);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    margin: 0 0 12px;
    text-transform: uppercase;
}

.test-page .test-hero .test-eyebrow {
    color: var(--test-accent-dark);
}

.test-page .test-hero h1,
.test-page .test-content h2,
.test-page .test-content h3 {
    color: inherit;
    font-family: "Marcellus", Georgia, serif;
    font-weight: 400;
    letter-spacing: -0.025em;
    margin: 0;
    text-transform: none;
}

.test-page .test-hero h1 {
    font-size: clamp(2.5rem, 5.2vw, 4.9rem);
    line-height: 1.08;
    max-width: 850px;
}

.test-page .test-hero-intro {
    color: var(--test-muted);
    font-size: clamp(1.1rem, 1.7vw, 1.35rem);
    line-height: 1.65;
    margin: 24px 0 0;
    max-width: 620px;
}

.test-page .test-content {
    padding: clamp(56px, 8vw, 104px) 0 clamp(72px, 10vw, 132px);
}

.test-page .test-overview {
    align-items: start;
    display: grid;
    gap: clamp(36px, 7vw, 96px);
    grid-template-columns: minmax(0, 1.65fr) minmax(260px, 0.75fr);
}

.test-page .test-overview h2,
.test-page .test-section-heading h2,
.test-page .test-video h2 {
    font-size: clamp(1.9rem, 3.3vw, 3rem);
    line-height: 1.16;
}

.test-page .test-overview > div > p:not(.test-kicker),
.test-page .test-commitment p:not(.test-kicker),
.test-page .test-card p,
.test-page .test-video p:not(.test-kicker) {
    color: var(--test-muted);
    font-size: 1.05rem;
    line-height: 1.8;
    margin: 22px 0 0;
}

.test-page .test-commitment {
    border-left: 3px solid var(--test-accent);
    padding: 10px 0 10px 26px;
}

.test-page .test-commitment .test-kicker {
    margin-bottom: 8px;
}

.test-page .test-commitment p:not(.test-kicker) {
    color: var(--test-ink);
    font-family: "Marcellus", Georgia, serif;
    font-size: 1.22rem;
    line-height: 1.55;
    margin-top: 0;
}

.test-page .test-section {
    margin-top: clamp(72px, 10vw, 132px);
}

.test-page .test-section-heading {
    display: grid;
    gap: 10px;
    max-width: 700px;
}

.test-page .test-card-grid {
    display: grid;
    gap: 22px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 42px;
}

.test-page .test-card {
    background: var(--test-surface);
    border: 1px solid var(--test-line);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    min-height: 290px;
    padding: clamp(26px, 3vw, 42px);
    position: relative;
}

.test-page .test-card::before {
    background: var(--test-accent);
    content: "";
    height: 3px;
    left: 0;
    position: absolute;
    top: 0;
    width: 48px;
}

.test-page .test-card h3 {
    align-items: center;
    color: var(--test-ink);
    display: flex;
    font-size: clamp(1.38rem, 2.1vw, 1.7rem);
    gap: 10px;
    line-height: 1.28;
}

.test-page .test-section-icon {
    flex: 0 0 20px;
    height: 20px;
    object-fit: contain;
    width: 20px;
}

.test-page .test-card p {
    font-size: 0.98rem;
    line-height: 1.75;
}

.test-page .test-card .test-card-action {
    margin-top: auto;
    padding-top: 20px;
}

.test-page .test-card-action a {
    border-bottom: 1px solid rgba(200, 107, 19, 0.45);
    color: var(--test-accent-dark);
    font-size: 0.92rem;
    font-weight: 700;
}

.test-page .test-card-action a:hover,
.test-page .test-card-action a:focus {
    border-bottom-color: var(--test-accent-dark);
    color: var(--test-accent-dark);
}

.test-page .test-pdf-icon {
    display: inline-block;
    height: 16px;
    margin-left: 7px;
    vertical-align: -2px;
    width: 16px;
}

.test-page .test-card-wide {
    grid-column: 1 / -1;
}

.test-page .test-link,
.test-page .test-links a {
    border-bottom: 1px solid rgba(200, 107, 19, 0.45);
    color: var(--test-accent-dark);
    display: inline-block;
    font-size: 0.92rem;
    font-weight: 700;
    margin-top: auto;
    padding: 19px 0 2px;
}

.test-page .test-link:hover,
.test-page .test-link:focus,
.test-page .test-links a:hover,
.test-page .test-links a:focus {
    border-bottom-color: var(--test-accent-dark);
    color: var(--test-accent-dark);
}

.test-page .test-link span {
    display: inline-block;
    margin-left: 8px;
    transition: transform 0.2s ease;
}

.test-page .test-link:hover span {
    transform: translateX(4px);
}

.test-page .test-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0 20px;
}

.test-page .test-links a {
    font-size: 0.9rem;
    margin-top: 0;
    padding-top: 14px;
}

.test-page .test-video {
    align-items: center;
    background: #303030;
    color: #fff;
    display: grid;
    gap: clamp(32px, 6vw, 72px);
    grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.25fr);
    margin-top: clamp(72px, 10vw, 132px);
    padding: clamp(28px, 5vw, 64px);
}

.test-page .test-video .test-kicker {
    color: #f5b36a;
}

.test-page .test-video p:not(.test-kicker) {
    color: rgba(255, 255, 255, 0.75);
}

.test-page .test-video video {
    background: #161616;
    display: block;
    max-width: 100%;
    width: 100%;
}

.test-page .test-next {
    align-items: baseline;
    border-bottom: 1px solid var(--test-line);
    color: var(--test-ink);
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: clamp(52px, 7vw, 88px);
    padding: 0 0 18px;
}

.test-page .test-next span {
    color: var(--test-muted);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.test-page .test-next strong {
    font-family: "Marcellus", Georgia, serif;
    font-size: clamp(1.5rem, 2.7vw, 2.2rem);
    font-weight: 400;
}

.test-page .test-back-to-top {
    margin: 0;
    padding: 0 0 30px;
    text-align: center;
}

.test-page .test-back-to-top a {
    border: 0;
    color: var(--test-muted);
    font-size: 0.85rem;
}

.test-page .test-back-to-top a:hover,
.test-page .test-back-to-top a:focus {
    border: 0;
    color: var(--test-accent-dark);
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .test-page .test-card {
        transition: box-shadow 0.25s ease, transform 0.25s ease;
    }

    .test-page .test-card:hover {
        box-shadow: 0 18px 38px rgba(41, 41, 41, 0.1);
        transform: translateY(-4px);
    }
}

@media (max-width: 800px) {
    .test-page .test-overview,
    .test-page .test-video {
        grid-template-columns: 1fr;
    }

    .test-page .test-commitment {
        max-width: 560px;
    }
}

@media (max-width: 640px) {
    .test-page .test-header {
        height: 66px;
        padding: 0 20px;
    }

    .test-page .test-brand img {
        width: 114px;
    }

    .test-page .full-menu {
        height: calc(100vh - 66px);
        padding: 28px 28px 40px;
        top: 66px;
    }

    .test-page .test-shell {
        width: min(100% - 40px, 1200px);
    }

    .test-page .test-hero {
        padding: 72px 0 78px;
    }

    .test-page .test-card-grid {
        grid-template-columns: 1fr;
        margin-top: 30px;
    }

    .test-page .test-card {
        min-height: auto;
    }

}

/*
 * Déclinaison des mêmes principes pour les pages historiques.
 * Elle n'agit que lorsque la classe modern-page est ajoutée au body.
 */

.modern-page {
    --modern-ink: #292929;
    --modern-muted: #625f5d;
    --modern-line: #dfddda;
    --modern-ground: #f7f7f5;
    --modern-accent: #c86b13;
    --modern-accent-dark: #9f4f09;
    background: var(--modern-ground);
    color: var(--modern-ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: 400;
    line-height: 1.65;
    padding-bottom: 0;
}

.modern-page *,
.modern-page *::before,
.modern-page *::after {
    box-sizing: border-box;
}

.modern-page header {
    align-items: center;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(41, 41, 41, 0.1);
    display: flex;
    height: 76px;
    justify-content: space-between;
    left: 0;
    padding: 0 clamp(24px, 5vw, 72px);
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 20;
}

.modern-page header > a {
    border: 0;
    display: block;
    line-height: 0;
    padding: 0;
}

.modern-page header > a:hover,
.modern-page header > a:focus {
    border: 0;
}

.modern-page header > a img {
    display: block;
    height: auto;
    max-width: none;
    width: 138px !important;
}

.modern-page .nav-icon {
    align-items: center;
    background: transparent;
    border: 1px solid var(--modern-line);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    float: none;
    height: 42px;
    justify-content: center;
    padding: 0;
    position: relative;
    width: 42px;
}

.modern-page .nav-icon span {
    background: var(--modern-ink);
    height: 2px;
    left: auto;
    position: absolute;
    width: 17px;
}

.modern-page .nav-icon span:nth-child(1) {
    top: 13px;
}

.modern-page .nav-icon span:nth-child(2) {
    top: 19px;
}

.modern-page .nav-icon span:nth-child(3) {
    right: auto !important;
    top: 25px;
    width: 17px;
}

.modern-page.full-open header {
    position: fixed;
}

.modern-page.full-open .nav-icon span {
    background: var(--modern-ink) !important;
    width: 17px;
}

.modern-page.full-open .nav-icon span:nth-child(1) {
    left: 13px;
    top: 12px;
}

.modern-page.full-open .nav-icon span:nth-child(3) {
    left: 13px;
    top: 24px;
}

.modern-page .full-menu {
    background: #fafaf8;
    height: calc(100vh - 76px);
    padding: clamp(32px, 7vw, 96px) clamp(24px, 9vw, 160px);
    top: 76px;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    z-index: 15;
}

.modern-page.full-open .full-menu {
    transform: translateX(0);
}

.modern-page .full-menu .full-inner,
.modern-page .full-menu .full-inner nav,
.modern-page .full-menu .full-inner nav ul {
    display: block;
    height: auto;
    padding: 0;
}

.modern-page .full-menu .full-inner nav ul li {
    border-bottom: 1px solid var(--modern-line);
}

.modern-page .full-menu .full-inner nav ul li a {
    color: var(--modern-ink);
    font-family: "Marcellus", Georgia, serif;
    font-size: clamp(1.15rem, 2.1vw, 1.7rem);
    font-weight: 400;
    padding: 0.48em 0;
    transform: none;
}

.modern-page .full-menu .full-inner nav ul li a:hover,
.modern-page .full-menu .full-inner nav ul li a:focus {
    border: 0;
    color: var(--modern-accent-dark);
}

.modern-page .wrapper {
    background: transparent;
    box-shadow: none;
    overflow: visible;
    padding: clamp(56px, 8vw, 108px) 0 clamp(72px, 10vw, 132px);
}

.modern-page .cont {
    margin: 0 auto;
    max-width: 1120px;
    width: min(1120px, calc(100% - 64px));
}

.modern-page .portfolio-single.type-2.top_90 {
    margin-top: 0;
}

.modern-page .portfolio-single.type-2 .title {
    border-bottom: 3px solid var(--modern-accent);
    color: var(--modern-ink);
    font-family: "Marcellus", Georgia, serif;
    font-size: clamp(2.2rem, 4.3vw, 4.1rem);
    font-weight: 400;
    letter-spacing: -0.025em;
    line-height: 1.12;
    margin-bottom: clamp(34px, 5vw, 58px);
    padding-bottom: 24px;
    text-transform: none;
}

.modern-page .portfolio-single.type-2 .subtitle {
    color: var(--modern-ink);
    font-family: "Marcellus", Georgia, serif;
    font-size: clamp(1.55rem, 2.8vw, 2.3rem);
    font-weight: 400;
    line-height: 1.25;
    margin: 42px 0 16px;
}

.modern-page .portfolio-single.type-2 p,
.modern-page .portfolio-single li,
.modern-page .portfolio-single td,
.modern-page .portfolio-single em {
    color: var(--modern-muted);
    font-size: 1.05rem;
    line-height: 1.8;
}

.modern-page .portfolio-single p {
    margin: 0 0 24px;
}

.modern-page .portfolio-single h3 {
    align-items: center;
    border-top: 1px solid var(--modern-line);
    color: var(--modern-ink);
    display: flex;
    font-family: "Marcellus", Georgia, serif;
    font-size: clamp(1.35rem, 2.1vw, 1.7rem);
    font-weight: 400;
    gap: 10px;
    line-height: 1.3;
    margin: clamp(38px, 6vw, 68px) 0 18px;
    padding-top: 22px;
    text-transform: none;
}

.modern-page .portfolio-single h3 img {
    flex: 0 0 20px;
    height: 20px !important;
    object-fit: contain;
    width: 20px !important;
}

.modern-page .portfolio-single img,
.modern-page .portfolio-single video,
.modern-page .portfolio-single iframe {
    height: auto;
    max-width: 100%;
}

.modern-page .portfolio-single a {
    border-bottom: 1px solid rgba(200, 107, 19, 0.45);
    color: var(--modern-accent-dark);
    font-weight: 600;
}

.modern-page .portfolio-single a:hover,
.modern-page .portfolio-single a:focus {
    border-bottom-color: var(--modern-accent-dark);
    color: var(--modern-accent-dark);
}

.modern-page .portfolio-single ul,
.modern-page .portfolio-single ol {
    margin: 0 0 26px;
    padding-left: 1.3em;
}

.modern-page .portfolio-single li {
    margin-bottom: 9px;
}

.modern-page .portfolio-single .quantelia-logo {
    display: block;
    height: auto;
    margin: 0 0 20px;
    max-width: 100%;
    width: 290px;
}

.modern-page .portfolio-single .quantelia-link {
    border: 0;
    display: inline-block;
}

.modern-page .portfolio-single .quantelia-summary {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.8;
    margin-bottom: 8px;
}

.modern-page .portfolio-single table {
    border-collapse: separate;
    border-spacing: 20px;
    margin: 22px 0;
    max-width: 100%;
    width: 100%;
}

.modern-page .portfolio-single td {
    padding: 16px;
    vertical-align: top;
}

.modern-page .portfolio-single hr {
    border: 0;
    border-top: 1px solid var(--modern-line);
    margin: clamp(36px, 6vw, 68px) 0;
}

.modern-page .portfolio-nav .port-next {
    border-bottom: 1px solid var(--modern-line);
    display: block;
    height: auto;
    padding: 0 0 18px;
}

.modern-page .portfolio-nav .port-next .nav-title,
.modern-page .portfolio-nav .port-next .next-title {
    color: var(--modern-ink);
    font-family: "Marcellus", Georgia, serif;
    font-weight: 400;
    transform: none;
}

.modern-page .portfolio-nav .port-next .nav-title {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.modern-page .portfolio-nav .port-next .next-title {
    font-size: clamp(1.5rem, 2.7vw, 2.2rem);
}

.modern-page .portfolio-nav .port-next:hover .next-title,
.modern-page .portfolio-nav .port-next:hover .nav-title {
    transform: none;
}

.modern-page > center > a {
    border: 0;
    display: inline-block;
    margin-bottom: 30px;
}

@media (max-width: 640px) {
    .modern-page header {
        height: 66px;
        padding: 0 20px;
    }

    .modern-page header > a img {
        width: 114px !important;
    }

    .modern-page .full-menu {
        height: calc(100vh - 66px);
        padding: 28px 28px 40px;
        top: 66px;
    }

    .modern-page .cont {
        width: min(100% - 40px, 1120px);
    }

    .modern-page .portfolio-single table,
    .modern-page .portfolio-single tbody,
    .modern-page .portfolio-single tr,
    .modern-page .portfolio-single td {
        display: block;
        width: 100%;
    }

    .modern-page .portfolio-single table {
        border-spacing: 0;
    }
}
