/* ══════════════════════════════════════════════════════════════════════════════
   Rezo Mityèl — en-tête (rh-) et pied de page (rf-) du site.
   Partagé par le gabarit Blade public (layouts.app) et la coquille React de
   l'espace membre (resources/js/react/Layouts/MemberLayout.jsx).
   Le mode sombre ne s'applique que si data-bs-theme="dark" est posé (pages connectées).
   ══════════════════════════════════════════════════════════════════════════════ */
/* ══════════ En-tête du site (rh-) ══════════ */
:root { --rh-h:72px; --rh-navy:#0B3B66; --rh-green:#3E8E1F; --rh-lime:#B8F28E; --rh-text:#0F172A; --rh-text-2:#475569; --rh-line:#E2E8F0; --rh-bg:#F4F7FA; }
.rh { position:fixed; top:0; left:0; right:0; z-index:1000; height:var(--rh-h); background:rgba(255,255,255,.92);
    backdrop-filter:saturate(180%) blur(14px); -webkit-backdrop-filter:saturate(180%) blur(14px);
    border-bottom:1px solid transparent; transition:box-shadow .2s ease, border-color .2s ease; font-family:'Inter',system-ui,-apple-system,sans-serif; }
.rh.scrolled { border-color:var(--rh-line); box-shadow:0 8px 24px rgba(15,23,42,.06); }
.rh-spacer { height:var(--rh-h); }
.rh-inner { max-width:1200px; height:100%; margin:0 auto; padding:0 20px; display:flex; align-items:center; gap:18px; }
.rh-logo { display:flex; align-items:center; flex-shrink:0; }
.rh-logo img { width:132px; height:auto; display:block; }

.rh-nav { display:flex; align-items:center; gap:4px; margin:0 auto; }
.rh-link { display:inline-flex; align-items:center; gap:7px; padding:9px 13px; border-radius:10px; font-size:14.5px; font-weight:600;
    color:var(--rh-text-2); text-decoration:none; transition:background .15s ease, color .15s ease; white-space:nowrap; }
.rh-link i { font-size:13px; color:#94A3B8; transition:color .15s ease; }
.rh-link:hover { color:var(--rh-text); }
.rh-link.active { color:var(--rh-navy); }
.rh-link.active i, .rh-link:hover i { color:var(--rh-green); }
/* Pas de fond : une barre sous le lien (survol = barre fine, page active = barre verte) */
.rh-nav .rh-link { position:relative; border-radius:0; }
.rh-nav .rh-link::after { content:''; position:absolute; left:13px; right:13px; bottom:2px; height:3px; border-radius:3px;
    background:var(--rh-green); transform:scaleX(0); transform-origin:center; transition:transform .2s ease; }
.rh-nav .rh-link:hover::after { transform:scaleX(.6); opacity:.5; }
.rh-nav .rh-link.active::after { transform:scaleX(1); opacity:1; }

.rh-actions { display:flex; align-items:center; gap:8px; flex-shrink:0; }
.rh-icon-btn { position:relative; width:42px; height:42px; border-radius:12px; display:inline-flex; align-items:center; justify-content:center;
    color:var(--rh-text); background:transparent; border:1px solid var(--rh-line); text-decoration:none; transition:all .15s ease; font-size:16px; cursor:pointer; }
.rh-icon-btn:hover { border-color:#CBD5E1; background:var(--rh-bg); color:var(--rh-navy); }
.cart-nav-badge { position:absolute; top:-6px; right:-6px; min-width:20px; height:20px; padding:0 5px; border-radius:999px; background:var(--rh-green);
    color:#fff; font-size:11px; font-weight:800; display:flex; align-items:center; justify-content:center; border:2px solid #fff; line-height:1; }
.cart-nav-badge.hidden { display:none; }

.rh-btn { display:inline-flex; align-items:center; justify-content:center; gap:7px; padding:10px 16px; border-radius:12px; font-size:14px; font-weight:700;
    text-decoration:none; transition:all .15s ease; white-space:nowrap; border:1px solid transparent; }
.rh-btn-ghost { color:var(--rh-navy); border-color:#CBD5E1; background:#fff; }
.rh-btn-ghost:hover { border-color:var(--rh-navy); color:var(--rh-navy); }
.rh-btn-primary { color:#fff; background:var(--rh-green); box-shadow:0 6px 16px rgba(62,142,31,.25); }
.rh-btn-primary:hover { background:#357A1A; color:#fff; }

/* Menu du compte */
.rh-user { display:flex; align-items:center; gap:9px; padding:4px 10px 4px 4px; border-radius:999px; border:1px solid var(--rh-line); background:#fff;
    cursor:pointer; transition:all .15s ease; font-family:inherit; color:var(--rh-text); }
.rh-user:hover, .rh-user[aria-expanded="true"] { border-color:#CBD5E1; background:var(--rh-bg); }
.rh-user img { width:34px; height:34px; border-radius:50%; object-fit:cover; background:var(--rh-bg); }
.rh-user span { font-size:14px; font-weight:700; max-width:120px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rh-user i { font-size:11px; color:#94A3B8; }
.rh-menu { min-width:270px; padding:8px; border:1px solid var(--rh-line) !important; border-radius:16px !important;
    box-shadow:0 20px 44px rgba(15,23,42,.14) !important; margin-top:10px !important; font-family:'Inter',system-ui,sans-serif; }
.rh-menu-head { display:flex; align-items:center; gap:11px; padding:10px 10px 12px; margin-bottom:6px; border-bottom:1px solid var(--rh-line); }
.rh-menu-head img { width:42px; height:42px; border-radius:12px; object-fit:cover; }
.rh-menu-head b { display:block; font-size:14.5px; color:var(--rh-text); }
.rh-menu-head small { display:block; font-size:12.5px; color:#94A3B8; max-width:180px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rh-menu .dropdown-item { display:flex; align-items:center; gap:11px; padding:9px 10px; border-radius:10px; font-size:14px; font-weight:600; color:var(--rh-text-2); }
.rh-menu .dropdown-item i { width:18px; text-align:center; color:#94A3B8; font-size:15px; }
.rh-menu .dropdown-item:hover, .rh-menu .dropdown-item:focus { background:var(--rh-bg); color:var(--rh-text); }
.rh-menu .dropdown-item:hover i { color:var(--rh-green); }
.rh-menu .dropdown-item .badge { margin-left:auto; }
.rh-menu .rh-sep { height:1px; background:var(--rh-line); margin:6px 4px; }
.rh-menu .rh-admin i { color:var(--rh-navy); }
.rh-menu .rh-logout, .rh-menu .rh-logout i { color:#B42318; }
.rh-menu .rh-logout:hover { background:#FEF3F2; color:#B42318; }

.rh-toggle { display:none; }

/* Panneau mobile */
.rh-panel { display:none; }
@media (max-width: 1080px) {
    .rh-link { padding:9px 10px; font-size:14px; }
    .rh-nav .rh-link::after { left:10px; right:10px; }
    .rh-user span { display:none; }
}
@media (max-width: 960px) {
    :root { --rh-h:64px; }
    .rh-inner { padding:0 14px; gap:10px; }
    .rh-logo img { width:118px; }
    .rh-nav, .rh-actions .rh-guest, .rh-actions .dropdown { display:none; }
    .rh-actions { margin-left:auto; }
    .rh-toggle { display:inline-flex; }
    .rh-panel { display:block; position:fixed; top:var(--rh-h); left:0; right:0; bottom:0; z-index:999; background:rgba(15,23,42,.35);
        opacity:0; visibility:hidden; transition:opacity .2s ease, visibility .2s ease; }
    .rh-panel.active { opacity:1; visibility:visible; }
    .rh-panel-inner { background:#fff; max-height:calc(100vh - var(--rh-h)); overflow:auto; padding:12px 14px 18px; border-radius:0 0 20px 20px;
        box-shadow:0 20px 40px rgba(15,23,42,.18); transform:translateY(-12px); transition:transform .2s ease; font-family:'Inter',system-ui,sans-serif; }
    .rh-panel.active .rh-panel-inner { transform:none; }
    .rh-panel .rh-link { display:flex; padding:13px 12px; font-size:15.5px; border-radius:0; }
    .rh-panel .rh-link i { width:20px; text-align:center; font-size:15px; }
    .rh-panel-sep { height:1px; background:var(--rh-line); margin:8px 4px; }
    .rh-panel-user { display:flex; align-items:center; gap:11px; padding:10px 12px; }
    .rh-panel-user img { width:40px; height:40px; border-radius:12px; object-fit:cover; }
    .rh-panel-user b { display:block; font-size:15px; color:var(--rh-text); }
    .rh-panel-user small { display:block; font-size:12.5px; color:#94A3B8; }
    .rh-panel-cta { display:grid; grid-template-columns:1fr 1fr; gap:10px; padding:6px 4px 0; }
    .rh-panel-cta .rh-btn { padding:13px; font-size:15px; }
    .rh-panel .rh-logout, .rh-panel .rh-logout i { color:#B42318; }
    body.rh-open { overflow:hidden; }
}

/* ══════════ Pied de page (rf-) ══════════ */
.rf { background:#071E33; color:#CBD5E1; font-family:'Inter',system-ui,-apple-system,sans-serif; font-size:14.5px; position:relative; overflow:hidden; }
.rf::before { content:''; position:absolute; inset:0; pointer-events:none;
    background:radial-gradient(600px 260px at 100% 0%,rgba(90,174,46,.16),transparent 60%),radial-gradient(500px 240px at 0% 100%,rgba(14,75,128,.45),transparent 60%); }
.rf-wrap { max-width:1200px; margin:0 auto; padding:0 20px; position:relative; }
.rf a { color:inherit; text-decoration:none; }

.rf-cta { display:flex; align-items:center; justify-content:space-between; gap:20px; flex-wrap:wrap; padding:34px 0; border-bottom:1px solid rgba(255,255,255,.08); }
.rf-cta h3 { font-size:22px; font-weight:800; color:#fff; margin:0 0 4px; letter-spacing:-.01em; }
.rf-cta p { margin:0; color:#94A3B8; }
.rf-cta-actions { display:flex; gap:10px; flex-wrap:wrap; }
.rf-btn { display:inline-flex; align-items:center; gap:8px; padding:12px 18px; border-radius:12px; font-weight:700; font-size:14.5px; transition:all .15s ease; white-space:nowrap; }
.rf-btn-primary { background:#3E8E1F; color:#fff !important; box-shadow:0 10px 22px rgba(62,142,31,.3); }
.rf-btn-primary:hover { background:#357A1A; }
.rf-btn-ghost { border:1px solid rgba(255,255,255,.2); color:#fff !important; }
.rf-btn-ghost:hover { background:rgba(255,255,255,.08); }

.rf-grid { display:grid; grid-template-columns:1.4fr 1fr 1fr 1.3fr; gap:36px; padding:44px 0 36px; }
.rf-brand img { width:150px; filter:brightness(0) invert(1); opacity:.95; margin-bottom:14px; }
.rf-brand p { color:#94A3B8; line-height:1.65; margin:0 0 16px; max-width:300px; }
.rf-badges { display:flex; flex-wrap:wrap; gap:8px; }
.rf-badges span { display:inline-flex; align-items:center; gap:6px; font-size:12.5px; font-weight:600; color:#E2E8F0; padding:6px 10px; border-radius:999px;
    background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.08); }
.rf-badges i { color:#B8F28E; }
.rf h4 { font-size:13px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; color:#fff; margin:6px 0 16px; }
.rf-links { list-style:none; margin:0; padding:0; display:grid; gap:11px; }
.rf-links a { display:inline-flex; align-items:center; gap:9px; color:#CBD5E1; transition:color .15s ease, transform .15s ease; }
.rf-links a i { width:16px; text-align:center; color:#64748B; font-size:13px; transition:color .15s ease; }
.rf-links a:hover { color:#fff; transform:translateX(3px); }
.rf-links a:hover i { color:#B8F28E; }
.rf-contact { list-style:none; margin:0; padding:0; display:grid; gap:13px; }
.rf-contact li { display:flex; gap:11px; align-items:flex-start; line-height:1.5; }
.rf-contact i { width:32px; height:32px; flex-shrink:0; border-radius:10px; background:rgba(255,255,255,.06); color:#B8F28E; display:flex; align-items:center; justify-content:center; font-size:13px; }
.rf-contact small { display:block; font-size:11.5px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:#64748B; }
.rf-contact a:hover { color:#fff; text-decoration:underline; }

.rf-bottom { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; padding:20px 0 24px; border-top:1px solid rgba(255,255,255,.08);
    font-size:13px; color:#64748B; }
.rf-bottom a:hover { color:#fff; }
.rf-top { display:inline-flex; align-items:center; gap:7px; font-weight:600; color:#94A3B8; }

@media (max-width: 960px) {
    .rf-grid { grid-template-columns:1fr 1fr; gap:30px; }
    .rf-brand { grid-column:1 / -1; }
}
@media (max-width: 560px) {
    .rf-wrap { padding:0 16px; }
    .rf-cta { padding:28px 0; }
    .rf-cta h3 { font-size:19px; }
    .rf-cta-actions, .rf-cta-actions .rf-btn { width:100%; justify-content:center; }
    .rf-grid { grid-template-columns:1fr 1fr; gap:26px 18px; padding:32px 0 26px; }
    .rf-contact-col { grid-column:1 / -1; }
    .rf-bottom { flex-direction:column; text-align:center; }
}

/* ══════════ Mode sombre des pages connectées (data-bs-theme posé par partials.theme.head) ══════════ */
.rh-theme { width:42px; height:42px; border-radius:12px; }
[data-bs-theme="dark"] body { background-color:var(--rm-bg); color:var(--rm-text); }
html[data-bs-theme="dark"] { --rh-navy:#E0E0E0; --rh-text:#E6E6E6; --rh-text-2:#B5B5B5; --rh-line:#3C3C3C; --rh-bg:#2D2D30;
    --primary:#8AB4FF; --dark:#E6E6E6; --gray:#A7A7A7; --light:#1E1E1E; --light-gray:#3C3C3C; }
[data-bs-theme="dark"] .card-title { color:var(--rm-text); }
[data-bs-theme="dark"] .rh { background:rgba(37,37,38,.92); }
[data-bs-theme="dark"] .rh.scrolled { border-color:var(--rm-line); box-shadow:0 8px 24px rgba(0,0,0,.35); }
[data-bs-theme="dark"] .rh-logo img { filter:brightness(0) invert(1); opacity:.92; }
[data-bs-theme="dark"] .rh-link i, [data-bs-theme="dark"] .rh-user i { color:#8C8C8C; }
[data-bs-theme="dark"] .rh-link.active i, [data-bs-theme="dark"] .rh-link:hover i { color:#7CC95A; }
[data-bs-theme="dark"] .rh-nav .rh-link::after { background:#6BBF45; }
[data-bs-theme="dark"] .rh-icon-btn:hover { border-color:#4A4A4A; color:#fff; }
[data-bs-theme="dark"] .rh-user { background:var(--rm-surface-2); }
[data-bs-theme="dark"] .rh-user:hover, [data-bs-theme="dark"] .rh-user[aria-expanded="true"] { border-color:#4A4A4A; }
[data-bs-theme="dark"] .cart-nav-badge { border-color:#252526; }
[data-bs-theme="dark"] .rh-menu { background:var(--rm-surface) !important; box-shadow:0 20px 44px rgba(0,0,0,.5) !important; }
[data-bs-theme="dark"] .rh-menu-head small, [data-bs-theme="dark"] .rh-panel-user small { color:#8C8C8C; }
[data-bs-theme="dark"] .rh-menu .dropdown-item i { color:#8C8C8C; }
[data-bs-theme="dark"] .rh-menu .rh-logout, [data-bs-theme="dark"] .rh-menu .rh-logout i,
[data-bs-theme="dark"] .rh-panel .rh-logout, [data-bs-theme="dark"] .rh-panel .rh-logout i { color:#F08A7E; }
[data-bs-theme="dark"] .rh-menu .rh-logout:hover { background:rgba(220,74,61,.14); color:#F08A7E; }
[data-bs-theme="dark"] .rh-panel-inner { background:var(--rm-surface); box-shadow:0 20px 40px rgba(0,0,0,.5); }
[data-bs-theme="dark"] .rh-panel { background:rgba(0,0,0,.5); }
[data-bs-theme="dark"] .rf { background:#161616; border-top:1px solid #2B2B2B; }
