:root {
    --apresta-pink: #e7207c;
    --apresta-blue: #0c9fa9;
    --apresta-text: #24283e;
}

/* Override des couleurs Bootstrap */
.text-primary {
    color: var(--apresta-blue) !important;
}

.text-muted {
    color: var(--apresta-text) !important;
}

.nav-pills .nav-link {
    color: var(--apresta-text) !important;
}

.nav-pills .nav-link.active {
    background-color: var(--apresta-blue) !important;
    color: white !important;
}

.nav-pills .nav-link:hover {
    background-color: rgba(12, 159, 169, 0.1);
    color: var(--apresta-blue) !important;
}

/* Suppression du outline bleu au focus */
.nav-link:focus,
.btn:focus {
    box-shadow: none !important;
}

/* Couleur des liens */
a {
    color: var(--apresta-blue);
}

a:hover {
    color: var(--apresta-pink);
}

.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 280px;
    background: #b3b3b3;
    border-right: 0px solid #dee2e6;
    overflow-y: auto;
    padding: 28px 0 200px 0;
    z-index: 1000;
}

/* Conteneur du menu avec marges */
.sidebar .nav {
    padding: 0 16px;
}

/* Style pour le logo */
.sidebar .logo {
    padding: 0 24px;
    text-align: left;
}

/* Styles pour les liens du menu */
.nav-link {
    color: var(--apresta-text) !important;
    padding: 0.4rem 1rem;
    border-radius: 8px;
    margin-bottom: 4px;
}

.nav-link:hover {
    background-color: rgba(12, 159, 169, 0.1);
    color: var(--apresta-blue) !important;
}

.nav-link.active {
    color: white !important;
    background-color: var(--apresta-blue) !important;
    font-weight: bold;
}

/* S'assurer que le texte reste blanc au survol quand le lien est actif */
.nav-link.active:hover {
    color: white !important;
}

/* Actions du devis */
.devis-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 280px;
    padding: 1rem;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    z-index: 101;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.action-buttons .btn-icon {
    padding: 0.5rem;
    color: var(--apresta-text);
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-buttons .btn-icon:hover {
    background: #f8f9fa;
    color: var(--apresta-pink);
}

.decision-buttons {
    display: grid;
    gap: 0.5rem;
}

.btn-validate {
    text-decoration: none;  /* Supprime le soulignement */
    text-align: center;     /* Centre le texte */
    display: flex;          /* Garde l'alignement avec l'icône */
    justify-content: center; /* Centre le contenu */
    align-items: center;    /* Centre verticalement */
    width: 100%;           /* Garde la largeur complète */
    background-color: var(--apresta-pink);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.btn-validate:hover {
    background-color: #d01b6f;  /* Version plus foncée du rose */
    color: white;              /* Garde le texte blanc au hover */
    text-decoration: none;     /* Pas de soulignement au hover */
}

.btn-reject {
    text-decoration: none;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    background-color: var(--bs-light);
    color: var(--bs-dark);
    border: none;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.btn-reject:hover {
    background-color: #e9ecef;
    color: var(--bs-dark);
    text-decoration: none;
}

/* Le rose est maintenant utilisé pour les accents et les interactions */
.nav-link:hover .bi,  /* Icônes au survol */
.text-accent,         /* Classe utilitaire pour le texte rose */
.price-highlight     /* Pour les prix ou éléments importants */
{
    color: var(--apresta-pink) !important;
}

/* Conteneur principal */
.main-content {
    margin-left: 280px;
    min-height: 100vh;
    position: relative;
    z-index: 1;
    overflow-y: auto;
}

/* Ajustement de la sidebar */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    padding: 48px 0;
    width: 280px;
    z-index: 1000;
    background: #f8f9fa;
    overflow-y: auto;
}

/* Ajustement des sections */
.section {
    min-height: 100vh;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
}

/* Style pour les sous-sections */
.section > div {
    margin-bottom: 2rem;
}

/* Ajustement du conteneur principal */
.main-content {
    margin-left: 280px;
    padding: 0;
}

/* Pour éviter les problèmes de margin collapse */
.main-content > section:first-child {
    padding-top: 2rem;
}

.main-content > section:last-child {
    padding-bottom: 2rem;
}

/* Ajustement de la sidebar pour les boutons fixes */
.sidebar {
    padding-bottom: 160px;
}

/* Page d'accueil */
.accueil-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 1) 0%,      /* Blanc pur à gauche */
        rgba(240, 240, 240, 1) 100%);   /* Gris très léger à droite */
}

.accueil-page .card {
    transition: transform 0.3s ease;
    background: white;
    backdrop-filter: blur(10px);
    border: none;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.accueil-page .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.accueil-page .display-4 {
    color: var(--apresta-text);
    font-weight: 600;
}

.accueil-page .lead {
    color: var(--apresta-blue);
}

/* Animation spécifique pour la page d'accueil */
.accueil-page [data-aos] {
    transition-duration: 800ms;
}

/* Grille des filiales */
.filiales-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 0.5rem;
    width: 100%;
    margin-top: 1rem;
}

.filiale-card {
    min-width: 140px;
}

.filiale-card .card {
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.filiale-card .card-body {
    padding: 0.75rem;
}

.filiale-card .card-title {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.filiale-card .card-subtitle {
    font-size: 0.75rem;
}

.filiale-card .list-unstyled {
    font-size: 0.75rem;
    margin-bottom: 0;
}

.filiale-card .list-unstyled li {
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

/* Responsive */
@media (max-width: 1600px) {
    .filiales-grid {
        grid-template-columns: repeat(8, 1fr);
    }
}

@media (max-width: 1200px) {
    .filiales-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .filiales-grid {
        grid-template-columns: repeat(2, 1fr);
        justify-items: center; /* Centre les cartes dans la grille */
    }

    .filiale-card {
        width: 100%; /* Prend toute la largeur disponible */
        max-width: 280px; /* Limite la largeur maximale */
    }

    .filiale-card .card {
        text-align: center; /* Centre le texte */
    }

    .filiale-card .card-body {
        display: flex;
        flex-direction: column;
        align-items: center; /* Centre les éléments verticalement */
    }

    .filiale-card .list-unstyled {
        text-align: center; /* Centre la liste */
    }
}

@media (max-width: 480px) {
    .filiales-grid {
        grid-template-columns: 1fr;
    }

    .filiale-card {
        width: 100%;
        max-width: 320px; /* Peut être ajusté selon vos besoins */
    }
}

/* Ajustements pour la section compacte */
.bg-light {
    background-color: rgba(248, 249, 250, 0.9) !important;
    backdrop-filter: blur(10px);
}

/* Réduction des espacements */
.row.g-3 {
    --bs-gutter-y: 0.75rem;
}

/* Style des légendes */
.position-relative .bg-white {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* Animation au survol des images */
.position-relative {
    overflow: hidden;
}

.position-relative img {
    transition: transform 0.3s ease;
}

.position-relative:hover img {
    transform: scale(1.05);
}

/* Ajustements responsive */
@media (max-width: 991px) {
    .col-lg-7, .col-lg-5 {
        margin-bottom: 1rem;
    }
}

.scroll-indicator {
    margin-top: 1rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Style pour les logos technologiques */
.tech-logo {
    max-height: 60px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.tech-logo:hover {
    opacity: 1;
}

/* Style pour la timeline */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--bs-primary);
    opacity: 0.2;
}

.timeline-item {
    margin-bottom: 2rem;
    position: relative;
    padding-left: 3rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bs-primary);
}

.timeline-content {
    background: #fff;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075);
}
.tech-bubble {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--bs-dark);
}

/* Couleurs pastel pour les bulles */
.bg-primary-soft {
    background-color: rgba(13, 110, 253, 0.1);
}

.bg-success-soft {
    background-color: rgba(25, 135, 84, 0.1);
}

.bg-info-soft {
    background-color: rgba(13, 202, 240, 0.1);
}

.bg-warning-soft {
    background-color: rgba(255, 193, 7, 0.1);
}

.bg-danger-soft {
    background-color: rgba(220, 53, 69, 0.1);
}

/* Animation au survol */
.tech-bubble:hover {
    transform: translateY(-2px);
    transition: transform 0.2s ease;
}
.icon-circle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.2rem;
}

.bi-arrow-right {
    margin: 0 10px;
}
.rse-list li {
    line-height: 1.8; /* Augmente l'interligne */
    transition: background-color 0.3s; /* Transition pour la surbrillance */
}

.rse-list li:hover {
    background-color: #f0f0f0; /* Couleur de surbrillance au passage de la souris */
}

.rse-title {
    color: var(--apresta-blue); /* Utilise la couleur apresta-blue pour les titres */
}
.logo-carousel {
    display: flex;
    animation: scroll 20s linear infinite;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Styles pour le planning */
.timeline-wrapper {
    position: relative;
    padding: 40px 0;
    margin: 0 40px;
}

.timeline-progress {
    position: absolute;
    top: 50%;
    left: 0;
    height: 4px;
    background-color: var(--apresta-blue);
    transition: width 0.3s ease;
}

.timeline-dates {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
}

.timeline-dates::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 0;
    right: 0;
    height: 4px;
    background-color: #fff;
    z-index: -1;
}

.timeline-date {
    position: relative;
    cursor: pointer;
    padding: 0;
    margin-top: 30px;
}

.date-dot {
    width: 20px;
    height: 20px;
    background-color: white;
    border: 4px solid #e9ecef;
    border-radius: 50%;
    margin: 0 auto 15px;
    transition: all 0.3s ease;
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
}

.timeline-date.active .date-dot {
    border-color: var(--apresta-blue);
    transform: translateX(-50%) scale(1.2);
}

.date-content {
    text-align: center;
    min-width: 120px;
    position: relative;
    padding-top: 15px;
}

.date {
    font-weight: 500;
    color: var(--apresta-text);
}

.duration {
    font-size: 0.9rem;
    color: #6c757d;
}

.phase-card {
    display: none;
    animation: fadeIn 0.5s ease;
}

.phase-card.active {
    display: block;
}

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

/* Responsive */
@media (max-width: 768px) {
    .timeline-wrapper {
        margin: 0 20px;
    }
    
    .date-content {
        min-width: 80px;
        font-size: 0.9rem;
    }
}

/* Styles pour la section tarifs */
.service-row-alt, .lot-row-alt {
    background-color: rgba(12, 159, 169, 0.03);
    border-radius: 8px;
    padding: 0.75rem;
    margin: 0 -0.75rem;
}

.lot-item {
    transition: all 0.2s ease;
}

.lot-item:hover {
    background-color: rgba(12, 159, 169, 0.05);
    border-radius: 8px;
}

.text-primary {
    color: var(--apresta-blue) !important;
}

/* Styles pour l'impression */
@media print {
    /* Reset des marges et padding */
    body {
        padding: 0 !important;
        margin: 0 !important;
        background: none !important;
    }
    
    /* Optimisation du contenu principal */
    .main-content {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: none !important;
    }
    
    /* Masquer les éléments inutiles */
    .sidebar,
    .btn-icon, 
    .decision-buttons,
    .action-buttons,
    .nav-pills {
        display: none !important;
    }
    
    /* Optimisation des sections */
    .section {
        page-break-inside: avoid;
        margin: 0 !important;
        padding: 20px !important;
        width: 100% !important;
        max-width: none !important;
    }
    
    /* Optimisation des conteneurs */
    .container-fluid {
        padding: 0 20px !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: none !important;
    }
    
    /* Forcer l'affichage des couleurs */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }
    
    /* Éviter les sauts de page indésirables */
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    /* Optimisation des cartes */
    .card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    /* Supprimer les animations */
    * {
        animation: none !important;
        transition: none !important;
    }
    
    /* Optimisation des images */
    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }
    
    /* Supprimer les marges inutiles */
    .row {
        margin: 0 !important;
    }
    
    .col, [class^="col-"] {
        padding: 10px !important;
    }
    
    /* Forcer l'affichage de tout le contenu */
    .section {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        height: auto !important;
        overflow: visible !important;
        transform: none !important;
    }
    
    /* Désactiver les animations AOS pour l'impression */
    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
        visibility: visible !important;
    }
    
    /* Assurer que le contenu s'affiche correctement */
    .main-content {
        height: auto !important;
        overflow: visible !important;
    }
    
    /* Forcer l'affichage des éléments masqués */
    .collapse {
        display: block !important;
        height: auto !important;
    }
    
    /* Ajuster la taille du papier */
    @page {
        size: A4;
        margin: 1cm;
    }
}

/* Styles pour le défilement des logos */
.logos-container {
    overflow: hidden;
    padding: 20px 0;
    background: white;
    position: relative;
}

.logos-track {
    display: inline-flex;
    gap: 60px;
    animation: scroll 25s linear infinite;
}

.logos-track img {
    height: 90px;
}

@keyframes scroll {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-50%, 0, 0);
    }
}

/* Créer une copie immédiate des logos */
.logos-track {
    animation: scroll 25s linear infinite;
}

.logos-track img {
    flex-shrink: 0;
}

/* Dupliquer automatiquement le contenu */
.logos-track {
    content: "";
    position: relative;
}

.logos-track::after {
    content: "";
    position: absolute;
    top: 0;
    left: 100%;
    width: 100%;
    height: 100%;
    background: inherit;
    animation: inherit;
}

/* Ajout des styles pour le menu mobile */
.menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1100;
    background: white;
    border: none;
    padding: 0.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Media queries pour le responsive */
@media (max-width: 991px) {
    /* Masquer la sidebar par défaut */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1200;
        width: 85%;
        max-width: 320px;
        padding: 1rem;
    }

    /* Réduire la taille du logo */
    .sidebar .logo img {
        max-width: 120px;
        margin-bottom: 1rem;
    }

    /* Ajuster les espacements du menu */
    .sidebar .nav-section {
        margin-bottom: 0.5rem;
    }

    .sidebar .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    /* Ajuster les sous-liens */
    .sidebar .nav-link.small {
        padding: 0.35rem 0.75rem;
        font-size: 0.85rem;
    }

    /* Ajuster les icônes */
    .sidebar .nav-link i {
        font-size: 0.9rem;
    }

    /* Ajuster l'en-tête du sommaire */
    .sidebar .px-3.mb-4 {
        padding: 0.5rem !important;
        margin-bottom: 0.75rem !important;
    }

    .sidebar h5 {
        font-size: 0.9rem;
        margin-bottom: 0.25rem !important;
    }

    .sidebar h6 {
        font-size: 0.85rem;
    }

    /* Afficher la sidebar quand elle est active */
    .sidebar.active {
        transform: translateX(0);
    }

    /* Afficher le bouton menu */
    .menu-toggle {
        display: block;
        z-index: 1300;
    }

    /* Ajuster le contenu principal */
    .main-content {
        margin-left: 0;
        padding-top: 60px; /* Espace pour le bouton menu */
    }

    /* Ajuster la largeur des boutons d'action */
    .devis-actions {
        width: 100%;
        left: 0;
    }

    /* Fond semi-transparent quand le menu est ouvert */
    .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1100;
    }

    .overlay.active {
        display: block;
    }
}

/* Message d'alerte mobile */
.mobile-alert {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--apresta-blue);
    color: white;
    padding: 0.75rem;
    text-align: center;
    font-size: 0.9rem;
    z-index: 1400;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.mobile-alert .close-alert {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    border: none;
    background: none;
    padding: 0.25rem;
    cursor: pointer;
}

@media (max-width: 991px) {
    .mobile-alert {
        display: block;
    }

    /* Ajuster le padding top du contenu principal pour l'alerte */
    .main-content {
        padding-top: calc(60px + 3rem); /* 60px existant + hauteur de l'alerte */
    }
}