/* =========================================================
   GAMAX-CM — styles.css (3 colonnes : 3D | CONFIG | RÉCAP)
========================================================= */

/* =========================
   VARIABLES
========================= */
:root{
  --beige:#f5f0e8;
  --beige-dark:#dfd1b8;
  --noir:#111111;
  --accent:#c8a96a;
  --accent-dark:#b79255;

  --text:#171717;
  --text-muted:#6d6d6d;

  --radius-lg:18px;
  --shadow-soft:0 18px 45px rgba(0,0,0,.08);
  --shadow-light:0 10px 22px rgba(0,0,0,.06);
}

/* =========================
   BASE
========================= */
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:"Inter",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--text);
  background:linear-gradient(180deg,#fbf7f1 0%, var(--beige) 60%, #f8f2ea 100%);
}
img{max-width:100%;display:block}
a{color:inherit}

/* 🔧 Container plus large pour réduire les marges beige */
.container{
  width:min(1400px, calc(100% - 60px));
  margin:0 auto;
}

/* =========================
   HEADER
========================= */
.site-header{
  position:sticky;
  top:0;
  z-index:1000;
  background:#000;
  border-bottom:1px solid rgba(255,255,255,.06);
}
.header-inner{
  height:64px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.logo-block{display:flex;align-items:center;gap:12px}
.logo-text{display:flex;flex-direction:column;line-height:1}
.logo-main{
  letter-spacing:.18em;
  font-weight:800;
  color:#fff;
  font-size:1.05rem;
}
.logo-sub{
  color:rgba(255,255,255,.7);
  font-size:.72rem;
  letter-spacing:.10em;
  text-transform:uppercase;
  margin-top:4px;
}

.main-nav a{
  color:rgba(255,255,255,.85);
  text-decoration:none;
  margin-left:22px;
  font-size:.92rem;
}
.main-nav a:hover{color:#fff}

/* =========================
   HERO
========================= */
main{padding-top:18px;}

.hero{
  padding:34px 0 26px;
  background:radial-gradient(circle at top left,#fff8ec 0,#fbf7f1 45%,#f5f0e8 100%);
}

.hero-inner{
  display:flex;
  justify-content:flex-start;
}

.hero-text{
  max-width:720px;
}

/* Petit badge au-dessus du titre */
.hero-badge-main{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:5px 12px;
  border-radius:999px;
  background:rgba(0,0,0,.06);
  font-size:.78rem;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--text-muted);
  margin-bottom:10px;
}

.hero-text h1{
  margin:0 0 10px;
  font-size:2.4rem;
  letter-spacing:-.02em;
}

.hero-subtitle{
  margin:0 0 18px;
  color:var(--text-muted);
  line-height:1.55;
}

/* Ligne d’avantages (4 items) */
.hero-badges{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:0 0 16px;
}

.hero-badge-item{
  flex:1 1 220px;
  font-size:.82rem;
  color:#111;
  background:#fff;
  border-radius:999px;
  border:1px solid #e0d5c1;
  padding:6px 12px;
  box-shadow:var(--shadow-light);
}

/* Boutons */
.hero-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:14px;
}

/* Texte sur ta disponibilité / modularité */
.hero-availability{
  margin:0;
  font-size:.9rem;
  color:var(--text-muted);
  line-height:1.55;
}

/* Ajustements responsive */
@media (max-width:1024px){
  .hero{padding:26px 0 18px;}
  .hero-text h1{font-size:2.1rem;}
}

@media (max-width:480px){
  .hero-text h1{font-size:1.8rem;}
  .hero-actions{
    flex-direction:column;
    align-items:flex-start;
  }
}

/* =========================
   RESPONSIVE (complément)
========================= */
@media (max-width:1024px){
  .hero{
    padding:26px 0 16px;
  }
  .hero-inner{
    flex-direction:column;
    align-items:flex-start;
  }
  .hero-right{
    width:100%;
    justify-content:flex-start;
  }
  .hero-card{
    max-width:100%;
  }
  .hero h1{
    font-size:2rem;
  }
}

@media (max-width:480px){
  .hero h1{font-size:1.7rem;}
  .hero-actions{
    flex-direction:column;
    align-items:flex-start;
  }
}

/* =========================
   BOUTONS
========================= */
.btn,.btn-primary,.btn-ghost{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border-radius:999px;
  padding:10px 14px;
  font-weight:700;
  font-size:.92rem;
  border:1px solid transparent;
  text-decoration:none;
  cursor:pointer;
  transition:transform .12s ease, box-shadow .12s ease,
             background .12s ease, border-color .12s ease;
}
.btn-primary{
  background:var(--accent);
  color:#000;
  box-shadow:0 0 0 1px #000,0 14px 26px rgba(0,0,0,.20);
  text-transform:uppercase;
  letter-spacing:.06em;
}
.btn-primary:hover{background:var(--accent-dark);transform:translateY(-1px);}
.btn-ghost{
  background:transparent;
  border-color:rgba(0,0,0,.18);
  color:#111;
}
.btn-ghost:hover{
  border-color:rgba(0,0,0,.35);
  transform:translateY(-1px);
}
.btn.full-width{width:100%}

/* =========================
   SECTIONS
========================= */
.section{padding:26px 0;}
.section-header.left h2{
  margin:0 0 6px;
  font-size:1.6rem;
}
.section-header.left p{
  margin:0;
  color:var(--text-muted);
  line-height:1.55;
}

/* =========================
   CONFIGURATEUR : LAYOUT 3 COLONNES
   Gauche : vue 3D | Centre : config | Droite : récap
========================= */

.configurator-layout{
  margin-top:18px;
  display:flex;
  align-items:flex-start;
  gap:2.4rem;
}

/* Ordre visuel : 3D (gauche) | Config (centre) | Récap (droite)
   + sticky sur les colonnes latérales */
.recap-column{
  order:3;
  flex:1.35;
  min-width:0;
  position:sticky;
  top:80px;
  align-self:flex-start;
}
.config-form{
  order:2;
  flex:2.7;
  min-width:0;
}
.viewer-column{
  order:1;
  flex:1.35;
  min-width:0;
  position:sticky;
  top:80px;
  align-self:flex-start;
}

/* =========================
   FORMULAIRE (colonne centrale)
========================= */
.config-form{
  background:#fff;
  border-radius:var(--radius-lg);
  padding:22px 22px 26px;
  box-shadow:var(--shadow-soft);
  border:1px solid var(--beige-dark);
}
.config-form h3{
  margin:18px 0 10px;
  font-size:1.1rem;
}

.form-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}
.address-grid{grid-template-columns:repeat(2,minmax(0,1fr));}

.field{display:flex;flex-direction:column;gap:6px;}
.field label{
  font-size:.9rem;
  font-weight:700;
}
.field-help{
  font-size:.82rem;
  color:var(--text-muted);
  margin:0;
}

input[type="text"],select{
  border-radius:999px;
  border:1px solid #d3c5af;
  padding:9px 12px;
  font-size:.9rem;
  font-family:inherit;
  background:#fbf7f1;
}
input[type="text"]:focus,select:focus{
  outline:2px solid var(--accent);
  outline-offset:0;
  background:#fff;
}

/* =========================
   TYPE D’ABRI
========================= */
.roof-type-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
  margin-bottom:10px;
}
.roof-card{cursor:pointer;}
.roof-card input{display:none;}

.roof-card-inner{
  border-radius:18px;
  padding:14px 12px;
  background:#fff;
  border:1px solid var(--beige-dark);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-height:120px;
  box-shadow:var(--shadow-light);
  transition:transform .1s ease, box-shadow .1s ease,
             border-color .1s ease, background .1s ease, color .1s ease;
}
.roof-img{max-width:80px;height:auto;}

/* uniformisation visuelle des cartes type d’abri */
.roof-card-inner{width:100%;}

.roof-title{
  font-weight:600;
  font-size:.95rem;
  letter-spacing:.01em;
  line-height:1.2;
  color:#111;
}

/* sélection type d’abri */
.roof-card input:checked + .roof-card-inner{
  background:#111;
  color:#fff;
  border-color:#000;
  transform:translateY(-1px);
  box-shadow:0 15px 35px rgba(0,0,0,.25);
}
.roof-card input:checked + .roof-card-inner .roof-title{
  color:#fff;
}

/* =========================
   BARDAGE / OPTIONS (CARTES)
========================= */
.bardage-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
  gap:12px;
}

/* ✅ chaque item est un flex-container,
   la carte occupe toute la hauteur de la cellule */
.bardage-choice{
  cursor:pointer;
  display:flex;
}
.bardage-choice input{display:none;}

.bardage-card{
  border-radius:14px;
  padding:10px 12px 11px;
  background:#fff;
  border:1px solid #e0d5c1;
  box-shadow:var(--shadow-light);
  display:flex;
  flex-direction:column;
  gap:4px;
  flex:1;
  height:100%;
  transition:
    background .2s ease,color .2s ease,
    border-color .12s ease,box-shadow .12s ease,
    transform .12s ease;
}

/* Visuels réalistes toiture / bardage dans les cartes */
.cover-img {
  width: 100%;
  max-height: 110px;
  object-fit: contain;
  border-radius: 10px;
  display: block;
  margin-bottom: 8px;
  background: #f5f5f5;
}

/* Quand la carte est sélectionnée (fond noir), on garde une bonne lisibilité du visuel */
.bardage-choice input:checked + .bardage-card .cover-img {
  filter: brightness(1.05) contrast(1.1);
}

.bardage-label-main{
  font-size:.95rem;
  font-weight:600;
  letter-spacing:.01em;
  line-height:1.2;
  color:#111;
}
.bardage-label-sub{
  font-size:.83rem;
  color:rgba(0,0,0,.6);
}

/* Hover */
.bardage-choice:hover .bardage-card{
  border-color:var(--accent);
  box-shadow:0 10px 24px rgba(0,0,0,.08);
  transform:translateY(-1px);
}

/* Cartes sélectionnées : fond noir comme le type d’abri */
.bardage-choice input[type="radio"]:checked + .bardage-card,
.bardage-choice input[type="checkbox"]:checked + .bardage-card{
  background:#000000;
  color:#ffffff;
  border-color:#c8a96a;
  box-shadow:0 0 0 1px #c8a96a,
             0 12px 30px rgba(0,0,0,0.35);
  transform:translateY(-2px);
}
.bardage-choice input:checked + .bardage-card .bardage-label-main{
  color:#ffffff;
}
.bardage-choice input:checked + .bardage-card .bardage-label-sub{
  color:rgba(255,255,255,0.8);
}

/* =========================
   VISUELS PROFIL COUVERTURE
========================= */
.cover-visual{
  width:100%;
  height:46px;
  border-radius:10px;
  background:#e6e1d7;
  position:relative;
  overflow:hidden;
  margin-bottom:8px;
}

/* Bac acier : nervures en relief */
.cover-visual--bac::before{
  content:"";
  position:absolute;
  inset:6px 8px;
  border-radius:8px;
  background:
    repeating-linear-gradient(
      90deg,
      #c7c0b4 0px,
      #c7c0b4 5px,
      #f4efe6 5px,
      #f4efe6 12px
    );
  box-shadow:inset 0 2px 3px rgba(0,0,0,.18);
  transform:skewX(-10deg);
}

/* Panneau sandwich : couches superposées */
.cover-visual--sandwich::before{
  content:"";
  position:absolute;
  inset:8px 10px;
  border-radius:6px;
  background:
    linear-gradient(
      to bottom,
      #d2d7e0 0%,
      #d2d7e0 22%,
      #fdfdfc 22%,
      #fdfdfc 40%,
      #b7c0cd 40%,
      #b7c0cd 60%,
      #fdfdfc 60%,
      #fdfdfc 80%,
      #c4ccd7 80%,
      #c4ccd7 100%
    );
  box-shadow:
    inset 0 1px 2px rgba(255,255,255,.7),
    0 2px 4px rgba(0,0,0,.25);
}

/* =========================
   PALETTE RAL
========================= */
.ral-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(72px,1fr));
  gap:10px;
}
.ral-choice{cursor:pointer;}
.ral-choice input{display:none;}

.ral-box{
  height:32px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:.78rem;
  color:#fff;
  border:2px solid transparent;
  box-shadow:var(--shadow-light);
  user-select:none;
  transition:transform .1s ease, box-shadow .1s ease, border-color .1s ease;
}
.ral-choice input:checked + .ral-box{
  border-color:#000;
  transform:translateY(-1px);
  box-shadow:0 10px 22px rgba(0,0,0,.16);
}

/* =========================
   OPTIONS COMPLÉMENTAIRES — côtés B / D
========================= */
.option-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:14px;
}

/* même principe : chaque tuile occupe 100% de la hauteur de sa cellule */
.option-grid > *{
  height:100%;
}

/* les labels internes héritent du comportement flex si tu les utilises */
.option-grid .bardage-card{
  height:100%;
}

.option-sides{
  margin-top:8px;
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.option-sides-label{
  font-size:.82rem;
  color:var(--text-muted);
  font-weight:600;
}
.option-side{
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.option-side input{display:none;}
.option-side span{
  height:32px;
  min-width:52px;
  padding:0 14px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:.78rem;
  font-weight:600;
  letter-spacing:.03em;
  background:#fbf7f1;
  color:#111;
  border:2px solid transparent;
  box-shadow:var(--shadow-light);
  transition:transform .1s ease, box-shadow .1s ease,
             border-color .1s ease, background .1s ease;
}
.option-side:hover span{
  transform:translateY(-1px);
  box-shadow:0 10px 22px rgba(0,0,0,.12);
  border-color:rgba(200,169,106,.75);
}
.option-side input:checked + span{
  border-color:#000;
  background:#fff;
  transform:translateY(-1px);
  box-shadow:0 10px 22px rgba(0,0,0,.16);
}

/* =========================
   MODE DE LIVRAISON
========================= */
.delivery-modes{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
}
.delivery-choice{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 12px;
  border-radius:999px;
  background:#fbf7f1;
  border:1px solid #d9ccb7;
  font-size:.85rem;
  cursor:pointer;
}
.delivery-choice input{accent-color:var(--accent);margin:0}

/* =========================
   PANELS 3D & RÉCAP (colonnes extérieures)
========================= */
.sidepanel{
  border-radius:var(--radius-lg);
  padding:16px 18px 18px;
  box-shadow:var(--shadow-soft);
}

/* Vue 3D (à gauche) */
.viewer-panel{
  background:#fff;
  border:1px solid var(--beige-dark);
  border-radius:var(--radius-lg);
  padding:16px 18px 18px;
  box-shadow:var(--shadow-soft);
}
.viewer-panel h2{
  margin:0 0 4px;
  font-size:1.1rem;
}
.viewer-wrapper{
  margin-top:8px;
  border-radius:16px;
  background:linear-gradient(145deg,#f8f1e6,#ffffff);
  border:1px solid var(--beige-dark);
  padding:10px 10px 12px;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.viewer-3d{
  width:100%;
  min-height:320px;
  border-radius:12px;
  background:radial-gradient(circle at top,#d3d7df 0,#bec2cb 40%,#a9aeb7 100%);
  display:block;
}
.viewer-fullscreen-btn{align-self:flex-end;margin-top:6px;}
.viewer-toolbar{
  display:none;
  justify-content:space-between;
  align-items:center;
  margin-top:4px;
}
.viewer-toolbar-right{display:inline-flex;gap:4px;}
.viewer-caption{
  margin:4px 0 0;
  font-size:.78rem;
  color:var(--text-muted);
  text-align:right;
}

/* Récap (à droite) */
.recap-panel{
  background:#000;
  color:#fff;
  border:1px solid #000;
  border-radius:var(--radius-lg);
  padding:16px 18px 18px;
  box-shadow:var(--shadow-soft);
}
.recap-panel h2{
  margin:0 0 6px;
  font-size:1.15rem;
}
.recap-sub{
  margin:0 0 10px;
  font-size:.85rem;
  color:rgba(255,255,255,.7);
}
.recap-text{
  background:#050505;
  border-radius:12px;
  border:1px solid #2a2a2a;
  padding:16px 18px;
  font-family:"Inter",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-size:.9rem;
  line-height:1.6;
  letter-spacing:.01em;
  color:#f2f2f2;
  white-space:pre-line;
  max-height:460px;
  overflow:auto;
}
.recap-text strong{font-weight:700;color:#fff;}

/* =========================
   CONTACT + FOOTER
========================= */
.contact-block{
  background:#fff;
  border-radius:var(--radius-lg);
  padding:22px 22px 26px;
  box-shadow:var(--shadow-soft);
  border:1px solid var(--beige-dark);
}
.contact-block a{
  color:var(--noir);
  text-decoration:none;
  font-weight:700;
}
.contact-block a:hover{text-decoration:underline;}

.site-footer{
  padding:14px 0 18px;
  text-align:center;
  font-size:.82rem;
  color:var(--text-muted);
}

/* =========================
   MODE PLEIN ÉCRAN – VUE 3D
========================= */
.viewer-wrapper.is-fullscreen{
  position:fixed;
  inset:0;
  z-index:9999;
  background:#0f0f0f;
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.viewer-wrapper.is-fullscreen .viewer-3d{
  width:100% !important;
  flex:1;
  height:auto !important;
  border-radius:14px;
  background:#111;
}
.viewer-wrapper.is-fullscreen .viewer-toolbar{display:flex;}
.viewer-wrapper.is-fullscreen .viewer-fullscreen-btn{display:none;}
.viewer-wrapper.is-fullscreen .viewer-caption{
  color:rgba(255,255,255,.75);
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width:1024px){
  main{padding-top:10px;}

  .configurator-layout{
    flex-direction:column;
  }

  /* Ordre mobile : config d’abord, puis 3D, puis récap */
  .config-form{order:1;}
  .viewer-column{order:2;}
  .recap-column{order:3;}

  .hero-text h1{font-size:2rem;}

  /* Sur mobile/tablette, on désactive le sticky */
  .viewer-column,
  .recap-column{
    position:static;
  }
}

@media (max-width:768px){
  .header-inner{height:60px;}
  .main-nav a{margin-left:16px;font-size:.9rem;}
  .form-grid{grid-template-columns:1fr;}
  .address-grid{grid-template-columns:1fr;}
  .config-form{padding:18px 16px 22px;}
  .contact-block{padding:18px 16px 22px;}
}

@media (max-width:480px){
  .hero-text h1{font-size:1.7rem;}
  .hero-actions{flex-direction:column;align-items:flex-start;}
  .viewer-3d{min-height:210px;}
}
