/* Rhizome Food — page de commande. Mobile d'abord, charte vert/crème, cartes blanches contrastées. */
@font-face {
  font-family: 'Protest Strike';
  src: url('/wp-content/uploads/rhizome/proteststrike-latin.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Albert Sans';
  src: url('/wp-content/uploads/rhizome/albertsans-var-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --vert: #405636;
  --vert-fonce: #2e3f26;
  --vert-vif: #495f20;
  --creme: #f1ead9;        /* fond de page, assez profond pour détacher les cartes */
  --carte: #ffffff;
  --bord: #d9cfb4;
  --ocre: #b4762d;
  --ocre-fonce: #8a5a23;
  --rouge: #9c3d2e;
  --encre: #26301f;
}

html { scroll-behavior: smooth; }
/* l'attribut hidden doit gagner même sur un élément en display flex */
.rf-commande [hidden] { display: none !important; }

body.rf-commande {
  margin: 0;
  background: var(--creme);
  color: var(--encre);
  font-family: 'Albert Sans', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  padding-bottom: 92px; /* place pour la barre collante */
}
.rf-commande h1, .rf-commande h2, .rf-commande h3 {
  font-family: 'Protest Strike', 'Albert Sans', sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--vert);
}

/* entête : gros logo, titre discret, accroche forte, badges, bouton vers les menus */
.rf-entete { text-align: center; padding: 26px 16px 8px; }
.rf-logo { width: 170px; height: auto; }
.rf-entete h1 {
  font-family: 'Albert Sans', sans-serif; font-weight: 700; font-size: 0.95rem;
  letter-spacing: 0.14em; color: var(--ocre-fonce); margin: 10px 0 6px;
}
.rf-accroche {
  font-family: 'Protest Strike', 'Albert Sans', sans-serif; text-transform: uppercase;
  font-size: 1.7rem; line-height: 1.15; color: var(--vert);
  margin: 0 auto 16px; max-width: 640px;
}
.rf-badges { list-style: none; margin: 0 auto; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 700px; }
.rf-badges li {
  background: var(--carte); border: 1.5px solid var(--vert); border-radius: 999px;
  padding: 8px 14px; font-size: 0.88rem; font-weight: 600; color: var(--vert-fonce);
}
/* bouton plein : texte et icône blancs, jamais d'emoji sur fond coloré */
.rf-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 26px; box-sizing: border-box; border-radius: 999px;
  background: var(--vert); color: #fff !important; font-weight: 700; font-size: 1rem;
  text-decoration: none;
}
.rf-btn:hover { background: var(--vert-fonce); }
.rf-btn-menus { margin-top: 18px; }

/* introduction : le texte de Johanna, puis trois repères pratiques */
.rf-intro { text-align: center; margin-top: 22px; }
.rf-intro > p { margin: 0 auto 10px; max-width: 720px; }
.rf-infos { display: grid; gap: 12px; margin: 20px 0 16px; text-align: left; }
.rf-info {
  background: var(--carte); border: 1px solid var(--bord); border-radius: 14px;
  padding: 14px 16px; box-shadow: 0 3px 12px rgb(38 48 31 / 0.10);
}
.rf-commande .rf-info h3 {
  font-family: 'Albert Sans', sans-serif; font-weight: 700; text-transform: none;
  letter-spacing: 0; font-size: 1rem; margin: 0 0 6px; color: var(--vert);
}
.rf-info p { margin: 0; font-size: 0.93rem; }
.rf-intro .rf-intro-fin { font-weight: 700; color: var(--vert-fonce); margin-top: 6px; }

.rf-cadre { max-width: 960px; margin: 0 auto; padding: 0 14px; }

/* bloc Noël : le flyer en grand (il porte le menu), tout le texte à côté */
.rf-noel {
  background: var(--carte); border: 2px solid var(--ocre); border-radius: 18px;
  padding: 18px 16px; margin: 26px 0 6px;
  box-shadow: 0 3px 12px rgb(38 48 31 / 0.10);
}
.rf-commande .rf-noel h2 { text-align: center; font-size: 1.3rem; color: var(--ocre-fonce); margin: 0 0 14px; }
.rf-noel-grille { display: grid; gap: 18px; }
.rf-noel-flyer { display: block; text-align: center; }
.rf-noel-flyer img { width: 100%; height: auto; display: block; border-radius: 12px; border: 1px solid var(--bord); }
.rf-noel-flyer span { display: inline-block; margin-top: 8px; font-size: 0.88rem; font-weight: 600; }
.rf-noel-texte p { margin: 0 0 10px; }
.rf-noel-faits { list-style: none; padding: 0; margin: 4px 0 16px; }
.rf-noel-faits li { padding: 9px 0; border-top: 1px solid #efe9d8; font-weight: 600; }
.rf-noel-faits li:last-child { border-bottom: 1px solid #efe9d8; }
.rf-btn-tel { width: 100%; }
.rf-noel-texte .rf-noel-signature { margin: 14px 0 0; font-style: italic; color: var(--ocre-fonce); text-align: center; }

/* étapes */
.rf-etape { margin-top: 34px; }
.rf-etape h2 { font-size: 1.4rem; display: flex; align-items: center; gap: 10px; }
.rf-num {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: var(--vert); color: #fff; font-family: 'Albert Sans', sans-serif;
  font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
}

/* bande de jour : chaque menu a sa couleur */
.rf-jour-bande {
  border-radius: 14px; padding: 12px 16px; margin: 20px 0 12px;
  color: #fff;
}
.rf-bande-mardi { background: var(--vert); }
.rf-bande-vendredi { background: var(--ocre-fonce); }
.rf-jour-bande .rf-jour-titre { margin: 0; font-size: 1.15rem; color: #fff; }
.rf-jour-bande p { margin: 4px 0 0; font-size: 0.9rem; color: rgb(255 255 255 / 0.92); }
.rf-jour-clos .rf-plat { opacity: 0.45; }

/* bandeaux d'état */
.rf-bandeau {
  background: #fff6e8; border: 1px solid var(--ocre); border-radius: 12px;
  padding: 12px 14px; margin: 10px 0; font-size: 0.95rem;
}
.rf-bandeau p { margin: 0; }
.rf-bandeau-ferme { background: #fdeeea; border-color: var(--rouge); }

/* grille de plats : 1 colonne mobile, 2 colonnes dès 860 px */
.rf-plats-grille { display: grid; gap: 12px; grid-template-columns: 1fr; }

/* cartes plat : blanches sur crème, nettement détachées */
.rf-plat {
  position: relative;
  background: var(--carte); border: 1px solid var(--bord); border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 3px 12px rgb(38 48 31 / 0.10);
}
.rf-plat-photo { width: 100%; height: 170px; object-fit: cover; display: block; }
.rf-tampon {
  position: absolute; right: 10px; top: 10px; width: 46px; height: 46px;
  color: var(--vert); opacity: 0.16; transform: rotate(12deg); pointer-events: none;
}
.rf-plat-corps { padding: 14px; }
.rf-plat-haut { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; padding-right: 40px; }
.rf-plat-haut h4 { margin: 0; font-size: 1.05rem; line-height: 1.3; }
.rf-prix { font-weight: 700; color: var(--vert-vif); white-space: nowrap; }
.rf-plat-desc { margin: 6px 0 4px; font-size: 0.92rem; color: #4a523f; }
.rf-allergenes { margin: 0 0 8px; font-size: 0.8rem; color: #77704f; }
.rf-badge-epuise { margin: 6px 0 0; font-weight: 600; color: var(--rouge); font-size: 0.9rem; }
.rf-stock-bas { margin: 6px 0 0; font-size: 0.85rem; color: var(--ocre); font-weight: 600; }

/* stepper tactile */
.rf-stepper { display: inline-flex; align-items: center; gap: 2px; border: 2px solid var(--vert); border-radius: 999px; background: var(--carte); }
.rf-stepper button {
  width: 48px; height: 44px; border: 0; background: none; color: var(--vert);
  font-size: 1.5rem; cursor: pointer; line-height: 1;
}
.rf-stepper button:active { background: var(--creme); }
.rf-qte { min-width: 28px; text-align: center; font-weight: 700; font-size: 1.1rem; }

/* créneaux : toujours visibles, grisés tant qu'aucun plat du jour ; le titre est DANS la carte */
.rf-creneaux-grille { display: grid; gap: 12px; }
.rf-creneau-jour {
  border: 1px solid var(--bord); border-radius: 14px; background: var(--carte);
  padding: 14px; box-shadow: 0 3px 12px rgb(38 48 31 / 0.10);
}
.rf-commande .rf-creneau-jour h3 {
  font-family: 'Albert Sans', sans-serif; font-weight: 700; text-transform: none; letter-spacing: 0;
  font-size: 1.05rem; margin: 0 0 10px; padding: 9px 12px; border-radius: 10px; color: #fff;
}
.rf-creneau-mardi h3 { background: var(--vert); }
.rf-creneau-vendredi h3 { background: var(--ocre-fonce); }
.rf-creneau-jour.rf-inactif .rf-creneau { opacity: 0.6; }
.rf-creneau-aide { margin: 0 0 8px; font-size: 0.9rem; color: #5d5740; }
.rf-creneau { display: block; margin: 8px 0 0; position: relative; }
.rf-creneau input { position: absolute; opacity: 0; }
.rf-creneau span {
  display: block; padding: 13px 16px; border: 2px solid var(--bord); border-radius: 12px;
  background: #fbf8f0; font-size: 1rem; cursor: pointer; min-height: 48px; box-sizing: border-box;
}
.rf-creneau input:checked + span { border-color: var(--vert); background: #e9efe2; font-weight: 700; }
.rf-creneau input:focus-visible + span { outline: 3px solid var(--ocre); }
.rf-inactif .rf-creneau span { cursor: default; }

/* formulaire WooCommerce remis à la charte */
#rf-checkout { max-width: 680px; }
#rf-checkout .woocommerce-billing-fields h3,
#rf-checkout .woocommerce-additional-fields h3,
#rf-checkout #order_review_heading { display: none; }
#rf-checkout .form-row { margin: 0 0 12px; padding: 0; width: 100%; float: none; }
#rf-checkout label { display: block; font-weight: 600; margin-bottom: 4px; font-size: 0.95rem; }
#rf-checkout input.input-text, #rf-checkout textarea {
  width: 100%; box-sizing: border-box; min-height: 48px; padding: 12px 14px;
  border: 2px solid var(--bord); border-radius: 12px; background: var(--carte);
  font: inherit; color: var(--encre);
}
#rf-checkout input.input-text:focus, #rf-checkout textarea:focus {
  outline: none; border-color: var(--vert);
}
#rf-checkout .woocommerce-input-wrapper { display: block; }
#rf-checkout .required { color: var(--rouge); text-decoration: none; }

/* récap de commande */
#rf-checkout .woocommerce-checkout-review-order-table {
  width: 100%; border-collapse: collapse; background: var(--carte);
  border: 1px solid var(--bord); border-radius: 14px; overflow: hidden;
}
#rf-checkout .woocommerce-checkout-review-order-table th,
#rf-checkout .woocommerce-checkout-review-order-table td {
  text-align: left; padding: 10px 12px; border-bottom: 1px solid #efe9d8; font-size: 0.95rem;
}
#rf-checkout .woocommerce-checkout-review-order-table .order-total td,
#rf-checkout .woocommerce-checkout-review-order-table .order-total th {
  font-size: 1.1rem; color: var(--vert); border-bottom: 0;
}

/* le sous-total double le total, et la ligne d'expédition WooCommerce est remplacée par « Livraison : Gratuite » */
#rf-checkout tr.cart-subtotal, #rf-checkout tr.woocommerce-shipping-totals { display: none; }
#rf-checkout .rf-ligne-livraison td { color: var(--vert-vif); font-weight: 700; }
#rf-checkout .woocommerce-checkout-review-order-table .product-name { width: 64%; }
#rf-checkout .woocommerce-privacy-policy-text { font-size: 0.85rem; color: #5d5740; }

/* paiement */
#rf-checkout #payment { background: none; }
#rf-checkout .wc_payment_methods { list-style: none; margin: 14px 0; padding: 0; }
#rf-checkout .wc_payment_method label { font-weight: 700; display: inline; }
#rf-checkout .payment_box { font-size: 0.9rem; color: #4a523f; }
#rf-checkout #place_order {
  display: block; width: 100%; min-height: 54px; margin-top: 10px;
  background: var(--vert); color: #fff; border: 0; border-radius: 14px;
  font-family: 'Protest Strike', sans-serif; font-size: 1.15rem; text-transform: uppercase;
  letter-spacing: 0.03em; cursor: pointer;
}
#rf-checkout #place_order:hover { background: var(--vert-fonce); }
.rf-securise { text-align: center; font-size: 0.85rem; color: #77704f; margin-top: 10px; }

/* messages WooCommerce */
.woocommerce-NoticeGroup, .woocommerce-error, .woocommerce-message, .woocommerce-info {
  list-style: none; margin: 12px 0; padding: 12px 14px; border-radius: 12px; font-size: 0.95rem;
}
.woocommerce-error { background: #fdeeea; border: 1px solid var(--rouge); color: var(--rouge); }
.woocommerce-error li { margin: 4px 0; }
.woocommerce-message, .woocommerce-info { background: #e9efe2; border: 1px solid var(--vert); color: var(--vert-fonce); }

/* barre collante */
.rf-barre {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--vert-fonce); color: #fff; padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}
.rf-barre-total { font-size: 1rem; }
#rf-barre-total .woocommerce-Price-amount { font-weight: 700; }
.rf-barre-btn {
  min-height: 46px; padding: 0 22px; border: 0; border-radius: 999px;
  background: var(--ocre); color: #fff; font-family: 'Protest Strike', sans-serif;
  font-size: 1rem; text-transform: uppercase; cursor: pointer;
}

.rf-paiement-visible .rf-barre { display: none; }
#rf-checkout .col2-set .col-1, #rf-checkout .col2-set .col-2 { float: none; width: 100%; max-width: none; flex: none; padding: 0; }
#rf-checkout .col2-set { display: block; width: 100%; float: none; }

/* page de merci : en-tête réduit, merci, livraison, puis le détail */
.rf-entete-compacte { padding-bottom: 0; }
.rf-entete-compacte .rf-logo { width: 110px; }
.rf-merci { text-align: center; padding-top: 6px; max-width: 680px; }
.rf-merci-titre {
  font-family: 'Protest Strike', sans-serif; font-size: 2rem; line-height: 1.1;
  color: var(--vert); text-transform: uppercase; margin: 14px 0 6px;
}
.rf-merci-texte { font-size: 1.1rem; margin: 0 0 18px; }
.rf-merci-livraison {
  background: var(--carte); border: 2px solid var(--vert); border-radius: 14px;
  padding: 16px; margin: 0 0 22px; text-align: center;
  box-shadow: 0 3px 12px rgb(38 48 31 / 0.10);
}
.rf-commande .rf-merci-livraison h2 { font-size: 1.2rem; margin: 0 0 8px; }
.rf-merci-livraison p { margin: 8px 0 0; }
.rf-commande .rf-merci .woocommerce-order-details__title { font-size: 1.15rem; text-align: left; margin: 0 0 10px; }
.rf-merci table.shop_table {
  width: 100%; border-collapse: collapse; background: var(--carte);
  border: 1px solid var(--bord); border-radius: 14px; overflow: hidden;
}
.rf-merci table.shop_table th, .rf-merci table.shop_table td { padding: 10px 12px; border-bottom: 1px solid #efe9d8; text-align: left; font-size: 0.95rem; }
.rf-merci table.shop_table .wc-item-meta { list-style: none; margin: 4px 0 0; padding: 0; font-size: 0.85rem; color: #5d5740; }
.rf-merci table.shop_table .wc-item-meta p { display: inline; margin: 0; }
.rf-merci .woocommerce-customer-details { display: none; }

/* pied */
.rf-pied { text-align: center; padding: 30px 16px 40px; color: var(--vert-fonce); font-size: 0.9rem; }
.rf-pied p { margin: 4px 0; max-width: 640px; margin-inline: auto; }
.rf-pied a { color: var(--vert); font-weight: 600; }

/* message volant (erreurs AJAX) */
#rf-message {
  position: fixed; left: 14px; right: 14px; bottom: 84px; z-index: 60;
  background: var(--rouge); color: #fff; padding: 12px 16px; border-radius: 12px;
  font-size: 0.95rem; box-shadow: 0 4px 14px rgb(0 0 0 / 0.25);
}

/* liens */
.rf-commande a { color: var(--vert); }
/* un numéro de téléphone ne se coupe jamais en deux lignes */
.rf-commande a[href^="tel:"], .rf-commande a[href^="sms:"] { white-space: nowrap; }

/* écran large */
@media (min-width: 860px) {
  .rf-logo { width: 190px; }
  .rf-accroche { font-size: 2.3rem; }
  .rf-infos { grid-template-columns: repeat(3, 1fr); }
  .rf-plats-grille { grid-template-columns: 1fr 1fr; }
  .rf-creneaux-grille { grid-template-columns: 1fr 1fr; }
  .rf-noel { padding: 28px; margin-top: 30px; }
  .rf-commande .rf-noel h2 { font-size: 1.6rem; margin-bottom: 20px; }
  .rf-noel-grille { grid-template-columns: minmax(0, 470px) minmax(0, 1fr); gap: 34px; align-items: center; }
  .rf-btn-tel { width: auto; }
  /* paiement en deux colonnes : coordonnées à gauche, récapitulatif et bouton à droite */
  #rf-checkout { max-width: none; }
  #rf-checkout form.checkout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 0 36px; align-items: start; }
  #rf-checkout form.checkout > .woocommerce-NoticeGroup { grid-column: 1 / -1; }
  #rf-checkout #customer_details { grid-column: 1; }
  #rf-checkout #order_review { grid-column: 2; position: sticky; top: 20px; float: none; width: auto; }
  .rf-securise { text-align: right; max-width: none; }
  .rf-barre { left: 50%; right: auto; transform: translateX(-50%); width: 720px; bottom: 14px; border-radius: 16px; }
}

/* Page de merci : la colonne du plat prend la place, le prix se cale à droite */
.rf-merci table.shop_table { table-layout: fixed; width: 100%; }
.rf-merci table.shop_table th, .rf-merci table.shop_table td { box-sizing: border-box; }
.rf-merci table.shop_table th:first-child, .rf-merci table.shop_table td:first-child { width: 67%; }
.rf-merci table.shop_table th:last-child, .rf-merci table.shop_table td:last-child { text-align: right; overflow-wrap: anywhere; padding-left: 0; }
.rf-merci table.shop_table tbody td:last-child { white-space: nowrap; }
.rideau{display:none!important}


/* créneau collé à l'adresse, dans le formulaire */
#rf-checkout .rf-creneaux { margin: 18px 0 6px; }
#rf-checkout .woocommerce-billing-fields .rf-creneaux h3 { display: block; font-size: 1.05rem; margin: 0 0 10px; }
.rf-commande .rf-creneau-jour h4 {
  font-family: 'Albert Sans', sans-serif; font-weight: 700; text-transform: none; letter-spacing: 0;
  font-size: 1.05rem; margin: 0 0 4px; padding: 9px 12px; border-radius: 10px; color: #fff;
}
.rf-creneau-mardi h4 { background: var(--vert); }
.rf-creneau-vendredi h4 { background: var(--ocre-fonce); }
.rf-creneau-jour[hidden] { display: none !important; }
.rf-obligatoire { font-size: 0.9rem; margin: 0 0 10px; color: #5d5740; }
.rf-obligatoire .required { color: var(--rouge); text-decoration: none; }

.rf-alerte-creneau { background: #c62828; color: #fff; font-weight: 700; font-size: 1.1rem; line-height: 1.35; padding: 14px 16px; border-radius: 10px; margin: 6px 0 16px; }
.rf-alerte-creneau[hidden] { display: none !important; }
