/* ============================================
   SET - Sales Efficiency Training - Styles globaux
   ============================================ */

/* Fonts Cisco */
@font-face {
    font-family: 'CiscoSans';
    src: url('/shared-assets/fonts/cisco-sans/CiscoSansTTHeavy.woff2') format('woff2'),
         url('/shared-assets/fonts/cisco-sans/CiscoSansTTHeavy.woff') format('woff');
    font-weight: 900;
    font-style: normal;
}

@font-face {
    font-family: 'CiscoSans';
    src: url('/shared-assets/fonts/cisco-sans/CiscoSansTTBold.woff2') format('woff2'),
         url('/shared-assets/fonts/cisco-sans/CiscoSansTTBold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'CiscoSans';
    src: url('/shared-assets/fonts/cisco-sans/CiscoSansTTRegular.woff2') format('woff2'),
         url('/shared-assets/fonts/cisco-sans/CiscoSansTTRegular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
}

/* Body & Layout */
body {
    background: linear-gradient(135deg, #0d47a1 0%, #1976d2 100%);
    min-height: 100vh;
    font-family: 'CiscoSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0;
}

.cisco-title {
    font-family: 'CiscoSans', sans-serif;
    font-weight: 900;
    font-size: 3rem;
    color: white;
    text-align: center;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ============================================
   BURGER MENU
   ============================================ */
.burger {
    cursor: pointer;
    width: 30px;
    height: 24px;
    position: relative;
    z-index: 1001;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.burger span {
    display: block;
    width: 100%;
    height: 3px;
    background: #1976d2;
    border-radius: 3px;
    transition: all 0.3s ease;
    position: absolute;
}

.burger span:nth-child(1) { top: 0; }
.burger span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.burger span:nth-child(3) { bottom: 0; }

.burger.active span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.burger.active span:nth-child(2) {
    opacity: 0;
}

.burger.active span:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    transition: left 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.sidebar.active {
    left: 0;
}

/* Structure flex de la sidebar */
.sidebar > .p-6.border-b {
    flex-shrink: 0; /* Header logo ne rétrécit pas */
}

.sidebar > nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar > .sidebar-footer {
    flex-shrink: 0;
    background: white;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.menu-item {
    padding: 16px 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

.menu-item:hover {
    background: #f5f5f5;
    border-left-color: #1976d2;
}

.menu-item.active {
    background: #e3f2fd;
    border-left-color: #1976d2;
    font-weight: 600;
}

/* ============================================
   ACCORDION MENU
   ============================================ */
.accordion-section {
    margin-bottom: 4px;
}

.accordion-header {
    cursor: pointer;
    transition: background 0.2s ease;
    padding: 12px 16px;
    user-select: none;
}

.accordion-header:hover {
    background: #f9fafb;
}

.accordion-header .flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.accordion-chevron {
    width: 20px;
    height: 20px;
    color: #6b7280;
    transition: transform 0.2s ease;
}

.accordion-section.expanded .accordion-chevron {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-section.expanded .accordion-content {
    max-height: 1000px;
}

.accordion-body {
    padding-bottom: 8px;
}

.menu-item.sub-item {
    padding-left: 56px;
    font-size: 0.95rem;
}

.menu-item.sub-item:hover {
    background: #f3f4f6;
}

/* Menu item locked (pour Essentials sur contenus Advantage) */
.menu-item.menu-item-locked {
    position: relative;
    cursor: not-allowed !important;
}

.menu-item.menu-item-locked:hover {
    background: #f9fafb;
}

/* Tooltip pour items locked */
.menu-item-tooltip {
    display: none;
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 8px;
    background: #1f2937;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    max-width: 250px;
    white-space: normal;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.menu-item-tooltip::before {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    margin-top: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: transparent #1f2937 transparent transparent;
}

.menu-item.menu-item-locked:hover .menu-item-tooltip {
    display: block;
}

/* Grayscale filter for icons */
.grayscale {
    filter: grayscale(100%);
}

/* ============================================
   CARDS & SECTIONS
   ============================================ */
.video-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.filters-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 16px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.stat-card.active {
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

/* ============================================
   ROADMAP STYLES
   ============================================ */
.roadmap-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.roadmap-item {
    background: #f9fafb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    border-left: 4px solid #1976d2;
    transition: all 0.2s ease;
}

.roadmap-item.roadmap-border {
    border-left-color: #e65100;
}

.roadmap-item.programme-border {
    border-left-color: #0277bd;
}

.roadmap-item.realise-border {
    border-left-color: #2e7d32;
}

.roadmap-item:hover {
    background: #f3f4f6;
    transform: translateX(4px);
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-roadmap {
    background: #fff3e0;
    color: #e65100;
}

.badge-programme {
    background: #e1f5fe;
    color: #0277bd;
}

.badge-realise {
    background: #e8f5e9;
    color: #2e7d32;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    border: none;
}

.btn-primary {
    background: #1976d2;
    color: white;
}

.btn-primary:hover {
    background: #1565c0;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.action-buttons {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

/* ============================================
   EDIT MODE
   ============================================ */
.edit-mode {
    background: white;
    border: 2px dashed #1976d2;
}

.edit-form input,
.edit-form select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.edit-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 12px;
    color: #333;
}

/* ============================================
   EXCEL SLICERS STYLE
   ============================================ */
.slicer-group {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.slicer-title {
    font-weight: 700;
    font-size: 14px;
    color: #1976d2;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.slicer-clear {
    font-size: 11px;
    color: #666;
    cursor: pointer;
    font-weight: 400;
    text-decoration: underline;
}

.slicer-clear:hover {
    color: #1976d2;
}

.slicer-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.slicer-btn {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid #ddd;
    background: white;
    color: #666;
}

.slicer-btn.selected {
    background: #1976d2;
    color: white;
    border-color: #1976d2;
}

.slicer-btn.unavailable {
    opacity: 0.4;
    cursor: not-allowed;
}

.slicer-btn:not(.unavailable):hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ============================================
   PAGE TRANSITIONS (View Transitions API)
   ============================================ */
@view-transition {
    navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 0.3s;
}

/* ============================================
   CISCO GRADIENT BORDER (Animated)
   Usage:
   - .cisco-gradient-border : bordure statique
   - .cisco-gradient-border-spin : bordure qui tourne
   - .cisco-gradient-avatar : pour les avatars ronds
   - .cisco-gradient-card : pour les cartes rectangulaires

   Couleurs du gradient Cisco:
   #0A60FF (bleu) → #02C8FF (cyan) → #FF007F (magenta) → #FF9000 (orange)
   ============================================ */

/* Animation de rotation */
@keyframes cisco-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Gradient Cisco (variables CSS)
   ============================================
   --cisco-gradient        : Multicolore (bleu→cyan→magenta→orange) - conic pour rotation
   --cisco-gradient-linear : Multicolore linéaire horizontal
   --cisco-gradient-2      : Blue-to-Blue (bleu foncé → cyan) - sobre et élégant
   ============================================ */
:root {
    --cisco-gradient: conic-gradient(
        from 0deg,
        #0A60FF 0%,
        #02C8FF 25%,
        #FF007F 50%,
        #FF9000 75%,
        #0A60FF 100%
    );
    --cisco-gradient-linear: linear-gradient(90deg, #0A60FF 5%, #02C8FF 37%, #02C8FF 44%, #FF007F 75%, #FF9000 95%);
    --cisco-gradient-2: linear-gradient(135deg, #0A60FF 5%, #02C8FF 95%);
}

/* ===== AVATAR ROND avec bordure gradient qui tourne ===== */
.cisco-gradient-avatar {
    position: relative;
    border-radius: 50%;
    padding: 2px;
    overflow: hidden;
}

.cisco-gradient-avatar::before {
    content: '';
    position: absolute;
    inset: -50%;
    background: var(--cisco-gradient);
    animation: cisco-spin 3s linear infinite;
}

.cisco-gradient-avatar > img,
.cisco-gradient-avatar > .avatar-inner {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: white;
    z-index: 1;
}

/* Tailles prédéfinies pour avatars */
.cisco-gradient-avatar.avatar-sm { width: 32px; height: 32px; }
.cisco-gradient-avatar.avatar-md { width: 40px; height: 40px; }
.cisco-gradient-avatar.avatar-lg { width: 56px; height: 56px; }
.cisco-gradient-avatar.avatar-xl { width: 80px; height: 80px; }
.cisco-gradient-avatar.avatar-xxl { width: 96px; height: 96px; padding: 3px; }
.cisco-gradient-avatar.avatar-xxl::before { inset: -60%; }
.cisco-gradient-avatar.avatar-xxl .avatar-placeholder { font-size: 28px; }

/* ===== CARD avec bordure gradient qui tourne ===== */
.cisco-gradient-card {
    position: relative;
    border-radius: 12px;
    padding: 3px;
    overflow: hidden;
}

.cisco-gradient-card::before {
    content: '';
    position: absolute;
    inset: -100%;
    background: var(--cisco-gradient);
    animation: cisco-spin 4s linear infinite;
}

.cisco-gradient-card > .card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 10px;
    z-index: 1;
}

/* ===== Bordure STATIQUE (ne tourne pas) ===== */
.cisco-gradient-border {
    position: relative;
    background: white;
}

.cisco-gradient-border::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    padding: 3px;
    background: var(--cisco-gradient-linear);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: -1;
}

/* Variante ronde pour bordure statique */
.cisco-gradient-border.rounded-full::before {
    border-radius: 9999px;
}

/* ===== Modificateurs de vitesse ===== */
.spin-slow::before { animation-duration: 6s; }
.spin-fast::before { animation-duration: 1.5s; }
.spin-reverse::before { animation-direction: reverse; }

/* ===== Pause au hover (optionnel) ===== */
.spin-pause-hover:hover::before {
    animation-play-state: paused;
}

/* ===== Placeholder pour avatar (initiales) ===== */
.avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #6b7280;
    background: #f3f4f6;
}

/* ============================================
   Couleurs Orange manquantes (Tailwind)
   ============================================ */
.bg-orange-50 { background-color: #fff7ed; }
.bg-orange-100 { background-color: #ffedd5; }
.bg-orange-200 { background-color: #fed7aa; }
.bg-orange-300 { background-color: #fdba74; }
.bg-orange-400 { background-color: #fb923c; }
.bg-orange-500 { background-color: #f97316; }
.bg-orange-600 { background-color: #ea580c; }
.bg-orange-700 { background-color: #c2410c; }
.bg-orange-800 { background-color: #9a3412; }
.bg-orange-900 { background-color: #7c2d12; }

.text-orange-50 { color: #fff7ed; }
.text-orange-100 { color: #ffedd5; }
.text-orange-200 { color: #fed7aa; }
.text-orange-300 { color: #fdba74; }
.text-orange-400 { color: #fb923c; }
.text-orange-500 { color: #f97316; }
.text-orange-600 { color: #ea580c; }
.text-orange-700 { color: #c2410c; }
.text-orange-800 { color: #9a3412; }
.text-orange-900 { color: #7c2d12; }

.border-orange-100 { border-color: #ffedd5; }
.border-orange-200 { border-color: #fed7aa; }
.border-orange-300 { border-color: #fdba74; }
.border-orange-400 { border-color: #fb923c; }
.border-orange-500 { border-color: #f97316; }
.border-orange-600 { border-color: #ea580c; }

.hover\:bg-orange-100:hover { background-color: #ffedd5; }
.hover\:bg-orange-600:hover { background-color: #ea580c; }
.hover\:bg-orange-700:hover { background-color: #c2410c; }
.hover\:text-orange-600:hover { color: #ea580c; }
