/* Artech Servers — overrides & complementary styles */
[x-cloak]{display:none !important;}

/* Compense la hauteur du header sticky lors du scroll vers une ancre (#devis, #contact, etc.)
   Sans ça, le header sticky (~88px) recouvre le haut de la section ciblée et on voit
   apparaître l'élément trop haut, partiellement caché. */
:root{--as-header-h:88px;}
html{scroll-behavior:smooth;}
section[id],[data-anchor],h1[id],h2[id],h3[id]{
  scroll-margin-top:calc(var(--as-header-h) + 24px);
}
/* Sur mobile le header est un peu plus compact mais le menu peut ouvrir une bande
   plus large : on garde une marge confortable. */
@media (max-width:768px){
  :root{--as-header-h:72px;}
}

.artech-form .form-feedback{min-height:1.25rem;font-size:.95rem;}
.artech-form .form-feedback.error{color:var(--as-danger);}
.artech-form .form-feedback.success{color:var(--as-success);}

.btn.disabled,.btn[disabled]{opacity:.5;pointer-events:none;cursor:not-allowed;}

.search-form input{padding:.65rem 1rem;border:1px solid var(--as-border);border-radius:var(--as-radius-sm);}

.cart-drawer-backdrop{transition:opacity .25s;}

@media (prefers-reduced-motion: reduce){
  *{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;}
  html{scroll-behavior:auto;}
}

/* Splide light tweaks */
.splide__pagination__page.is-active{background:var(--as-primary);}
.splide__arrow{background:#fff;box-shadow:var(--as-shadow);}

/* LATEST POSTS (derniers articles du blog en home) */
.latest-posts{position:relative;background:linear-gradient(180deg,#F8FAFC 0%,#ffffff 100%);}
.latest-posts .posts-grid{
  display:grid;
  gap:1.5rem;
  grid-template-columns:repeat(1,minmax(0,1fr));
}
@media(min-width:700px){.latest-posts .posts-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(min-width:1000px){.latest-posts .posts-grid{grid-template-columns:repeat(3,minmax(0,1fr));}}

.post-card{
  display:flex;flex-direction:column;
  background:#fff;
  border:1px solid var(--as-border,#e2e8f0);
  border-radius:var(--as-radius,12px);
  overflow:hidden;
  transition:transform .25s cubic-bezier(.2,.9,.3,1.2),box-shadow .25s,border-color .25s;
}
.post-card:hover{transform:translateY(-4px);box-shadow:0 18px 40px -20px rgba(15,23,42,.18);border-color:transparent;}

.post-card-thumb{
  position:relative;display:block;
  aspect-ratio:16/9;background:#f1f5f9;overflow:hidden;
}
.post-card-thumb img{width:100%;height:100%;object-fit:cover;transition:transform .5s cubic-bezier(.2,.9,.3,1.2);}
.post-card:hover .post-card-thumb img{transform:scale(1.05);}
.post-card-thumb-placeholder{width:100%;height:100%;display:flex;align-items:center;justify-content:center;color:#94a3b8;background:linear-gradient(135deg,#f1f5f9,#e2e8f0);}
.post-card-cat{
  position:absolute;top:.75rem;left:.75rem;
  background:rgba(255,255,255,.95);backdrop-filter:blur(6px);
  color:var(--as-primary,#2563eb);
  font-size:.72rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;
  padding:.3rem .65rem;border-radius:999px;
  border:1px solid rgba(37,99,235,.15);
}

.post-card-body{padding:1.25rem 1.25rem 1.5rem;display:flex;flex-direction:column;gap:.6rem;flex:1;}
.post-card-meta{display:flex;align-items:center;gap:.4rem;font-size:.78rem;color:var(--as-muted-fg,#64748b);font-weight:500;}
.post-card-meta .dot{opacity:.5;}
.post-card-title{margin:0;font-size:1.15rem;line-height:1.35;font-weight:700;letter-spacing:-.01em;}
.post-card-title a{color:var(--as-fg,#0f172a);text-decoration:none;transition:color .2s;}
.post-card-title a:hover{color:var(--as-primary,#2563eb);}
.post-card-excerpt{margin:0;font-size:.92rem;color:var(--as-muted-fg,#64748b);line-height:1.55;flex:1;}
.post-card-link{
  display:inline-flex;align-items:center;gap:.35rem;
  color:var(--as-primary,#2563eb);font-weight:600;font-size:.9rem;
  text-decoration:none;
  margin-top:.25rem;
  transition:gap .2s;
}
.post-card-link:hover{gap:.55rem;}
.post-card-link svg{transition:transform .2s;}
.post-card:hover .post-card-link svg{transform:translateX(2px);}

/* Print invoice helper */
@media print{
  .site-header,.site-footer,.cart-drawer,.cart-drawer-backdrop,.toast-container,.add-to-cart-sticky{display:none !important;}
}
