﻿:root {
  --bg: #f7f4ee;
  --surface: #ffffff;
  --surface-2: #f0ead9;
  --text: #1c1a16;
  --muted: #6b6459;
  --line: #e3dcc9;
  --blue: #24344a;
  --blue-dark: #16212f;
  --orange: #a9812f;
  --orange-dark: #7c5d22;
  --green: #3f6e52;
  --red: #9c3b3b;
  --charcoal: #14181f;
  --shadow: 0 20px 50px rgba(20, 18, 14, 0.10);
  --radius: 8px;
  --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  padding: 0.78rem 0.9rem;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(23, 105, 170, 0.15);
}

label {
  display: grid;
  gap: 0.42rem;
  color: var(--charcoal);
  font-weight: 700;
  font-size: 0.92rem;
}

label span,
.muted,
small {
  color: var(--muted);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
  padding: 0 5vw;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 600;
  font-family: var(--font-display);
  font-size: 1.08rem;
  color: var(--blue-dark);
  letter-spacing: -0.01em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: var(--blue);
  color: #fff;
  letter-spacing: 0;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
}

.main-nav > a {
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius);
  color: var(--charcoal);
}

.main-nav > a:hover {
  background: var(--surface-2);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--charcoal);
}

.button,
button.button,
.link-button,
.nav-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0.7rem 1rem;
  cursor: pointer;
  font-weight: 800;
  text-align: center;
}

.button-primary {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
}

.button-primary:hover {
  background: var(--orange-dark);
}

.button-ghost {
  background: #fff;
  color: var(--blue-dark);
  border-color: var(--line);
}

.button-ghost:hover {
  border-color: var(--blue);
}

.button-danger {
  background: #fff3f3;
  color: var(--red);
  border-color: #f2c6c6;
}

.button-whatsapp {
  background: #148a4c;
  color: #fff;
}

.button-small {
  min-height: 34px;
  padding: 0.5rem 0.72rem;
  font-size: 0.88rem;
}

.full {
  width: 100%;
}

.link-button,
.nav-pill {
  min-height: 38px;
  background: #fff;
  color: var(--charcoal);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--orange);
  cursor: pointer;
  font-size: 1.1rem;
}

.notification-menu {
  position: relative;
}

.nav-badge {
  display: inline-grid;
  place-items: center;
  min-width: 21px;
  height: 21px;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-size: 0.75rem;
}

.popover-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  display: none;
  width: min(320px, calc(100vw - 24px));
  padding: 0.75rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.popover-panel.is-open {
  display: grid;
  gap: 0.55rem;
}

.notification-item {
  display: grid;
  gap: 0.2rem;
  padding: 0.7rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.notification-item.is-new {
  border-color: rgba(169, 129, 47, 0.55);
  background: #fff8f1;
}

.flash-stack {
  position: fixed;
  right: 1rem;
  top: 88px;
  z-index: 60;
  display: grid;
  gap: 0.6rem;
  width: min(420px, calc(100vw - 2rem));
}

.flash {
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
  font-weight: 700;
}

.flash-success {
  border-color: #bde7d4;
  color: #0f6543;
}

.flash-danger {
  border-color: #f1bbbb;
  color: var(--red);
}

.flash-warning {
  border-color: #f7d4a8;
  color: #9b520b;
}

.flash-info {
  border-color: #bdd9ef;
  color: var(--blue-dark);
}

.hero {
  position: relative;
  min-height: calc(100vh - 76px);
  display: grid;
  align-items: center;
  padding: 7rem 5vw 5rem;
  background-image: linear-gradient(90deg, rgba(20, 24, 31, 0.88), rgba(20, 24, 31, 0.55), rgba(20, 24, 31, 0.14)), url("hero-workshop.png");
  background-size: cover;
  background-position: center;
  color: #fff;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(900px, 100%);
}

.hero h1,
.page-hero h1,
.profile-hero h1,
.auth-copy h1,
.simple-page h1,
.dashboard-header h1 {
  margin: 0.25rem 0 1rem;
  line-height: 1.08;
  letter-spacing: -0.01em;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  font-family: var(--font-display);
  font-weight: 500;
}

.hero p {
  width: min(680px, 100%);
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.18rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--orange-dark);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.hero .eyebrow {
  color: #d9b97a;
}

.hero-search {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr auto;
  gap: 0.8rem;
  align-items: end;
  width: min(980px, 100%);
  margin-top: 2rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.96);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-search label {
  color: var(--charcoal);
}

.hero-stats {
  position: absolute;
  right: 5vw;
  bottom: 2rem;
  z-index: 1;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-stats div,
.metric {
  min-width: 136px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.94);
  color: var(--charcoal);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-stats strong,
.metric strong {
  display: block;
  font-size: 1.65rem;
  color: var(--blue-dark);
}

.section,
.simple-page,
.form-shell,
.dashboard-header,
.metric-grid,
.admin-layout,
.dashboard-grid,
.detail-layout,
.search-layout {
  width: min(1180px, 90vw);
  margin: 0 auto;
}

.section {
  padding: 4.5rem 0;
}

.muted-band {
  width: 100%;
  max-width: none;
  padding-left: 5vw;
  padding-right: 5vw;
  background: var(--surface-2);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.6rem;
}

.section-heading h2,
.content-block h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.4rem);
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.005em;
}

.section-heading a {
  color: var(--blue);
  font-weight: 800;
}

.tight {
  margin-bottom: 1rem;
}

.category-grid,
.pro-grid,
.metric-grid,
.feature-row {
  display: grid;
  gap: 1rem;
}

.category-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pro-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.category-tile,
.pro-card,
.form-panel,
.content-block,
.side-panel,
.filter-panel,
.request-card,
.testimonial-panel,
.empty-state,
.demo-box,
.login-nudge {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(23, 35, 49, 0.06);
}

.category-tile {
  display: grid;
  gap: 0.6rem;
  min-height: 178px;
  padding: 1.2rem;
}

.category-tile:hover,
.pro-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.category-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: var(--radius);
  background: #eae7de;
  color: var(--blue-dark);
  font-weight: 900;
  font-size: 0.78rem;
}

.category-icon::before {
  content: "SV";
}

.icon-plumbing::before { content: "PL"; }
.icon-bolt::before { content: "EL"; }
.icon-paint::before { content: "PE"; }
.icon-wood::before { content: "ME"; }
.icon-snow::before { content: "CL"; }
.icon-leaf::before { content: "JA"; }
.icon-sparkle::before { content: "NE"; }
.icon-washer::before { content: "EM"; }
.icon-brick::before { content: "MA"; }
.icon-tile::before { content: "CA"; }
.icon-lock::before { content: "SE"; }
.icon-truck::before { content: "DE"; }

/* Batiment - complement */
.icon-glass::before { content: "VI"; }
.icon-plaster::before { content: "PT"; }
.icon-roof::before { content: "TO"; }
.icon-heat::before { content: "CH"; }
.icon-domotic::before { content: "DO"; }
.icon-pool::before { content: "PI"; }
.icon-deco::before { content: "DI"; }
.icon-antenna::before { content: "AN"; }
.icon-iron::before { content: "FE"; }
.icon-blind::before { content: "ST"; }
.icon-insulation::before { content: "IS"; }

/* Automobile */
.icon-car-engine::before { content: "MC"; }
.icon-car-body::before { content: "TA"; }
.icon-car-electric::before { content: "EA"; }
.icon-tire::before { content: "PN"; }
.icon-car-ac::before { content: "CX"; }
.icon-windshield::before { content: "PB"; }
.icon-car-diag::before { content: "DG"; }
.icon-tow::before { content: "RM"; }
.icon-car-wash::before { content: "LV"; }
.icon-moto::before { content: "MO"; }

/* Electronique et informatique */
.icon-phone::before { content: "RT"; }
.icon-computer::before { content: "RO"; }
.icon-network::before { content: "RI"; }

/* Autres artisans */
.icon-weld::before { content: "SO"; }
.icon-sewing::before { content: "CO"; }

.pro-card {
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.pro-card-media {
  position: relative;
  display: block;
  height: 190px;
  background: linear-gradient(135deg, #d7e8f5, #ffe3c7);
}

.pro-card-media img,
.profile-photo img,
.gallery-grid img,
.mini-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-large,
.avatar-xl {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--blue), var(--orange));
  color: #fff;
  font-size: 2rem;
  font-weight: 900;
}

.avatar-xl {
  min-height: 280px;
}

.badge-row {
  position: absolute;
  left: 0.8rem;
  bottom: 0.8rem;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.badge-row.static {
  position: static;
  margin-bottom: 0.8rem;
}

.badge,
.status,
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0.25rem 0.62rem;
  font-size: 0.78rem;
  font-weight: 900;
}

.badge-blue {
  background: #eae7de;
  color: var(--blue-dark);
}

.badge-orange {
  background: #f3e7cf;
  color: var(--orange-dark);
}

.badge-green {
  background: #e7efe8;
  color: var(--green);
}

.badge-dark {
  background: var(--charcoal);
  color: #fff;
}

.badge-promoted {
  background: linear-gradient(135deg, #fff4d6, #ffe6a8);
  color: #8a5a00;
  box-shadow: inset 0 0 0 1px rgba(184, 134, 11, 0.35);
}

.pro-card-promoted {
  border-color: #f0c26b;
  box-shadow: 0 0 0 2px rgba(240, 194, 107, 0.35), var(--shadow);
}

.pro-card-body {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
}

.card-title-row,
.request-head,
.results-header,
.profile-main {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.pro-name {
  font-weight: 900;
  color: var(--charcoal);
}

.rating-pill {
  display: grid;
  place-items: center;
  min-width: 64px;
  height: 36px;
  border-radius: var(--radius);
  background: #fff7df;
  color: #9b6200;
  font-weight: 900;
}

.chip-row,
.inline-actions,
.request-meta,
.profile-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.chip {
  background: var(--surface-2);
  color: var(--blue-dark);
}

.pro-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--line);
}

.price {
  color: var(--green);
  font-weight: 900;
}

.split-section,
.auth-layout,
.profile-hero,
.dashboard-grid,
.admin-layout,
.detail-layout,
.search-layout {
  display: grid;
  gap: 1.4rem;
}

.split-section {
  grid-template-columns: 1.2fr 0.8fr;
}

.steps {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.2rem;
}

.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.3rem 0.75rem;
  align-items: start;
}

.step span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--blue);
  color: #fff;
  font-weight: 900;
}

.step p,
.testimonial-panel p,
.category-tile small,
.pro-card p,
.content-block p,
.request-card p {
  margin: 0;
  color: var(--muted);
}

.testimonial-panel {
  align-self: center;
  padding: 1.5rem;
  border-left: 5px solid var(--orange);
}

.testimonial-panel blockquote {
  margin: 0 0 1rem;
  font-size: 1.3rem;
  font-weight: 800;
}

.auth-layout {
  width: min(1040px, 90vw);
  margin: 3.5rem auto;
  grid-template-columns: 0.85fr 1fr;
  align-items: start;
}

.auth-layout.wide {
  width: min(1180px, 90vw);
  grid-template-columns: 0.68fr 1.32fr;
}

.auth-copy {
  padding: 1rem 0;
}

.auth-copy p,
.simple-page p,
.page-hero p,
.dashboard-header p {
  color: var(--muted);
  font-size: 1.05rem;
}

.demo-box {
  display: grid;
  gap: 0.3rem;
  margin-top: 1.4rem;
  padding: 1rem;
}

.form-panel {
  display: grid;
  gap: 1rem;
  padding: 1.2rem;
}

.grid-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.span-2 {
  grid-column: span 2;
}

.form-links {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
  color: var(--blue);
  font-weight: 800;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.check-row input {
  width: auto;
}

.page-hero {
  width: min(1180px, 90vw);
  margin: 2rem auto 0;
  padding: 2.2rem;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
}

.page-hero.compact h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.form-shell {
  padding: 1.5rem 0 4rem;
}

.search-layout {
  grid-template-columns: 300px 1fr;
  align-items: start;
  padding: 1.5rem 0 4rem;
}

.filter-panel {
  position: sticky;
  top: 96px;
  padding: 1rem;
}

.filter-panel form {
  display: grid;
  gap: 0.9rem;
}

.results-area {
  min-width: 0;
}

.results-header {
  align-items: center;
  margin-bottom: 1rem;
}

.map-mini {
  display: grid;
  gap: 0.2rem;
  min-width: 210px;
  padding: 0.85rem;
  border: 1px dashed var(--blue);
  border-radius: var(--radius);
  background: #f3f9ff;
  color: var(--blue-dark);
}

.profile-hero {
  width: min(1180px, 90vw);
  margin: 2rem auto;
  grid-template-columns: 1fr 300px;
  align-items: start;
}

.profile-main {
  align-items: stretch;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.profile-photo {
  flex: 0 0 300px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-2);
}

.profile-actions {
  display: grid;
  gap: 0.7rem;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.detail-layout {
  grid-template-columns: 1fr 340px;
  align-items: start;
  padding-bottom: 3rem;
}

.detail-main,
.dashboard-main,
.dashboard-side {
  display: grid;
  gap: 1rem;
}

.content-block,
.side-panel {
  padding: 1.2rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.gallery-grid figure {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.gallery-grid img {
  height: 180px;
}

.gallery-grid figcaption {
  padding: 0.6rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.review-list,
.request-list,
.compact-list {
  display: grid;
  gap: 0.8rem;
}

.review-item,
.compact-list > a,
.compact-list > div {
  display: grid;
  gap: 0.25rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.side-panel form,
.report-form {
  display: grid;
  gap: 0.8rem;
}

.dashboard-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-top: 2rem;
  padding: 1.5rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.dashboard-header h1 {
  font-size: clamp(2rem, 4vw, 3.6rem);
}

.dashboard-grid {
  grid-template-columns: 1fr 330px;
  align-items: start;
  padding-bottom: 4rem;
}

.admin-layout {
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
  padding-bottom: 4rem;
}

.metric {
  box-shadow: none;
  border-color: var(--line);
}

.notice {
  width: min(1180px, 90vw);
  margin: 1rem auto;
  padding: 0.9rem 1rem;
  border: 1px solid #f7d4a8;
  border-radius: var(--radius);
  background: #fff8ed;
  color: #86480b;
  font-weight: 800;
}

.notice.danger {
  border-color: #f1bbbb;
  background: #fff5f5;
  color: var(--red);
}

.request-card {
  padding: 1rem;
}

.request-head {
  align-items: start;
}

.request-head strong {
  display: block;
}

.request-head span:not(.status),
.request-meta {
  color: var(--muted);
}

.status-en_attente,
.status-nouveau {
  background: #fff7df;
  color: #8c5a00;
}

.status-acceptee,
.status-terminee,
.status-traite {
  background: #e2f5eb;
  color: var(--green);
}

.status-refusee,
.status-annulee {
  background: #fff0f0;
  color: var(--red);
}

.mini-gallery {
  display: flex;
  gap: 0.5rem;
  margin: 0.8rem 0;
}

.mini-gallery img {
  width: 78px;
  height: 78px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.review-form {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 0.8rem;
  align-items: end;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

th,
td {
  padding: 0.8rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.table-actions {
  display: flex;
  gap: 0.4rem;
}

.simple-page {
  padding: 4rem 0;
}

.simple-page.narrow {
  width: min(780px, 90vw);
}

.feature-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1.5rem;
}

.feature-row div {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.empty-state {
  padding: 2rem;
  text-align: center;
}

.small {
  font-size: 0.86rem;
}

.hide {
  display: none !important;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 5vw;
  background: var(--charcoal);
  color: #fff;
}

.site-footer p,
.footer-links a {
  color: rgba(255, 255, 255, 0.72);
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

@media (max-width: 1060px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    display: none;
    align-items: stretch;
    padding: 1rem 5vw;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: grid;
  }

  .notification-menu,
  .notification-menu .nav-pill {
    width: 100%;
  }

  .popover-panel {
    position: static;
    width: 100%;
    margin-top: 0.5rem;
    box-shadow: none;
  }

  .hero-search,
  .category-grid,
  .pro-grid,
  .metric-grid,
  .auth-layout,
  .auth-layout.wide,
  .split-section,
  .search-layout,
  .profile-hero,
  .detail-layout,
  .dashboard-grid,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    position: static;
  }

  .profile-main {
    flex-direction: column;
  }

  .profile-photo {
    flex-basis: auto;
    height: 300px;
  }
}

@media (max-width: 900px) {
  .hero {
    min-height: auto;
    padding-bottom: 2.5rem;
  }

  .hero-content {
    padding-bottom: 1rem;
  }

  .hero-stats {
    position: static;
    inset: auto;
    margin-top: 1.5rem;
    width: 100%;
  }
}

@media (max-width: 680px) {
  .site-header {
    padding: 0 1rem;
  }

  .brand span:last-child {
    max-width: 150px;
  }

  .hero {
    padding: 4.5rem 1rem 2.5rem;
  }

  .hero-stats div {
    flex: 1 1 120px;
  }

  .section,
  .simple-page,
  .form-shell,
  .dashboard-header,
  .metric-grid,
  .admin-layout,
  .dashboard-grid,
  .detail-layout,
  .search-layout,
  .page-hero,
  .profile-hero {
    width: min(100% - 2rem, 1180px);
  }

  .grid-form,
  .review-form {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: span 1;
  }

  .gallery-grid,
  .feature-row {
    grid-template-columns: 1fr;
  }

  .dashboard-header,
  .results-header,
  .site-footer,
  .card-title-row,
  .request-head,
  .pro-card-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .map-mini {
    min-width: 0;
  }
}

/* Professional motion polish */
:root {
  --ease-out: cubic-bezier(.19, 1, .22, 1);
}

body {
  background:
    linear-gradient(180deg, rgba(255,255,255,.78), rgba(246,248,251,.94) 42%, #f6f8fb 100%),
    radial-gradient(circle at 20% 0%, rgba(23,105,170,.08), transparent 34%),
    radial-gradient(circle at 88% 8%, rgba(169,129,47,.10), transparent 30%);
}

.site-header {
  box-shadow: 0 8px 28px rgba(23, 35, 49, 0.07);
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--orange), var(--green));
  opacity: .9;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(90deg, rgba(0,0,0,.55), transparent 74%);
}

.hero-content,
.hero-stats,
.page-hero,
.auth-copy,
.form-panel,
.dashboard-header,
.metric,
.profile-main,
.profile-actions {
  animation: fadeUp .72s var(--ease-out) both;
}

.hero-search {
  border: 1px solid rgba(255,255,255,.74);
  box-shadow: 0 24px 70px rgba(20, 24, 31, .22);
  transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out);
}

.hero-search:focus-within {
  transform: translateY(-3px);
  box-shadow: 0 30px 84px rgba(20, 24, 31, .30);
}

.button,
.icon-button,
.category-tile,
.pro-card,
.request-card,
.content-block,
.metric {
  transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out), border-color 220ms var(--ease-out), background-color 220ms var(--ease-out);
}

.button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.button-primary {
  box-shadow: 0 10px 24px rgba(169, 129, 47, .22);
}

.button-primary:hover {
  box-shadow: 0 14px 34px rgba(169, 129, 47, .30);
}

.pro-card,
.category-tile,
.content-block,
.request-card,
.form-panel,
.profile-main,
.profile-actions,
.filter-panel,
.side-panel {
  border-color: rgba(220, 228, 238, .9);
  box-shadow: 0 14px 34px rgba(23, 35, 49, .08);
}

.pro-card:hover,
.category-tile:hover,
.request-card:hover,
.content-block:hover,
.metric:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 44px rgba(20, 18, 14, .12);
}

.pro-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 38%, rgba(17,24,39,.58));
  opacity: .78;
}

.badge {
  position: relative;
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(14px);
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}

.hero h1,
.page-hero h1,
.profile-hero h1,
.auth-copy h1,
.simple-page h1,
.dashboard-header h1 {
  font-size: 3.4rem;
}

.page-hero.compact h1 {
  font-size: 2.65rem;
}

.section-heading h2,
.content-block h2 {
  font-size: 2rem;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }

  .reveal-on-scroll {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 680px) {
  .hero h1,
  .page-hero h1,
  .profile-hero h1,
  .auth-copy h1,
  .simple-page h1,
  .dashboard-header h1 {
    font-size: 2.25rem;
  }

  .page-hero.compact h1,
  .section-heading h2,
  .content-block h2 {
    font-size: 1.65rem;
  }
}



/* ===== Stars & reviews ===== */
.stars {
  display: inline-flex;
  gap: 2px;
  font-size: 1rem;
  line-height: 1;
  letter-spacing: 1px;
  white-space: nowrap;
}
.stars .star {
  color: var(--line);
}
.stars .star.filled {
  color: #f5a623;
}
.stars.stars-lg {
  font-size: 1.5rem;
}
.rating-pill {
  min-width: auto;
  height: auto;
  padding: 0.4rem 0.7rem;
  gap: 0.35rem;
  flex-direction: column;
}
.rating-pill .stars {
  font-size: 0.85rem;
}
.rating-count {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 700;
}
.rating-new {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 800;
}
.rating-summary {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.rating-summary strong {
  font-size: 1.3rem;
  color: var(--charcoal);
}
.review-item {
  border-bottom: 1px solid var(--line);
  padding: 0.9rem 0;
}
.review-item:last-child {
  border-bottom: none;
}
.review-item .stars {
  margin-inline-end: 0.5rem;
}
.review-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-weight: 800;
}

/* ===== Language switcher ===== */
.header-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  flex-shrink: 0;
}
.lang-switch a {
  display: inline-block;
  padding: 0.32rem 0.62rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  line-height: 1.2;
  text-decoration: none;
}
.lang-switch a.active {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 2px 6px rgba(23, 105, 170, 0.35);
}
.lang-switch a:not(.active):hover {
  background: rgba(23, 105, 170, 0.1);
  color: var(--blue-dark);
}

/* ===== RTL support (Arabic) ===== */
html[dir="rtl"] body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, Inter, sans-serif;
}
html[dir="rtl"] .site-header {
  flex-direction: row-reverse;
}
html[dir="rtl"] .main-nav {
  flex-direction: row-reverse;
}
html[dir="rtl"] .header-right {
  flex-direction: row-reverse;
}
html[dir="rtl"] .brand {
  flex-direction: row-reverse;
}
html[dir="rtl"] .hero {
  text-align: right;
}
html[dir="rtl"] .hero-stats,
html[dir="rtl"] .footer-links,
html[dir="rtl"] .badge-row,
html[dir="rtl"] .chip-row,
html[dir="rtl"] .inline-actions,
html[dir="rtl"] .card-title-row,
html[dir="rtl"] .pro-card-footer,
html[dir="rtl"] .request-head,
html[dir="rtl"] .results-header,
html[dir="rtl"] .profile-main,
html[dir="rtl"] .dashboard-header,
html[dir="rtl"] .table-actions {
  flex-direction: row-reverse;
}
html[dir="rtl"] .site-footer {
  flex-direction: row-reverse;
  text-align: right;
}
html[dir="rtl"] table {
  direction: rtl;
}
html[dir="rtl"] .nav-toggle span {
  margin-left: 0;
}

/* ===== Admin: visitor stats ===== */
.metric-grid-4 {
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 1.5rem;
}
.chart-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--charcoal);
  margin: 1.4rem 0 0.6rem;
}
.visit-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 120px;
  padding: 0.5rem;
  background: var(--surface-2);
  border-radius: var(--radius);
}
.visit-bar {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: flex-end;
}
.visit-bar-fill {
  display: block;
  width: 100%;
  min-height: 2px;
  background: var(--blue);
  border-radius: 2px 2px 0 0;
  transition: opacity 0.15s ease;
}
.visit-bar:hover .visit-bar-fill {
  opacity: 0.7;
  background: var(--orange);
}
.visit-chart-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

@media (max-width: 680px) {
  .metric-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== Accessibility: skip link + focus states ===== */
.skip-link {
  position: absolute;
  top: -60px;
  left: 1rem;
  z-index: 999;
  background: var(--blue-dark);
  color: #fff;
  padding: 0.7rem 1.1rem;
  border-radius: 0 0 var(--radius) var(--radius);
  font-weight: 800;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

main:focus-visible {
  outline: none;
}

/* ===== Admin dashboard: tabbed shell ===== */
.admin-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
  width: min(1180px, 92vw);
  margin: 0 auto 4rem;
}
.admin-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.6rem;
  position: sticky;
  top: 1rem;
}
.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.8rem;
  border-radius: calc(var(--radius) - 4px);
  font-weight: 700;
  color: var(--charcoal);
  font-size: 0.92rem;
}
.admin-nav-link:hover {
  background: var(--surface-2);
}
.admin-nav-link[aria-current="page"] {
  background: var(--blue);
  color: #fff;
}
.admin-nav-icon {
  width: 20px;
  text-align: center;
  font-size: 0.85rem;
}
.admin-content {
  min-width: 0;
}
.admin-content .content-block {
  margin-bottom: 1.25rem;
}

@media (max-width: 900px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  .admin-nav-link {
    flex: 1 1 auto;
    justify-content: center;
    font-size: 0.82rem;
    padding: 0.55rem 0.6rem;
  }
}

html[dir="rtl"] .admin-shell {
  direction: rtl;
}

/* ===== Promotion form in admin ===== */
.promo-form {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.promo-form select {
  padding: 0.4rem 0.5rem;
  border-radius: calc(var(--radius) - 4px);
  border: 1px solid var(--line);
}
.promo-status-active {
  color: #8a5a00;
  font-weight: 800;
}
.promo-status-none {
  color: var(--muted);
}
