/* ============================================================================
 * app.css — single source of truth for site-wide design tokens and the
 * shared components that used to be copy-pasted into per-page <style> blocks.
 *
 * Loaded after Bulma in both layoutX (public) and layoutAdmin (admin), so it
 * can override Bulma defaults. Per-page <style> blocks still load afterwards
 * and win locally — intended during the transition.
 * ========================================================================== */

/* ── Design tokens ───────────────────────────────────────────────────────── */
:root {
    /* Brand */
    --brand:        #66d1ff;   /* cyan accent */
    --brand-dark:   #1d72aa;   /* cyan accent, darker */
    --brand-ink:    #0f1923;   /* near-black used by the admin sidebar */

    /* Semantic (aligned to Bulma 1.x so they match built-in components) */
    --link:         #3e8ed0;
    --link-soft:    #eff5fb;
    --ok:           #48c78e;
    --ok-soft:      #e8f5e9;
    --danger:       #f14668;
    --warn:         #ffe08a;
    --warn-ink:     #b5860d;

    /* Ink / neutral scale */
    --ink-1:        #1a1a1a;
    --ink-2:        #4a4a4a;
    --ink-3:        #555;
    --ink-muted:    #888;
    --ink-faint:    #aaa;
    --ink-fainter:  #bbb;
    --border:       #dbdbdb;

    /* Surfaces */
    --surface:      #ffffff;
    --surface-alt:  #fafcff;

    /* Shape & motion */
    --radius-sm:    8px;
    --radius:       12px;
    --radius-pill:  999px;
    --shadow-sm:    0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow:       0 8px 32px rgba(0, 0, 0, 0.12);
    --ease:         0.2s ease;

    /* Typography — Montserrat (display) over Nunito (body). Loaded via the
     * Google Fonts <link> in layoutX / layoutAdmin. */
    --font-body:    "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-head:    "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    /* Monospace for the admin "technical" look. IBM Plex Mono is loaded in
     * layoutAdmin; public pages fall back to the system mono stack. */
    --font-mono:    "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    /* Override Bulma's default body family so the whole site uses Nunito. */
    --bulma-family-primary: var(--font-body);
}

/* ── Base ────────────────────────────────────────────────────────────────── */
/* Replaces the old global `a:hover { color: blue }` (off-brand pure blue). */
a:hover { color: var(--brand-dark); }

/* Body text in Nunito (explicit, in addition to the Bulma var override above,
 * so it doesn't depend on which Bulma variable drives <body>). */
body { font-family: var(--font-body); }

/* Headings use the display face. Bulma's .title/.subtitle keep their own
 * sizes/weights; we only swap the family. */
.title, h1, h2, h3, h4, h5, h6 { font-family: var(--font-head); }

/* ── Breadcrumbs ─────────────────────────────────────────────────────────── */
/* Soft cyan pill with chevron separators. Used on both public and admin. */
.breadcrumb {
    display: inline-block;
    padding: 0.4rem 0.95rem;
    border-radius: var(--radius-pill);
    background: linear-gradient(90deg,
        rgba(102, 209, 255, 0.10) 0%,
        rgba(102, 209, 255, 0.18) 100%);
    border: 1px solid rgba(102, 209, 255, 0.35);
    box-shadow: var(--shadow-sm);
}
.breadcrumb ul { align-items: center; }
.breadcrumb a {
    color: var(--ink-2);
    font-weight: 600;
    padding: 0 0.55em;
    border-radius: 6px;
    transition: color var(--ease), background-color var(--ease);
}
.breadcrumb a:hover {
    color: var(--brand-dark);
    background-color: rgba(255, 255, 255, 0.6);
}
.breadcrumb li + li::before {        /* override Bulma's "/" separator */
    content: "\203A";                /* › */
    color: rgba(29, 114, 170, 0.45);
    font-weight: 700;
    padding: 0 0.15em;
}
.breadcrumb li.is-active a {
    color: var(--ink-1);
    font-weight: 800;
    cursor: default;
    background: none;
}
.breadcrumb li.is-active a:hover { background: none; }

/* ── Auth pages (login / register / forgot / reset) ──────────────────────── */
.auth-section {
    min-height: calc(100vh - 260px);
    display: flex;
    align-items: center;
}
.auth-card {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* ── Service pages (depannage / maintenance / assistance / formation) ────── */
/* Scoped to <section> so it only fills the viewport on the standalone display
 * pages. order.jte reuses the .service-section class on <div> cards, which must
 * keep their natural (content) height — hence the element qualifier. */
section.service-section { min-height: calc(100vh - 260px); }
.pricing-card    { border-radius: var(--radius); }
.step-num {
    width: 2rem; height: 2rem;
    border-radius: 50%;
    background: var(--link);        /* default accent; pages may override per service */
    color: #fff;
    font-weight: 700; font-size: 0.85rem;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; margin: 0 auto 0.5rem;
}
@keyframes popIn {
    0%   { transform: scale(0.7);  opacity: 0; }
    80%  { transform: scale(1.05); }
    100% { transform: scale(1);    opacity: 1; }
}
.pop-in { animation: popIn 0.45s ease forwards; }

/* ── User-account pages (dashboard / orders / estimates / quotes / tickets) ─ */
.account-section { min-height: calc(100vh - 260px); }
.sidebar-nav { display: flex; flex-direction: column; gap: 0.15rem; }
.sidebar-nav a {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--ink-2);
    text-decoration: none;
    transition: background 0.15s;
}
.sidebar-nav a:hover     { background: #f0f6ff;       color: var(--link); }
.sidebar-nav a.is-active { background: var(--link-soft); color: var(--link); font-weight: 600; }
.stat-card  { border-radius: var(--radius); }
.avatar-circle {
    width: 3rem; height: 3rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--link), var(--brand-dark));
    color: #fff; font-weight: 700; font-size: 1.1rem;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.order-row, .quote-row {
    border-radius: 10px;
    transition: background 0.15s;
}
.order-row:hover { background: var(--surface-alt); }
.quote-row:hover { background: #fafafa; }
.status-dot {
    width: 1rem; height: 1rem;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: #fff;
    flex-shrink: 0;
}
.status-dot.is-done   { background: var(--ok);   border-color: var(--ok); }
.status-dot.is-active { background: var(--link); border-color: var(--link);
                        box-shadow: 0 0 0 3px rgba(62, 142, 208, 0.25); }
.status-connector         { flex: 1; height: 2px; background: var(--border); }
.status-connector.is-done { background: var(--ok); }

/* ── Bulma component radii ───────────────────────────────────────────────── */
/* Was repeated as inline style="border-radius: …" on dozens of boxes and
 * notifications. Setting it once here makes every box/notification uniform. */
.box          { border-radius: var(--radius); }      /* 12px */
.notification { border-radius: var(--radius-sm); }   /* 8px  */

/* ── Utilities (replace repeated inline styles) ──────────────────────────── */
.gap-sm      { gap: 0.75rem; }
.gap-sm-top  { gap: 0.75rem; align-items: flex-start; }
.truncate    { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.divider     { background-color: rgba(0, 0, 0, 0.08); height: 1px; border: none; margin: 1rem 0; }
.stat-icon   { font-size: 1.75rem; flex-shrink: 0; }

/* Admin table helpers (monospace id cells + empty-state rows) */
.cell-id     { font-family: var(--font-mono); color: var(--ink-faint); }
.admin-empty { text-align: center; color: var(--ink-fainter); font-family: var(--font-mono); font-size: 0.8rem; padding: 3rem; }

/* ── Clickable offer cards ───────────────────────────────────────────────── */
/* A whole pricing/offer block that navigates on click (wired by layoutX JS via
 * data-href). Inner <a> links still work — the handler ignores clicks on them. */
.offer-link { cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.offer-link:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12); }
.offer-link:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

/* ── Top utility bar (phone / WhatsApp / hours, above the navbar) ─────────── */
.topbar { background: var(--brand-ink); color: #fff; font-size: 1.0rem; }
.topbar .container {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1.25rem; padding: 0.35rem 1rem; flex-wrap: wrap;
}
.topbar .tb-contacts { display: inline-flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.topbar .tb-zoom { display: inline-flex; align-items: center; gap: 0.35rem; }
.topbar .tb-zoom-btn, .topbar .tb-zoom-reset {
    background: rgba(255, 255, 255, 0.16); color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 5px;   /* ≥3:1 boundary — clearly a button */
    width: 1.6rem; height: 1.6rem; padding: 0; cursor: pointer; line-height: 1;
    display: inline-flex; align-items: center; justify-content: center; font-size: 0.95rem;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.topbar .tb-zoom-btn:hover, .topbar .tb-zoom-reset:hover { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.topbar .tb-zoom-btn:focus-visible, .topbar .tb-zoom-reset:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.topbar .tb-zoom-reset { font-size: 0.7rem; }
.topbar .tb-zoom-val { min-width: 2.7rem; text-align: center; font-variant-numeric: tabular-nums; }
.topbar a { color: #fff; display: inline-flex; align-items: center; gap: 0.4rem; }
.topbar a:hover { color: var(--brand); }
.topbar .tb-phone { font-weight: 700; letter-spacing: 0.02em; }
.topbar .tb-wa:hover { color: #25d366; }                 /* WhatsApp green */
.topbar .tb-hours { color: rgba(255, 255, 255, 1.0); display: inline-flex; align-items: center; gap: 0.4rem; }
.topbar .tb-sep { color: rgba(255, 255, 255, 1.0); }
@media screen and (max-width: 768px) {
    /* zoom is a native pinch gesture on mobile, so hide the control there */
    .topbar .tb-hours, .topbar .tb-sep, .topbar .tb-zoom { display: none; }
    .topbar .container { justify-content: center; gap: 1.1rem; }
}

/* ── Navbar brand (logo + SI85 wordmark + explicit "Accueil" home cue) ───── */
/* Styled to match the other navbar buttons (.button.is-transparent): bordered,
   rounded, white, cyan on hover — so it clearly reads as a clickable button. */
.brand-home {
    align-self: center;                  /* don't stretch to full navbar height */
    display: flex; align-items: center; gap: 0.55rem;
    background: #fff;
    border: 1px solid var(--border); border-radius: 6px;
    padding: 0.3rem 0.75rem;
    transition: background-color 0.25s ease, border-color 0.25s ease;
}
.brand-home:hover { background-color: #66d1ff; border-color: #1d72aa; }
.brand-home .brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-home .brand-wordmark {
    font-family: var(--font-head); font-weight: 800; font-size: 1.2rem;
    color: var(--brand-ink); letter-spacing: 0.02em;
}
.brand-home .brand-home-hint {
    font-size: 0.7rem; font-weight: 700; color: var(--link);
    display: inline-flex; align-items: center; gap: 0.25rem;
}
.brand-home:hover .brand-wordmark { color: var(--brand-ink); }
.brand-home:hover .brand-home-hint { color: #0a2f44; text-decoration: underline; }

/* ── Floating call / WhatsApp buttons (mobile only) ──────────────────────── */
.comm-fab { position: fixed; right: 1rem; bottom: 1rem; z-index: 200;
            display: none; flex-direction: column; gap: 0.6rem; }
@media screen and (max-width: 768px) { .comm-fab { display: flex; } }
.comm-fab a {
    width: 52px; height: 52px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.3rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.15s ease;
}
.comm-fab a:hover { transform: scale(1.08); color: #fff; }
.comm-fab .fab-call { background: var(--brand-dark); }
.comm-fab .fab-wa   { background: #25d366; }
