/* LovMap - Styles communs optimisés */
/* Version: 4.0 - Refactorisation complète */

/* ========== LOGO & IMAGES ========== */
.logo-img {
  vertical-align: middle;
  margin-bottom: 8px;
  filter: drop-shadow(0 2px 8px #7C3AED55);
}

.logo-img-sm { height: 36px; width: 36px; }
.logo-img-md { height: 40px; width: 40px; }
.logo-img-lg { height: 48px; width: 48px; }
.logo-img-xl { height: 60px; width: 60px; }

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: #FFFFFF;
  background: #000000;
}

/* ========== VARIABLES CSS ========== */
:root {
  --color-primary: #7C3AED;
  --color-primary-dark: #5B21B6;
  --color-bg-dark: #000000;
  --color-bg-card: #111111;
  --color-border: #333333;
  --color-text-primary: #FFFFFF;
  --color-text-secondary: #666666;
  --color-success: #10B981;
  --color-error: #EF4444;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 8px 30px rgba(0,0,0,0.3);
  --shadow-lg: 0 20px 40px rgba(0,0,0,0.3);
}

/* ========== CONTENEURS ========== */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

.container-narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 20px;
}

.container-wide {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* ========== CARTES & BOÎTES ========== */
.card, .box, .support-container {
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  margin: 40px auto;
}

.box {
  max-width: 620px;
  margin: 60px auto;
  padding: 26px;
}

.support-container {
  max-width: 760px;
}

/* ========== TYPOGRAPHIE ========== */
h1, h2, h3 {
  color: var(--color-text-primary);
  margin-top: 0;
}

h1 {
  font-size: 2em;
}

h1.large {
  font-size: 2.2em;
}

h1.accent {
  border-bottom: 3px solid var(--color-primary);
  padding-bottom: 12px;
}

h2 {
  border-left: 4px solid var(--color-primary);
  padding-left: 12px;
  margin-top: 32px;
  font-size: 1.5em;
}

h3 {
  color: var(--color-text-secondary);
  margin-top: 18px;
  font-size: 1.2em;
}

p {
  margin: 10px 0;
  color: var(--color-text-primary);
}

p.secondary {
  color: var(--color-text-secondary);
}

.last-update {
  font-style: italic;
  color: var(--color-text-secondary);
  font-size: 0.9em;
}

/* ========== LIENS ========== */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

.nav-link {
  color: var(--color-primary);
  font-weight: 500;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* ========== FORMULAIRES ========== */
label {
  display: block;
  margin: 14px 0 6px;
  font-weight: 600;
  color: var(--color-text-primary);
}

input, textarea {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 10px;
  font-size: 15px;
  font-family: inherit;
  background: var(--color-bg-card);
  color: var(--color-text-primary);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2), 0 4px 12px rgba(0,0,0,0.2);
  transform: translateY(-1px);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

/* ========== BOUTONS ========== */
button, .btn {
  border: 0;
  border-radius: var(--radius-sm);
  padding: 11px 16px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-block;
  text-align: center;
}

.btn-primary, button[type="submit"] {
  background: var(--color-primary);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover, button[type="submit"]:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.btn-primary:hover::before {
  left: 100%;
}

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

.btn-secondary:hover {
  background: var(--color-text-secondary);
}

/* ========== ICÔNES & ÉTATS ========== */
.icon {
  font-size: 80px;
  text-align: center;
  margin: 20px 0;
}

.error {
  color: var(--color-error);
  text-align: center;
}

.success {
  color: var(--color-success);
  text-align: center;
}

/* ========== MESSAGES ========== */
.info, .highlight {
  margin: 18px 0;
  padding: 12px;
  background: var(--color-bg-card);
  border-radius: 6px;
  border-left: 3px solid var(--color-primary);
  border: 1px solid var(--color-border);
  font-size: 14px;
  color: var(--color-text-secondary);
}

.contact-box {
  background: var(--color-bg-card);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin: 20px 0;
}

.contact-box strong {
  color: var(--color-primary);
}

.success-message {
  background: linear-gradient(135deg, var(--color-bg-card), var(--color-border));
  border: 1px solid var(--color-success);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin: 20px 0;
  color: var(--color-success);
}

.error-message {
  background: linear-gradient(135deg, var(--color-bg-card), var(--color-border));
  border: 1px solid var(--color-error);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin: 20px 0;
  color: var(--color-error);
}

/* ========== TABLEAUX ========== */
.table-data {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  background: var(--color-bg-card);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.table-data th, .table-data td {
  border: 1px solid var(--color-border);
  padding: 12px;
  text-align: left;
  color: var(--color-text-primary);
}

.table-data th {
  background: var(--color-border);
  font-weight: 600;
}

.table-data tr:hover {
  background: var(--color-border);
  transition: background 0.2s ease;
}

/* ========== LAYOUT CENTRÉ ========== */
body.centered {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

body.centered .container {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 60px 40px;
  text-align: center;
  max-width: 500px;
  margin: 0;
  border: 1px solid var(--color-border);
}

body.centered .container h1 {
  font-size: 28px;
  margin-bottom: 12px;
}

body.centered .container p {
  color: var(--color-text-secondary);
  font-size: 16px;
  margin-bottom: 15px;
}

/* ========== PAGE D'ACCUEIL ========== */
.bg-gradient {
  background: linear-gradient(135deg, var(--color-bg-dark) 0%, var(--color-bg-card) 100%);
}

.logo {
  font-size: 3.5em;
  font-weight: 700;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
  background: linear-gradient(45deg, #7C3AED, #EC4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tagline {
  font-size: 1.3em;
  opacity: 0.9;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.9);
}

.home-header {
  text-align: center;
  padding: 60px 20px 40px;
  color: white;
  min-height: 40vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-header .container {
  padding: 0;
}

.hero {
  background: rgba(17, 17, 17, 0.95);
  border-radius: 20px;
  padding: 50px 30px;
  margin: 40px 0;
  text-align: center;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--color-border);
  animation: slideInUp 0.8s ease-out;
}

.hero h2 {
  font-size: 2.2em;
  margin-bottom: 20px;
  font-weight: 700;
  border: none;
  padding: 0;
}

.hero p {
  font-size: 1.1em;
  margin-bottom: 40px;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Compteur utilisateurs */
.user-counter {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 24px 0;
  gap: 4px;
}

.user-counter-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
}

.user-counter-label {
  font-size: 0.95rem;
  color: #aaa;
  letter-spacing: 0.02em;
}

/* Boutons de téléchargement */
.download-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  padding: 15px 30px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1em;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  transform: translateY(0);
  animation: pulse 2s infinite;
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
  text-decoration: none;
}

.ios-btn {
  background: var(--color-primary);
  color: white;
}

.ios-btn:hover {
  background: var(--color-primary-dark);
}

.android-btn {
  background: var(--color-border);
  color: white;
}

.android-btn:hover {
  background: var(--color-text-secondary);
}

.btn-icon {
  width: 24px;
  height: 24px;
  margin-right: 10px;
}

.app-info {
  font-size: 0.9em;
  color: #888;
}

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin: 60px 0;
}

.feature {
  background: var(--color-bg-card);
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}

.feature::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #7C3AED, #EC4899);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.feature:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}

.feature:hover::before {
  transform: scaleX(1);
}

.feature-icon {
  font-size: 3em;
  margin-bottom: 20px;
  display: block;
  transition: transform 0.3s ease;
}

.feature:hover .feature-icon {
  transform: scale(1.1) rotate(5deg);
}

.feature h3 {
  font-size: 1.4em;
  margin-bottom: 15px;
  color: var(--color-text-primary);
  font-weight: 600;
}

.feature p {
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* Footer */
.footer, .home-footer {
  text-align: center;
  padding: 40px 20px;
  color: white;
  opacity: 0.8;
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(51,51,51,0.5);
  margin-top: 40px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.footer-links a {
  color: var(--color-primary);
  font-weight: 500;
  transition: opacity 0.3s;
  padding: 8px 16px;
  border-radius: 6px;
  position: relative;
}

.footer-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width 0.3s ease;
}

.footer-links a:hover {
  opacity: 0.7;
  background: rgba(124, 58, 237, 0.1);
  text-decoration: none;
}

.footer-links a:hover::after {
  width: 100%;
}

.copyright {
  font-size: 0.9em;
  opacity: 0.7;
  color: var(--color-text-secondary);
}

/* ========== UTILITAIRES ========== */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-secondary); }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-40 { margin-bottom: 40px; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-40 { margin-top: 40px; }

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0% { box-shadow: 0 4px 15px rgba(0,0,0,0.3); }
  50% { box-shadow: 0 4px 25px rgba(0,0,0,0.4); }
  100% { box-shadow: 0 4px 15px rgba(0,0,0,0.3); }
}

@keyframes countUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn 0.5s ease-out; }

.feature:nth-child(1) { animation: slideInLeft 0.6s ease-out 0.2s both; }
.feature:nth-child(2) { animation: slideInUp 0.6s ease-out 0.4s both; }
.feature:nth-child(3) { animation: slideInRight 0.6s ease-out 0.6s both; }
.feature:nth-child(4) { animation: slideInLeft 0.6s ease-out 0.8s both; }

#user-count {
  display: inline-block;
  animation: countUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .container, .container-narrow, .container-wide, .support-container {
    padding: 15px;
  }

  .card, .box {
    margin: 20px auto;
    padding: 20px;
  }

  .hero {
    padding: 30px 20px;
  }

  .hero h2 {
    font-size: 1.8em;
  }

  h1.large {
    font-size: 1.8em;
  }

  .logo {
    font-size: 2.5em;
  }

  .download-buttons {
    flex-direction: column;
    align-items: center;
  }

  .download-btn {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }

  .features {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-links {
    flex-direction: column;
    gap: 15px;
  }

  body.centered .container {
    padding: 40px 20px;
  }
}
