/* ============================================================
   Variables de couleurs
   ============================================================ */
:root {
    --primary-blue: #0072ce;
    --primary-orange: #f7941e;
    --primary-black: #000000;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --dark-gray: #6c757d;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --border-radius-large: 12px;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-gray);
    color: var(--primary-black);
    line-height: 1.6;
}

/* ============================================================
   Grille responsive Contenu principal / Sidebar
   Active le côte-à-côte dès la tablette (768px) au lieu
   d'attendre le breakpoint lg (992px) de Bootstrap.
   ============================================================ */
@media (min-width: 768px) {
    .col-md-7 {
        flex: 0 0 58.333333%;
        max-width: 58.333333%;
    }
    .col-md-5 {
        flex: 0 0 41.666667%;
        max-width: 41.666667%;
    }
    .row {
        align-items: flex-start;
    }
}

@media (min-width: 992px) {
    .col-lg-8 {
        flex: 0 0 66.666667%;
        max-width: 66.666667%;
    }
    .col-lg-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

/* ============================================================
   Breadcrumb
   ============================================================ */
.secteur-me-1 {
    margin-right: 0.5rem !important;
}

.breadcrumb-custom {
    font-size: 12px;
}

@media (min-width: 768px) {
    .breadcrumb-custom {
        font-size: 14px;
    }
}

/* ============================================================
   Hero Header
   ============================================================ */
.profile-hero {
    padding: 10px 0;
    position: relative;
    /* margin-bottom: 20px; */
}

@media (min-width: 768px) {
    .profile-hero {
        padding: 10px 0 20px;
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 114, 206, 0.9) 0%, rgba(0, 90, 158, 0.85) 100%);
}

/* ============================================================
   Contenu Principal
   ============================================================ */
.profile-content {
    padding: 0 0 30px;
}

@media (min-width: 768px) {
    .profile-content {
        padding: 0 0 60px;
    }
}

/* ============================================================
   Cartes de contenu
   ============================================================ */
.company-card,
.content-card {
    background: var(--white);
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    overflow: hidden;
    transition:
        transform 0.3s,
        box-shadow 0.3s;
}

.company-card:hover,
.content-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* ============================================================
   En-tête Entreprise
   ============================================================ */
.company-header-wrapper {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
    background: linear-gradient(135deg, var(--light-gray) 0%, var(--white) 100%);
}

@media (min-width: 768px) {
    .company-header-wrapper {
        padding: 30px;
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        gap: 25px;
    }
}

.company-logo-large {
    flex-shrink: 0;
    width: 90px;
    height: 90px;
    border-radius: var(--border-radius-large);
    overflow: hidden;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 4px solid var(--white);
}

@media (min-width: 576px) {
    .company-logo-large {
        width: 120px;
        height: 120px;
    }
}

.company-logo-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-placeholder {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-blue);
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (min-width: 576px) {
    .logo-placeholder {
        font-size: 36px;
    }
}

.company-header-info {
    flex: 1;
}

.package-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

@media (min-width: 768px) {
    .package-badge {
        padding: 6px 16px;
        font-size: 13px;
    }
}

.package-premium {
    background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%);
    color: var(--primary-black);
}

.package-standard {
    background: linear-gradient(135deg, #c0c0c0 0%, #a8a8a8 100%);
    color: var(--primary-black);
}

.package-basic {
    background: linear-gradient(135deg, #cd7f32 0%, #b87333 100%);
    color: var(--white);
}

.company-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary-black);
    margin-bottom: 10px;
    line-height: 1.2;
}

@media (min-width: 576px) {
    .company-title {
        font-size: 24px;
    }
}

@media (min-width: 768px) {
    .company-title {
        font-size: 32px;
    }
}

.company-category {
    font-size: 13px;
    color: var(--dark-gray);
    margin-bottom: 15px;
}

@media (min-width: 768px) {
    .company-category {
        font-size: 16px;
    }
}

.company-category i {
    color: var(--primary-orange);
    margin-right: 8px;
}

.company-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 15px;
    justify-content: center;
}

@media (min-width: 768px) {
    .company-meta {
        justify-content: flex-start;
    }
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--dark-gray);
}

@media (min-width: 768px) {
    .meta-item {
        font-size: 14px;
    }
}

.meta-item i {
    color: var(--primary-blue);
}

/* ============================================================
   Réseaux Sociaux
   ============================================================ */
.social-links-modern {
    padding: 15px;
    border-top: 1px solid var(--medium-gray);
    display: flex;
    gap: 12px;
    justify-content: center;
}

@media (min-width: 768px) {
    .social-links-modern {
        padding: 20px 30px;
    }
}

.social-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 16px;
}

@media (min-width: 768px) {
    .social-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

.social-btn:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.social-btn.facebook {
    background: #1877f2;
}
.social-btn.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}
.social-btn.twitter {
    background: #000000;
}
.social-btn.linkedin {
    background: #0077b5;
}
.social-btn.youtube {
    background: #ff0000;
}

/* ============================================================
   En-têtes de cartes
   ============================================================ */
.card-header-custom {
    padding: 15px 20px;
    border-bottom: 3px solid var(--primary-blue);
    background: linear-gradient(135deg, var(--light-gray) 0%, var(--white) 100%);
}

@media (min-width: 576px) {
    .card-header-custom {
        padding: 20px 30px;
    }
}

.card-header-custom h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-black);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

@media (min-width: 768px) {
    .card-header-custom h2 {
        font-size: 22px;
    }
}

.card-header-custom h2 i {
    color: var(--primary-blue);
    font-size: 16px;
}

@media (min-width: 768px) {
    .card-header-custom h2 i {
        font-size: 24px;
    }
}

/* ============================================================
   Corps de cartes
   ============================================================ */
.card-body-custom {
    padding: 20px;
}

@media (min-width: 576px) {
    .card-body-custom {
        padding: 30px;
    }
}

/* ============================================================
   Texte de présentation
   ============================================================ */
.presentation-text {
    font-size: 14px;
    line-height: 1.8;
    color: #333;
    text-align: left;
    margin-bottom: 30px;
}

@media (min-width: 768px) {
    .presentation-text {
        font-size: 16px;
        text-align: justify;
    }
}

/* ============================================================
   Grille de statistiques
   ============================================================ */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 30px;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: var(--light-gray);
    border-radius: var(--border-radius);
    transition: all 0.3s;
}

.stat-item:hover {
    background: var(--primary-blue);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 114, 206, 0.3);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-orange);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-item:hover .stat-icon {
    background: var(--white);
    color: var(--primary-blue);
}

.stat-info h3 {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    color: var(--primary-blue);
}

@media (min-width: 768px) {
    .stat-info h3 {
        font-size: 28px;
    }
}

.stat-item:hover .stat-info h3 {
    color: var(--white);
}

.stat-info p {
    margin: 0;
    font-size: 14px;
    color: var(--dark-gray);
}

.stat-item:hover .stat-info p {
    color: var(--white);
}

/* ============================================================
   Galerie
   ============================================================ */
.gallery-carousel {
    position: relative;
    margin-bottom: 20px;
}

.gallery-main {
    position: relative;
    width: 100%;
    height: 300px;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--primary-black);
}

@media (min-width: 768px) {
    .gallery-main {
        height: 450px;
    }
}

.gallery-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.gallery-slide.active {
    opacity: 1;
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: var(--white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s;
    z-index: 10;
}

@media (min-width: 768px) {
    .gallery-nav {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

.gallery-nav:hover {
    background: var(--primary-blue);
    transform: translateY(-50%) scale(1.1);
}

.gallery-prev {
    left: 10px;
}

@media (min-width: 768px) {
    .gallery-prev {
        left: 20px;
    }
}

.gallery-next {
    right: 10px;
}

@media (min-width: 768px) {
    .gallery-next {
        right: 20px;
    }
}

.gallery-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding: 10px;
    padding-bottom: 6px;
    margin: 0 -10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.gallery-thumbnails::-webkit-scrollbar {
    display: none;
}

@media (min-width: 768px) {
    .gallery-thumbnails {
        gap: 15px;
        overflow-x: visible;
        overflow-y: hidden;
        justify-content: center;
        padding: 15px 0;
        margin: 0;
        flex-wrap: wrap;
    }
}

.thumbnail {
    width: 70px;
    height: 50px;
    flex-shrink: 0;
    border-radius: var(--border-radius);
    object-fit: cover;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s;
    border: 3px solid transparent;
}

@media (min-width: 768px) {
    .thumbnail {
        width: 120px;
        height: 80px;
        flex-shrink: unset;
    }
}

.thumbnail:hover {
    opacity: 0.9;
    transform: translateY(-3px);
}

.thumbnail.active {
    opacity: 1;
    border-color: var(--primary-blue);
    box-shadow: 0 4px 15px rgba(0, 114, 206, 0.4);
}

/* ============================================================
   Grille Produits / Services — compacte, 2 colonnes
   ============================================================ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

@media (min-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
}

.service-item {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    padding: 10px;
    background: var(--light-gray);
    border-radius: var(--border-radius);
    text-align: center;
    transition: all 0.3s;
    border: 2px solid transparent;
    overflow: hidden;
}

.service-item:hover {
    background: var(--white);
    border-color: var(--primary-blue);
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 114, 206, 0.18);
}

.service-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 8px;
    background: var(--medium-gray);
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.service-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.service-item h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-black);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.service-item p {
    font-size: 12px;
    color: var(--dark-gray);
    margin: 0 0 6px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.service-link {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-blue);
    text-decoration: none;
    margin-top: auto;
}

.service-link:hover {
    color: var(--primary-orange);
}

/* ============================================================
   Logos de confiance
   ============================================================ */
.trust-logos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (min-width: 768px) {
    .trust-logos-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

.trust-logo-item {
    height: 100px;
    background: var(--light-gray);
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.trust-logo-item:hover {
    border-color: var(--primary-orange);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(247, 148, 30, 0.3);
}

.trust-logo-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: all 0.3s;
}

.trust-logo-item:hover img {
    transform: scale(1.05);
}

/* ============================================================
   Sidebar
   ============================================================ */
.sidebar-sticky {
    position: relative;
    top: 0;
    max-height: none;
    margin-top: 30px;
    padding-bottom: 20px;
}

@media (min-width: 768px) {
    .sidebar-sticky {
        margin-top: 0;
    }
}

@media (min-width: 992px) {
    .sidebar-sticky {
        position: sticky;
        top: 20px;
        /* max-height: calc(100vh - 40px); */
        overflow-y: auto;
    }
}

/* Personnalisation de la scrollbar */
.sidebar-sticky::-webkit-scrollbar {
    width: 6px;
}

.sidebar-sticky::-webkit-scrollbar-track {
    background: var(--light-gray);
    border-radius: 10px;
}

.sidebar-sticky::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 10px;
}

.sidebar-sticky::-webkit-scrollbar-thumb:hover {
    background: var(--primary-orange);
}

/* ============================================================
   Cartes Sidebar
   ============================================================ */
.sidebar-card {
    background: var(--white);
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    overflow: hidden;
}

.sidebar-card-header {
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-blue), #005a9e);
    color: var(--white);
    border-bottom: 3px solid var(--primary-orange);
}

.sidebar-card-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

@media (min-width: 992px) {
    .sidebar-card-header h3 {
        font-size: 18px;
    }
}

.sidebar-card-body {
    padding: 20px;
}

.sidebar-card-body.p-0 {
    padding: 0;
}

/* ============================================================
   Items de contact dans sidebar
   ============================================================ */
.contact-item-sidebar {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--medium-gray);
}

.contact-item-sidebar:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.contact-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-orange));
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

@media (min-width: 992px) {
    .contact-icon {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

.contact-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.contact-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--dark-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-value {
    font-size: 14px;
    color: var(--primary-black);
    font-weight: 500;
    word-break: break-word;
}

.contact-value:is(a) {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.3s;
}

.contact-value:is(a):hover {
    color: var(--primary-orange);
    text-decoration: underline;
}

/* ============================================================
   Footer de carte sidebar
   ============================================================ */
.sidebar-card-footer {
    padding: 20px;
    background: var(--light-gray);
    border-top: 1px solid var(--medium-gray);
}

.btn-contact-primary {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--primary-blue), #005a9e);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 114, 206, 0.3);
}

@media (min-width: 768px) {
    .btn-contact-primary {
        padding: 14px 20px;
    }
}

.btn-contact-primary:hover {
    background: linear-gradient(135deg, var(--primary-orange), #e68317);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(247, 148, 30, 0.4);
}

/* ============================================================
   Map Container
   ============================================================ */
.map-container {
    width: 100%;
    height: 250px;
    background: var(--light-gray);
}

.map-container iframe {
    display: block;
}

/* ============================================================
   Boutons de partage
   ============================================================ */
.share-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

@media (min-width: 576px) {
    .share-buttons {
        gap: 10px;
    }
}

.share-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    color: var(--white);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

@media (min-width: 576px) {
    .share-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

.share-btn:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.share-facebook {
    background: #1877f2;
}
.share-twitter {
    background: #000000;
}
.share-linkedin {
    background: #0077b5;
}
.share-whatsapp {
    background: #25d366;
}
.share-copy {
    background: var(--dark-gray);
}

/* ============================================================
   Entreprises similaires
   ============================================================ */
.similar-company {
    display: flex;
    gap: 15px;
    align-items: center;
    padding: 15px;
    background: var(--light-gray);
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    transition: all 0.3s;
    cursor: pointer;
}

.similar-company:last-child {
    margin-bottom: 0;
}

.similar-company:hover {
    background: var(--primary-blue);
    color: var(--white);
    transform: translateX(5px);
}

.similar-logo {
    width: 50px;
    height: 50px;
    background: var(--white);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--primary-blue);
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.similar-company:hover .similar-logo {
    background: var(--primary-orange);
    color: var(--white);
}

.similar-info h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-black);
}

@media (min-width: 992px) {
    .similar-info h4 {
        font-size: 16px;
    }
}

.similar-company:hover .similar-info h4 {
    color: var(--white);
}

.similar-info p {
    margin: 0;
    font-size: 13px;
    color: var(--dark-gray);
}

.similar-company:hover .similar-info p {
    color: rgba(255, 255, 255, 0.9);
}
