/**
 * CSS de base pour le Module Directory Hero
 * 
 * @package     Joomla.Site
 * @subpackage  mod_directory_hero
 * @author      Nicolas AZHAR
 * @copyright   Copyright (C) 2025 Nicolas AZHAR. All rights reserved.
 * @license     GPL v2.0 or later
 */

/* Reset et base */
.directory-hero-module {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    width: 100%;
    position: relative;
    /* Support des Container Queries pour les unités cqi */
    container-type: inline-size;
}

.directory-hero-module *,
.directory-hero-module *::before,
.directory-hero-module *::after {
    box-sizing: inherit;
}

/* Conteneur hero */
.directory-hero-module .hero-content {
    position: relative;
    z-index: 2;
    box-sizing: border-box;
}

/* Éléments de texte */
.directory-hero-module .hero-subtitle {
    margin-bottom: 0.5rem;
    opacity: 0.9;
    font-style: italic;
}

.directory-hero-module .hero-title {
    line-height: 1.2;
    margin-bottom: 1rem;
    word-wrap: break-word;
    hyphens: auto;
    /* Redimensionnement fluide responsive avec clamp */
    font-size: clamp(1.5rem, 4vw + 1rem, 3.5rem);
}

.directory-hero-module .hero-text {
    line-height: 1.6;
    margin-bottom: 2rem;
    word-wrap: break-word;
}

/* Actions */
.directory-hero-module .hero-action {
    margin-top: 2rem;
}

.directory-hero-module .hero-button,
.directory-hero-module .hero-link {
    transition: all 0.3s ease;
    cursor: pointer;
}

.directory-hero-module .hero-button:focus,
.directory-hero-module .hero-link:focus {
    outline: 2px solid rgba(0, 123, 255, 0.5);
    outline-offset: 2px;
}

/* Effets glassmorphing de base */
.directory-hero-module .hero-content[data-glass="true"] {
    backdrop-filter: blur(6px) saturate(102%);
    -webkit-backdrop-filter: blur(6px) saturate(102%);
    background-color: rgba(255, 255, 255, 0.45);
    border-radius: 12px;
    border: 1px solid rgba(209, 213, 219, 0.3);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

/* Animations d'entrée */
@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.directory-hero-module .hero-content > * {
    animation: heroFadeIn 0.8s ease-out forwards;
}

.directory-hero-module .hero-subtitle {
    animation-delay: 0.1s;
}

.directory-hero-module .hero-title {
    animation-delay: 0.2s;
}

.directory-hero-module .hero-text {
    animation-delay: 0.3s;
}

.directory-hero-module .hero-action {
    animation-delay: 0.4s;
}

/* Responsive de base */
@media (max-width: 1024px) {
    .directory-hero-module .hero-content {
        max-width: 90%;
    }
}

@media (max-width: 768px) {
    .directory-hero-module .hero-content {
        max-width: 95%;
        padding: 20px !important;
    }
    
    .directory-hero-module .hero-title {
        line-height: 1.1;
    }
    
    .directory-hero-module .hero-text {
        font-size: 1rem !important;
        margin-bottom: 1.5rem;
    }
    
    .directory-hero-module .hero-button {
        padding: 10px 20px !important;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .directory-hero-module .hero-text {
        font-size: 0.9rem !important;
    }
    
    .directory-hero-module .hero-button {
        width: 100%;
        text-align: center;
    }
}

/* Accessibilité */
@media (prefers-reduced-motion: reduce) {
    .directory-hero-module .hero-content > *,
    .directory-hero-module .hero-button,
    .directory-hero-module .hero-link {
        animation: none !important;
        transition: none !important;
    }
}

/* Mode sombre */
@media (prefers-color-scheme: dark) {
    .directory-hero-module .hero-content[data-glass="true"] {
        background-color: rgba(0, 0, 0, 0.45);
        border-color: rgba(255, 255, 255, 0.2);
    }
}