/*
Theme Name: Hello Elementor Child
Template: hello-elementor
Text Domain: hello-elementor-child
*/

/* Container CSV rétractable */
.csv-retractable-container {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 320px;
    background: #f2f2f2;
    box-shadow: -2px 0 25px rgba(17, 17, 17, 0.3);
    border-radius: 15px 0 0 15px;
    z-index: 9999;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 75vh;
    display: flex;
    flex-direction: column;
    border: 2px solid #1a27e0;
}

/* Position à droite (défaut) */
.csv-retractable-container.position-right {
    right: 0;
}

/* Position à gauche */
.csv-retractable-container.position-left {
    left: 0;
    box-shadow: 2px 0 25px rgba(17, 17, 17, 0.3);
    border-radius: 0 15px 15px 0;
}

/* Header du container */
.csv-retractable-container .csv-retractable-header {
    padding: 20px !important;
    background: linear-gradient(135deg, #1a27e0, #0d1a9e) !important;
    color: #f2f2f2 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    cursor: pointer !important;
    border-radius: 13px 0 0 0 !important;
    font-weight: 700 !important;
    font-size: 18px !important;
    transition: all 0.3s ease !important;
    height: 65px !important;
    box-sizing: border-box !important;
    border-bottom: 3px solid #ff8a50 !important;
}

.csv-retractable-container .csv-retractable-header:hover {
    background: linear-gradient(135deg, #0d1a9e, #1a27e0) !important;
}

.position-left .csv-retractable-header {
    border-radius: 0 13px 0 0;
}

.header-title {
    flex-grow: 1;
    text-align: center;
    font-weight: 700;
}

.csv-toggle-btn {
    background: #ff8a50;
    border: 2px solid #f2f2f2;
    color: #111111;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.csv-toggle-btn:hover {
    background: #e07a40;
    transform: scale(1.1);
}

/* Contenu du container */
.csv-retractable-content {
    padding: 25px;
    max-height: 450px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex-grow: 1;
    background: #f2f2f2;
}

.csv-links-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.csv-link-item {
    display: flex;
    align-items: center;
    padding: 15px 18px;
    background: white;
    text-decoration: none;
    color: #111111;
    border-radius: 8px;
    transition: all 0.3s ease;
    border-left: 5px solid #1a27e0;
    box-shadow: 0 2px 8px rgba(26, 39, 224, 0.15);
    font-weight: 600;
}

.csv-link-item:hover {
    background: #ff8a50;
    color: #111111;
    transform: translateX(-8px);
    box-shadow: 0 6px 20px rgba(255, 138, 80, 0.4);
    border-left-color: #ff8a50;
}

.position-left .csv-link-item:hover {
    transform: translateX(8px);
}

.link-text {
    font-weight: 600;
    font-size: 15px;
    line-height: 1.4;
}

/* État rétracté - MODIFIÉ : retracted par défaut supprimé */
.csv-retractable-container.retracted {
    transform: translateX(calc(100% - 60px)) translateY(-50%);
}

.position-left.retracted {
    transform: translateX(calc(-100% + 60px)) translateY(-50%);
}

.csv-retractable-container.retracted .csv-retractable-content {
    display: none;
}

/* Style pour l'header en mode rétracté */
.csv-retractable-container.retracted .csv-retractable-header {
    flex-direction: column;
    justify-content: center;
    padding: 15px 12px;
    height: auto;
    min-height: 140px;
    writing-mode: vertical-lr;
    border-bottom: 2px solid #ff8a50;
}

.csv-retractable-container.retracted .header-title {
    transform: rotate(180deg);
    margin: 12px 0;
    font-size: 16px;
    white-space: nowrap;
}

.csv-retractable-container.retracted .csv-toggle-btn {
    margin-top: 12px;
    order: -1;
    background: #f2f2f2;
    color: #1a27e0;
    border: 2px solid #1a27e0;
}

.csv-retractable-container.retracted .csv-toggle-btn:hover {
    background: #1a27e0;
    color: #f2f2f2;
}

/* Scrollbar personnalisée */
.csv-retractable-content::-webkit-scrollbar {
    width: 8px;
}

.csv-retractable-content::-webkit-scrollbar-track {
    background: #e0e0e0;
    border-radius: 4px;
}

.csv-retractable-content::-webkit-scrollbar-thumb {
    background: #1a27e0;
    border-radius: 4px;
}

.csv-retractable-content::-webkit-scrollbar-thumb:hover {
    background: #ff8a50;
}

/* Messages d'erreur */
.csv-error, .csv-warning {
    background: #ffeaa7;
    border: 2px solid #ff8a50;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    color: #111111;
    margin: 20px;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .csv-retractable-container {
        width: 300px;
        max-height: 65vh;
    }
    
    .csv-retractable-container.retracted {
        transform: translateX(calc(100% - 50px)) translateY(-50%);
    }
    
    .position-left.retracted {
        transform: translateX(calc(-100% + 50px)) translateY(-50%);
    }
    
    .csv-retractable-header {
        padding: 18px;
        font-size: 16px;
        height: 60px;
    }
    
    .csv-retractable-content {
        padding: 20px;
    }
    
    .csv-retractable-container.retracted .csv-retractable-header {
        min-height: 120px;
        padding: 12px 10px;
    }
}

@media (max-width: 480px) {
    .csv-retractable-container {
        width: 280px;
    }
    
    .csv-retractable-container.retracted .csv-retractable-header {
        min-height: 110px;
    }
}