
/* Styles personnalisés pour compléter Tailwind */

/* Variables CSS pour les couleurs */
:root {
    --background: 0 0% 100%;
    --foreground: 222.2 84% 4.9%;
    --card: 0 0% 100%;
    --card-foreground: 222.2 84% 4.9%;
    --popover: 0 0% 100%;
    --popover-foreground: 222.2 84% 4.9%;
    --primary: 221.2 83.2% 53.3%;
    --primary-foreground: 210 40% 98%;
    --secondary: 210 40% 96%;
    --secondary-foreground: 222.2 84% 4.9%;
    --muted: 210 40% 96%;
    --muted-foreground: 215.4 16.3% 46.9%;
    --accent: 210 40% 96%;
    --accent-foreground: 222.2 84% 4.9%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;
    --border: 214.3 31.8% 91.4%;
    --input: 214.3 31.8% 91.4%;
    --ring: 221.2 83.2% 53.3%;
    --radius: 0.75rem;
}

/* Focus styles pour l'accessibilité */
*:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgb(59 130 246), 0 0 0 4px rgb(59 130 246 / 0.1);
}

/* Amélioration de la lisibilité */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: rgb(17 24 39);
    line-height: 1.2;
}

p {
    line-height: 1.6;
}

/* Animations personnalisées */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-slide-in-left {
    animation: slideInFromLeft 0.6s ease-out;
}

.animate-slide-in-right {
    animation: slideInFromRight 0.6s ease-out;
}

/* Styles pour les éléments interactifs */
.interactive-card {
    transition: all 0.2s ease;
}

.interactive-card:hover {
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 10px 10px -5px rgb(0 0 0 / 0.04);
    transform: translateY(-4px);
}

.interactive-button {
    transition: all 0.2s ease;
}

.interactive-button:active {
    transform: scale(0.95);
}

/* Styles pour les formulaires */
.form-section {
    padding: 1.5rem;
    background-color: white;
    border-radius: 0.75rem;
    border: 1px solid rgb(229 231 235);
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

/* Styles pour l'accessibilité */
.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;
}

/* Amélioration du contraste pour l'accessibilité */
.high-contrast {
    color: rgb(17 24 39);
    background-color: white;
    border-color: rgb(17 24 39);
}

/* Styles pour les messages d'erreur */
.error-message {
    color: rgb(220 38 38);
    font-size: 0.875rem;
    font-weight: 500;
}

.success-message {
    color: rgb(22 163 74);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Styles pour les indicateurs de progression */
.progress-step {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: 2px solid;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.progress-step.active {
    background-color: rgb(37 99 235);
    border-color: rgb(37 99 235);
    color: white;
}

.progress-step.completed {
    background-color: rgb(22 163 74);
    border-color: rgb(22 163 74);
    color: white;
}

.progress-step.inactive {
    background-color: rgb(243 244 246);
    border-color: rgb(209 213 219);
    color: rgb(107 114 128);
}

/* Responsive typography */
@media (max-width: 640px) {
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
    
    h3 {
        font-size: 1.125rem;
    }
}

/* Styles pour les transitions de page */
.page-transition {
    opacity: 0;
    transform: translateY(16px);
    animation: fadeInUp 0.4s ease-out forwards;
}

/* Styles pour les tooltips */
.tooltip {
    position: absolute;
    z-index: 50;
    padding: 0.5rem;
    font-size: 0.75rem;
    color: white;
    background-color: rgb(17 24 39);
    border-radius: 0.375rem;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.tooltip.show {
    opacity: 1;
}

/* Styles pour les modales */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgb(0 0 0 / 0.5);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    max-width: 28rem;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

/* Styles pour les notifications */
.notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 50;
    max-width: 24rem;
    width: 100%;
    background-color: white;
    border: 1px solid rgb(229 231 235);
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    padding: 1rem;
    animation: slideInFromRight 0.3s ease-out;
}

.notification.success {
    border-color: rgb(187 247 208);
    background-color: rgb(240 253 244);
}

.notification.error {
    border-color: rgb(254 202 202);
    background-color: rgb(254 242 242);
}

.notification.warning {
    border-color: rgb(254 240 138);
    background-color: rgb(255 251 235);
}

/* Amélioration de l'accessibilité pour les utilisateurs de lecteurs d'écran */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Styles pour le mode sombre (préparation future) */
@media (prefers-color-scheme: dark) {
    :root {
        --background: 222.2 84% 4.9%;
        --foreground: 210 40% 98%;
    }
}

/* Styles pour les inputs */
.input-field {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgb(209 213 219);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background-color: white;
}

.input-field:focus {
    outline: none;
    border-color: rgb(59 130 246);
    box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
}

.input-field.error {
    border-color: rgb(239 68 68);
}

.input-field.error:focus {
    border-color: rgb(239 68 68);
    box-shadow: 0 0 0 3px rgb(239 68 68 / 0.1);
}

/* Styles pour les labels */
.label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgb(55 65 81);
    margin-bottom: 0.5rem;
}

.label.required::after {
    content: " *";
    color: rgb(239 68 68);
}

/* Styles pour les boutons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background-color: rgb(37 99 235);
    color: white;
}

.btn-primary:hover {
    background-color: rgb(29 78 216);
}

.btn-secondary {
    background-color: white;
    color: rgb(55 65 81);
    border: 1px solid rgb(209 213 219);
}

.btn-secondary:hover {
    background-color: rgb(249 250 251);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Styles pour les cartes */
.card {
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    overflow: hidden;
}

.card-header {
    padding: 1.5rem 1.5rem 1rem 1.5rem;
}

.card-content {
    padding: 0 1.5rem 1.5rem 1.5rem;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: rgb(17 24 39);
    margin-bottom: 0.5rem;
}

.card-description {
    font-size: 0.875rem;
    color: rgb(107 114 128);
}

/* Styles pour les alertes */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-info {
    background-color: rgb(239 246 255);
    border-color: rgb(147 197 253);
    color: rgb(30 64 175);
}

.alert-success {
    background-color: rgb(240 253 244);
    border-color: rgb(187 247 208);
    color: rgb(22 101 52);
}

.alert-warning {
    background-color: rgb(255 251 235);
    border-color: rgb(254 240 138);
    color: rgb(146 64 14);
}

.alert-error {
    background-color: rgb(254 242 242);
    border-color: rgb(254 202 202);
    color: rgb(153 27 27);
}

/* Styles pour les breadcrumbs */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: rgb(107 114 128);
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb-separator {
    color: rgb(156 163 175);
}

/* Styles pour la barre de progression */
.progress {
    width: 100%;
    height: 0.5rem;
    background-color: rgb(229 231 235);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: rgb(37 99 235);
    transition: width 0.3s ease;
}

/* Styles pour les sélecteurs */
.select {
    position: relative;
    width: 100%;
}

.select-trigger {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgb(209 213 219);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background-color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.select-trigger:focus {
    outline: none;
    border-color: rgb(59 130 246);
    box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
}

.select-content {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    background-color: white;
    border: 1px solid rgb(209 213 219);
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    margin-top: 0.25rem;
    max-height: 12rem;
    overflow-y: auto;
}

.select-item {
    padding: 0.75rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.select-item:hover {
    background-color: rgb(243 244 246);
}

.select-item.selected {
    background-color: rgb(239 246 255);
    color: rgb(37 99 235);
}

/* Styles pour les chatbots */
.chatbot {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 40;
}

.chatbot-trigger {
    width: 3.5rem;
    height: 3.5rem;
    background-color: rgb(37 99 235);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    transition: all 0.2s ease;
}

.chatbot-trigger:hover {
    background-color: rgb(29 78 216);
    transform: scale(1.05);
}

.chatbot-window {
    position: absolute;
    bottom: 4rem;
    right: 0;
    width: 20rem;
    height: 24rem;
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    border: 1px solid rgb(229 231 235);
    display: none;
    flex-direction: column;
}

.chatbot-window.open {
    display: flex;
}

.chatbot-header {
    padding: 1rem;
    border-bottom: 1px solid rgb(229 231 235);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

.chatbot-input {
    padding: 1rem;
    border-top: 1px solid rgb(229 231 235);
}

/* Styles pour les messages de chat */
.chat-message {
    margin-bottom: 1rem;
    display: flex;
    gap: 0.5rem;
}

.chat-message.user {
    flex-direction: row-reverse;
}

.chat-message-content {
    max-width: 80%;
    padding: 0.75rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.4;
}

.chat-message.bot .chat-message-content {
    background-color: rgb(243 244 246);
    color: rgb(17 24 39);
}

.chat-message.user .chat-message-content {
    background-color: rgb(37 99 235);
    color: white;
}

/* Styles pour les loaders */
.loader {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgb(229 231 235);
    border-radius: 50%;
    border-top-color: rgb(37 99 235);
    animation: spin 1s ease-in-out infinite;
}

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

/* Styles pour les badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
}

.badge-primary {
    background-color: rgb(239 246 255);
    color: rgb(37 99 235);
}

.badge-success {
    background-color: rgb(240 253 244);
    color: rgb(22 163 74);
}

.badge-warning {
    background-color: rgb(255 251 235);
    color: rgb(217 119 6);
}

.badge-error {
    background-color: rgb(254 242 242);
    color: rgb(220 38 38);
}

/* Styles pour les tabs */
.tabs {
    width: 100%;
}

.tabs-list {
    display: flex;
    border-bottom: 1px solid rgb(229 231 235);
}

.tabs-trigger {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgb(107 114 128);
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tabs-trigger:hover {
    color: rgb(55 65 81);
}

.tabs-trigger.active {
    color: rgb(37 99 235);
    border-bottom-color: rgb(37 99 235);
}

.tabs-content {
    padding: 1rem 0;
}

/* Styles pour les accordéons */
.accordion-item {
    border-bottom: 1px solid rgb(229 231 235);
}

.accordion-trigger {
    width: 100%;
    padding: 1rem;
    text-align: left;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.accordion-trigger:hover {
    background-color: rgb(249 250 251);
}

.accordion-content {
    padding: 0 1rem 1rem 1rem;
    color: rgb(107 114 128);
    line-height: 1.6;
}

.accordion-content.hidden {
    display: none;
}

/* Styles pour les dropdowns */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 50;
    background-color: white;
    border: 1px solid rgb(229 231 235);
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    margin-top: 0.25rem;
    min-width: 8rem;
    display: none;
}

.dropdown-content.open {
    display: block;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: rgb(55 65 81);
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-item:hover {
    background-color: rgb(243 244 246);
}

.dropdown-separator {
    height: 1px;
    background-color: rgb(229 231 235);
    margin: 0.25rem 0;
}
