@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&display=swap');

:root {
    --bg-light: #F6F2EC;
    --bg-dark: #000000;
    --text-light: #000;
    --text-dark: #000000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Playfair Display', serif;
    text-decoration: none;
}

body {
    background-color: var(--bg-light);
    color: var(--text-light);
    height: 100vh;
    overflow: hidden;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.back {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 16px;
    font-weight: 500;
    color: black;
    text-decoration: none;
    z-index: 100;
}

.back:hover {
    text-decoration: underline;
}

.blog-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.blog-header {
    text-align: center;
    padding: 15px 0;
    flex-shrink: 0;
}

.blog-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-light);
}

.blog-subtitle {
    font-size: 1rem;
    color: #666;
    margin-bottom: 12px;
}

.blog-intro {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 15px;
}

.entreprise-link {
    display: inline-block;
    background: linear-gradient(135deg, #333 0%, #555 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

.entreprise-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.25);
}

.companies-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
    min-height: 0;
}

.companies-grid {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.company-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.company-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.company-header {
    background: linear-gradient(135deg, #333 0%, #555 100%);
    color: white;
    padding: 18px;
    text-align: center;
    flex-shrink: 0;
}

.company-logo-box {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    backdrop-filter: blur(10px);
}

.company-logo-text {
    font-size: 1.1rem;
    font-weight: bold;
    color: white;
}

.company-name {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 4px 0;
}

.company-type {
    font-size: 0.85rem;
    opacity: 0.9;
    font-style: italic;
}

.company-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 0;
}

.company-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #444;
    margin-bottom: 15px;
    text-align: justify;
    flex: 1;
}

.company-details {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    flex-shrink: 0;
}

.detail-item {
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: #333;
}

.detail-item:last-child {
    margin-bottom: 0;
}

.company-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.articles-button, .company-button {
    flex: 1;
    display: block;
    color: white;
    padding: 12px 15px;
    border-radius: 22px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.articles-button {
    background: linear-gradient(135deg, #333 0%, #555 100%);
}

.articles-button:hover {
    background: linear-gradient(135deg, #555 0%, #777 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.company-button {
    background: linear-gradient(135deg, #666 0%, #888 100%);
}

.company-button:hover {
    background: linear-gradient(135deg, #777 0%, #999 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.company-card:nth-child(2) .articles-button {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
}

.company-card:nth-child(2) .articles-button:hover {
    background: linear-gradient(135deg, #F7931E 0%, #FF8C42 100%);
}

.company-card:nth-child(2) .company-button {
    background: linear-gradient(135deg, #E55A2B 0%, #CC4A1A 100%);
}

.company-card:nth-child(2) .company-button:hover {
    background: linear-gradient(135deg, #F16B41 0%, #E55A2B 100%);
}

.articles-button:hover {
    background: linear-gradient(135deg, #555 0%, #777 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.company-card:nth-child(2) .articles-button {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
}

.company-card:nth-child(2) .articles-button:hover {
    background: linear-gradient(135deg, #F7931E 0%, #FF8C42 100%);
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
    .companies-grid {
        max-width: 550px;
    }
    
    .blog-title {
        font-size: 2.2rem;
    }
}

@media screen and (max-width: 768px) {
    body {
        padding: 15px;
    }
    
    .companies-grid {
        max-width: 450px;
    }
    
    .companies-section {
        flex: none;
        padding: 15px 0;
    }
    
    .blog-title {
        font-size: 2rem;
    }
    
    .company-card {
        max-height: 280px;
    }
    
    .company-content {
        padding: 18px;
    }
    
    .company-description {
        font-size: 0.9rem;
        margin-bottom: 12px;
    }
}

@media screen and (max-width: 480px) {
    .back {
        top: 15px;
        left: 15px;
        font-size: 14px;
    }
    
    .blog-title {
        font-size: 1.8rem;
    }
    
    .blog-subtitle {
        font-size: 1rem;
    }
    
    .blog-intro {
        font-size: 0.9rem;
    }
    
    .companies-grid {
        max-width: 100%;
        padding: 0 10px;
    }
    
    .company-card {
        max-height: 260px;
    }
    
    .company-header {
        padding: 15px;
    }
    
    .company-name {
        font-size: 1.4rem;
    }
    
    .company-content {
        padding: 15px;
    }
}