/**
 * RESPONSIVE CSS - VERSION NETTOYÉE
 * Styles minimaux sans !important qui entrent en conflit avec Tailwind
 */

/* =================================================================
   BREAKPOINTS TAILWIND
   ================================================================= */
/* xs: < 640px (mobile) */
/* sm: 640px+ (mobile large) */
/* md: 768px+ (tablette) */
/* lg: 1024px+ (desktop) */
/* xl: 1280px+ (large desktop) */
/* 2xl: 1536px+ (extra large) */

/* =================================================================
   GLOBAL
   ================================================================= */

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Empêcher le débordement horizontal */
body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* =================================================================
   MODALS - Uniquement si nécessaire
   ================================================================= */

/* Les modals sont gérés par Tailwind dans les composants */
/* On garde juste les ajustements mobiles critiques */

@media (max-width: 640px) {
    /* Dashboard modal plein écran sur mobile */
    #dashboardModal > div:first-child {
        width: 100%;
        height: 100vh;
        border-radius: 0;
        max-width: none;
    }
}

/* =================================================================
   TABLES RESPONSIVE
   ================================================================= */

@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    table td,
    table th {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
}

/* =================================================================
   FORMS - Éviter le zoom sur iOS
   ================================================================= */

@media (max-width: 640px) {
    input,
    textarea,
    select {
        font-size: 16px; /* Évite le zoom automatique sur iOS */
    }
}

/* =================================================================
   SCROLLBAR - Scrollbar fine sur mobile
   ================================================================= */

@media (max-width: 768px) {
    *::-webkit-scrollbar {
        width: 4px;
    }

    *::-webkit-scrollbar-track {
        background: transparent;
    }

    *::-webkit-scrollbar-thumb {
        background: #d1d5db;
        border-radius: 4px;
    }
}

/* =================================================================
   ACCESSIBILITY
   ================================================================= */

*:focus-visible {
    outline: 2px solid #22c55e;
    outline-offset: 2px;
}

/* Tap highlight sur mobile */
* {
    -webkit-tap-highlight-color: rgba(34, 197, 94, 0.2);
}

/* =================================================================
   MODAL ANIMATIONS
   ================================================================= */

/* Animation d'entrée pour les modals */
@keyframes modal-slide-up {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.animate-modal-slide-up {
    animation: modal-slide-up 0.3s ease-out;
}

/* Backdrop blur progressif */
.backdrop-blur-sm {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Modal messaging responsive */
@media (max-width: 640px) {
    #clientMessagingModal > div:nth-child(2),
    #messagingModal > div:nth-child(2) {
        max-width: 95vw;
        max-height: 95vh;
        margin: 0.5rem;
    }
}

/* =================================================================
   PRINT
   ================================================================= */

@media print {
    header,
    footer,
    nav,
    #chatBtn,
    #chatContainer,
    .no-print {
        display: none;
    }

    * {
        background: white;
        color: black;
    }
}


/* =================================================================
   valueurs component styles
   ================================================================= */
.valeur-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 1.5rem;
  text-align: center;
  width: min(220px, 100%);  /* largeur adaptative */
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(0,0,0,0.08);
  transition: transform .25s ease, box-shadow .25s ease;
}


.valeur-card i {
  font-size: 2.5rem;
  color: #16a34a;
  margin-bottom: 0.5rem;
}

.valeur-card h3 {
  font-size: 1.1rem;
  color: #15803d;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.valeur-card p {
  font-size: 0.9rem;
  color: #4b5563;
  line-height: 1.3rem;
}

.valeur-card:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}
