:root{
  --bg:#EFE1D1;
  --bg-header: rgba(255, 255, 255, 0.6); /* semi-transparent */
  --bg-galery-img: #f6efe6;
  --surface:#ffffff;
  --text:#1f2937;
  --muted:#6b7280;
  --primary:#c9ad8a; /* soft beige accent */
  --primary-contrast:#1f2937;
  --border:#e7e2da;
  --shadow: 0 8px 24px rgba(0,0,0,.06);
}

/* Dark mode — automatic (prefers-color-scheme) and manual ([data-theme="dark"]) */
:root[data-theme="dark"]{
  --bg:#0f1216;
  --surface:#12161b;
  --text:#e5e7eb;
  --muted:#9aa4b2;
  --primary:#d8b98f; /* soft beige accent that works on dark */
  --primary-contrast:#111827;
  --border:#1f2430;
  --shadow: 0 8px 24px rgba(0,0,0,.4);
}
@media (prefers-color-scheme: dark){
  :root{
    --bg:#0f1216;
    --bg-header: rgba(239, 225, 209, 0.65); /* semi-transparent */
    --surface:#12161b;
    --text:#e5e7eb;
    --muted:#9aa4b2;
    --primary:#d8b98f;
    --primary-contrast:#111827;
    --border:#1f2430;
    --shadow: 0 8px 24px rgba(0,0,0,.4);
  }
  body{ background:linear-gradient(180deg,var(--bg),var(--surface) 60%); }
  .brand img{ box-shadow: 0 8px 24px rgba(0,0,0,.6); }
  .gallery img{ background:#0f1216; box-shadow: 0 8px 24px rgba(0,0,0,.6); }
}

/* Responsive */
@media (max-width: 860px){
  .card-inner{grid-template-columns:1fr auto;gap:12px}
}
@media (max-width: 520px){
  .nav{gap:10px}
  .nav a{padding:8px 10px}
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Inter,Arial,system-ui,sans-serif;
  min-height:100svh;
  color:var(--text);
  background:linear-gradient(180deg,var(--bg),var(--surface) 60%);
}

.container{width:min(1150px,92%);margin-inline:auto}

header{
  position:sticky;top:0;z-index:50;
  backdrop-filter: blur(8px);
  background-color: var(--bg-header);
  border-bottom:1px solid var(--border);
}
.navbar{
  display:flex;align-items:center;justify-content:space-between;
  padding:14px 0;
}
.brand{display:flex;
  align-items:center;
  gap:10px;
  font-weight:700;
  font-size:1.05rem;
  text-decoration:none;
  color:var(--text);
}
.brand img{
  width:32px;
  height:32px;
  border-radius:8px;
  box-shadow:var(--shadow);
}
.nav{display:flex;gap:18px;align-items:center}
.nav a{
  text-decoration:none;
  opacity:.9;
  padding:8px 10px;
  border-radius:12px;
  color:var(--text);
  border:1px solid transparent;
}
.nav a:hover{border-color:var(--border);background:var(--surface)}

/* Prevent the app title link from stretching across the grid cell */
.card-inner .app-title-btn{
  grid-area: title;      /* place it in the title area */
  justify-self: start;   /* do not stretch to full width */
  align-self: center;    /* vertical alignment */
  width: max-content;    /* shrink to its content */
}

.app-title-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
  padding: 8px 14px;
  border-radius: 12px;
}
.app-title-btn:hover {
  text-decoration: underline;
}
.app-title-btn:active {
  transform: translateY(1px);
}
.app-icon{
  width:50px; 
  vertical-align:middle; 
  margin-right:8px; 
  border-radius: 22%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

.hero{padding:42px 0 10px 0}
.hero h1{font-size:clamp(1.6rem,3.2vw,2.4rem);margin:0 0 8px 0}
.hero p{
  margin:0;
  color:var(--muted)
}

.hero-app{
  padding: 10px;
}
.hero-app .app-header {
  font-size: large;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.hero-app .app-logo {
  width: 70px;
  border-radius: 22%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

/* Cards / Apps */
.grid{display:grid;gap:22px;margin:26px 0 60px}
.card{
  border-radius:20px;
  overflow:hidden;
  background:var(--surface);
  border:1px solid var(--border);
  box-shadow:var(--shadow);
}
.card-inner{
  display:grid;
  grid-template-columns:1fr auto;
  grid-template-areas:
    "title action"
    "desc desc"
    "gallery gallery";
  gap:12px;
  padding:18px;
  align-items:start;
}
.card h3{grid-area:title;margin:6px 0 0;font-size:1.15rem}
.card p{
  grid-area:desc;
  margin:0 0 8px;
  line-height:1.55;
  color:var(--muted);
}

.description-app{
  gap:12px;
  padding:18px;
  align-items:start;
}

.btn{
  display:inline-block;
  padding:10px 14px;
  border-radius:12px;
  text-decoration:none;
  font-weight:600;
  transition:transform .06s ease;
  background:var(--primary);
  color:var(--primary-contrast);
  border:1px solid #c3aa8b;
}
.btn:active{transform:translateY(1px)}
.install-btn{grid-area:action;justify-self:end}

/* Always-visible preview gallery */
.gallery{ grid-area:gallery;
  display:flex;gap:10px;overflow-x:auto;padding-bottom:6px;
  scrollbar-width:thin;
}
.gallery img{
  flex:0 0 240px;
  width:240px;
  object-fit:contain;
  border-radius:14px;
  border:1px solid var(--border);
  background:var(--bg-galery-img);
}

.links-app{
  display: flex;
  gap: 20px;
  justify-content: flex-start;
  padding: 10px;
  color:var(--text);
  border:1px solid transparent;
}
.links-app a{
  text-decoration: none;
  color: inherit;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  transition: background-color .15s ease, border-color .15s ease;
}
.links-app a:hover{
  border-color:var(--border);
  background:var(--surface)
}

.policyDivider{
  width: 100%;
  height: 1px;
  border: none;
  background-color: var(--border);
}

/* Feedback / Assistance forms */
.section{padding:34px 0 60px}
.card.pad{padding:20px}
form{display:grid;gap:14px}
label{font-weight:600}

input,select,textarea{
  width:100%;padding:12px 14px;
  border-radius:12px;
  border:1px solid var(--border);
  background:var(--surface);
  color:var(--text);
}
textarea{min-height:140px;resize:vertical}

/* Footer */
footer{
  background: transparent; /* let the page background show through */
  padding-top: 5px;
  padding-bottom: 10px;
  border-top:1px solid var(--border);
  color:var(--muted);
}


/* Lightbox */
.lightbox{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.82);
  z-index: 1000;
  padding: 24px;
  cursor: zoom-out; /* click backdrop to close */
}
.lightbox.open{ display: flex; }
.lightbox .lb-img{
  max-width: 92vw;
  max-height: 86vh;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,.45);
}
.lightbox .lb-btn{
  position: absolute;
  border: none;
  background: rgba(0,0,0,.35);
  color: #fff;
  width: 44px; height: 44px;
  border-radius: 15px;
  font-size: 26px;
  cursor: pointer;
  user-select: none;
  display: inline-block;
  /* padding manuel via variables */
  --lb-btn-pt: 0px;  /* haut */
  --lb-btn-pr: 0px;   /* droite */
  --lb-btn-pb: 5px;   /* bas */
  --lb-btn-pl: 16px;  /* gauche */
  padding: var(--lb-btn-pt,0) var(--lb-btn-pr,0) var(--lb-btn-pb,0) var(--lb-btn-pl,0);
  line-height: normal;
  text-align: left;
}
.lightbox .lb-prev{ left: 18px; }
.lightbox .lb-next{ right: 18px; }
.lightbox .lb-close{
  top: 18px; right: 18px; left: auto;
  transform: none;
  width: 40px; height: 40px; font-size: 22px; 
  /* padding manuel via variables */
  --lb-close-pt: 0px;  /* haut */
  --lb-close-pr: 0px;   /* droite */
  --lb-close-pb: 3px;   /* bas */
  --lb-close-pl: 13px;  /* gauche */
  padding: var(--lb-close-pt,0) var(--lb-close-pr,0) var(--lb-close-pb,0) var(--lb-close-pl,0);
  line-height: normal;
  text-align: left;
}
.lightbox .lb-counter{
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(0,0,0,.35);
}

/* Improve scrollbars for horizontal gallery (optional) */
.gallery{ scroll-behavior: smooth; }



