/* /css/custom.css */

/* 1. Import de la typographie depuis Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;700&display=swap');

/* 2. Surcharge des variables de couleur et de typographie de Bootstrap */
:root {
  --bs-primary: #941818; /* Rouge profond du logo Ersya */
  --bs-primary-rgb: 148, 24, 24;
  --bs-dark: #212529;
  --bs-font-sans-serif: 'Poppins', sans-serif;
}

/* 3. Styles globaux */
body {
  font-family: 'Poppins', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
}

/* 4. Barre de navigation */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.05);
}

.navbar-brand img {
  max-height: 48px;
}

.navbar .navbar-nav .nav-link {
    color: #696666;
    font-weight: 500;
    font-size: 1.1rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: var(--bs-primary);
    font-weight: 700; 
}

.dropdown-item {
    font-weight: 500;
    color: #696666;
}
.dropdown-item:hover {
    color: var(--bs-primary);
    background-color: #f8f9fa;
}

/* 5. Boutons secondaires (pour le header) */
.btn-outline-secondary {
    --bs-btn-color: #696666;
    --bs-btn-border-color: #ced4da;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #6c757d;
    --bs-btn-hover-border-color: #6c757d;
}

/* 6. Activation des sous-menus au survol pour les écrans larges */
@media (min-width: 992px) {
  .navbar .nav-item.dropdown:hover .dropdown-menu {
    display: block;
    margin-top: 0; 
  }
}

/* 7. Section des cartes Domaines d'Intervention (AVEC NOUVEL EFFET) */
.domain-card {
    display: block;
    text-decoration: none;
    color: var(--bs-dark);
}

.domain-card .card {
    position: relative;
    overflow: hidden; /* Important pour que l'image ne dépasse pas lors du zoom */
    transition: transform 0.3s ease-in-out;
}

/* Pseudo-élément pour l'image de fond */
.domain-card .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    opacity: 0.25; /* Légèrement plus visible */
    z-index: 1;
    transition: all 0.4s ease-in-out; /* Transition pour l'effet de zoom */
}

/* Pseudo-élément pour la superposition sombre au survol */
.domain-card .card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
    opacity: 0; /* Caché par défaut */
    transition: opacity 0.3s ease-in-out;
}

.domain-card .card-body {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.domain-card .icon-feature {
    font-size: 3rem;
    color: #CD0D2D;
    margin-bottom: 1rem;
    transition: color 0.3s ease-in-out;
}

.domain-card .card-title {
    transition: color 0.3s ease-in-out;
}

/* --- NOUVEL EFFET AU SURVOL --- */
.domain-card:hover .card {
    transform: translateY(-5px); /* La carte se soulève toujours */
}

/* 1. L'image de fond zoome */
.domain-card:hover .card::before {
    transform: scale(1.1);
    opacity: 0.4;
}

/* 2. La superposition sombre apparaît */
.domain-card:hover .card::after {
    opacity: 1;
}

/* 3. L'icône et le texte deviennent blancs pour le contraste */
.domain-card:hover .card-title,
.domain-card:hover .icon-feature {
    color: #fff;
}


/* 8. Section Carrousel de Projets */
.carousel-item {
    height: 70vh;
    min-height: 500px;
    background-color: #333;
}

.carousel-item img {
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.carousel-caption {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.carousel-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7);
    align-self: flex-start;
}

.carousel-button {
    align-self: center;
}

/* 9. Bandeau des Logos Clients */
.client-logos-banner {
    background-color: #B01D2C;
    height: 120px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.logo-slider {
    width: 100%;
    position: relative;
}

.logo-track {
    display: flex;
    width: calc(10 * (150px + 80px)); 
    animation: scrollAnimation 30s linear infinite;
}

.logo-track img {
    height: 60px;
    width: auto;
    margin: 0 40px;
    filter: brightness(0) invert(1);
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.logo-track img:hover {
    opacity: 1;
}

@keyframes scrollAnimation {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

/* 10. Footer */
.footer {
    background-color: #373737;
    min-height: 200px;
    display: flex;
    align-items: center;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.footer-logo {
    height: 80px;
    opacity: 0.7;
}

/* 11. Page Outils et Interfaces */
.wish-column {
    background-color: #f8f9fa; 
}

.wish-title {
    font-size: 3rem;
    font-weight: 700;
    transform: rotate(-90deg); 
    white-space: nowrap;
    color: #696666;
}

.cards-column {
    background-color: #373737; 
    padding: 3rem; 
    color: #fff;
}

.custom-card {
    display: flex;
    margin-bottom: 1.5rem; 
    border-bottom: 1px solid #555; 
    padding-bottom: 1.5rem; 
}

.custom-card:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.card-number {
    font-size: 2rem; 
    font-weight: 700;
    color: rgba(255, 255, 255, 0.15);
    margin-right: 1.5rem; 
}

.card-main-title {
    color: #E96013;
    font-size: 1.4rem; 
    margin-bottom: 0.5rem;
}

.card-content p {
    font-size: 0.95rem; 
    color: rgba(255, 255, 255, 0.8);
}

.image-column {
    padding: 0;
}

.image-column img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
}

/* 12. Section Méthodes et Gains */
.methods-gains-section .section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    font-weight: 700;
}

.methods-column {
    background-color: #B01D2C;
    color: #fff;
    padding: 4rem;
}

.methods-column .section-title {
    color: #fff;
}

.method-card {
    display: flex;
    margin-bottom: 2rem;
}

.method-card:last-child {
    margin-bottom: 0;
}

.method-number {
    font-size: 2rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1;
    margin-right: 1.5rem;
}

.method-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.method-content h5 {
    font-weight: 700;
    font-size: 1.1rem;
    margin-top: 1rem;
    margin-bottom: 0.25rem;
}

.method-content .details {
    font-style: italic;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0;
}

.gains-column {
    background-color: #fff;
    padding: 4rem;
}

.gains-column .section-title {
    color: #373737;
}

.gains-list {
    list-style: none;
    padding-left: 0;
}

.gains-list > li {
    font-size: 1.1rem;
    padding-left: 2rem;
    position: relative;
    margin-bottom: 1rem;
}

.gains-list > li::before {
    content: '\F26A';
    font-family: 'bootstrap-icons';
    position: absolute;
    left: 0;
    top: 2px;
    color: var(--bs-primary);
}

.sub-gains-list {
    list-style-type: disc;
    padding-left: 2.5rem;
    margin-top: 0.5rem;
}

.sub-gains-list li {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

/* 13. Page Nous Connaitre */
.promo-banner-red {
    background-color: #B01D2C;
    color: #fff;
    padding: 2rem 0;
}

.value-card .card-title {
    color: var(--bs-primary);
}

.offer-card {
    background-color: #495057;
    padding: 1.5rem;
    border-radius: 0.375rem;
    height: 100%;
}

.offer-card ul {
    list-style: none;
    padding-left: 0;
}

.offer-card li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
}

.offer-card li::before {
    content: '\F28A'; /* Icône 'check' */
    font-family: 'bootstrap-icons';
    position: absolute;
    left: 0;
    top: 0;
    color: #fff;
}

.partner-logo img {
    max-height: 100px;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.partner-logo img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* 14. Page Projets Réalisés */
.project-card-link {
    display: block;
    text-decoration: none;
    color: #fff;
    border-radius: 0.375rem;
    overflow: hidden; 
}

.project-card {
    min-height: 400px;
    background-size: cover;
    background-position: center;
    position: relative;
    transition: transform 0.4s ease;
}

.project-client-logo {
    position: absolute;
    bottom: 1rem;
    z-index: 2;
    background-color: rgba(255, 255, 255, 0.85);
    padding: 0.5rem;
    border-radius: 0.25rem;
    max-height: 40px;
    max-width: 100px;
    object-fit: contain;
}

.project-client-logo {
    right: 1rem;
}

.col-lg-6:nth-child(odd) .project-client-logo {
    left: 1rem;
    right: auto;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    z-index: 1;
    transition: background-color 0.3s ease;
}

.project-card .card-body {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.project-title {
    font-size: 1.6rem;
    font-weight: 700;
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--bs-dark);
    padding: 0.75rem 1rem;
    display: inline-block;
    border-radius: 0.25rem;
    max-width: 100%;
}

.project-button {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    font-weight: 500;
    background-color: var(--bs-primary);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 50rem;
    display: inline-block;
}

.col-lg-6 .card-body {
    align-items: flex-start;
}

.col-lg-6:nth-child(odd) .card-body {
    align-items: flex-end;
}

.col-lg-6:nth-child(odd) .project-title {
    text-align: right;
}

.project-card-link:hover .project-card {
    transform: scale(1.05);
}

.project-card-link:hover .project-card::before {
    background-color: rgba(0,0,0,0.5);
}

.project-card-link:hover .project-button {
    opacity: 1;
    transform: translateY(0);
}

/* 15. Modale Projet */
.modal-content {
    background-color: #212529;
    background-size: cover;
    background-position: center;
    position: relative;
    color: #fff;
    border: none;
    overflow: hidden;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 0;
}

.modal-header, .modal-body {
    position: relative;
    z-index: 1;
    background-color: transparent;
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-header .modal-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-body {
    padding: 0;
}

.modal-description-wrapper {
    padding: 1.5rem 2rem;
}

#modalProjectLogo {
    max-height: 50px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    background-color: #fff; /* Ajout du fond blanc */
    padding: 0.5rem;         /* Ajout d'un espacement interne */
    border-radius: 0.25rem;  /* Coins légèrement arrondis */
}

.modal-description-wrapper .lead {
    font-size: 1.1rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
}

.modal-steps-wrapper {
    background-color: #fff;
    color: var(--bs-dark);
    padding: 2rem;
}

.steps-main-title {
    font-weight: 700;
    color: var(--bs-dark);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #dee2e6;
}

.mission-step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.mission-step:last-child {
    margin-bottom: 0;
}

.mission-step-number {
    font-size: 2rem;
    font-weight: 700;
    color: #adb5bd;
    line-height: 1;
    margin-right: 1.5rem;
}

.mission-step-content h4 {
    font-weight: 700;
    color: var(--bs-primary);
    font-size: 1.2rem;
}

.mission-step-content p {
    margin-bottom: 0;
    color: #696666;
}

/* 16. Effet Parallax Souris sur l'image du Header (Index) */
.hero-image-container {
    /* Empêche l'image de déborder et de créer des barres de défilement */
    perspective: 1000px; /* Ajoute de la profondeur pour l'effet 3D */
}

.hero-illustration {
    /* La transition rend le mouvement fluide */
    transition: transform 0.2s ease-out;
}