/* PorcelanoDZ - styles following the Charte graphique 2026.
 * Primary: noir #1D1D1B, bleu #315B8C, corail #F2765E
 * Secondary: crème #F5EBDD, brun #413333, bordeaux #790D16
 * The charter's typeface is Gotham (licensed); Montserrat is the closest free
 * match and Cairo covers Arabic.
 */
:root {
  --noir: #1d1d1b;
  --bleu: #315b8c;
  --corail: #f2765e;
  --creme: #f5ebdd;
  --brun: #413333;
  --bordeaux: #790d16;
  --blanc: #fffdf9;
  --line: rgba(29, 29, 27, .12);
  --muted: #6d6461;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(29, 29, 27, .10);
  --wrap: 1200px;
  --font: "Montserrat", system-ui, sans-serif;
}
html[lang="ar"] { --font: "Cairo", "Montserrat", system-ui, sans-serif; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--noir); background: var(--blanc);
  line-height: 1.6; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; }
.section--creme { background: var(--creme); }
.section--noir { background: var(--noir); color: var(--creme); }
.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: .75rem; font-weight: 600; color: var(--corail); margin-bottom: .6em; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 640px; }
.section--noir .lead { color: rgba(245, 235, 221, .75); }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* ---------- buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5em; padding: .85em 1.6em; border-radius: 999px;
  font: 600 .95rem var(--font); text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: transform .15s, background .15s, color .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn--primary { background: var(--corail); color: var(--noir); }
.btn--primary:hover { background: #f48a76; }
.btn--dark { background: var(--noir); color: var(--creme); }
.btn--ghost { border-color: currentColor; background: transparent; }
.btn--sm { padding: .5em 1.1em; font-size: .85rem; }
.btn--block { width: 100%; justify-content: center; }

/* ---------- header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--noir); color: var(--creme); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
/* Charter minimum is 1.5 cm wide in print; 46px tall keeps it legible on screen. */
.brand .logo { height: 46px; width: auto; }
.brand-name { font-weight: 700; letter-spacing: .08em; font-size: .95rem; }
.nav { display: flex; gap: 4px; margin-inline-start: auto; }
.nav a { text-decoration: none; padding: 8px 12px; border-radius: 8px; font-size: .9rem; font-weight: 500; opacity: .85; }
.nav a:hover, .nav a[aria-current="page"] { opacity: 1; background: rgba(245, 235, 221, .08); }
.nav a[aria-current="page"] { color: var(--corail); }
.header-actions { display: flex; gap: 10px; align-items: center; }
.lang-toggle { background: none; border: 1px solid rgba(245, 235, 221, .35); color: inherit; border-radius: 999px; padding: 6px 12px; font: 600 .8rem var(--font); cursor: pointer; }
.quote-pill { position: relative; text-decoration: none; }
.quote-pill .count { position: absolute; top: -6px; inset-inline-end: -6px; background: var(--corail); color: var(--noir); border-radius: 999px; font-size: .7rem; min-width: 18px; height: 18px; display: grid; place-items: center; font-weight: 700; }
.burger { display: none; background: none; border: 0; color: inherit; width: 40px; height: 40px; cursor: pointer; }
.burger span { display: block; height: 2px; background: currentColor; margin: 6px 8px; transition: transform .2s, opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 960px) {
  .burger { display: block; }
  .nav {
    position: fixed; inset: 72px 0 auto 0; background: var(--noir); flex-direction: column; padding: 12px 20px 24px;
    transform: translateY(-120%); transition: transform .25s; box-shadow: var(--shadow);
  }
  .nav.is-open { transform: none; }
  .nav a { padding: 14px 8px; font-size: 1rem; border-bottom: 1px solid rgba(245, 235, 221, .08); }
  .header-actions .btn { display: none; }
}

/* ---------- hero */
.hero {
  position: relative; min-height: calc(100vh - 72px); display: grid; align-items: center; color: var(--creme);
  background: var(--noir) center/cover no-repeat; overflow: hidden;
}
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(29,29,27,.92) 0%, rgba(29,29,27,.6) 55%, rgba(65,51,51,.35) 100%); }
html[dir="rtl"] .hero::before { background: linear-gradient(-100deg, rgba(29,29,27,.92) 0%, rgba(29,29,27,.6) 55%, rgba(65,51,51,.35) 100%); }
.hero .wrap { position: relative; padding-top: 60px; padding-bottom: 60px; }
.hero h1 { font-size: clamp(2.2rem, 5.5vw, 4.2rem); max-width: 760px; }
.hero h1 em { font-style: normal; color: var(--corail); }
.hero p { font-size: 1.2rem; max-width: 560px; opacity: .85; }
.hero .actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.page-hero { background: var(--noir); color: var(--creme); padding: 64px 0 56px; }
.page-hero p { opacity: .75; max-width: 640px; margin: 0; }

/* ---------- grids & cards */
.grid { display: grid; gap: 24px; }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card { background: #fff; border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.feature .icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--creme); color: var(--bordeaux); margin-bottom: 18px; }
.feature .icon svg { width: 26px; height: 26px; }
.feature h3 { font-size: 1.1rem; }
.feature p { color: var(--muted); margin: 0; font-size: .95rem; }

.universe { position: relative; display: block; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/5; text-decoration: none; color: var(--creme); background: var(--brun) center/cover; }
.universe::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(29,29,27,.85)); transition: background .2s; }
.universe:hover::after { background: linear-gradient(180deg, rgba(242,118,94,.15) 20%, rgba(29,29,27,.9)); }
.universe div { position: absolute; z-index: 1; inset: auto 20px 20px 20px; }
.universe h3 { margin: 0; font-size: 1.15rem; }
.universe span { font-size: .85rem; opacity: .8; }
.grid-univers { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 960px) { .grid-univers { grid-template-columns: repeat(2, 1fr); } }

.partners { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; align-items: center; }
.partner { background: #fff; border-radius: 12px; padding: 18px 26px; min-width: 170px; height: 84px; display: grid; place-items: center; box-shadow: var(--shadow); font-weight: 700; letter-spacing: .06em; color: var(--brun); }
.partner img { max-height: 44px; width: auto; }

.formats { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.format { text-align: center; text-decoration: none; }
.format .shape { margin: 0 auto 14px; background: center/cover; border-radius: 6px; box-shadow: var(--shadow); }
.format strong { display: block; font-size: 1.1rem; }
.format span { color: var(--muted); font-size: .85rem; }

/* ---------- before/after slider (home demo + visualiser comparison) */
.compare { position: relative; overflow: hidden; border-radius: var(--radius); user-select: none; background: var(--noir); aspect-ratio: 4/3; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare .compare-top { clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0); }
.compare .handle { position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 3px; background: var(--creme); transform: translateX(-50%); pointer-events: none; }
.compare .handle::after { content: "⟷"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 42px; height: 42px; border-radius: 50%; background: var(--corail); color: var(--noir); display: grid; place-items: center; font-weight: 700; }
.compare input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.compare .tag { position: absolute; top: 12px; background: rgba(29,29,27,.75); color: var(--creme); font-size: .75rem; padding: 4px 10px; border-radius: 999px; z-index: 1; }
.compare .tag--a { left: 12px; } .compare .tag--b { right: 12px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 32px; } }
.steps { list-style: none; padding: 0; margin: 24px 0; counter-reset: s; }
.steps li { counter-increment: s; display: flex; gap: 14px; align-items: baseline; padding: 8px 0; }
.steps li::before { content: counter(s); flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--corail); color: var(--noir); display: grid; place-items: center; font-weight: 700; font-size: .85rem; }

.testimonial blockquote { margin: 0 0 16px; font-size: 1.02rem; }
.testimonial .who { font-weight: 600; font-size: .9rem; }
.testimonial .stars { color: var(--corail); letter-spacing: 2px; margin-bottom: 10px; }

.cta-band { background: var(--bordeaux); color: var(--creme); border-radius: 24px; padding: 56px; display: flex; gap: 32px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cta-band h2 { margin: 0; max-width: 620px; }

/* ---------- footer */
.site-footer { background: var(--noir); color: rgba(245, 235, 221, .8); padding: 64px 0 28px; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 40px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: var(--creme); font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; margin: 0 0 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--corail); }
.site-footer .logo { height: 64px; width: auto; margin-bottom: 16px; }
.socials { display: flex; gap: 10px; margin-top: 14px; }
.socials a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(245,235,221,.25); display: grid; place-items: center; }
.socials svg { width: 18px; height: 18px; }
.newsletter { display: flex; gap: 8px; margin-top: 10px; }
.newsletter input { flex: 1; min-width: 0; }
.footer-bottom { border-top: 1px solid rgba(245,235,221,.12); margin-top: 48px; padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .8rem; }

/* ---------- forms */
label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 6px; }
input, select, textarea {
  width: 100%; font: inherit; font-size: .95rem; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; color: var(--noir);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--bleu); outline-offset: 1px; }
.site-footer input { background: rgba(245,235,221,.08); border-color: rgba(245,235,221,.2); color: var(--creme); }
.field { margin-bottom: 16px; }
.field.has-error input, .field.has-error textarea { border-color: var(--bordeaux); }
.field .error { color: var(--bordeaux); font-size: .8rem; margin-top: 4px; display: none; }
.field.has-error .error { display: block; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.notice { padding: 14px 18px; border-radius: 10px; background: var(--creme); font-size: .9rem; }
.notice--ok { background: #e3efe6; color: #1f4d2c; }
.notice--err { background: #f7dfe0; color: var(--bordeaux); }

/* ---------- catalogue */
.catalogue-layout { display: grid; grid-template-columns: 260px 1fr; gap: 40px; align-items: start; }
@media (max-width: 860px) { .catalogue-layout { grid-template-columns: 1fr; } }
.filters { position: sticky; top: 96px; }
.filters h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; margin: 22px 0 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; font: 500 .85rem var(--font); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--noir); color: var(--creme); border-color: var(--noir); }
.chip .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-inline-end: 6px; vertical-align: -1px; border: 1px solid var(--line); }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.tabs .chip { padding: 10px 18px; }
.results-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap: 12px; flex-wrap: wrap; }
.results-bar input { max-width: 280px; }
.products { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.product { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.product .thumb { aspect-ratio: 1; background: var(--creme) center/cover; display: block; }
.product .body { padding: 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.product h3 { font-size: 1rem; margin: 0; }
.product .meta { color: var(--muted); font-size: .8rem; }
.product .price { font-weight: 700; margin-top: auto; padding-top: 8px; }
.product .price small { font-weight: 500; color: var(--muted); }
.product .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 16px 16px; }
.product .actions .btn { justify-content: center; padding: .55em .5em; font-size: .78rem; }
.badge { display: inline-block; font-size: .7rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--creme); color: var(--brun); }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); }

/* ---------- product page */
.product-page { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; }
@media (max-width: 860px) { .product-page { grid-template-columns: 1fr; } }
.gallery .main { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--creme); aspect-ratio: 1; cursor: zoom-in; }
.gallery .main img { width: 100%; height: 100%; object-fit: cover; transition: transform .1s; }
.gallery .main.zoomed img { transform: scale(2.4); }
.gallery .thumbs { display: flex; gap: 10px; margin-top: 12px; }
.gallery .thumbs button { width: 76px; height: 76px; border-radius: 10px; border: 2px solid transparent; padding: 0; overflow: hidden; cursor: pointer; background: var(--creme); }
.gallery .thumbs button[aria-current="true"] { border-color: var(--corail); }
.gallery .thumbs img { width: 100%; height: 100%; object-fit: cover; }
.specs { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: .92rem; }
.specs th, .specs td { text-align: start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.specs th { color: var(--muted); font-weight: 500; width: 45%; }
.big-price { font-size: 1.8rem; font-weight: 700; }

/* ---------- visualiser */
.viz { display: grid; grid-template-columns: 360px 1fr; gap: 32px; align-items: start; }
@media (max-width: 960px) { .viz { grid-template-columns: 1fr; } }
.viz-panel { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.viz-panel h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; margin: 20px 0 10px; }
.viz-panel h3:first-child { margin-top: 0; }
.dropzone { border: 2px dashed var(--line); border-radius: 12px; padding: 22px; text-align: center; cursor: pointer; display: block; font-weight: 500; }
.dropzone:hover { border-color: var(--corail); }
.dropzone input { display: none; }
.tile-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; max-height: 230px; overflow-y: auto; padding: 2px; }
.tile-picker button { aspect-ratio: 1; border-radius: 8px; border: 2px solid transparent; background: center/cover; cursor: pointer; padding: 0; position: relative; }
.tile-picker button[aria-pressed="true"] { border-color: var(--corail); box-shadow: 0 0 0 2px var(--corail); }
.tile-picker button .slot { position: absolute; top: 2px; inset-inline-start: 2px; background: var(--noir); color: var(--creme); font-size: .65rem; font-weight: 700; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--blanc), 0 0 0 5px var(--corail); }
.layouts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.layouts button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 2px; cursor: pointer; font: 500 .68rem var(--font); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.layouts button[aria-pressed="true"] { border-color: var(--corail); background: #fff4f1; }
.layouts svg { width: 32px; height: 32px; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg button { flex: 1; border: 0; background: none; border-radius: 999px; padding: 8px; font: 600 .85rem var(--font); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--noir); color: var(--creme); }
.selection-line { font-size: .85rem; color: var(--muted); margin-top: 8px; min-height: 1.4em; }
.stage { background: var(--noir); border-radius: var(--radius); min-height: 420px; display: grid; place-items: center; color: var(--creme); position: relative; overflow: hidden; }
.stage > img { width: 100%; }
.stage .placeholder { text-align: center; padding: 40px; opacity: .7; }
.stage .compare { width: 100%; aspect-ratio: auto; }
.stage .compare img:first-child { position: relative; }
.progress { position: absolute; inset: 0; background: rgba(29,29,27,.72); display: grid; place-items: center; text-align: center; padding: 20px; }
.spinner { width: 46px; height: 46px; border: 4px solid rgba(245,235,221,.2); border-top-color: var(--corail); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 14px; }
@keyframes spin { to { transform: rotate(360deg); } }
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* ---------- calculator */
.calc { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 860px) { .calc { grid-template-columns: 1fr; } }
.room-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 10px; align-items: end; margin-bottom: 12px; }
@media (max-width: 600px) { .room-row { grid-template-columns: 1fr 1fr; } }
.icon-btn { width: 44px; height: 46px; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 1.2rem; }
.totals { background: var(--noir); color: var(--creme); border-radius: var(--radius); padding: 28px; position: sticky; top: 96px; }
.totals dl { display: grid; grid-template-columns: 1fr auto; gap: 12px 16px; margin: 20px 0; }
.totals dt { opacity: .7; }
.totals dd { margin: 0; font-weight: 700; text-align: end; }
.totals .grand { font-size: 1.6rem; color: var(--corail); }
.totals label { color: var(--creme); }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.check input { width: auto; }

/* ---------- quote list */
.quote-items { list-style: none; padding: 0; margin: 0 0 20px; }
.quote-items li { display: grid; grid-template-columns: 56px 1fr 110px auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.quote-items img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; }
.quote-items input { padding: 8px 10px; }

/* ---------- misc */
.whatsapp-float { position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 60; width: 58px; height: 58px; border-radius: 50%; background: #25d366; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.25); transition: transform .15s; }
.whatsapp-float:hover { transform: scale(1.07); }
.whatsapp-float svg { width: 30px; height: 30px; color: #fff; }
.toast { position: fixed; bottom: 96px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--noir); color: var(--creme); padding: 12px 20px; border-radius: 999px; opacity: 0; transition: .25s; z-index: 70; font-size: .9rem; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%); }
.map { border: 0; width: 100%; height: 360px; border-radius: var(--radius); }
.service-icon { width: 64px; height: 64px; border-radius: 18px; background: var(--bordeaux); color: var(--creme); display: grid; place-items: center; margin-bottom: 18px; }
.service-icon svg { width: 30px; height: 30px; }
.photo-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.photo-row img { border-radius: var(--radius); aspect-ratio: 4/3; object-fit: cover; width: 100%; }
@media (max-width: 700px) { .photo-row { grid-template-columns: 1fr; } }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.contact-list svg { width: 22px; height: 22px; color: var(--bordeaux); flex: none; margin-top: 2px; }
html[dir="rtl"] .steps li, html[dir="rtl"] .contact-list li { direction: rtl; }
