/*
 * Fichier: /client/assets/css/main.css
 * Styles de base et utilitaires pour un design Mobile-First et moderne.
 */

/* 1. Réinitialisation et Base (Inspiré de Tailwind CSS Preflight) */
/*
 * Assure un comportement cohérent sur tous les navigateurs.
 * 'box-sizing: border-box' simplifie grandement la gestion des tailles.
 */
*, ::before, ::after {
    box-sizing: border-box;
    border-width: 0;
    border-style: solid;
    border-color: #e5e7eb; /* gray-200 */
}

html {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    font-family: 'Roboto', sans-serif; /* Utilisation de la police importée */
}

body {
    margin: 0;
    line-height: inherit;
    -webkit-font-smoothing: antialiased; /* Rend le texte plus lisse */
    -moz-osx-font-smoothing: grayscale;
}

/* 2. Classes Utilitaires (Pour correspondre au HTML) */
/*
 * C'est le cœur du design "Utility-First". Chaque classe a un seul rôle,
 * ce qui permet de construire des interfaces directement dans le HTML.
 */

/* Flexbox et Alignement */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.min-h-screen { min-height: 100vh; }
.w-full { width: 100%; }
.space-y-6 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.5rem; }

/* Couleurs de fond */
.bg-gray-50 { background-color: #f9fafb; }
.bg-white { background-color: #ffffff; }

/* Marges et Paddings (Espacement) */
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-8 { margin-top: 2rem; }

/* Typographie */
.font-sans { font-family: 'Roboto', sans-serif; }
.text-center { text-align: center; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }
.tracking-wide { letter-spacing: 0.025em; }
.text-gray-800 { color: #1f2937; }
.text-gray-700 { color: #374151; }
.text-gray-500 { color: #6b7280; }
.text-gray-400 { color: #9ca3af; }
.text-white { color: #ffffff; }
.text-emerald-600 { color: #059669; }

/* Conteneurs, Bordures et Ombres */
.max-w-md { max-width: 28rem; }
.rounded-lg { border-radius: 0.5rem; }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); }

/* Champs de Formulaire */
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.border { border-width: 1px; }
.border-gray-300 { border-color: #d1d5db; }
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.placeholder-gray-400::placeholder { color: #9ca3af; }

/* États (Focus, Hover, Disabled) pour une meilleure UX */
.focus\:ring-emerald-500:focus { --tw-ring-color: #10b981; }
.focus\:border-emerald-500:focus { border-color: #10b981; }
.focus\:outline-none:focus { outline: 2px solid transparent; outline-offset: 2px; }

/* Boutons (Couleur primaire: Emerald/Vert émeraude) */
.bg-emerald-600 { background-color: #059669; }
.hover\:bg-emerald-700:hover { background-color: #047857; }
.focus\:ring-emerald-500:focus { --tw-ring-color: #10b981; }
.focus\:ring-2:focus { box-shadow: 0 0 0 2px var(--tw-ring-color); }
.focus\:ring-offset-2:focus { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--tw-ring-color); }
.disabled\:opacity-50:disabled { opacity: 0.5; cursor: not-allowed; }

/* Transitions pour des animations fluides */
.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 300ms; }
.duration-150 { transition-duration: 150ms; }
.duration-200 { transition-duration: 200ms; }
.ease-in-out { transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
.transform { transform: var(--tw-transform); } /* Prépare pour les transformations */
.hover\:scale-\[1\.01\]:hover { transform: scale(1.01); }

/* Messages (Zone d'erreur/succès) */
.text-red-700 { color: #b91c1c; } /* Texte erreur */
.bg-red-100 { background-color: #fee2e2; } /* Fond erreur */
.border-red-200 { border-color: #fecaca; }
.text-green-700 { color: #047857; } /* Texte succès */
.bg-green-100 { background-color: #d1fae5; } /* Fond succès */
.border-green-200 { border-color: #a7f3d0; }

/* 3. Responsive Design (Approche Mobile-First) */
/*
 * Les styles par défaut s'appliquent aux petits écrans.
 * La media query ci-dessous ajoute/modifie des styles UNIQUEMENT
 * pour les écrans plus grands (tablettes et ordinateurs).
 */
@media (min-width: 768px) { /* 768px est un point de rupture courant pour les tablettes */
    .md\:p-8 {
        padding: 2rem;
    }
}