/* === SCREEN MANAGEMENT === */
.screen {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
}

:root {
    --brand-primary: #2c3e50;
    --brand-secondary: #3498db;
    --brand-success: #27ae60;
    --brand-danger: #e74c3c;
    --brand-warning: #f39c12;
    --brand-info: #17a2b8;
    --brand-light: #f8f9fa;
    --brand-dark: #343a40;

    --focus-ring: rgba(52, 152, 219, 0.45);
    --focus-ring-strong: rgba(52, 152, 219, 0.75);

    --bs-primary: var(--brand-primary);
    --bs-secondary: var(--brand-secondary);
    --bs-success: var(--brand-success);
    --bs-danger: var(--brand-danger);
    --bs-warning: var(--brand-warning);
    --bs-info: var(--brand-info);
    --bs-light: var(--brand-light);
    --bs-dark: var(--brand-dark);

    --bs-link-color: var(--brand-secondary);
    --bs-link-hover-color: #2d86c1;
}

body {
    background: var(--brand-light);
    color: var(--brand-dark);
}

/* WCAG: visible focus for keyboard navigation */
:where(a, button, input, select, textarea, [tabindex]):focus {
    outline: none;
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 3px solid var(--focus-ring-strong);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px var(--focus-ring);
}

/* WCAG: avoid reducing focus visibility on custom buttons */
.btn:focus-visible {
    box-shadow: 0 0 0 3px var(--focus-ring) !important;
}

.btn-primary {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #1a252f;
    border-color: #1a252f;
}

.btn-outline-primary {
    color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 0.2rem rgba(44, 62, 80, 0.25);
}

/* WCAG: minimum tap target sizing on touch devices */
@media (hover: none) {
    .btn,
    .tab-btn,
    .btn-close {
        min-height: 44px;
    }
}

/* WCAG: reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* Extra-small phones (<= 360px) */
@media (max-width: 360px) {
    #initial-screen {
        padding: 14px 12px;
    }
    #initial-screen #create-call-btn,
    #initial-screen #logout-btn {
        min-height: 50px;
        font-size: 1rem;
    }
    #initial-screen .btn-label {
        font-size: 0.98rem;
    }
    #initial-screen .form-control {
        min-height: 46px;
    }
    .modal-dialog {
        padding: 12px;
    }
}

/* Very small phones (<= 320px) */
@media (max-width: 320px) {
    #initial-screen {
        padding: 12px 10px;
    }

    #initial-screen .form-label {
        font-size: 0.9rem;
    }

    #initial-screen .form-control {
        min-height: 44px;
        font-size: 0.95rem;
        border-radius: 12px;
    }

    #initial-screen #create-call-btn,
    #initial-screen #logout-btn {
        min-height: 48px;
        border-radius: 12px;
        font-size: 0.98rem;
    }

    #initial-screen hr.my-4 {
        margin: 14px 0 !important;
    }

    /* Modal should not feel cramped */
    .modal-dialog {
        padding: 10px;
    }
    .modal .modal-header {
        padding: 12px 12px;
    }
    .modal .modal-body {
        padding: 12px 12px;
    }
    .modal .modal-footer {
        padding: 10px 12px 12px;
        gap: 8px;
    }
    .modal .modal-footer .btn {
        min-height: 44px;
        font-size: 0.98rem;
    }

    .online-title,
    .cta-title {
        font-size: 1.2rem;
    }
    .online-subtitle,
    .cta-subtitle {
        font-size: 0.92rem;
    }
}

/* Ultra small (<= 280px): keep layout safe and avoid horizontal scroll */
@media (max-width: 280px) {
    #initial-screen {
        padding: 10px 8px;
    }

    #initial-screen .form-label {
        font-size: 0.85rem;
    }

    #initial-screen .form-control {
        min-height: 42px;
        font-size: 0.9rem;
    }

    #initial-screen #create-call-btn,
    #initial-screen #logout-btn {
        min-height: 46px;
        font-size: 0.95rem;
    }

    .modal-dialog {
        padding: 8px;
    }

    /* Notification panels: shrink text to avoid overflow */
    .notification-panel {
        max-width: calc(100vw - 16px);
    }
    .notification-panel .notification-body {
        font-size: 0.92rem;
    }
}

.screen.active {
    display: block;
}

/* === ROUTING MODAL (modale custom, ID-scopée) ===
   NE JAMAIS utiliser `.modal` seul ici : ça écrase le `display:none` de
   Bootstrap et rend TOUTES ses modales invisibles-mais-cliquables
   (overlay plein écran z-9999 qui mange tous les clics : "rien ne se clique"). */
#routing-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

#routing-modal .modal-dialog {
    max-width: 500px;
    width: 90%;
}

#routing-modal .modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Mini-barre d'appel (page call réduite) : l'appel continue, seule l'UI se replie.
   Positionnée au-dessus du menu bas de l'app (bottomnav ~68px + safe-area) pour
   ne pas le masquer, et déplaçable librement au doigt (flottante, voir call.html). */
#call-mini {
    position: fixed; left: 12px; right: 12px; top: auto; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); z-index: 1050;
    display: flex; align-items: center; gap: 8px;
    background: #fff; border: 1px solid rgba(16,54,91,.15); border-radius: 16px;
    padding: 8px 10px; box-shadow: 0 12px 32px rgba(0,0,0,.25);
    color: #10365B;
    cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
}
#call-mini.d-none { display: none !important; }
#call-mini #call-mini-name { color: #10365B; }
#call-mini.d-none { display: none !important; }
#call-mini .call-mini-dot {
    flex: none; width: 10px; height: 10px; border-radius: 50%;
    background: #198754; animation: wc-call-pulse 1.6s ease-in-out infinite;
}
#call-mini #call-mini-name { flex: 1 1 auto; min-width: 0; }
@keyframes wc-call-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.25); } }
@media (min-width: 769px) {
    #call-mini { left: 50%; right: auto; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) {
    #call-mini .call-mini-dot { animation: none; }
}

/* Fenêtre-dans-fenêtre : l'app (iframe) remplit la vue, l'appel continue en mini-barre flottante au-dessus */
#call-app-overlay {
    position: fixed; inset: 0; z-index: 1040;
    display: flex; flex-direction: column;
    background: #f6f8fa;
}
#call-app-overlay.d-none { display: none !important; }
#call-app-topbar {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px; min-height: 44px;
    background: #10365B; color: #fff; font-size: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,.2); flex: none;
}
#call-app-topbar span { flex: 1 1 auto; min-width: 0; }
#call-app-topbar .btn { font-size: 13px; }
#call-app-frame { flex: 1 1 auto; width: 100%; border: 0; background: #fff; }
@media (min-width: 769px) {
    #call-app-topbar { padding: 10px 16px; font-size: 15px; }
}

/* === END SCREEN MANAGEMENT === */

/* === MOBILE-FIRST UX LAYOUT (HOME + ROUTING) === */
html, body {
    height: 100%;
}

body {
    -webkit-text-size-adjust: 100%;
}

.screens-wrapper {
    position: relative;
    min-height: 100vh;
}

/* Improve tap targets and readability on mobile */
@media (max-width: 576px) {
    #initial-screen {
        padding: 16px 14px;
        text-align: left !important;
    }

    #initial-screen .form-label {
        font-size: 0.95rem;
        font-weight: 600;
        margin-bottom: 6px;
    }

    #initial-screen .form-control {
        min-height: 48px;
        font-size: 1rem;
        border-radius: 12px;
    }

    #initial-screen #create-call-btn,
    #initial-screen #logout-btn {
        width: 100%;
        min-height: 52px;
        border-radius: 14px;
        font-size: 1.05rem;
        font-weight: 600;
    }

    #initial-screen #logout-btn {
        min-height: 48px;
        font-size: 1rem;
        font-weight: 500;
    }

    #initial-screen hr.my-4 {
        margin: 18px 0 !important;
        opacity: 0.25;
    }

    #initial-screen .mb-4.mx-auto {
        max-width: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}



/* Routing modal: mobile-friendly sizing */
@media (max-width: 576px) {
    .modal-dialog {
        width: 100% !important;
        max-width: none !important;
        margin: 0;
        padding: 14px;
    }
    .modal-content {
        border-radius: 16px;
    }
    .modal .modal-footer .btn {
        min-height: 46px;
        border-radius: 12px;
        font-weight: 600;
    }
    .modal .form-control,
    .modal .form-select {
        min-height: 46px;
        border-radius: 12px;
        font-size: 1rem;
    }
}

/* Waiting / client request screens: reduce overflow and keep content centered */
@media (max-width: 576px) {
    .online-status-container,
    .waiting-cta-container {
        padding: 16px 14px;
    }
    .online-title,
    .cta-title {
        font-size: 1.35rem;
        line-height: 1.2;
        margin-bottom: 6px;
    }
    .online-subtitle,
    .cta-subtitle {
        font-size: 0.98rem;
        opacity: 0.85;
    }
    .status-card {
        border-radius: 16px;
    }
}

.participant .participant-controls { position: relative; }
body.tabs-enabled #my-channels-section,
body.tabs-enabled #call-history-section { max-height: none; overflow: visible; }
body.tabs-enabled #call-history-section > h5,
body.tabs-enabled #call-history-section #call-history-controls { position: static; background: transparent; padding: 0; }

/* Toast notice — Minimaliste Dark */
.toast-notice {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 110px; /* above control bar */
    background: rgba(24,24,27,0.95);
    color: rgba(255,255,255,0.9);
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    z-index: 1100;
    font-size: 0.9rem;
    backdrop-filter: blur(12px);
}

/* Layout height: full viewport; reserve space for control bar only on call screen */
main { padding-bottom: 0; min-height: 100vh; }
main:has(#call-screen.screen.active) { padding-bottom: 100px; background: #0d1b2a; }

/* Fixed Bottom Control Bar — Minimaliste Dark */
.control-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 -8px 32px rgba(0,0,0,0.4);
    padding: 16px 24px 24px;
    z-index: 1050;
    transition: transform 0.25s ease;
}
.control-bar.collapsed { transform: translateY(calc(100% - 36px)); }

.control-bar .controls-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    max-width: 520px;
    margin: 8px auto 0;
}

.control-bar .control-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.control-bar .control-meta .badge { 
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
    color: #fff !important;
    font-weight: 600;
    padding: 0.45rem 0.7rem;
}

/* Status colors */
#call-status.status-connected {
    background: rgba(25, 135, 84, 0.2);
    border: 1px solid rgba(25, 135, 84, 0.45);
    color: #69d1a1 !important;
}
#call-status.status-disconnected {
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid rgba(220, 53, 69, 0.45);
    color: #ff8a99 !important;
}

/* Warning (connecting) */
#call-status.status-warning {
    background: rgba(255, 193, 7, 0.2); /* Bootstrap warning base */
    border: 1px solid rgba(255, 193, 7, 0.45);
    color: #ffd566 !important;
}

.control-bar .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 56px;
    border-radius: 14px;
}

.control-bar-toggle {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: -16px;
    width: 42px;
    height: 30px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(16, 54, 91, 0.95);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(16, 54, 91, 0.28);
}

.control-bar.collapsed .control-bar-toggle i { transform: rotate(180deg); transition: transform 0.2s; }

@media (max-width: 576px) {
    .control-bar { padding: 8px 10px 14px; }
    .control-bar .controls-grid { gap: 10px; max-width: 440px; }
    .control-bar .btn { height: 50px; border-radius: 12px; }
    main:has(#call-screen.screen.active) { padding-bottom: 84px; }
}

@media (max-width: 380px) {
    .control-bar .controls-grid { gap: 8px; }
    .control-bar .btn { height: 46px; }
    main:has(#call-screen.screen.active) { padding-bottom: 78px; }
}
.participant .participant-controls { position: relative; }

.toast-notice {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 84px; /* above control bar */
    background: rgba(20, 22, 25, 0.95);
    color: #fff;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 6px 20px rgba(0,0,0,0.35);
    z-index: 1100;
    font-size: 0.95rem;
}

/* Reserve space so bottom bar doesn't cover content */
main { padding-bottom: 100px; }

/* Fixed Bottom Control Bar — Minimaliste Dark */
.control-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 -8px 32px rgba(0,0,0,0.4);
    padding: 16px 24px 24px;
    z-index: 1050;
    transition: transform 0.25s ease;
}
.control-bar.collapsed { transform: translateY(calc(100% - 36px)); }

.control-bar .controls-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    max-width: 520px;
    margin: 8px auto 0;
}

.control-bar .control-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.control-bar .control-meta .badge { 
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
    color: #fff !important;
    font-weight: 600;
    padding: 0.45rem 0.7rem;
}

/* Status colors */
#call-status.status-connected {
    background: rgba(25, 135, 84, 0.2);
    border: 1px solid rgba(25, 135, 84, 0.45);
    color: #69d1a1 !important;
}
#call-status.status-disconnected {
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid rgba(220, 53, 69, 0.45);
    color: #ff8a99 !important;
}

/* Warning (connecting) */
#call-status.status-warning {
    background: rgba(255, 193, 7, 0.2); /* Bootstrap warning base */
    border: 1px solid rgba(255, 193, 7, 0.45);
    color: #ffd566 !important;
}

/* Control buttons — fonds pleins (lisibles sur fond clair comme sombre ;
   les versions "ghost" translucides étaient invisibles hors vidéo : ratio ~1) */
.control-bar .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 52px;
    border-radius: 14px;
    border: 1px solid #6c757d;
    background: #6c757d;
    color: #fff;
    transition: all 0.2s;
}
.control-bar .btn:hover {
    background: #5c636a;
    border-color: #565e64;
    color: #fff;
}
.control-bar .btn-warning {
    background: #ffc107;
    border-color: #ffc107;
    color: #212529;
}
.control-bar .btn-warning:hover {
    background: #ffca2c;
    border-color: #ffc720;
    color: #212529;
}
.control-bar .btn-danger {
    background: #dc3545;
    border-color: #dc3545;
    color: #fff;
}
.control-bar .btn-danger:hover {
    background: #bb2d3b;
    border-color: #b02a37;
    color: #fff;
}
.control-bar .btn-info {
    background: #0dcaf0;
    border-color: #0dcaf0;
    color: #052c34;
}
.control-bar .btn-info:hover {
    background: #31d2f2;
    border-color: #25cff2;
    color: #052c34;
}
.control-bar .btn-primary {
    background: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}
.control-bar .btn-primary:hover {
    background: #0b5ed7;
    border-color: #0a58ca;
    color: #fff;
}
.control-bar .btn-secondary {
    background: #6c757d;
    border-color: #6c757d;
    color: #fff;
}
.control-bar .btn-secondary:hover {
    background: #5c636a;
    border-color: #565e64;
    color: #fff;
}

/* Control bar toggle — Minimaliste Dark */
.control-bar-toggle {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: -16px;
    width: 42px;
    height: 30px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(10,10,11,0.95);
    color: rgba(255,255,255,0.5);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.control-bar.collapsed .control-bar-toggle i { transform: rotate(180deg); transition: transform 0.2s; }

@media (max-width: 576px) {
    .control-bar { padding: 8px 10px 14px; }
    .control-bar .controls-grid { gap: 10px; max-width: 440px; }
    .control-bar .btn { height: 50px; border-radius: 12px; }
    main { padding-bottom: 84px; }
}

@media (max-width: 380px) {
    .control-bar .controls-grid { gap: 8px; }
    .control-bar .btn { height: 46px; }
    main { padding-bottom: 78px; }
}
.participant .participant-controls .more-menu {
    display: none;
    position: fixed; /* escape stacking contexts */
    top: 0;
    left: 0;
    min-width: 180px;
    padding: 8px;
    background: rgba(20, 22, 25, 0.98);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.35);
    z-index: 9999; /* above everything else */
    pointer-events: auto;
}
.participant .participant-controls.open .more-menu { display: block; }
.participant .participant-controls .more-menu .btn { width: 100%; text-align: left; margin: 4px 0; }
/* Legacy dark/gradient theme (opt-in): add class "legacy-theme" on <body> to enable */
body.legacy-theme {
    --background-start: #232526;
    --background-end: #414345;
    --panel-bg: rgba(255, 255, 255, 0.05);
    --text-color: #f0f0f0;
    --text-muted: #a0a0a0;
    --primary-start: #00c6ff;
    --primary-end: #0072ff;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --success-color: #2ecc71;
    --border-color: rgba(255, 255, 255, 0.1);
    --local-user-color: #0072ff; /* Bleu pour l'utilisateur local */
    --remote-user-color: #2ecc71; /* Vert pour l'utilisateur distant */

    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    text-align: center;
    min-height: 100vh;
}

body.legacy-theme main {
    padding: 4px;
    padding-top: 32px;
    margin: 4px;
    background-color: rgba(255, 255, 255, 0.05);
}

.main-panel {
    width: 100%;
    max-width: 600px;
    margin: 20px;
    padding: 3rem;
    background: var(--panel-bg);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.screens-wrapper {
    position: relative;
    min-height: 350px; /* Give it a fixed height to avoid layout shifts */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

h1 {
    font-weight: 600;
    color: var(--text-color);
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.lead {
    color: var(--text-muted);
}

.screen { display: none; width: 100%; }
.screen.active { display: block; position: relative; }

body.legacy-theme .btn {
    border: none;
    border-radius: 12px;
    font-weight: 600;
    padding: 14px 35px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

body.legacy-theme .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

body.legacy-theme .btn-primary {
    background-image: linear-gradient(to right, #198754, #00ff8f);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 150, 255, 0.2);
    border-radius: 32px;
}

body.legacy-theme .form-control {
    background-color: rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
}
body.legacy-theme .form-control::placeholder { color: var(--text-muted); }
body.legacy-theme .form-control:focus {
    background-color: rgba(0,0,0,0.3);
    color: var(--text-color);
    border-color: var(--primary-start);
    box-shadow: 0 0 0 0.25rem rgba(0, 198, 255, 0.2);
}

#shareable-link { font-size: 1.1rem; }

#copy-link-btn {
    background-image: linear-gradient(to right, var(--primary-start), var(--primary-end));
    border: none;
    color: white;
}

#waiting-message .spinner-border { color: var(--primary-start); }

.controls .btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    font-size: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: normal;
}

.controls { position: relative; z-index: 1200; }

:root {
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --success-color: #198754;
}

.btn-danger { background-color: var(--danger-color); }
.btn-warning { background-color: var(--warning-color); }

#call-screen.screen.active {
    min-height: calc(100vh - 100px);
    padding: 1.5rem 0 2rem;
    background: #0d1b2a;
}

/* New Avatar Display Styles — Minimaliste Dark */
.participants-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    width: 100%;
}

.participant {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Make participant name readable under avatar */
.participant .participant-name {
    position: relative;
    margin-top: 12px;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.8);
    z-index: 2;
    font-size: 14px;
    font-weight: 500;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    border: 3px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0;
    transition: all 0.3s ease;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
}

#local-avatar {
    border-color: rgba(59,130,246,0.4);
    box-shadow: 0 0 25px rgba(59,130,246,0.15);
}

.avatar.muted {
    border-color: rgba(239,68,68,0.4) !important;
    box-shadow: 0 0 25px rgba(239,68,68,0.15);
}

.participant-name {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255,255,255,0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

#local-username {
    color: rgba(255,255,255,0.9);
}

.participant-separator {
    font-size: 1.5rem;
    color: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.06);
}

.participant-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 5px;
    text-transform: uppercase;
    font-weight: 600;
}

#call-status {
    color: var(--success-color);
    font-weight: 600;
}

/* Listening mode indicator for collabo channels — Minimaliste Dark */
.listening-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 20px;
    background: rgba(34,197,94,0.08);
    border: 1px solid rgba(34,197,94,0.15);
    border-radius: 100px;
    margin: 16px auto 0;
    max-width: fit-content;
}

.listening-indicator .pulse-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: listening-pulse 2s infinite;
    flex-shrink: 0;
    box-shadow: 0 0 8px rgba(34,197,94,0.5);
}

@keyframes listening-pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

.listening-indicator .listening-text {
    font-size: 13px;
    color: #4ade80;
    font-weight: 500;
}

.notification-panel {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 2000;
    width: 350px;
    max-width: 90%;
    background-color: rgba(24,24,27,0.95);
    color: rgba(255,255,255,0.9);
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(20px);
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
    visibility: hidden;
    pointer-events: none;
}

.notification-panel.show {
    opacity: 1;
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
}

/* Combiné raccroché : combiné pivoté à 135° (convention téléphone) */
.wc-hangup-icon { display: inline-block; transform: rotate(135deg); }
/* Décrocher vibrant façon vrai téléphone (panneau d'appel entrant) */
.notification-panel.show #accept-call-btn { animation: wc-answer-ring 1.2s ease-in-out infinite; }
@keyframes wc-answer-ring {
    0%, 100% { transform: scale(1) rotate(0deg); box-shadow: 0 0 0 0 rgba(25,135,84,.55); }
    15% { transform: scale(1.1) rotate(-8deg); }
    30% { transform: scale(1.1) rotate(8deg); }
    45% { transform: scale(1.12) rotate(-6deg); box-shadow: 0 0 0 14px rgba(25,135,84,0); }
    60% { transform: scale(1.12) rotate(6deg); }
    75% { transform: scale(1.05) rotate(0deg); }
}
@media (prefers-reduced-motion: reduce) {
    .notification-panel.show #accept-call-btn { animation: none; }
}

/* Animation */
@keyframes participant-pop-in {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.screen.active .participant {
    opacity: 0; /* Set initial state for animation */
    animation: participant-pop-in 0.5s ease-out forwards;
}

.screen.active .participant:nth-child(1) {
    animation-delay: 0.2s;
}

.screen.active .participant:nth-child(3) {
    animation-delay: 0.4s;
}

@media (max-width: 576px) {
    .main-panel { padding: 2rem 1.5rem; }
    h1 { font-size: 1rem; }
    .controls .btn { width: 60px; height: 60px; font-size: 1.2rem; }
    .avatar { width: 90px; height: 90px; font-size: 2rem; border-width: 3px; }
    .participant-name { font-size: 1rem; }
    /* Prevent the primary action from wrapping and reduce size */
    #initial-screen #create-call-btn {
        font-size: 0.95rem;
        padding: 0.6rem 1rem;
        line-height: 1;
        white-space: nowrap;
        display: inline-flex;
    }
    #initial-screen #create-call-btn i { font-size: 1rem; margin-right: 0.35rem; }
    #initial-screen #create-call-btn .btn-label { display: inline-block; }
    .participant-separator { margin: 0 1rem; padding-top: 25px; }
}


/* ---- Video Layout & Styling ------------------------------------------------ */

/* Aperçu caméra locale : intégré à #local-avatar (l'ancien PiP flottant est retiré).
   La vidéo vit DANS le cercle de l'avatar — plus aucun conflit de calques avec la
   barre de contrôle ni la bannière "rappelez". */
#call-screen #local-avatar,
#local-avatar {
    position: relative;
    overflow: hidden; /* clip circulaire de la vidéo (surcharge du overflow:visible du thème sombre) */
}

/* Wrapper avatar + badges : les badges (mute/speaking/flip) vivent HORS du cercle
   clippé — ils chevauchent le bord sans jamais être éclipsés. */
.avatar-wrap {
    position: relative;
    display: inline-block;
    line-height: 0;
}

#local-avatar #local-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #000;
    object-fit: cover;
    display: none; /* affiché via .has-video */
}

#local-avatar.has-video #local-video { display: block; }

/* Masquer initiales / icône mic quand la vidéo occupe l'avatar */
#local-avatar.has-video .avatar-initials,
#local-avatar.has-video > i.bi { display: none; }

/* Bouton inverser la caméra : chevauche le bord haut-droit du cercle */
.camera-flip-overlay {
    position: absolute;
    top: -4px;
    right: -4px;
    z-index: 12;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.85rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    transition: background 0.15s ease, transform 0.1s ease;
}

.camera-flip-overlay:hover { background: rgba(0, 0, 0, 0.75); }
.camera-flip-overlay:active { transform: scale(0.92); }

/* Remote participant video tiles appended inside .participant */

/* Embed remote video inside avatar to keep a compact tile */
.participant .avatar { position: relative; overflow: hidden; }
.participant .avatar video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: none; /* shown when stream arrives */
}

/* Mute badge overlay on avatar */
.participant .avatar-wrap .mute-badge {
    position: absolute;
    right: -6px;
    bottom: -6px;
    background: rgba(255, 0, 0, 0.2);
    color: red;
    border-radius: 999px;
    width: 40px;
    height: 40px;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.35);
    border: 2px solid rgba(255, 0, 0, 0.2);
    font-size: 16px;
    z-index: 3;
}
.participant.muted .mute-badge { display: inline-flex; background: #ef4444 !important; border-color: rgba(255,255,255,0.3) !important; color: #fff; }

/* Muted state: subtle red glow around avatar */
.participant.muted .avatar {
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.9), 0 0 24px rgba(231, 76, 60, 0.45);
}

/* Local avatar is clickable to toggle self-mute */
#local-avatar { cursor: pointer; }

/* Held state: show a pause overlay */
.participant.held .avatar::after {
    content: "\f4c2"; /* bootstrap icon pause-fill (approx with fallback square) */
    font-family: bootstrap-icons, sans-serif;
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(0,0,0,0.45);
    font-size: 28px;
}

/* When a participant has video, show it inside the avatar */
.participant.has-video .avatar video { display: block; }

/* Remove circular mask in fullscreen */
video:fullscreen,
video:-webkit-full-screen,
video:-ms-fullscreen {
    border-radius: 0 !important;
    object-fit: contain !important;
    background: #000 !important;
}

/* Pinned video container */
.pinned-container {
    width: 100%;
    max-width: 980px;
    margin: 0 auto 20px auto;
    padding: 8px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 14px 48px rgba(0,0,0,0.35);
}

.pinned-container > video {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    background: #000;
    object-fit: cover;
}

.pinned-meta { padding: 6px 4px 0; }

@media (max-width: 576px) {
    .participants-container {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 12px;
    }
}

/* (L'ancien PiP local était repositionné ici sur mobile — supprimé :
   l'aperçu vit désormais dans #local-avatar, déjà responsive.) */

/* Participant controls: improve visibility and touch targets */
.participant .participant-controls { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; justify-content: center; }
.participant .participant-controls .btn { padding: 6px 10px; border-radius: 8px; font-size: 0.85rem; min-width: 36px; min-height: 36px; }

/* Options Modal */
.options-modal { position: fixed; inset: 0; z-index: 12000; display: none; }
.options-modal.show { display: block; }
.options-modal .options-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.55); backdrop-filter: blur(2px); }
.options-modal .options-dialog { position: relative; max-width: 360px; margin: 10vh auto; background: #1f2226; color: #f8f9fa; border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); overflow: hidden; }
.options-modal .options-header { padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.options-modal .options-body { padding: 12px 14px; display: grid; gap: 8px; }
.options-modal .options-body .btn { width: 100%; justify-content: flex-start; }
.avatar.small { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.05); }

header p{
    font-size: 8px;
    color: var(--text-muted);
}
header figcaption{
    font-size: small;
    color: rgba(20, 83, 154, 1);
    
}
header figcaption sup{
    color: rgba(20, 83, 154, 1);
    margin-left: -32px;
    top: -12px;
}
header figcaption small{
    font-size: 8px;
    color: var(--text-muted);
}
a {
    text-decoration: none;
    color: inherit;

}

header {
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1rem;
    color: var(--text-muted);
}

header figure {
    margin-bottom: 1rem;
}

header img {
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Responsive header */
@media (max-width: 576px) {
    header h1 {
        font-size: 1.5rem;
    }

    header p {
        font-size: 0.9rem;
    }
}

/* Button icon-only state */
.btn.icon-only .btn-label {
    display: none;
}
.btn.icon-only i {
    margin-right: 0 !important;
}

/* --- Notification Panel --- */
.notification-panel {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 320px;
    background: #2c3e50;
    border: 1px solid #34495e;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 1050;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.notification-panel.show {
    transform: translateX(0);
}

.notification-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #34495e;
}

.notification-header .icon {
    font-size: 1.25rem;
    margin-right: 12px;
    color: #3498db;
}

.notification-body {
    padding: 16px;
    font-size: 0.95rem;
}

.notification-footer {
    padding: 12px 16px;
    background-color: rgba(255, 255, 255, 0.04);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    z-index: 10;
}

/* --- On Hold Notification --- */
#on-hold-notification {
    background-color: #f39c12;
    color: #fff;
    border-color: #e67e22;
}

#on-hold-notification .notification-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

#on-hold-notification .icon {
    color: #fff;
}

#on-hold-notification strong {
    font-weight: 600;
}

/* --- Unmute Request Notification --- */
#unmute-request-notification .icon {
    color: #2ecc71;
}

/* --- Join Request Notification --- */
#join-request-notification .icon {
    color: #9b59b6;
}

/* --- Options Modal --- */
.options-modal {
    position: fixed;
    inset: 0;
    z-index: 1060;
    display: none;
    align-items: center;
    justify-content: center;
}

.options-modal.show {
    display: flex;
}

.options-backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.options-dialog {
    position: relative;
    width: 90%;
    max-width: 340px;
    background-color: #2c3e50;
    border-radius: 14px;
    border: 1px solid #34495e;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.options-header {
    padding: 12px 16px;
    border-bottom: 1px solid #34495e;
}

.options-body {
    padding: 16px;
}

.options-body .btn {
    width: 100%;
    margin-bottom: 8px;
    justify-content: flex-start;
}

.options-body .btn:last-child {
    margin-bottom: 0;
}

.avatar.small {
    width: 32px;
    height: 32px;
    font-size: 1rem;
}

/* --- Participant Controls --- */
.participant-controls {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 5;
}

.more-btn {
    background-color: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.more-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 180px;
    background-color: #2c3e50;
    border-radius: 8px;
    border: 1px solid #34495e;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    padding: 8px;
    display: none;
}

.participant-controls.open .more-menu {
    display: block;
}

.more-menu .btn {
    width: 100%;
    text-align: left;
    margin-bottom: 4px;
}

.more-menu .btn:last-child {
    margin-bottom: 0;
}

/* --- Pinned Container --- */
.pinned-container {
    margin-bottom: 24px;
}

.pinned-meta {
    padding-top: 8px;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .participants-container {
        grid-template-columns: 1fr;
    }

    
}

@media (max-width: 576px) {
    .notification-panel {
        width: calc(100% - 40px);
    }
}
.no-border {
    border: 0 !important;
}
.rotated-icon {
    transform: rotate(135deg);
}

/* Chat Modal Styles */
.chat-modal {
    position: fixed;
    inset: 0;
    z-index: 11000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.chat-modal.show {
    display: flex;
}

.chat-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(2px);
}

#chat-container {
    position: relative;
    background: #1f2226;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 0;
    max-width: 600px;
    width: 100%;
    display: flex;
    flex-direction: column;
    height: 80vh;
    max-height: 700px;
    margin: auto;
}

/* Clavier DTMF façon vrai téléphone */
.chat-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 16px;
    margin-bottom: 0;
    text-align: left;
    flex-shrink: 0;
}

.chat-header h5 {
    margin: 0;
    color: #fff;
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 16px;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.chat-message {
    margin-bottom: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    max-width: 80%;
    word-wrap: break-word;
    text-align: left;
}

.chat-message.self {
    align-self: flex-end;
    color: #fff;
}

.chat-message.other {
    align-self: flex-start;
    color: #fff;
}

.chat-message .sender-name {
    font-weight: bold;
    margin-bottom: 4px;
    display: block;
}

/* Animation pour les nouveaux messages entrants */
.message-appear {
    animation: message-slide-in 0.5s ease-out;
}

@keyframes message-slide-in {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.chat-input-area {
    display: flex;
    gap: 10px;
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.chat-input-area .form-control {
    flex-grow: 1;
    border-radius: 8px;
}

.chat-input-area .btn {
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 1rem;
}

#chat-toggle-btn {
    position: relative;
}

#chat-toggle-btn .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    padding: 5px;
    border-radius: 50%;
    background-color: red;
    color: white;
    font-size: 10px;
    display: none; /* Initially hidden */
}

/* Animation de bounce pour les notifications de chat */
@keyframes chat-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.chat-notification-bounce {
    animation: chat-bounce 1s ease-in-out infinite;
}

/* Animation plus subtile pour les nouveaux messages */
@keyframes message-highlight {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(52, 152, 219, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0);
    }
}

.message-notification-pulse {
    animation: message-highlight 0.8s ease-in-out;
}

/* --- Modern CTA Waiting Screen Styles --- */
.online-status-container {
    min-height: calc(100vh - 192px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 18% 18%, rgba(16, 54, 91, 0.20), transparent 28%),
        radial-gradient(circle at 82% 28%, rgba(30, 64, 175, 0.18), transparent 30%),
        linear-gradient(135deg, #f8fafc 0%, #eef4fb 48%, #e2e8f0 100%);
}

.online-status-container::before,
.online-status-container::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    opacity: 0.55;
    pointer-events: none;
}

.online-status-container::before {
    width: 280px;
    height: 280px;
    left: -90px;
    bottom: -110px;
    background: rgba(16, 54, 91, 0.16);
}

.online-status-container::after {
    width: 220px;
    height: 220px;
    right: -70px;
    top: 80px;
    background: rgba(30, 64, 175, 0.14);
}

.waiting-cta-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background:
        radial-gradient(circle at 20% 20%, rgba(16, 54, 91, 0.18), transparent 28%),
        radial-gradient(circle at 80% 30%, rgba(30, 64, 175, 0.16), transparent 30%),
        linear-gradient(135deg, #f8fafc 0%, #eef4fb 100%);
    color: #334155;
}

.online-header,
.waiting-cta-header {
    position: relative;
    z-index: 1;
    text-align: center;
}

.online-icon {
    width: 86px;
    height: 86px;
    margin: 0 auto 1rem;
    border-radius: 28px;
    background: var(--primary-gradient);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 18px 40px rgba(16, 54, 91, 0.24);
}

.online-icon i {
    font-size: 2.4rem;
}

.online-icon::after {
    content: '';
    position: absolute;
    top: -5px;
    right: -5px;
    width: 15px;
    height: 15px;
    background: #10b981;
    border: 2px solid white;
    border-radius: 50%;
    animation: online-pulse 2s infinite;
}

.online-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.online-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
}

.channel-pill {
    margin: 1rem auto 0;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    background: rgba(16, 54, 91, 0.10);
    border: 1px solid rgba(16, 54, 91, 0.16);
    color: var(--primary-color);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    box-shadow: 0 10px 24px rgba(16, 54, 91, 0.08);
}

.online-content {
    width: 100%;
    max-width: 500px;
}

.online-animation {
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
}

.online-circle {
    position: relative;
    width: 92px;
    height: 92px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 18px 44px rgba(16, 54, 91, 0.28);
}

.online-circle i {
    font-size: 2.25rem;
    color: #fff;
}

.online-indicator {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 20px;
    height: 20px;
    background: #10b981;
    border: 3px solid white;
    border-radius: 50%;
    animation: online-pulse 2s infinite;
}

.room-info {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
    width: 100%;
    max-width: 560px;
    margin-top: 2rem;
}

.info-item {
    min-height: 86px;
    padding: 1rem;
    border-radius: 18px;
    background: rgba(16, 54, 91, 0.07);
    border: 1px solid rgba(16, 54, 91, 0.10);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
}

.info-item i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.info-item span {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.86rem;
    text-align: center;
}

.online-footer {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-top: 1.2rem;
}

.online-footer .footer-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(255,255,255,0.72);
    box-shadow: 0 10px 28px rgba(16, 54, 91, 0.10);
    color: var(--primary-color);
    font-weight: 600;
}

/* Animations pour l'écran online */
@keyframes online-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

/* Responsive Design pour l'écran online */
@media (max-width: 768px) {
    .online-status-container {
        padding: 1rem;
    }

    .online-title {
        font-size: 1.75rem;
    }

    .online-icon {
        font-size: 2.5rem;
    }

    .room-info {
        gap: 1rem;
    }

    .room-info .info-item {
        min-width: 100px;
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .online-status-container {
        padding: 0.5rem;
    }

    .online-header {
        margin-bottom: 2rem;
    }

    .online-title {
        font-size: 1.5rem;
    }

    .online-subtitle {
        font-size: 0.9rem;
    }

    .online-circle {
        width: 70px;
        height: 70px;
    }

    .online-circle i {
        font-size: 1.8rem;
    }

    .room-info {
        flex-direction: column;
        align-items: center;
    }
}

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

.cta-icon {
    width: 76px;
    height: 76px;
    border-radius: 24px;
    background: var(--primary-gradient);
    color: #fff;
    margin: 0 auto 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 18px 40px rgba(16, 54, 91, 0.24);
}

.cta-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.cta-subtitle {
    font-size: 1rem;
    opacity: 0.7;
    margin: 0;
}

.waiting-cta-content {
    width: 100%;
    max-width: 500px;
}

.status-card {
    position: relative;
    z-index: 1;
    background: rgba(255,255,255,0.82);
    border: 1px solid rgba(255,255,255,0.72);
    border-radius: 28px;
    box-shadow: 0 24px 70px rgba(16, 54, 91, 0.16);
    backdrop-filter: blur(18px);
    padding: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
}

.waiting-animation {
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
}

.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    border: 2px solid rgba(16, 54, 91, 0.16);
    border-radius: 50%;
    animation: pulse-ring-animation 2s infinite;
}

.pulse-ring-delay {
    animation-delay: 1s;
}

.waiting-circle {
    position: relative;
    width: 76px;
    height: 76px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 14px 34px rgba(16, 54, 91, 0.26);
}

.waiting-circle i {
    font-size: 1.8rem;
    color: white;
}

.status-message h3 {
    font-size: 1.45rem;
    font-weight: 800;
    margin-bottom: 0.55rem;
    color: var(--primary-color);
}

.status-text {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

.status-text {
    color: #64748b;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

.progress-container {
    margin: 1.5rem 0;
}

.progress-bar {
    width: 200px;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    margin: 0 auto 0.5rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    border-radius: 2px;
    animation: progress-animation 2s ease-in-out infinite;
}

.progress-text {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
}

.action-section {
    margin-top: 2rem;
}

.cancel-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.cancel-btn:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.3);
}

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

.info-section {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    min-width: 120px;
    transition: all 0.3s ease;
}

.info-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.info-item i {
    font-size: 1.5rem;
    color: #3b82f6;
}

.info-item span {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
    text-align: center;
}

.waiting-cta-footer {
    text-align: center;
    margin-top: 2rem;
}

.footer-text {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Animations */
@keyframes pulse-ring-animation {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.4);
        opacity: 0;
    }
}

@keyframes progress-animation {
    0% {
        width: 0%;
    }
    50% {
        width: 70%;
    }
    100% {
        width: 100%;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .waiting-cta-container {
        padding: 1rem;
    }

    .cta-title {
        font-size: 1.75rem;
    }

    .cta-icon {
        font-size: 2.5rem;
    }

    .status-card {
        padding: 2rem;
    }

    .info-section {
        gap: 1rem;
    }

    .info-item {
        min-width: 100px;
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .waiting-cta-container {
        padding: 0.5rem;
    }

    .waiting-cta-header {
        margin-bottom: 2rem;
    }

    .cta-title {
        font-size: 1.5rem;
    }

    .cta-subtitle {
        font-size: 0.9rem;
    }

    .status-card {
        padding: 1.5rem;
    }

    .waiting-circle {
        width: 60px;
        height: 60px;
    }

    .waiting-circle i {
        font-size: 1.5rem;
    }

    .pulse-ring {
        width: 90px;
        height: 90px;
    }

    .progress-bar {
        width: 150px;
    }

    .info-section {
        flex-direction: column;
        align-items: center;
    }
}

@keyframes phone-hangup {
    0% {
        transform: translateY(0) rotate(0deg) scale(1);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
    50% {
        transform: translateY(-8px) rotate(15deg) scale(1.1);
        box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
    }
    100% {
        transform: translateY(4px) rotate(5deg) scale(0.95);
        box-shadow: 0 2px 10px rgba(231, 76, 60, 0.2);
    }
}

@keyframes phone-shake {
    0%, 100% {
        transform: translateX(0) rotate(0deg);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-3px) rotate(-2deg);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(3px) rotate(2deg);
    }
}

@keyframes phone-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(52, 152, 219, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0);
    }
}

@keyframes phone-vibrate {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-2px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(2px);
    }
}

.phone-vibrate-animation {
    animation: phone-vibrate 0.5s ease-in-out infinite;
}

/* Animation classes for buttons */
.phone-pickup-animation {
    animation: phone-pickup 0.6s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

.phone-hangup-animation {
    animation: phone-hangup 0.6s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

.phone-shake-animation {
    animation: phone-shake 0.5s ease-in-out;
}

.phone-pulse-animation {
    animation: phone-pulse 2s infinite;
}

.phone-ring-animation {
    animation: phone-ring 1.5s ease-in-out infinite;
}

/* Enhanced notification button styles */
.notification-footer .btn {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    padding: 0;
    margin: 0 5px;
    z-index: 10;
    cursor: pointer;
    pointer-events: auto;
    border: none;
}

.notification-footer .btn-success {
    background: #27ae60 !important;
    color: #fff !important;
}

.notification-footer .btn-success:hover {
    background: #219a52 !important;
    transform: scale(1.08);
}

.notification-footer .btn-danger {
    background: #e74c3c !important;
    color: #fff !important;
}

.notification-footer .btn-danger:hover {
    background: #c0392b !important;
    transform: scale(1.08);
}

.notification-footer .btn i {
    position: relative;
    z-index: 1;
    font-size: 1.2rem;
    color: #fff !important;
}

.notification-footer .btn:hover i {
    transform: scale(1.1);
}

.notification-footer .btn:active {
    transform: scale(0.95);
}

/* "Plus d'infos" text — readable on dark panel */
.notification-panel details summary,
.notification-panel details summary.text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

.notification-panel details summary:hover {
    color: rgba(255, 255, 255, 0.85) !important;
}

.notification-panel details[open] summary {
    margin-bottom: 8px;
}

/* Notification body strong/label readability on dark panel */
.notification-panel .notification-body strong,
.notification-panel .notification-body label {
    color: rgba(255, 255, 255, 0.85);
}

.notification-panel .notification-body .text-muted {
    color: rgba(255, 255, 255, 0.5) !important;
}

.notification-panel .notification-body .text-warning {
    color: #f0ad4e !important;
}

/* Ring animation for incoming calls */
.notification-panel.show .notification-footer .btn-success {
    animation: phone-ring-animation 2s ease-in-out infinite;
}

.notification-panel.show .notification-footer .btn-danger {
    animation: phone-ring-animation 2s ease-in-out infinite 0.5s;
}

/* Enhanced button styles with ripple effect */
.notification-footer .btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Ring pulse effect for active notifications */
.notification-panel.show {
    animation: notification-pulse 2s ease-in-out infinite;
}

@keyframes notification-pulse {
    0%, 100% {
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow: 0 8px 24px rgba(155, 89, 182, 0.4), 0 0 0 8px rgba(155, 89, 182, 0.2);
    }
}

/* Auth Screen Styles */
#auth-screen .card {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

#auth-screen .nav-tabs .nav-link {
    color: var(--text-muted);
    background: none;
    border-color: transparent;
}

#auth-screen .nav-tabs .nav-link.active {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.1);
    border-color: transparent;
}

#auth-screen .form-label {
    text-align: left;
    width: 100%;
}

#auth-screen .form-control {
    text-align: left;
}

.logout-button {
  background: transparent;
  color: #e5e7eb;
  border: none;
  border-radius: 8px;
  padding: 10px 4px;
  font-weight: 600;
  letter-spacing: 0.2px;
  transition: color 0.2s ease, transform 0.15s ease;
  display: inline-flex;
  align-items: center;
}

.logout-button i { margin-right: 8px; opacity: 0.8; transition: opacity 0.2s ease; }

.logout-button:hover,
.logout-button:focus {
  color: #dc3545;
  text-decoration: underline;
}

.logout-button:hover i,
.logout-button:focus i { opacity: 1; }

.logout-button:active { transform: translateY(1px); }

@media (max-width: 576px) {
  .logout-button { padding: 8px 14px; font-size: 0.95rem; }
  .logout-button i { margin-right: 6px; }
}

/* ---------------- Initial Connected Screen (Home) ---------------- */
#initial-screen {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 14px 48px rgba(0,0,0,0.25);
}

.screen.active#initial-screen { position: relative; }

#initial-screen .form-label { color: var(--text-muted); font-weight: 500; letter-spacing: 0.2px; }

/* Slightly widen the name field container beyond inline max-width */
#initial-screen > .mb-4.mx-auto[style*="max-width: 300px"] {
  max-width: 420px !important;
}

/* Primary CTA styling reinforcement */
#initial-screen #create-call-btn {
  border-radius: 999px;
  padding: 14px 24px;
  font-size: 1.05rem;
  box-shadow: 0 8px 24px rgba(0, 255, 143, 0.28);
  background-image: linear-gradient(135deg, #1db954, #10d78a);
  border: 1px solid rgba(16, 215, 138, 0.3);
}

#initial-screen #create-call-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(16, 215, 138, 0.35);
}

/* Actions layout */
#initial-screen #create-call-btn { margin-right: 12px; }
#initial-screen #logout-btn {
    margin-top: 0 !important;
    vertical-align: middle;
    padding: 6px 8px;
}

/* On small screens, full width for comfort */
@media (max-width: 575.98px) {
  /*#initial-screen #create-call-btn,
  #initial-screen #logout-btn { width: 100%; }*/
}

/* Force visibility over Bootstrap secondary styles inside initial screen */
#initial-screen #logout-btn {
  background: transparent !important;
  border: none !important;
  color: #f87171 !important; /* soft red for visibility */
}

#initial-screen #logout-btn:hover,
#initial-screen #logout-btn:focus {
  background: #dc3545 !important;
  color: #fff !important;
  text-decoration: none;
}

/* Icon-only behavior on very small devices */
@media (max-width: 380px) {
  #initial-screen #logout-btn .btn-label { display: none; }
}

/* Subtle separator spacing tuning */
#initial-screen hr { border-color: rgba(255,255,255,0.08); }

/* ---------------- Long lists: Channels + History ---------------- */
#my-channels-section,
#call-history-section {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 10px;
}

/* Make sections scroll internally on overflow */
#my-channels-section,
#call-history-section {
  max-height: 360px;
  overflow: auto;
}

/* Sticky titles and controls inside their scroll containers */
#my-channels-section > h5,
#call-history-section > h5,
#call-history-section #call-history-controls {
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(to bottom, rgba(31,34,38,0.95) 70%, rgba(31,34,38,0));
  padding-top: 6px;
}

/* Add small gap under sticky header */
#call-history-section #call-history-controls { top: 38px; background: rgba(31,34,38,0.85); padding: 6px; border-radius: 10px; }

/* Ensure lists don't add outer spacing */
#my-channels-list,
#call-history-list { margin-bottom: 0; }

/* Compact list items (Bootstrap list-group) if present */
.list-group .list-group-item { padding: 8px 10px; }

@media (max-width: 576px) {
  #my-channels-section,
  #call-history-section { max-height: 300px; }
}

/* ---------------- Mobile Tabs (Channels / History) ---------------- */
.mobile-tabs { display: flex; gap: 8px; margin: 10px auto 12px; max-width: 720px; }
.mobile-tabs .tab-btn {
  flex: 1 1 0;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #e5e7eb;
  padding: 8px 12px;
  font-weight: 600;
}
.mobile-tabs .tab-btn.active { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.22); }

/* tabs visible on all sizes now */

/* ---------------- Small mobile visibility for controls ---------------- */
@media (max-width: 576px) {
  /* Stack controls vertically and make them full-width */
  #call-history-controls,
  .channels-controls {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 8px;
  }
  /* Increase contrast and touch target sizes */
  #call-history-controls .form-select,
  #call-history-controls .form-control,
  .channels-controls .form-control {
    background: rgba(0,0,0,0.35);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.95rem;
  }
  #call-history-controls .form-control::placeholder,
  .channels-controls .form-control::placeholder { color: rgba(255,255,255,0.75); }

  #call-history-controls .btn,
  .channels-controls .btn {
    width: 100%;
    border-radius: 10px;
    padding: 10px 12px;
  }

  /* Ensure sticky area is clearly readable */
  #call-history-section > h5 {
    background: rgba(31,34,38,0.95);
    padding: 6px 4px;
    border-radius: 8px;
  }
}

/* ================= HISTORY PAGE STYLES ================= */
.history-header {
    background: var(--primary-gradient);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    color: white;
}

.history-header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    transition: transform 0.2s, background 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.25);
}

.stat-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.history-controls-card,
.history-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.history-controls-card {
    padding: 1rem 1.25rem;
}

.history-card .card-header {
    background: #f8fafc;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-card .card-body {
    padding: 0;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
    color: #64748b;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: #64748b;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.alert-custom {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    color: #92400e;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.list-group-item {
    padding: 1rem 1.25rem;
    border-color: #e2e8f0;
}

.list-group-item:hover {
    background: #f8fafc;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ================= FEEDBACK MODAL ================= */
.feedback-modal {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.feedback-modal.show {
    display: flex;
}

.feedback-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

.feedback-dialog {
    position: relative;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: feedback-slide-in 0.3s ease-out;
}

.feedback-dialog-small {
    max-width: 400px;
}

@keyframes feedback-slide-in {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.feedback-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    border-radius: 20px 20px 0 0;
    color: #fff;
}

.feedback-header h5 {
    font-weight: 600;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
}

.feedback-header i {
    color: #ffc107;
}

.btn-close-feedback {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-close-feedback:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.feedback-body {
    padding: 24px;
}

.feedback-subtitle {
    text-align: center;
    color: #6b7280;
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.feedback-criteria {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
}

.criterion {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.criterion-label {
    font-weight: 600;
    color: #374151;
    font-size: 0.95rem;
}

.star-rating {
    display: flex;
    gap: 8px;
}

.star-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    transition: transform 0.15s ease;
    touch-action: manipulation;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.star-btn:hover {
    transform: scale(1.2);
}

.star-btn:active {
    transform: scale(0.95);
}

.star-btn i {
    font-size: 1.75rem;
    color: #d1d5db;
    transition: color 0.2s ease;
}

.star-btn i.bi-star-fill {
    color: #ffc107;
}

.star-btn.hovered i {
    color: #ff9800;
}

.star-btn.selected i {
    color: #ffc107;
}

/* Summary screen star rating */
.star-rating-summary {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.star-btn-summary {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    transition: transform 0.15s ease;
    touch-action: manipulation;
    min-width: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.star-btn-summary:hover {
    transform: scale(1.25);
    background: rgba(255, 193, 7, 0.1);
}

.star-btn-summary:active {
    transform: scale(0.95);
}

.star-btn-summary i {
    font-size: 2rem;
    color: #d1d5db;
    transition: color 0.2s ease;
}

.star-btn-summary i.bi-star-fill {
    color: #ffc107;
}

.star-btn-summary.hovered i {
    color: #ff9800;
}

.star-btn-summary.selected i {
    color: #ffc107;
}

.star-btn-summary.selected {
    animation: star-pop 0.3s ease-out;
}

@keyframes star-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Responsive summary stars */
@media (max-width: 576px) {
    .star-rating-summary {
        gap: 8px;
    }
    .star-btn-summary {
        min-width: 40px;
        min-height: 40px;
        padding: 4px;
    }
    .star-btn-summary i {
        font-size: 1.6rem;
    }
}

@media (max-width: 390px) {
    .star-rating-summary {
        gap: 4px;
    }
    .star-btn-summary {
        min-width: 36px;
        min-height: 36px;
    }
    .star-btn-summary i {
        font-size: 1.4rem;
    }
}

.feedback-comment-section {
    margin-bottom: 20px;
}

.feedback-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 0.95rem;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.feedback-textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

.feedback-textarea::placeholder {
    color: #9ca3af;
}

.feedback-message {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.feedback-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.feedback-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

.feedback-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.feedback-actions .btn {
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

#feedback-submit-btn {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    border: none;
}

#feedback-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3);
}

#feedback-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#feedback-later-btn {
    border: 2px solid #e5e7eb;
    color: #6b7280;
    background: #fff;
}

#feedback-later-btn:hover {
    border-color: #d1d5db;
    background: #f9fafb;
}

.feedback-thank-you {
    position: fixed;
    inset: 0;
    z-index: 12001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.feedback-thank-you.show {
    display: flex;
}

/* Mobile responsive for feedback modal */
@media (max-width: 576px) {
    .feedback-dialog {
        max-width: 100%;
        max-height: 95vh;
        margin: 10px;
    }
    
    .feedback-header {
        padding: 16px 20px;
    }
    
    .feedback-header h5 {
        font-size: 1.1rem;
    }
    
    .feedback-body {
        padding: 20px 16px;
    }
    
    .star-btn {
        min-width: 40px;
        min-height: 40px;
    }
    
    .star-btn i {
        font-size: 1.5rem;
    }
    
    .feedback-actions {
        flex-direction: column;
    }
    
    .feedback-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .criterion-label {
        font-size: 0.9rem;
    }
}

@media (max-width: 390px) {
    .form-step-actions {
        flex-direction: column;
    }
    .form-step-actions .form-step-btn-back {
        width: 100%;
        padding: 10px;
    }
    .form-step-actions .client-form-btn:last-child {
        width: 100%;
    }
    .form-step-actions .client-form-btn {
        font-size: 13px;
        padding: 10px 8px;
    }
    .star-rating {
        gap: 4px;
    }
    
    .star-btn {
        min-width: 36px;
        min-height: 36px;
    }
    
    .star-btn i {
        font-size: 1.3rem;
    }
}

/* Animation pour les étoiles sélectionnées */
.star-btn.selected {
    animation: star-pop 0.3s ease-out;
}

@keyframes star-pop {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
    }
}

/* ================= CALL SUMMARY SCREEN ================= */
.call-summary-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: #334155;
    text-align: center;
}

.call-summary-header {
    margin-bottom: 2rem;
}

.summary-icon {
    font-size: 4rem;
    color: #10b981;
    margin-bottom: 1rem;
    animation: checkmark-bounce 0.6s ease-out;
}

@keyframes checkmark-bounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.summary-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #1e293b, #475569);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.summary-subtitle {
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 0;
}

.call-summary-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.summary-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 500px;
    width: 100%;
}

.summary-message h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
}

.courtesy-message {
    font-size: 1rem;
    line-height: 1.6;
    color: #64748b;
    margin-bottom: 2rem;
}

.call-duration-summary {
    background: #f1f5f9;
    border-radius: 12px;
    padding: 1rem;
    margin: 1.5rem 0;
    border-left: 4px solid #10b981;
}

.duration-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 500;
    color: #374151;
}

.duration-info i {
    color: #10b981;
    font-size: 1.2rem;
}

.thank-you-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.thank-you-icon {
    font-size: 2.5rem;
    color: #ef4444;
    margin-bottom: 1rem;
    animation: heart-pulse 2s ease-in-out infinite;
}

@keyframes heart-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1); }
}

.thank-you-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: #374151;
    font-style: italic;
}

.call-summary-footer {
    margin-top: 2rem;
    padding-bottom: 2rem;
}

.close-window-button {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border: none;
    border-radius: 50px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.close-window-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, #2563eb, #1e40af);
}

.close-window-button:active {
    transform: translateY(0);
}

.close-window-button i {
    font-size: 1.2rem;
}

.footer-note {
    font-size: 0.9rem;
    color: #64748b;
    margin-top: 1rem;
    font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .call-summary-container {
        padding: 1.5rem 1rem;
    }

    .summary-title {
        font-size: 2rem;
    }

    .summary-card {
        padding: 2rem 1.5rem;
    }

    .close-window-button {
        padding: 0.9rem 1.8rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .summary-title {
        font-size: 1.8rem;
    }

    .summary-card {
        padding: 1.5rem 1rem;
    }

    .courtesy-message {
        font-size: 0.95rem;
    }
}

/* ================= REPORT MODAL STYLES ================= */
.report-modal {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.report-modal.show {
    display: flex;
}

.report-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

.report-dialog {
    position: relative;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: report-slide-in 0.3s ease-out;
}

@keyframes report-slide-in {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.report-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: var(--primary-gradient);
    border-radius: 20px 20px 0 0;
    color: #fff;
}

.report-header h5 {
    font-weight: 600;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    margin: 0;
}

.report-header i {
    color: #fff;
}

.btn-close-report {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-close-report:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.report-body {
    padding: 24px;
}

.report-footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 0 0 20px 20px;
}

.report-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.report-actions .btn {
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

#report-submit-btn {
    background: var(--primary-gradient);
    border: none;
    color: #fff;
}

#report-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 54, 91, 0.3);
}

#report-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#report-cancel-btn {
    border: 2px solid #e5e7eb;
    color: #6b7280;
    background: #fff;
}

#report-cancel-btn:hover {
    border-color: #d1d5db;
    background: #f9fafb;
}

/* Mobile responsive for report modal */
@media (max-width: 576px) {
    .report-dialog {
        max-width: 100%;
        max-height: 95vh;
        margin: 10px;
    }
    
    .report-header {
        padding: 16px 20px;
    }
    
    .report-header h5 {
        font-size: 1.1rem;
    }
    
    .report-body {
        padding: 20px 16px;
    }
    
    .report-footer {
        padding: 12px 16px;
    }
    
    .report-actions {
        flex-direction: column;
    }
    
    .report-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ================= EVALUATION BADGES ================= */
.evaluation-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
}

.evaluation-badge.pending {
    background-color: #f59e0b;
    color: #000;
}

.evaluation-badge.completed {
    background-color: #10b981;
    color: #fff;
}

.evaluation-badge.required {
    background-color: #ef4444;
    color: #fff;
}

/* Action buttons in table */
.action-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.2rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
}

.action-btn:hover {
    transform: translateY(-1px);
}

.action-btn.evaluate {
    background-color: #f59e0b;
    color: #000;
}

.action-btn.report {
    background-color: #3b82f6;
    color: #fff;
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Pending actions alert */
#pending-actions-alert .alert {
    border-radius: 12px;
}

/* Toast styles override */
#success-toast {
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

#success-toast .toast-body {
    padding: 16px 20px;
    font-size: 0.95rem;
}

/* ============================================================
   CALL SCREEN — DARK MODE (Minimaliste Dark)
   Scoped to #call-screen to avoid affecting other pages
   ============================================================ */

/* Override body and main background when call screen is active */
body:has(#call-screen.screen.active) {
    background: #0d1b2a;
    color: #fafafa;
}

#call-screen.screen.active {
    background: #0d1b2a;
    color: #fafafa;
    min-height: 100vh;
    padding: 0;
}

/* Top bar — Minimaliste Dark */
.call-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: rgba(255,255,255,0.04);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.call-top-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.call-top-center {
    display: flex;
    align-items: center;
    gap: 10px;
}
.credits-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(34,197,94,0.1);
    border: 1px solid rgba(34,197,94,0.15);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #4ade80;
}
.credits-badge i {
    font-size: 12px;
}
.credits-warning {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(245,158,11,0.1);
    border: 1px solid rgba(245,158,11,0.15);
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
    color: #fbbf24;
}
.call-timer {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    font-variant-numeric: tabular-nums;
}
.call-leave-btn {
    background: none;
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.6);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 16px;
}
.call-leave-btn:hover {
    background: rgba(239,68,68,0.15);
    border-color: rgba(239,68,68,0.3);
    color: #ef4444;
}

@keyframes pulse-green { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.5); } }

/* Top bar — dark glass */
#call-screen .top-bar,
#call-screen .call-header {
    background: rgba(255,255,255,0.04);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 12px 20px;
}

/* Participants area */
#call-screen .participants-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 32px;
    padding: 32px 20px;
    min-height: calc(100vh - 180px);
}

#call-screen .participant {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

#call-screen .avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    border: 3px solid rgba(255,255,255,0.1);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0;
    overflow: visible;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.avatar-initials {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    user-select: none;
}

#call-screen #local-avatar {
    border-color: rgba(59,130,246,0.4);
    box-shadow: 0 0 25px rgba(59,130,246,0.15);
}

#call-screen .avatar.muted {
    border-color: rgba(239,68,68,0.4) !important;
    box-shadow: 0 0 25px rgba(239,68,68,0.15);
}

#call-screen .participant-name {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.06);
    padding: 4px 12px;
    border-radius: 999px;
    margin-top: 2px;
    white-space: nowrap;
}

#call-screen .participant-label {
    font-size: 11px;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#call-screen .participant-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.15);
    font-size: 18px;
    margin: 0;
    padding: 0;
}

/* Control bar — dark glass */
#call-screen .control-bar {
    background: rgba(255,255,255,0.03);
    border-top: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 -8px 32px rgba(0,0,0,0.4);
    padding: 12px 16px 20px;
}

#call-screen .control-bar .controls-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 520px;
    margin: 8px auto 0;
}

/* Control buttons — fonds pleins (cf. .control-bar .btn : les ghosts
   translucides sont invisibles hors vidéo) */
#call-screen .control-bar .btn {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 14px;
    border: 1px solid #6c757d;
    background: #6c757d;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s;
    padding: 0;
    flex-shrink: 0;
}
#call-screen .control-bar .btn:hover {
    background: #5c636a;
    border-color: #565e64;
    color: #fff;
}
#call-screen .control-bar .btn-danger {
    background: #dc3545;
    border-color: #dc3545;
    color: #fff;
}
#call-screen .control-bar .btn-danger:hover {
    background: #bb2d3b;
    border-color: #b02a37;
    color: #fff;
}
#call-screen .control-bar .btn-warning {
    background: #ffc107;
    border-color: #ffc107;
    color: #212529;
}
#call-screen .control-bar .btn-warning:hover {
    background: #ffca2c;
    border-color: #ffc720;
    color: #212529;
}
#call-screen .control-bar .btn-info {
    background: #0dcaf0;
    border-color: #0dcaf0;
    color: #052c34;
}
#call-screen .control-bar .btn-primary {
    background: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}
#call-screen .control-bar .btn-secondary {
    background: #6c757d;
    border-color: #6c757d;
    color: #fff;
}

/* Control bar meta badges */
#call-screen .control-meta .badge {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.6) !important;
    font-weight: 600;
    padding: 4px 10px;
    font-size: 12px;
}

/* Control bar toggle */
#call-screen .control-bar-toggle {
    background: rgba(10,10,11,0.95);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

/* Listening indicator — dark */
#call-screen .listening-indicator,
.listening-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 20px;
    background: rgba(34,197,94,0.08);
    border: 1px solid rgba(34,197,94,0.15);
    border-radius: 100px;
    margin: 16px auto 0;
    max-width: fit-content;
}

.listening-indicator .pulse-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(34,197,94,0.5);
    animation: listening-pulse 2s infinite;
}

.listening-indicator .listening-text {
    font-size: 13px;
    color: #4ade80;
    font-weight: 500;
}

/* Call info message */
#call-screen .call-info-message {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.6);
}

/* Call contacts banner — discreet post-accept contact info */
@keyframes callContactsIn {
    from { opacity: 0; transform: translateX(-50%) translateY(12px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Chat modal — dark */
#call-screen .chat-container,
.chat-container {
    background: rgba(24,24,27,0.98);
    border: 1px solid rgba(255,255,255,0.08);
}

#call-screen .chat-header {
    background: rgba(255,255,255,0.04);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.9);
}

/* Pinned video container */
#call-screen .pinned-container {
    background: rgba(0,0,0,0.8);
    border: 1px solid rgba(255,255,255,0.08);
}

/* Toast in call context */
#call-screen .toast-notice {
    background: rgba(24,24,27,0.95);
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.9);
    backdrop-filter: blur(12px);
}

/* Notification panels in call context */
#call-screen .notification-panel,
.notification-panel {
    background: rgba(24,24,27,0.98) !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    color: rgba(255,255,255,0.9) !important;
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}

/* Mute badge on avatar */
#call-screen .avatar-wrap .mute-badge {
    position: absolute;
    bottom: -6px;
    right: -6px;
    width: 28px;
    height: 28px;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.85rem;
    z-index: 5;

    background: rgba(24,24,27,0.9);
    border: 1px solid rgba(255,255,255,0.1);
}
#call-screen .participant.muted .mute-badge {
    display: inline-flex !important;
    background: #ef4444 !important;
    border-color: rgba(255,255,255,0.3) !important;
    color: #fff !important;
}

/* Audio hint */
#call-screen .audio-hint {
    background: rgba(59,130,246,0.15);
    border: 1px solid rgba(59,130,246,0.2);
    color: #60a5fa;
}

/* Call screen responsive — small screens */
@media (max-width: 480px) {
    #call-screen .control-bar {
        padding: 10px 12px 16px;
    }
    #call-screen .control-bar .controls-grid {
        gap: 6px;
    }
    #call-screen .control-bar .btn {
        width: 44px;
        height: 44px;
        min-width: 44px;
        border-radius: 12px;
        font-size: 16px;
    }
    #call-screen .participants-container {
        gap: 16px;
        padding: 20px 12px;
        min-height: calc(100vh - 160px);
    }
    #call-screen .avatar {
        width: 90px;
        height: 90px;
        font-size: 1.8rem;
    }
    .avatar-initials {
        font-size: 1.8rem;
    }
    #call-screen .participant-name {
        font-size: 12px;
        padding: 3px 10px;
    }
    #call-screen .participant-label {
        font-size: 10px;
    }
    #call-screen .participant-separator {
        width: 36px;
        height: 36px;
        font-size: 14px;
        border-radius: 10px;
    }
    .call-top-bar {
        padding: 10px 14px;
    }
    .call-channel-name {
        font-size: 13px;
    }
    .call-leave-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    #call-screen .participants-container {
        gap: 24px;
        padding: 28px 16px;
    }
    #call-screen .avatar {
        width: 110px;
        height: 110px;
        font-size: 2.2rem;
    }
    .avatar-initials {
        font-size: 2.2rem;
    }
    #call-screen .participant-separator {
        width: 44px;
        height: 44px;
    }
}

/* ============================================================
   CLIENT SCREENS — Dark Theme (Brand Consistent)
   initial-screen, waiting-screen, client-request-screen
   ============================================================ */

/* Shared container for status screens */
.client-status-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
    background: #0d1b2a;
}
.client-status-card {
    max-width: 400px;
    width: 100%;
    text-align: center;
    padding: 48px 36px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 24px;
}
.client-status-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.spinner-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid rgba(16,54,91,0.2);
    border-top-color: #3b82f6;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.client-status-spinner > i {
    font-size: 28px;
    color: rgba(255,255,255,0.6);
    z-index: 1;
}
.client-success-icon {
    font-size: 48px;
    color: #22c55e;
}
.client-error-icon {
    font-size: 48px;
    color: #ef4444;
}
.client-status-title {
    font-size: 22px;
    font-weight: 700;
    color: rgba(255,255,255,0.95);
    margin-bottom: 10px;
}
.client-status-subtitle {
    font-size: 14px;
    color: rgba(255,255,255,0.4);
    line-height: 1.6;
    margin-bottom: 20px;
}
.client-status-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.client-status-dots span {
    width: 6px;
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    animation: dot-pulse 1.4s ease-in-out infinite;
}
.client-status-dots span:nth-child(2) { animation-delay: 0.2s; }
.client-status-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dot-pulse {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.3; }
    40% { transform: scale(1); opacity: 1; }
}
.client-info-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    margin-top: 20px;
    background: rgba(34,197,94,0.08);
    border: 1px solid rgba(34,197,94,0.15);
    border-radius: 12px;
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    text-align: left;
}
.client-info-alert i {
    color: #22c55e;
    font-size: 18px;
    flex-shrink: 0;
}

/* Client cancel call button */
.client-cancel-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
    padding: 12px 28px;
    background: #dc3545;
    border: 1px solid #dc3545;
    border-radius: 50px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}
.client-cancel-btn:hover {
    background: #e74c3c;
    color: #fff;
    border-color: #e74c3c;
    transform: scale(1.03);
}
.client-cancel-btn:active {
    transform: scale(0.97);
}


/* ─── Auth Screen — Dark Theme ─── */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
    background: #0d1b2a;
}
.auth-card {
    max-width: 400px;
    width: 100%;
    padding: 40px 32px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 24px;
    text-align: center;
}
.auth-logo {
    margin: 0 auto 16px;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.auth-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.auth-title {
    font-size: 22px;
    font-weight: 700;
    color: rgba(255,255,255,0.95);
    margin-bottom: 4px;
}
.auth-subtitle {
    font-size: 13px;
    color: rgba(255,255,255,0.4);
    margin-bottom: 24px;
}
.auth-tabs {
    display: flex;
    gap: 4px;
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 24px;
}
.auth-tab {
    flex: 1;
    padding: 8px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: rgba(255,255,255,0.4);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.auth-tab.active {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.9);
}
.auth-form {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.client-form-intro {
    font-size: 14px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 8px;
    line-height: 1.5;
}
.client-form-prefix {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    font-weight: 500;
    white-space: nowrap;
    padding-top: 10px;
    flex-shrink: 0;
}
.client-inline {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    border-radius: 0;
    padding: 8px 0;
    font-size: 14px;
    color: rgba(255,255,255,0.9);
    transition: border-color 0.2s;
    width: 100%;
}
.client-inline::placeholder {
    color: rgba(255,255,255,0.25);
}
.client-inline:focus {
    outline: none;
    border-bottom-color: rgba(59,130,246,0.6);
}
.client-form-location {
    gap: 8px;
}
.client-form-divider {
    height: 1px;
    background: rgba(255,255,255,0.06);
    margin: 8px 0;
}

/* ═══════════════════════════════════════════
   CLIENT FORM — Mobile-First Design
   ═══════════════════════════════════════════ */

/* Mobile first (default) */
.client-form-container {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 12px;
    background: #0d1b2a;
    display: flex;
    flex-direction: column;
}
.client-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.client-top-link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
}
.client-top-link:hover {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.8);
}
.client-form-card {
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
    padding: 20px 20px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 24px;
}
.client-form-header {
    text-align: center;
    margin-bottom: 12px;
}
.client-form-title {
    font-size: 18px;
    font-weight: 700;
    color: rgba(255,255,255,0.95);
    margin-bottom: 2px;
    white-space: nowrap;
}
.client-form-subtitle {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    white-space: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-bottom: 0;
}
.client-form-subtitle::-webkit-scrollbar {
    display: none;
}
.client-form-logo {
    display: none;
}
.client-form-intro {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 16px;
    line-height: 1.6;
}
.client-form-fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.client-form-prefix {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    font-weight: 500;
    white-space: nowrap;
    padding-top: 10px;
    flex-shrink: 0;
}
.client-form-location {
    gap: 8px;
}
.client-form-divider {
    height: 1px;
    background: rgba(255,255,255,0.06);
    margin: 8px 0;
}
.client-input-group {
    position: relative;
    width: 100%;
}
.client-input {
    width: 100%;
    padding: 10px 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    color: rgba(255,255,255,0.9);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
    outline: none;
}
.client-input::placeholder {
    color: rgba(255,255,255,0.25);
}
.client-input:focus {
    border-color: rgba(59,130,246,0.4);
    background: rgba(255,255,255,0.06);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.client-textarea {
    resize: vertical;
    min-height: 40px;
}
.client-input option {
    background: #1a1a2e;
    color: rgba(255,255,255,0.9);
}
.client-inline {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    border-radius: 0;
    padding: 8px 0;
    font-size: 14px;
    color: rgba(255,255,255,0.9);
    transition: border-color 0.2s;
    width: 100%;
}
.client-inline::placeholder {
    color: rgba(255,255,255,0.25);
}
.client-inline:focus {
    outline: none;
    border-bottom-color: rgba(59,130,246,0.6);
}
.client-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(24,24,27,0.98);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    margin-top: 4px;
    max-height: 180px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.client-suggestion-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.15s;
}
.client-suggestion-item:last-child {
    border-bottom: none;
}
.client-suggestion-item:hover {
    background: rgba(59,130,246,0.12);
    color: rgba(255,255,255,0.9);
}
.client-form-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, rgb(16,54,91), rgb(30,64,175));
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s;
    box-shadow: 0 4px 20px rgba(16,54,91,0.3);
    font-family: inherit;
}
.client-form-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 28px rgba(16,54,91,0.4);
}
.client-form-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
.client-form-btn i {
    font-size: 16px;
}
.client-info-trigger {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 0 auto 8px;
}
.client-info-popover {
    position: relative;
    left: auto;
    transform: none;
    top: auto;
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 12px;
    z-index: 100;
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    line-height: 1.5;
    margin-bottom: 8px;
}
.client-info-popover p {
    margin: 0 0 6px;
}
.client-info-popover p:last-child {
    margin-bottom: 0;
}

/* ═══════════════════════════════════════════
   RESPONSIVE — Mobile First
   ═══════════════════════════════════════════ */

/* Mobile: inputs stacked */
.client-input-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.client-input-row .client-input-group {
    min-width: 0;
}
.auth-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
}
.auth-remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #3b82f6;
    cursor: pointer;
}

/* ═══════════════════════════════════════════
   2-STEP MOBILE FORM
   ═══════════════════════════════════════════ */

/* Step hint badges */
.form-steps-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    margin-bottom: 8px;
}
.form-step-badge {
    background: rgba(59,130,246,0.15);
    color: rgba(59,130,246,0.8);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}
.form-step-note {
    margin-top: 4px;
    color: rgba(255,255,255,0.35);
    font-size: 11px;
}
.form-step-note i {
    color: rgba(59,130,246,0.5);
}

/* All screens: 2-step mode */
.form-step-btn-mobile {
    display: flex !important;
    width: 100%;
    justify-content: center;
    gap: 8px;
}
.form-step-nav-mobile {
    display: flex !important;
    gap: 10px;
}
.form-step-actions {
    display: flex;
    gap: 10px;
    align-items: stretch;
}
.form-step-actions .form-step-btn-back {
    flex: 0 0 auto;
    width: auto;
    padding: 12px 16px;
}
.form-step-actions .client-form-btn:last-child {
    flex: 1;
}
.form-step-btn-back {
    flex: 1;
    background: rgba(255,255,255,0.06) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
}
.form-step-btn-back:hover {
    background: rgba(255,255,255,0.1) !important;
}
#form-step-2.form-step-hidden {
    display: none !important;
}
#form-step-1.form-step-hidden {
    display: none !important;
}

/* Hide step 2 hint on step 1 by default */
.form-step-hidden-mobile {
    display: none !important;
}

.no-partner-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
    background: #0d1b2a;
}
.no-partner-card {
    max-width: 440px;
    width: 100%;
    text-align: center;
    padding: 48px 36px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 24px;
    position: relative;
}
.no-partner-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}
.no-partner-close:hover {
    background: rgba(239,68,68,0.2);
    color: #f87171;
}
.no-partner-icon-wrap {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.no-partner-icon-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(16,54,91,0.3);
    animation: ring-pulse 3s ease-in-out infinite;
}
@keyframes ring-pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.15); opacity: 0.2; }
}
.no-partner-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(16,54,91,0.15), rgba(30,64,175,0.15));
    border: 1px solid rgba(30,64,175,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #60a5fa;
    position: relative;
    z-index: 1;
}
.no-partner-title {
    font-size: 24px;
    font-weight: 700;
    color: rgba(255,255,255,0.95);
    margin-bottom: 12px;
    letter-spacing: -0.3px;
}
.no-partner-subtitle {
    font-size: 15px;
    color: rgba(255,255,255,0.45);
    line-height: 1.6;
    margin-bottom: 28px;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
}
.no-partner-divider {
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(16,54,91,0.4), transparent);
    margin: 0 auto 28px;
    border-radius: 1px;
}
.no-partner-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 36px;
}
.no-partner-info-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 14px;
    text-align: left;
    transition: all 0.2s;
}
.no-partner-info-item:hover {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.06);
}
.no-partner-info-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    background: linear-gradient(135deg, rgba(16,54,91,0.2), rgba(30,64,175,0.2));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #60a5fa;
    margin-top: 2px;
}
.no-partner-info-item strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    margin-bottom: 2px;
}
.no-partner-info-item span {
    font-size: 13px;
    color: rgba(255,255,255,0.4);
    line-height: 1.4;
}
.no-partner-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: linear-gradient(135deg, rgb(16,54,91), rgb(30,64,175));
    border: none;
    border-radius: 14px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 4px 16px rgba(16,54,91,0.3);
}
.no-partner-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(16,54,91,0.4);
}
.no-partner-footer {
    font-size: 13px;
    color: rgba(255,255,255,0.3);
    margin-bottom: 20px;
}
.no-partner-footer strong {
    color: rgba(255,255,255,0.5);
    font-weight: 600;
}

/* Partner info card — dark */
.partner-info-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 20px;
    background: rgba(59,130,246,0.08);
    border: 1px solid rgba(59,130,246,0.15);
    border-radius: 12px;
    margin-bottom: 12px;
}
.partner-info-name {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
}
.partner-info-company {
    font-size: 12px;
    color: rgba(255,255,255,0.45);
    font-weight: 400;
}

/* Speaking / mute — même pastille en bas-droite, on switch l'icône */
.speaking-indicator,
#call-screen .avatar-wrap .mute-badge {
    position: absolute;
    right: -6px;
    bottom: -6px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    z-index: 10;
}
/* Speaking : vert, halo */
.speaking-indicator {
    background: rgba(24,24,27,0.95);
    color: #22c55e;
    border: 2px solid #0d1b2a;
    box-shadow: 0 0 10px rgba(34,197,94,0.5);
    display: none;
}
.speaking-indicator.active { display: flex; animation: speaking-pulse 1.5s ease-in-out infinite; }
/* Mute : rouge, prioritaire sur speaking */
#call-screen .avatar-wrap .mute-badge {
    background: #ef4444;
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    display: none;
}
#call-screen .participant.muted .mute-badge { display: inline-flex !important; }
#call-screen .participant.muted .speaking-indicator { display: none !important; }
.speaking-indicator.active {
    animation: speaking-pulse 1.5s ease-in-out infinite;
}

/* Tone bar removed */

@keyframes speaking-pulse {
    0%, 100% { box-shadow: 0 0 8px rgba(34,197,94,0.4); }
    50% { box-shadow: 0 0 16px rgba(34,197,94,0.7); }
}

/* ═══════════════════════════════════════════════════ */
/* Notification panels — modern refactor              */
/* ═══════════════════════════════════════════════════ */
#incoming-call-notification .notification-header {
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #fff;
}
#incoming-call-notification .notification-header .icon {
    color: #fff;
}
#join-request-notification .notification-header {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
}
#join-request-notification .notification-header .icon {
    color: #fff;
}
.notification-body p {
    font-size: 0.88rem;
    line-height: 1.5;
}
.notification-body p strong {
    color: rgba(255,255,255,0.7);
    font-weight: 500;
}
.notification-footer .btn-success {
    background: linear-gradient(135deg, #22c55e, #16a34a) !important;
    box-shadow: 0 2px 8px rgba(34,197,94,0.3);
}
.notification-footer .btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    box-shadow: 0 2px 8px rgba(239,68,68,0.3);
}

/* Credits warning — compact on top bar */
.credits-warning {
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Top bar — prevent wrapping */
.call-top-bar {
    flex-wrap: nowrap;
}
.call-top-center {
    min-width: 0;
    overflow: hidden;
}

/* ═══════════════════════════════════════════════════ */
/* Mobile responsive — 360px and below                */
/* ═══════════════════════════════════════════════════ */
@media (max-width: 360px) {
    .notification-panel {
        width: calc(100% - 20px);
        right: 10px;
        top: 10px;
        border-radius: 10px;
    }
    .notification-header {
        padding: 10px 12px;
    }
    .notification-header h5 {
        font-size: 0.95rem;
    }
    .notification-body {
        padding: 10px 12px;
        font-size: 0.82rem;
    }
    .notification-body p {
        font-size: 0.82rem;
        margin-bottom: 6px;
    }
    .notification-footer {
        padding: 10px 12px;
    }
    .notification-footer .btn {
        width: 44px;
        height: 44px;
    }
    .credits-warning {
        font-size: 10px;
        padding: 3px 6px;
        max-width: 120px;
    }
    .credits-badge {
        font-size: 11px;
        padding: 3px 8px;
    }
    .call-top-bar {
        padding: 6px 10px;
    }
    .call-timer {
        font-size: 12px;
    }
    .call-leave-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    .controls-grid {
        gap: 6px;
    }
    .controls-grid .btn {
        width: 42px;
        height: 42px;
        font-size: 16px;
    }
}

/* P1 mobile call UI — 280px: contacts banner + avatars + control toggle */
@media (max-width: 380px) {
  #call-screen .control-bar-toggle {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }
  #call-screen .participants-container .avatar {
    width: 72px;
    height: 72px;
  }
}
/* Pile d'infos haut d'écran d'appel : code suivi, rappel difficulté, fiche
   lead. En flux (jamais derrière la barre fixe), centrée, compacte. */
#call-screen .call-top-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 10px 12px 0;
}
#call-screen .call-top-stack:empty {
    display: none;
}
#call-screen .call-stack-banner {
    position: relative;
    margin: 0;
    max-width: none;
}
#call-screen .banner-close {
    position: absolute;
    top: 6px;
    right: 6px;
    flex-shrink: 0;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 15px;
    padding: 4px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
}
#call-screen .banner-close:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}
#call-screen .alert .banner-close {
    color: rgba(13,110,253,0.6);
}
#call-screen .alert .banner-close:hover {
    color: #0d6efd;
    background: rgba(13,110,253,0.1);
}
#call-screen .call-top-stack #call-lead-info {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    text-align: left;
    font-size: 0.85rem;
    line-height: 1.4;
}
/* Barre d'appel : ne jamais coller la zone système (gestes navigateur/app). */
.control-bar {
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}
@media (max-width: 576px) {
    .control-bar {
        padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    }
}

/* ═══════════════════════════════════════════
   FORM GUEST — récap, urgence segmentée, express SOS
   ═══════════════════════════════════════════ */
.client-recap {
    --recap-mc: #10365B;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-left: 3px solid var(--recap-mc);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 4px;
}
.client-recap-dot {
    flex: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-top: 4px;
}
.client-recap-text {
    margin: 0;
    font-size: 13px;
    color: rgba(255,255,255,0.65);
    line-height: 1.5;
}
.client-recap-text strong {
    color: rgba(255,255,255,0.95);
}
.client-field-error {
    margin: 4px 0 0;
    font-size: 12px;
    color: #fca5a5;
}
.urgency-seg {
    border: none;
    padding: 0;
    margin: 0;
}
.urgency-seg-legend {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    padding: 0;
    margin-bottom: 6px;
}
.urgency-seg-options {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}
.urgency-opt {
    padding: 9px 4px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.65);
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}
.urgency-opt[aria-checked="true"] {
    border-color: rgba(59,130,246,0.6);
    background: rgba(59,130,246,0.15);
    color: #fff;
}
.urgency-opt.urgency-sos[aria-checked="true"] {
    border-color: rgba(239,68,68,0.8);
    background: rgba(239,68,68,0.2);
    animation: sos-blink 1.2s ease-in-out infinite;
}
@keyframes sos-blink {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.5); }
    50% { box-shadow: 0 0 0 6px rgba(239,68,68,0); }
}
.express-panel {
    background: linear-gradient(135deg, rgba(239,68,68,0.12), rgba(239,68,68,0.04));
    border: 1px solid rgba(239,68,68,0.35);
    border-radius: 14px;
    padding: 14px;
}
.express-kicker {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fca5a5;
}
.express-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    animation: sos-blink 1.2s ease-in-out infinite;
}
.express-title {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px;
}
.express-sub {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    margin: 0 0 10px;
    line-height: 1.5;
}
.express-sub strong {
    color: rgba(255,255,255,0.92);
    font-weight: 600;
}
.express-switch-link {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 9px 8px;
    background: transparent;
    border: 0;
    color: rgba(255,255,255,0.72);
    font-size: 12.5px;
    line-height: 1.4;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.express-switch-link:hover,
.express-switch-link:focus-visible {
    color: #fff;
}
/* Respiration du panneau SOS : sans ça les deux champs et le bouton se
   touchent (saccadé sur mobile 390px). */
#express-panel .client-input-group + .client-input-group {
    margin-top: 14px;
}
#express-panel .express-kicker {
    margin-bottom: 8px;
}
#express-panel .express-title {
    margin-bottom: 10px;
}
#express-panel .express-sub {
    margin-bottom: 18px;
}
#express-panel .express-call-btn {
    margin-top: 18px;
}
#express-panel .client-field-error {
    margin: 6px 0 0;
}
.express-call-btn {
    margin-top: 10px;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    box-shadow: 0 4px 20px rgba(220,38,38,0.4);
    font-size: 15px;
    padding: 13px;
    animation: sos-blink 1.6s ease-in-out infinite;
}
.express-call-btn:hover {
    box-shadow: 0 6px 28px rgba(220,38,38,0.55);
}
@media (prefers-reduced-motion: reduce) {
    .urgency-opt.urgency-sos[aria-checked="true"],
    .express-dot,
    .express-call-btn {
        animation: none;
    }
}
