/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Palette de couleurs inspirée des images */
    --color-primary: #2C4A4A; /* Vert foncé/teal */
    --color-secondary: #3D6363; /* Vert moyen */
    --color-accent: #C9A961; /* Or/beige doré */
    --color-bg-cream: #F5EFE0; /* Beige crème */
    --color-bg-light: #FAF7F0; /* Beige très clair */
    --color-text-dark: #1A2E2E; /* Texte foncé */
    --color-text-medium: #4A5F5F; /* Texte moyen */
    --color-text-light: #7A8F8F; /* Texte clair */
    --color-white: #FFFFFF;
}

body {
    font-family: 'Open Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--color-bg-cream);
    color: var(--color-text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* En-tête avec logo */
header {
    background: var(--color-bg-light);
    box-shadow: 0 4px 20px rgba(44, 74, 74, 0.1);
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 3px solid var(--color-accent);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

/* Logo inspiré du cèdre dans un cercle */
.logo-icon {
    width: 60px;
    height: 60px;
    border: 3px solid var(--color-primary);
    border-radius: 50%;
    position: relative;
    display: inline-block;
    background: var(--color-white);
}

.logo-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 30px solid var(--color-primary);
}

.logo-icon::after {
    content: '';
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 12px;
    background: var(--color-primary);
}

.logo-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.8rem;
    color: var(--color-primary);
    font-weight: 700;
    letter-spacing: -1px;
}

.tagline {
    color: var(--color-text-medium);
    font-size: 1.1rem;
    font-weight: 400;
}

/* Contenu principal */
main {
    flex: 1;
    padding: 2rem 1rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Conteneur de recherche */
.search-container {
    background: var(--color-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(44, 74, 74, 0.08);
    margin-bottom: 2rem;
    border: 2px solid var(--color-accent);
    animation: fadeInDown 0.6s ease-out;
}

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

.search-box {
    margin-bottom: 1.5rem;
}

#searchInput {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    border: 2px solid var(--color-secondary);
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
    background: var(--color-bg-light);
    color: var(--color-text-dark);
}

#searchInput:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(44, 74, 74, 0.1);
    background: var(--color-white);
}

/* Filtres de catégories */
.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center;
}

.filter-btn {
    padding: 0.7rem 1.5rem;
    border: 2px solid var(--color-primary);
    background-color: var(--color-white);
    color: var(--color-primary);
    cursor: pointer;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(44, 74, 74, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.filter-btn:hover::before {
    width: 300px;
    height: 300px;
}

.filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 74, 74, 0.2);
    border-color: var(--color-accent);
}

.filter-btn.active {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
    box-shadow: 0 4px 15px rgba(44, 74, 74, 0.3);
}

/* Info résultats */
.results-info {
    text-align: center;
    margin-bottom: 1.5rem;
}

.results-info p {
    color: var(--color-text-medium);
    font-size: 1.1rem;
    font-weight: 600;
    background: var(--color-white);
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(44, 74, 74, 0.1);
}

/* Grille d'annuaire */
.directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    animation: fadeIn 0.8s ease-out;
}

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

/* Cartes d'entreprise */
.company-card {
    background: var(--color-white);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(44, 74, 74, 0.1);
    padding: 1.8rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    animation: slideUp 0.5s ease-out;
}

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

.company-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 100%);
}

.company-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(44, 74, 74, 0.15);
    border-color: var(--color-accent);
}

/* En-tête de la carte avec logo */
.company-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.company-logo {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--color-accent);
    flex-shrink: 0;
    background: var(--color-white);
    box-shadow: 0 2px 8px rgba(44, 74, 74, 0.1);
}

.company-title {
    flex: 1;
}

.company-card h3 {
    margin-top: 0;
    color: var(--color-primary);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
}

.company-card .category {
    display: inline-block;
    background: var(--color-primary);
    color: var(--color-white);
    padding: 0.4rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.company-card .description {
    color: var(--color-text-medium);
    line-height: 1.7;
    margin-bottom: 1.2rem;
    font-size: 0.95rem;
}

.company-card .info-section {
    border-top: 2px solid var(--color-bg-cream);
    padding-top: 1rem;
    margin-top: 1rem;
}

.company-card .contact {
    display: flex;
    align-items: center;
    margin-bottom: 0.6rem;
    color: var(--color-text-dark);
    font-weight: 600;
}

.company-card .contact::before {
    content: '📞';
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.company-card .address {
    display: flex;
    align-items: center;
    color: var(--color-text-medium);
    font-size: 0.9rem;
}

.company-card .address::before {
    content: '📍';
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.company-card .email {
    display: flex;
    align-items: center;
    color: var(--color-secondary);
    font-size: 0.9rem;
    margin-top: 0.6rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.company-card .email::before {
    content: '✉️';
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.company-card .email:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

/* Message aucun résultat */
.no-results {
    text-align: center;
    padding: 3rem;
    background: var(--color-white);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(44, 74, 74, 0.08);
    border: 2px solid var(--color-accent);
}

.no-results p {
    color: var(--color-text-medium);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.no-results p:first-child {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text-dark);
}

/* Pied de page */
footer {
    background: var(--color-bg-light);
    text-align: center;
    padding: 1.5rem;
    margin-top: 3rem;
    box-shadow: 0 -4px 20px rgba(44, 74, 74, 0.08);
    border-top: 3px solid var(--color-accent);
}

footer p {
    color: var(--color-text-medium);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .logo-text {
        font-size: 2rem;
    }

    .logo-icon {
        width: 50px;
        height: 50px;
    }

    .logo-icon::before {
        border-left: 10px solid transparent;
        border-right: 10px solid transparent;
        border-bottom: 24px solid var(--color-primary);
    }

    .tagline {
        font-size: 1rem;
    }

    .directory-grid {
        grid-template-columns: 1fr;
    }

    .category-filters {
        gap: 0.5rem;
    }

    .filter-btn {
        font-size: 0.85rem;
        padding: 0.6rem 1.2rem;
    }

    #searchInput {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    main {
        padding: 1rem 0.5rem;
    }

    .search-container {
        padding: 1.5rem;
    }

    .company-card {
        padding: 1.5rem;
    }

    .logo-container {
        flex-direction: column;
        gap: 0.5rem;
    }
}

