/* ============================================================
   Easy Services - Layout CSS
   css/layout.css
   ============================================================ */

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

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Outfit', system-ui, sans-serif;
    color: var(--es-text);
    background-color: var(--es-white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}
main { flex: 1; }

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
    background: var(--topbar-bg, #0a0a0a);
    color: var(--topbar-accent, rgba(255,255,255,.85));
    font-size: .80rem;
    font-weight: 500;
    padding: 7px 0;
    transition: background .5s ease, color .5s ease;
}
.topbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}
.topbar a {
    color: var(--topbar-accent, rgba(255,255,255,.8));
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color .2s;
}
.topbar a:hover { color: #fff; }
.topbar i { font-size: .85rem; opacity: .7; }
.topbar .sep { width: 1px; height: 12px; background: rgba(255,255,255,.2); }
.topbar-extra {
    color: var(--topbar-accent, rgba(255,255,255,.9));
    font-weight: 600;
    font-size: .82rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar-es {
    background: #fff;
    border-bottom: 1px solid rgba(9,127,197,.1);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0,0,0,.06);
    transition: box-shadow .3s;
}
.navbar-es.scrolled { box-shadow: 0 4px 30px rgba(9,127,197,.12); }

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    gap: 24px;
}

/* Logo */
.nav-logo { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.nav-logo img { height: 42px; width: auto; transition: opacity .2s; }
.nav-logo:hover img { opacity: .85; }

/* Links */
.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0; padding: 0;
    gap: 2px;
    height: 100%;
    flex: 1;
    justify-content: center;
}
.nav-links > li {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}
.nav-link-es {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    font-size: .875rem;
    font-weight: 600;
    color: var(--es-text);
    text-decoration: none;
    border-radius: 8px;
    transition: color .2s, background .2s;
    white-space: nowrap;
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    position: relative;
}
.nav-link-es:hover { color: var(--es-blue); background: var(--es-blue-light); }
.nav-link-es .chevron { font-size: .65rem; transition: transform .25s; opacity: .5; }
.nav-links > li:hover .chevron { transform: rotate(180deg); opacity: 1; }

/* Underline actif */
.nav-link-es::before {
    content: '';
    position: absolute;
    bottom: -1px; left: 12px; right: 12px;
    height: 2px;
    background: var(--es-blue);
    border-radius: 2px 2px 0 0;
    transform: scaleX(0);
    transition: transform .25s;
}
.nav-link-es:hover::before,
.nav-link-es.active::before { transform: scaleX(1); }

/* Pont invisible entre bouton et dropdown pour éviter la perte de hover */
.nav-links > li::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    height: 18px;
}

/* Dropdown */
.nav-dropdown {
    position: absolute;
    top: calc(100% + 18px);
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    background: #fff;
    border: 1px solid rgba(9,127,197,.1);
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,.12);
    min-width: 220px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s, transform .2s, visibility .2s;
    z-index: 200;
}
.nav-dropdown::before {
    content: '';
    position: absolute;
    top: -5px; left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 10px; height: 10px;
    background: #fff;
    border-left: 1px solid rgba(9,127,197,.1);
    border-top: 1px solid rgba(9,127,197,.1);
}
.nav-links > li:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: translateX(-50%) translateY(0);
}

/* Dropdown large (métiers) */
.nav-dropdown-large {
    min-width: 500px;
    left: 0;
    transform: translateX(0) translateY(-6px);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 4px;
    padding: 12px;
}
.nav-links > li:hover .nav-dropdown-large {
    transform: translateX(0) translateY(0);
}
.nav-dropdown-large::before { left: 25%; }

.dropdown-group-label {
    grid-column: 1 / -1;
    font-size: .70rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--es-text-muted);
    padding: 6px 8px 4px;
    border-bottom: 1px solid var(--es-grey-border);
    margin-bottom: 4px;
}
.dropdown-section-label {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--es-text-muted);
    padding: 8px 8px 2px;
    display: block;
}

.dropdown-item-es {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: .875rem;
    font-weight: 500;
    color: var(--es-text);
    text-decoration: none;
    transition: background .15s, color .15s;
}
.dropdown-item-es:hover { background: var(--es-blue-light); color: var(--es-blue); }
.dropdown-item-es i {
    font-size: 1rem;
    color: var(--es-blue);
    width: 20px;
    text-align: center;
    opacity: .6;
    flex-shrink: 0;
}
.dropdown-item-es:hover i { opacity: 1; }

.dropdown-divider-es {
    height: 1px;
    background: var(--es-grey-border);
    margin: 5px 8px;
}

/* CTA nav */
.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    background: var(--es-blue);
    color: #fff !important;
    border-radius: 10px;
    font-size: .875rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s, transform .15s, box-shadow .2s;
    box-shadow: 0 4px 14px rgba(9,127,197,.25);
    flex-shrink: 0;
    white-space: nowrap;
}
.nav-cta:hover {
    background: var(--es-blue-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(9,127,197,.35);
    color: #fff !important;
}
.nav-cta::before { display: none !important; }

/* Burger */
.nav-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px; height: 40px;
    border: none; background: none;
    cursor: pointer;
    border-radius: 8px;
    transition: background .2s;
}
.nav-burger:hover { background: var(--es-grey-bg); }
.nav-burger span {
    display: block;
    width: 22px; height: 2px;
    background: var(--es-text);
    border-radius: 2px;
    transition: transform .3s, opacity .3s, width .3s;
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; width: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile overlay */
.nav-mobile {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 998;
    opacity: 0;
    transition: opacity .3s;
}
.nav-mobile.open { display: block; opacity: 1; }

.nav-mobile-panel {
    position: absolute;
    top: 0; right: 0;
    width: min(340px, 92vw);
    height: 100%;
    background: #fff;
    padding: 20px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    box-shadow: -8px 0 40px rgba(0,0,0,.15);
    z-index: 999;
}
.nav-mobile.open .nav-mobile-panel { transform: translateX(0); }

.nav-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--es-grey-border);
}
.nav-mobile-close {
    background: none; border: none; cursor: pointer;
    font-size: 1.3rem; color: var(--es-text-muted);
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px; transition: background .2s;
}
.nav-mobile-close:hover { background: var(--es-grey-bg); }

.nav-mobile-link {
    display: flex; align-items: center; justify-content: space-between;
    padding: 11px 10px;
    font-size: .925rem; font-weight: 600;
    color: var(--es-text); text-decoration: none;
    border-radius: 8px;
    transition: background .15s, color .15s;
    cursor: pointer; border: none; background: none;
    width: 100%; font-family: inherit; text-align: left;
}
.nav-mobile-link:hover { background: var(--es-blue-light); color: var(--es-blue); }
.nav-mobile-link .chevron { transition: transform .25s; font-size: .7rem; }
.nav-mobile-link.open .chevron { transform: rotate(180deg); }

.nav-mobile-sub {
    display: none;
    padding: 4px 0 4px 12px;
}
.nav-mobile-sub.open { display: block; }
.nav-mobile-sub-label {
    font-size: .68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .08em;
    color: var(--es-text-muted); padding: 8px 8px 2px;
    display: block;
}
.nav-mobile-sub a {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 8px;
    font-size: .875rem; font-weight: 500;
    color: var(--es-text-muted); text-decoration: none;
    border-radius: 6px; transition: all .15s;
}
.nav-mobile-sub a:hover { background: var(--es-blue-light); color: var(--es-blue); }
.nav-mobile-sub a i { color: var(--es-blue); opacity: .7; width: 18px; text-align: center; }

.nav-mobile-cta {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin-top: 20px; padding: 13px;
    background: var(--es-blue); color: #fff;
    border-radius: 10px; font-weight: 600; font-size: .925rem;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(9,127,197,.25);
}

/* ============================================================
   BANDEAU CONGÉS
   ============================================================ */
.bandeau-conges {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    color: #1a1a2e;
    text-align: center;
    padding: 9px 20px;
    font-size: .85rem;
    font-weight: 600;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background: #0a0a0a;
    color: rgba(255,255,255,.65);
    padding: 60px 0 0;
    margin-top: 80px;
    font-size: .875rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
}
.footer h5 {
    color: #fff;
    font-weight: 700;
    font-size: .80rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: 18px;
}
.footer a {
    color: rgba(255,255,255,.55);
    text-decoration: none;
    transition: color .2s;
    display: inline-flex; align-items: center; gap: 6px;
}
.footer a:hover { color: #fff; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li { margin-bottom: 10px; }

.footer-logo img {
    height: 36px;
    filter: brightness(0) invert(1);
    opacity: .85;
    margin-bottom: 14px;
}
.footer-desc {
    color: rgba(255,255,255,.4);
    line-height: 1.7;
    font-size: .85rem;
}
.footer-socials { display: flex; gap: 8px; margin-top: 18px; }
.footer-social-btn {
    width: 34px; height: 34px;
    border-radius: 8px;
    background: rgba(255,255,255,.07);
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,.55) !important;
    font-size: .95rem;
    transition: background .2s, color .2s !important;
}
.footer-social-btn:hover {
    background: var(--es-blue) !important;
    color: #fff !important;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.07);
    padding: 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .78rem;
    color: rgba(255,255,255,.3);
    flex-wrap: wrap;
    gap: 8px;
}
.footer-bottom a { color: rgba(255,255,255,.3); font-size: .78rem; }
.footer-bottom a:hover { color: rgba(255,255,255,.65); }

/* ============================================================
   UTILITAIRES
   ============================================================ */
.text-justify { text-align: justify; }
.vh-40 { height: 40vh; object-fit: cover; }
.vh-50 { height: 50vh; object-fit: cover; }

/* ============================================================
   ANIMATIONS CSS3
   ============================================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.animate-fade-up {
    opacity: 0;
    animation: fadeInUp .6s ease forwards;
}
.animate-fade-up.delay-1 { animation-delay: .1s; }
.animate-fade-up.delay-2 { animation-delay: .2s; }
.animate-fade-up.delay-3 { animation-delay: .3s; }

/* Scroll reveal — appliqué par JS */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .65s ease, transform .65s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal.delay-1 { transition-delay: .1s; }
.reveal.delay-2 { transition-delay: .2s; }
.reveal.delay-3 { transition-delay: .3s; }
.reveal.delay-4 { transition-delay: .4s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .nav-links, .nav-cta { display: none; }
    .nav-burger { display: flex; }
}
@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .topbar .container { justify-content: center; gap: 16px; }
    .nav-inner { height: 60px; }
}
