:root {
    --mint-green: #E4F3F5;
    --hero-dark-text: #1a1a1a;
}

.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-top: calc(-1 * var(--header-height));
    /* Le layout pose un calque de texture #back-inovat en position fixe,
       plein ecran, z-index 25. Comme .hero-section est en position relative
       avec un z-index, elle cree un contexte d'empilement : tout son contenu
       reste confine sous cette valeur, meme le .hero-content en z-index 10.
       A 1, le hero passait donc sous la texture grise et disparaissait.
       Les sections suivantes, elles, sont de vraies <section> a z-index 25
       et restaient visibles. 26 place le hero juste au-dessus du calque. */
    z-index: 26;
}

body:has(.topBar) .hero-section {
    margin-top: calc(-1 * (var(--header-height) + 33px));
}

.hero-bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    opacity: 0.85;
}

.hero-content {
    position: relative;
    z-index: 10;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding-top: calc(var(--header-offset) + 0.5rem);
}

body:has(.topBar) .hero-content {
    padding-top: calc(var(--header-offset) + 33px + 0.5rem);
}

.hero-top-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    width: fit-content;
    margin-bottom: 2rem;
    color: var(--hero-dark-text);
}

.hero-section .hero-main-title {
    font-family: 'Manrope', sans-serif;
    font-size: clamp(3.5rem, 8vw, 7.5rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--hero-dark-text);
    max-width: 1200px;
}

.hero-inline-badge {
    display: inline-block;
    background-color: var(--mint-green);
    padding: 0.2rem 1.2rem;
    border-radius: 50px;
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 600;
    vertical-align: middle;
    margin: 0 10px;
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(184, 188, 186, 0.4);
}

.hero-inline-img {
    display: inline-block;
    width: 160px;
    height: 75px;
    background-color: #ccc;
    border-radius: 40px;
    vertical-align: middle;
    margin: 0 15px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-10px);
}

/* Chemins relatifs au fichier CSS (public/asset/css/), donc valables aussi
   bien en local qu'en production. Ces deux medaillons pointaient auparavant
   vers des photos Unsplash : dependance a un service tiers, adresse IP des
   visiteurs transmise a chaque chargement, et visuels generiques. */
.hero-img-1 {
    background-image: url('../images/hero-section-images/agence-web-rabat-inovat.webp');
}

.hero-img-2 {
    background-image: url('../images/hero-section-images/agence-digitale-rabat-inovat.webp');
}

.hero-bottom {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
    max-width: 900px;
}

.hero-badge-static {
    display: inline-block;
    background-color: var(--mint-green);
    padding: 0.2rem 1.2rem;
    border-radius: 50px;
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 600;
    white-space: nowrap;
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.6;
    font-weight: 400;
    color: #333;
    font-family: 'Manrope', sans-serif;
}

.hero-description strong {
    font-weight: 800;
    color: var(--hero-dark-text);
}

.after-hero {
    position: relative;
    z-index: 2;
    background: #FFFFFF;
}

@media (max-width: 1024px) {
    .hero-inline-img { width: 120px; height: 60px; }
    .hero-main-title { font-size: 4rem; }
    /* La notation raccourcie reinitialise padding-top et faisait remonter
       le contenu sous la navbar fixe. On le redeclare apres. */
    .hero-content { padding: 2rem; padding-top: calc(var(--header-offset) + 0.5rem); }
}

@media (max-width: 768px) {
    .hero-main-title { font-size: 3rem; }
    .hero-bottom { flex-direction: column; }
    .hero-inline-img { display: none; }
}
.hero-section::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background-image: linear-gradient(
        transparent,
        rgba(245, 244, 244, 0.51) 43%,
        rgba(245, 244, 244, 0.72) 70%,
        #f5f4f4
    );
    z-index: 6;
    pointer-events: none;
}