/**
 * Sofia — Thème e-commerce (charpente dédiée)
 * Navbar top, pas de sidebar, design épuré et moderne
 */
:root {
  --sofia-primary: #0f0f23;
  --sofia-secondary: #1a1a2e;
  --sofia-accent: #e94560;
  --sofia-text: #e4e4e7;
  --sofia-text-muted: rgba(255,255,255,0.65);
  --sofia-radius: 16px;
  --sofia-radius-sm: 12px;
  --sofia-shadow: 0 10px 40px rgba(0,0,0,0.25);
  --sofia-transition: 0.25s ease;
}

.sofia-body {
  margin: 0;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--sofia-secondary);
  color: var(--sofia-text);
  min-height: 100vh;
  padding-top: 72px;
}

/* ----- Search overlay ----- */
.sofia-search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 35, 0.97);
  backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.sofia-search-overlay.is-open {
  opacity: 1;
  visibility: visible;
}
.sofia-search-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  opacity: 0.8;
}
.sofia-search-close:hover { opacity: 1; }
.sofia-search-inner {
  width: 100%;
  max-width: 560px;
  padding: 24px;
}
.sofia-search-inner form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.sofia-search-input {
  flex: 1;
  min-width: 200px;
  padding: 18px 24px;
  font-size: 1.1rem;
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: var(--sofia-radius-sm);
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-family: inherit;
}
.sofia-search-input::placeholder { color: rgba(255,255,255,0.5); }
.sofia-search-input:focus {
  outline: none;
  border-color: var(--sofia-accent);
  background: rgba(255,255,255,0.08);
}
.sofia-search-btn {
  padding: 18px 28px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--sofia-radius-sm);
  background: var(--sofia-accent);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
}
.sofia-search-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(233, 69, 96, 0.4);
}

/* ----- Header ----- */
.sofia-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(180deg, var(--sofia-primary) 0%, rgba(15,15,35,0.98) 100%);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}
.sofia-nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.sofia-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 1.25rem;
}
.sofia-logo img {
  height: 44px;
  width: auto;
  border-radius: 10px;
  object-fit: contain;
}
.sofia-logo-text { color: inherit; }
.sofia-nav-toggle {
  display: none;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  min-width: 110px;
  padding: 0 16px;
  border: 2px solid rgba(255,255,255,0.6);
  background: #1a1a1a;
  border-radius: 0 !important;
  cursor: pointer;
  color: #ffffff !important;
  font-size: 0.95rem;
  font-weight: 600;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  outline: none !important;
  transition: background var(--sofia-transition), border-color var(--sofia-transition);
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.sofia-nav-toggle:hover,
.sofia-nav-toggle:focus {
  background: #2a2a2a !important;
  border-color: rgba(255,255,255,0.8) !important;
  color: #ffffff !important;
}
.sofia-nav-toggle:focus-visible {
  box-shadow: 0 0 0 2px rgba(255,255,255,0.4);
}
.sofia-nav-toggle-bars {
  display: flex !important;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 22px;
  height: 18px;
  visibility: visible !important;
  opacity: 1 !important;
}
.sofia-nav-toggle-icon {
  width: 22px;
  height: 18px;
  color: #ffffff !important;
  fill: #ffffff !important;
  flex-shrink: 0;
}
.sofia-nav-toggle-label {
  display: inline-block !important;
  white-space: nowrap;
  visibility: visible !important;
  opacity: 1 !important;
  color: #ffffff !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  line-height: 1.2;
}
/* État ouvert : remplacer l’icône par une croix (JS peut ajouter une classe) */
.sofia-nav-toggle-icon rect {
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.sofia-nav-toggle[aria-expanded="true"] .sofia-nav-toggle-icon rect:nth-child(1) {
  transform-origin: 11px 1px;
  transform: rotate(45deg);
}
.sofia-nav-toggle[aria-expanded="true"] .sofia-nav-toggle-icon rect:nth-child(2) {
  opacity: 0;
}
.sofia-nav-toggle[aria-expanded="true"] .sofia-nav-toggle-icon rect:nth-child(3) {
  transform-origin: 11px 17px;
  transform: rotate(-45deg);
}
@media (max-width: 991px) {
  .sofia-nav-toggle { display: flex; }
  .sofia-nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--sofia-primary);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .sofia-nav.is-open { max-height: 280px; }
  .sofia-nav-list {
    flex-direction: column;
    padding: 16px 24px 24px;
    gap: 0;
  }
  .sofia-nav-list li {
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .sofia-nav-list a {
    display: block;
    padding: 14px 0;
  }
}
.sofia-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sofia-nav-list a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 10px;
  transition: color 0.2s, background 0.2s;
}
.sofia-nav-list a:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
}
.sofia-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sofia-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
  position: relative;
}
.sofia-icon-btn:hover { color: var(--sofia-accent); background: rgba(255,255,255,0.06); }
.sofia-cart-count {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--sofia-accent);
  color: #fff;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ----- Main ----- */
.sofia-main {
  min-height: calc(100vh - 72px - 200px);
  padding-bottom: 48px;
}

/* ----- Hero (home) ----- */
.sofia-hero {
  padding: 48px 24px 56px;
  text-align: center;
  background: linear-gradient(160deg, var(--sofia-primary) 0%, var(--sofia-secondary) 50%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sofia-hero-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  margin: 0 0 12px;
  color: #fff;
  letter-spacing: -0.02em;
}
.sofia-hero-sub {
  font-size: 1.1rem;
  color: var(--sofia-text-muted);
  margin: 0;
}

/* ----- Category grid (home) ----- */
.sofia-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}
.sofia-section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 48px 0 24px;
  color: #fff;
}
.sofia-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}
.sofia-cat-card {
  position: relative;
  border-radius: var(--sofia-radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: rgba(255,255,255,0.04);
  box-shadow: var(--sofia-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.sofia-cat-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}
.sofia-cat-card a {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
}
.sofia-cat-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.sofia-cat-card:hover img { transform: scale(1.05); }
.sofia-cat-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 50%);
  display: flex;
  align-items: flex-end;
  padding: 24px;
}
.sofia-cat-card-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.sofia-cat-card.no-img .sofia-cat-card-overlay {
  background: linear-gradient(135deg, var(--sofia-primary) 0%, var(--sofia-secondary) 100%);
  align-items: center;
  justify-content: center;
}

/* ----- Product grid ----- */
.sofia-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  padding: 24px 0 48px;
}
.sofia-product-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--sofia-radius);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.sofia-product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(0,0,0,0.3);
  border-color: rgba(233, 69, 96, 0.3);
}
.sofia-product-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.sofia-product-card-img {
  aspect-ratio: 1;
  background: rgba(0,0,0,0.2);
  overflow: hidden;
}
.sofia-product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.sofia-product-card:hover .sofia-product-card-img img { transform: scale(1.06); }
.sofia-product-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.sofia-product-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 8px;
  color: #f4f4f5;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sofia-product-card-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--sofia-accent);
  margin-top: auto;
  padding-top: 12px;
}
.sofia-product-card-actions {
  margin-top: 12px;
}
.sofia-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: var(--sofia-radius-sm);
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
}
.sofia-btn-primary {
  background: linear-gradient(135deg, var(--sofia-accent) 0%, #c73e54 100%);
  color: #fff;
  width: 100%;
}
.sofia-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(233, 69, 96, 0.4);
  color: #fff;
}
.sofia-btn-outline {
  background: transparent;
  color: rgba(255,255,255,0.9);
  border: 2px solid rgba(255,255,255,0.3);
  width: auto;
}
.sofia-btn-outline:hover {
  border-color: var(--sofia-accent);
  color: #fff;
  background: rgba(233, 69, 96, 0.15);
}

/* ----- Product detail ----- */
.sofia-product-detail {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 991px) {
  .sofia-product-detail { grid-template-columns: 1fr; }
}
.sofia-product-gallery {
  position: sticky;
  top: 96px;
  border-radius: var(--sofia-radius);
  overflow: hidden;
  background: rgba(0,0,0,0.2);
  aspect-ratio: 1;
}
@media (max-width: 991px) {
  .sofia-product-gallery {
    position: relative;
    top: auto;
  }
}
.sofia-product-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Gallery slider (plusieurs images) */
.sofia-product-gallery--slider .sofia-gallery-slider {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: inherit;
}
.sofia-product-gallery--slider .sofia-gallery-slides {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  height: 100%;
  width: 100%;
  touch-action: pan-x;
  scrollbar-width: none;
}
.sofia-product-gallery--slider .sofia-gallery-slides::-webkit-scrollbar {
  height: 0;
  display: none;
}
.sofia-product-gallery--slider .sofia-gallery-slide {
  flex: 0 0 100%;
  min-width: 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  box-sizing: border-box;
}
.sofia-product-gallery--slider .sofia-gallery-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
}
.sofia-product-gallery .sofia-gallery-slide img.sofia-gallery-img-tap {
  pointer-events: auto;
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}
.sofia-product-gallery--slider .sofia-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.sofia-product-gallery--slider .sofia-gallery-nav:hover {
  background: rgba(0,0,0,0.75);
}
.sofia-product-gallery--slider .sofia-gallery-prev { left: 12px; }
.sofia-product-gallery--slider .sofia-gallery-next { right: 12px; }
.sofia-product-gallery--slider .sofia-gallery-dots {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 2;
}
.sofia-product-gallery--slider .sofia-gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.4);
  padding: 0;
  cursor: pointer;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.sofia-product-gallery--slider .sofia-gallery-dot.is-active {
  background: var(--sofia-accent);
}
@media (max-width: 767px) {
  .sofia-product-gallery--slider .sofia-gallery-nav {
    display: none;
  }
}

/* Zoom overlay (clic / pinch) */
.sofia-gallery-zoom {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.sofia-gallery-zoom.is-open {
  opacity: 1;
  visibility: visible;
}
.sofia-gallery-zoom-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  -webkit-tap-highlight-color: transparent;
}
.sofia-gallery-zoom-close:hover {
  background: rgba(255,255,255,0.35);
}
.sofia-gallery-zoom-content {
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
}
.sofia-gallery-zoom-content img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.1s ease-out;
  transform-origin: center center;
}

.sofia-product-info h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 16px;
  color: #fff;
}
.sofia-product-info .sofia-product-price {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--sofia-accent);
  margin-bottom: 16px;
}
/* Contraste lisible sur fond sombre Sofia (fiche produit) */
.sofia-product-desc {
  color: var(--sofia-text);
  line-height: 1.7;
  margin-bottom: 24px;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  text-align: justify;
}
.sofia-product-desc p,
.sofia-product-desc li,
.sofia-product-desc td,
.sofia-product-desc th,
.sofia-product-desc dd,
.sofia-product-desc dt,
.sofia-product-desc span,
.sofia-product-desc div,
.sofia-product-desc strong,
.sofia-product-desc b {
  color: var(--sofia-text) !important;
}
.sofia-product-desc a {
  color: var(--sofia-accent);
  text-decoration: underline;
}
.sofia-product-desc a:hover {
  color: #ff6b7a;
}
.sofia-product-desc table {
  max-width: 100%;
  overflow-x: auto;
  display: block;
  border-collapse: collapse;
}
.sofia-product-desc th,
.sofia-product-desc td {
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,0.15);
  text-align: left;
}
.sofia-product-desc th {
  background: rgba(255,255,255,0.08);
  font-weight: 600;
  color: var(--sofia-text);
}
.sofia-product-desc img {
  max-width: 100%;
  height: auto;
  display: block;
}
.sofia-product-desc iframe,
.sofia-product-desc video,
.sofia-product-desc embed,
.sofia-product-desc object {
  max-width: 100%;
  height: auto;
}
.sofia-product-desc pre,
.sofia-product-desc code {
  max-width: 100%;
  overflow-x: auto;
  word-wrap: break-word;
  color: var(--sofia-text);
  background: rgba(255,255,255,0.06);
  padding: 12px;
  border-radius: var(--sofia-radius-sm);
  border: 1px solid rgba(255,255,255,0.08);
}
.sofia-qty-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.sofia-qty-row label { margin: 0; font-weight: 500; }
.sofia-qty-controls {
  display: flex;
  align-items: center;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--sofia-radius-sm);
  overflow: hidden;
}
.sofia-qty-controls button {
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.2s;
}
.sofia-qty-controls button:hover { background: rgba(255,255,255,0.12); }
.sofia-qty-controls input {
  width: 56px;
  height: 44px;
  border: none;
  background: transparent;
  color: #fff;
  text-align: center;
  font-size: 1rem;
  font-family: inherit;
}

/* ----- Cart ----- */
.sofia-cart-wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px 24px 48px;
}
.sofia-cart-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 24px;
  color: #fff;
}
.sofia-cart-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255,255,255,0.03);
  border-radius: var(--sofia-radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
}
.sofia-cart-table th,
.sofia-cart-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sofia-cart-table th {
  background: rgba(255,255,255,0.06);
  font-weight: 600;
  color: #fff;
}
.sofia-cart-summary {
  margin-top: 24px;
  padding: 24px;
  background: rgba(255,255,255,0.04);
  border-radius: var(--sofia-radius);
  border: 1px solid rgba(255,255,255,0.08);
}
.sofia-cart-continue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  margin-top: 12px;
  color: var(--sofia-accent);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: var(--sofia-radius-sm);
  background: transparent;
  transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.sofia-cart-continue:hover {
  color: var(--sofia-secondary);
  background: var(--sofia-accent);
  border-color: var(--sofia-accent);
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(233, 69, 96, 0.35);
}

/* ----- Content pages (about, contact, etc.) ----- */
.sofia-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}
.sofia-page h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 24px;
  color: #fff;
}
.sofia-page p {
  color: var(--sofia-text-muted);
  line-height: 1.8;
  margin-bottom: 16px;
}
.sofia-page .form-control {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  border-radius: var(--sofia-radius-sm);
  padding: 14px 18px;
}
.sofia-page .form-control:focus {
  border-color: var(--sofia-accent);
  background: rgba(255,255,255,0.08);
  color: #fff;
}
.sofia-page label { color: rgba(255,255,255,0.9); }

/* ----- Contact page — même charte visuelle que À propos ----- */
.sofia-contact-section {
  padding-bottom: 80px;
  position: relative;
}
.sofia-contact-section::before {
  content: '';
  position: absolute;
  inset: -20px -24px -40px;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(233, 69, 96, 0.08) 0%, transparent 55%);
  pointer-events: none;
  border-radius: var(--sofia-radius);
}
.sofia-contact-section .sofia-section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 32px;
  letter-spacing: 0.02em;
  position: relative;
  display: inline-block;
  padding-bottom: 12px;
}
.sofia-contact-section .sofia-section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--sofia-accent), transparent);
  border-radius: 2px;
}
.sofia-contact-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: start;
  margin-top: 8px;
  position: relative;
  animation: sofia-aboutus-fadeUp 0.6s ease-out both;
}
@media (max-width: 767px) {
  .sofia-contact-row {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .sofia-contact-section .sofia-section-title {
    font-size: 1.65rem;
  }
}
.sofia-contact-illustration {
  border-radius: var(--sofia-radius);
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 12px 40px rgba(0,0,0,0.2), 0 0 0 1px rgba(255,255,255,0.05) inset;
  padding: 20px;
  position: relative;
}
.sofia-contact-illustration::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--sofia-accent), transparent);
  border-radius: 4px 0 0 4px;
}
.sofia-contact-illustration a {
  display: block;
  text-decoration: none;
  color: inherit;
}
.sofia-contact-illustration img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  border-radius: 8px;
}
.sofia-contact-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  padding: 24px;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--sofia-text-muted);
}
.sofia-contact-summary {
  background: linear-gradient(165deg, rgba(255,255,255,0.09) 0%, rgba(255,255,255,0.04) 100%);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--sofia-radius);
  padding: 32px 28px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25), 0 0 0 1px rgba(255,255,255,0.06) inset;
  position: relative;
  overflow: hidden;
}
.sofia-contact-summary::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--sofia-accent);
  border-radius: 5px 0 0 5px;
}
.sofia-contact-summary h5 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 8px;
  color: #fff;
}
.sofia-contact-summary h5:not(:first-child) {
  margin-top: 20px;
}
.sofia-contact-summary p {
  margin: 0;
  color: var(--sofia-text);
  line-height: 1.75;
}
.sofia-contact-summary a {
  color: var(--sofia-accent);
  text-decoration: none;
}
.sofia-contact-summary a:hover {
  text-decoration: underline;
}
.sofia-contact-empty {
  color: var(--sofia-text-muted);
  font-style: italic;
}

/* ----- Footer ----- */
.sofia-footer {
  background: var(--sofia-primary);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 48px 24px 32px;
  margin-top: auto;
}
.sofia-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  text-align: center;
}
.sofia-footer-logo img {
  height: 40px;
  width: auto;
  border-radius: 8px;
  margin-bottom: 20px;
}
.sofia-footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  margin-bottom: 16px;
}
.sofia-footer-nav a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-weight: 500;
}
.sofia-footer-nav a:hover { color: var(--sofia-accent); }
.sofia-footer-social {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
}
.sofia-footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: var(--sofia-accent);
  border: 2px solid rgba(255,255,255,0.12);
  text-decoration: none;
  font-size: 1.35rem;
  transition: background 0.25s ease, color 0.25s ease, transform 0.2s, border-color 0.25s;
}
.sofia-footer-social a:hover {
  background: var(--sofia-accent);
  color: #fff;
  border-color: var(--sofia-accent);
  transform: scale(1.08);
}
.sofia-footer-social a i {
  font-size: inherit;
}
.sofia-footer-copy {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.5);
}
.sofia-footer-copy a {
  color: var(--sofia-accent);
  text-decoration: none;
}

/* Modal (panier) */
.sofia-body .modal-content.sofia-modal-content {
  background: var(--sofia-secondary);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--sofia-radius);
  color: var(--sofia-text);
}
.sofia-body .modal-header {
  border-color: rgba(255,255,255,0.08);
}
.sofia-body .modal-header .close {
  color: #fff;
  opacity: 0.8;
}
.sofia-body .modal-footer.sofia-modal-footer {
  border-color: rgba(255,255,255,0.08);
  padding: 1rem 1.25rem;
  gap: 12px;
  flex-wrap: wrap;
}
.sofia-body .modal-footer.sofia-modal-footer .sofia-btn {
  width: auto;
}
.sofia-body .pagination .page-link {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.1);
  color: var(--sofia-accent);
}
.sofia-body .pagination .page-item.active .page-link {
  background: var(--sofia-accent);
  border-color: var(--sofia-accent);
  color: #fff;
}
.sofia-body .pagination .page-link:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

/* ----- Alerts ----- */
.sofia-alert {
  padding: 20px 24px;
  border-radius: var(--sofia-radius-sm);
  margin-bottom: 24px;
}
.sofia-alert-success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #86efac;
}
.sofia-alert-info {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #93c5fd;
}
.sofia-alert-warning {
  background: rgba(234, 179, 8, 0.15);
  border: 1px solid rgba(234, 179, 8, 0.4);
  color: #fde047;
}

/* ----- Flash messages (CakePHP Flash->render) ----- */
.sofia-body .alert {
  padding: 16px 20px;
  border-radius: var(--sofia-radius-sm);
  margin-bottom: 20px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  max-width: 100%;
  cursor: pointer;
  transition: opacity var(--sofia-transition);
}
.sofia-body .alert[onclick]:hover {
  opacity: 0.9;
}
.sofia-body .alert.alert-info,
.sofia-body .alert.alert-fill-info {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.35);
  color: #93c5fd;
}
.sofia-body .alert.alert-success,
.sofia-body .alert.alert-fill-success {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.35);
  color: #86efac;
}
.sofia-body .alert.alert-warning,
.sofia-body .alert.alert-fill-warning {
  background: rgba(234, 179, 8, 0.15);
  border-color: rgba(234, 179, 8, 0.35);
  color: #fde047;
}
.sofia-body .alert.alert-danger,
.sofia-body .alert.alert-fill-danger {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.45);
  color: #fca5a5;
}
.sofia-body .alert.alert-fill-danger {
  background: rgba(233, 69, 96, 0.2);
  border-color: rgba(233, 69, 96, 0.5);
  color: #fecdd3;
}

/* ----- Breadcrumb ----- */
.sofia-breadcrumb {
  padding: 16px 24px;
  max-width: 1280px;
  margin: 0 auto;
  font-size: 0.9rem;
  color: var(--sofia-text-muted);
}
.sofia-breadcrumb a {
  color: var(--sofia-accent);
  text-decoration: none;
}
.sofia-breadcrumb a:hover { text-decoration: underline; }

/* ----- Cart page items (same logic as Mina, styled for Sofia) ----- */
.sofia-body .cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.sofia-body .cart-item.sofia-cart-item {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 16px;
  align-items: center;
  padding: 16px 20px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sofia-body .cart-item.sofia-cart-item:last-child {
  border-radius: 0 0 12px 12px;
}
.sofia-body .cart-product-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sofia-body .cart-product-img {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}
.sofia-body .cart-product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sofia-body .cart-product-details h5 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--sofia-text);
}
.sofia-body .cart-product-price {
  color: var(--sofia-accent);
  font-weight: 600;
}
.sofia-body .cart-qty-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sofia-body .qty-wrapper {
  display: flex;
  align-items: center;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  overflow: hidden;
}
.sofia-body .qty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.08);
  color: var(--sofia-text);
  cursor: pointer;
  border: none;
  font-size: 1.1rem;
  line-height: 1;
}
.sofia-body .qty-btn:hover {
  background: var(--sofia-accent);
  color: #fff;
}
.sofia-body .qty-input {
  width: 40px;
  text-align: center;
  border: none;
  background: transparent;
  color: var(--sofia-text);
  font-weight: 600;
}
.sofia-body .cart-item-delete {
  cursor: pointer;
  color: rgba(255,255,255,0.5);
  padding: 4px 8px;
  margin-left: 8px;
}
.sofia-body .cart-item-delete:hover {
  color: #ef4444;
}
@media (max-width: 991px) {
  .sofia-body .cart-item.sofia-cart-item {
    grid-template-columns: 1fr;
    text-align: left;
  }
}

/* ----- Product share (Sofia) ----- */
.sofia-product-share {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
.sofia-product-share-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--sofia-text-muted);
  margin-right: 6px;
}
.sofia-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: var(--sofia-accent);
  border: 2px solid rgba(255,255,255,0.15);
  transition: background var(--sofia-transition), color var(--sofia-transition), transform 0.2s, border-color 0.2s;
}
.sofia-share-btn:hover {
  background: var(--sofia-accent);
  color: #fff;
  border-color: var(--sofia-accent);
  transform: scale(1.08);
  text-decoration: none;
}
.sofia-share-btn i {
  font-size: 1.5rem;
}

/* ----- About us (Sofia) — structure type Contact, rendu plus sexy ----- */
.sofia-aboutus-section {
  padding-bottom: 80px;
  position: relative;
}
.sofia-aboutus-section::before {
  content: '';
  position: absolute;
  inset: -20px -24px -40px;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(233, 69, 96, 0.08) 0%, transparent 55%);
  pointer-events: none;
  border-radius: var(--sofia-radius);
}
.sofia-aboutus-section .sofia-section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 32px;
  letter-spacing: 0.02em;
  position: relative;
  display: inline-block;
  padding-bottom: 12px;
}
.sofia-aboutus-section .sofia-section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--sofia-accent), transparent);
  border-radius: 2px;
}
.sofia-aboutus-row {
  display: grid;
  grid-template-columns: minmax(0, 28%) 1fr;
  gap: 36px;
  align-items: start;
  margin-top: 8px;
  position: relative;
  animation: sofia-aboutus-fadeUp 0.6s ease-out both;
}
@keyframes sofia-aboutus-fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.sofia-aboutus-row .sofia-aboutus-summary:only-child {
  grid-column: 1 / -1;
}
@media (max-width: 767px) {
  .sofia-aboutus-row {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .sofia-aboutus-section .sofia-section-title {
    font-size: 1.65rem;
  }
}
.sofia-aboutus-illustration {
  border-radius: var(--sofia-radius);
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 12px 40px rgba(0,0,0,0.2), 0 0 0 1px rgba(255,255,255,0.05) inset;
  padding: 20px;
  position: relative;
}
.sofia-aboutus-illustration::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--sofia-accent), transparent);
  border-radius: 4px 0 0 4px;
}
.sofia-aboutus-illustration a {
  display: block;
  text-decoration: none;
  color: inherit;
}
.sofia-aboutus-illustration img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  border-radius: 8px;
}
.sofia-aboutus-summary {
  background: linear-gradient(165deg, rgba(255,255,255,0.09) 0%, rgba(255,255,255,0.04) 100%);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--sofia-radius);
  padding: 32px 28px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25), 0 0 0 1px rgba(255,255,255,0.06) inset;
  position: relative;
  overflow: hidden;
}
.sofia-aboutus-summary::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--sofia-accent);
  border-radius: 5px 0 0 5px;
}
.sofia-aboutus-desc {
  text-align: justify;
  line-height: 1.85;
  hyphens: auto;
  -webkit-hyphens: auto;
}
.sofia-aboutus-desc p {
  text-align: justify;
  margin-bottom: 1.25rem;
}
.sofia-aboutus-desc p:first-child {
  margin-top: 0;
}
.sofia-aboutus-desc p:first-child::first-letter {
  font-size: 1.15em;
  font-weight: 700;
  color: var(--sofia-accent);
  float: left;
  line-height: 1;
  margin-right: 6px;
  margin-top: 2px;
}
.sofia-aboutus-desc p:last-child {
  margin-bottom: 0;
}
.sofia-aboutus-desc li,
.sofia-aboutus-desc td,
.sofia-aboutus-desc th {
  text-align: justify;
}
