/* --- DIRECTORY SPECIFIC STYLES --- */

/* Hero Section */
.directory-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: var(--white);
    padding: 80px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.directory-hero h1 {
    font-size: 2.8rem;
    margin-bottom: 16px;
    font-weight: 700;
}

.directory-hero p {
    font-size: 1.2rem;
    color: #cbd5e1;
    max-width: 600px;
    margin: 0 auto;
}

/* Search Container */
.search-container {
    background: var(--white);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-lg);
    margin-top: -40px;
    position: relative;
    z-index: 10;
    margin-bottom: 60px;
}

.search-form {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.input-group {
    flex: 1;
    position: relative;
    min-width: 250px;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

.form-input, .form-select {
    width: 100%;
    padding: 14px 16px 14px 48px; /* Space for icon */
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #f8fafc;
    appearance: none; /* For select */
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    background-color: var(--white);
}

/* Directory Grid */
.directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 32px;
    margin-bottom: 60px;
}

/* Company Card */
.company-card {
    background: var(--white);
    border-radius: 16px;
    border: 1px solid #f1f5f9;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.company-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: #e2e8f0;
}

.company-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #f8fafc;
}

.company-cat {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    color: var(--primary-color);
    background: #eff6ff;
    padding: 4px 10px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.company-name {
    font-size: 1.4rem;
    margin-bottom: 8px;
    line-height: 1.3;
}

.company-name a {
    color: #1e293b;
    text-decoration: none;
}

.company-name a:hover {
    color: var(--primary-color);
}

.company-rating {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.company-body {
    padding: 20px 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.company-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.95rem;
    color: #64748b;
}

.company-info i {
    color: #94a3b8;
    width: 20px;
    text-align: center;
    margin-top: 3px;
}

.company-map {
    margin-top: 16px;
    border-radius: 12px;
    overflow: hidden;
    height: 150px;
    background: #f1f5f9;
    position: relative;
}

.company-map iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.map-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}

/* Company Blog Preview in Card */
.company-blog-posts {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed #e2e8f0;
}

.company-blog-title {
    display: block;
    font-size: 0.9rem;
    color: #334155;
    margin-bottom: 10px;
}

.company-blog-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.company-blog-item {
    font-size: 0.9rem;
}

.company-blog-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #475569;
    padding: 6px;
    border-radius: 8px;
    transition: background 0.2s;
}

.company-blog-link:hover {
    background: #f8fafc;
    color: var(--primary-color);
}

.company-blog-thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    background-color: #e2e8f0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.company-footer {
    padding: 16px 24px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    display: flex;
    gap: 12px;
}

/* Profile Page (Fiche Entreprise) */
.profile-header {
    background: var(--white);
    padding: 60px 0 40px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 40px;
}

.profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ecfdf5;
    color: #059669;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.profile-title {
    font-size: 2.5rem;
    color: #1e293b;
    margin-bottom: 12px;
}

.profile-subtitle {
    font-size: 1.1rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-container {
    max-width: 1200px;
    margin: 0 auto 80px;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
}

.info-card {
    background: var(--white);
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f1f5f9;
    margin-bottom: 32px;
}

.info-row {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
}

.info-row:last-child {
    margin-bottom: 0;
}

.info-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #eff6ff;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.info-content h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.info-content p {
    font-size: 1.1rem;
    color: #334155;
    font-weight: 500;
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-right: 8px;
    margin-bottom: 8px;
}

.badge-primary {
    background: #eff6ff;
    color: var(--primary-color);
}

/* Blog Mini Cards (Profile) */
.blog-card-mini {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
}

.blog-card-mini:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.blog-mini-img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.blog-mini-content {
    flex: 1;
}

.blog-mini-title {
    font-size: 1rem;
    margin-bottom: 8px;
    line-height: 1.4;
}

.blog-mini-link {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #94a3b8;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 24px;
    color: #e2e8f0;
}

.empty-state h3 {
    color: #1e293b;
    margin-bottom: 12px;
}

/* Pagination (Added to match Blog) */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 60px 0;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 15px;
    border-radius: 8px;
    background: var(--white);
    border: 1px solid #e2e8f0;
    color: #64748b;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
}

.page-link:hover, .page-link.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* Responsive */
@media (max-width: 992px) {
    .profile-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .search-form {
        flex-direction: column;
    }
    
    .input-group {
        width: 100%;
    }
    
    .directory-grid {
        grid-template-columns: 1fr;
    }
    
    .company-footer {
        flex-direction: column;
    }
}
