/* ---------- Polices (auto-hébergées, licences OFL dans assets/fonts) ---------- */
@font-face {
    font-family: "Cormorant Garamond";
    src: url("../assets/fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Cormorant Garamond";
    src: url("../assets/fonts/cormorant-garamond-latin-500-italic.woff2") format("woff2");
    font-weight: 500;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "IBM Plex Sans";
    src: url("../assets/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "IBM Plex Sans";
    src: url("../assets/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "IBM Plex Mono";
    src: url("../assets/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --ivory: #f5f1e8;
    --ivory-deep: #ece5d7;
    --ink: #17150f;
    --ink-soft: #57524a;
    --rule: #d9cfbd;
    --brass: #7a5c32;        /* texte et liens sur ivoire (contraste AA) */
    --brass-light: #c9a66b;  /* accents sur fond sombre */
    --night: #141310;

    --serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
    --sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

    --max-width: 1240px;
    --gutter: clamp(20px, 4vw, 48px);
    --section-space: clamp(88px, 11vw, 160px);
    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 72px;
}

body {
    margin: 0;
    background: var(--ivory);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 1rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

::selection {
    background: var(--ink);
    color: var(--ivory);
}

img, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

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

:focus-visible {
    outline: 1px solid var(--brass);
    outline-offset: 4px;
}

h1, h2, h3 {
    margin: 0;
    font-family: var(--serif);
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: -0.005em;
    text-wrap: balance;
    font-variant-numeric: lining-nums;
}

h1 em, h2 em {
    font-style: italic;
    color: var(--brass);
}

h1 { font-size: clamp(2.7rem, 3.4vw + 1rem, 4.6rem); }
h2 { font-size: clamp(2.1rem, 2.6vw + 1rem, 3.3rem); }
h3 { font-size: 1.7rem; }

p { margin: 0 0 1.1em; }

.wrap {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* Petit intitulé de section : filet laiton + capitales espacées, discret. */
.label {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 28px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.label::before {
    content: "";
    width: 28px;
    height: 1px;
    background: var(--brass);
}

/* ---------- Boutons & liens ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 17px 30px;
    border: 1px solid var(--ink);
    background: var(--ink);
    color: var(--ivory);
    font-family: var(--sans);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.4s var(--ease), color 0.4s var(--ease);
}

.btn:hover {
    background: transparent;
    color: var(--ink);
}

.btn-light {
    border-color: var(--ivory);
    background: var(--ivory);
    color: var(--night);
}

.btn-light:hover {
    background: transparent;
    color: var(--ivory);
}

.text-link {
    position: relative;
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    padding-bottom: 6px;
}

.text-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: currentColor;
    transform-origin: left;
    transition: transform 0.5s var(--ease);
}

.text-link:hover::after {
    transform: scaleX(0.35);
}

/* ---------- En-tête ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(245, 241, 232, 0.94);
    backdrop-filter: saturate(140%) blur(8px);
    border-bottom: 1px solid var(--rule);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.wordmark {
    font-family: var(--serif);
    font-size: 1.65rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1;
}

.wordmark em {
    font-style: italic;
    color: var(--brass);
}

.nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 40px;
    margin: 0;
    padding: 0;
}

.nav-menu a {
    position: relative;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-soft);
    transition: color 0.3s var(--ease);
}

.nav-menu a:hover {
    color: var(--ink);
}

.nav-menu .nav-cta {
    padding: 11px 20px;
    border: 1px solid var(--ink);
    color: var(--ink);
    transition: background 0.4s var(--ease), color 0.4s var(--ease);
}

.nav-menu .nav-cta:hover {
    background: var(--ink);
    color: var(--ivory);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    width: 40px;
    height: 40px;
    padding: 0 8px;
    background: none;
    border: 0;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 1px;
    background: var(--ink);
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    min-height: min(820px, calc(100vh - 72px));
    padding: 72px 0;
    background: var(--night);
}

/* Photo en fond plein cadre ; le panneau porte la lisibilité. */
.hero-photo {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 60% 45%;
}

.hero-panel {
    position: relative;
    max-width: 620px;
    padding: clamp(36px, 4.4vw, 64px);
    background: rgba(245, 241, 232, 0.93);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* Filet laité en retrait, rappel du cadre de la bande Souveraineté. */
.hero-panel::after {
    content: "";
    position: absolute;
    inset: 12px;
    border: 1px solid rgba(122, 92, 50, 0.28);
    pointer-events: none;
}

.hero-panel h1 {
    margin-bottom: 28px;
    font-size: clamp(2.5rem, 2.5vw + 1rem, 3.9rem);
}

.hero-panel .lead {
    color: var(--ink-soft);
    font-size: 1.05rem;
}

.hero-actions {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px 36px;
    margin-top: 28px;
}

.hero-note {
    margin: 36px 0 0;
    padding-top: 18px;
    border-top: 1px solid var(--rule);
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--ink-soft);
}

/* ---------- Sections ---------- */
.section {
    padding: var(--section-space) 0;
}

.section-alt {
    background: var(--ivory-deep);
}

/* Intitulé en marge à gauche, titre dans la colonne de lecture. */
.section-head {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    align-items: start;
    gap: 40px;
    margin-bottom: clamp(56px, 7vw, 96px);
}

.section-head .label {
    margin-top: 14px;
}

.section-head h2 {
    max-width: 14em;
}

.intro {
    max-width: 38rem;
    margin: 28px 0 0;
    color: var(--ink-soft);
    font-size: 1.08rem;
}

.ticks {
    list-style: none;
    margin: 24px 0 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.ticks li {
    position: relative;
    padding-left: 26px;
    font-size: 0.95rem;
}

.ticks li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.85em;
    width: 12px;
    height: 1px;
    background: var(--brass);
}

/* ---------- Logiciels : index à filets ---------- */
.products {
    border-bottom: 1px solid var(--rule);
}

.product {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr) 180px;
    gap: 40px;
    padding: 48px 0;
    border-top: 1px solid var(--rule);
}

.product h3 {
    font-size: clamp(1.9rem, 1.4vw + 1.2rem, 2.4rem);
}

.product-kind {
    margin: 10px 0 0;
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--brass);
}

.product-body {
    max-width: 40rem;
}

.product-body > p {
    margin: 0;
    color: var(--ink-soft);
}

.product-link {
    align-self: start;
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--ink);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.product-link svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    transition: transform 0.4s var(--ease);
}

.product-link:hover {
    color: var(--brass);
    border-color: var(--brass);
}

.product-link:hover svg {
    transform: translate(2px, -2px);
}

/* ---------- Bande souveraineté (sombre) ---------- */
.band {
    padding: var(--section-space) 0;
    background: var(--night);
    color: var(--ivory);
}

.band-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: clamp(48px, 7vw, 112px);
    align-items: center;
}

/* Passe-partout : filet laiton centré autour de la photo, marge égale partout. */
.band-photo {
    position: relative;
    margin: 20px;
}

.band-photo::before {
    content: "";
    position: absolute;
    inset: -20px;
    border: 1px solid rgba(201, 166, 107, 0.55);
    pointer-events: none;
}

.band-photo img {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: 90% 50%;
}

.band-text .label {
    color: rgba(245, 241, 232, 0.66);
}

.band-text .label::before {
    background: var(--brass-light);
}

.band-text h2 {
    margin-bottom: 32px;
}

.band-text h2 em {
    color: var(--brass-light);
}

.band-text > p:not(.label) {
    max-width: 34rem;
    color: rgba(245, 241, 232, 0.74);
    font-size: 1.05rem;
}

.band-text .ticks {
    margin: 32px 0 48px;
}

.band-text .ticks li::before {
    background: var(--brass-light);
}

/* ---------- Services ---------- */
.services {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 56px;
    row-gap: 64px;
}

.service {
    padding-top: 28px;
    border-top: 1px solid var(--ink);
}

.service h3 {
    margin-bottom: 16px;
    font-size: 1.75rem;
}

.service p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.95rem;
}

/* ---------- Méthode ---------- */
.steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    border-top: 1px solid var(--rule);
}

.steps li {
    padding: 36px 32px 8px 0;
}

.steps li + li {
    padding-left: 32px;
    border-left: 1px solid var(--rule);
}

.step-num {
    display: block;
    margin-bottom: 20px;
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.5rem;
    color: var(--brass);
}

.steps h3 {
    margin-bottom: 14px;
    font-size: 1.65rem;
}

.steps p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.95rem;
}

/* ---------- Références ---------- */
.stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 44px 32px 40px 0;
}

.stat + .stat {
    padding-left: 40px;
    border-left: 1px solid var(--rule);
}

.stat-num {
    font-family: var(--serif);
    font-variant-numeric: lining-nums;
    font-size: clamp(3.4rem, 4vw + 1rem, 5rem);
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--ink-soft);
}

.quote {
    max-width: 52rem;
    margin: clamp(72px, 9vw, 128px) 0 0 280px;
}

.quote p {
    margin: 0 0 24px;
    font-family: var(--serif);
    font-style: italic;
    font-size: clamp(1.7rem, 1.4vw + 1.1rem, 2.3rem);
    line-height: 1.3;
}

.quote footer {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.quote footer::before {
    content: "";
    width: 28px;
    height: 1px;
    background: var(--brass);
}

/* ---------- Contact ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(48px, 7vw, 112px);
    align-items: start;
}

.contact-text h2 {
    margin-bottom: 28px;
}

.contact-text > p {
    max-width: 30rem;
    color: var(--ink-soft);
}

.contact-list {
    margin: 40px 0 0;
    border-top: 1px solid var(--rule);
}

.contact-list div {
    display: flex;
    gap: 24px;
    padding: 16px 0;
    border-bottom: 1px solid var(--rule);
}

.contact-list dt {
    width: 64px;
    font-family: var(--mono);
    font-size: 0.78rem;
    line-height: 1.9;
    color: var(--ink-soft);
}

.contact-list dd {
    margin: 0;
}

.contact-list a {
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}

.contact-list a:hover {
    color: var(--brass);
    border-color: var(--brass);
}

/* Formulaire à filets : pas de boîtes, juste une ligne de saisie. */
.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 40px;
    row-gap: 36px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-full { grid-column: 1 / -1; }

.field label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 10px 0 12px;
    border: 0;
    border-bottom: 1px solid var(--ink);
    border-radius: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
    transition: border-color 0.3s var(--ease);
}

.field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2317150f' stroke-width='1.2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 2px center;
    background-size: 12px 8px;
    padding-right: 24px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-bottom-color: var(--brass);
    box-shadow: 0 1px 0 0 var(--brass);
}

.field textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form .btn {
    align-self: flex-start;
    min-width: 200px;
}

/* ---------- Pied de page ---------- */
.site-footer {
    background: var(--night);
    color: var(--ivory);
    padding: 72px 0 56px;
}

.footer-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 32px 56px;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 36px;
}

.footer-nav a {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(245, 241, 232, 0.7);
    transition: color 0.3s var(--ease);
}

.footer-nav a:hover {
    color: var(--brass-light);
}

.site-footer .wordmark em {
    color: var(--brass-light);
}

.footer-copy {
    margin: 0;
    font-family: var(--mono);
    font-size: 0.75rem;
    color: rgba(245, 241, 232, 0.5);
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
    .section-head,
    .product {
        grid-template-columns: 180px minmax(0, 1fr);
    }

    .product-link {
        grid-column: 2;
        justify-self: start;
        margin-top: 0;
    }

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

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

    .steps li:nth-child(3) {
        padding-left: 0;
        border-left: 0;
    }

    .steps li:nth-child(n + 3) {
        border-top: 1px solid var(--rule);
    }

    .quote {
        margin-left: 220px;
    }
}

@media (max-width: 960px) {
    .band-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .band-photo img {
        aspect-ratio: 4 / 3;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .hero {
        display: block;
        min-height: 0;
        padding: 58vw 0 0;
        background: var(--ivory);
    }

    .hero-photo {
        bottom: auto;
        height: 72vw;
    }

    .hero-photo img {
        object-position: 62% 40%;
    }

    .hero .wrap {
        padding: 0 12px;
    }

    .hero-panel {
        max-width: none;
        padding: 36px 24px 32px;
        background: rgba(245, 241, 232, 0.96);
    }

    .nav-toggle { display: inline-flex; }

    .nav-menu {
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px var(--gutter) 24px;
        background: var(--ivory);
        border-bottom: 1px solid var(--rule);
        display: none;
    }

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

    .nav-menu li + li {
        border-top: 1px solid var(--rule);
    }

    .nav-menu a {
        display: block;
        padding: 18px 0;
    }

    .nav-menu .nav-cta {
        margin-top: 12px;
        text-align: center;
    }

    .section-head,
    .product {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .section-head .label {
        margin: 0;
    }

    .product-link {
        grid-column: auto;
    }

    .services,
    .steps,
    .stats {
        grid-template-columns: 1fr;
    }

    .steps li,
    .steps li + li,
    .stat,
    .stat + .stat {
        padding-left: 0;
        border-left: 0;
    }

    .steps li + li,
    .stat + .stat {
        border-top: 1px solid var(--rule);
    }

    .quote {
        margin-left: 0;
    }

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

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *, *::before, *::after {
        transition: none !important;
    }
}
