/**
 * GUACAMOLI EMOJI - Styles de base
 * ===============================
 * 
 * Feuille de style de base contenant :
 * - Reset CSS
 * - Variables CSS (Custom Properties)
 * - Styles de base pour éléments HTML
 * - Utilitaires génériques
 * 
 * @version 1.0.0
 * @author Steph P
 * @created 2025
 */

/* ================================
   RESET CSS MODERNE
   ================================ */

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

html {
    font-size: 16px; /* Base pour rem */
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Améliorer la lisibilité des éléments focus */
:focus-visible {
    outline: 2px solid var(--lagoon-blue);
    outline-offset: 2px;
}

/* Supprimer l'outline par défaut sur les éléments clickables */
button,
input,
select,
textarea {
    outline: none;
}

/* Images responsive par défaut */
img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Hériter les polices pour les éléments de formulaire */
input,
button,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}

/* Améliorer le style par défaut des listes */
ul,
ol {
    list-style: none;
}

/* Supprimer les styles par défaut des liens */
a {
    color: inherit;
    text-decoration: none;
}

/* ================================
   VARIABLES CSS (CUSTOM PROPERTIES)
   ================================ */

:root {
    /* Couleurs principales - Thème guacamole */
    --guac-green: #4a7c4a;
    --guac-light: #8fbc8f;
    --guac-lime: #9acd32;
    
    /* Couleurs lagons */
    --lagoon-blue: #20b2aa;
    --lagoon-light: #afeeee;
    
    /* Couleurs soleil */
    --sun-yellow: #ffd700;
    
    /* Couleurs neutres */
    --marble-white: #f8f8ff;
    --marble-shadow: rgba(0, 0, 0, 0.1);
    --text-dark: #2d3748;
    --text-light: #718096;
    --white: #ffffff;
    --black: #000000;
    
    /* Couleurs d'état */
    --success: #48bb78;
    --warning: #ed8936;
    --error: #f56565;
    --info: var(--lagoon-blue);
    
    /* Typographie */
    --font-family-base: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-family-heading: 'Lobster', cursive;
    
    --font-size-xs: 0.75rem;    /* 12px */
    --font-size-sm: 0.875rem;   /* 14px */
    --font-size-base: 1rem;     /* 16px */
    --font-size-lg: 1.125rem;   /* 18px */
    --font-size-xl: 1.25rem;    /* 20px */
    --font-size-2xl: 1.5rem;    /* 24px */
    --font-size-3xl: 1.875rem;  /* 30px */
    --font-size-4xl: 2.25rem;   /* 36px */
    --font-size-5xl: 3rem;      /* 48px */
    
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
    
    /* Espacement */
    --space-1: 0.25rem;   /* 4px */
    --space-2: 0.5rem;    /* 8px */
    --space-3: 0.75rem;   /* 12px */
    --space-4: 1rem;      /* 16px */
    --space-5: 1.25rem;   /* 20px */
    --space-6: 1.5rem;    /* 24px */
    --space-8: 2rem;      /* 32px */
    --space-10: 2.5rem;   /* 40px */
    --space-12: 3rem;     /* 48px */
    --space-16: 4rem;     /* 64px */
    --space-20: 5rem;     /* 80px */
    
    /* Bordures et coins arrondis */
    --border-width: 1px;
    --border-width-2: 2px;
    --border-width-3: 3px;
    --border-width-4: 4px;
    
    --border-radius-sm: 0.375rem;   /* 6px */
    --border-radius: 0.5rem;        /* 8px */
    --border-radius-md: 0.75rem;    /* 12px */
    --border-radius-lg: 1rem;       /* 16px */
    --border-radius-xl: 1.25rem;    /* 20px */
    --border-radius-2xl: 1.5rem;    /* 24px */
    --border-radius-full: 9999px;
    
    /* Ombres */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Transitions et animations */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-in: cubic-bezier(0.55, 0.06, 0.68, 0.19);
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Breakpoints pour media queries */
    --breakpoint-sm: 640px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 1024px;
    --breakpoint-xl: 1280px;
    --breakpoint-2xl: 1536px;
    
    /* Z-index scale */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* ================================
   STYLES DE BASE POUR ÉLÉMENTS HTML
   ================================ */

body {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    color: var(--text-dark);
    background: linear-gradient(135deg, var(--guac-light) 0%, var(--lagoon-light) 100%);
    min-height: 100vh;
}

/* Titres */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-family-heading);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    margin-bottom: var(--space-4);
    color: var(--text-dark);
}

h1 {
    font-size: var(--font-size-4xl);
}

h2 {
    font-size: var(--font-size-3xl);
}

h3 {
    font-size: var(--font-size-2xl);
}

h4 {
    font-size: var(--font-size-xl);
}

h5 {
    font-size: var(--font-size-lg);
}

h6 {
    font-size: var(--font-size-base);
}

/* Paragraphes */
p {
    margin-bottom: var(--space-4);
    line-height: var(--line-height-relaxed);
}

/* Liens */
a {
    color: var(--lagoon-blue);
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--guac-green);
}

/* Boutons de base */
button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    transition: all var(--transition-base);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Champs de formulaire */
input,
select,
textarea {
    border: var(--border-width-2) solid var(--guac-light);
    border-radius: var(--border-radius-lg);
    padding: var(--space-3) var(--space-4);
    font-size: var(--font-size-base);
    transition: all var(--transition-base);
    background: var(--white);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--lagoon-blue);
    box-shadow: 0 0 0 3px rgba(32, 178, 170, 0.1);
}

/* Labels */
label {
    font-weight: var(--font-weight-medium);
    color: var(--text-dark);
    margin-bottom: var(--space-2);
    display: block;
}

/* ================================
   CLASSES UTILITAIRES
   ================================ */

/* Container principal */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-8) var(--space-6);
}

/* Espacement */
.mt-auto { margin-top: auto; }
.mb-auto { margin-bottom: auto; }
.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }

.m-0 { margin: 0; }
.m-1 { margin: var(--space-1); }
.m-2 { margin: var(--space-2); }
.m-3 { margin: var(--space-3); }
.m-4 { margin: var(--space-4); }
.m-5 { margin: var(--space-5); }
.m-6 { margin: var(--space-6); }
.m-8 { margin: var(--space-8); }

.p-0 { padding: 0; }
.p-1 { padding: var(--space-1); }
.p-2 { padding: var(--space-2); }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.p-5 { padding: var(--space-5); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }

/* Flexbox */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }

.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }

.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.items-stretch { align-items: stretch; }

.flex-1 { flex: 1; }
.flex-none { flex: none; }

/* Grid */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.gap-6 { gap: var(--space-6); }

/* Texte */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.text-2xl { font-size: var(--font-size-2xl); }

.font-light { font-weight: var(--font-weight-light); }
.font-normal { font-weight: var(--font-weight-normal); }
.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }

/* Couleurs de texte */
.text-dark { color: var(--text-dark); }
.text-light { color: var(--text-light); }
.text-white { color: var(--white); }
.text-guac { color: var(--guac-green); }
.text-lagoon { color: var(--lagoon-blue); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }

/* Couleurs de fond */
.bg-white { background-color: var(--white); }
.bg-guac { background-color: var(--guac-green); }
.bg-guac-light { background-color: var(--guac-light); }
.bg-lagoon { background-color: var(--lagoon-blue); }
.bg-lagoon-light { background-color: var(--lagoon-light); }
.bg-sun { background-color: var(--sun-yellow); }

/* Bordures */
.border { border: var(--border-width) solid var(--guac-light); }
.border-2 { border: var(--border-width-2) solid var(--guac-light); }
.border-guac { border-color: var(--guac-green); }
.border-lagoon { border-color: var(--lagoon-blue); }
.border-sun { border-color: var(--sun-yellow); }

.rounded-sm { border-radius: var(--border-radius-sm); }
.rounded { border-radius: var(--border-radius); }
.rounded-md { border-radius: var(--border-radius-md); }
.rounded-lg { border-radius: var(--border-radius-lg); }
.rounded-xl { border-radius: var(--border-radius-xl); }
.rounded-2xl { border-radius: var(--border-radius-2xl); }
.rounded-full { border-radius: var(--border-radius-full); }

/* Ombres */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow { box-shadow: var(--shadow); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }
.shadow-2xl { box-shadow: var(--shadow-2xl); }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

.top-0 { top: 0; }
.right-0 { right: 0; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }

/* Z-index */
.z-dropdown { z-index: var(--z-dropdown); }
.z-modal { z-index: var(--z-modal); }
.z-tooltip { z-index: var(--z-tooltip); }

/* Affichage */
.block { display: block; }
.inline-block { display: inline-block; }
.inline { display: inline; }
.hidden { display: none; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }

/* Curseur */
.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }

/* Transitions */
.transition { transition: all var(--transition-base); }
.transition-fast { transition: all var(--transition-fast); }
.transition-slow { transition: all var(--transition-slow); }

/* Transformations */
.transform { transform: translateZ(0); } /* Force hardware acceleration */
.scale-95 { transform: scale(0.95); }
.scale-105 { transform: scale(1.05); }
.rotate-1 { transform: rotate(1deg); }
.rotate-3 { transform: rotate(3deg); }
.rotate-6 { transform: rotate(6deg); }

/* Hover states */
.hover\:scale-105:hover { transform: scale(1.05); }
.hover\:scale-110:hover { transform: scale(1.10); }
.hover\:-translate-y-1:hover { transform: translateY(-0.25rem); }
.hover\:-translate-y-2:hover { transform: translateY(-0.5rem); }

/* Focus states */
.focus\:ring-2:focus { 
    box-shadow: 0 0 0 2px var(--lagoon-blue); 
}

.focus\:ring-4:focus { 
    box-shadow: 0 0 0 4px rgba(32, 178, 170, 0.1); 
}

/* ================================
   ANIMATIONS KEYFRAMES
   ================================ */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

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

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -6px, 0);
    }
    70% {
        transform: translate3d(0, -3px, 0);
    }
    90% {
        transform: translate3d(0, -1px, 0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Classes d'animation */
.animate-fadeIn { animation: fadeIn var(--transition-base); }
.animate-fadeOut { animation: fadeOut var(--transition-base); }
.animate-slideInUp { animation: slideInUp var(--transition-base); }
.animate-slideInDown { animation: slideInDown var(--transition-base); }
.animate-bounce { animation: bounce 1s infinite; }
.animate-pulse { animation: pulse 2s infinite; }
.animate-spin { animation: spin 1s linear infinite; }

/* ================================
   RESPONSIVE DESIGN
   ================================ */

@media (max-width: 768px) {
    .container {
        padding: var(--space-4) var(--space-4);
    }
    
    /* Classes responsive pour mobile */
    .mobile\:text-center { text-align: center; }
    .mobile\:text-left { text-align: left; }
    .mobile\:flex-col { flex-direction: column; }
    .mobile\:items-center { align-items: center; }
    .mobile\:justify-center { justify-content: center; }
    .mobile\:hidden { display: none; }
    .mobile\:block { display: block; }
}

@media (min-width: 769px) {
    /* Classes pour desktop */
    .desktop\:flex { display: flex; }
    .desktop\:grid { display: grid; }
    .desktop\:hidden { display: none; }
    .desktop\:block { display: block; }
}

/* ================================
   ACCESSIBILITÉ
   ================================ */

/* Améliorer la lisibilité pour les utilisateurs de lecteurs d'écran */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus visible uniquement au clavier */
.focus-visible {
    outline: 2px solid var(--lagoon-blue);
    outline-offset: 2px;
}

/* Réduire les animations pour les utilisateurs qui le préfèrent */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Mode sombre (si souhaité plus tard) */
@media (prefers-color-scheme: dark) {
    /* Variables pour mode sombre peuvent être ajoutées ici */
}

/* Améliorer le contraste pour les utilisateurs ayant des difficultés visuelles */
@media (prefers-contrast: high) {
    :root {
        --text-dark: #000000;
        --border-width: 2px;
    }
}