/* Variables CSS pour cohérence */
:root {
    --primary-color: #FFAB31;
    --secondary-color: white;
    --accent-color: hsl(226, 20%, 38%);
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f8fafc;
    --white: #ffffff;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Typographie professionnelle */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    min-height: 100vh; /* s'assure que le body fait au moins la hauteur de la fenêtre */
    overflow-x: hidden;
    max-width: 100vw;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); color: var(--text-dark); }
h3 { font-size: clamp(1.4rem, 2.5vw, 1.8rem); }

.rephive-yellow {
    color: #FFAB31;
}

/* RÈGLE GLOBALE: Le header garde toujours ses styles originaux */
/* Protège totalement le header */
#header-placeholder,
#header-placeholder * {
  font-family: 'Arial', Helvetica, sans-serif !important; /* ta font */
  font-size: 1rem !important;
  font-weight: 500 !important;
  line-height: 1.5 !important;
}

* {
    box-sizing: border-box;
}

/* Hero Section - Design moderne avec gradient overlay - VERSION CORRIGÉE */
.hero-section {
    background: url('../img/montreal31.webp') center/cover no-repeat;
    padding: 200px 0; /* Padding desktop */
    position: relative;
    color: white;
    min-height: 100vh; /* Assure une hauteur minimale */
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    font-weight: 600;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 6rem;
    animation: fadeInUp 0.8s ease-out;
}

.hero-section h2 {
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    margin-top: 1rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Section Introduction */
.intro {
    background: linear-gradient(135deg, var(--bg-light) 0%, rgba(248, 250, 252, 0.5) 100%);
    text-align: center; /* centre tout le contenu horizontalement */
    display: flex;
    flex-direction: column;
    align-items: center; /* centre horizontalement les enfants */
}

.intro h2 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 2rem;
    position: relative;
}

.intro h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    border-radius: 2px;
}

.intro p {
    font-size: 1.125rem;
    color: var(--text-light);
    max-width: 800px;
    line-height: 1.7;
    margin-bottom: 0; /* évite marge inutile */
}

.bg-yellow {
    background-color: #FFAB31 !important;
    color: white; /* ou noir selon lisibilité */
}

/* Cards d'approche - Design moderne glassmorphism */
.approach {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    position: relative;
}

.approach::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    pointer-events: none;
}

.approach .container {
    position: relative;
    z-index: 1;
}

.approach h2 {
    color: white;
    font-weight: 700;
    margin-bottom: 3rem;
}

.help-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid #FFAB31;
    border-radius: var(--border-radius);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    height: 100%;
    color: #FFAB31;
}

.help-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), rgba(250, 169, 48, 0.6));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.help-card:hover::before {
    transform: scaleX(1);
}

.help-card:hover {
    transform: translateY(-8px) scale(1.02);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 171, 49, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.help-card .icon-img {
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.help-card .icon-img img {
    width: 60px;
    height: 60px;
    filter: brightness(0) invert(1);
    transition: filter 0.3s ease;
}

.help-card:hover .icon-img {
       filter: drop-shadow(0 0 0 #FFAB31) brightness(1);
    transform: scale(1.1); /* léger effet de zoom */
}

.help-card h4 {
    color: white;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.help-card p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    font-size: 0.95rem;
}

.badge-yellow {
    background-color: #FFAB31;
    color: white;
}

.job-roles-bg {
    background-image: url('../img/Hexagone3.PNG');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    z-index: 0;
}

.job-roles-bg::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255, 255, 255, 0.85); /* quasi opaque mais laisse un peu transparaître le motif */
    z-index: 1;
}

/* Assure que le contenu interne est au-dessus de l'overlay */
.job-roles-bg > .container {
    position: relative;
    z-index: 1;
}

.job-roles .card {
    border: 2px solid #FFAB31 !important;
    transition: all 0.3s ease;
}

.job-roles .card:hover {
    border-color: #ff9500 !important;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 171, 49, 0.3) !important;
}

/* Industries Section */
.border-top-bottom-yellow {
    border-top: 4px solid #FFAB31;  /* ligne jaune en haut */
    border-bottom: 4px solid #FFAB31;  /* ligne jaune en bas */
}

.industries {
    background: var(--bg-light);
}

.industries h2 {
    color: var(--primary-color);
    margin-bottom: 3rem;
    font-weight: 700;
}

.industries .col-md-4 {
    background: white;
    margin: 0.5rem;
    padding: 2rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    font-weight: 600;
    color: var(--text-dark);
    position: relative;
    overflow: hidden;
}

.industries .col-md-4::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.05), transparent);
    transition: left 0.5s ease;
}

.industries .col-md-4:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    color: var(--primary-color);
}

.industries .col-md-4:hover::before {
    left: 100%;
}

/* Testimonials - Carousel moderne */
.testimonials {
    background: linear-gradient(135deg, var(--white) 0%, var(--bg-light) 100%);
    overflow: hidden;
}

.testimonials h2 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 3rem;
}

.testimonial-scroller {
    overflow: hidden;
    mask: linear-gradient(90deg, transparent, white 10%, white 90%, transparent);
}

.testimonial-track {
    display: flex;
    animation: scroll 40s linear infinite;
    width: max-content;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.testimonial-card {
    flex: 0 0 350px;
    margin: 0 1rem;
    border: none;
    border-radius: var(--border-radius);
    background: white;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.testimonial-card .card-title {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 1rem;
}

.testimonial-card .card-text {
    color: var(--text-light);
    font-style: italic;
    line-height: 1.6;
}

/* Accordion FAQ - couleur active Rephive */
.accordion-button {
    color: #343a40; /* texte foncé pour lisibilité */
    background-color: #fff; /* état fermé blanc */
}

.accordion-button:not(.collapsed) {
    color: #fff; /* texte clair sur le jaune */
    background-color: #FFAB31; /* jaune Rephive */
    box-shadow: inset 0 calc(-1 * var(--bs-accordion-border-width)) 0 rgba(0,0,0,0.1);
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 171, 49, 0.25); /* halo léger au focus */
}

/* Call to Action - Design impactant */
.cta {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding-bottom: 2rem !important; /* Réduit le padding-bottom */
    margin-bottom: 0 !important; /* S'assure qu'il n'y a pas de marge */
}

/* Ou encore plus simple, override juste le py-5 pour cette section */
.cta.py-5 {
    padding-bottom: 2rem !important;
}

.cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 171, 49, 0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite alternate;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.7; }
    100% { transform: scale(1.1); opacity: 0.3; }
}

.cta .container {
    position: relative;
    z-index: 1;
}

.cta h2 {
    color: white;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.cta p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.centered-btn {
    background: var(--secondary-color);
    border: none;
    color: var(--text-dark);
    font-weight: 600;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(255, 171, 49, 0.3);
}

.centered-btn:hover {
    background: #ff9500;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 171, 49, 0.4);
    color: var(--text-dark);
}

.centered-btn::after {
    content: '→';
    transition: var(--transition);
}

.centered-btn:hover::after {
    transform: translateX(4px);
}

/* Gradient text */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =================================
   RESPONSIVE DESIGN - VERSION CORRIGÉE
   ================================= */

/* MOBILE - OVERRIDE COMPLET du padding desktop */
@media (max-width: 768px) {
    .hero-section {
        padding: 10rem 0 2rem 0 !important; /* !important pour écraser les 200px */
        display: flex;
        align-items: flex-start; /* Contenu vers le haut */
        justify-content: center;
        min-height: 100vh;
    }
    
    .hero-section .container {
        width: 100%;
        max-width: 100%;
        padding: 0 1rem;
        margin: 0 auto;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    
    /* H1 mobile optimisé */
    .hero-section h1 {
        font-size: 2rem !important;
        margin-bottom: 0.75rem !important; /* Override le 6rem desktop */
        line-height: 1.1 !important;
        text-align: center;
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
        padding: 0 0.5rem;
        hyphens: auto;
        -webkit-hyphens: auto;
    }
    
    /* H2 versions mobiles */
    .hero-section h2.full {
        display: none !important;
    }
    
    .hero-section h2.mobile {
        display: block !important;
        font-size: 0.9rem !important;
        margin-bottom: 1rem !important;
        margin-top: 0 !important; /* Override le margin-top: 1rem desktop */
        line-height: 1.3 !important;
        text-align: center;
        padding: 0 0.5rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Masquer les boutons sur mobile */
    .hero-section .btn,
    .hero-section .mt-4 {
        display: none !important;
    }
    
    /* Autres éléments */
    .help-card {
        margin-bottom: 1.5rem;
    }
    
    .industries .col-md-4 {
        margin: 0.25rem 0;
    }
    
    .testimonial-card {
        flex: 0 0 300px;
    }
    
    .centered-btn {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
    
    /* Fix cartes égales */
    .job-roles .card {
        width: 90% !important;
        max-width: 90% !important;
        height: auto;
        min-height: 350px;
        margin: 0 auto 1rem auto;
    }
    
    .job-roles .card-body {
        flex: 1 1 auto;
    }
    
    .job-roles .col-lg-4 {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        display: flex;
        justify-content: center;
    }
}

/* TRÈS PETITS ÉCRANS */
@media (max-width: 576px) {
    .hero-section {
        padding: 8rem 0 1rem 0 !important; /* Encore moins de padding */
    }
    
    .hero-section .container {
        padding: 0 0.75rem;
    }
    
    .hero-section h1 {
        font-size: 1.7rem !important;
        margin-bottom: 0.5rem !important;
        padding: 0 0.25rem;
    }
    
    .hero-section h2.mobile {
        font-size: 0.85rem !important;
        margin-bottom: 0.75rem !important;
        padding: 0 0.25rem;
        line-height: 1.25 !important;
    }
    
    .hero-section h2 {
        font-size: 1rem !important;
        margin-bottom: 1.5rem;
        padding: 0;
    }
    
    /* Job roles cards plus petites */
    .job-roles .card {
        width: 95% !important;
        max-width: 95% !important;
        min-height: 320px;
    }
}

/* =================================
   NAVIGATION MOBILE - FIX HAMBURGER
   ================================= */

@media (max-width: 991.98px) {
    /* S'assurer que la navbar a un z-index approprié */
    .navbar {
        max-width: 100vw;
        overflow-x: hidden;
        padding: 1rem;
        box-sizing: border-box;
        position: fixed; /* Si elle est fixe */
        top: 0;
        z-index: 1030; /* Bootstrap navbar z-index */
        width: 100%;
        background: rgba(0, 0, 0, 0.9); /* Fond semi-transparent */
    }

    .navbar .container {
        max-width: 100%;
        width: 100%;
        margin: 0 auto;
        padding: 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .navbar-toggler {
        margin-left: auto !important;
        margin-right: 0 !important;
        padding: 0.25rem 0.5rem;
        border: 1px solid rgba(255, 255, 255, 0.3);
        background: transparent;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .navbar-brand {
        margin-right: 1rem;
        max-width: calc(100vw - 100px);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 1.1rem;
        flex-shrink: 1;
    }
}

@media (max-width: 576px) {
    .navbar {
        padding: 0.75rem 0.5rem;
    }
    
    .navbar-brand {
        font-size: 1rem;
        max-width: calc(100vw - 80px);
    }
    
    .navbar-toggler {
        width: 40px;
        height: 40px;
    }
}

/* DESKTOP - Assurer que les H2 mobiles sont cachés */
@media (min-width: 769px) {
    .hero-section h2.mobile {
        display: none !important;
    }
    
    .hero-section h2.full {
        display: block !important;
    }
}

/* =================================
   ACCESSIBILITÉ
   ================================= */

/* Réduction des animations */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* États de focus */
.centered-btn:focus,
.help-card:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}