/* ==========================================================================
   Accueil JaiDuRab : slider, sections en photos (Maroc), chiffres.
   Mobile d'abord (375 px), propriétés logiques (RTL), vert #009933 / orange #FF6600.
   ========================================================================== */
.lbc-home {
    --hm-green: #009933;
    --hm-green-dark: #007a29;
    --hm-orange: #FF6600;
    --hm-orange-ink: #CC4A00;   /* orange lisible avec du texte blanc (contraste AA) */
    --hm-ink: #16241a;
    --hm-muted: #55605a;
    --hm-warm: #f7f4ee;
    --hm-radius: 16px;
}

/* --------------------------------------------------------------------------
   Slider hero
   -------------------------------------------------------------------------- */
.hs {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    height: clamp(440px, 66svh, 560px);
    background: #1f2b22;
    color: #fff;
    touch-action: pan-y;
    padding: 0 !important;
}
.hs-track { position: absolute; inset: 0; margin: 0; padding: 0; }
/* app.css force « height: auto » sur les images de .main-content en mobile : les photos recadrées gardent 100 %. */
.main-content .lbc-home .hs-img,
.main-content .lbc-home .hm-cat-img img,
.main-content .lbc-home .hm-step-img img,
.main-content .lbc-home .hm-aud-img img,
.main-content .lbc-home .hm-split-img img,
.main-content .lbc-home .hm-city img,
.main-content .lbc-home .hm-app-img img { height: 100% !important; }
@media (max-width: 768px) {
    .hs { border-radius: 16px; }
}
.hs-slide {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .9s ease, visibility 0s linear .9s;
}
.hs-slide.is-active { opacity: 1; visibility: visible; transition: opacity .9s ease, visibility 0s; }
.hs-img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    background: #2b3a2e;
    transform: scale(1.06);
    transition: transform 7.5s ease-out;
    content-visibility: visible;
}
.hs-slide.is-active .hs-img { transform: scale(1); }
.hs-pic { display: block; width: 100%; height: 100%; }
.hs-static .hs-slide, .hs-static .hs-img { transition: none; transform: none; }
.hs-caption {
    position: absolute;
    z-index: 2;
    inset-block-start: .75rem;
    inset-inline-end: .75rem;
    max-width: min(70%, 360px) !important;
    padding: .3rem .65rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, .45);
    color: #fff;
    font-size: .75rem;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hs-caption i { margin-inline-end: .2rem; opacity: .85; }
.hs-shade {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(8, 18, 10, .15) 0%, rgba(8, 18, 10, .35) 38%, rgba(8, 18, 10, .88) 100%);
}
.hs-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.hs .hs-content { padding-block: 1.25rem 3.75rem !important; }
/* Les max-width sont préfixés par .lbc-home : app.css impose « *:not(...) { max-width: 100vw } » (spécificité 0,2,0). */
.lbc-home .hs-inner { max-width: 640px; }
.hs-kicker {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin: 0 0 .7rem;
    padding: .3rem .8rem;
    border-radius: 999px;
    background: rgba(0, 153, 51, .9);
    color: #fff;
    font-size: .8rem !important;
    font-weight: 700;
}
.hs-title {
    margin: 0 0 .6rem;
    color: #fff;
    font-size: clamp(1.7rem, 7vw, 3.1rem) !important;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.01em;
    text-shadow: 0 2px 18px rgba(0, 0, 0, .35);
}
[dir="rtl"] .hs-title { letter-spacing: 0; line-height: 1.35; }
.lbc-home .hs-lead {
    margin: 0 0 1.1rem;
    max-width: 54ch;
    color: rgba(255, 255, 255, .94);
    font-size: clamp(.95rem, 2.8vw, 1.15rem) !important;
    line-height: 1.6;
}
.hs-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.hs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 48px;
    padding: .7rem 1.3rem;
    border: 2px solid transparent;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    transition: transform .15s ease, background-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.hs-btn:active { transform: scale(.98); }
.hs-btn-primary { background: var(--hm-orange-ink); color: #fff !important; box-shadow: 0 6px 20px rgba(204, 74, 0, .35); }
.hs-btn-primary:hover, .hs-btn-primary:focus-visible { background: #b34100; color: #fff !important; }
.hs-btn-ghost { background: rgba(255, 255, 255, .12); color: #fff !important; border-color: rgba(255, 255, 255, .8); }
.hs-btn-ghost:hover, .hs-btn-ghost:focus-visible { background: #fff; color: var(--hm-ink) !important; }
.hs-points { display: none; }
.hs-controls {
    position: absolute;
    z-index: 3;
    inset-inline: 0;
    inset-block-end: .55rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .15rem;
}
.hs-controls[hidden] { display: none; }
.hs-dots { display: flex; align-items: center; }
.hs-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 24px;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}
.hs-dot::before {
    content: "";
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .55);
    transition: width .3s ease, background-color .3s ease;
}
.hs-dot[aria-current="true"]::before { width: 20px; background: #fff; }
.hs-arrow, .hs-pause {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 50%;
    background: rgba(0, 0, 0, .35);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color .2s ease;
}
.hs-arrow:hover, .hs-pause:hover { background: rgba(0, 0, 0, .6); }
.hs-arrow { display: none; }
[dir="rtl"] .hs-arrow i { display: inline-block; transform: scaleX(-1); }
.hs .hs-dot:focus-visible, .hs .hs-arrow:focus-visible, .hs .hs-pause:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

@media (max-width: 380px) {
    .hs-dot { width: 20px; }
    .hs-btn { flex: 1 1 100%; }
}
/* Mobile : la hauteur suit le texte (fr/en plus longs que l'arabe) et la légende photo, qui passait sous le badge, est retirée. */
@media (max-width: 767px) {
    .hs-caption { display: none; }
    .hs { height: auto; min-height: clamp(440px, 66svh, 560px); }
    .hs-content { height: auto; min-height: inherit; }
}
@media (min-width: 768px) {
    .hs { height: clamp(480px, 70vh, 620px); }
    .hs-shade { background: linear-gradient(90deg, rgba(8, 18, 10, .86) 0%, rgba(8, 18, 10, .55) 45%, rgba(8, 18, 10, .1) 80%), linear-gradient(0deg, rgba(8, 18, 10, .45) 0%, rgba(8, 18, 10, 0) 35%); }
    [dir="rtl"] .hs-shade { background: linear-gradient(270deg, rgba(8, 18, 10, .86) 0%, rgba(8, 18, 10, .55) 45%, rgba(8, 18, 10, .1) 80%), linear-gradient(0deg, rgba(8, 18, 10, .45) 0%, rgba(8, 18, 10, 0) 35%); }
    .hs-content { justify-content: center; }
    .hs .hs-content { padding-block: 2rem 4rem !important; }
    .hs-caption { inset-block-start: auto; inset-block-end: 1rem; inset-inline-end: 1rem; }
    /* RTL : en bas à gauche, la légende recouvrirait le logo incrusté dans la photo ; elle passe en haut. */
    [dir="rtl"] .hs-caption { inset-block-start: 1rem; inset-block-end: auto; }
    .hs-controls { justify-content: flex-start; inset-inline-start: 1rem; inset-inline-end: auto; inset-block-end: 1rem; gap: .35rem; }
    .hs-arrow { display: inline-flex; }
    .hs-points { display: flex; flex-wrap: wrap; gap: .5rem 1.1rem; margin: 1.1rem 0 0; padding: 0; list-style: none; font-size: .9rem; font-weight: 600; color: rgba(255, 255, 255, .92); }
    .hs-points i { color: #7ee2a0; margin-inline-end: .3rem; }
}

/* --------------------------------------------------------------------------
   Sections communes
   -------------------------------------------------------------------------- */
.hm-sec { padding-block: 2.25rem !important; }
.hm-sec-white { background: #fff; }
.hm-sec-warm { background: var(--hm-warm); }
.hm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }
.hm-h2 { margin: 0 0 .35rem; color: var(--hm-ink); font-size: clamp(1.3rem, 4.2vw, 1.85rem) !important; font-weight: 800; line-height: 1.25; }
.hm-h3 { margin: 0 0 .3rem; color: var(--hm-ink); font-size: 1.05rem !important; font-weight: 700; line-height: 1.3; }
.lbc-home .hm-sub { margin: 0; max-width: 62ch; color: var(--hm-muted); font-size: .95rem !important; line-height: 1.55; }
.hm-more { display: none; align-items: center; gap: .35rem; flex-shrink: 0; color: var(--hm-green-dark); font-weight: 700; font-size: .92rem; white-space: nowrap; }
.hm-more:hover { color: var(--hm-ink); }
.hm-kicker { display: inline-flex; align-items: center; gap: .35rem; margin: 0 0 .5rem; color: var(--hm-green-dark); font-size: .82rem !important; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
[dir="rtl"] .hm-kicker { letter-spacing: 0; text-transform: none; }
[dir="rtl"] .hm-flip { display: inline-block; transform: scaleX(-1); }
.hm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.1rem; margin-top: 1.1rem; }
.hm-actions-center { justify-content: center; }
.hm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 48px;
    padding: .7rem 1.35rem;
    border: 2px solid transparent;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.hm-btn-green { background: var(--hm-green-dark); color: #fff !important; }
.hm-btn-green:hover { background: #00601f; color: #fff !important; }
.hm-btn-orange { background: var(--hm-orange-ink); color: #fff !important; }
.hm-btn-orange:hover { background: #b34100; color: #fff !important; }
.hm-btn-outline { background: #fff; color: var(--hm-orange-ink) !important; border-color: var(--hm-orange); }
.hm-btn-outline:hover { background: #fff3ea; }
.hm-btn-white { background: #fff; color: var(--hm-green-dark) !important; }
.hm-btn-white:hover { background: #eafaf0; }
.hm-link-btn { display: inline-flex; align-items: center; gap: .35rem; color: var(--hm-green-dark); font-weight: 700; font-size: .95rem; text-decoration: none; }
.hm-link-btn:hover { color: var(--hm-ink); text-decoration: underline; }
@media (min-width: 640px) { .hm-more { display: inline-flex; } }
@media (min-width: 900px) { .hm-sec { padding-block: 3.25rem !important; } }

/* --------------------------------------------------------------------------
   Catégories en photos
   -------------------------------------------------------------------------- */
.hm-cats {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 140px;
    gap: .8rem;
    margin: 0;
    padding: 0 0 .6rem;
    list-style: none;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}
.hm-cat { scroll-snap-align: start; }
.hm-cat-link { display: block !important; min-height: 0 !important; color: var(--hm-ink); text-decoration: none; }
.hm-cat-img { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 14px; background: #ece8df; }
.hm-cat-img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.hm-cat-link:hover .hm-cat-img img { transform: scale(1.05); }
.hm-cat-name { display: block; margin-top: .45rem; font-size: .9rem; font-weight: 700; line-height: 1.3; }
@media (min-width: 900px) {
    .hm-cats { grid-auto-flow: row; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-columns: auto; gap: 1.1rem; overflow: visible; padding: 0; }
}
@media (min-width: 1200px) { .hm-cats { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* --------------------------------------------------------------------------
   Chiffres (masqués sous le seuil)
   -------------------------------------------------------------------------- */
.hm-impact { background: #007a29; color: #fff; padding: .9rem 0 !important; text-align: center; }
.hm-impact-list { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.6rem; margin: 0; padding: 0; list-style: none; font-size: .95rem; }
.hm-impact-list li { display: inline-flex; align-items: baseline; gap: .35rem; }
.hm-impact-list strong { font-size: 1.15rem; font-weight: 800; }
.hm-impact-note { margin: .4rem 0 0; font-size: .75rem !important; opacity: .85; }

/* --------------------------------------------------------------------------
   Comment ça marche
   -------------------------------------------------------------------------- */
.hm-steps { display: grid; gap: .8rem; margin: 0; padding: 0; list-style: none; }
.hm-step { display: grid; grid-template-columns: 112px 1fr; align-items: center; gap: .9rem; padding: .6rem; border-radius: var(--hm-radius); background: #fff; box-shadow: 0 2px 10px rgba(22, 36, 26, .06); }
.hm-step-img { position: relative; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 12px; background: #e4efe7; display: flex; align-items: center; justify-content: center; color: var(--hm-green-dark); font-size: 2rem; }
.hm-step-img img { width: 100%; height: 100%; object-fit: cover; }
.hm-step-num { position: absolute; inset-block-start: .4rem; inset-inline-start: .4rem; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--hm-orange-ink); color: #fff; font-size: .9rem; font-weight: 800; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.hm-step-body p { margin: 0; color: var(--hm-muted); font-size: .9rem !important; line-height: 1.5; }
@media (min-width: 768px) {
    .hm-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
    .hm-step { grid-template-columns: 1fr; align-items: start; padding: 0; overflow: hidden; }
    .hm-step-img { aspect-ratio: 3 / 2; border-radius: 0; }
    .hm-step-body { padding: .9rem 1rem 1.1rem; }
}
@media (min-width: 1024px) {
    .hm-steps-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .hm-steps-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* --------------------------------------------------------------------------
   Vendre ou livrer
   -------------------------------------------------------------------------- */
.hm-aud { display: grid; gap: 1rem; }
.hm-aud-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid #ece8df; border-radius: var(--hm-radius); background: #fff; }
.hm-aud-img { position: relative; aspect-ratio: 3 / 2; overflow: visible; background: #e4efe7; border-radius: var(--hm-radius) var(--hm-radius) 0 0; }
.hm-aud-img img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--hm-radius) var(--hm-radius) 0 0; }
.hm-aud-badge { position: absolute; inset-block-end: -20px; inset-inline-start: 1rem; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 3px solid #fff; border-radius: 50%; background: var(--hm-green-dark); color: #fff; font-size: 1.15rem; }
.hm-aud-body { display: flex; flex: 1; flex-direction: column; padding: 1.6rem 1.1rem 1.1rem; }
.hm-aud-body > p { margin: 0 0 .75rem; color: var(--hm-muted); font-size: .92rem !important; line-height: 1.55; }
.hm-facts { display: grid; gap: .35rem; margin: 0 0 1rem; padding: 0; list-style: none; font-size: .88rem; font-weight: 600; color: var(--hm-ink); }
.hm-facts i { color: var(--hm-green); margin-inline-end: .3rem; }
.hm-aud-body .hm-link-btn { margin-top: auto; }
@media (min-width: 900px) { .hm-aud { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; } }

/* --------------------------------------------------------------------------
   Anti-gaspi (image + texte)
   -------------------------------------------------------------------------- */
.hm-split { display: grid; gap: 1.25rem; align-items: center; }
.hm-split-img { overflow: hidden; border-radius: var(--hm-radius); aspect-ratio: 3 / 2; background: #e4efe7; }
.hm-split-img img { width: 100%; height: 100%; object-fit: cover; }
.hm-split-body > p { margin: 0; color: var(--hm-muted); font-size: 1rem !important; line-height: 1.65; }
@media (min-width: 900px) { .hm-split { grid-template-columns: 1fr 1fr; gap: 2.5rem; } }

/* --------------------------------------------------------------------------
   Villes
   -------------------------------------------------------------------------- */
.hm-cities {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 230px;
    gap: .8rem;
    margin: 0;
    padding: 0 0 .6rem;
    list-style: none;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
}
.hm-cities > li { scroll-snap-align: start; }
.hm-city { position: relative; display: block !important; min-height: 0 !important; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 14px; background: #2b3a2e; color: #fff; text-decoration: none; }
.hm-city img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.hm-city:hover img { transform: scale(1.05); }
.hm-city::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 0, 0, .7) 0%, rgba(0, 0, 0, 0) 55%); }
.hm-city-name { position: absolute; z-index: 1; inset-inline: .8rem; inset-block-end: .65rem; color: #fff; font-size: 1.05rem; font-weight: 800; text-shadow: 0 1px 6px rgba(0, 0, 0, .4); }
.hm-city-chips { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin: 1rem 0 0; }
.hm-city-chips-label { color: var(--hm-muted); font-size: .88rem; font-weight: 600; margin-inline-end: .2rem; }
.hm-chip { display: inline-flex !important; align-items: center; min-height: 36px !important; min-width: 0 !important; padding: .3rem .85rem; border: 1px solid #d9e6dc; border-radius: 999px; background: #f4faf6; color: var(--hm-green-dark); font-size: .85rem; font-weight: 600; text-decoration: none; }
.hm-chip:hover { border-color: var(--hm-green); background: #e6f6ec; }
@media (min-width: 900px) {
    .hm-cities { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-columns: auto; gap: 1rem; overflow: visible; padding: 0; }
}

/* --------------------------------------------------------------------------
   Application
   -------------------------------------------------------------------------- */
.hm-app { background: linear-gradient(135deg, #007a29 0%, #00561d 100%); color: #fff; padding-block: 2.25rem !important; }
.hm-app-inner { display: grid; gap: 1.25rem; align-items: center; }
.hm-app .hm-h2 { color: #fff; }
.hm-app-body > p { margin: 0; color: rgba(255, 255, 255, .92); font-size: 1rem !important; line-height: 1.6; }
.hm-app .hm-app-note { margin-top: .9rem; font-size: .85rem !important; color: rgba(255, 255, 255, .85); }
.hm-app-img { overflow: hidden; border-radius: var(--hm-radius); aspect-ratio: 3 / 2; background: rgba(255, 255, 255, .1); }
.hm-app-img img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) { .hm-app-inner { grid-template-columns: 1.1fr .9fr; gap: 2.5rem; } }

/* --------------------------------------------------------------------------
   Appel final
   -------------------------------------------------------------------------- */
.hm-cta { background: #fff; padding-block: 2.5rem !important; text-align: center; border-top: 1px solid #ece8df; }
.lbc-home .hm-cta p { margin: 0 auto; max-width: 52ch; color: var(--hm-muted); }

/* --------------------------------------------------------------------------
   Accessibilité : pas d'animation si l'utilisateur le demande
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .hs-slide, .hs-img, .hm-cat-img img, .hm-city img { transition: none !important; }
    .hs-img, .hs-slide.is-active .hs-img { transform: none !important; }
}
