/* ================= PAGE CONFIGURATEUR =================
   Disposition calquée sur l'app d'origine :
   machine fixe à gauche, configuration scrollable à droite,
   barre de prix flottante en bas à droite. */

body:has(.cfgp) { background: #fff; }

.cfgp {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 1440px;
  margin: 0 auto;
}

/* --- Colonne gauche : la machine --- */
.cfgp__gauche {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 90px 40px 40px;
}
.cfgp__cadre { position: relative; display: flex; }
.cfgp__cadre img {
  max-height: 82vh;
  max-width: 100%;
  object-fit: contain;
}
/* Calque supérieur du fondu croisé : apparaît par-dessus l'image courante,
   puis se réinitialise sans transition une fois le fondu terminé. */
#cfg-calque {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}
#cfg-calque.est-visible {
  opacity: 1;
  transition: opacity 0.55s ease;
}

/* --- Colonne droite : la configuration --- */
.cfgp__droite {
  padding: 100px 64px 160px 32px;
  max-width: 560px;
}

.cfgp__titre {
  font-family: var(--f-corps);
  font-weight: 800;
  font-size: 46px;
  letter-spacing: -0.5px;
  text-align: center;
}
.cfgp__titre b { color: var(--terracotta); }

.cfgp__specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 22px 0 26px;
  text-align: center;
}
.cfgp__specs b { font-size: 19px; font-weight: 700; }
.cfgp__specs span { font-size: 12px; color: var(--gris); }
.cfgp__spec-label { font-size: 12.5px; color: #8a857e; margin-top: 3px; }

.cfgp__caracteristiques {
  border-top: 1.5px solid rgba(30, 31, 32, 0.1);
  border-bottom: 1.5px solid rgba(30, 31, 32, 0.1);
  padding: 4px 2px;
  margin-bottom: 10px;
}
.cfgp__caracteristiques summary {
  font-weight: 700;
  font-size: 15px;
  padding: 12px 4px;
  cursor: pointer;
  list-style: none;
  position: relative;
}
.cfgp__caracteristiques summary::after {
  content: '⌄';
  position: absolute;
  right: 8px;
  transition: transform 0.25s;
}
.cfgp__caracteristiques[open] summary::after { transform: rotate(180deg); }
.cfgp__caracteristiques ul { padding: 2px 4px 14px; display: grid; gap: 7px; }
.cfgp__caracteristiques li { font-size: 14px; color: var(--gris); padding-left: 16px; position: relative; }
.cfgp__caracteristiques li::before {
  content: '';
  position: absolute;
  left: 0; top: 8px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--terracotta);
}

/* --- Intitulés de sections (petites capitales grises) --- */
.cfgp__label {
  font-family: var(--f-corps);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #8a857e;
  margin: 30px 0 12px;
}

/* --- Cartes d'option empilées avec case à cocher --- */
.cfgp__groupe { display: flex; flex-direction: column; gap: 10px; }

.cfgp-opt {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1.5px solid rgba(30, 31, 32, 0.12);
  border-radius: 14px;
  padding: 15px 18px;
  font-family: var(--f-corps);
  font-size: 15px;
  font-weight: 500;
  color: var(--encre);
  cursor: pointer;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.cfgp-opt:hover { border-color: rgba(30, 31, 32, 0.35); }
.cfgp-opt.est-choisi {
  border-color: var(--terracotta);
  box-shadow: 0 10px 26px -16px rgba(237, 104, 65, 0.55);
}

.cfgp-opt__case {
  flex: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(30, 31, 32, 0.25);
  border-radius: 6px;
  background: #fff;
  position: relative;
  transition: background 0.2s, border-color 0.2s;
}
.cfgp-opt.est-choisi .cfgp-opt__case {
  background: var(--terracotta);
  border-color: var(--terracotta);
}
.cfgp-opt.est-choisi .cfgp-opt__case::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.cfgp-opt__texte { display: flex; flex-direction: column; gap: 2px; }
.cfgp-opt__nom { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.cfgp-opt__desc { font-size: 13.5px; color: var(--gris); font-weight: 400; }
.cfgp-opt__prix { margin-left: auto; font-weight: 800; white-space: nowrap; }
.cfgp-opt__badge {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: var(--peche);
  padding: 3px 9px 4px;
  border-radius: 99px;
}

/* --- Champs --- */
.cfgp__champ {
  width: 100%;
  border: 1.5px solid rgba(30, 31, 32, 0.12);
  border-radius: 14px;
  padding: 15px 18px;
  font-family: var(--f-corps);
  font-size: 15px;
  background: #fff;
  color: var(--encre);
}
.cfgp__champ::placeholder { color: #9a938c; }
.cfgp__champ:focus { outline: none; border-color: var(--terracotta); }

.cfgp__coordonnees {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.cfgp__select { grid-column: 1 / -1; appearance: none; }

/* --- Bloc sur-mesure --- */
.cfgp__surmesure {
  display: block;
  margin-top: 26px;
  background: var(--rose);
  border-radius: 14px;
  padding: 16px 18px;
  text-decoration: none;
  color: var(--encre);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cfgp__surmesure:hover { transform: translateY(-2px); }
.cfgp__surmesure p:first-child { font-size: 15px; margin-bottom: 3px; }
.cfgp__surmesure p:last-child { font-size: 13.5px; color: var(--gris); }

/* --- Barre de prix flottante (bas droite, comme l'original) --- */
.cfgp__total {
  position: fixed;
  right: 28px;
  bottom: 20px;
  width: min(544px, calc(100% - 56px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: #fff;
  border-radius: 18px;
  padding: 15px 22px;
  box-shadow: 0 24px 60px -20px rgba(30, 31, 32, 0.4), 0 4px 16px -6px rgba(30, 31, 32, 0.15);
  z-index: 60;
}
.cfgp__prix b {
  font-family: var(--f-corps);
  font-weight: 800;
  font-size: 27px;
  letter-spacing: -0.5px;
}
.cfgp__prix span { font-size: 15px; color: var(--gris); margin-left: 4px; }
.cfgp__note { font-size: 12.5px; color: var(--gris); margin-top: 1px; }
.cfgp__merci {
  font-family: var(--f-script);
  font-size: 24px;
  font-weight: 600;
  color: var(--terracotta);
  margin: 0 auto;
}

/* --- Responsive --- */
@media (max-width: 991px) {
  .cfgp { grid-template-columns: 1fr; }
  .cfgp__gauche {
    position: static;
    height: auto;
    padding: 100px 24px 0;
  }
  .cfgp__gauche img { max-height: 46vh; }
  .cfgp__droite {
    padding: 32px 24px 170px;
    max-width: 620px;
    margin: 0 auto;
  }
}
@media (max-width: 479px) {
  .cfgp__coordonnees { grid-template-columns: 1fr; }
  .cfgp__total { right: 14px; bottom: 12px; width: calc(100% - 28px); flex-wrap: wrap; }
}
