/* ============================================================
   LA FONDA — PAGE PANIER
   ------------------------------------------------------------
   Feuille PROPRE a /checkout/cart. Elle est chargee par un
   <link> pose dans la page elle-meme (@push('styles')), et non
   par App\Support\CssBundle : le groupe CSS est servi sur toutes
   les pages du site, aucune autre page ne recoit donc un octet
   de plus.

   Tout est porte par la racine « .lf-cart ». Aucune regle ne
   sort de cette racine — le mini-panier de l'en-tete, qui
   partage le composant de quantite avec cette page, n'est pas
   atteint.

   POURQUOI DU CSS STATIQUE ET DES CLASSES « lf- »
   ------------------------------------------------------------
   Le compilateur Tailwind a ete retire du projet : une classe
   utilitaire inedite n'existe pas dans la feuille compilee et
   reste sans effet. Et « tailwind-compiled.css » est charge par
   une balise a lui, APRES la pile des styles pousses — a
   specificite egale, il l'emporte. Le balisage de cette page a
   donc ete debarrasse de ses classes utilitaires : tout ce que
   l'on voit ici vient de cette feuille, et rien ne se dispute la
   priorite. Les rares « !important » visent le composant de
   quantite, dont le gabarit est partage et garde les siennes.
   ============================================================ */

.lf-cart {
    /* Charte La Fonda. Les valeurs sont posees ici plutot que
       reprises de home-v2.css : les deux pages ne partagent pas de
       feuille, et une couleur qui change d'un cote ne doit pas
       bouger de l'autre sans qu'on le decide. */
    --navy: #06113f;
    --navy-2: #101b4d;
    --gold: #c99a55;
    --gold-light: #d8b678;
    --cream: #faf8f4;
    --ink: #182033;
    --muted: #667085;
    --line: #e7e7e7;
    --ok: #15803d;
    --danger: #b42318;

    background: #fff;
    color: var(--ink);
}

/* « !important » n'est pas un exces : style.css impose Acumin a TOUS les
   elements par une regle « * { font-family: ... !important } ». Sans lui, la
   page restait en Acumin — releve a l'ecran sur le titre et le resume. Meme
   facon de faire que la deuxieme version de l'accueil. */
.lf-cart,
.lf-cart * {
    font-family: "Poppins", "Inter", Arial, sans-serif !important;
    font-stretch: normal !important;
    box-sizing: border-box;
}

.lf-cart__shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 24px 72px;
}

/* ── Fil d'Ariane ──────────────────────────────────────────── */

.lf-cart__crumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 26px;
    font-size: 13.5px;
}

.lf-cart__crumbs a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.lf-cart__crumbs a:hover { color: var(--navy); }
.lf-cart__crumbs span[aria-hidden] { color: var(--gold); }
.lf-cart__crumbs strong { color: var(--gold); font-weight: 500; }

/* ── Deux colonnes ─────────────────────────────────────────── */

.lf-cart__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 372px;
    gap: 32px;
    align-items: start;
}

.lf-cart__title {
    margin: 0;
    font-size: 42px;
    font-weight: 600;
    line-height: 1.15;
    color: var(--navy);
    letter-spacing: -0.01em;
}

.lf-cart__count {
    margin: 8px 0 30px;
    font-size: 15px;
    font-weight: 400;
    color: var(--muted);
}

/* ── Carte article ─────────────────────────────────────────── */

.lf-cart-item {
    display: grid;
    grid-template-columns: 130px minmax(180px, 1fr) auto auto 48px;
    align-items: center;
    gap: 22px;
    padding: 18px;
    margin-bottom: 15px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lf-cart-item:hover {
    border-color: #dcd6cc;
    box-shadow: 0 4px 18px rgba(6, 17, 63, 0.06);
}

.lf-cart-item__media {
    display: block;
    width: 124px;
    height: 124px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--cream);
}

.lf-cart-item__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.lf-cart-item__body { min-width: 0; }

.lf-cart-item__badge {
    display: inline-block;
    padding: 6px 12px;
    margin-bottom: 10px;
    background: var(--cream);
    border-radius: 16px;
    color: #a97f3d;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1;
}

.lf-cart-item__name {
    display: block;
    margin: 0;
    color: var(--navy);
    font-size: 21px;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    /* Deux lignes au plus : au-dela, les cartes d'une meme liste
       n'auraient plus la meme hauteur. */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.lf-cart-item__name:hover { color: var(--navy-2); }

/* Format, poids, preparation : uniquement ce que l'article porte
   vraiment. Le balisage n'affiche cette ligne que si l'option
   existe. */
.lf-cart-item__meta {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.5;
}

.lf-cart-item__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    color: var(--gold);
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.lf-cart-item__link:hover { border-bottom-color: var(--gold); }
.lf-cart-item__link svg { flex: 0 0 auto; }

.lf-cart-item__price {
    color: var(--navy);
    font-size: 21px;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    text-align: right;
}

.lf-cart-item__price small {
    display: block;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 400;
}

/* ── Selecteur de quantite ─────────────────────────────────────
   Le composant « v-quantity-changer-new » est partage avec le
   mini-panier de l'en-tete : son gabarit n'est pas touche, et ses
   classes utilitaires sont matees ICI, sous la racine de la page.
   Le mini-panier garde donc exactement son allure. */

.lf-cart-item__qty { display: flex; align-items: center; gap: 10px; }

.lf-cart-item__qty > div:first-child {
    width: 150px !important;
    max-width: none !important;
    height: 48px !important;
    max-height: none !important;
    padding: 0 6px !important;
    gap: 0 !important;
    justify-content: space-between !important;
    border: 1px solid #9aa4b2 !important;
    border-radius: 25px !important;
    background: #fff;
}

.lf-cart-item__qty > div:first-child > span {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: var(--navy);
    font-size: 20px !important;
    line-height: 1;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.lf-cart-item__qty > div:first-child > span:hover { background: var(--cream); }

.lf-cart-item__qty > div:first-child > p {
    width: auto !important;
    min-width: 26px;
    color: var(--navy);
    font-size: 16px;
    font-weight: 600;
}

/* ── Suppression ───────────────────────────────────────────── */

.lf-cart-item__remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f8f9fa;
    color: var(--navy);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.lf-cart-item__remove:hover {
    background: #fdeceb;
    color: var(--danger);
}

.lf-cart-item__remove:focus-visible {
    outline: 2px solid var(--navy);
    outline-offset: 2px;
}

/* ── Actions sous la liste ─────────────────────────────────── */

.lf-cart__actions { margin-top: 26px; }

.lf-cart__back {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 50px;
    padding: 0 22px;
    border: 1px solid var(--navy);
    border-radius: 10px;
    color: var(--navy);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    background: #fff;
    transition: background 0.2s ease, color 0.2s ease;
}

.lf-cart__back:hover { background: var(--navy); color: #fff; }

/* ── Resume de la commande ─────────────────────────────────── */

.lf-cart-summary {
    position: sticky;
    /* L'en-tete du site est fixe et mesure --lf-header-h, publiee
       et tenue a jour par public/js/lafonda-hero.js. On s'y cale
       plutot que sur un nombre en dur : la barre change de hauteur
       selon la largeur d'ecran et le bandeau defilant. */
    top: calc(var(--lf-header-h, 147px) + 20px);
    padding: 28px;
    background: #fffefc;
    border: 1px solid #e7e0d7;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(6, 17, 63, 0.04);
}

.lf-cart-summary__title {
    margin: 0 0 22px;
    color: var(--navy);
    font-size: 27px;
    font-weight: 600;
    line-height: 1.2;
}

.lf-cart-summary__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-top: 1px solid #efe9e1;
    font-size: 15px;
}

.lf-cart-summary__row:first-of-type { border-top: 0; }
.lf-cart-summary__row dt { color: var(--muted); margin: 0; }
.lf-cart-summary__row dd { color: var(--ink); font-weight: 500; margin: 0; text-align: right; }
.lf-cart-summary__row--soft dd { color: var(--muted); font-weight: 400; }

.lf-cart-summary__total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
    padding: 20px;
    background: var(--cream);
    border-radius: 14px;
}

.lf-cart-summary__total dt {
    margin: 0;
    color: var(--navy);
    font-size: 20px;
    font-weight: 700;
}

.lf-cart-summary__total dd { margin: 0; text-align: right; }

.lf-cart-summary__amount {
    display: block;
    color: #b8862f;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

.lf-cart-summary__amount + span {
    display: block;
    color: var(--muted);
    font-size: 12.5px;
}

.lf-cart-summary__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 56px;
    margin-top: 18px;
    background: var(--navy);
    border-radius: 28px;
    color: #fff;
    font-size: 15.5px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.22s ease, transform 0.22s ease;
}

.lf-cart-summary__cta:hover {
    background: var(--navy-2);
    transform: translateY(-1px);
    color: #fff;
}

.lf-cart-summary__cta:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

.lf-cart-summary__secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 13.5px;
}

.lf-cart-summary__pay {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #efe9e1;
    text-align: center;
}

.lf-cart-summary__pay p {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 12.5px;
}

.lf-cart-summary__pay ul {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.lf-cart-summary__pay li {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 34px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.lf-cart-summary__pay img { max-width: 40px; max-height: 20px; }

/* ── Bandeau de reassurance ────────────────────────────────── */

.lf-cart-trust {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: var(--cream);
    border-top: 1px solid var(--line);
}

.lf-cart-trust__item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 26px 24px;
    border-left: 1px solid #ece5da;
}

.lf-cart-trust__item:first-child { border-left: 0; }
.lf-cart-trust__item svg { flex: 0 0 auto; color: var(--navy); }
.lf-cart-trust__item strong { display: block; color: var(--navy); font-size: 15px; font-weight: 600; }
.lf-cart-trust__item span { display: block; color: var(--muted); font-size: 13px; }

/* ── Panier vide ───────────────────────────────────────────── */

.lf-cart-empty {
    display: grid;
    justify-items: center;
    text-align: center;
    padding: 80px 24px 96px;
}

.lf-cart-empty svg { color: var(--gold); margin-bottom: 22px; }

.lf-cart-empty h1 {
    margin: 0;
    color: var(--navy);
    font-size: 30px;
    font-weight: 600;
}

.lf-cart-empty p {
    margin: 10px 0 26px;
    color: var(--muted);
    font-size: 15px;
}

.lf-cart-empty a {
    display: inline-flex;
    align-items: center;
    height: 54px;
    padding: 0 30px;
    background: var(--navy);
    border-radius: 27px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease;
}

.lf-cart-empty a:hover { background: var(--navy-2); color: #fff; }

/* ── Tablette ──────────────────────────────────────────────── */

@media (max-width: 1024px) {
    .lf-cart__layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 26px;
    }

    /* Le resume passe sous les articles : le coller n'aurait plus
       de sens, il n'a plus rien a suivre. */
    .lf-cart-summary { position: static; }

    .lf-cart__title { font-size: 36px; }

    .lf-cart-item {
        grid-template-columns: 108px minmax(150px, 1fr) auto auto 46px;
        gap: 16px;
    }

    .lf-cart-item__media { width: 104px; height: 104px; }
    .lf-cart-item__name { font-size: 19px; }

    /* Deux colonnes des la tablette : a quatre, « Chaine du froid respectee »
       passait sur deux lignes dans une colonne de 240 px. */
    .lf-cart-trust { grid-template-columns: repeat(2, 1fr); }

    .lf-cart-trust__item:nth-child(odd) { border-left: 0; }
    .lf-cart-trust__item:nth-child(n + 3) { border-top: 1px solid #ece5da; }
}

/* ── Telephone ─────────────────────────────────────────────── */

@media (max-width: 767px) {
    .lf-cart__shell { padding: 18px 16px 56px; }

    .lf-cart__title { font-size: 31px; }
    .lf-cart__count { margin-bottom: 22px; }

    /* Image et texte cote a cote, puis prix, puis quantite et
       suppression sur leur propre ligne : sur 358 px utiles, cinq
       colonnes ne tiennent pas sans rogner le nom du produit. */
    .lf-cart-item {
        grid-template-columns: 96px minmax(0, 1fr);
        gap: 14px;
        padding: 14px;
    }

    .lf-cart-item__media { width: 94px; height: 94px; }
    .lf-cart-item__name { font-size: 17px; }
    .lf-cart-item__badge { font-size: 12px; padding: 5px 10px; }

    .lf-cart-item__price {
        grid-column: 1 / -1;
        text-align: left;
        font-size: 19px;
    }

    /* Quantite et suppression partagent la MEME ligne, aux deux bouts :
       toutes deux placees en rangee 4 sur toute la largeur, l'une calee a
       gauche, l'autre a droite. Sans le placement explicite, la corbeille
       tombait a la ligne suivante — le selecteur occupant deja les deux
       colonnes. */
    .lf-cart-item__qty {
        grid-column: 1 / -1;
        grid-row: 4;
        justify-content: flex-start;
    }

    .lf-cart-item__remove {
        grid-column: 1 / -1;
        grid-row: 4;
        justify-self: end;
        align-self: center;
    }

    /* La zone tactile reste au-dessus des 44 px recommandes. */
    .lf-cart-item__qty > div:first-child { width: 100% !important; max-width: 190px !important; }

    .lf-cart-summary { padding: 22px; }
    .lf-cart-summary__title { font-size: 25px; }
    .lf-cart-summary__amount { font-size: 22px; }

    .lf-cart__back { width: 100%; justify-content: center; }

    .lf-cart-trust { grid-template-columns: repeat(2, 1fr); }

    .lf-cart-trust__item {
        padding: 20px 16px;
        border-left: 0;
        border-top: 1px solid #ece5da;
    }

    .lf-cart-trust__item:nth-child(-n + 2) { border-top: 0; }
    .lf-cart-trust__item:nth-child(even) { border-left: 1px solid #ece5da; }
}

@media (max-width: 389px) {
    .lf-cart__shell { padding: 16px 12px 48px; }
    .lf-cart-item { grid-template-columns: 84px minmax(0, 1fr); padding: 12px; }
    .lf-cart-item__media { width: 82px; height: 82px; }
    .lf-cart-item__name { font-size: 16px; }
    .lf-cart__title { font-size: 27px; }

    /* Sous 390 px, le selecteur cede la place a la corbeille plutot que de
       filer sous elle : 60 px lui sont reserves au bout de la ligne. */
    .lf-cart-item__qty > div:first-child { max-width: 170px !important; }
}

@media (prefers-reduced-motion: reduce) {
    .lf-cart *,
    .lf-cart *::before,
    .lf-cart *::after {
        transition: none !important;
    }
}
