:root {
    --couleur-princ : #ffffff;
    --couleur-neutre : #000000;
    --couleur-second : #f7f7fe;
    --couleur-accent : #1a6b4a;
    --couleur-accent2 : #3ed599;
    --accent-1 : var(--couleur-accent);
    --bg-principal : var(--couleur-princ);
    --bg-2 : var(--couleur-accent);
    --bg-3 :var(--couleur-accent2);

    /* Texte */
    --txt-sm : 11px;
    --txt-md : 15px;
    --txt-lg : 22px;
    --txt-xl : 32px;

    /* Bordures */
    --radius-sm : 12px;
    --radius-md : 32px;
    --radius-lg : 60px;

    /* espacement */
    --space-sm : 10px;
    --space-md : 30px;
    --space-lg : var(--radius-lg);
}

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

h1,h2,h3,h4,h5, p {
    margin: 0;
    padding: 0;
}

h1 {
    font-size: var(--txt-sm);
}

body {
    margin: 0;
    background-color: var(--couleur-princ);
    font-family: 'Inter', Arial, sans-serif;
}

body.page-preload {
    background:
        linear-gradient(180deg, rgba(18, 77, 53, 0.98) 0%, rgba(13, 55, 38, 1) 100%);
}

body.page-preload header,
body.page-preload main,
body.page-preload footer {
    opacity: 0;
}

body.page-ready header,
body.page-ready main,
body.page-ready footer {
    opacity: 1;
}

.site-transition {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
    place-items: center;
    overflow: hidden;
    pointer-events: none;
}

.site-transition.is-active {
    display: grid;
    pointer-events: auto;
}

.site-transition-panel {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(18, 77, 53, 0.98) 0%, rgba(13, 55, 38, 1) 100%);
}

.site-transition-brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: baseline;
    justify-content: center;
    color: #ffffff;
    font-size: clamp(3.2rem, 12vw, 7.5rem);
    font-weight: 800;
    line-height: 0.9;
    letter-spacing: -0.065em;
    text-transform: none;
    white-space: nowrap;
}

.site-transition-o,
.site-transition-rest {
    display: inline-block;
    will-change: transform, opacity;
}

.site-transition-o {
    transform-origin: center center;
}

.site-transition-rest {
    padding-left: 0.02em;
}

/* Masque le gap de 10px au-dessus du header sticky */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 18px;
    background: var(--couleur-princ);
    z-index: 99;
    pointer-events: none;
    transition: transform 280ms ease, opacity 220ms ease;
}

body:has(header.header-hidden)::before {
    transform: translateY(-100%);
    opacity: 0;
}

main {
    background-color: var(--couleur-princ);
}

header {
    position: sticky;
    top: 10px;
    z-index: 100;
    padding: 0 24px;
    margin: 0;
    transition: transform 280ms ease, opacity 220ms ease,
                margin-inline 280ms ease, padding-inline 280ms ease,
                background-color 240ms ease, box-shadow 240ms ease,
                border-radius 240ms ease;
    transform: translateY(0);
    opacity: 1;
    will-change: transform, opacity;
}

header.header-scrolled {
    margin-inline: 20px;
    padding-inline: 24px;
    background-color: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: var(--radius-lg);
    box-shadow:
        0 4px 24px rgba(16, 35, 28, 0.10),
        0 1px 4px rgba(16, 35, 28, 0.06),
        0 0 0 1px rgba(16, 35, 28, 0.05);
}

header.header-hidden {
    transform: translateY(calc(-100% - 18px));
    opacity: 0;
    pointer-events: none;
}

.ordinia--nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 64px;
}

.nav--logo h1 {
    margin: 0;
    color: var(--accent-1);
    font-size: var(--txt-xl);
    font-weight: 800;
    letter-spacing: -0.025em;
}

.bouton--burger {
    display: none;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.ham {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 400ms;
    user-select: none;
}

.ham.active {
    transform: rotate(45deg);
}

.line {
    fill: none;
    stroke: #0c1f17;
    stroke-width: 5.5;
    stroke-linecap: round;
    transition: stroke-dasharray 400ms, stroke-dashoffset 400ms, transform 400ms;
}

.ham .middle,
.ham .bottom {
    transform-origin: 50%;
}

.ham8 .top {
    stroke-dasharray: 40 160;
}

.ham8 .middle {
    stroke-dasharray: 40 142;
}

.ham8 .bottom {
    stroke-dasharray: 40 85;
}

.ham8.active .top,
.ham8.active .bottom {
    stroke-dashoffset: -64px;
}

.ham8.active .middle {
    transform: rotate(90deg);
}

.bouton--burger svg {
    display: block;
}

.bouton--menu {
    margin-left: auto;
}

.bouton--menu ul {
    display: flex;
    align-items: center;
    gap: 18px;
}

.liens {
    margin: 0;
}

.liens a {
    position: relative;
    display: block;
    color: rgba(12, 31, 23, 0.72);
    font-size: 0.90rem;
    font-weight: 500;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 8px;
    transition: color 200ms ease, background-color 200ms ease;
}

.liens a::after {
    content: "";
    position: absolute;
    bottom: 2px;
    left: 10px;
    right: 10px;
    height: 1.5px;
    background: var(--accent-1);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

.liens a:hover,
.liens a[aria-current="page"] {
    color: var(--accent-1);
}

.liens a:hover::after,
.liens a[aria-current="page"]::after {
    transform: scaleX(1);
}

.liens a:focus-visible {
    color: var(--accent-1);
    background-color: rgba(26, 107, 74, 0.07);
    outline: none;
}

.liens a:focus-visible::after {
    transform: scaleX(1);
}

@media (min-width: 581px) {
    .liens a:hover {
        background-color: rgba(26, 107, 74, 0.06);
    }
}

ul, li {
    list-style: none;
    margin: 0;
    padding: 0;
}

@media (max-width: 580px) {
    header {
        top: 8px;
        padding-inline: 16px;
    }

    header.header-scrolled {
        margin-inline: 12px;
        padding-inline: 16px;
    }

    .bouton--burger {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 58px;
        height: 58px;
        line-height: 0;
    }

    .ordinia--nav {
        justify-content: space-between;
        min-height: 56px;
    }

    .nav--logo {
        flex: 0 0 auto;
    }

    .bouton--menu {
        position: absolute;
        top: calc(100% + 8px);
        left: 14px;
        right: 14px;
        margin-left: 0;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        pointer-events: none;
        z-index: 10;
        border-radius: var(--radius-sm);
        background-color: var(--bg-principal);
        box-shadow:
            10px 10px 24px rgba(0, 0, 0, 0.12),
            -10px -10px 24px rgba(255, 255, 255, 0.9),
            inset 2px 2px 5px rgba(255, 255, 255, 0.85),
            inset -2px -2px 5px rgba(0, 0, 0, 0.04);
        transform: translateY(-10px) scaleY(0.92);
        transform-origin: top;
        transition: max-height 350ms ease, opacity 250ms ease, transform 350ms ease;
    }

    .bouton--menu.menu-ouvert {
        max-height: 320px;
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0) scaleY(1);
    }

    .bouton--menu ul {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 14px;
    }

    .liens a {
        padding: 10px 14px;
        border-radius: var(--radius-sm);
        background-color: transparent;
    }

    .liens a::after {
        display: none;
    }

    .liens a:active,
    .liens a[aria-current="page"] {
        background-color: rgba(26, 107, 74, 0.08);
        color: var(--accent-1);
    }
}

@media (prefers-reduced-motion: reduce) {
    body.page-preload {
        background: var(--couleur-princ);
    }

    body.page-preload header,
    body.page-preload main,
    body.page-preload footer,
    body.page-ready header,
    body.page-ready main,
    body.page-ready footer {
        opacity: 1;
    }

    header {
        transition: background-color 220ms ease, box-shadow 220ms ease, border-radius 220ms ease;
        transform: none;
    }

    header.header-hidden {
        transform: none;
        opacity: 1;
        pointer-events: auto;
    }

    .site-transition {
        display: none !important;
    }
}

@media (max-width: 580px) {
    .site-transition-brand {
        font-size: clamp(2.8rem, 16vw, 4.8rem);
        letter-spacing: -0.05em;
    }
}
