:root{
  --rp-bg: #e2f0dd;         /* vert pastel fond */
  --rp-surface: #ffffff;    /* cartes */
  --rp-surface-2: #f7f8f2;  /* champs / surfaces light */
  --rp-border: rgba(70, 90, 70, .12);

  --rp-text: #55625F;
  --rp-muted: rgba(47,58,47,.65);

  --rp-green: #9cc96b;      /* vert principal (pill/bouton) */
  --rp-green-2: #86b95a;    /* hover/active un poil + soutenu */

  --rp-radius-lg: 26px;
  --rp-radius-md: 16px;

  --rp-shadow-soft: 0 18px 45px rgba(40, 70, 40, .10);
  --rp-shadow-inset: inset 0 1px 0 rgba(255,255,255,.75);

  --rp-green-start: #a6d27b;
  --rp-green-end: #8fbf61;

  --rp-green-text: #ffffff;

  --rp-soft-start: #F9FBF1;
  --rp-soft-end: #EFF5DA;

  --rp-danger-text: #9a4a4a;
  --rp-danger-border: rgba(170,90,90,.45);
  --rp-danger-bg: linear-gradient(180deg, #FBECEC, #F4DADA);
}

body{
  font-family: "Nunito", system-ui, -apple-system, sans-serif;
  color: var(--rp-text);
  background-color: var(--rp-bg); /* fallback */
  background-image: url("/img/background.png");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 100% auto;
  background-attachment: fixed;

  /* empêche les petits “sauts” avec la nav sticky */
  min-height: 100vh;
}
.container{
  max-width: 1220px !important;
}
.btn-outline-primary{
  border-radius: 999px;
  padding: .45rem 1rem;

  font-weight: 600;
  font-size: .9rem;

  color: #5b6f55;
  border: 1px solid rgba(120,150,120,.35);

  background: linear-gradient(180deg, var(--rp-soft-start), var(--rp-soft-end));

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.8),
    0 2px 6px rgba(90,120,60,.18);

  transition: all .2s ease;
} .btn-outline-primary:hover{
  color: #3f5f36;
  border-color: rgba(120,150,120,.55);

  background: linear-gradient(180deg, #ffffff, #f2f7df);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.9),
    0 3px 8px rgba(90,120,60,.22);
}

.btn-primary{
  border-radius: 999px;
  padding: .5rem 1.1rem;

  font-weight: 700;
  font-size: .95rem;

  color: var(--rp-green-text);
  border: none;

  background: linear-gradient(180deg, var(--rp-green-start), var(--rp-green-end));

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.6),
    0 6px 16px rgba(120,170,80,.45);

  text-shadow: 0 1px 0 rgba(0,0,0,.25);

  transition: all .2s ease;
} .btn-primary:hover{
  background: linear-gradient(180deg, #b4dc8a, #96c86b);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.7),
    0 8px 18px rgba(120,170,80,.5);
}

.btn-primary:active,
.btn-outline-primary:active{
  transform: translateY(1px);

  box-shadow:
    inset 0 2px 4px rgba(0,0,0,.2);
}
.btn-primary:focus-visible,
.btn-outline-primary:focus-visible{
  outline: none;
  box-shadow:
    0 0 0 3px rgba(150,200,100,.35),
    0 6px 16px rgba(120,170,80,.35);
}

.btn-outline-danger{
  border-radius: 999px;
  padding: .45rem .7rem;

  color: var(--rp-danger-text);
  border-color: var(--rp-danger-border);

  background: var(--rp-danger-bg);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.85),
    0 2px 6px rgba(120,60,60,.18);

  transition: all .2s ease;
}
.btn-outline-danger:hover{
  color: #7f3b3b;
  border-color: rgba(150,70,70,.65);

  background: linear-gradient(180deg, #ffffff, #f6dede);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.9),
    0 3px 8px rgba(120,60,60,.25);
}
.btn-outline-danger:active{
  transform: translateY(1px);

  box-shadow:
    inset 0 2px 4px rgba(120,60,60,.25);
}
.btn-outline-danger:focus-visible{
  outline: none;
  box-shadow:
    0 0 0 3px rgba(220,150,150,.45),
    0 3px 8px rgba(120,60,60,.25);
}
.bt-action-thumb{
  width: 30px;
  height: 30px;
}

.card-header {
  background: linear-gradient(180deg, #a6d27b, #8fbf61);
  color: #ffffff;
  text-shadow: 0 1px 0 rgba(0,0,0,.25);
}
.badge.bg-primary{
  border-radius: 999px;
  padding: .4em .75em;

  font-weight: 700;
  font-size: .75rem;

  color: #ffffff;

  background: linear-gradient(180deg, #a6d27b, #8fbf61);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.6),
    0 3px 8px rgba(120,170,80,.45);

  text-shadow: 0 1px 0 rgba(0,0,0,.25);
}

.badge-outline-primary{
  border-radius: 999px;
  padding: .35em .7em;

  font-weight: 600;
  font-size: .75rem;

  color: #5b6f55;
  border: 1px solid rgba(120,150,120,.35);

  background: linear-gradient(180deg, #F9FBF1, #EFF5DA);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.8),
    0 2px 5px rgba(90,120,60,.18);
}

.badge.bg-light.text-primary{
  border-radius: 999px;
  font-weight: 600;

  color: #5b6f55 !important;
  border: 1px solid rgba(120,150,120,.35);

  background: linear-gradient(180deg, #F9FBF1, #EFF5DA);
}
.badge.bg-primary:hover,
.badge-outline-primary:hover{
  filter: brightness(1.05);
}

h1{
    color: var(--rp-text);
    font-weight: 800;
    font-size: 28px;
}
h2{
    color: var(--rp-text);
    font-weight: 800;
    font-size: 24px;
}

.rp-header{
  background: rgba(255,255,255,.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(120,150,120,.18);
}

.rp-brand-name{
  font-weight: 800;
  font-size: 2rem;
  color: #3b5a32;
}

.rp-brand-mark{
    width: 80px;
    height: 80px;
  }

.rp-title-thumb{
  width: 45px;
  height: 45px;
}
.rp-topnav-link{
  display: inline-flex;
  align-items: center;
  gap: .25rem;

  padding: .45rem .95rem;
  border-radius: 999px;

  font-weight: 600;
  font-size: .95rem;

  color: #5b6f55;
  text-decoration: none;

  transition: background-color .2s ease,
              box-shadow .2s ease,
              color .2s ease;
}

.rp-topnav-link.is-active{
  background: linear-gradient(180deg, #a6d27b, #8fbf61);
  color: #ffffff;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.6),
    0 6px 16px rgba(120,170,80,.45);

  font-weight: 700;

  text-shadow: 0 1px 0 rgba(0,0,0,.25);
}
.rp-top-nav-action-thumb{
  width: 30px;
  height: 30px;
}

.rp-header-cta{
  border-radius: 999px;
  padding: .45rem 1rem;

  font-weight: 600;
  font-size: .9rem;

  color: #5b6f55;
  border: 1px solid rgba(120,150,120,.35);

  background: linear-gradient(180deg, #F9FBF1 0%, #EFF5DA 100%);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.8),
    0 2px 6px rgba(90,120,60,.18);

  backdrop-filter: blur(4px);
  transition: all .2s ease;
}

.rp-header-cta:hover{
  background: rgba(255,255,255,.9);
  color: #3f5f36;
  border-color: rgba(120,150,120,.55);
}

/****** FIN DU HEADER ******/

.rp-page{
  background: #FEFCFB;
  margin-top: 15px;
  border-radius: 28px;

 box-shadow:
    inset 0 1px 0 rgba(255,255,255,.85),
    0 10px 18px rgba(60,90,60,.22);
  padding: 2rem;
}


/* Carte “page” (le grand panneau blanc de la maquette) */
.rp-shell{
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(255,255,255,.55);
  border-radius: var(--rp-radius-lg);
  box-shadow: var(--rp-shadow-soft);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Titres type “Mon stock” */
.rp-title{
  font-weight: 700;
  letter-spacing: -.02em;
  color: rgba(35,45,35,.80);
}

/* Surfaces “input-like” (barre d’ajout rapide) */
.rp-field{
  background: var(--rp-surface-2);
  border: 1px solid var(--rp-border);
  border-radius: var(--rp-radius-md);
  box-shadow: var(--rp-shadow-inset);
}

/***** badge ****/
.rp-section-title{
  display: inline-flex;
  align-items: center;
  gap: .6rem;
}

/* Titre */
.rp-section-title h2{
  font-weight: 700;
  letter-spacing: -.02em;
  color: rgba(47,58,47,.85);
}

/* Badge compteur */
.rp-count-badge{
  font-size: .75rem;
  padding: .35em .7em;

  transform: translateY(-2px); /* 👈 le petit “lift” visuel */
}


/***** TABLEAU *******/
/* Conteneur arrondi du tableau (comme la carte de la maquette) */
.rp-page .table-responsive{
  border-radius: 22px;
  overflow: hidden;

  border: 1px solid rgba(120,150,120,.20);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.85),
    0 10px 18px rgba(60,90,60,.14);
}

/* Table bootstrap: on neutralise les styles trop “bootstrap” */
.rp-page .table{
  margin-bottom: 0;
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(239,245,218,.35);
  --bs-table-hover-bg: rgba(166,210,123,.16);
}

/* Header (dégradé vert pâle) */
.rp-page .table thead th{
  background: linear-gradient(180deg, rgba(231,243,219,.85), rgba(217,238,200,.75));
  color: rgba(47,58,47,.75);

  font-weight: 700;
  letter-spacing: -.01em;

  border-bottom: 1px solid rgba(120,150,120,.18);
}
.rp-page .table tbody{
  --bs-table-bg: #ffffff;
}

/* Cellules : plus “aérées” + séparateurs doux */
.rp-page .table > :not(caption) > * > *{
  padding: 0.5rem 1.1rem;
  border-bottom-color: rgba(120,150,120,.14);
}

.rp-page .table tbody tr{
  background: #ffffff;
}

.rp-page .table tbody tr:hover{
  background: #fcfdf9;
}

/* =========================================================
   MEALPLAN — Day visual (calendar chip) + past opacity
   ========================================================= */

.rp-card-body{
  padding: 0 !important; /* ton list-group flush gère déjà */
}

/* jour (list-group-item) */
.rp-day-past{
  opacity: .55;
}
.rp-day-today{
  opacity: 1;
}

/* Head row du jour */
.rp-day-head{
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

/* “mini calendrier” */
.rp-day-chip{
  width: 64px;
  height: 44px;
  flex: 0 0 64px;

  border-radius: 14px;

  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2px;

  background: linear-gradient(180deg, rgba(231,243,219,.85), rgba(217,238,200,.75));
  border: 1px solid rgba(120,150,120,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);

  color: rgba(47,58,47,.80);
}

.rp-day-chip i{
  font-size: 12px;
  opacity: .8;
  line-height: 1;
}

.rp-day-num{
  font-weight: 900;
  font-size: 16px;
  line-height: 1;
}

.rp-day-month{
  font-weight: 800;
  font-size: 11px;
  letter-spacing: .02em;
  text-transform: uppercase;
  opacity: .75;
  line-height: 1;
}

/* Meta (jour + date) */
.rp-day-meta{
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.rp-day-name{
  font-weight: 900;
  color: rgba(47,58,47,.86);
}

.rp-day-date{
  font-weight: 700;
  font-size: 12px;
  color: rgba(47,58,47,.60);
}

/* “Aujourd’hui” pill */
.rp-today-pill{
  margin-left: auto;
  flex-shrink: 0;

  padding: .25rem .6rem;
  border-radius: 999px;

  font-weight: 900;
  font-size: .75rem;

  color: var(--rp-green-text);
  background: linear-gradient(180deg, var(--rp-green-start), var(--rp-green-end));

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.6),
    0 6px 14px rgba(120,170,80,.35);

  text-shadow: 0 1px 0 rgba(0,0,0,.18);
}

/* si le jour est passé, on garde le chip lisible mais plus “soft” */
.rp-day-past .rp-day-chip{
  filter: grayscale(.15);
  opacity: .85;
}

/* Today: légère mise en avant du bloc jour */
.rp-day-today{
  background: rgba(255,255,255,.55);
}
.rp-day-today .rp-day-chip{
  border-color: rgba(140,185,90,.35);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.75),
    0 10px 18px rgba(120,170,80,.15);
}

/* Mobile : chip un peu plus petit */
@media (max-width: 576px){
  .rp-day-chip{
    width: 58px;
    flex-basis: 58px;
    height: 42px;
    border-radius: 13px;
  }
  .rp-today-pill{
    font-size: .72rem;
  }
}

.zone_meal_wrap{
  margin: 0 -15px;
}

/* =========================================================
   MEALPLAN — week grid (days as cards)
   ========================================================= */

.rp-week-grid{
  display: grid;
  gap: 14px;

  /* mobile first */
  grid-template-columns: 1fr;
}

/* 2 colonnes dès sm */
@media (min-width: 576px){
  .rp-week-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 3 colonnes sur tablette */
@media (min-width: 992px){
  .rp-week-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* 4 colonnes sur desktop large */
@media (min-width: 1200px){
  .rp-week-grid{
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Card jour */
.rp-day-card{
  border-radius: 18px;
  border: 1px solid rgba(120,150,120,.20);
  background: rgba(255,255,255,.78);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.85),
    0 10px 18px rgba(60,90,60,.10);
  padding: 12px;
}

/* Jour passé = opacité (comme tu voulais) */
.rp-day-card--past{
  opacity: .55;
}

/* Aujourd’hui : léger highlight */
.rp-day-card--today{
  border: 2px solid rgba(140,185,90,1);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.85),
    0 12px 22px rgba(120,170,80,.16);
}

/* optionnel : titre plus lisible */
.rp-day-title{
  color: rgba(35,45,35,.85);
}

/* =========================================================
   MEALPLAN — day header (short date + tiny propose button)
   ========================================================= */

.rp-day-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.rp-day-date{
  font-weight: 900;
  letter-spacing: -.01em;
  color: rgba(35,45,35,.82);
  line-height: 1;
  font-size: 15px;
}

.rp-day-date--today{
  color: rgba(35,45,35,.92);
}

.rp-day-propose-btn{
  padding: .25rem .55rem !important;
  border-radius: 999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width: 45px;
}
.rp-day-propose-btn i{
  margin: 0 !important;
  font-size: 14px;
}

/* =========================================================
   MEALPLAN — meal item card (bigger thumb, title wraps, actions below)
   ========================================================= */

/* ===== Meal card ===== */
.rp-meal-card{
  border: 1px solid rgba(120,150,120,.18);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
  padding: 10px;
}

/* Zone principale (thumb + titre) */
.rp-meal-main{
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

/* Image recette (60x60 desktop + mobile) */
.rp-meal-thumb{
  width: 80px;
  height: 80px;
  flex: 0 0 auto;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 10px;
}

/* Bloc texte */
.rp-meal-meta{
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.rp-meal-title{
  font-weight: 800;
  color: #3b5a32;
  line-height: 1.15;
  white-space: normal;     /* autorise retour à la ligne */
  word-break: break-word;
  font-size: 1.2rem;
}

/* Badge stock insuffisant / etc */
.rp-meal-badge{
  display: inline-block;
  margin-top: 6px;
}

/* ===== Actions ===== */
.rp-meal-actions{
  display: flex;
  justify-content: flex-end; /* boutons à droite */
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

/* Bouton image */
.rp-action-btn{
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  line-height: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Thumb d’action (40x40) */
.rp-action-thumb{
  width: 60px;
  height: 60px;
  object-fit: contain;
  display: block;
  transition: transform .12s ease, filter .12s ease;
}

/* Feedback interaction */
.rp-action-btn:hover .rp-action-thumb{
  transform: translateY(-1px);
  filter: brightness(1.05);
}
.rp-action-btn:active .rp-action-thumb{
  transform: translateY(0);
  filter: brightness(.95);
}

/* Mobile: juste plus d’espace entre les boutons (sans changer les tailles) */
@media (max-width: 576px){
  .zone_meal_wrap .rp-card-body{
    padding: 0rem !important;
    margin: 0 -1rem;
  }

  .zone_meal_wrap .swipe-item{
    overflow: inherit !important;
  }
  .rp-meal-actions{
    gap: 12px;
    margin-top: 0px;
  }
}

/* =========================================================
   DESKTOP — Delete button overlay (top-right, only on hover)
   ========================================================= */

/* Le wrapper desktop doit être positionné */
.rp-meal-card--desktop{
  position: relative;
}

/* Bouton delete overlay */
.rp-meal-delete{
  position: absolute;
  top: 0px;
  right: 0px;
  z-index: 5;

  /* caché par défaut */
  opacity: 0;
  transform: translateY(-2px) scale(0.98);
  pointer-events: none;

  transition: opacity .15s ease, transform .15s ease;
}

/* Taille un peu plus petite que les grosses actions */
.rp-action-thumb--delete{
  width: 44px;
  height: 44px;
}

/* Affiche au hover de la carte uniquement */
.rp-meal-card--desktop:hover .rp-meal-delete{
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Aussi au focus clavier (accessibilité) */
.rp-meal-card--desktop:focus-within .rp-meal-delete{
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}


/* =========================================================
   CHAT — fit remaining viewport inside rp-page
   ========================================================= */

/* Ajuste si besoin, mais ces valeurs matchent ton base */
:root{
  --rp-header-h: 56px;          /* approximatif, OK en base */
  --rp-main-gap-top: 15px;      /* rp-page margin-top */
  --rp-page-pad: 2rem;          /* rp-page padding desktop */
  --rp-page-pad-mobile: 1.1rem; /* rp-page padding mobile (ton media query) */
  --rp-bottom-nav-h: 92px;      /* ton menu bas */
}

/* wrapper de page chat: on neutralise le “scroll page” */
.rp-chat-page{
  height: 100%;
}

/* IMPORTANT: le layout chat doit pouvoir shrink en flex */
.rp-chat-layout{
  /* hauteur restante dans la fenêtre */
  height: calc(100dvh - var(--rp-header-h) - var(--rp-main-gap-top) - (var(--rp-page-pad) * 2));
  min-height: 0;
}

/* messages : fix flex overflow */
.rp-chat-messages{
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Mobile : rp-page a moins de padding + on soustrait le menu bas */
@media (max-width: 991.98px){
  .rp-chat-layout{
    height: calc(
      100dvh
      - var(--rp-header-h)
      - var(--rp-main-gap-top)
      - (var(--rp-page-pad-mobile) * 2)
      - var(--rp-bottom-nav-h)
      - env(safe-area-inset-bottom)
    );
  }
}

.rp-message{
  background: linear-gradient(180deg, #a6d27b, #8fbf61);
  color: #ffffff;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.6),
    0 6px 16px rgba(120,170,80,.45);

  font-weight: 700;

  text-shadow: 0 1px 0 rgba(0,0,0,.25);
}



/* =========================================================
   RECIPES — Grid desktop (3 cols) -> tablet (2) -> mobile (1)
   ========================================================= */

.rp-recipe-grid{
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr; /* mobile first */
}

@media (min-width: 768px){
  .rp-recipe-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr)); /* tablet */
  }
}

@media (min-width: 1200px){
  .rp-recipe-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr)); /* desktop large */
  }
}

/* --- Recipe item --- */
.rp-recipe-item{
  display:block;
  border-radius: 18px;
  border: 1px solid rgba(35,48,82,0.10);
  background: rgba(255,255,255,0.80);
  box-shadow: 0 10px 18px rgba(35,48,82,0.06);
  overflow:hidden;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

.rp-recipe-item:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(35,48,82,0.10);
  background: rgba(255,255,255,0.86);
}

.rp-recipe-main{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
  padding: 14px 14px;
}

.rp-recipe-left{
  display:flex;
  align-items:center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.rp-recipe-thumb{
  width: 60px;
  height: 60px;
  border-radius: 16px;
  object-fit: contain;
  background: #fff;
  border: 1px solid rgba(35,48,82,0.08);
}

.rp-recipe-meta{ min-width:0; }
.rp-recipe-title{
  font-weight: 800;
  letter-spacing:-0.01em;
  font-size: 1.02rem;
}
.rp-recipe-sub{
  color: var(--rp-muted, #6E7AA3);
  font-weight: 600;
  font-size: .9rem;
}

/* Right side */
.rp-recipe-right{
  display:flex;
  align-items:center;
  gap: 10px;
  flex-shrink:0;
}

.rp-chevron{
  width: 36px;
  height: 36px;
  border-radius: 14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(35,48,82,0.08);
  color: var(--rp-ink-2, #3B4A70);
}

/* Pills */
.rp-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: .25rem .6rem;
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: .01em;
  font-size: .82rem;
  border: 1px solid transparent;
  white-space: nowrap;
}

.rp-pill-ok{
  background: rgba(47,184,167,0.16);
  color: #137A6E;
  border-color: rgba(47,184,167,0.28);
}

.rp-pill-miss{
  background: rgba(239,107,123,0.14);
  color: #B53A49;
  border-color: rgba(239,107,123,0.26);
}

/* Details (missing) */
.rp-recipe-details{
  padding: 0 14px 14px 14px;
}

.rp-missing-list{
  list-style:none;
  padding:0;
  margin: 10px 0 0 0;
  display:grid;
  gap: 8px;
}

.rp-missing-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
}

.rp-missing-left{
  display:flex;
  align-items:center;
  gap: 8px;
  min-width:0;
  flex: 1;
}

.rp-missing-thumb{
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background:#fff;
  border: 1px solid rgba(35,48,82,0.08);
  object-fit: contain;
}

.rp-missing-right{ flex-shrink:0; }

.rp-missing-more{
  color: var(--rp-muted, #6E7AA3);
  font-weight: 700;
  font-size: .85rem;
}

/* =========================================================
   ACCORDION — calm style
   ========================================================= */

.rp-accordion .accordion-item{
  border-radius: 18px;
  overflow:hidden;
  border: 1px solid rgba(35,48,82,0.10);
  background: rgba(255,255,255,0.72);
  box-shadow: 0 10px 18px rgba(35,48,82,0.06);
}

.rp-accordion .accordion-button{
  font-weight: 900;
  background: linear-gradient(180deg, rgba(231,243,219,.85), rgba(217,238,200,.75));
  color: rgba(47,58,47,.75);

  font-weight: 700;
  letter-spacing: -.01em;

  border-bottom: 1px solid rgba(120,150,120,.18);
}

.rp-accordion .accordion-button:not(.collapsed){
  background: linear-gradient(180deg, rgba(231,243,219,.85), rgba(217,238,200,.75));
  color: rgba(47,58,47,.75);

  font-weight: 700;
  letter-spacing: -.01em;

  border-bottom: 1px solid rgba(120,150,120,.18);
  box-shadow: none;
}

.rp-accordion .accordion-button:focus{
  box-shadow: var(--rp-focus, 0 0 0 .25rem rgba(167,228,210,.55));
}

.rp-accordion .accordion-body{
  background: rgba(255,255,255,0.70);
}

/* =========================================================
   STOCK — Quick Add Bar (maquette)
   ========================================================= */
@media (max-width: 520px){
  .rp-stock-topbtn{
    width: 50%;
    justify-content: center;
  }
}

.rp-quickadd{
  margin: 0;
}

/* La barre pill globale */
.rp-quickadd__bar{
  display: flex;
  align-items: center;
  gap: 12px;

  padding: 10px 12px;
  border-radius: var(--rp-radius-lg);

  background: linear-gradient(180deg, rgba(231,243,219,.85), rgba(217,238,200,.75)) !important;
  border: 1px solid rgba(120,150,120,.18) !important;

  box-shadow:
    var(--rp-shadow-inset),
    0 10px 18px rgba(60,90,60,.14);

  /* petit blur comme ton shell */
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Bloc du champ principal (pour éviter l’overflow en flex) */
.rp-quickadd__field{
  flex: 1 1 auto;
  min-width: 0;
}

/* Input principal */
.rp-quickadd__input{
  width: 100%;
  height: 46px;

  border-radius: var(--rp-radius-md);
  border: 1px solid var(--rp-border);
  background: rgba(255,255,255,.78);

  padding: 0 14px;

  color: var(--rp-text);
  font-weight: 700;

  outline: none;
  box-shadow: var(--rp-shadow-inset);

  transition: background-color .15s ease,
              border-color .15s ease,
              box-shadow .15s ease;
}

.rp-quickadd__input::placeholder{
  color: rgba(47,58,47,.55);
  font-weight: 700;
}

/* Focus “Receiplan” */
.rp-quickadd__input:focus{
}

/* Mini champs (Qté + Unité / select / placeholder) */
.rp-quickadd__mini{
  flex: 0 0 auto;
}

.rp-quickadd__miniInput,
.rp-quickadd__miniSelect,
.rp-quickadd__miniFake{
  height: 46px;
  width: 92px;

  border-radius: var(--rp-radius-md);
  border: 1px solid var(--rp-border);
  background: rgba(255,255,255,.78);

  padding: 0 12px;

  color: var(--rp-text);
  font-weight: 800;

  outline: none;
  box-shadow: var(--rp-shadow-inset);

  transition: background-color .15s ease,
              border-color .15s ease,
              box-shadow .15s ease;
}

/* Placeholder — (si tu n’as pas de select unité) */
.rp-quickadd__miniFake{
  display: grid;
  place-items: center;
  color: rgba(47,58,47,.60);
  user-select: none;
}

/* Focus mini champs */
.rp-quickadd__miniInput:focus,
.rp-quickadd__miniSelect:focus{
  background: #fff;
  border-color: rgba(140,185,90,.45);
  box-shadow:
    0 0 0 3px rgba(150,200,100,.22),
    var(--rp-shadow-inset);
}

/* Bouton “Ajouter” pill vert */
.rp-quickadd__btn{
  height: 50px;
  padding: 0 18px;

  border: none;
  border-radius: 999px;

  display: inline-flex;
  align-items: center;
  gap: 10px;

  color: var(--rp-green-text);
  font-weight: 900;
  letter-spacing: -.01em;

  background: linear-gradient(180deg, var(--rp-green-start), var(--rp-green-end));

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.6),
    0 8px 18px rgba(120,170,80,.45);

  text-shadow: 0 1px 0 rgba(0,0,0,.20);

  transition: transform .08s ease, filter .12s ease, box-shadow .15s ease;
}

.rp-quickadd__btn:hover{
  filter: brightness(1.03);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.65),
    0 10px 22px rgba(120,170,80,.52);
}

.rp-quickadd__btn:active{
  transform: translateY(1px);
  box-shadow:
    inset 0 2px 4px rgba(0,0,0,.20),
    0 6px 14px rgba(120,170,80,.35);
}

.rp-quickadd__btn:focus-visible{
  outline: none;
  box-shadow:
    0 0 0 3px rgba(150,200,100,.35),
    0 10px 22px rgba(120,170,80,.45);
}

/* Petit badge + dans le bouton */
.rp-quickadd__btnIcon{
  width: 28px;
  height: 28px;
  border-radius: 12px;

  display: grid;
  place-items: center;

  background: rgba(255,255,255,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.30);

  font-size: 18px;
  line-height: 1;
}

/* Chevron à droite */
.rp-quickadd__btnChevron{
  opacity: .9;
  font-size: 18px;
  line-height: 1;
}

/* Erreurs Symfony form: on évite qu’elles cassent la hauteur */
.rp-quickadd .invalid-feedback,
.rp-quickadd .form-error-message{
  margin-top: 6px;
}

@media (max-width: 520px){
  .rp-quickadd__bar{
    gap: 10px;
    padding: 10px;
    flex-wrap: wrap;
  }

  /* 1ère ligne : ingrédient plein width */
  .rp-quickadd__field{
    flex: 0 0 100%;
    width: 100%;
  }

  /* 2ème ligne : quantité 50% + unité 50% */
  .rp-quickadd__mini{
    flex: 0 0 calc(50% - 5px);
    width: calc(50% - 5px);
  }

  .rp-quickadd__miniInput,
  .rp-quickadd__miniSelect,
  .rp-quickadd__miniFake{
    width: 100%;
  }

  /* bouton sur sa propre ligne */
  .rp-quickadd__btn{
    width: 100%;
    justify-content: center;
  }
}

/* =========================================================
   Quick Add — TomSelect : invisible (flèche only)
   Cible : .ts-wrapper.rp-quickadd__input (dans la barre)
   ========================================================= */

/* IMPORTANT: le wrapper doit être positionné pour la flèche */
.rp-quickadd .ts-wrapper.rp-quickadd__input{
  position: relative;
  width: 100%;              /* aligne avec tes mini champs */
  flex: 0 0 auto;
  padding: 0px;
}

/* Reset agressif du control TomSelect */
.rp-quickadd .ts-wrapper.rp-quickadd__input .ts-control{
  position: relative;
  height: 46px;
  min-height: 46px;

  padding: 0 34px 0 10px;   /* place pour la flèche */
  border-radius: var(--rp-radius-md);

  background: transparent !important;
  border: 1px solid transparent !important;
  box-shadow: none !important;

  display: flex;
  align-items: center;

  cursor: pointer;
}

/* TomSelect peut mettre un background sur .ts-control via thème */
.rp-quickadd .ts-wrapper.rp-quickadd__input .ts-control,
.rp-quickadd .ts-wrapper.rp-quickadd__input .ts-control *{
  background: transparent !important;
}



/* Empêche l'input de prendre de la place */
.rp-quickadd .ts-wrapper.rp-quickadd__input .ts-control input{
  width: 1px !important;
  min-width: 1px !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Supprime le clear button (le ⨯) si tu ne le veux pas */
.rp-quickadd .ts-wrapper.rp-quickadd__input .ts-control .clear-button{
  display: none !important;
}

/* Hover = petite zone “cliquable” */
.rp-quickadd .ts-wrapper.rp-quickadd__input .ts-control:hover{
  background: rgba(255,255,255,.25) !important;
  border-color: rgba(120,150,120,.18) !important;
}

/* Focus (quand TomSelect ajoute .focus au wrapper) */
.rp-quickadd .ts-wrapper.rp-quickadd__input.focus .ts-control{
  background: rgba(255,255,255,.40) !important;
  border-color: rgba(140,185,90,.45) !important;
  box-shadow: 0 0 0 3px rgba(150,200,100,.22) !important;
}

/* Flèche */
.rp-quickadd .ts-wrapper.rp-quickadd__input .ts-control::after{
  content: "▾";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);

  font-size: 14px;
  font-weight: 900;
  line-height: 1;

  color: rgba(47,58,47,.55);
  pointer-events: none;
}

/* Flèche tournée quand ouvert */
.rp-quickadd .ts-wrapper.rp-quickadd__input.dropdown-active .ts-control::after{
  transform: translateY(-50%) rotate(180deg);
}

/* Dropdown (optionnel mais joli dans ton thème) */
.rp-quickadd .ts-wrapper.rp-quickadd__input .ts-dropdown{
  border-radius: 16px;
  border: 1px solid rgba(120,150,120,.25);
  box-shadow: 0 14px 26px rgba(60,90,60,.18);
  background: #fff;
  overflow: hidden;
}

.rp-quickadd .ts-wrapper.rp-quickadd__input .ts-dropdown .option{
  padding: .55rem .9rem;
  font-weight: 700;
  color: var(--rp-text);
}

.rp-quickadd .ts-wrapper.rp-quickadd__input .ts-dropdown .option.active{
  background: rgba(166,210,123,.20);
}

.rp-quickadd .ts-wrapper.rp-quickadd__input .ts-dropdown .option.selected{
  background: rgba(166,210,123,.30);
}

/* Responsive: sur petit écran, on garde tout en ligne tant que possible,
   puis on wrap proprement */
@media (max-width: 520px){
  .rp-quickadd__bar{
    gap: 10px;
    padding: 10px;
    flex-wrap: wrap;
  }

  .rp-quickadd__icon{
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .rp-quickadd__miniInput,
  .rp-quickadd__miniSelect,
  .rp-quickadd__miniFake{
    width: 110px;
  }

  .rp-quickadd__btn{
    width: 100%;
    justify-content: center;
  }

}

/* Stock header actions */
.rp-stock-actions{
  display: flex;
  justify-content: flex-end;
  flex: 0 0 auto;
}

/* Mobile: actions full width + boutons 50/50 côte à côte */
@media (max-width: 575.98px){
  .rp-stock-actions{
    width: 100%;
  }

  .rp-stock-topactions{
    width: 100%;
    justify-content: space-between;
  }

  .rp-stock-topbtn{
    flex: 0 0 50%;
    max-width: 50%;
    justify-content: center;
    white-space: nowrap;
  }
   /* boutons */
  .rp-stock-topbtn{
    flex: 0 0 50%;
    max-width: 50%;
    justify-content: center;
    white-space: nowrap;
  }
}

/* =========================================================
   MODAL
   ========================================================= */
.rp-modal{
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(231,243,219,.92), rgba(217,238,200,.86));
  border: 1px solid rgba(120,150,120,.18);
  box-shadow: 0 18px 40px rgba(60,90,60,.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.rp-modal .modal-title{
  font-weight: 900;
  letter-spacing: -.01em;
  color: var(--rp-text);
}

.rp-modal-text{
  font-weight: 700;
  color: var(--rp-text);
}

/* Desktop: quantité cliquable */
.rp-qty{
  cursor: pointer;
  position: relative;
  display: inline-block;
}

/* Input invisible (affiché uniquement en édition) */
.rp-qty-input{
  display: none;
  width: 88px;
  text-align: right;

  border: none !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;

  font-weight: 800;
  color: inherit;
}

/* Quand on édite: même rendu que le texte */
.rp-qty.is-editing .rp-qty-input{
  display: inline-block;
}

/* Mobile: bouton quantité */
.rp-qty-btn{
  border: 0;
  background: transparent;
  padding: 6px 8px;
  border-radius: 10px;
}
.rp-qty-btn:active{
  background: rgba(0,0,0,.05);
}


/* =========================================================
   Bootstrap switch override (reliable) — Receiplan Green Calm
   Works by replacing the knob with an SVG background-image
   ========================================================= */

.form-switch .form-check-input {
  /* size */
  width: 2.8rem;
  height: 1.55rem;

  /* reset native look */
  appearance: none;
  -webkit-appearance: none;

  /* track */
  border-radius: 999px;
  border: 1px solid rgba(35,48,82,0.25);
  background-color: rgba(35,48,82,0.15);

  /* knob (SVG circle) */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-2 -2 36 36'%3E%3Ccircle cx='16' cy='16' r='14' fill='white'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 1.15rem 1.15rem;
  background-position: left 0.2rem center;

  /* feel */
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, background-position .2s ease;
  box-shadow: inset 0 2px 4px rgba(0,0,0,.08);
}

/* ON state */
.form-switch .form-check-input:checked {
  background-color: var(--rp-brand, #8ECF9E);
  border-color: rgba(142,207,158,0.85);
  background-position: right 0.2rem center;
}

/* focus ring (keyboard) */
.form-switch .form-check-input:focus {
  outline: 0;
  box-shadow: var(--rp-focus, 0 0 0 .25rem rgba(167,228,210,.55));
}

/* disabled */
.form-switch .form-check-input:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* label */
.form-switch .form-check-label {
  margin-left: .55rem;
  font-weight: 700;
  color: var(--rp-ink, #233052);
}

/* =========================================================
   MOBILE BOTTOM NAV — pill + border gradient + active = btn-primary
   ========================================================= */

.rp-bottom-nav{
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(0px + env(safe-area-inset-bottom));
  z-index: 1030;

  width: min(560px, calc(100% - 24px));
  padding: 0px;

  display: flex;
  align-items: stretch;
  gap: 0;

  border-radius: 22px;

  /* fond clair comme btn-outline-primary */
  background: linear-gradient(180deg, var(--rp-soft-start), var(--rp-soft-end));

  /* bordure dégradée */
  border: 2px solid transparent;
  background-clip: padding-box;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.85),
    0 14px 28px rgba(60,90,60,.20);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Tabs */
.rp-bottom-nav .rp-tab{
  flex: 1 1 0;
  min-width: 0;

  text-decoration: none;
  color: rgba(47,58,47,.72);

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;

  padding: 3px 6px;
  border-radius: 22px;

  position: relative;
  transition: transform .12s ease, filter .12s ease, background .12s ease, box-shadow .12s ease;
}

/* séparateurs verticaux très doux */
.rp-bottom-nav .rp-tab + .rp-tab::before{
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: rgba(120,150,120,.18);
}

/* Icon */
.rp-bottom-nav .rp-tab i{
  font-size: 22px;
  line-height: 1;
}

/* Label */
.rp-bottom-nav .rp-tab span{
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1;
}

/* Hover/tap */
.rp-bottom-nav .rp-tab:active{
  transform: translateY(1px);
}

/* Actif = EXACTEMENT le style de .btn-primary (gradient + shadow) */
.rp-bottom-nav .rp-tab.is-active{
  color: var(--rp-green-text);

  background: linear-gradient(180deg, var(--rp-green-start), var(--rp-green-end));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.6),
    0 6px 16px rgba(120,170,80,.45);

  text-shadow: 0 1px 0 rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.20);

  transform: translateY(-1px);
}

/* icône et label actifs bien blancs */
.rp-bottom-nav .rp-tab.is-active i,
.rp-bottom-nav .rp-tab.is-active span{
  color: var(--rp-green-text);
}

/* Désactive visuellement les séparateurs quand un item est actif
   (sinon la ligne traverse le bouton actif) */
.rp-bottom-nav .rp-tab.is-active::before{
  opacity: 0;
}
.rp-bottom-nav .rp-tab.is-active + .rp-tab::before{
  opacity: 0;
}

/* léger “focus ring” */
.rp-bottom-nav .rp-tab:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(150,200,100,.35);
  border-radius: 999px;
}

.rp-bottom-nav .rp-nav-action-thumb{
  width: 40px;
  width: 50px;
  margin-bottom: -8px;
}

/* =========================================================
   Eviter que le menu fixe recouvre le contenu sur mobile
   ========================================================= */
@media (max-width: 991.98px){
  body{
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
  }
}



/* =========================================================
   MOBILE COMPACT — reduce wasted space (<= 576px)
   ========================================================= */
@media (max-width: 576px){

  body{
    background-image: url("/img/background_mobile.png");
  }

  /* Container : un peu moins de padding latéral */
  .container{
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  /* Page blanche principale : moins de padding + radius un peu plus petit */
  .rp-page{
    padding: 1rem !important;
    margin-top: 10px !important;
    border-radius: 22px !important;
  }

  .rp-header{
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;

    position: relative !important;
    top: inherit !important;

  }

  /* Titres : plus petits en mobile */
  h1{
    font-size: 22px !important;
    line-height: 1.15;
    margin-bottom: .35rem;
  }
  h2{
    font-size: 18px !important;
    line-height: 1.2;
    margin-bottom: .35rem;
  }

  /* Titres “sections” */
  .rp-title{
    font-size: 1.05rem;
  }

  /* Réduire les gros espacements Bootstrap */
  .mt-5{ margin-top: 1.5rem !important; }
  .mb-5{ margin-bottom: 1.5rem !important; }
  .py-5{ padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }

  /* Cards Bootstrap dans rp-page : padding plus compact */
  .rp-page .card-body{
    padding: 1rem !important;
  }

  /* Boutons : un poil plus compacts */
  .btn-primary,
  .btn-outline-primary,
  .btn-outline-danger{
    padding: .42rem .85rem !important;
    font-size: .9rem !important;
  }

  /* Top nav / header : liens un peu plus petits */
  .rp-topnav-link{
    padding: .38rem .75rem !important;
    font-size: .9rem !important;
  }
  .rp-brand-name{
    font-size: 1.6rem !important;
  }
  .rp-brand-mark{
    width: 60px;
    height: 60px;
  }

  /* Section title + badge : resserrer */
  .rp-section-title{
    gap: .45rem !important;
  }
  .rp-count-badge{
    transform: none !important;
    padding: .30em .60em !important;
  }

  /* Table : padding cellules plus compact + header plus serré */
  .rp-page .table > :not(caption) > * > *{
    padding: 0.42rem 0.65rem !important;
  }
  .rp-page .table thead th{
    font-size: .85rem;
  }

  /* Table responsive wrapper : radius un peu plus petit */
  .rp-page .table-responsive{
    border-radius: 18px !important;
  }

  /* Quick add : plus compact en mobile */
  .rp-quickadd__bar{
    padding: 10px !important;
    gap: 10px !important;
  }
  .rp-quickadd__input{
    height: 44px !important;
  }
  .rp-quickadd__miniInput,
  .rp-quickadd__miniSelect,
  .rp-quickadd__miniFake{
    height: 44px !important;
    width: 100% !important;
  }
  .rp-quickadd__btn{
    height: 46px !important;
    padding: 0 14px !important;
  }

  /* TomSelect dans quickadd : garde la même hauteur en mobile */
  .rp-quickadd .ts-wrapper.rp-quickadd__input .ts-control{
    height: 44px !important;
    min-height: 44px !important;
  }

  /* Optionnel : le badge ne doit jamais “survoler” les overlays */
  .rp-count-badge{
    position: relative;
    z-index: 1;
  }

  .swipe-content{
    padding:1px;
  }
  .rp-accordion{
    margin: 0 -11px;
  }
  .rp-recipe-grid{
    margin: 0px -0.4rem;
  }
  .rp-recipe-main{
    padding:10px;
  }
}

/***
RECIPE FORM
*/
.rp-step { opacity: 1; transition: opacity .25s ease; }
.rp-step.is-hidden { opacity: 0; pointer-events: none; height: 0; overflow: hidden; }


/* =========================================================
   Hide number input spinners (quantités)
   ========================================================= */

/* Chrome / Edge / Safari */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type="number"] {
  -moz-appearance: textfield;
   text-align: right;
  font-weight: 700;
}
/* =========================================================
   SHOPPING
   ========================================================= */

/* Cache la checkbox native mais la garde accessible */
.rp-check {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}

/* Label cliquable qui affiche l'image */
.rp-check-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  width: 40px;
  height: 40px;
}

.rp-check-label img {
  width: 40px;
  height: 40px;
  display: block;
}

/* Image grise par défaut */
.rp-check-label .rp-check-on { display: none; }
.rp-check-label .rp-check-off { display: block; }

/* Quand checked -> on affiche la coche "active" */
.rp-check:checked + .rp-check-label .rp-check-on { display: block; }
.rp-check:checked + .rp-check-label .rp-check-off { display: none; }

/* Focus clavier visible */
.rp-check:focus-visible + .rp-check-label {
  outline: 2px solid rgba(13,110,253,.6);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Lock pendant requête */
.rp-check-label.is-loading {
  pointer-events: none;
  opacity: 0.6;
}

/* ===== Etat "coché" : MOBILE cards ===== */
.d-md-none .swipe-item.is-checked {
  opacity: 0.5;
}

/* ===== Etat "coché" : DESKTOP table ===== */
/* plus spécifique pour gagner vs .rp-page .table tbody tr{ background... } */
.rp-page .table tbody tr.is-checked > td {
  opacity: 0.5;
}

/* garder l'opacité même au hover */
.rp-page .table.table-hover tbody tr.is-checked:hover > td {
  opacity: 0.5;
}

/* optionnel: garder le bouton supprimer bien lisible */
.rp-page .table tbody tr.is-checked > td .btn,
.d-md-none .swipe-item.is-checked .btn {
  opacity: 1;
}



/* ===== Scanner page (Kuko / pastel) ===== */

.rp-scan-page{
  min-height: calc(100vh - 56px);
  padding: 28px 16px;
  position: relative;
  overflow: hidden;
}

/* Fond “watercolor” pastel */
.rp-scan-page::before{
  content:"";
  position:absolute;
  inset:-60px;
  background:
    radial-gradient(600px 380px at 20% 20%, rgba(168, 214, 190, .45), transparent 65%),
    radial-gradient(520px 360px at 85% 25%, rgba(193, 232, 210, .35), transparent 62%),
    radial-gradient(520px 420px at 55% 85%, rgba(160, 209, 183, .30), transparent 60%),
    linear-gradient(180deg, rgba(238, 248, 242, .65), rgba(244, 250, 246, .9));
  filter: blur(0px);
  z-index: 0;
}

.rp-scan-shell{
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  display:flex;
  justify-content:center;
}

/* Card principale */
.rp-scan-card{
  width: min(900px, 100%);
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(0,0,0,.05);
  border-radius: 28px;
  box-shadow:
    0 12px 30px rgba(16, 24, 40, .08),
    0 2px 8px rgba(16, 24, 40, .05);
  backdrop-filter: blur(8px);
  overflow: hidden;
}

/* Header */
.rp-scan-sub{
  font-size: 18px;
  color: rgba(36,49,42,.82);
}

.rp-scan-note{
  margin-top: 6px;
  font-size: 14px;
  color: rgba(36,49,42,.62);
}

/* Body */
.rp-scan-body{
  padding: 18px 28px 10px 28px;
}

.rp-scan-form{
  display:flex;
  flex-direction:column;
  gap: 14px;
}

/* Zone drop */
.rp-scan-drop{
  cursor: pointer;
  user-select:none;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding: 28px 18px;
  border-radius: 22px;
  border: 2px dashed rgba(106, 168, 138, .35);
  background: rgba(255,255,255,.65);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.03);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.rp-scan-drop:hover{
  transform: translateY(-1px);
  border-color: rgba(106, 168, 138, .55);
  box-shadow:
    inset 0 0 0 1px rgba(0,0,0,.03),
    0 10px 24px rgba(16,24,40,.06);
}

.rp-scan-illus{
  width: 400px;
  margin-bottom: 10px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.rp-scan-illus img{
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.rp-scan-illus-fallback{
  font-size: 42px;
  opacity: .9;
}

.rp-scan-drop-title{
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -0.02em;
  color:#2a3a31;
  margin-top: 8px;
}

.rp-scan-drop-sub{
  font-size: 16px;
  color: rgba(42,58,49,.75);
  margin-top: 2px;
}

.rp-scan-hint{
  margin-top: 14px;
  font-size: 14px;
  color: rgba(42,58,49,.68);
  max-width: 520px;
}

/* Input file caché */
.rp-scan-input{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip: rect(0,0,0,0);
  border:0;
}

/* Actions */
.rp-scan-actions{
  display:flex;
  justify-content:flex-end;
}

.rp-scan-btn{
  border-radius: 14px;
  padding: 10px 14px;
}

/* Divider */
.rp-scan-divider{
  height: 1px;
  background: rgba(0,0,0,.06);
  margin: 18px 0;
}

/* Bloc “photo envoyée” */
.rp-scan-uploaded{
  display:flex;
  justify-content:space-between;
  gap: 16px;
  flex-wrap: wrap;
  align-items:flex-start;
}

.rp-scan-uploaded-title{
  font-weight: 700;
  color:#25342c;
}

.rp-scan-uploaded-file{
  color: rgba(37,52,44,.75);
  font-size: 14px;
  max-width: 520px;
}

.rp-scan-uploaded-info{
  color: rgba(37,52,44,.55);
  font-size: 13px;
  margin-top: 2px;
}

.rp-scan-uploaded-cta{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Footer */
.rp-scan-footer{
  padding: 18px 28px 26px 28px;
  text-align:center;
}

.rp-scan-footer-label{
  color: rgba(37,52,44,.62);
  margin-bottom: 10px;
}

.rp-scan-pill{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(0,0,0,.07);
  color: #25342c;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(16,24,40,.06);
  transition: transform .12s ease, box-shadow .12s ease;
}

.rp-scan-pill:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(16,24,40,.08);
  color: #25342c;
}

.rp-scan-pill-ico{
  font-size: 18px;
  line-height: 1;
}

/* Responsive */
@media (max-width: 576px){
  .rp-scan-head{ padding: 20px 18px 8px; }
  .rp-scan-body{ padding: 14px 18px 8px; }
  .rp-scan-footer{ padding: 16px 18px 22px; }
  .rp-scan-h1{ font-size: 26px; }
  .rp-scan-drop-title{ font-size: 22px; }
  .rp-scan-illus{ width: 200px; height: 110px; }
}
