/* =========================================================================
   SOLEXAM — product-page.css (V01.001.25)
   Styles dédiés aux pages produit /produit/<brand>-<id>.html
   ========================================================================= */

.product-page-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px 64px;
}

/* ── BREADCRUMB ─────────────────────────────────────────────────────────── */
.product-page-breadcrumb {
  margin: 0 0 32px 0;
  font-size: 13px;
  color: var(--muted, #5A6478);
}
.product-page-breadcrumb ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.product-page-breadcrumb li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.product-page-breadcrumb li:not(:last-child)::after {
  content: '›';
  color: var(--muted, #5A6478);
  margin-left: 4px;
}
.product-page-breadcrumb a {
  color: var(--navy, #07142A);
  text-decoration: none;
  transition: color 0.2s;
}
.product-page-breadcrumb a:hover {
  color: var(--gold, #D4A830);
  text-decoration: underline;
}
.product-page-breadcrumb [aria-current="page"] {
  font-weight: 500;
  color: var(--navy, #07142A);
}

/* V01.001.27 — Bandeau d'arrivée depuis le wizard "Quel géotextile choisir" */
.product-page-wizard-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 24px 0;
  padding: 12px 16px;
  background: rgba(212, 168, 48, 0.08);
  border: 1px solid rgba(212, 168, 48, 0.4);
  border-left: 4px solid var(--gold, #D4A830);
  border-radius: 6px;
  font-size: 13px;
  color: var(--navy, #07142A);
  animation: wizBannerFade 0.3s ease;
}
@keyframes wizBannerFade {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.wizard-banner-icon {
  font-size: 20px;
  flex-shrink: 0;
}
.wizard-banner-text {
  flex: 1;
  line-height: 1.5;
}
.wizard-banner-text small {
  font-size: 11px;
  color: var(--muted, #5A6478);
  font-style: italic;
}
.wizard-banner-close {
  background: transparent;
  border: none;
  color: var(--muted, #5A6478);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.wizard-banner-close:hover {
  background: rgba(212, 168, 48, 0.15);
  color: var(--navy, #07142A);
}

/* ── HERO PRODUIT ───────────────────────────────────────────────────────── */
.product-page-hero {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 1.4fr;
  gap: 48px;
  margin-bottom: 64px;
  padding: 32px;
  background: var(--cream, #FAFAF7);
  border-radius: 16px;
  border: 1px solid #E5E2D5;
}
.product-page-hero-image {
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-page-hero-image img {
  width: 100%;
  height: auto;
  max-width: 480px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(7, 20, 42, 0.08);
}
.product-page-hero-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.product-page-brand-tag {
  display: inline-block;
  background: var(--brand-color, #1A4D2E);
  color: #fff;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 14px;
  letter-spacing: 1.5px;
  padding: 4px 12px;
  border-radius: 4px;
  width: fit-content;
}
.product-page-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
  margin: 0;
  color: var(--navy, #07142A);
}
.product-page-subtitle {
  font-size: 16px;
  color: var(--muted, #5A6478);
  margin: 0;
}
.product-page-subtitle strong {
  color: var(--navy, #07142A);
  font-size: 18px;
}
.product-page-certs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* V01.001.27 — Bandeau classe CFGG (sous le grammage, avant les certifs) */
.product-page-classe {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 4px 0;
  padding: 8px 12px;
  background: rgba(212, 168, 48, 0.08);
  border-left: 3px solid var(--gold, #D4A830);
  border-radius: 4px;
}
.product-page-classe .classe-badge-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.product-page-classe .classe-badge {
  display: inline-block;
  padding: 4px 10px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 14px;
  letter-spacing: 1px;
  border: 1px solid;
  border-radius: 3px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.product-page-classe .classe-badge-link:hover .classe-badge {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(7, 20, 42, 0.15);
}
.product-page-classe-meta {
  font-size: 13px;
  color: var(--muted, #5A6478);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.product-page-classe-norme {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--navy, #07142A);
  font-weight: 500;
  padding: 2px 6px;
  background: #fff;
  border-radius: 3px;
  border: 1px solid #E5E2D5;
}
.product-page-classe-usage {
  font-style: italic;
}
.product-cert-badge {
  display: inline-block;
  background: rgba(212, 168, 48, 0.15);
  color: #8B6914;
  font-weight: 600;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid rgba(212, 168, 48, 0.3);
}
.product-page-desc {
  margin: 8px 0;
  color: var(--muted, #5A6478);
  line-height: 1.6;
}

/* ── PRIX ───────────────────────────────────────────────────────────────── */
.product-page-price {
  background: #fff;
  padding: 16px 20px;
  border-radius: 8px;
  border: 1px solid #E5E2D5;
  margin: 8px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}
.product-page-price .price-label {
  font-size: 13px;
  color: var(--muted, #5A6478);
}
.product-page-price .price-value {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 36px;
  color: var(--gold, #D4A830);
  line-height: 1;
}
.product-page-price .price-unit {
  font-size: 13px;
  color: var(--muted, #5A6478);
}
.product-page-price .price-note {
  display: block;
  width: 100%;
  font-size: 11px;
  color: var(--muted, #5A6478);
  margin-top: 6px;
  font-style: italic;
}
.product-page-price-quote .price-value {
  font-size: 28px;
  color: var(--navy, #07142A);
}

/* ── BOUTONS CTA ────────────────────────────────────────────────────────── */
.product-page-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 8px 0;
}
.product-page-cta .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s;
  border: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.product-page-cta .btn-primary {
  background: var(--gold, #D4A830);
  color: var(--navy, #07142A);
}
.product-page-cta .btn-primary:hover {
  background: #B89028;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212, 168, 48, 0.3);
}
.product-page-cta .btn-secondary {
  background: transparent;
  color: var(--navy, #07142A);
  border-color: var(--navy, #07142A);
}
.product-page-cta .btn-secondary:hover {
  background: var(--navy, #07142A);
  color: #fff;
}

.product-page-back {
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted, #5A6478);
}
.product-page-back a {
  color: var(--navy, #07142A);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.product-page-back a:hover {
  border-bottom-color: var(--gold, #D4A830);
}

/* ── SECTIONS ───────────────────────────────────────────────────────────── */
.product-page-section {
  margin-bottom: 48px;
}
.product-page-section h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(22px, 3vw, 28px);
  color: var(--navy, #07142A);
  margin: 0 0 24px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gold, #D4A830);
  display: inline-block;
}
.product-page-section p {
  line-height: 1.7;
  color: #2A3441;
}
.product-tech-source {
  font-size: 13px;
  color: var(--muted, #5A6478);
  font-style: italic;
  margin-top: -16px;
  margin-bottom: 16px;
}

/* ── TABLEAU TECH ───────────────────────────────────────────────────────── */
.product-tech-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #E5E2D5;
}
.product-tech-table th,
.product-tech-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #F0EDE0;
  font-size: 14px;
}
.product-tech-table thead th {
  background: var(--navy, #07142A);
  color: #fff;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 13px;
  letter-spacing: 1px;
  font-weight: normal;
}
.product-tech-table tbody th {
  font-weight: 500;
  color: var(--muted, #5A6478);
  width: 40%;
}
.product-tech-table tbody td {
  color: var(--navy, #07142A);
}
.product-tech-table tbody tr:last-child th,
.product-tech-table tbody tr:last-child td {
  border-bottom: none;
}
.product-tech-norm {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--muted, #5A6478);
  width: 25%;
}

/* V01.001.26 — Liens vers les normes officielles ISO */
.norm-link {
  color: var(--navy, #07142A);
  text-decoration: none;
  border-bottom: 1px dotted var(--muted, #5A6478);
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}
.norm-link:hover,
.norm-link:focus {
  color: var(--gold, #D4A830);
  border-bottom-color: var(--gold, #D4A830);
}
.norm-icon {
  font-size: 9px;
  opacity: 0.6;
  margin-left: 1px;
  display: inline-block;
  vertical-align: super;
}

/* ──────────────────────────────────────────────────────────────────────── */
/* V01.001.27 — DRAWER DE CONFIGURATION (largeur / longueur / qty) sur     */
/* la page produit. Apparait au clic sur "Ajouter au devis".               */
/* ──────────────────────────────────────────────────────────────────────── */

.product-page-add-btn {
  cursor: pointer;
  border: none;
}
.product-page-add-btn.active {
  background: var(--navy, #07142A);
  color: #fff;
}
.product-page-add-btn.product-page-add-btn-success {
  background: #1A4D2E !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(26, 77, 46, 0.3);
}

.product-config-drawer {
  margin-top: 16px;
  padding: 20px;
  background: #FAFAF7;
  border: 1px solid #E5E2D5;
  border-radius: 8px;
  animation: configFadeIn 0.25s ease;
}
@keyframes configFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.product-config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  align-items: end;
}
.product-config-grid > .product-config-surface {
  grid-column: 1 / -1;
}
.product-config-grid > .product-config-actions {
  grid-column: 1 / -1;
}

.product-config-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.product-config-field label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted, #5A6478);
}

.product-config-select,
.product-config-custom-input {
  font-family: inherit;
  font-size: 14px;
  padding: 8px 10px;
  border: 1.5px solid var(--border-strong, #A9A69E);
  border-radius: 6px;
  background: #fff;
  color: var(--navy, #07142A);
  outline: none;
  transition: border-color 0.15s;
}
.product-config-select:focus,
.product-config-custom-input:focus {
  border-color: var(--gold, #D4A830);
  box-shadow: 0 0 0 2px rgba(212, 168, 48, 0.2);
}

.product-config-qty {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fff;
  border: 1px solid #D4D1CB;
  border-radius: 6px;
  padding: 2px;
  width: fit-content;
}
.product-config-qty-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 18px;
  font-weight: 600;
  color: var(--navy, #07142A);
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.15s;
}
.product-config-qty-btn:hover {
  background: rgba(212, 168, 48, 0.15);
}
.product-config-qty-val {
  display: inline-block;
  width: 32px;
  text-align: center;
  font-family: 'DM Mono', monospace;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy, #07142A);
}

.product-config-surface {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  color: var(--navy, #07142A);
  padding: 6px 12px;
  background: #fff;
  border-radius: 4px;
  border: 1px solid #E5E2D5;
  text-align: center;
  font-weight: 600;
}

.product-config-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.product-config-add-btn {
  flex: 1;
  min-width: 200px;
  padding: 12px 20px;
  background: var(--gold, #D4A830);
  color: var(--navy, #07142A);
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.product-config-add-btn:hover {
  filter: brightness(0.92);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212, 168, 48, 0.3);
}
.product-config-cancel-btn {
  padding: 12px 16px;
  background: transparent;
  color: var(--muted, #5A6478);
  border: 1px solid #D4D1CB;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.product-config-cancel-btn:hover {
  background: #fff;
  color: var(--navy, #07142A);
  border-color: var(--navy, #07142A);
}

/* ── PRODUITS SIMILAIRES ────────────────────────────────────────────────── */
.product-similar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.product-similar-card {
  display: block;
  padding: 20px;
  background: #fff;
  border: 1px solid #E5E2D5;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
}
.product-similar-card:hover {
  border-color: var(--gold, #D4A830);
  box-shadow: 0 4px 16px rgba(7, 20, 42, 0.08);
  transform: translateY(-2px);
}
.product-similar-grammage {
  font-size: 12px;
  color: var(--muted, #5A6478);
  margin-bottom: 4px;
}
.product-similar-grammage strong {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  color: var(--navy, #07142A);
  margin-right: 4px;
}
.product-similar-name {
  font-weight: 600;
  color: var(--navy, #07142A);
  margin-bottom: 8px;
  font-size: 15px;
}
.product-similar-price {
  font-size: 13px;
  color: var(--gold, #D4A830);
  font-weight: 600;
}
.product-similar-arrow {
  margin-top: 12px;
  font-size: 12px;
  color: var(--navy, #07142A);
  font-weight: 500;
}

/* ── ACCESSIBILITÉ ──────────────────────────────────────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── RESPONSIVE MOBILE ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .product-page-main {
    padding: 60px 16px 48px;
  }
  .product-page-hero {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 20px;
  }
  /* V01.001.27 : drawer empile en 1 colonne sur mobile */
  .product-config-grid {
    grid-template-columns: 1fr;
  }
  .product-config-add-btn {
    width: 100%;
  }
  .product-config-cancel-btn {
    width: 100%;
  }
  .product-page-hero-image img {
    max-width: 100%;
  }
  .product-page-cta {
    flex-direction: column;
  }
  .product-page-cta .btn {
    width: 100%;
  }
  /* V01.043 — La colonne « Norme » ne doit plus disparaitre sur mobile.
     display:none ne visait que le <td class="product-tech-norm"> : le
     <th scope="col">Norme</th> de l en-tete, lui, n a pas de classe et restait
     affiche. On obtenait donc un en-tete promettant une colonne vide, et
     surtout la perte des 12 references normatives (EN ISO 9864, 10319, 12236,
     11058, 13433, 12956, NF G 38019) sur telephone ET sur tablette. Or c est
     exactement l information qu un bureau d etudes vient chercher pour
     rediger un CCTP. table-layout:fixed + overflow-wrap font tenir les trois
     colonnes dans 290 px : « EN ISO 10319 » passe a la ligne au lieu de
     pousser le tableau hors de l ecran. */
  .product-tech-table {
    font-size: 12px;
    table-layout: fixed;
    width: 100%;
  }
  .product-tech-table th,
  .product-tech-table td {
    padding: 8px 6px;
    overflow-wrap: anywhere;
  }
  .product-tech-table tbody th {
    width: 38%;
  }
  .product-tech-norm {
    display: table-cell;
  }
}
