/* ===== PRINTAXIS — BASE.CSS ===== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  line-height: 1.65;
  overflow-x: hidden;
  transition: background 0.4s, color 0.4s;
}

img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
ul, ol { list-style: none; }

/* SCROLLBAR */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 4px; }

/* NOISE TEXTURE */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

/* GRADIENT TEXT */
.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 50%, var(--accent) 100%);
  background-size: 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}
@keyframes shimmer { 0% { background-position: 0%; } 100% { background-position: 200%; } }

/* SECTION */
.section {
  padding: 100px 24px;
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 16px;
  display: block;
}

.section-title {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(1.6rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 20px;
}

.section-sub {
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  color: var(--text2);
  max-width: 540px;
  font-weight: 300;
}

/* PAGE HEADER */
.page-header {
  padding: 80px 24px 60px;
  text-align: center;
  position: relative;
  z-index: 1;
  overflow: hidden;
}
.page-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

/* CARDS */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 20px;
  margin-top: 60px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  transition: transform 0.3s, border-color 0.3s;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), var(--card-glow), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.card:hover::before { opacity: 1; }
.card:hover { border-color: rgba(0,212,255,0.25); transform: translateY(-4px); }
.card-icon {
  width: 52px; height: 52px; border-radius: 12px;
  background: linear-gradient(135deg,rgba(0,212,255,0.15),rgba(123,47,255,0.15));
  border: 1px solid rgba(0,212,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 20px;
}
.card h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 10px; }
.card p { font-size: 0.9rem; color: var(--text2); line-height: 1.7; }

/* BUTTONS */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  box-shadow: 0 0 40px rgba(0,212,255,0.2);
  border: none;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 60px rgba(0,212,255,0.35); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  transition: background 0.2s, border-color 0.2s;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
}
.btn-secondary:hover { background: var(--surface-hover); border-color: rgba(255,255,255,0.18); }

/* BADGES */
.badge { display:inline-block; padding:4px 12px; border-radius:100px; font-size:0.75rem; font-weight:600; }
.badge-pending { background:rgba(255,183,0,0.15);  color:#ffb700;        border:1px solid rgba(255,183,0,0.3); }
.badge-print   { background:rgba(0,212,255,0.12);  color:var(--accent);  border:1px solid rgba(0,212,255,0.25); }
.badge-done    { background:rgba(46,213,115,0.12); color:var(--success); border:1px solid rgba(46,213,115,0.25); }
.badge-cancel  { background:rgba(255,71,87,0.12);  color:var(--danger);  border:1px solid rgba(255,71,87,0.25); }
.badge-new     { background:rgba(123,47,255,0.15); color:var(--accent2); border:1px solid rgba(123,47,255,0.3); }

/* FORMS */
.form-group { margin-bottom: 20px; }
label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text2);
  margin-bottom: 8px;
}
input, textarea, select {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  -webkit-appearance: none;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.1);
}
textarea { resize: vertical; min-height: 120px; }
select option { background: var(--bg); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* NOTIFICATION */
.notif {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 24px;
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 9999;
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
  white-space: nowrap;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  max-width: calc(100vw - 32px);
  white-space: normal;
  text-align: center;
}
.notif.show    { transform: translateX(-50%) translateY(0); }
.notif.success { border-color: rgba(46,213,115,0.4);  color: var(--success); }
.notif.error   { border-color: rgba(255,71,87,0.4);   color: var(--danger); }
.notif.info    { border-color: rgba(0,212,255,0.4);   color: var(--accent); }

/* SCROLL TO TOP */
#scrollTop {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 900;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: none;
  align-items: center; justify-content: center;
  font-size: 1.1rem;
  color: #fff;
  box-shadow: 0 4px 20px rgba(0,212,255,0.3);
  transition: transform 0.2s, box-shadow 0.2s;
  border: none; cursor: pointer;
}
#scrollTop.show { display: flex; }
#scrollTop:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(0,212,255,0.5); }

/* SCROLL REVEAL */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* LEGAL PAGES */
.legal-content { max-width: 860px; margin: 0 auto; padding: 60px 24px 100px; position: relative; z-index: 1; }
.legal-content h2 { font-family: 'Orbitron', sans-serif; font-size: 1.1rem; font-weight: 600; color: var(--accent); margin: 40px 0 12px; }
.legal-content h3 { font-size: 1rem; font-weight: 600; margin: 24px 0 8px; }
.legal-content p  { font-size: 0.9rem; color: var(--text2); line-height: 1.8; margin-bottom: 12px; }
.legal-content ul { list-style: disc; padding-left: 20px; margin-bottom: 12px; }
.legal-content ul li { font-size: 0.9rem; color: var(--text2); line-height: 1.8; }
.legal-divider { height: 1px; background: var(--border); margin: 32px 0; border: none; }

/* =============================================
   RESPONSIVE — MOBILE FIRST
   ============================================= */

/* Tablette */
@media (max-width: 900px) {
  .section { padding: 80px 20px; }
  .page-header { padding: 60px 20px 44px; }
  .cards-grid { gap: 16px; }
}

/* Mobile */
@media (max-width: 768px) {
  .section { padding: 60px 16px; }
  .page-header { padding: 48px 16px 36px; }
  .cards-grid { grid-template-columns: 1fr; gap: 14px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .card { padding: 24px 20px; }
  .btn-primary, .btn-secondary { padding: 13px 24px; font-size: 0.95rem; }
  .legal-content { padding: 40px 16px 60px; }
  .legal-content h2 { font-size: 0.95rem; }
}

/* Petit mobile */
@media (max-width: 480px) {
  .section { padding: 48px 14px; }
  .page-header { padding: 40px 14px 28px; }
  .section-title { font-size: clamp(1.4rem, 7vw, 2rem); }
  #scrollTop { bottom: 16px; right: 16px; width: 40px; height: 40px; font-size: 1rem; }
}
