/* ============================================================
   HM Électricité SASU — assets/css/realisations.css
   Page publique des réalisations — design system HM
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* ════════════════════════════════════════════════════════════
   HERO
════════════════════════════════════════════════════════════ */
.hero-real {
    background: var(--gradient-hero);
    padding: 7rem 2rem 5rem;
    position: relative;
    overflow: hidden;
    text-align: center;
    margin: 1rem;
    border-radius: 0 80px;
}

.hero-real::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 55% at 20% 50%, rgba(255,193,7,.10) 0%, transparent 65%),
        radial-gradient(ellipse 55% 70% at 80% 20%, rgba(0,212,255,.07) 0%, transparent 65%);
    pointer-events: none;
}

.hero-real__inner {
    max-width: 760px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    animation: heroFadeIn .7s cubic-bezier(.4,0,.2,1) both;
}

@keyframes heroFadeIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero-real__tag {
    display: inline-block;
    padding: .3rem 1rem;
    background: rgba(255,145,0,.15);
    border: 1px solid rgba(255,145,0,.35);
    color: var(--color-accent);
    border-radius: var(--radius-lg);
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: 1.25rem;
    font-family: var(--font-main);
}

.hero-real h1 {
    font-family: var(--font-main);
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 800;
    color: var(--color-text-light);
    line-height: 1.15;
    margin-bottom: 1rem;
    text-shadow: 0 2px 20px rgba(0,0,0,.35);
}

.hero-real h1 .accent {
    color: var(--color-accent);
    text-shadow: 0 0 28px rgba(255,145,0,.40);
}

.hero-real__inner > p {
    color: rgba(255,255,255,.80);
    font-family: var(--font-main);
    font-size: 1.1rem;
    margin-bottom: 2.75rem;
    line-height: 1.7;
}

.hero-real__stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.hero-real__stats .stat strong {
    display: block;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--color-accent);
    line-height: 1;
    font-family: var(--font-main);
    text-shadow: 0 0 24px rgba(255,145,0,.35);
}

.hero-real__stats .stat span {
    display: block;
    font-size: .80rem;
    color: rgba(255,255,255,.55);
    margin-top: .3rem;
    font-family: var(--font-main);
    letter-spacing: .04em;
}

/* ════════════════════════════════════════════════════════════
   LAYOUT COMMUN
════════════════════════════════════════════════════════════ */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-tag {
    display: inline-block;
    padding: .28rem .9rem;
    background: rgba(255,145,0,.12);
    border: 1px solid rgba(255,145,0,.28);
    color: var(--color-accent);
    border-radius: var(--radius-lg);
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .09em;
    margin-bottom: .75rem;
    font-family: var(--font-main);
}

.section-header h2 {
    font-family: var(--font-main);
    font-size: clamp(1.6rem, 3vw, 2.3rem);
    font-weight: 800;
    color: var(--color-titre);
    text-shadow: 0 0 28px rgba(255,145,0,.22);
    letter-spacing: -.02em;
}

/* ════════════════════════════════════════════════════════════
   BADGE CATÉGORIE
════════════════════════════════════════════════════════════ */
.cat-badge {
    display: inline-block;
    padding: .2rem .7rem;
    background: rgba(255,145,0,.12);
    border: 1px solid rgba(255,145,0,.25);
    color: var(--color-accent);
    border-radius: var(--radius-lg);
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    font-family: var(--font-main);
}

/* ════════════════════════════════════════════════════════════
   PROJETS EN VEDETTE
════════════════════════════════════════════════════════════ */
.section-vedette {
    padding: 5rem 0;
    background: var(--bg-color);
}

.vedette-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.75rem;
}

.vedette-card {
    background: var(--bg-color);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform var(--transition-card), box-shadow var(--transition-card), border-color var(--transition-card);
}

.vedette-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-medium), 0 0 30px rgba(255,145,0,.10);
    border-color: rgba(255,145,0,.35);
}

.vedette-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.vedette-img--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    height: 220px;
    background: var(--gradient-hero);
    opacity: .55;
}

.vedette-body { padding: 1.4rem; }

.vedette-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .65rem;
}

.vedette-date {
    font-size: .74rem;
    color: var(--color-placeholder);
    font-family: var(--font-main);
}

.vedette-body h3 {
    font-family: var(--font-main);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-title);
    margin-bottom: .5rem;
    line-height: 1.35;
}

.vedette-body p {
    font-family: var(--font-main);
    font-size: .88rem;
    color: var(--color-text);
    line-height: 1.65;
    opacity: .78;
}

/* ════════════════════════════════════════════════════════════
   SLIDER AVANT / APRÈS
════════════════════════════════════════════════════════════ */
.aa-slider { position: relative; }

.aa-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.aa-img.aa-after { display: none; }
.aa-slider.small .aa-img { height: 180px; }

.aa-toggle-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .55rem .75rem;
    background: rgba(2,0,36,.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.aa-btn {
    padding: .3rem .95rem;
    border-radius: var(--radius-sm);
    font-size: .70rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,.20);
    background: transparent;
    color: rgba(255,255,255,.55);
    font-family: var(--font-main);
    transition: var(--transition-fast);
}

.aa-btn.active {
    background: var(--gradient-btn);
    color: var(--color-text);
    border-color: var(--color-accent);
    box-shadow: 0 0 14px rgba(255,145,0,.30);
}

.aa-btn:hover:not(.active) {
    border-color: rgba(255,145,0,.45);
    color: var(--color-accent);
}

.aa-divider { color: rgba(255,255,255,.25); font-size: .7rem; }

/* ════════════════════════════════════════════════════════════
   TOUS LES PROJETS — fond gradient-box
════════════════════════════════════════════════════════════ */
.section-all-projets {
    padding: 5rem 0;
    background: var(--gradient-box);
    background-attachment: fixed;
}

/* Filtres */
.cat-filtres {
    display: flex;
    justify-content: center;
    gap: .55rem;
    flex-wrap: wrap;
    margin-bottom: 2.75rem;
}

.cat-btn {
    padding: .45rem 1.2rem;
    border-radius: var(--radius-lg);
    font-size: .80rem;
    font-weight: 600;
    background: var(--glass-bg);
    color: rgba(255,255,255,.65);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    font-family: var(--font-main);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: var(--transition-fast);
}

.cat-btn:hover {
    border-color: rgba(255,145,0,.50);
    color: var(--color-accent);
    box-shadow: 0 4px 18px rgba(255,145,0,.14);
    transform: translateY(-1px);
}

.cat-btn.active {
    background: var(--gradient-btn);
    color: var(--color-text);
    border-color: var(--color-accent);
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(255,145,0,.30);
}

/* Grille projets */
.projets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 1.5rem;
}

.proj-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: transform var(--transition-card), box-shadow var(--transition-card), border-color var(--transition-card);
}

.proj-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--gradient-btn);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.proj-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium), 0 0 28px rgba(255,145,0,.10);
    border-color: rgba(255,145,0,.30);
}

.proj-item:hover::before { opacity: 1; }

.proj-item__img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    display: block;
}

.proj-item__img--ph {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 190px;
    font-size: 2.5rem;
    background: var(--gradient-hero);
    opacity: .60;
}

.proj-item__body { padding: 1.1rem 1.25rem 1.25rem; }

.proj-item__body h3 {
    font-family: var(--font-main);
    font-size: .95rem;
    font-weight: 700;
    color: var(--color-text-light);
    margin: .45rem 0 .38rem;
    line-height: 1.4;
}

.proj-item__body p {
    font-family: var(--font-main);
    font-size: .82rem;
    color: rgba(255,255,255,.58);
    line-height: 1.60;
    margin-bottom: .65rem;
}

.proj-item__date {
    font-size: .72rem;
    color: rgba(255,255,255,.38);
    font-family: var(--font-main);
}

/* État vide */
.empty-state {
    text-align: center;
    padding: 3.5rem 1rem;
    color: rgba(255,255,255,.38);
    font-family: var(--font-main);
    font-size: .92rem;
    background: var(--glass-bg);
    border: 1px dashed var(--glass-border);
    border-radius: var(--radius-md);
    letter-spacing: .02em;
}

.empty-state::before {
    content: '🔌';
    display: block;
    font-size: 2.5rem;
    margin-bottom: .75rem;
    filter: grayscale(.4) opacity(.5);
}

/* ════════════════════════════════════════════════════════════
   AVIS CLIENTS — fond bg-color
════════════════════════════════════════════════════════════ */
.section-avis {
    padding: 5rem 0;
    background: var(--bg-color);
}

.note-globale {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.1rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.note-number {
    font-size: 3.2rem;
    font-weight: 900;
    color: var(--color-accent);
    line-height: 1;
    font-family: var(--font-main);
    text-shadow: 0 0 24px rgba(255,145,0,.35);
}

.etoiles-row { display: flex; gap: 2px; font-size: 1.2rem; }
.star.filled { color: var(--color-accent); }
.star.empty  { color: var(--color-border); }

.note-count {
    font-size: .78rem;
    color: var(--color-placeholder);
    margin-top: .2rem;
    font-family: var(--font-main);
}

.avis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.avis-card {
    background: var(--bg-color);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.6rem 1.5rem 1.4rem;
    box-shadow: var(--shadow-soft);
    transition: transform var(--transition-card), box-shadow var(--transition-card), border-color var(--transition-card);
    position: relative;
    overflow: hidden;
}

/* Guillemet décoratif */
.avis-card::before {
    content: '\201C';
    position: absolute;
    top: -.6rem;
    left: 1.1rem;
    font-size: 5rem;
    line-height: 1;
    font-family: Georgia, serif;
    color: var(--color-secondary);
    opacity: .10;
    pointer-events: none;
    user-select: none;
}

/* Lueur au survol */
.avis-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 50% 120%, rgba(94,0,148,.10) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-normal);
    pointer-events: none;
    border-radius: inherit;
}

.avis-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium), 0 0 30px rgba(94,0,148,.10);
    border-color: rgba(255,145,0,.28);
}

.avis-card:hover::after { opacity: 1; }

.avis-card__top {
    display: flex;
    align-items: flex-start;
    gap: .9rem;
    margin-bottom: 1rem;
}

.avis-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--gradient-btn);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--color-text);
    flex-shrink: 0;
    box-shadow: 0 3px 14px rgba(255,145,0,.30);
    font-family: var(--font-main);
}

.avis-name {
    font-weight: 700;
    color: var(--color-title);
    font-size: .95rem;
    font-family: var(--font-main);
}

.avis-ville {
    font-size: .75rem;
    color: var(--color-placeholder);
    margin-top: .15rem;
    font-family: var(--font-main);
}

.avis-note { margin-left: auto; flex-shrink: 0; font-size: .95rem; }

.avis-comm {
    font-family: var(--font-main);
    font-size: .875rem;
    color: var(--color-text);
    line-height: 1.70;
    font-style: italic;
    border-left: 3px solid rgba(255,145,0,.28);
    padding-left: .9rem;
    margin: 0 0 .9rem;
    opacity: .80;
}

.avis-date {
    font-size: .72rem;
    color: var(--color-placeholder);
    font-family: var(--font-main);
}

/* ════════════════════════════════════════════════════════════
   CTA FINAL
════════════════════════════════════════════════════════════ */
.section-cta {
    padding: 5rem 0;
    background: var(--gradient-box);
    background-attachment: fixed;
}

.cta-box {
    background: var(--glass-bg);
    border: 1px solid rgba(255,145,0,.22);
    border-radius: var(--radius-lg);
    padding: 3.75rem 2rem;
    text-align: center;
    max-width: 660px;
    margin: 0 auto;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-medium), 0 0 40px rgba(255,145,0,.08);
}

.cta-box h2 {
    font-family: var(--font-main);
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    font-weight: 800;
    color: var(--color-titre);
    margin-bottom: .6rem;
    text-shadow: 0 0 28px rgba(255,145,0,.25);
}

.cta-box p {
    font-family: var(--font-main);
    color: rgba(255,255,255,.72);
    font-size: 1.05rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.btn-cta {
    display: inline-block;
    padding: .9rem 2.4rem;
    background: var(--gradient-btn);
    color: var(--color-text);
    font-weight: 800;
    font-size: 1rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-family: var(--font-main);
    letter-spacing: .03em;
    box-shadow: 0 4px 20px rgba(255,145,0,.35);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(255,145,0,.55);
    filter: brightness(1.06);
}

.btn-cta:active { transform: translateY(0); }

/* ════════════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .hero-real {
        padding: 4rem 1.25rem 3.5rem;
        margin: .5rem;
        border-radius: 0 50px;
    }
    .hero-real h1 { font-size: 2rem; }
    .hero-real__stats { gap: 1.5rem; }
    .hero-real__stats .stat strong { font-size: 1.6rem; }
    .container { padding: 0 1.1rem; }
    .vedette-grid,
    .projets-grid,
    .avis-grid { grid-template-columns: 1fr; gap: 1.1rem; }
    .section-vedette,
    .section-all-projets,
    .section-avis,
    .section-cta { padding: 3rem 0; }
    .section-all-projets { background-attachment: scroll; }
    .section-cta         { background-attachment: scroll; }
    .cta-box { padding: 2.5rem 1.25rem; }
    .cta-box h2 { font-size: 1.6rem; }
    .aa-img { height: 180px; }
    .vedette-img { height: 180px; }
    .proj-item__img { height: 170px; }
}

@media (max-width: 480px) {
    .hero-real { padding: 3rem 1rem 2.75rem; margin: .3rem; border-radius: 0 30px; }
    .hero-real h1 { font-size: 1.65rem; }
    .cat-btn { font-size: .74rem; padding: .38rem .9rem; }
    .note-number { font-size: 2.5rem; }
    .avis-card { padding: 1.3rem 1.1rem 1.1rem; }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .hero-real { padding: 5rem 2rem 4rem; border-radius: 0 70px; }
    .vedette-grid { grid-template-columns: repeat(2, 1fr); }
    .projets-grid { grid-template-columns: repeat(2, 1fr); }
    .avis-grid    { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .hero-real { padding: 7rem 2rem 5rem; border-radius: 0 100px; }
}

@media (min-width: 1920px) {
    .hero-real { padding: 9rem 3rem 7rem; margin: 1.5rem; border-radius: 0 140px; }
    .hero-real h1 { font-size: 4rem; }
    .hero-real__stats .stat strong { font-size: 2.8rem; }
    .vedette-grid { grid-template-columns: repeat(3, 1fr); gap: 2.25rem; }
    .projets-grid { grid-template-columns: repeat(4, 1fr); gap: 2rem; }
    .avis-grid    { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
    .vedette-img  { height: 280px; }
    .aa-img       { height: 280px; }
    .proj-item__img { height: 230px; }
    .cta-box { max-width: 800px; padding: 4.5rem 3rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}