/* =========================================================
   ALOO NETTOYAGE — SERVICES EXACT TARGET
   Fresh ref-* structure only.
   Target proportions taken from the approved reference:
   large 3-column cards, tall format, wide blue waves.
   ========================================================= */

.ref-services{
    padding:76px 0 68px;
    overflow:hidden;
    background:
        radial-gradient(circle at 8% 10%,rgba(18,132,229,.05),transparent 26%),
        radial-gradient(circle at 94% 15%,rgba(18,132,229,.05),transparent 24%),
        linear-gradient(180deg,#fbfdff 0%,#f5fbff 100%);
}

.ref-services__head{
    max-width:1160px;
    margin:0 auto 38px;
    text-align:center;
}

.ref-services__eyebrow{
    display:inline-flex;
    align-items:center;
    gap:13px;
    margin-bottom:12px;
    color:#0b6fd4;
    font-size:12px;
    font-weight:900;
    letter-spacing:.26em;
}

.ref-services__eyebrow::before,
.ref-services__eyebrow::after{
    content:"";
    width:58px;
    height:2px;
    border-radius:999px;
    background:#1688ef;
}

.ref-services__head h2{
    margin:0;
    color:#082f69;
    font-size:clamp(44px,4.25vw,62px);
    line-height:1.04;
    font-weight:900;
    letter-spacing:-.045em;
}

.ref-services__head h2 span{
    color:#1688ef;
}

.ref-services__head p{
    max-width:980px;
    margin:16px auto 0;
    color:#687e99;
    font-size:16px;
    line-height:1.6;
}

/* =========================
   GRID
   ========================= */
.ref-services__grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:24px;
}

/* =========================
   CARD
   Target is ~1.14:1, not 1.42:1
   ========================= */
.ref-card{
    position:relative;
    min-width:0;
    aspect-ratio:1.14 / 1;
    overflow:hidden;
    border:1px solid #d8e7f3;
    border-radius:18px;
    background:#fff;
    box-shadow:0 16px 38px rgba(10,54,102,.09);
}

/* Photo = right ~42% */
.ref-card__photo{
    position:absolute;
    inset:0 0 0 55.5%;
    display:block;
    overflow:hidden;
    background:#eaf4fb;
}

.ref-card__photo img{
    width:100%;
    height:100%;
    display:block;
    object-fit:cover;
    object-position:center;
    transition:transform .35s ease;
}

.ref-card:hover .ref-card__photo img{
    transform:scale(1.03);
}

/* White panel = left ~64%, with long diagonal cut */
.ref-card__panel{
    position:absolute;
    z-index:4;
    inset:0 auto 0 0;
    width:65%;
    padding:31px 24px 28px 34px;
    background:#fff;
    clip-path:polygon(0 0,100% 0,78% 100%,0 100%);
}

.ref-card__number{
    position:absolute;
    top:23px;
    right:35px;
    color:#dfefff;
    font-size:68px;
    line-height:1;
    font-weight:900;
    letter-spacing:-.06em;
}

.ref-card__top-icon{
    position:relative;
    z-index:3;
    width:82px;
    height:82px;
    display:grid;
    place-items:center;
    margin:66px 0 22px;
    border-radius:50%;
    background:linear-gradient(180deg,#178cee,#0876dd);
    box-shadow:0 12px 28px rgba(10,118,218,.16);
    color:#fff;
}

.ref-card__top-icon svg{
    width:43px;
    height:43px;
    display:block;
    color:#fff;
    stroke:#fff;
}

.ref-card h3{
    position:relative;
    z-index:3;
    max-width:270px;
    margin:0;
    color:#082f69;
    font-size:25px;
    line-height:1.12;
    font-weight:900;
    letter-spacing:-.025em;
}

.ref-card__panel > p{
    position:relative;
    z-index:3;
    max-width:270px;
    margin:16px 0 0;
    color:#5e7693;
    font-size:14px;
    line-height:1.55;
}

.ref-card__more{
    position:absolute;
    z-index:5;
    left:34px;
    bottom:29px;
    display:inline-flex;
    align-items:center;
    gap:14px;
    color:#0b79df;
    font-size:15px;
    font-weight:900;
}

.ref-card__more::after{
    content:"";
    position:absolute;
    left:0;
    bottom:-7px;
    width:108px;
    height:2px;
    border-radius:999px;
    background:#0b79df;
}

.ref-card__more span{
    font-size:27px;
    line-height:1;
}

/* =========================
   LARGE BOTTOM WAVES
   ========================= */
.ref-card__waves{
    position:absolute;
    z-index:8;
    right:0;
    bottom:0;
    width:47%;
    height:31%;
    pointer-events:none;
}

.ref-card__waves > svg{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    display:block;
    overflow:visible;
}

.ref-wave--pale{ fill:#dff5ff; }
.ref-wave--light{ fill:#91d7fb; }
.ref-wave--mid{ fill:#2da6f2; }
.ref-wave--dark{ fill:#0968c0; }

.ref-card__bottom-icon{
    position:absolute;
    z-index:3;
    right:10%;
    bottom:12%;
    width:62px;
    height:62px;
    display:grid;
    place-items:center;
    color:#fff;
}

.ref-card__bottom-icon svg{
    width:51px;
    height:51px;
    display:block;
    color:#fff;
    stroke:#fff;
}

/* =========================
   BENEFITS
   ========================= */
.ref-services__benefits{
    max-width:1100px;
    margin:42px auto 0;
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:22px;
}

.ref-services__benefits > div{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:14px;
    min-height:72px;
}

.ref-services__benefits span{
    width:62px;
    height:62px;
    flex:0 0 62px;
    display:grid;
    place-items:center;
    border-radius:50%;
    background:#e9f5ff;
    color:#1686ed;
    font-size:25px;
}

.ref-services__benefits strong{
    color:#173b63;
    font-size:15px;
    line-height:1.32;
}

/* =========================
   TABLET
   ========================= */
@media (min-width:768px) and (max-width:1199px){
    .ref-services{
        padding:62px 0 58px;
    }

    .ref-services__head h2{
        font-size:42px;
    }

    .ref-services__head p{
        font-size:14px;
    }

    .ref-services__grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:20px;
    }

    .ref-card{
        aspect-ratio:1.16 / 1;
    }

    .ref-card__panel{
        padding:27px 20px 24px 28px;
    }

    .ref-card__top-icon{
        width:72px;
        height:72px;
        margin-top:55px;
    }

    .ref-card__top-icon svg{
        width:38px;
        height:38px;
    }

    .ref-card h3{
        font-size:22px;
    }

    .ref-card__panel > p{
        font-size:12px;
    }

    .ref-card__more{
        left:28px;
        bottom:24px;
        font-size:13px;
    }

    .ref-card__bottom-icon{
        width:52px;
        height:52px;
    }

    .ref-card__bottom-icon svg{
        width:43px;
        height:43px;
    }

    .ref-services__benefits{
        grid-template-columns:repeat(2,1fr);
    }
}

/* =========================
   MOBILE
   ========================= */
@media (max-width:767px){
    .ref-services{
        padding:50px 0 46px;
    }

    .ref-services__head{
        margin-bottom:24px;
    }

    .ref-services__eyebrow{
        font-size:10px;
    }

    .ref-services__eyebrow::before,
    .ref-services__eyebrow::after{
        width:32px;
    }

    .ref-services__head h2{
        font-size:31px;
    }

    .ref-services__head p{
        font-size:12px;
        line-height:1.5;
    }

    .ref-services__grid{
        grid-template-columns:1fr;
        gap:14px;
    }

    .ref-card{
        aspect-ratio:1.13 / 1;
        border-radius:16px;
    }

    .ref-card__photo{
        left:56%;
    }

    .ref-card__panel{
        width:66%;
        padding:20px 13px 17px 18px;
        clip-path:polygon(0 0,100% 0,78% 100%,0 100%);
    }

    .ref-card__number{
        top:12px;
        right:23px;
        font-size:48px;
    }

    .ref-card__top-icon{
        width:52px;
        height:52px;
        margin:39px 0 13px;
    }

    .ref-card__top-icon svg{
        width:27px;
        height:27px;
    }

    .ref-card h3{
        max-width:170px;
        font-size:17px;
    }

    .ref-card__panel > p{
        max-width:165px;
        margin-top:10px;
        font-size:9.5px;
        line-height:1.5;
    }

    .ref-card__more{
        left:18px;
        bottom:16px;
        gap:8px;
        font-size:9.5px;
    }

    .ref-card__more::after{
        width:62px;
        bottom:-5px;
    }

    .ref-card__more span{
        font-size:17px;
    }

    .ref-card__waves{
        width:47%;
        height:30%;
    }

    .ref-card__bottom-icon{
        right:9%;
        bottom:10%;
        width:34px;
        height:34px;
    }

    .ref-card__bottom-icon svg{
        width:28px;
        height:28px;
    }

    .ref-services__benefits{
        grid-template-columns:repeat(2,1fr);
        gap:6px;
        margin-top:20px;
    }

    .ref-services__benefits > div{
        min-height:54px;
        justify-content:flex-start;
        gap:8px;
    }

    .ref-services__benefits span{
        width:38px;
        height:38px;
        flex-basis:38px;
        font-size:16px;
    }

    .ref-services__benefits strong{
        font-size:10px;
    }
}

/* =========================================================
   ALOO SERVICES — PROPORTIONAL DESKTOP SCALE
   The approved reference is ~1648px wide.
   On 1200–1647px desktop screens, scale the INNER content
   proportionally while keeping 3 cards in one row.
   This fixes text/button overlap and keeps the same visual ratio.
   ========================================================= */
@media (min-width:1200px) and (max-width:1647px){

    .ref-services{
        padding-top:clamp(60px,4.61vw,76px);
        padding-bottom:clamp(54px,4.13vw,68px);
    }

    .ref-services__head{
        margin-bottom:clamp(30px,2.30vw,38px);
    }

    .ref-services__eyebrow{
        gap:clamp(10px,.79vw,13px);
        margin-bottom:clamp(10px,.73vw,12px);
        font-size:clamp(10px,.73vw,12px);
    }

    .ref-services__eyebrow::before,
    .ref-services__eyebrow::after{
        width:clamp(46px,3.52vw,58px);
    }

    .ref-services__head h2{
        font-size:clamp(38px,3.76vw,62px);
    }

    .ref-services__head p{
        max-width:clamp(785px,59.47vw,980px);
        margin-top:clamp(13px,.97vw,16px);
        font-size:clamp(13px,.97vw,16px);
    }

    .ref-services__grid{
        gap:clamp(19px,1.46vw,24px);
    }

    .ref-card{
        border-radius:clamp(14px,1.09vw,18px);
    }

    .ref-card__panel{
        padding:
            clamp(25px,1.88vw,31px)
            clamp(19px,1.46vw,24px)
            clamp(22px,1.70vw,28px)
            clamp(27px,2.06vw,34px);
    }

    .ref-card__number{
        top:clamp(18px,1.40vw,23px);
        right:clamp(28px,2.12vw,35px);
        font-size:clamp(54px,4.13vw,68px);
    }

    .ref-card__top-icon{
        width:clamp(66px,4.98vw,82px);
        height:clamp(66px,4.98vw,82px);
        margin:
            clamp(53px,4.00vw,66px)
            0
            clamp(18px,1.33vw,22px);
    }

    .ref-card__top-icon svg{
        width:clamp(34px,2.61vw,43px);
        height:clamp(34px,2.61vw,43px);
    }

    .ref-card h3{
        max-width:clamp(216px,16.38vw,270px);
        font-size:clamp(20px,1.52vw,25px);
    }

    .ref-card__panel > p{
        max-width:clamp(216px,16.38vw,270px);
        margin-top:clamp(13px,.97vw,16px);
        font-size:clamp(11px,.85vw,14px);
    }

    .ref-card__more{
        left:clamp(27px,2.06vw,34px);
        bottom:clamp(23px,1.76vw,29px);
        gap:clamp(11px,.85vw,14px);
        font-size:clamp(12px,.91vw,15px);
    }

    .ref-card__more::after{
        bottom:clamp(-7px,-.42vw,-5px);
        width:clamp(86px,6.55vw,108px);
    }

    .ref-card__more span{
        font-size:clamp(22px,1.64vw,27px);
    }

    .ref-card__bottom-icon{
        width:clamp(50px,3.76vw,62px);
        height:clamp(50px,3.76vw,62px);
    }

    .ref-card__bottom-icon svg{
        width:clamp(41px,3.09vw,51px);
        height:clamp(41px,3.09vw,51px);
    }

    .ref-services__benefits{
        max-width:clamp(880px,66.75vw,1100px);
        margin-top:clamp(34px,2.55vw,42px);
        gap:clamp(18px,1.33vw,22px);
    }

    .ref-services__benefits > div{
        gap:clamp(11px,.85vw,14px);
        min-height:clamp(58px,4.37vw,72px);
    }

    .ref-services__benefits span{
        width:clamp(50px,3.76vw,62px);
        height:clamp(50px,3.76vw,62px);
        flex-basis:clamp(50px,3.76vw,62px);
        font-size:clamp(20px,1.52vw,25px);
    }

    .ref-services__benefits strong{
        font-size:clamp(12px,.91vw,15px);
    }
}

/* =========================================================
   ALOO SERVICES — NO OVERLAP FIX
   The issue in the screenshot was vertical collision between
   description and "En savoir plus" on narrower desktop cards.
   ========================================================= */

/* Always reserve a protected bottom area for the CTA */
.ref-card__panel{
    padding-bottom:76px !important;
}

/* Description can never enter the CTA zone */
.ref-card__panel > p{
    overflow:hidden !important;
    display:-webkit-box !important;
    -webkit-box-orient:vertical !important;
    -webkit-line-clamp:4 !important;
    line-clamp:4 !important;
}

/* CTA is isolated from normal text flow */
.ref-card__more{
    bottom:26px !important;
    white-space:nowrap !important;
}

/* On 1200–1647px, cards are physically smaller because 3 remain in one row.
   Reduce the upper whitespace and clamp long descriptions to 3 lines. */
@media (min-width:1200px) and (max-width:1647px){
    .ref-card__panel{
        padding-bottom:64px !important;
    }

    .ref-card__top-icon{
        margin-top:clamp(34px,2.75vw,45px) !important;
        margin-bottom:clamp(12px,1.05vw,17px) !important;
    }

    .ref-card h3{
        font-size:clamp(18px,1.42vw,23px) !important;
        line-height:1.10 !important;
    }

    .ref-card__panel > p{
        margin-top:clamp(8px,.70vw,12px) !important;
        font-size:clamp(10px,.78vw,13px) !important;
        line-height:1.42 !important;
        -webkit-line-clamp:3 !important;
        line-clamp:3 !important;
    }

    .ref-card__more{
        bottom:clamp(18px,1.55vw,25px) !important;
        font-size:clamp(10px,.82vw,13.5px) !important;
    }
}

/* Tablet: same principle, no overlap */
@media (min-width:768px) and (max-width:1199px){
    .ref-card__panel{
        padding-bottom:62px !important;
    }

    .ref-card__top-icon{
        margin-top:36px !important;
        margin-bottom:12px !important;
    }

    .ref-card__panel > p{
        -webkit-line-clamp:3 !important;
        line-clamp:3 !important;
    }

    .ref-card__more{
        bottom:18px !important;
    }
}

/* Mobile */
@media (max-width:767px){
    .ref-card__panel{
        padding-bottom:52px !important;
    }

    .ref-card__top-icon{
        margin-top:30px !important;
        margin-bottom:10px !important;
    }

    .ref-card__panel > p{
        -webkit-line-clamp:3 !important;
        line-clamp:3 !important;
    }

    .ref-card__more{
        bottom:14px !important;
    }
}

/* =========================================================
   ALOO SERVICES — STRUCTURAL FLEX FIX
   Definitive fix for description / CTA overlap.
   The CTA is NO LONGER absolutely positioned.
   ========================================================= */

.ref-card__panel{
    display:flex !important;
    flex-direction:column !important;
    height:100% !important;
    box-sizing:border-box !important;
    padding-bottom:24px !important;
}

/* Keep number floating, but everything else follows normal flow */
.ref-card__number{
    flex:0 0 auto !important;
}

.ref-card__top-icon{
    flex:0 0 auto !important;
}

.ref-card h3{
    flex:0 0 auto !important;
}

.ref-card__panel > p{
    flex:0 1 auto !important;
    overflow:hidden !important;
    display:-webkit-box !important;
    -webkit-box-orient:vertical !important;
    -webkit-line-clamp:4 !important;
    line-clamp:4 !important;
}

/* THIS is the important change:
   button participates in layout and is pushed to the bottom */
.ref-card__more{
    position:relative !important;
    left:auto !important;
    right:auto !important;
    top:auto !important;
    bottom:auto !important;

    margin-top:auto !important;
    margin-bottom:0 !important;
    align-self:flex-start !important;

    flex:0 0 auto !important;
    white-space:nowrap !important;
}

/* Medium desktop: slightly tighter content, still full 3-card row */
@media (min-width:1200px) and (max-width:1647px){
    .ref-card__panel{
        padding-bottom:20px !important;
    }

    .ref-card__top-icon{
        margin-top:clamp(28px,2.35vw,39px) !important;
        margin-bottom:clamp(10px,.85vw,14px) !important;
    }

    .ref-card h3{
        margin-bottom:0 !important;
    }

    .ref-card__panel > p{
        margin-top:clamp(7px,.6vw,10px) !important;
        -webkit-line-clamp:3 !important;
        line-clamp:3 !important;
    }

    .ref-card__more{
        margin-top:auto !important;
        font-size:clamp(10px,.78vw,13px) !important;
    }
}

/* Tablet */
@media (min-width:768px) and (max-width:1199px){
    .ref-card__panel{
        padding-bottom:18px !important;
    }

    .ref-card__top-icon{
        margin-top:30px !important;
        margin-bottom:10px !important;
    }

    .ref-card__panel > p{
        margin-top:8px !important;
        -webkit-line-clamp:3 !important;
        line-clamp:3 !important;
    }

    .ref-card__more{
        margin-top:auto !important;
    }
}

/* Mobile */
@media (max-width:767px){
    .ref-card__panel{
        padding-bottom:14px !important;
    }

    .ref-card__top-icon{
        margin-top:26px !important;
        margin-bottom:8px !important;
    }

    .ref-card__panel > p{
        margin-top:7px !important;
        -webkit-line-clamp:3 !important;
        line-clamp:3 !important;
    }

    .ref-card__more{
        margin-top:auto !important;
    }
}

/* =========================================================
   ALOO SERVICES — DEFINITIVE CARD HEIGHT
   The screenshot showed the real remaining problem:
   the cards are physically too short.
   We stop relying on aspect-ratio and give desktop cards
   an explicit proportional height matching the reference.
   ========================================================= */

/* Desktop */
@media (min-width:1200px){

    .ref-card{
        aspect-ratio:auto !important;
        height:clamp(360px,26.95vw,444px) !important;
        min-height:clamp(360px,26.95vw,444px) !important;
    }

    .ref-card__panel{
        height:100% !important;
        box-sizing:border-box !important;
        padding:
            clamp(24px,1.88vw,31px)
            clamp(18px,1.46vw,24px)
            clamp(22px,1.70vw,28px)
            clamp(26px,2.06vw,34px) !important;
    }

    .ref-card__top-icon{
        width:clamp(66px,4.98vw,82px) !important;
        height:clamp(66px,4.98vw,82px) !important;
        margin-top:clamp(45px,4.0vw,66px) !important;
        margin-bottom:clamp(15px,1.33vw,22px) !important;
    }

    .ref-card__top-icon svg{
        width:clamp(34px,2.61vw,43px) !important;
        height:clamp(34px,2.61vw,43px) !important;
    }

    .ref-card__number{
        top:clamp(18px,1.40vw,23px) !important;
        right:clamp(27px,2.12vw,35px) !important;
        font-size:clamp(54px,4.13vw,68px) !important;
    }

    .ref-card h3{
        max-width:270px !important;
        font-size:clamp(20px,1.52vw,25px) !important;
        line-height:1.12 !important;
    }

    .ref-card__panel > p{
        max-width:270px !important;
        margin-top:clamp(10px,.97vw,16px) !important;
        font-size:clamp(11px,.85vw,14px) !important;
        line-height:1.50 !important;

        /* show the complete useful text area, but never collide with CTA */
        display:-webkit-box !important;
        -webkit-box-orient:vertical !important;
        -webkit-line-clamp:4 !important;
        line-clamp:4 !important;
        overflow:hidden !important;
    }

    .ref-card__more{
        position:relative !important;
        left:auto !important;
        right:auto !important;
        top:auto !important;
        bottom:auto !important;
        align-self:flex-start !important;
        margin-top:auto !important;
        white-space:nowrap !important;

        gap:clamp(10px,.85vw,14px) !important;
        font-size:clamp(11px,.91vw,15px) !important;
    }

    .ref-card__more::after{
        width:clamp(82px,6.55vw,108px) !important;
    }

    .ref-card__more span{
        font-size:clamp(21px,1.64vw,27px) !important;
    }

    /* Keep the reference photo / white-panel proportions */
    .ref-card__photo{
        left:55.5% !important;
    }

    .ref-card__panel{
        width:65% !important;
        clip-path:polygon(0 0,100% 0,78% 100%,0 100%) !important;
    }

    /* Large waves just like the approved target */
    .ref-card__waves{
        width:47% !important;
        height:31% !important;
    }

    .ref-card__bottom-icon{
        right:10% !important;
        bottom:12% !important;
        width:clamp(50px,3.76vw,62px) !important;
        height:clamp(50px,3.76vw,62px) !important;
    }

    .ref-card__bottom-icon svg{
        width:clamp(41px,3.09vw,51px) !important;
        height:clamp(41px,3.09vw,51px) !important;
    }
}

/* Tablet */
@media (min-width:768px) and (max-width:1199px){

    .ref-card{
        aspect-ratio:auto !important;
        height:350px !important;
        min-height:350px !important;
    }

    .ref-card__panel{
        height:100% !important;
        padding-bottom:20px !important;
    }

    .ref-card__panel > p{
        -webkit-line-clamp:4 !important;
        line-clamp:4 !important;
    }

    .ref-card__more{
        position:relative !important;
        margin-top:auto !important;
    }
}

/* Mobile */
@media (max-width:767px){

    .ref-card{
        aspect-ratio:auto !important;
        height:300px !important;
        min-height:300px !important;
    }

    .ref-card__panel{
        height:100% !important;
        padding-bottom:15px !important;
    }

    .ref-card__panel > p{
        -webkit-line-clamp:3 !important;
        line-clamp:3 !important;
    }

    .ref-card__more{
        position:relative !important;
        margin-top:auto !important;
    }
}
