/* Barre haute */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    /* C15c sprint-05 — contraste a11y : 0.35 → 0.55 (WCAG 2.2 AA).
     * Sprint-06 retour Arnaud : on reste à 0.55 (transparente comme avant).
     * Le masquage du texte qui défile dessous est géré par un gradient
     * overlay body::before dans style.css (fade-out progressif). */
    background: rgba(0, 0, 0, 0.55);
    color: #ddd;
}

.topbar-inner {
    width: 100%;
    padding: 4px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.site-logo {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: 600;
    font-size: 20px;
    letter-spacing: 0.12em;
    text-transform: lowercase;
    color: #ffffff;
    text-decoration: none;
    line-height: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}
.site-logo-img {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    padding: 2px;
}
@media (max-width: 480px) {
    .site-logo-img { width: 32px; height: 32px; }
    .site-logo-text { font-size: 0.9em; letter-spacing: 0.08em; }
    .site-logo { gap: 8px; }
}

/* Telephone + LinkedIn topbar */
.topbar-contact {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: 16px;
}
.topbar-phone {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    line-height: 1;
    opacity: 0.9;
    transition: opacity 0.2s;
}
.topbar-phone:hover { opacity: 1; }
.phone-icon { font-size: 16px; line-height: 1; }
.topbar-linkedin,
.topbar-maps {
    display: flex;
    align-items: center;
    color: #ffffff;
    opacity: 0.85;
    transition: opacity 0.2s;
    line-height: 1;
}
.topbar-linkedin:hover,
.topbar-maps:hover { opacity: 1; }
.topbar-linkedin svg,
.topbar-maps svg { display: block; }
/* sprint-25 (retour Arnaud) : lien Maps = icône + libellé, calé comme .topbar-phone ;
   margin-left négatif = rapproché ~10px de l'icône LinkedIn. */
.topbar-maps {
    gap: 5px;
    font-size: 14px;
    opacity: 0.9;
    margin-left: -10px;
}

/* Colonne de droite : langues + nav */
.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.lang-switcher {
    position: relative;
    margin-right: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 0;
}

/* Boutons nav top (ex-"pilule", désormais carré pur — sprint-06 itér. 15) */
.topbar-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 18px;
    border-radius: 0;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(10, 33, 57, 0.80);
    color: #ffffff;
    font-size: 13px;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}
.topbar-pill:hover {
    background: rgba(255,255,255,0.10);
}

/* Contact */
.topbar-pill-primary {
    border-width: 2px;
}

/* Espace client */
.topbar-pill-accent {
    background: #f0e3a4;
    border-color: #f0e3a4;
    color: #12202f;
    font-weight: 600;
}
.topbar-pill-accent:hover {
    filter: brightness(1.06);
}

/* Langues */
.lang-toggle {
    min-width: 56px;
}
.chevron {
    margin-left: 6px;
    font-size: 9px;
}

/* Menu langues */
.lang-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 6px;
    background: rgba(10, 33, 57, 0.98);
    border-radius: 0;  /* sprint-06 itér. 15 : carré pur. */
    border: 1px solid rgba(255,255,255,0.15);
    padding: 6px 0;
    display: none;
}
.lang-menu.open { display: block; }
.lang-menu a {
    display: block;
    padding: 6px 14px;
    font-size: 13px;
    color: #ffffff;
    text-decoration: none;
    white-space: nowrap;
}
.lang-menu a:hover,
.lang-menu a.active {
    background: rgba(255,255,255,0.18);
}

/* Dropdown Services / A propos */
.topbar-dropdown {
    position: relative;
}
.topbar-dropdown .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 6px;
    background: rgba(10, 33, 57, 0.98);
    border-radius: 0;  /* sprint-06 itér. 15 : carré pur. */
    border: 1px solid rgba(255,255,255,0.15);
    padding: 6px 0;
    display: none;
}
.topbar-dropdown .dropdown-menu.open { display: block; }
.topbar-dropdown .dropdown-menu a {
    display: block;
    padding: 6px 14px;
    font-size: 13px;
    color: #ffffff;
    text-decoration: none;
    white-space: nowrap;
}
.topbar-dropdown .dropdown-menu a:hover {
    background: rgba(255,255,255,0.18);
}

/* Hamburger button — hidden on desktop */
.topbar-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 1010;
}
.topbar-burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}
.topbar-burger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.topbar-burger.open span:nth-child(2) { opacity: 0; }
.topbar-burger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* CTA en page (construction) */
.cta-devis {
    display: inline-block;
    padding: 14px 36px;
    background: var(--cta-primary-bg, #009FCB);
    color: var(--cta-primary-color, #fff);
    font-size: 1.1em;
    font-weight: 600;
    border-radius: var(--cta-radius, 0);
    text-decoration: none;
    transition: var(--cta-transition, background 0.3s, transform 0.2s);
    transition: background 0.3s;
}
.cta-devis:hover {
    background: var(--cta-primary-bg-hover, #61C452);
    transform: translateY(-2px);
}

/* FAQ styling */
.faq-block {
    width: 100%;
    max-width: 800px;
    height: auto;
    text-align: left;
}
.faq-block:hover {
    background: rgba(0, 0, 0, 0.28);
    transform: none;
}
.faq-intro {
    margin-bottom: 20px;
    line-height: 1.4;
    text-align: justify;
}
.faq-item {
    border-bottom: 1px solid rgba(255,255,255,0.15);
    padding: 12px 0;
}
.faq-item summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before {
    content: "+";
    font-size: 1.4em;
    font-weight: 700;
    margin-right: 12px;
    color: #009FCB;
    min-width: 20px;
}
.faq-item[open] summary::before {
    content: "\2212";
}
.faq-item summary h2 {
    font-size: 1.05em;
    font-weight: 600;
    margin: 0;
}
.faq-answer {
    padding: 10px 0 6px 32px;
    line-height: 1.4;
    text-align: justify;
    color: #ddd;
}

/* Responsive (tablette) */
@media (max-width: 900px) {
    .topbar-inner {
        padding: 8px 12px;
    }
    .topbar-right {
        gap: 6px;
    }
    .topbar-pill {
        padding: 4px 10px;
        font-size: 12px;
    }
    .topbar-phone .phone-number,
    .topbar-maps .maps-label {
        display: none;
    }
}

/* Mobile: hamburger menu */
@media (max-width: 768px) {
    .topbar-burger {
        display: flex;
    }
    .topbar-contact {
        margin-left: auto;
        margin-right: 8px;
    }
    .topbar-phone .phone-number,
    .topbar-maps .maps-label {
        display: none;
    }

    /* Panneau plein ecran */
    .topbar-right {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(10, 33, 57, 0.98);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 0;
        z-index: 1005;
        padding: 0;
        overflow-y: auto;
    }
    .topbar-right.open {
        display: flex;
    }

    /* Logo en haut du panneau */
    .topbar-right::before {
        content: "petzerhiel.lu";
        display: block;
        font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        font-weight: 600;
        font-size: 22px;
        letter-spacing: 0.12em;
        text-transform: lowercase;
        color: #ffffff;
        padding: 60px 0 24px 0;
        text-align: center;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        width: 80%;
        margin-bottom: 24px;
    }

    /* Langues en ligne horizontale */
    .lang-switcher {
        margin-bottom: 20px;
        order: -1;
    }
    .lang-toggle {
        display: none;
    }
    .lang-menu {
        display: flex !important;
        position: static;
        flex-direction: row;
        gap: 0;
        background: none;
        border: none;
        padding: 0;
        border-radius: 0;
    }
    .lang-menu a {
        padding: 8px 16px;
        font-size: 14px;
        border-radius: 0;  /* sprint-06 itér. 15 : carré pur (mobile). */
        border: 1px solid rgba(255,255,255,0.2);
        margin: 0 4px;
    }
    .lang-menu a.active {
        background: rgba(255,255,255,0.2);
    }

    /* Nav items */
    .nav-links {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        width: 80%;
    }
    .topbar-pill {
        font-size: 16px;
        padding: 12px 0;
        border: none;
        background: none;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        border-radius: 0;
    }
    .topbar-pill:hover {
        background: rgba(255,255,255,0.06);
    }

    /* Accent (Espace client) — ex-pill, désormais carré pur sprint-06 itér. 15 */
    .topbar-pill-accent {
        background: #f0e3a4;
        color: #12202f;
        border-radius: 0;
        border: none;
        margin-top: 16px;
        padding: 12px 28px;
        width: auto;
    }

    /* Dropdowns inline */
    .topbar-dropdown {
        width: 100%;
        text-align: center;
    }
    .topbar-dropdown .dropdown-menu {
        position: static;
        margin-top: 0;
        border-radius: 0;
        min-width: 0;
        width: 100%;
        text-align: center;
        background: rgba(255,255,255,0.04);
        border: none;
        padding: 0;
    }
    .topbar-dropdown .dropdown-menu a {
        padding: 10px 16px;
        font-size: 14px;
        color: rgba(255,255,255,0.7);
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    .topbar-dropdown .dropdown-menu a:hover {
        color: #fff;
        background: rgba(255,255,255,0.08);
    }
}

/* Fix dropdown menus visibility */
.topbar-inner,
.topbar-right,
.nav-links {
  overflow: visible !important;
}
.topbar-dropdown .dropdown-menu {
  z-index: 2005 !important;
  min-width: 220px;
  visibility: visible;
  opacity: 1;
}

/* ===========================================================
   MOBILE A11Y — tap-targets WCAG 2.5.5 (>= 44x44px) + safe-area
   =========================================================== */
@media (max-width: 768px) {
  .topbar-burger {
    min-width: 44px;
    min-height: 44px;
    padding: 12px;
    box-sizing: border-box;
  }

  .lang-menu a,
  .topbar-pill,
  .topbar-dropdown .dropdown-menu a {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  /* Panneau mobile : safe-area iPhone à encoche en bas */
  .topbar-right {
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
    box-sizing: border-box;
  }
}

/* FAQ accordion : tap-target large pour le summary +/− */
.faq-item summary {
  min-height: 44px;
  padding: 12px 0;
  cursor: pointer;
}
