/**
 * Styles personnalisés pour ECO PRO ELAGAGE
 */

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

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

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

/* Amélioration du focus pour l'accessibilité */
*:focus {
    outline: 2px solid #38a169;
    outline-offset: 2px;
}

/* Navigation sticky - amélioration visuelle */
header.sticky {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Boutons avec effet hover amélioré */
button,
a.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Cards avec effet 3D subtil */
.shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
                0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.shadow-xl:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Amélioration des formulaires */
input:focus,
textarea:focus,
select:focus {
    border-color: #38a169;
    box-shadow: 0 0 0 3px rgba(56, 161, 105, 0.1);
}

/* Loader pour les soumissions de formulaire */
.loader {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #38a169;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Images responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Aspect ratio containers (compatible avec les anciens navigateurs) */
.aspect-w-16 {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
}

.aspect-w-16 > * {
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

/* Scroll margin pour les ancres (liens internes) */
[id] {
    scroll-margin-top: 100px;
}

/* Amélioration de la lisibilité du texte */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Styles pour les alertes/notifications */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    border-left: 4px solid;
}

.alert-success {
    background-color: #f0fdf4;
    border-color: #22c55e;
    color: #166534;
}

.alert-error {
    background-color: #fef2f2;
    border-color: #ef4444;
    color: #991b1b;
}

.alert-info {
    background-color: #eff6ff;
    border-color: #3b82f6;
    color: #1e40af;
}

/* Animations d'entrée pour les éléments */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Personnalisation de la scrollbar (webkit) */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #22543d;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #38a169;
}

/* Media queries pour améliorer la responsivité */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.5rem;
    }
}

/* Print styles */
@media print {
    header,
    footer,
    nav,
    .no-print {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }
}

/* Utilitaires personnalisés */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.bg-overlay {
    position: relative;
}

.bg-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

/* Skip to main content (accessibilité) */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #22543d;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}
