/* ================================
   base.css — Styles généraux ZaraSpace
   ================================ */

/* =================================
   VARIABLES
   ================================= */
:root {
  --header-h: 50px;
  --stick-top: 55px;

  /* ✅ Variables bottom nav */
  --zs-bottom-nav-h: 55px;
  --zs-bottom-padding-show: 60px;
  --zs-bottom-padding-hide: 5px;

  /* ✅ MAJ wizard */
  --zs-maj-footer-reserve: 10px;
}

/* =================================
   STRUCTURE GLOBALE + TYPO
   ================================= */
html,
body {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  background-color: lightgrey;

  font-family: "Inter", "Roboto", "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: #212529;
}

.page-viewport {
  min-height: 100vh;
  padding-top: var(--header-h);
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

.page-viewport.container-fluid {
  padding-left: 0;
  padding-right: 0;
}

/* =================================
   TYPOGRAPHIE
   ================================= */
p {
  margin-top: 0;
  margin-bottom: 0.8rem;
  font-size: 1rem;
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 500;
  line-height: 1.25;
  margin-top: 1.2rem;
  margin-bottom: 0.6rem;
  color: #111;
}

h1 { font-size: 1.2rem; }
h2 { font-size: 1.175rem; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1.05rem; }

a {
  color: #0d6efd;
  text-decoration: none;
  transition: color 0.15s ease-in-out;
}
a:hover {
  color: #0a58ca;
  text-decoration: none;
}

.small,
small {
  font-size: 0.8rem;
  color: #6c757d;
}

ul, ol {
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  padding-left: 1.25rem;
}

/* =================================
   SIDEbars (communs)
   ================================= */
.sidebar-left,
.sidebar-right {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sidebar-left::-webkit-scrollbar,
.sidebar-right::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* =================================
   MODALES (base)
   ================================= */
.modal-dialog-scrollable .modal-body {
  max-height: 95vh;
  overflow-y: auto;
  overflow-x: hidden;
}

.modal-body,
.modal-body p,
.modal-body a,
.modal-body span,
.modal-body div,
.likes-items,
.comments-items,
.interesses-items {
  word-wrap: break-word;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* =================================
   CKEDITOR 5
   ================================= */
.ck-editor__editable,
.ck-content {
  font-family: "Inter", "Roboto", "Segoe UI", Arial, sans-serif;
  color: #212529;
}

.modal-body {
  color: #212529;
;
}

/* =================================
   Helpers images/cards
   ================================= */
.zs-cover-photo-wrapper { border-radius: .5rem; overflow: hidden; }
.zs-cover-photo-img { width: 100%; height: auto; display: block; }
.zs-cover-overlay { position: absolute; inset: 0; padding: .5rem 1rem; }
.zs-cover-name { font-weight: 600; font-size: 1.5rem; text-shadow: 0 2px 4px rgba(0,0,0,.6); color: #fff; }
.zs-cover-subtitle { font-size: .95rem; color: #f8f9fa; opacity: .9; }

.zs-cover-default { width: 100%; background: #e9ecef; }
.zs-cover-name-default { color: #343a40; text-shadow: none; text-transform: uppercase; letter-spacing: 0.05em; }
.zs-cover-subtitle-default { color: #6c757d; }

.zs-img-square-wrapper {
  position: relative;
  width: 100%;
  padding-top: 100%;
  background-color: #ffffff;
  overflow: hidden;
  border-radius: .25rem;
}
.zs-img-square-wrapper img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.zs-img-full-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: .25rem;
}

.zs-card-text-inline p { display: inline; margin: 0; }
.zs-card-text-inline .zs-more-link { white-space: nowrap; }

/* =========================================================
   MAJ wizard (base commun)
   ========================================================= */
.zs-maj-shell{
  min-height: calc(100vh - var(--stick-top));
}

/* =========================================
   MOBILE & TABLET  (≤ 991.98px)
   ========================================= */
@media (max-width: 991.98px) {

  /* ✅ Laisser de la place au bottom nav sur mobile */
  .page-viewport {
    padding-bottom: var(--zs-bottom-padding-show);
    transition: padding-bottom .22s ease;
  }

  body.zs-bottom-nav-hidden .page-viewport,
  body.zs-bottom-nav-focus .page-viewport {
    padding-bottom: var(--zs-bottom-padding-hide);
  }

  body.zs-bottom-nav-always .page-viewport,
  body.zs-bottom-nav-always.zs-bottom-nav-hidden .page-viewport{
    padding-bottom: var(--zs-bottom-padding-show) !important;
  }

  /* ✅ MAJ wizard : footer sticky au-dessus bottom nav */
  .zs-maj-footer-nav{
    position: sticky;
    z-index: 6;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
    background: rgba(255,255,255,.98);
    padding: .5rem .25rem;
    border-top: 1px solid rgba(0,0,0,.06);
    border-bottom-left-radius: .5rem;
    border-bottom-right-radius: .5rem;
    backdrop-filter: blur(6px);
  }

  body:not(.zs-bottom-nav-hidden) .zs-maj-footer-nav,
  body.zs-bottom-nav-always .zs-maj-footer-nav{
    bottom: calc(var(--zs-bottom-nav-h) + env(safe-area-inset-bottom, 0px));
  }

  body:not(.zs-bottom-nav-hidden) .zs-maj-body,
  body.zs-bottom-nav-always .zs-maj-body{
    padding-bottom: calc(var(--zs-maj-footer-reserve) + var(--zs-bottom-nav-h));
  }
}

/* =========================================
   DESKTOP (≥ 992px)
   ========================================= */
@media (min-width: 992px) {

  :root {
    --header-h: 55px;
    --stick-top: 60px;
  }

  /* Desktop (lg+) : footer collé en bas de la carte */
  .zs-maj-card{
    min-height: calc(100vh - var(--stick-top));
  }

  /* Sidebars fixées + scroll interne */
  .sidebar-left,
  .sidebar-right {
    position: sticky;
    top: var(--stick-top);
    max-height: calc(100vh - var(--stick-top));
    overflow-y: auto;
    overflow-x: hidden;
    /* padding-bottom: 5px; */
  }

  .main-surface {
    min-height: calc(100vh - var(--stick-top));
    /* padding-bottom: 5px; */
  }
}

/* =========================================
   MODALES — BREAKPOINTS
   ========================================= */
@media (max-width: 576px) {
  .modal-dialog {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    height: 100% !important;
  }

  .modal-content {
    height: 100vh !important;
    border-radius: 0 !important;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .modal-lg-custom {
    max-width: 100% !important;
    width: 100% !important;
  }
}

@media (min-width: 576px) and (max-width: 991.98px) {
  .modal-lg-custom {
    max-width: 90% !important;
    margin: 0 auto !important;
  }
}

@media (min-width: 992px) and (max-width: 1399.98px) {
  .modal-lg-custom {
    max-width: 80% !important;
    margin: 0 auto !important;
  }
}

@media (min-width: 1400px) {
  .modal-lg-custom {
    max-width: 70% !important;
    margin: 0 auto !important;
  }
}
