/* =========================================================================
   LOMOPAY — Design System
   ========================================================================= */

:root {
  /* Couleurs — palette violet/indigo moderne */
  --primary:       #7c3aed;
  --primary-dark:  #6d28d9;
  --primary-light: #a78bfa;
  --accent:        #ec4899;
  --accent-dark:   #db2777;

  --success: #10b981;
  --warning: #f59e0b;
  --danger:  #ef4444;
  --info:    #3b82f6;

  /* Surfaces */
  --bg:        #0a0a0f;
  --bg-soft:   #12121a;
  --surface:   #1a1a25;
  --surface-2: #22222e;
  --border:    rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  /* Texte */
  --text:        #f1f5f9;
  --text-muted:  #94a3b8;
  --text-faint:  #64748b;

  /* Effets */
  --gradient-primary: linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);
  --gradient-soft:    linear-gradient(135deg, rgba(124,58,237,.15) 0%, rgba(236,72,153,.15) 100%);
  --gradient-mesh:    radial-gradient(at 20% 20%, rgba(124,58,237,.25) 0%, transparent 50%),
                      radial-gradient(at 80% 0%, rgba(236,72,153,.20) 0%, transparent 50%),
                      radial-gradient(at 0% 80%, rgba(59,130,246,.15) 0%, transparent 50%);

  --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
  --shadow:    0 4px 16px rgba(0,0,0,.3);
  --shadow-lg: 0 20px 50px rgba(0,0,0,.5);
  --shadow-glow: 0 0 40px rgba(124,58,237,.3);

  /* Espacement / rayons */
  --radius-sm: 6px;
  --radius:    12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  /* Typo */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  --font-display: 'Space Grotesk', var(--font);

  /* Layout */
  --container: 1200px;
  --header-height: 72px;
}

/* Mode clair (optionnel) */
[data-theme="light"] {
  --bg:        #fafaff;
  --bg-soft:   #f1f1f9;
  --surface:   #ffffff;
  --surface-2: #f5f5fa;
  --border:    rgba(0,0,0,.08);
  --border-strong: rgba(0,0,0,.16);
  --text:        #0f172a;
  --text-muted:  #475569;
  --text-faint:  #94a3b8;
}

/* =========================================================================
   RESET & BASE
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

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

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  background-image: var(--gradient-mesh);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: var(--primary-light); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }

p { color: var(--text-muted); }

input, button, textarea, select { font: inherit; color: inherit; }

button { cursor: pointer; border: 0; background: none; }

/* =========================================================================
   LAYOUT
   ========================================================================= */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }

@media (max-width: 768px) {
  .section { padding: 3rem 0; }
}

.grid { display: grid; gap: 1.5rem; }
.flex { display: flex; gap: 1rem; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }

/* =========================================================================
   BOUTONS
   ========================================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .01em;
  cursor: pointer;
  transition: all .2s cubic-bezier(.4,0,.2,1);
  border: 1px solid transparent;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 20px rgba(124,58,237,.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(124,58,237,.5);
  color: white;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  background: var(--surface-2);
  border-color: var(--primary);
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover { color: var(--text); background: var(--surface); }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; transform: translateY(-1px); color: white; }

.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #059669; transform: translateY(-1px); color: white; }

.btn-block { width: 100%; }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; border-radius: var(--radius-lg); }
.btn-sm { padding: .5rem 1rem; font-size: .85rem; }

.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* =========================================================================
   FORMULAIRES
   ========================================================================= */
.form-group { margin-bottom: 1.25rem; }

.form-label {
  display: block;
  margin-bottom: .5rem;
  font-size: .9rem;
  font-weight: 500;
  color: var(--text);
}

.form-control {
  width: 100%;
  padding: .85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
  transition: all .2s;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(124,58,237,.15);
}
.form-control::placeholder { color: var(--text-faint); }

textarea.form-control { resize: vertical; min-height: 100px; }

.form-error {
  color: var(--danger);
  font-size: .85rem;
  margin-top: .35rem;
}

.form-help {
  color: var(--text-faint);
  font-size: .85rem;
  margin-top: .35rem;
}

/* =========================================================================
   CARTES
   ========================================================================= */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all .3s;
}
.card:hover { border-color: var(--border-strong); }

.card-glass {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
}

/* =========================================================================
   HEADER (NAVIGATION)
   ========================================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10,10,15,.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
  display: flex;
  align-items: center;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--text);
  text-decoration: none;
}
.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--gradient-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  color: white;
  box-shadow: 0 4px 16px rgba(124,58,237,.4);
  overflow: hidden;
  flex-shrink: 0;
  padding: 0;
}
.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: .95rem;
  position: relative;
  transition: color .2s;
}
.nav a:hover, .nav a.active { color: var(--text); }

.nav-actions { display: flex; gap: .75rem; align-items: center; }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
}

@media (max-width: 900px) {
  .nav, .nav-actions { display: none; }
  .nav-toggle { display: flex; }

  .nav.open, .nav-actions.open {
    display: flex;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-soft);
    flex-direction: column;
    padding: 1.25rem;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
    align-items: stretch;
  }
  .nav-actions.open { top: calc(var(--header-height) + var(--menu-offset, 0px)); }
}

/* =========================================================================
   FOOTER
   ========================================================================= */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
  background: var(--bg-soft);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-brand p { margin-top: 1rem; color: var(--text-faint); max-width: 320px; }
.footer-col h4 { font-size: 1rem; margin-bottom: 1rem; color: var(--text); }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .6rem; }
.footer-col a { color: var(--text-muted); font-size: .9rem; }
.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
  color: var(--text-faint);
  font-size: .85rem;
}
.social-links { display: flex; gap: .75rem; }
.social-links a {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  transition: all .2s;
}
.social-links a:hover {
  background: var(--gradient-primary);
  color: white;
  border-color: transparent;
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* =========================================================================
   BADGES & TAGS
   ========================================================================= */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .25rem .75rem;
  border-radius: 100px;
  font-size: .8rem;
  font-weight: 500;
}
.badge-primary { background: rgba(124,58,237,.15); color: var(--primary-light); }
.badge-success { background: rgba(16,185,129,.15); color: var(--success); }
.badge-warning { background: rgba(245,158,11,.15); color: var(--warning); }
.badge-danger  { background: rgba(239,68,68,.15);  color: var(--danger); }
.badge-info    { background: rgba(59,130,246,.15); color: var(--info); }
.badge-muted   { background: var(--surface-2);     color: var(--text-muted); }

/* =========================================================================
   ALERTES
   ========================================================================= */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  border: 1px solid;
  font-size: .95rem;
  display: flex; align-items: flex-start; gap: .75rem;
}
.alert-success { background: rgba(16,185,129,.1);  border-color: rgba(16,185,129,.3);  color: #6ee7b7; }
.alert-danger  { background: rgba(239,68,68,.1);   border-color: rgba(239,68,68,.3);   color: #fca5a5; }
.alert-warning { background: rgba(245,158,11,.1);  border-color: rgba(245,158,11,.3);  color: #fcd34d; }
.alert-info    { background: rgba(59,130,246,.1);  border-color: rgba(59,130,246,.3);  color: #93c5fd; }

/* =========================================================================
   TOAST
   ========================================================================= */
.toast-container {
  position: fixed;
  top: 5.5rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  max-width: 380px;
  pointer-events: none;
}
.toast {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: .85rem 1.1rem;
  box-shadow: var(--shadow-lg);
  animation: toastIn .3s ease, toastOut .3s ease 3.5s forwards;
  pointer-events: auto;
  display: flex; align-items: center; gap: .75rem;
  font-size: .92rem;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error   { border-left: 3px solid var(--danger);  }
.toast.info    { border-left: 3px solid var(--info);    }

@keyframes toastIn  { from { transform: translateX(120%); opacity: 0; } }
@keyframes toastOut { to   { transform: translateX(120%); opacity: 0; } }

/* =========================================================================
   SPINNER / LOADER
   ========================================================================= */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,.2);
  border-top-color: white;
  border-radius: 50%;
  animation: spin .8s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loader-overlay {
  position: fixed; inset: 0;
  background: rgba(10,10,15,.85);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 9000;
}
.loader-overlay .spinner { width: 48px; height: 48px; border-width: 3px; }

/* =========================================================================
   MODAL
   ========================================================================= */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(8px);
  z-index: 9500;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 500px;
  max-height: 90vh; overflow-y: auto;
  transform: scale(.95); transition: transform .25s;
}
.modal-backdrop.open .modal { transform: scale(1); }
.modal-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-body   { padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: .75rem; }
.modal-close  { background: transparent; color: var(--text-muted); width: 32px; height: 32px; border-radius: 8px; }
.modal-close:hover { background: var(--surface-2); color: var(--text); }

/* =========================================================================
   GRADIENT TEXT
   ========================================================================= */
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* =========================================================================
   ANIMATIONS UTILITAIRES
   ========================================================================= */
.fade-in { animation: fadeIn .6s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.float { animation: float 6s ease-in-out infinite; }
@keyframes float {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-12px); }
}

/* =========================================================================
   SCROLLBAR
   ========================================================================= */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* =========================================================================
   SÉLECTION
   ========================================================================= */
::selection { background: rgba(124,58,237,.3); color: white; }

/* =========================================================================
   UTILITAIRES
   ========================================================================= */
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.text-faint  { color: var(--text-faint); }
.mt-1 { margin-top: .5rem; }  .mt-2 { margin-top: 1rem; }  .mt-3 { margin-top: 1.5rem; }  .mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; }
.hidden { display: none !important; }

/* =========================================================================
   TABLEAUX
   ========================================================================= */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.table th,
.table td {
  padding: .85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.table th {
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: var(--surface-2); }
.table td { color: var(--text-muted); }
.table .actions { display: flex; gap: .35rem; }
