/* =========================================================
   paramTest.css — basé sur paramDesIngredients.css
   + Adapté à la nouvelle structure (sidebar + Infos recette)
   + Compat modales (étapes, quantité, parametre, temps)
   ========================================================= */

/* ---------- Tokens ---------- */
:root{
  --bg:#F6F2FF;
  --card: rgba(255,255,255,.78);
  --card-strong: rgba(255,255,255,.92);
  --border: rgba(120,80,200,.15);
  --border-2: rgba(120,80,200,.10);
  --text:#1f1a2a;
  --muted: rgba(31,26,42,.62);
  --primary:#7B4DFF;
  --primary2:#A88BFF;

  --shadow: 0 18px 50px rgba(40,20,80,.12);
  --shadow2: 0 10px 34px rgba(30,10,70,.10);

  --r: 18px;
  --r2: 22px;
  --rsm: 14px;

  --focus: 0 0 0 4px rgba(123,77,255,.18);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 20% 10%, rgba(123,77,255,.18), transparent 60%),
    radial-gradient(900px 500px at 80% 30%, rgba(168,139,255,.22), transparent 55%),
    var(--bg);
}

img{ max-width:100%; display:block; }
a{ color: inherit; }
button, input, select, textarea{ font: inherit; }
button{ cursor:pointer; }

/* =========================================================
   WRAPPER + TOPBAR (parametre-*)
   ========================================================= */
.parametre-bg{
  min-height:100vh;
  padding: 26px 18px;
}

.parametre-shell{
  max-width: 1480px;
  margin: 0 auto;
}

/* topbar */
.parametre-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;

  padding: 14px 14px;
  background: rgba(255,255,255,.65);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.parametre-brand{
  display:flex;
  align-items:center;
  gap:10px;
  min-width: 220px;
}

.parametre-logo{
  width:38px;
  height:38px;
  border-radius: 14px;
  display:grid;
  place-items:center;

  background: linear-gradient(135deg, var(--primary), var(--primary2));
  color:#fff;
  font-weight:900;

  box-shadow: 0 10px 22px rgba(123,77,255,.25);
}

.parametre-brandName{
  font-weight: 900;
  color: var(--text);
}

.parametre-search{
  flex: 1;
  display:flex;
  align-items:center;
  gap:10px;

  background: rgba(255,255,255,.90);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px 12px;

  max-width: 560px;
}

.parametre-searchIcon{ opacity:.65; }

.parametre-search input{
  width:100%;
  border:none;
  outline:none;
  background: transparent;
  color: var(--text);
}

.parametre-btnPrimary{
  border:none;
  padding: 10px 16px;
  border-radius: 14px;
  font-weight: 900;
  color:#fff;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  box-shadow: 0 14px 28px rgba(123,77,255,.25);
}
.parametre-btnPrimary:hover{ filter: brightness(1.02); }

/* =========================================================
   HERO CARD (parametre-*)
   ========================================================= */
.parametre-heroCard{
  margin-top: 16px;
  background: rgba(255,255,255,.65);
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow:hidden;
  box-shadow: var(--shadow);
}

.parametre-heroMedia{
  position: relative;
  height: 360px;
  background-size: cover;
  background-position: center;
}

.parametre-heroOverlay{
  position:absolute;
  inset:0;
  background:
    radial-gradient(1200px 500px at 30% 20%, rgba(123,77,255,.20), transparent 60%),
    linear-gradient(180deg, rgba(0,0,0,.10), rgba(0,0,0,.35));
}

.parametre-heroContent{
  position:absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  color:#fff;
}

.parametre-heroTitle{
  margin: 0 0 10px;
  font-size: 46px;
  line-height: 1.05;
  letter-spacing: .2px;
  text-shadow: 0 12px 30px rgba(0,0,0,.35);
}

/* badges sous le titre */
.parametre-heroBadges{
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.parametre-badge{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;

  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.18);
  color:#fff;
  font-weight: 800;
  font-size: 13px;

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.parametre-badgeBtn{
  background: rgba(123,77,255,.35);
  border-color: rgba(255,255,255,.22);
}

.parametre-heroTags{
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
}

.parametre-tag{
  display:inline-flex;
  align-items:center;
  padding: 8px 12px;
  border-radius: 999px;

  background: rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.14);
  color:#fff;
  font-weight: 700;
  font-size: 13px;
}

/* =========================================================
   PAGE CONTENT (param-*)
   ========================================================= */
.param-page{
  margin-top: 16px;
}

/* filters row */
.param-filters{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin: 10px 2px 18px;
}

.param-pill{
  border: 1px solid var(--border);
  background: rgba(255,255,255,.65);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 999px;
  display:flex;
  align-items:center;
  gap: 8px;
  box-shadow: 0 10px 24px rgba(30,10,70,.07);
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.param-pill:hover{ transform: translateY(-1px); }
.param-pill.is-active{
  background: rgba(123,77,255,.14);
  border-color: rgba(123,77,255,.35);
}

/* ====== Layout : 2 colonnes (gauche large + sidebar droite) ====== */
.param-main{
  display:grid;
  grid-template-columns: minmax(760px, 1fr) 360px;
  gap: 24px;
  align-items:start;
}
.param-col,
.param-sidebar{
  min-width: 0;
}
.param-sidebar{
  position: sticky;
  top: 18px;
  align-self: start;
}

/* Si ton ancien markup injecte une colonne vide, on la cache */
.param-main > .param-col:nth-child(2){
  display:none;
}

/* =========================================================
   CARDS (param-card)
   ========================================================= */
.param-card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow:hidden;
}

/* Important: le dropdown ingrédients ne doit pas être "coupé" */
.param-card{ overflow: visible; }

.param-card__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;

  padding: 14px 16px;
  border-bottom: 1px solid var(--border-2);
  background: rgba(255,255,255,.40);
}

.param-card__title{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.param-card__title h2{
  margin:0;
  font-size: 1.05rem;
  font-weight: 900;
}

.param-icon{
  width:30px;
  height:30px;
  border-radius: 12px;
  display:grid;
  place-items:center;
  background: rgba(123,77,255,.14);
  color: var(--primary);
  font-weight: 900;
}

.param-icon-btn{
  border:none;
  background: transparent;
  width:34px;
  height:34px;
  border-radius: 12px;
  display:grid;
  place-items:center;
  color: rgba(31,26,42,.55);
  transition: background .12s ease;
}
.param-icon-btn:hover{
  background: rgba(123,77,255,.10);
}

/* =========================================================
   Search + results (tes classes)
   ========================================================= */
.tc-inline-search{
  position: relative;
  padding: 14px 16px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Icône loupe */
.tc-inline-search .tc-muted{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;

  background: rgba(123,77,255,.10);
  border: 1px solid rgba(120,80,200,.14);
  color: rgba(31,26,42,.70);
}

/* Input */
.tc-inline-search input[type="search"],
.tc-inline-search .chercheIngredient{
  height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  width: 100%;

  border: 1px solid rgba(120,80,200,.18);
  background: rgba(255,255,255,.92);
  outline: none;

  transition: box-shadow .15s ease, border-color .15s ease, transform .10s ease;
}

.tc-inline-search input[type="search"]::placeholder{
  color: rgba(31,26,42,.50);
  font-weight: 700;
}

.tc-inline-search input[type="search"]:focus{
  border-color: rgba(123,77,255,.50);
  box-shadow: 0 0 0 4px rgba(123,77,255,.16);
  background: #fff;
}

.tc-inline-search input[type="search"]:active{
  transform: translateY(0.5px);
}

/* Dropdown résultats */
#resultatsIngredients.results{
  margin: 0 16px 14px;
  padding: 10px;

  border-radius: 16px;
  border: 1px solid rgba(120,80,200,.16);

  background: rgba(255,255,255,.96);
  box-shadow: 0 18px 50px rgba(40,20,80,.12);

  max-height: 320px;
  overflow: auto;

  display: none;
}
#resultatsIngredients.results:has(li){
  display: block;
}
#resultatsIngredients.results ul{
  list-style: none;
  margin: 0;
  padding: 0;
}
#resultatsIngredients.results li{
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 10px 10px;
  border-radius: 14px;
  cursor: pointer;

  transition: background .12s ease, transform .10s ease;
}
#resultatsIngredients.results li:hover{
  background: rgba(123,77,255,.08);
  transform: translateY(-1px);
}
#resultatsIngredients.results li + li{ margin-top: 6px; }
#resultatsIngredients.results li a{
  color: inherit;
  text-decoration: none;
  font-weight: 850;
  display: block;
  width: 100%;
}
#resultatsIngredients.results li .tag{
  margin-left: auto;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(123,77,255,.10);
  border: 1px solid rgba(123,77,255,.18);
  color: rgba(66,36,140,.95);
}

#resultatsIngredients.results::-webkit-scrollbar{ width: 10px; }
#resultatsIngredients.results::-webkit-scrollbar-thumb{
  background: rgba(120,80,200,.22);
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,.85);
}
#resultatsIngredients.results::-webkit-scrollbar-track{ background: transparent; }

#resultatsIngredients.results.is-loading{
  display: block;
  opacity: .9;
}
#resultatsIngredients.results.is-loading::before{
  content: "Recherche…";
  display: block;
  font-weight: 900;
  color: rgba(31,26,42,.65);
  padding: 10px 8px;
}
#resultatsIngredients.results.is-empty{
  display: block;
}
#resultatsIngredients.results.is-empty::before{
  content: "Aucun résultat";
  display: block;
  font-weight: 900;
  color: rgba(31,26,42,.55);
  padding: 10px 8px;
}

/* =========================================================
   TABLE (ingredientTable)
   ========================================================= */
.param-split{ padding: 14px 16px 16px; }

.param-pane__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.param-pane__head h3{
  margin:0;
  font-size: 1.0rem;
  font-weight: 900;
}

.param-table-wrap{
  overflow:auto;
  border-radius: 14px;
  border: 1px solid rgba(120,80,200,.12);
  background: rgba(255,255,255,.60);
}

.param-table{
  width:100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 760px;
}

.param-table thead th{
  position: sticky;
  top: 0;
  z-index: 1;

  background: rgba(245,240,255,.92);
  border-bottom: 1px solid rgba(120,80,200,.14);

  padding: 12px 12px;
  text-align:left;
  font-size: .92rem;
  white-space: nowrap;
}

.param-table tbody td{
  padding: 12px 12px;
  border-bottom: 1px solid rgba(120,80,200,.10);
  background: rgba(255,255,255,.55);
  vertical-align: middle;
}

.param-table tbody tr:hover td{
  background: rgba(123,77,255,.06);
}

.param-table a{
  color: var(--primary);
  font-weight: 800;
  text-decoration:none;
}
.param-table a:hover{ text-decoration: underline; }

/* image column */
.imageColumn{ width: 92px; }

.ingredientImageWrapper{
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  overflow:hidden;
  border: 1px solid rgba(120,80,200,.14);
  background: rgba(123,77,255,.10);
}

.ingredientAvatar{
  width:100%;
  height:100%;
  object-fit: cover;
}

.editOverlay{
  position:absolute;
  inset:auto 8px 8px 8px;
  padding: 6px 8px;
  border-radius: 12px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(120,80,200,.14);
  font-size: .82rem;
  text-align:center;
  display:none;
}
.ingredientImageWrapper:hover .editOverlay{ display:block; }

/* select */
.selectPreparation{
  width: 100%;
  min-width: 170px;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid rgba(120,80,200,.18);
  background: rgba(255,255,255,.92);
  outline:none;
}
.selectPreparation:focus{
  border-color: rgba(123,77,255,.45);
  box-shadow: var(--focus);
}

.js-gramme-valeur{ font-weight: 800; }

.btnDelete{
  color:#b00020 !important;
  font-weight: 900;
}

/* =========================================================
   STEPS
   ========================================================= */
.param-steps{
  padding: 14px 16px 16px;
  display:flex;
  flex-direction:column;
  gap: 12px;
}

.step-card{
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(120,80,200,.12);
  border-radius: 18px;
  padding: 14px 14px 12px;
  box-shadow: 0 10px 24px rgba(30,10,70,.06);
}

.step-card-body{
  display:flex;
  flex-direction:column;
  gap: 10px;
}

.step-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
}

.step-number{ font-weight: 900; }

.step-text{
  color: rgba(31,26,42,.78);
  line-height: 1.5;
}

.step-controls{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;

  padding-top: 8px;
  border-top: 1px solid rgba(120,80,200,.10);
}

.sp-play{
  border: 1px solid rgba(120,80,200,.18);
  background: rgba(255,255,255,.70);
  padding: 10px 12px;
  border-radius: 14px;
  font-weight: 900;
  transition: transform .12s ease, background .12s ease;
}
.sp-play:hover{
  transform: translateY(-1px);
  background: rgba(123,77,255,.08);
}

.sp-status{
  color: var(--muted);
  font-weight: 900;
}

/* add step button */
.option-btn{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding: 10px 14px;
  background: rgba(255,255,255,.70);
  color: var(--text);
  border: 1px solid rgba(120,80,200,.18);
  border-radius: 14px;
  font-weight: 900;
  white-space: nowrap;
  transition: transform .12s ease, background .12s ease;
}
.option-btn:hover{
  transform: translateY(-1px);
  background: rgba(123,77,255,.08);
}

/* =========================================================
   SIDEBAR / COMPARTIMENTS
   ========================================================= */
.param-phone{
  background: rgba(255,255,255,.65);
  border: 1px solid rgba(120,80,200,.14);
  border-radius: 22px;
  box-shadow: 0 12px 34px rgba(30,10,70,.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 14px;
}

.param-mini h4{
  margin:0 0 12px;
  font-size: 1.0rem;
  font-weight: 900;
}

.param-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;

  padding: 12px 12px;
  border-radius: 16px;
  background: rgba(255,255,255,.70);
  border: 1px solid rgba(120,80,200,.12);
}

.param-more{ opacity:.6; }

/* =========================================================
   ✅ INFOS RECETTE (nouvelle carte)
   ========================================================= */
.param-muted{
  color: var(--muted);
  font-weight: 800;
}

.param-card hr{
  border: none;
  height: 1px;
  background: rgba(120,80,200,.12);
  margin: 12px 0;
}

/* chips matériel (réutilise l’esthétique des tags) */
.param-chip{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(120,80,200,.14);
  background: rgba(255,255,255,.70);
  font-weight: 900;
  color: rgba(31,26,42,.80);
}
.param-chip button{
  border: none;
  background: transparent;
  font-weight: 900;
  opacity: .65;
}
.param-chip button:hover{ opacity: 1; }

/* segments difficulté dans Infos recette */
.param-segment{
  display:flex;
  gap: 8px;
  flex-wrap:wrap;
}
.param-segment .param-pill{
  padding: 9px 12px;
}

/* petites “stats” temps */
.param-time-grid{
  display:flex;
  gap: 10px;
  flex-wrap:wrap;
}
.param-time-grid .param-row{
  flex: 1;
  min-width: 180px;
  box-shadow: none;
}

/* =========================================================
   FORM CONTROLS (compat)
   ========================================================= */
.form-control{
  width:100%;
  border-radius: 14px;
  border: 1px solid rgba(120, 80, 200, .18);
  background: rgba(255,255,255,.92);
  padding: 11px 12px;
  outline:none;
  color: var(--text);
}
.form-control:focus{
  border-color: rgba(123,77,255,.45);
  box-shadow: var(--focus);
  background:#fff;
}

/* tc buttons used in sidebar */
.tc-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.70);
  color: var(--text);
  font-weight: 900;
  text-decoration:none;
  white-space: nowrap;
}
.tc-btn:hover{ transform: translateY(-1px); }

.tc-btn-primary{
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  color:#fff;
  border-color: transparent;
  box-shadow: 0 14px 28px rgba(123,77,255,.25);
}
.tc-btn-wide{ width:100%; }

.tc-stack{ display:flex; flex-direction:column; gap:10px; }
.tc-mt{ margin-top: 12px; }

/* =========================================================
   POST BUTTONS
   ========================================================= */
.post-button{
  width:100%;
  border:none;
  padding: 14px 16px;
  border-radius: 18px;
  font-weight: 900;
  color:#fff;
  background: linear-gradient(135deg, var(--primary), #4f46e5);
  box-shadow: 0 16px 30px rgba(90, 70, 220, 0.25);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.post-button:hover{
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(90, 70, 220, 0.30);
}
.post-button:active{
  transform: translateY(0);
  box-shadow: 0 12px 24px rgba(90, 70, 220, 0.22);
}
.post-button:disabled{
  opacity:.7;
  cursor:not-allowed;
}

/* =========================================================
   MODALES (compat)
   ========================================================= */
body.modal-open{ overflow:hidden; }

/* ---------- Overlay Étape (#etapeOverlay) ---------- */
#etapeOverlay{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition: opacity .18s ease, visibility .18s ease;
}
#etapeOverlay.is-open{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}

/* ---------- Étape modal (#etapeModal) ---------- */
#etapeModal.tc-modal.etape-modal{
  position: fixed;
  inset:0;
  z-index: 9999;

  display:flex;
  align-items:center;
  justify-content:center;

  padding: 18px;
  background: rgba(20, 14, 30, 0.55);

  opacity:0;
  visibility:hidden;
  pointer-events:none;

  transition: opacity .2s ease, visibility .2s ease;
}
#etapeModal.tc-modal.etape-modal.is-open{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}
#etapeModal .tc-modal__card.etape-modal__card{
  width: min(680px, 100%);
  max-height: 90vh;
  overflow:auto;

  background: var(--card-strong);
  border-radius: 22px;
  border: 1px solid rgba(120,60,200,.15);
  box-shadow: 0 25px 70px rgba(0,0,0,.25);

  padding: 20px 20px 18px;
  position: relative;

  transform: translateY(8px);
  transition: transform .2s ease;
}
#etapeModal.is-open .tc-modal__card.etape-modal__card{
  transform: translateY(0);
}
#etapeModal .tc-modal__close{
  position:absolute;
  top: 14px;
  right: 14px;

  width: 42px;
  height: 42px;

  border:none;
  border-radius: 14px;

  background: rgba(120, 80, 255, 0.12);
  color: #3d2663;

  font-size: 22px;
  font-weight: 900;
  line-height: 1;

  display:flex;
  align-items:center;
  justify-content:center;

  transition: transform .15s ease, background .15s ease;
}
#etapeModal .tc-modal__close:hover{
  background: rgba(120, 80, 255, 0.18);
  transform: scale(1.04);
}

#etapeModal .etape-modal__header{
  padding-right: 55px;
  margin-bottom: 14px;
}
#etapeModal .etape-modal__badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  background: rgba(120, 80, 255, 0.12);
  color: #6a38c2;
  margin-bottom: 8px;
}
#etapeModal .etape-modal__title{
  margin:0;
  font-size: 20px;
  font-weight: 900;
  color: #1f1633;
}
#etapeModal .etape-modal__subtitle{
  margin-top:6px;
  margin-bottom:0;
  font-size:14px;
  line-height:1.4;
  color: rgba(31, 22, 51, 0.7);
}

#etapeCreation .tc-stack{
  display:flex;
  flex-direction:column;
  gap:12px;
}

#etapeContenu.form-control{
  min-height: 120px;
  resize: vertical;
  border-radius: 18px;
  padding: 14px 14px;
  background: rgba(120, 80, 255, 0.04);
}
#etapeContenu.form-control:focus{ background:#fff; }

.erreurEtape{
  font-size: 13px;
  font-weight: 900;
  color: #c92a2a;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(201, 42, 42, 0.08);
  border: 1px solid rgba(201, 42, 42, 0.18);
  display:none;
}
.erreurEtape:not(:empty){ display:block; }

.loaderEtape{ display:flex; justify-content:center; align-items:center; }
.loaderEtape img{ width:42px; height:42px; opacity:.85; }

/* ---------- Modal Parametre (#modalParametre) ---------- */
.modalParametre{
  position: fixed;
  inset:0;
  display:grid;
  place-items:center;
  padding: 18px;
  background: rgba(20, 10, 40, .38);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition: opacity .18s ease, visibility .18s ease;
  z-index: 10001;
}
.modalParametre.is-open,
.modalParametre[aria-hidden="false"],
.modalParametre[style*="display: block"]{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}

.modalParametreContent{
  position: relative;
  width: min(520px, 100%);
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(120, 80, 200, .16);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(40,20,80,.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 18px 16px 16px;

  transform: translateY(10px) scale(.99);
  transition: transform .18s ease;
}
.modalParametre.is-open .modalParametreContent,
.modalParametre[aria-hidden="false"] .modalParametreContent,
.modalParametre[style*="display: block"] .modalParametreContent{
  transform: translateY(0) scale(1);
}

.modalParametreContent h2{
  margin: 0 44px 14px 0;
  font-size: 1.1rem;
  font-weight: 900;
}

.closeParametre{
  position:absolute;
  top:10px;
  right:10px;
  width:38px;
  height:38px;
  border-radius:14px;
  display:grid;
  place-items:center;
  border: 1px solid rgba(123,77,255,.18);
  background: rgba(123,77,255,.10);
  color: rgba(31,26,42,.75);
  font-size:22px;
  line-height:1;
}
.closeParametre:hover{
  background: rgba(123,77,255,.16);
  transform: scale(1.02);
}

#parametreForm{
  display:flex;
  flex-direction:column;
  gap:10px;
}
#parametreForm label{
  font-weight: 900;
  color: rgba(31,26,42,.85);
  font-size: .95rem;
}
#parametreForm select{
  width:100%;
  border-radius: 14px;
  border: 1px solid rgba(120, 80, 200, .18);
  background: rgba(255,255,255,.92);
  padding: 11px 12px;
  outline:none;
}
#parametreForm select:focus{
  border-color: rgba(123,77,255,.45);
  box-shadow: var(--focus);
}

.erreurType{
  min-height: 18px;
  color:#b00020;
  font-weight: 900;
}

#loaderType{
  display:flex;
  justify-content:center;
  align-items:center;
}
#loaderType img{ width:28px; height:28px; }

.submitType input[type="submit"]{
  width:100%;
  border:none;
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 900;
  color:#fff;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  box-shadow: 0 14px 28px rgba(123,77,255,.25);
}
.submitType input[type="submit"]:hover{ filter: brightness(1.02); }

/* ---------- Quantité modal (qtyOverlay/qtyModal) ---------- */
#qtyOverlay{
  position: fixed;
  inset:0;
  background: rgba(20, 10, 40, .38);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition: opacity .18s ease, visibility .18s ease;
  z-index: 9998;
}

#qtyModal{
  position: fixed;
  inset:0;
  display:grid;
  place-items:center;
  padding: 18px;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform: translateY(8px);
  transition: opacity .18s ease, visibility .18s ease, transform .18s ease;
  z-index: 9999;
}
#qtyOverlay.is-open{ opacity:1; visibility:visible; pointer-events:auto; }
#qtyModal.is-open,
#qtyModal[aria-hidden="false"]{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transform: translateY(0);
}

/* ✅ compat : ancien CSS qty-modal__card + nouveau tc-qty__card */
.qty-modal__card,
.tc-qty__card{
  position: relative;
  width: min(560px, 100%);
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(120, 80, 200, .16);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(40,20,80,.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 16px 16px 14px;
}

/* ✅ compat : ancien CSS qty-modal__close + nouveau tc-qty__close */
.qty-modal__close,
.tc-qty__close{
  position:absolute;
  top:10px;
  right:10px;
  width:38px;
  height:38px;
  border-radius:14px;
  border: 1px solid rgba(123,77,255,.18);
  background: rgba(123,77,255,.10);
  color: rgba(31,26,42,.75);
  font-size:22px;
  line-height:1;
  display:grid;
  place-items:center;
}
.qty-modal__close:hover,
.tc-qty__close:hover{
  background: rgba(123,77,255,.16);
  transform: scale(1.02);
}

/* ---------- Modal Temps (#modalTemps) ---------- */
#modalTemps.tc-modal{
  position: fixed;
  inset:0;
  z-index: 10000;

  display:flex;
  align-items:center;
  justify-content:center;

  padding: 18px;
  background: rgba(20, 14, 30, 0.55);

  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition: opacity .2s ease, visibility .2s ease;
}
#modalTemps.tc-modal.is-open,
#modalTemps.tc-modal[aria-hidden="false"]{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}

#modalTemps .tc-modal__card{
  width: min(620px, 100%);
  max-height: 90vh;
  overflow:auto;
  background: var(--card-strong);
  border-radius: 22px;
  border: 1px solid rgba(120,60,200,.15);
  box-shadow: 0 25px 70px rgba(0,0,0,.25);
  padding: 20px 20px 18px;
  position: relative;
  transform: translateY(8px);
  transition: transform .2s ease;
}
#modalTemps.is-open .tc-modal__card,
#modalTemps[aria-hidden="false"] .tc-modal__card{
  transform: translateY(0);
}

#modalTemps .tc-modal__close{
  position:absolute;
  top:14px;
  right:14px;
  width:42px;
  height:42px;
  border:none;
  border-radius:14px;
  background: rgba(120, 80, 255, 0.12);
  color: #3d2663;
  font-size:22px;
  font-weight:900;
  display:flex;
  align-items:center;
  justify-content:center;
}

.time-input-group{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap: wrap;
}
.time-input-group span{
  font-weight: 900;
  color: rgba(31,26,42,.55);
}
.time-input{ max-width: 160px; }

/* ===============================
   OVERRIDE FINAL
   =============================== */
.param-page .param-main{
  display: grid !important;
  grid-template-columns: minmax(860px, 1fr) 380px !important;
  gap: 24px !important;
  align-items: start !important;
}

.param-page .param-main > .param-col:first-child{ grid-column: 1 !important; }
.param-page .param-main > .param-sidebar{
  grid-column: 2 !important;
  position: sticky;
  top: 18px;
  align-self: start;
}

.param-page .param-main > .param-col:nth-child(2){ display: none !important; }

.param-page .param-main > .param-col,
.param-page .param-main > .param-sidebar{ min-width: 0; }



/* Overlay */
body.modal-open { overflow: hidden; }

.tc-qty__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 9998;
}

/* Modal wrapper */
.tc-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 9999;
}

/* Card */
.tc-modal__card {
  width: min(620px, 100%);
  max-height: min(80vh, 720px);
  overflow: auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 10px 40px rgba(0,0,0,.25);
  position: relative;
  padding: 18px 18px 16px;
}

/* Close button */
.tc-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

/* Header layout */
.tc-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-right: 52px; /* laisse la place à la croix */
}

.tc-modal__titleRow {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tc-modal__title { margin: 0; }
.tc-modal__subtitle { margin: 8px 0 0; }

.tc-modal__body { margin-top: 14px; }


/* =========================================================
   MODALE MATÉRIEL (scopée)
   IDs attendus : #equipmentOverlay, #equipmentModal
   ========================================================= */

/* Empêche le scroll derrière la modale */
body.modal-open {
  overflow: hidden;
}

/* ---------- Overlay ---------- */
#equipmentOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 9998;
}

/* ---------- Wrapper modal (centrage) ---------- */
#equipmentModal {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 18px;
}

/* ---------- Carte ---------- */
#equipmentModal .tc-modal__card {
  width: min(720px, 100%);
  max-height: min(82vh, 760px);
  overflow: auto;

  background: #fff;
  border-radius: 18px;
  box-shadow: 0 18px 55px rgba(0,0,0,.25);

  position: relative;
  padding: 18px 18px 16px;
}

/* Scrollbar (optionnel, discret) */
#equipmentModal .tc-modal__card::-webkit-scrollbar {
  width: 10px;
}
#equipmentModal .tc-modal__card::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,.14);
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,.65);
}
#equipmentModal .tc-modal__card::-webkit-scrollbar-track {
  background: transparent;
}

/* ---------- Close button ---------- */
#equipmentModal .tc-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;

  width: 42px;
  height: 42px;

  display: grid;
  place-items: center;

  border: none;
  background: transparent;
  border-radius: 999px;

  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}

#equipmentModal .tc-modal__close:hover {
  background: rgba(0,0,0,.06);
}

#equipmentModal .tc-modal__close:active {
  background: rgba(0,0,0,.10);
}

/* Focus visible propre */
#equipmentModal .tc-modal__close:focus-visible {
  outline: 2px solid rgba(0,0,0,.35);
  outline-offset: 2px;
  border-radius: 999px;
}

/* ---------- Header (si tu utilises tc-modal__header) ---------- */
#equipmentModal .tc-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-right: 52px; /* place pour la croix */
}

#equipmentModal .tc-modal__titleRow {
  display: flex;
  align-items: center;
  gap: 10px;
}

#equipmentModal .tc-modal__title {
  margin: 0;
}

#equipmentModal .tc-modal__subtitle {
  margin: 8px 0 0;
}

/* ---------- Body ---------- */
#equipmentModal .tc-modal__body {
  margin-top: 14px;
}

/* ---------- Champ recherche ---------- */
#equipmentModal .tc-inline-search {
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 10px 12px;
  border-radius: 14px;

  background: rgba(0,0,0,.03);
  border: 1px solid rgba(0,0,0,.08);
}

#equipmentModal .tc-inline-search .tc-muted {
  opacity: .75;
}

#equipmentModal #equipmentSearchInput.form-control {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  outline: none;
  padding: 6px 0;
}

/* Si ton .form-control met un border, on neutralise dans la modale */
#equipmentModal #equipmentSearchInput.form-control:focus {
  box-shadow: none;
}

/* ---------- Cartes internes (Résultats / Dans la recette) ---------- */
#equipmentModal .param-card {
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 16px;
  background: #fff;
}

/* Head interne */
#equipmentModal .param-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 12px 14px;
  border-bottom: 1px solid rgba(0,0,0,.06);
}

#equipmentModal .param-card__title {
  display: flex;
  align-items: center;
  gap: 10px;
}

#equipmentModal .param-card__head h2 {
  margin: 0;
  font-size: 16px;
}

/* ---------- Rows (items) ---------- */
#equipmentModal .param-row {
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(0,0,0,.02);
  border: 1px solid rgba(0,0,0,.06);
}

#equipmentModal .param-row + .param-row {
  margin-top: 10px;
}

#equipmentModal .param-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ---------- Boutons dans la modale ---------- */
#equipmentModal .tc-btn {
  border-radius: 12px;
}

/* Bouton "Ajouter" un peu plus compact */
#equipmentModal .tc-btn.tc-btn-primary {
  padding: 10px 12px;
}

/* Bouton "Retirer" plus neutre */
#equipmentModal .tc-btn.js-eq-remove {
  background: rgba(0,0,0,.06);
  border: 1px solid rgba(0,0,0,.08);
}

#equipmentModal .tc-btn.js-eq-remove:hover {
  background: rgba(0,0,0,.10);
}

/* ---------- Erreur + loader ---------- */
#equipmentModal #equipmentError {
  color: #b00020;
  font-size: 14px;
}

#equipmentModal #equipmentLoader img {
  display: inline-block;
  width: 26px;
  height: 26px;
}

/* ---------- Animation (optionnel via .is-open) ---------- */
#equipmentOverlay.is-open {
  animation: eqFadeIn 140ms ease-out both;
}

#equipmentModal.is-open .tc-modal__card {
  animation: eqPopIn 160ms ease-out both;
}

@keyframes eqFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes eqPopIn {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- Responsive ---------- */
@media (max-width: 520px) {
  #equipmentModal {
    padding: 10px;
  }

  #equipmentModal .tc-modal__card {
    padding: 14px 14px 12px;
    border-radius: 14px;
    max-height: 88vh;
  }

  #equipmentModal .tc-modal__close {
    top: 8px;
    right: 8px;
    width: 40px;
    height: 40px;
  }

  #equipmentModal .tc-inline-search {
    padding: 10px;
    border-radius: 12px;
  }

  #equipmentModal .param-card__head {
    padding: 10px 12px;
  }
}
/* ===== TOOLBAR (filtres + actions) ===== */
.param-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;

  padding:14px 16px;
  margin: 0 0 18px;

  border-radius:18px;
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(124,92,255,.18);
  box-shadow: 0 18px 50px rgba(0,0,0,.08);
  backdrop-filter: blur(10px);
}

/* groupes gauche/droite */
.param-toolbar__left,
.param-toolbar__right{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:nowrap;
}

/* évite que le bloc gauche écrase tout */
.param-toolbar__left{
  min-width: 0;
  overflow:auto;
  scrollbar-width: none;
}
.param-toolbar__left::-webkit-scrollbar{ display:none; }

/* ===== Pills (tu gardes ta classe param-pill) ===== */
.param-pill{
  border: 1px solid rgba(124,92,255,.16);
  background: rgba(255,255,255,.75);
  padding:10px 12px;
  border-radius:999px;
  cursor:pointer;
  font-weight:700;
  font-size:13px;

  transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
}

.param-pill:hover{
  transform: translateY(-1px);
  background: rgba(124,92,255,.10);
  box-shadow: 0 10px 22px rgba(124,92,255,.15);
}

/* ===== Boutons actions (tc-btn / option-btn) ===== */
.param-toolbar__right .tc-btn,
.param-toolbar__right .option-btn{
  border-radius: 14px;
  height: 40px;
  padding: 0 14px;
  font-weight: 800;

  transition: transform .14s ease, box-shadow .14s ease;
}

.param-toolbar__right .tc-btn:hover,
.param-toolbar__right .option-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(0,0,0,.12);
}

/* Le gros bouton "Ajouter une étape" un peu plus visible */
.param-toolbar__right .option-btn{
  background: rgba(124,92,255,.12);
  border: 1px solid rgba(124,92,255,.20);
}
/* =========================================================
   MODALE UPLOAD PHOTO ÉTAPE (CSS COMPLET)
   Classes:
   - .etapePhoto-overlay
   - .etapePhoto-modal
   - .etapePhoto-card
   - .etapePhoto-*
========================================================= */

:root{
  --ep-bg: rgba(0,0,0,.45);
  --ep-card: rgba(255,255,255,.92);
  --ep-border: rgba(122,92,255,.18);
  --ep-accent: #7a5cff;
  --ep-accent2: #9e8bff;
  --ep-text: #1f1f2e;
  --ep-muted: rgba(31,31,46,.62);
  --ep-shadow: 0 22px 48px rgba(40, 18, 120, 0.18);
  --ep-radius: 26px;
}

/* Overlay */
.etapePhoto-overlay{
  position: fixed;
  inset: 0;
  background: var(--ep-bg);
  z-index: 9998;
}

/* Modal wrapper */
.etapePhoto-modal{
  position: fixed;
  inset: 0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 18px;
  z-index: 9999;
}

/* Card */
.etapePhoto-card{
  width: min(560px, 100%);
  background: var(--ep-card);
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius);
  box-shadow: var(--ep-shadow);
  backdrop-filter: blur(12px);
  overflow:hidden;
  position: relative;
}

/* Close btn */
.etapePhoto-close{
  position:absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(122,92,255,.20);
  background: rgba(122,92,255,.10);
  color: var(--ep-text);
  font-size: 24px;
  line-height: 1;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}
.etapePhoto-close:hover{ background: rgba(122,92,255,.14); }

/* Header */
.etapePhoto-header{
  padding: 22px 22px 14px;
  text-align:center;
}
.etapePhoto-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .6px;
  background: rgba(122,92,255,.14);
  border: 1px solid rgba(122,92,255,.20);
  color: var(--ep-text);
}
.etapePhoto-title{
  margin: 10px 0 6px;
  font-size: 22px;
  color: var(--ep-text);
}
.etapePhoto-subtitle{
  margin: 0;
  font-size: 14px;
  color: var(--ep-muted);
}

/* Form padding */
#form-photoEtape{
  padding: 0 22px 18px;
}

/* Dropzone */
.etapePhoto-drop{
  margin-top: 12px;
}
.etapePhoto-drop input[type="file"]{
  position:absolute;
  left:-9999px;
  width:1px;
  height:1px;
  overflow:hidden;
}
.etapePhoto-dropLabel{
  width:100%;
  min-height: 96px;
  border-radius: 18px;
  border: 2px dashed rgba(122,92,255,.35);
  background: rgba(122,92,255,.07);
  display:flex;
  align-items:center;
  gap: 14px;
  padding: 16px;
  cursor:pointer;
  transition: transform .08s ease, background .15s ease, border-color .15s ease;
}
.etapePhoto-dropLabel:hover{
  background: rgba(122,92,255,.10);
  border-color: rgba(122,92,255,.55);
  transform: translateY(-1px);
}
.etapePhoto-dropIcon{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255,255,255,.7);
  border: 1px solid rgba(122,92,255,.20);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 20px;
}
.etapePhoto-dropText strong{
  display:block;
  font-size: 15px;
  color: var(--ep-text);
  font-weight: 900;
}
.etapePhoto-dropText span{
  display:block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--ep-muted);
}

/* Preview */
.etapePhoto-previewWrap{
  margin-top: 14px;
  display:flex;
  justify-content:center;
}
.etapePhoto-preview{
  width: min(320px, 100%);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(122,92,255,.18);
  box-shadow: 0 14px 30px rgba(40,18,120,.14);
}

/* Message */
.etapePhoto-message{
  margin-top: 12px;
  text-align:center;
  font-size: 14px;
  color: var(--ep-text);
}
.etapePhoto-message #error{
  margin: 0;
  color: #b00020;
  font-weight: 800;
}

/* Loader */
.etapePhoto-loader{
  margin-top: 10px;
  display:flex;
  justify-content:center;
}
.etapePhoto-loader img{
  width: 34px;
  height: 34px;
}

/* Actions */
.etapePhoto-actions{
  margin-top: 14px;
  display:flex;
  gap: 12px;
  justify-content:space-between;
}
.etapePhoto-cancel,
.etapePhoto-submit{
  border-r

/* ===== Responsive ===== */
@media (max-width: 860px){
  .param-toolbar{
    flex-direction: column;
    align-items: stretch;
  }
  .param-toolbar__right{
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1060px){
  .param-main{ grid-template-columns: 1fr 1fr; }
  .param-sidebar{ grid-column: 1 / -1; position: static; }
}

@media (max-width: 760px){
  .parametre-topbar{ flex-wrap:wrap; }
  .parametre-brand{ min-width: unset; }
  .parametre-search{ order: 3; max-width:100%; width:100%; }
  .param-main{ grid-template-columns: 1fr; }
  .param-table{ min-width: 680px; }
  .parametre-heroTitle{ font-size: 34px; }
  .parametre-heroMedia{ height: 300px; }
}

@media (max-width: 520px){
  .parametre-heroMedia{ height: 260px; }
  .parametre-heroTitle{ font-size: 28px; }
  .param-card__head{ padding: 12px 12px; }
  .param-split{ padding: 12px 12px 14px; }
  .param-steps{ padding: 12px 12px 14px; }

  #etapeModal .tc-modal__card.etape-modal__card,
  #modalTemps .tc-modal__card{
    padding: 16px;
    border-radius: 18px;
  }
}
