/* ==========================================================================
   BrahimGSM — Charte graphique v4 « Signal Atelier »
   Hero statique · Fiche produit · Confiance · Header scroll
   ========================================================================== */

/* --- Header transparent sur hero accueil --- */
body.page-home .topbar { position: relative; z-index: 1040; }
body.page-home .site-header {
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    right: 0;
    background: transparent;
    border-bottom-color: transparent;
    box-shadow: none;
    transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
body.page-home .site-header .brand-logo { filter: drop-shadow(0 1px 3px rgba(0,0,0,.25)); }
body.page-home .site-header .mg-nav__link.nav-link { color: #fff; }
body.page-home .site-header .mg-nav__link.nav-link:hover,
body.page-home .site-header .mg-nav__link.nav-link.active {
    color: #fff;
    border-bottom-color: var(--orange-cta);
}
body.page-home .site-header .site-header__nav {
    border-top-color: rgba(255,255,255,.12);
}
body.page-home .site-header.is-scrolled .mg-nav__link.nav-link:hover,
body.page-home .site-header.is-scrolled .mg-nav__link.nav-link.active {
    color: var(--blue-tech);
    border-bottom-color: var(--orange-cta);
    background: transparent;
}
body.page-home .site-header.is-scrolled .site-header__nav {
    border-top-color: var(--color-border);
}
body.page-home .site-header__quicknav { display: none !important; }
body.page-home .site-header .icon-btn {
    background: rgba(255,255,255,.15);
    border-color: rgba(255,255,255,.25);
    color: #fff;
    backdrop-filter: blur(6px);
}
body.page-home .site-header .form-control {
    background: rgba(255,255,255,.92);
}
body.page-home main { padding-top: calc(var(--topbar-height) + var(--header-height)); }
body.page-home .site-header.is-scrolled {
    background: rgba(255,255,255,.98);
    border-bottom-color: var(--color-border);
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
body.page-home .site-header.is-scrolled .mg-nav__link.nav-link { color: var(--text-heading); }
body.page-home .site-header.is-scrolled .icon-btn {
    background: var(--white);
    border-color: var(--color-border);
    color: var(--text-heading);
}
body.page-home .site-header.is-scrolled .brand-logo { filter: none; }

@media (max-width: 991.98px) {
    body.page-home .site-header { top: 0; }
    body.page-home main { padding-top: var(--header-height); }
    body.page-home .topbar { display: none; }
    .mg-hero-static { margin-top: calc(-1 * var(--header-height)); }
}

/* --- Hero statique v4 Signal Atelier --- */
.mg-hero-static__grid {
    position: absolute;
    inset: 0;
    opacity: .14;
    background-image:
        linear-gradient(var(--blue-tech) 1px, transparent 1px),
        linear-gradient(90deg, var(--blue-tech) 1px, transparent 1px);
    background-size: 64px 64px;
    pointer-events: none;
    z-index: 0;
}
.mg-hero-static__glow {
    position: absolute;
    width: 55%;
    height: 100%;
    right: -5%;
    top: 0;
    background: radial-gradient(ellipse at 70% 50%, rgba(30, 58, 95, 0.5) 0%, transparent 68%);
    pointer-events: none;
    z-index: 0;
}
.mg-hero-static__trace {
    position: absolute;
    right: clamp(2%, 6vw, 8%);
    top: 50%;
    transform: translateY(-50%);
    width: min(340px, 32vw);
    pointer-events: none;
    z-index: 0;
    opacity: .88;
}
@media (max-width: 991.98px) {
    .mg-hero-static__trace { display: none; }
}

/* --- Header navigation v4 --- */
.site-header__nav {
    border-top: 1px solid var(--color-border);
    margin-top: var(--space-2);
    padding-top: 0;
}
.site-header .mg-nav__link.nav-link {
    border-bottom: 2px solid transparent;
    border-radius: 0;
    margin-bottom: -1px;
    padding-bottom: calc(var(--space-2) + 2px);
}
.site-header .mg-nav__link.nav-link:hover,
.site-header .mg-nav__link.nav-link.active {
    background: transparent;
    text-decoration: none;
    border-bottom-color: var(--orange-cta);
    color: var(--blue-tech);
}
.site-header__quicknav {
    border-top: 1px solid var(--color-border);
    background: var(--white);
}
.site-header__quicknav .container {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.site-header__quicknav .container::-webkit-scrollbar { display: none; }
.site-header__quicknav-link {
    display: inline-flex;
    align-items: center;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-body);
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: color .2s ease, border-color .2s ease;
}
.site-header__quicknav-link:hover,
.site-header__quicknav-link.active {
    color: var(--blue-tech);
    border-bottom-color: var(--orange-cta);
}

/* --- Hero statique unique --- */
.mg-hero-static {
    position: relative;
    min-height: clamp(320px, 50vh, 480px);
    display: flex;
    align-items: center;
    background-color: var(--footer-dark);
    background-size: cover;
    background-position: center;
    overflow: hidden;
    margin-top: calc(-1 * (var(--topbar-height) + var(--header-height)));
}
@media (min-width: 992px) {
    .mg-hero-static { min-height: clamp(420px, 65vh, 680px); }
}
.mg-hero-static::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        100deg,
        rgba(12, 14, 18, 0.92) 0%,
        rgba(12, 14, 18, 0.55) 45%,
        rgba(30, 58, 95, 0.28) 100%
    );
    z-index: 0;
}
.mg-hero-static--gradient::before {
    background:
        radial-gradient(ellipse 60% 80% at 80% 50%, rgba(30, 58, 95, 0.38), transparent 60%),
        linear-gradient(100deg, rgba(12, 14, 18, 0.92) 0%, rgba(12, 14, 18, 0.5) 50%, transparent 100%);
}
.mg-hero-static .container { position: relative; z-index: 1; }
.mg-hero-static__inner {
    max-width: 640px;
    padding: calc(var(--header-height) + var(--space-lg)) 0 var(--space-lg);
}
@media (min-width: 992px) {
    .mg-hero-static__inner {
        padding: calc(var(--header-height) + var(--space-xl)) 0 var(--space-xl);
    }
}
.mg-hero-static__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    color: rgba(255,255,255,.9);
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-pill);
    margin-bottom: var(--space-4);
}
.mg-hero-static__title {
    font-family: var(--font-display);
    font-size: clamp(1.875rem, 4.5vw, 3rem);
    font-weight: var(--font-extrabold);
    line-height: var(--leading-tight);
    color: #fff;
    margin-bottom: var(--space-4);
    letter-spacing: var(--tracking-tight);
}
.mg-hero-static__subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: var(--leading-relaxed);
    color: rgba(255,255,255,.88);
    margin-bottom: var(--space-6);
    max-width: 520px;
}
.mg-hero-static__actions { margin-bottom: var(--space-5); }

/* Bandeau confiance hero */
.mg-trust-strip {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4) var(--space-6);
    padding: 0;
    margin: 0;
    list-style: none;
}
.mg-trust-strip__item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: var(--text-sm);
    color: rgba(255,255,255,.78);
    font-weight: var(--font-medium);
}
.mg-trust-strip__item i {
    font-size: 1rem;
    color: var(--orange-cta);
}
.mg-trust-strip--light .mg-trust-strip__item { color: var(--text-muted); }
.mg-trust-strip--light .mg-trust-strip__item i { color: var(--blue-tech); }

/* --- Fiche produit v3 --- */
.pdp { padding-bottom: var(--space-lg); }
.pdp-gallery__main {
    position: relative;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--bg-image);
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
    overflow: hidden;
    cursor: zoom-in;
}
.pdp-gallery__main img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.35s ease;
}
.pdp-gallery__main:hover img { transform: scale(1.06); }
.pdp-gallery__thumbs {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}
.pdp-gallery__thumb {
    width: 72px;
    height: 72px;
    object-fit: contain;
    background: var(--bg-image);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 4px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}
.pdp-gallery__thumb.active,
.pdp-gallery__thumb:hover { border-color: var(--blue-tech); }

.pdp-buy { position: sticky; top: calc(var(--header-height) + 1rem); }
.pdp-buy__brand {
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    color: var(--text-muted);
}
.pdp-buy__title {
    font-family: var(--font-display);
    font-size: clamp(1.375rem, 3vw, 1.875rem);
    font-weight: var(--font-bold);
    color: var(--text-heading);
    line-height: var(--leading-tight);
    margin: 0.25rem 0 0.75rem;
}
.pdp-buy__price-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 0.75rem;
    margin-bottom: var(--space-4);
}
.pdp-buy__price {
    font-family: var(--font-body);
    font-size: clamp(1.5rem, 4vw, 1.875rem);
    font-weight: var(--font-bold);
    color: var(--blue-tech);
    font-variant-numeric: tabular-nums;
}
.pdp-buy__price-old {
    font-size: var(--text-lg);
    color: var(--text-muted);
    text-decoration: line-through;
}
.pdp-buy__badge {
    background: var(--badge-promo-red);
    color: #fff;
    font-size: var(--text-sm);
    font-weight: var(--font-bold);
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
}

.pdp-stock { margin-bottom: var(--space-4); }
.pdp-stock__ok { color: var(--badge-stock-green); font-weight: var(--font-semibold); }
.pdp-stock__preorder { color: var(--blue-tech); font-weight: var(--font-semibold); }
.pdp-stock__low { color: var(--color-warning); font-weight: var(--font-semibold); }
.pdp-stock__out { color: var(--color-danger); font-weight: var(--font-semibold); }

/* Variantes pastilles */
.pdp-variants { margin-bottom: var(--space-4); }
.pdp-variants__group { margin-bottom: var(--space-3); }
.pdp-variants__group:last-child { margin-bottom: 0; }
.pdp-variants__label {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    margin-bottom: 0.45rem;
    display: block;
    color: var(--text-heading);
}
.pdp-variant-pills { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pdp-variant-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    min-width: 42px;
    padding: 0.3rem 0.7rem;
    border: 1.5px solid var(--color-border);
    border-radius: 6px;
    background: var(--white);
    font-size: 0.8125rem;
    font-weight: var(--font-medium);
    line-height: 1.2;
    color: var(--text-body);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
}
.pdp-variant-pill:hover:not(:disabled) {
    border-color: var(--blue-tech);
    color: var(--blue-tech);
}
.pdp-variant-pill.is-active {
    border-color: var(--blue-tech);
    background: var(--blue-tech-soft);
    color: var(--blue-tech);
    box-shadow: inset 0 0 0 1px rgba(30, 58, 95, 0.12);
}
.pdp-variant-pill:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    text-decoration: line-through;
}

.pdp-cta {
    width: 100%;
    min-height: 52px;
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.pdp-cta-wa {
    min-height: 48px;
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-3);
}

.pdp-wa-form {
    display: none;
    margin-bottom: var(--space-4);
    padding: var(--space-4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--bg-soft, #f8f9fa);
}
.pdp-wa-form.is-open { display: block; }
.pdp-wa-form__title {
    font-size: var(--text-base);
    font-weight: var(--font-bold);
    margin-bottom: 0.35rem;
}
.pdp-wa-form__hint {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-bottom: var(--space-3);
}
.pdp-cta:hover { transform: translateY(-2px); box-shadow: var(--shadow-cta); }
.pdp-cta:active { transform: translateY(0); }

.pdp-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-bottom: var(--space-4);
}
.pdp-meta i { color: var(--blue-tech); margin-right: 0.25rem; }

/* Bloc réassurance fiche produit */
.pdp-reassurance {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    margin-top: var(--space-4);
}
@media (max-width: 575.98px) {
    .pdp-reassurance { grid-template-columns: 1fr; }
}
.pdp-reassurance__item {
    text-align: center;
    font-size: var(--text-sm);
    color: var(--text-body);
}
.pdp-reassurance__item i {
    display: block;
    font-size: 1.35rem;
    color: var(--blue-tech);
    margin-bottom: 0.35rem;
}
.pdp-reassurance__item strong {
    display: block;
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.15rem;
}

/* Onglets description / specs */
.pdp-tabs { margin-top: var(--space-xl); }
.pdp-tabs .nav-tabs {
    border-bottom: 2px solid var(--color-border);
    gap: 0.25rem;
}
.pdp-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    color: var(--text-muted);
    font-weight: var(--font-semibold);
    padding: 0.75rem 1.25rem;
    border-radius: 0;
}
.pdp-tabs .nav-link.active {
    color: var(--blue-tech);
    border-bottom-color: var(--blue-tech);
    background: transparent;
}
.pdp-specs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}
.pdp-specs-table tr:nth-child(even) { background: var(--bg-secondary); }
.pdp-specs-table th,
.pdp-specs-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-border);
    text-align: left;
}
.pdp-specs-table th {
    font-weight: var(--font-semibold);
    color: var(--text-heading);
    width: 38%;
}

/* Avis — barres de progression */
.pdp-reviews-summary {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: var(--space-5);
    border: 1px solid var(--color-border);
}
.pdp-reviews-score {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: var(--font-extrabold);
    color: var(--text-heading);
    line-height: 1;
}
.pdp-reviews-score .rating i { color: var(--blue-tech); font-size: 1.1rem; }
.pdp-rating-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--text-sm);
    margin-bottom: 0.35rem;
}
.pdp-rating-bar__track {
    flex: 1;
    height: 8px;
    background: var(--color-border);
    border-radius: var(--radius-pill);
    overflow: hidden;
}
.pdp-rating-bar__fill {
    height: 100%;
    background: var(--blue-tech);
    border-radius: var(--radius-pill);
    transition: width 0.4s ease;
}
.pdp-review-card {
    background: var(--white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    height: 100%;
}
.pdp-review-card .rating i { color: var(--blue-tech); }
.pdp-review-card__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--blue-tech-soft);
    color: var(--blue-tech);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-bold);
    font-size: var(--text-sm);
}

/* Carousel produits similaires */
.pdp-related { margin-top: var(--space-xl); }
.pdp-related__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
}
.pdp-carousel {
    position: relative;
    overflow: hidden;
}
.pdp-carousel__track {
    display: flex;
    gap: var(--space-4);
    transition: transform 0.35s ease;
}
.pdp-carousel__slide {
    flex: 0 0 calc(50% - 0.5rem);
    min-width: 0;
}
@media (min-width: 768px) {
    .pdp-carousel__slide { flex: 0 0 calc(33.333% - 0.67rem); }
}
@media (min-width: 992px) {
    .pdp-carousel__slide { flex: 0 0 calc(25% - 0.75rem); }
}
.pdp-carousel__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: var(--white);
    color: var(--text-heading);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    z-index: 2;
    transition: background 0.2s, color 0.2s;
}
.pdp-carousel__btn:hover {
    background: var(--blue-tech);
    color: #fff;
    border-color: var(--blue-tech);
}
.pdp-carousel__btn--prev { left: -8px; }
.pdp-carousel__btn--next { right: -8px; }
.pdp-carousel__btn:disabled { opacity: 0.35; pointer-events: none; }

/* Lightbox galerie */
.pdp-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(12, 14, 18, 0.94);
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
    cursor: zoom-out;
}
.pdp-lightbox.is-open { display: flex; }
.pdp-lightbox img {
    max-width: min(90vw, 720px);
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius-md);
}
.pdp-lightbox__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Panier / checkout — cartes charte */
.mg-checkout-card {
    background: var(--white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
}
.mg-checkout-card .card-body { padding: var(--space-5); }
.mg-order-total {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--blue-tech);
}

@media (prefers-reduced-motion: reduce) {
    .pdp-gallery__main img,
    .pdp-carousel__track,
    .pdp-cta,
    .site-header { transition: none !important; }
}

/* --- Page À propos : emplacement image --- */
.about-page__image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}
.about-page__image-slot {
    width: 100%;
    aspect-ratio: 4 / 3;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem;
    text-align: center;
    background: var(--bg-secondary);
    border: 2px dashed var(--color-border-strong);
    border-radius: var(--radius-lg);
    color: var(--text-muted);
    font-size: var(--text-sm);
}
.about-page__image-slot i {
    font-size: 2.5rem;
    color: var(--blue-tech);
    opacity: 0.45;
}
.about-page__image-slot code {
    font-size: 0.8rem;
    color: var(--blue-tech);
    background: var(--blue-tech-soft);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}
