/* =========================================================
   FRONT-PAGE
========================================================= */



.mobile-btn {
    display: block;
    margin-top: clamp(24px, 3vw, 30px);
    text-align: center;
}

/* =========================================================
   HERO
========================================================= */

/* Empêche le flash du texte brut avant le split JS */

.hero-title[data-splitting] {
    visibility: hidden;
}

.hero-title.is-revealed {
    visibility: visible;
}

.hero-title {
    perspective: 800px;
    font-family: var(--font-primary);
    font-size: clamp(3rem, 7vw, var(--font-size-5xl));
    font-weight: 800;
    line-height: .95;
    letter-spacing: -.035em;
}

.hero-title .word {
    display: inline-block;
}

.hero-title .char {
    display: inline-block;
    transform: rotateX(-90deg) translateY(.3em);
    transform-style: preserve-3d;
    opacity: 0;
    animation: heroCharIn .6s cubic-bezier(.2, .8, .2, 1) forwards;
    animation-delay: calc(var(--char-index) * .02s);
}

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

@media (prefers-reduced-motion: reduce) {
    .hero-title[data-splitting] {
        visibility: visible;
    }

    .hero-title .char {
        transform: none;
        opacity: 1;
        animation: none;
    }
}

/* Révélation de secours après 2 secondes */

@keyframes forceReveal {
    to {
        visibility: visible;
    }
}

.hero-title[data-splitting] {
    visibility: hidden;
    animation: forceReveal 0s 2s forwards;
}

.hero-title.is-revealed {
    visibility: visible;
}

/* ---- Tag / eyebrow du hero ---- */

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: clamp(8px, 1vw, 14px);
    margin-bottom: clamp(24px, 3vw, 36px);
    font-family: var(--font-tertiary);
    font-size: var(--font-size-xs);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.hero-tag-red {
    color: var(--red);
}

.hero-tag-white {
    color: var(--white);
}

.hero-tag .bar {
    width: clamp(28px, 3vw, 40px);
    height: 1px;
    background: var(--red);
}

/* ---- Grille hero ---- */

.hero-grid {
    padding-bottom: clamp(32px, 4vw, 48px);
}

/* ---- Sous-section ---- */

.hero-sub {
    margin-top: clamp(28px, 3vw, 40px);
}

.col1 {
    max-width: 380px;
    padding: 20px 18px 0 0;
    color: var(--dark-grey);
    font-family: var(--font-secondary);
    font-size: var(--font-size-md);
    line-height: 1.65;
}

.col2 {
    margin-top: clamp(16px, 2vw, 20px);
    padding-left: clamp(12px, 1.5vw, 18px);
    border-left: 2px solid var(--red);
    color: var(--body);
    font-family: var(--font-tertiary);
    font-size: var(--font-size-xs);
    line-height: 1.8;
    letter-spacing: .08em;
    text-transform: uppercase;
}

/* ---- Actions ---- */

.hero-actions {
    margin-top: clamp(32px, 4vw, 48px);
}

/* Utilitaire personnalisé compatible UIkit */

.uk-gap {
    gap: clamp(16px, 2vw, 24px);
}

/* ---- Colonne droite ---- */

.hero-right {
    position: relative;
    min-height: clamp(560px, 65vw, 940px);
}

/* ---- Photo hero ---- */

.hero-photo {
    position: absolute;
    inset: 0;
    background-image: url('../img/theret-renovation-de-facade-tuffeau.webp');
    background-position: center;
    background-size: cover;
    filter: saturate(.85) contrast(1.05);
}

.hero-photo::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(
        180deg,
        transparent 60%,
        rgba(26, 26, 26, .4)
    );
}

/* ---- Caption ---- */

.hero-caption {
    position: absolute;
    right: clamp(16px, 2vw, 24px);
    bottom: clamp(16px, 2vw, 24px);
    left: clamp(16px, 2vw, 24px);
    display: flex;
    justify-content: space-between;
    color: var(--white);
    font-family: var(--font-tertiary);
    font-size: var(--font-size-xs);
    line-height: 1.4;
    letter-spacing: .12em;
    text-transform: uppercase;
}

/* ---- Meta strip ---- */

.hero-meta-strip {
    margin-top: clamp(32px, 4vw, 48px);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.hero-meta-strip > div {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: clamp(16px, 2vw, 24px) clamp(18px, 2.3vw, 28px);
    border-right: 1px solid var(--line);
}

.hero-meta-strip > div:last-child {
    border-right: none;
}

.hms-k {
    color: var(--body);
    font-family: var(--font-tertiary);
    font-size: var(--font-size-xs);
    letter-spacing: .18em;
    text-transform: uppercase;
}

.hms-v {
    color: var(--anthracite);
    font-family: var(--font-primary);
    font-size: var(--font-size-lg);
    font-weight: 700;
}

.hms-v .r {
    color: var(--red);
}

/* =========================================================
   MARQUEE / TEXTE DÉFILANT
========================================================= */

.marquee {
    overflow: hidden;
    padding: clamp(16px, 2vw, 24px) 0;
    border-top: 1px solid #000;
    border-bottom: 1px solid #000;
    background: var(--anthracite);
    color: var(--white);
}

.marquee-track {
    display: flex;
    align-items: center;
    gap: clamp(32px, 5vw, 64px);
    font-family: var(--font-primary);
    font-size: clamp(2rem, 4vw, 2.875rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.01em;
    text-transform: uppercase;
    white-space: nowrap;
    animation: scroll 38s linear infinite;
}

.marquee-track span {
    display: inline-flex;
    align-items: center;
    gap: clamp(32px, 5vw, 64px);
}

.marquee-track .dot {
    width: clamp(9px, 1.2vw, 14px);
    height: clamp(9px, 1.2vw, 14px);
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--red);
}

@keyframes scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* =========================================================
   SERVICES
========================================================= */

.article {
    margin-top: 0;
    margin-bottom: 0;
}

.services {
    background: var(--white);
}

.services .svc-row + .svc-row {
    margin-top: 0 !important;
}

.svc-list > a {
    display: block;
    color: inherit;
    text-decoration: none;
}

.svc-list > a:hover {
    color: inherit;
    text-decoration: none;
}

.svc-list article {
    padding: clamp(28px, 4vw, 48px) 0;
    border-top: 1px solid var(--line);
    transition: background .3s;
    cursor: pointer;
}

.svc-list article:last-child {
    border-bottom: 1px solid var(--line);
}

.svc-list article:hover {
    background: var(--paper);
}

.svc-no {
    color: var(--red);
    font-family: var(--font-primary);
    font-size: var(--font-size-xl);
    font-weight: 800;
    font-feature-settings: "tnum";
}

.svc-text h3 {
    font-family: var(--font-primary);
    font-size: clamp(2rem, 4vw, 2.875rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.02em;
    transition: color .2s;
}

.svc-row:hover h3 {
    color: var(--red);
}

.svc-text p {
    max-width: 420px;
    margin-top: clamp(12px, 1.5vw, 16px);
    color: var(--body);
    font-family: var(--font-secondary);
    font-size: var(--font-size-sm);
    line-height: 1.6;
}

.svc-text .it {
    color: var(--body);
    font-style: italic;
    font-weight: 300;
}

.tag {
    padding: 5px 10px;
    border: 1px solid var(--line);
    border-radius: 2px;
    color: var(--body);
    font-family: var(--font-tertiary);
    font-size: var(--font-size-xs);
    letter-spacing: .12em;
    text-transform: uppercase;
}

.svc-img-wrap {
    position: relative;
    height: clamp(300px, 40vw, 520px);
    overflow: hidden;
    border-radius: 2px;
}

.svc-img {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    transition: transform .6s ease;
}

.svc-row:hover .svc-img {
    transform: scale(1.02);
}

.svc-arrow {
    color: var(--anthracite);
    background-color: var(--white);
    font-size: var(--font-size-2xl);
    font-weight: 700;
    transition: .2s;
}

.svc-row:hover .svc-arrow {
    color: var(--red);
    transform: translateX(8px);
}

/* =========================================================
   QUI SOMMES-NOUS
========================================================= */

.who {
    position: relative;
    overflow: hidden;
    background: var(--paper);
}

.who .lead {
    margin-top: clamp(24px, 3vw, 32px);
    color: var(--anthracite);
    font-family: var(--font-primary);
    font-size: clamp(1.0625rem, 1.2vw + .7rem, 1.1875rem);
    font-weight: 500;
    line-height: 1.5;
}

.who .body {
    max-width: 480px;
    margin-top: clamp(16px, 2vw, 20px);
    font-family: var(--font-secondary);
    font-size: var(--font-size-md);
    line-height: 1.7;
}

.who-signature {
    color: var(--body);
    font-family: var(--font-tertiary);
    font-size: var(--font-size-xs);
    letter-spacing: .08em;
}

.who-signature .stamp {
    padding: 8px 14px;
    border: 1.5px solid var(--red);
    color: var(--red);
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    transform: rotate(-3deg);
}

.who-photos {
    position: relative;
    height: clamp(420px, 52vw, 620px);
}

.wp-main {
    position: absolute;
    top: 0;
    right: 0;
    width: 68%;
    height: clamp(340px, 40vw, 700px);
    background-position: center;
    background-size: cover;
    filter: saturate(.9);
}

.wp-second {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 55%;
    height: clamp(200px, 23vw, 280px);
    border: clamp(5px, .6vw, 8px) solid var(--paper);
    background-position: center;
    background-size: cover;
    filter: saturate(.85);
}

.wp-main img,
.wp-second img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wp-stamp {
    position: absolute;
    top: clamp(-20px, -2vw, -10px);
    left: clamp(80px, 12vw, 175px);
    z-index: 3;
    display: flex;
    width: clamp(130px, 16vw, 190px);
    height: clamp(130px, 16vw, 190px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--red);
    color: var(--white);
    font-family: var(--font-primary);
    font-weight: 800;
    text-align: center;
    transform: rotate(-8deg);
    box-shadow: 0 12px 32px rgba(217, 48, 37, .35);
}

.wp-stamp .y {
    font-size: clamp(2rem, 4vw, 2.625rem);
    line-height: 1;
    letter-spacing: -.03em;
}

.wp-stamp .l {
    margin-top: 6px;
    font-size: var(--font-size-xs);
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
}

/* ---- CTA contour blanc ---- */

.btn-outline-white {
    display: inline-flex;
    align-items: center;
    gap: clamp(10px, 1.2vw, 14px);
    padding: clamp(14px, 1.7vw, 20px) clamp(20px, 2.4vw, 28px);
    border: 1.5px solid rgba(255, 255, 255, .5);
    color: var(--white);
    font-family: var(--font-primary);
    font-size: var(--font-size-sm);
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    transition: .2s;
}

.btn-outline-white:hover {
    border-color: var(--white);
    background: var(--white);
    color: var(--anthracite);
}

/* =========================================================
   POURQUOI NOUS CHOISIR
========================================================= */

.why {
    background: var(--white);
}

.why h2 {
    position: sticky;
    top: 120px;
    color: var(--dark);
    font-family: var(--font-primary);
    font-size: var(--font-size-4xl);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.025em;
}

.why h2 .em {
    color: var(--red);
    font-style: italic;
    font-weight: 400;
}

.why-item {
    padding: clamp(24px, 3vw, 36px) 0;
    border-top: 1px solid var(--line);
}

.why-item:last-child {
    border-bottom: 1px solid var(--line);
}

.why-no {
    color: var(--red);
    font-family: var(--font-primary);
    font-size: clamp(2.75rem, 5vw, 3.75rem);
    font-weight: 900;
    line-height: .9;
    letter-spacing: -.04em;
    font-feature-settings: "tnum";
}

.why-body h3 {
    margin-bottom: 10px;
    font-family: var(--font-primary);
    font-size: var(--font-size-xl);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.01em;
}

.why-body p {
    max-width: 520px;
    color: var(--body);
    font-family: var(--font-secondary);
    font-size: var(--font-size-md);
    line-height: 1.7;
}

.why-body .meta {
    margin-top: 16px;
    color: var(--red);
    font-family: var(--font-tertiary);
    font-size: var(--font-size-xs);
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
}

/* =========================================================
   RESPONSIVE - TABLETTE
========================================================= */

@media (max-width: 960px) {
    .hero-title {
        font-size: clamp(3rem, 9vw, 5rem);
    }

    .hero-right {
        min-height: clamp(520px, 80vw, 760px);
    }

    .svc-img-wrap {
        height: clamp(300px, 55vw, 480px);
    }

    .why h2 {
        position: static;
    }

    .marquee-track {
        animation: scroll 10s linear infinite;
    }
}

/* =========================================================
   HERO - TABLETTE
========================================================= */

@media (max-width: 960px) and (min-width: 641px) {
    .hero-grid > .hero-right {
        width: calc(100% - 32px) !important;
        max-width: calc(100% - 32px);
        min-height: clamp(520px, 70vw, 700px);
        box-sizing: border-box;
        margin-left: 40px;
    }

    .hero-grid > .hero-right .hero-photo {
        inset: 0;
        margin-top:30px;
    }

    .hero-grid > .hero-right .hero-caption {
        right: 20px;
        left: 20px;
        justify-content: flex-start;
        line-height: 1.4;
    }

    .wp-main {
        position: relative;
        top: 0;
        right: 0;
        width: 57%;
        height: clamp(355px, 52vw, 644px);
        background-position: center;
        background-size: cover;
        filter: saturate(.9);
    }

    .wp-stamp{
        left: clamp(80px, 34vw, 500px);
    }

}

/* =========================================================
   RESPONSIVE - MOBILE
========================================================= */

@media (max-width: 640px) {
    .mobile-btn {
        margin-top: 24px;
    }

    .proj-card:not(.proj-1) {
        display: none;
    }

    .hero-title {
        font-size: clamp(2.75rem, 13vw, 4rem);
        line-height: .98;
    }

    .hero-grid {
        padding-bottom: 32px;
    }

    .hero-sub {
        margin-top: 28px;
    }

    .hero-actions {
        margin-top: 32px;
    }
    

    .hero-grid > .hero-right {
        width: calc(100% - 24px) !important;
        max-width: calc(100% - 24px);
        min-height: 460px;
        margin-left: 40px;
        box-sizing: border-box;

    }

    .hero-grid > .hero-right .hero-photo {
        inset: 0;
        margin-top:30px;
    }

    .hero-grid > .hero-right .hero-caption {
        right: 16px;
        left: 16px;
        justify-content: flex-start;
        line-height: 1.4;
    }

    .hero-meta-strip {
        margin-top: 32px;
    }

    .hero-meta-strip > div {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .hero-meta-strip > div:last-child {
        border-bottom: 0;
    }

    .marquee-track {
        font-size: clamp(1.75rem, 9vw, 2.5rem);
        animation: scroll 5s linear infinite;
    }

    .svc-list article {
        padding: 32px 0;
    }

    .svc-text h3 {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }

    .svc-img-wrap {
        height: 300px;
    }

    .who-photos {
        height: 430px;
    }

    .wp-main {
        width: 100%;
        height: 450px;
    }

    .wp-second {
        width: 60%;
        height: 190px;
        border-width: 5px;
    }

    .wp-stamp {
        top: -10px;
        right: 6%;
        left: auto;
        width: 155px;
        height: 155px;
    }

    .why h2 {
        font-size: clamp(2.25rem, 10vw, 3.25rem);
        line-height: .98;
    }

    .why-body h3 {
        margin-bottom: 10px;
        font-size: clamp(1.25rem, 5.5vw, 1.6rem);
        line-height: 1.15;
    }

    .why-body p {
        font-size: clamp(1rem, 4.2vw, 1.125rem);
        line-height: 1.65;
    }

    .why-no {
        font-size: clamp(2.5rem, 12vw, 3.5rem);
    }
}

/* =========================================================
   TRÈS PETITS MOBILES
========================================================= */

@media (max-width: 380px) {
    .hero-grid > .hero-right {
        min-height: 400px;
    }

    .hero-grid > .hero-right .hero-caption {
        right: 12px;
        left: 12px;
        font-size: 10px;
        letter-spacing: .08em;
    }

    .why h2 {
        font-size: clamp(2rem, 10vw, 2.75rem);
    }

    .why-body h3 {
        font-size: clamp(1.2rem, 5.5vw, 1.45rem);
    }

    .why-body p {
        font-size: 1rem;
    }
}
