/* 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;
}

/* Hero Header */
.profile-hero {
    background:
        linear-gradient(135deg, var(--primary-blue) 0%, #005a9e 100%),
        url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?w=1920&h=400&fit=crop');
    background-blend-mode: multiply;
    background-size: cover;
    background-position: center;
    padding: 10px 0 10px;
    position: relative;
    margin-bottom: 30px;
    /* margin-top: 30px; */
}

.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%);
}

.breadcrumb-custom {
    position: relative;
    z-index: 1;
    color: var(--white);
    font-size: 14px;
}

.breadcrumb-custom a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.breadcrumb-custom a:hover {
    opacity: 1;
    text-decoration: underline;
}

.breadcrumb-custom i {
    margin: 0 10px;
    font-size: 10px;
    opacity: 0.7;
}

.breadcrumb-custom span {
    font-weight: 600;
}

/* Contenu Principal */
.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: 30px;
    display: flex;
    gap: 25px;
    align-items: flex-start;
    background: linear-gradient(135deg, var(--light-gray) 0%, var(--white) 100%);
}

.company-logo-large {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    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);
}

.company-logo-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-placeholder {
    font-size: 36px;
    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;
}

.company-header-info {
    flex: 1;
}

.package-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.company-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-black);
    margin-bottom: 10px;
    line-height: 1.2;
}

.company-category {
    font-size: 16px;
    color: var(--dark-gray);
    margin-bottom: 15px;
}

.company-category i {
    color: var(--primary-orange);
    margin-right: 8px;
}

.company-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 15px;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--dark-gray);
}

.meta-item i {
    color: var(--primary-blue);
}

/* Réseaux Sociaux */
.social-links-modern {
    padding: 20px 30px;
    border-top: 1px solid var(--medium-gray);
    display: flex;
    gap: 12px;
    justify-content: center;
}

.social-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
    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: #25d366;
}
.social-btn.linkedin {
    background: #0077b5;
}
.social-btn.youtube {
    background: #ff0000;
}

/* En-têtes de cartes */
.card-header-custom {
    padding: 20px 30px;
    border-bottom: 3px solid var(--primary-blue);
    background: linear-gradient(135deg, var(--light-gray) 0%, var(--white) 100%);
}

.card-header-custom h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-black);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-header-custom h2 i {
    color: var(--primary-blue);
    font-size: 24px;
}

/* Corps de cartes */
.card-body-custom {
    padding: 30px;
}

/* Texte de présentation */
.presentation-text {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    text-align: justify;
    margin-bottom: 30px;
}

/* Grille de statistiques */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.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: 28px;
    font-weight: 700;
    margin: 0;
    color: var(--primary-blue);
}

.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: 450px;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--primary-black);
}

.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: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s;
    z-index: 10;
}

.gallery-nav:hover {
    background: var(--primary-blue);
    transform: translateY(-50%) scale(1.1);
}

.gallery-prev {
    left: 20px;
}

.gallery-next {
    right: 20px;
}

.gallery-thumbnails {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.thumbnail {
    width: 120px;
    height: 80px;
    border-radius: var(--border-radius);
    object-fit: cover;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s;
    border: 3px solid transparent;
}

.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 de services */
/* Grille de services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-item {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    border: 1px solid #f0f0f0;
}

.service-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 114, 206, 0.15);
}

/* Image du service */
.service-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* ou cover selon vos besoins */
    object-position: center;
    padding: 20px; /* Ajoute un espace autour de l'image */
    transition: transform 0.4s ease;
}

.service-item:hover .service-image img {
    transform: scale(1.05);
    padding: 15px; /* Réduit le padding au survol pour l'effet zoom */
}

/* Overlay au survol */
.service-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 114, 206, 0.9), rgba(255, 102, 0, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.service-item:hover .service-overlay {
    opacity: 1;
}

.overlay-icon {
    width: 60px;
    height: 60px;
    background: var(--white);
    color: var(--primary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transform: scale(0);
    transition: transform 0.3s ease 0.1s;
}

.service-item:hover .overlay-icon {
    transform: scale(1);
}

/* Contenu du service */
.service-content {
    padding: 25px;
}

.service-content h4 {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-black);
    margin-bottom: 12px;
    line-height: 1.4;
}

.service-content p {
    font-size: 14px;
    color: var(--dark-gray);
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Lien "Voir plus" */
.service-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-blue);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.service-link i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.service-link:hover {
    color: var(--primary-orange);
    gap: 12px;
}

.service-link:hover i {
    transform: translateX(5px);
}

/* Modal Service */
.service-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
    overflow-y: auto; /* Permet le scroll du modal lui-même */
    padding: 20px 0; /* Ajoute un peu d'espace en haut et en bas */
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.service-modal-content {
    position: relative;
    background-color: var(--white);
    margin: 0 auto;
    width: 90%;
    max-width: 800px;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.4s ease;
    margin-bottom: 40px; /* Espace en bas pour le scroll */
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.service-modal-close {
    position: sticky; /* Change de absolute à sticky */
    top: 15px;
    right: 20px;
    float: right; /* Assure qu'il reste à droite */
    font-size: 35px;
    font-weight: 300;
    color: #999;
    cursor: pointer;
    z-index: 10;
    transition: color 0.3s;
    line-height: 1;
    background: var(--white);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.service-modal-close:hover {
    color: var(--primary-orange);
}

.service-modal-body {
    padding: 0;
}

.service-modal-image {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.service-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 30px;
}

.service-modal-info {
    padding: 40px;
    max-height: none; /* Pas de limitation de hauteur */
}

.service-modal-info h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-black);
    margin-bottom: 20px;
    line-height: 1.3;
    clear: both; /* Pour éviter que le titre chevauche le bouton close */
}

.service-modal-info #modalServiceDescription {
    font-size: 16px;
    color: var(--dark-gray);
    line-height: 1.8;
    white-space: pre-wrap; /* Préserve les sauts de ligne */
    word-wrap: break-word; /* Coupe les mots trop longs */
}

/* Responsive */
@media (max-width: 768px) {
    .service-modal {
        padding: 10px 0;
    }

    .service-modal-content {
        width: 95%;
        margin-bottom: 20px;
    }

    .service-modal-image {
        height: 200px;
    }

    .service-modal-info {
        padding: 25px;
    }

    .service-modal-info h2 {
        font-size: 22px;
    }

    .service-modal-close {
        font-size: 28px;
        width: 35px;
        height: 35px;
        top: 10px;
        right: 10px;
    }
}

/* Logos de confiance */
.trust-logos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.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;
}

/* SIDEBAR FIXE */
.sidebar-sticky {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding-bottom: 20px;
}

/* 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: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.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: 45px;
    height: 45px;
    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: 18px;
    flex-shrink: 0;
}

.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: 14px 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);
}

.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: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.share-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    color: var(--white);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.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: 16px;
    font-weight: 600;
    color: var(--primary-black);
}

.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);
}

/* Responsive Design */
@media (max-width: 991px) {
    .sidebar-sticky {
        position: relative;
        top: 0;
        max-height: none;
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    .profile-hero {
        padding: 60px 0 30px;
    }

    .company-header-wrapper {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .company-title {
        font-size: 24px;
    }

    .company-meta {
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .gallery-main {
        height: 300px;
    }

    .gallery-nav {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .gallery-prev {
        left: 10px;
    }

    .gallery-next {
        right: 10px;
    }

    .thumbnail {
        width: 80px;
        height: 60px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .trust-logos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .company-logo-large {
        width: 90px;
        height: 90px;
    }

    .logo-placeholder {
        font-size: 28px;
    }

    .company-title {
        font-size: 20px;
    }

    .card-header-custom {
        padding: 15px 20px;
    }

    .card-body-custom {
        padding: 20px;
    }

    .gallery-thumbnails {
        gap: 10px;
        flex-wrap: wrap;
    }

    .thumbnail {
        width: 70px;
        height: 50px;
    }

    .share-buttons {
        gap: 8px;
    }

    .share-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}
