/**
* Foyer El Ikbel — surcouche personnalisée
* Chargée APRÈS main.css : contient uniquement nos ajustements,
* le thème d'origine (HeroBiz) n'est pas modifié.
*/

/*--------------------------------------------------------------
# Base & accessibilité
--------------------------------------------------------------*/

/* Décalage d'ancre pour ne pas passer sous le header fixe */
section[id],
main[id] {
    scroll-margin-top: 90px;
}

/* Lien d'évitement clavier */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 10000;
    padding: 12px 20px;
    background: var(--color-primary);
    color: var(--color-white);
    font-weight: 600;
    border-radius: 0 0 6px 0;
}

.skip-link:focus {
    left: 0;
    color: var(--color-white);
}

/* Focus visible cohérent partout */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
    outline: 3px solid var(--color-primary-light);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Respect du réglage système « moins d'animations » */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Jamais de débordement horizontal sur mobile */
html,
body {
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

/*--------------------------------------------------------------
# Header / navigation
--------------------------------------------------------------*/

.header .logo img {
    height: 62px;
    width: auto;
    transition: height 0.3s ease;
}

.header.sticked .logo img {
    height: 48px;
}

@media (max-width: 575px) {
    .header .logo img {
        height: 46px;
    }
}

/* Le bouton burger est un <button> : on neutralise le style natif.
   On pilote aussi sa visibilité ici plutôt que via la classe .d-none de
   Bootstrap : les deux règles avaient la même spécificité et le même
   !important, l'affichage dépendait donc de l'ordre des feuilles de style. */
button.mobile-nav-toggle {
    background: none;
    border: 0;
    padding: 0;
    appearance: none;
    display: none !important;
}

@media (max-width: 1279px) {
    button.mobile-nav-toggle {
        display: block !important;
    }
}

/*--------------------------------------------------------------
# Fond du hero en WebP (repli automatique en JPEG si non supporté)
--------------------------------------------------------------*/

.hero-fullscreen {
    background-image: image-set(url("../img/foyer/BG.webp") type("image/webp"),
            url("../img/foyer/BG.jpg") type("image/jpeg"));
}

/*--------------------------------------------------------------
# Hero
--------------------------------------------------------------*/

.hero-fullscreen {
    min-height: auto;
    padding: 150px 0 80px;
}

.hero-fullscreen .hero-logo {
    width: min(180px, 45vw);
    height: auto;
    margin-bottom: 18px;
}

.hero-fullscreen h1 {
    font-family: var(--font-secondary);
    font-weight: 300;
    font-size: clamp(1.9rem, 5.5vw, 3rem);
    color: var(--color-secondary);
    margin: 0 0 12px;
    text-align: center;
}

.hero-fullscreen h1 strong {
    color: var(--color-primary);
    font-weight: 700;
}

.hero-lead {
    font-size: clamp(1rem, 2.4vw, 1.2rem);
    color: rgba(var(--color-secondary-rgb), 0.9);
    max-width: 640px;
    margin: 0 auto 26px;
    text-align: center;
}

/* Bandeau d'infos clés du hero */
.hero-facts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
    padding: 0;
    list-style: none;
}

.hero-facts li {
    display: flex;
    align-items: center;
    gap: 9px;
    background: rgba(var(--color-white-rgb), 0.92);
    border: 1px solid rgba(var(--color-secondary-rgb), 0.12);
    border-radius: 999px;
    padding: 9px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-secondary);
    box-shadow: 0 2px 10px rgba(var(--color-secondary-rgb), 0.06);
}

.hero-facts i {
    color: var(--color-primary);
    font-size: 1.05rem;
    line-height: 1;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
}

.hero-fullscreen .btn-outline-hero {
    font-size: 16px;
    display: inline-block;
    padding: 10px 28px;
    border-radius: 4px;
    transition: 0.3s;
    color: var(--color-secondary);
    background: transparent;
    border: 2px solid rgba(var(--color-secondary-rgb), 0.35);
    font-family: var(--font-secondary);
}

.hero-fullscreen .btn-outline-hero:hover {
    background: var(--color-secondary);
    border-color: var(--color-secondary);
    color: var(--color-white);
}

/*--------------------------------------------------------------
# Cartes de services
--------------------------------------------------------------*/

.featured-services .service-item {
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-services .service-item:hover {
    transform: translateY(-6px);
}

/*--------------------------------------------------------------
# Section documents / contrats
--------------------------------------------------------------*/

.documents {
    padding: 70px 0;
    background: #f6f9fb;
}

.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.doc-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--color-white);
    border: 1px solid rgba(var(--color-secondary-rgb), 0.12);
    border-radius: 12px;
    padding: 26px 24px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.doc-card:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--color-primary-rgb), 0.45);
    box-shadow: 0 12px 28px rgba(var(--color-secondary-rgb), 0.12);
}

.doc-card--accent {
    border-color: rgba(var(--color-primary-rgb), 0.5);
    box-shadow: 0 6px 20px rgba(var(--color-primary-rgb), 0.1);
}

.doc-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: rgba(var(--color-primary-rgb), 0.1);
    color: var(--color-primary);
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.doc-card__title {
    font-family: var(--font-secondary);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-secondary);
    margin: 0 0 6px;
}

.doc-card__price {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0 0 2px;
    line-height: 1.2;
}

.doc-card__price small {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--color-gray);
}

.doc-card__desc {
    font-size: 0.92rem;
    color: rgba(var(--color-secondary-rgb), 0.85);
    margin: 10px 0 20px;
}

.doc-card__badge {
    align-self: flex-start;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 11px;
    border-radius: 999px;
    background: rgba(var(--color-primary-rgb), 0.12);
    color: var(--color-primary-dark);
    margin-bottom: 12px;
}

.doc-card__dl {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    padding: 12px 18px;
    border-radius: 8px;
    background: var(--color-primary);
    color: var(--color-white);
    font-weight: 600;
    font-family: var(--font-secondary);
    transition: background 0.25s ease;
}

.doc-card__dl:hover {
    background: var(--color-primary-dark);
    color: var(--color-white);
}

.doc-card__meta {
    display: block;
    margin-top: 10px;
    font-size: 0.78rem;
    color: var(--color-gray);
    text-align: center;
}

/* Encadré « dossier à fournir » */
.doc-checklist {
    background: var(--color-white);
    border: 1px solid rgba(var(--color-secondary-rgb), 0.12);
    border-left: 4px solid var(--color-primary);
    border-radius: 12px;
    padding: 26px 28px;
}

.doc-checklist h3 {
    font-size: 1.1rem;
    font-family: var(--font-secondary);
    color: var(--color-secondary);
    margin-bottom: 16px;
}

.doc-checklist ul {
    list-style: none;
    padding: 0;
    margin: 0;
    columns: 2;
    column-gap: 32px;
}

.doc-checklist li {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-bottom: 10px;
    font-size: 0.93rem;
    break-inside: avoid;
}

.doc-checklist li i {
    color: var(--color-primary);
    margin-top: 3px;
    flex-shrink: 0;
}

@media (max-width: 767px) {
    .doc-checklist ul {
        columns: 1;
    }
}

/*--------------------------------------------------------------
# Galerie
--------------------------------------------------------------*/

.gallery {
    padding: 70px 0;
}

.gallery .carousel-inner {
    border-radius: 14px;
    box-shadow: 0 10px 34px rgba(var(--color-secondary-rgb), 0.16);
    background: #eef2f5;
}

/* Cadre à ratio fixe : plus de saut de mise en page entre
   photos portrait et paysage */
.gallery .carousel-item img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: center;
}

@media (max-width: 575px) {
    .gallery .carousel-item img {
        aspect-ratio: 4 / 3;
    }
}

.gallery .carousel-control-prev,
.gallery .carousel-control-next {
    width: 9%;
}

.gallery .carousel-control-prev-icon,
.gallery .carousel-control-next-icon {
    background-color: rgba(var(--color-secondary-rgb), 0.65);
    border-radius: 50%;
    padding: 20px;
    background-size: 45% 45%;
}

.gallery .carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 0;
    margin-inline: 5px;
}

/*--------------------------------------------------------------
# Contact
--------------------------------------------------------------*/

.contact .info-item a {
    color: var(--color-primary);
    font-weight: 600;
    word-break: break-word;
}

.contact .map {
    height: 100%;
    min-height: 340px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 26px rgba(var(--color-secondary-rgb), 0.14);
}

.contact .map iframe {
    width: 100%;
    height: 100%;
    min-height: 340px;
    border: 0;
    display: block;
}

/* Bouton d'appel flottant sur mobile */
.call-fab {
    display: none;
}

@media (max-width: 767px) {
    .call-fab {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        position: fixed;
        left: 16px;
        bottom: 16px;
        z-index: 996;
        padding: 12px 20px;
        border-radius: 999px;
        background: var(--color-primary);
        color: var(--color-white);
        font-weight: 600;
        font-size: 0.95rem;
        box-shadow: 0 6px 18px rgba(var(--color-primary-rgb), 0.4);
    }

    .call-fab:hover,
    .call-fab:focus {
        color: var(--color-white);
    }
}

/*--------------------------------------------------------------
# Divers
--------------------------------------------------------------*/

.section-header p {
    max-width: 900px;
    margin-inline: auto;
}

.cta .img img {
    border-radius: 12px;
}

.footer .social-links a {
    font-size: 1.4rem;
}
