/**
 * CSS pour le Moteur de Recherche ISBN
 * Version: 3.1 - SANS SCROLLING - Affichage fixe uniquement
 */

/* ================================================
   ⚠️ RÈGLES CRITIQUES - PRIORITÉ MAXIMALE
   Ces règles doivent écraser TOUS les autres styles
   ================================================ */

/* SUPPRESSION TOTALE DU SCROLLING - ULTRA PRIORITAIRE */
#csv-search-container,
#csv-search-container *,
.csv-main-section,
.csv-main-grid,
.csv-left-column,
.csv-results-list-section,
#results-list-section,
#all-results-list {
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    max-height: none !important;
    height: auto !important;
}

/* Forcer l'affichage visible pour la liste de résultats */
div#all-results-list,
div.csv-results-list-section,
div.csv-left-column,
#results-list-section.csv-results-list-section {
    overflow: visible !important;
    max-height: none !important;
    height: auto !important;
    display: block !important;
}

/* Suppression de toute hauteur fixe */
#all-results-list,
.csv-results-list-section,
.csv-left-column {
    min-height: 0 !important;
    max-height: none !important;
    height: auto !important;
}

/* ================================================
   RESET ET BASE
   ================================================ */
* {
    box-sizing: border-box;
}

body {
    background: #ffffff;
}

/* ================================================
   CONTENEUR PRINCIPAL
   ================================================ */
#csv-search-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
}

/* ================================================
   SECTION PRINCIPALE - 2 COLONNES
   ================================================ */
.csv-main-section {
    background: #ffffff;
    padding: 40px 20px;
    margin: 0;
    border: none;
}

.csv-main-grid {
    display: grid;
    grid-template-columns: 500px 1fr;
    gap: 20px;
    max-width: 1800px;
    margin: 0 auto;
    align-items: start;
}

/* ================================================
   COLONNE GAUCHE - FORMULAIRE + RÉSULTATS
   ================================================ */
.csv-left-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow: visible !important;
    max-height: none !important;
    height: auto !important;
}

/* BLOC 1 : FORMULAIRE DE RECHERCHE (STICKY) */
.csv-search-column {
    background: #ffffff;
    padding: 30px;
    border-radius: 0;
    box-shadow: none;
    border: none;
    position: sticky;
    top: 20px;
    z-index: 100;
}

.csv-search-title {
    text-align: center;
    margin-bottom: 10px;
    color: #000;
    font-size: 20px;
    font-weight: bold;
}

.csv-search-intro {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-bottom: 25px;
    line-height: 1.5;
}

/* Champ de saisie */
#search-term {
    width: 100%;
    padding: 14px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    resize: vertical;
    font-family: monospace;
    background: #fff;
    color: #000;
    min-height: 130px;
    transition: all 0.3s ease;
}

#search-term:focus {
    background: #fff;
    outline: none;
    border: 2px solid #F56B2A;
    box-shadow: 0 0 0 3px rgba(245, 107, 42, 0.1);
}

#search-term:hover {
    border-color: #F56B2A;
}

#search-term::placeholder {
    color: #999;
}

/* Label */
.csv-label {
    display: block;
    margin-bottom: 12px;
    color: #333;
    font-size: 15px;
    font-weight: 600;
}

.csv-label strong {
    color: #F56B2A;
}

.csv-label span {
    display: block;
    font-size: 13px;
    color: #666;
    font-weight: normal;
    margin-top: 5px;
}

/* Compteur ISBN */
#isbn-count {
    color: #666;
    font-size: 14px;
    margin: 12px 0 20px 0;
    display: block;
    font-weight: 500;
}

#isbn-count.csv-count-active {
    color: #5A8F15;
    font-weight: bold;
}

#isbn-count.csv-count-error {
    color: #dc3545;
    font-weight: bold;
}

#isbn-count.csv-count-warning {
    color: #ff9800;
    font-weight: bold;
}

/* Bouton Estimer */
.csv-button-group {
    margin-top: 15px;
    display: flex;
    justify-content: flex-end;
}

.csv-btn-primary {
    width: auto;
    min-width: 150px;
    padding: 18px 40px;
    background: #F56B2A;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(245, 107, 42, 0.2);
}

.csv-btn-primary:hover {
    background: #E55A19;
    box-shadow: 0 6px 12px rgba(245, 107, 42, 0.3);
    transform: translateY(-2px);
}

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

/* Loading dans la colonne de gauche */
#search-loading {
    text-align: center;
    margin: 20px 0;
    display: none;
    padding: 20px;
}

.csv-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #F56B2A;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.csv-loading-text {
    color: #F56B2A;
    font-weight: 600;
}

/* BLOC 2 : LISTE DES RÉSULTATS (AFFICHAGE FIXE - PAS DE SCROLL) */
.csv-results-list-section {
    background: #ffffff;
    padding: 25px;
    border-radius: 0;
    box-shadow: none;
    border: none;
    display: none;
    overflow: visible !important;
    max-height: none !important;
    height: auto !important;
}

.csv-results-list-section.active {
    display: block;
}

.csv-results-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.csv-results-list-header h3 {
    color: #333;
    margin: 0;
    font-size: 20px;
}

.csv-results-list-header h3 span {
    color: #F56B2A;
    font-weight: bold;
}

.csv-btn-danger {
    padding: 10px 20px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.csv-btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

/* Container pour les résultats - AFFICHAGE FIXE OBLIGATOIRE */
/* IMPORTANT: Pas de scrolling - Tous les résultats s'affichent en liste fixe */
/* La limite de 50 produits maximum est gérée côté JavaScript */
#all-results-list {
    max-height: none !important;
    overflow-y: visible !important;
    overflow-x: visible !important;
    height: auto !important;
}

#all-results-list.scrollable {
    max-height: none !important;
    overflow-y: visible !important;
    overflow-x: visible !important;
    height: auto !important;
    padding-right: 0;
}

/* Carte de résultat */
.csv-result-item {
    padding: 18px;
    margin-bottom: 12px;
    border-radius: 6px;
    position: relative;
    border: 1px solid #e0e0e0;
    background: #fafafa;
    transition: all 0.2s ease;
}

.csv-result-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    border-color: #d0d0d0;
}

.csv-result-found {
    border-left: 5px solid #5A8F15;
    background: #f8fff4;
}

.csv-result-pending {
    border-left: 5px solid #ffc107;
    background: #fffef5;
}

.csv-result-content {
    padding-right: 80px;
}

.csv-result-isbn {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #666;
    font-family: monospace;
    font-weight: 600;
}

.csv-result-titre {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

.csv-result-prix {
    margin: 0;
    font-size: 22px;
    font-weight: bold;
    color: #5A8F15;
}

.csv-result-pending-text {
    margin: 0;
    font-size: 14px;
    color: #856404;
    font-style: italic;
}

/* Bouton supprimer */
.csv-delete-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #dc3545;
    color: white;
    border: none;
    padding: 7px 14px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.csv-delete-btn:hover {
    background: #c82333;
    transform: scale(1.05);
}

.csv-delete-pending {
    background: #ffc107;
    color: #333;
}

.csv-delete-pending:hover {
    background: #e0a800;
}

/* ================================================
   COLONNE DROITE - TOTAL ET CTA (STICKY)
   ================================================ */
.csv-results-column {
    position: sticky;
    top: 20px;
    align-self: start;
}

/* Message vide par défaut */
.csv-empty-message {
    background: #ffffff;
    padding: 60px 30px;
    border-radius: 0;
    box-shadow: none;
    border: none;
    text-align: center;
}

.csv-empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.csv-empty-message h3 {
    color: #333;
    font-size: 22px;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.csv-empty-message p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

/* Contenu du total */
.csv-results-content {
    display: none;
    background: #ffffff;
    padding: 30px;
    border-radius: 0;
    box-shadow: none;
    border: none;
}

.csv-results-content.active {
    display: block;
}

/* Section Total */
.csv-total-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    border: 2px solid #e0e0e0;
    margin-bottom: 20px;
}

.csv-total-amount {
    font-size: 16px;
    color: #333;
}

.csv-total-amount strong {
    display: block;
    margin-bottom: 10px;
    font-size: 16px;
    color: #555;
}

.csv-total-amount span {
    display: block;
    color: #F56B2A;
    font-weight: bold;
    font-size: 28px;
    margin: 12px 0;
}

.csv-total-amount p {
    font-size: 12px;
    color: #666;
    margin: 8px 0 0 0;
    font-style: italic;
}

/* Bouton CTA pour afficher le formulaire de contact */
.csv-btn-request-buyback {
    width: 100%;
    max-width: 100%;
    margin: 0;
    display: block;
    padding: 18px 30px;
    background: #5A8F15;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(90, 143, 21, 0.3);
}

.csv-btn-request-buyback:hover:not(:disabled) {
    background: #4A7A10;
    box-shadow: 0 8px 16px rgba(90, 143, 21, 0.4);
    transform: translateY(-3px);
}

.csv-btn-request-buyback:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #ccc;
}

.csv-btn-request-buyback:active:not(:disabled) {
    transform: translateY(0);
}

.csv-minimum-products-text {
    text-align: center;
    color: #dc3545;
    font-size: 13px;
    margin-top: 10px;
    font-weight: 600;
    display: none;
}

.csv-minimum-products-text.active {
    display: block;
}

/* ================================================
   SECTION CONTACT - FORMULAIRE DE CONTACT (BLOC 3)
   ================================================ */
.csv-contact-section {
    display: none;
    max-width: 1800px;
    margin: 30px auto 20px;
    padding: 0 20px;
}

/* Formulaire de contact - BLOC 3 DISTINCT */
.csv-contact-form {
    background: #ffffff;
    padding: 30px 40px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(245, 107, 42, 0.15);
    border: 2px solid #F56B2A;
    display: none;
    max-width: 100%;
}

.csv-contact-form.active {
    display: block;
}

.csv-contact-form h3 {
    color: #F56B2A;
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 24px;
    text-align: center;
    font-weight: bold;
}

.csv-contact-form > p {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
    text-align: center;
}

/* Grille pour les champs du formulaire - 3 COLONNES */
.csv-contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 20px;
}

.csv-form-group {
    margin-bottom: 0;
}

.csv-form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.csv-form-group label .required {
    color: #dc3545;
    font-size: 16px;
}

.csv-form-group input {
    width: 100%;
    padding: 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s ease;
    background-color: #ffffff;
    color: #333;
}

.csv-form-group input:focus {
    outline: none;
    border-color: #F56B2A;
    box-shadow: 0 0 0 3px rgba(245, 107, 42, 0.1);
}

.csv-form-group input.error {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.csv-error-message {
    color: #dc3545;
    font-size: 13px;
    margin-top: 5px;
    display: none;
}

.csv-error-message.active {
    display: block;
}

/* Section CGU */
.csv-cgu-section {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    text-align: center;
}

.csv-cgu-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    gap: 12px;
}

.csv-cgu-label input[type="checkbox"] {
    width: 24px;
    height: 24px;
    cursor: pointer;
    flex-shrink: 0;
}

.csv-cgu-label span {
    font-size: 16px;
    color: #333;
    line-height: 1.5;
}

.csv-cgu-label a {
    color: #F56B2A;
    text-decoration: underline;
    font-weight: 600;
}

.csv-cgu-label a:hover {
    color: #E55A19;
}

/* Liens additionnels */
.csv-additional-links {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    text-align: center;
}

.csv-additional-links p {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #666;
    font-weight: 600;
}

.csv-links-list {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.csv-links-list a {
    color: #F56B2A;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.csv-links-list a:hover {
    color: #E55A19;
    text-decoration: underline;
}

/* Bouton Envoyer */
.csv-btn-success {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: block;
    padding: 16px 30px;
    background: #5A8F15;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 17px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(90, 143, 21, 0.3);
}

.csv-btn-success:hover:not(:disabled) {
    background: #4A7A10;
    box-shadow: 0 8px 16px rgba(90, 143, 21, 0.4);
    transform: translateY(-3px);
}

.csv-btn-success:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #ccc;
}

.csv-btn-success:active:not(:disabled) {
    transform: translateY(0);
}

.csv-info-text {
    text-align: center;
    color: #666;
    font-size: 12px;
    margin-top: 12px;
    line-height: 1.4;
}

/* ================================================
   ALERTES
   ================================================ */
.csv-alert {
    padding: 18px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 2px solid;
}

.csv-alert-warning {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.csv-alert-info {
    background: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

.csv-alert-error {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

/* ================================================
   RESPONSIVE - TABLETTE
   ================================================ */
@media (max-width: 1200px) {
    .csv-main-section {
        padding: 30px 15px;
    }
    
    .csv-main-grid {
        grid-template-columns: 450px 1fr;
        gap: 20px;
    }
    
    .csv-search-column {
        padding: 25px;
    }
    
    .csv-contact-section {
        padding: 0 15px;
    }
    
    .csv-contact-form {
        padding: 25px 30px;
    }
    
    .csv-contact-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

/* ================================================
   RESPONSIVE - MOBILE
   ================================================ */
@media (max-width: 768px) {
    .csv-main-section {
        padding: 20px 10px;
    }
    
    .csv-main-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .csv-search-column {
        position: static;
        padding: 20px;
    }
    
    .csv-search-title {
        font-size: 18px;
    }
    
    #search-term {
        min-height: 100px;
        font-size: 14px;
    }
    
    .csv-btn-primary {
        font-size: 16px;
        padding: 16px 30px;
        min-width: 120px;
    }
    
    .csv-results-column {
        position: static;
    }
    
    .csv-results-list-section {
        padding: 20px;
    }
    
    .csv-empty-icon {
        font-size: 60px;
    }
    
    .csv-empty-message {
        padding: 50px 20px;
    }
    
    .csv-empty-message h3 {
        font-size: 20px;
    }
    
    .csv-empty-message p {
        font-size: 15px;
    }
    
    .csv-results-list-header {
        flex-direction: column;
        gap: 15px;
        padding-bottom: 15px;
    }
    
    .csv-results-list-header h3 {
        text-align: center;
        font-size: 18px;
    }
    
    .csv-btn-danger {
        width: 100%;
    }
    
    .csv-result-item {
        padding: 15px;
        margin-bottom: 12px;
    }
    
    .csv-result-content {
        padding-right: 55px;
    }
    
    .csv-result-titre {
        font-size: 15px;
    }
    
    .csv-result-prix {
        font-size: 20px;
    }
    
    .csv-delete-btn {
        padding: 6px 12px;
        font-size: 11px;
        top: 12px;
        right: 12px;
    }
    
    .csv-results-content {
        padding: 25px 20px;
    }
    
    .csv-total-section {
        padding: 25px 20px;
    }
    
    .csv-total-amount span {
        font-size: 24px;
    }
    
    .csv-btn-request-buyback {
        padding: 16px 25px;
        font-size: 16px;
    }
    
    .csv-minimum-products-text {
        font-size: 12px;
        margin-top: 8px;
    }
    
    .csv-contact-section {
        padding: 0 10px;
    }
    
    .csv-contact-form {
        padding: 20px 15px;
    }
    
    .csv-contact-form h3 {
        font-size: 20px;
    }
    
    .csv-contact-form > p {
        font-size: 13px;
        margin-bottom: 18px;
    }
    
    .csv-contact-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .csv-form-group input {
        padding: 12px 8px;
        font-size: 14px;
    }
    
    .csv-form-group label {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .csv-cgu-section {
        padding: 15px;
        margin: 12px 0;
    }
    
    .csv-additional-links {
        padding: 12px;
        margin: 15px 0;
    }
    
    .csv-links-list {
        flex-direction: column;
        gap: 10px;
    }
    
    .csv-btn-success {
        padding: 15px 25px;
        font-size: 16px;
        max-width: 100%;
    }
}

/* ================================================
   ANIMATIONS ET TRANSITIONS
   ================================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.csv-result-item {
    animation: fadeIn 0.3s ease-out;
}

/* ================================================
   UTILITAIRES
   ================================================ */
.csv-hidden {
    display: none !important;
}

.csv-visible {
    display: block !important;
}

/* Force background blanc pour les inputs */
input[type="text"],
input[type="email"],
textarea {
    background-color: #ffffff !important;
    color: #333 !important;
}

/* ================================================
   AJUSTEMENTS SPÉCIFIQUES
   ================================================ */
#search-result {
    margin-top: 20px;
}


.csv-search-title {
    text-align: center;
    margin-bottom: 10px;
    color: #000;
    font-size: 20px;
    font-weight: bold;
}

.csv-search-intro {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-bottom: 25px;
    line-height: 1.5;
}

/* Champ de saisie */
#search-term {
    width: 100%;
    padding: 14px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    resize: vertical;
    font-family: monospace;
    background: #fff;
    color: #000;
    min-height: 130px;
    transition: all 0.3s ease;
}

#search-term:focus {
    background: #fff;
    outline: none;
    border: 2px solid #F56B2A;
    box-shadow: 0 0 0 3px rgba(245, 107, 42, 0.1);
}

#search-term:hover {
    border-color: #F56B2A;
}

#search-term::placeholder {
    color: #999;
}

/* Label */
.csv-label {
    display: block;
    margin-bottom: 12px;
    color: #333;
    font-size: 15px;
    font-weight: 600;
}

.csv-label strong {
    color: #F56B2A;
}

.csv-label span {
    display: block;
    font-size: 13px;
    color: #666;
    font-weight: normal;
    margin-top: 5px;
}

/* Compteur ISBN */
#isbn-count {
    color: #666;
    font-size: 14px;
    margin: 12px 0 20px 0;
    display: block;
    font-weight: 500;
}

#isbn-count.csv-count-active {
    color: #5A8F15;
    font-weight: bold;
}

#isbn-count.csv-count-error {
    color: #dc3545;
    font-weight: bold;
}

#isbn-count.csv-count-warning {
    color: #ff9800;
    font-weight: bold;
}

/* Bouton Estimer */
.csv-button-group {
    margin-top: 15px;
    display: flex;
    justify-content: flex-end;
}

.csv-btn-primary {
    width: auto;
    min-width: 150px;
    padding: 18px 40px;
    background: #F56B2A;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(245, 107, 42, 0.2);
}

.csv-btn-primary:hover {
    background: #E55A19;
    box-shadow: 0 6px 12px rgba(245, 107, 42, 0.3);
    transform: translateY(-2px);
}

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

/* Loading dans la colonne de gauche */
#search-loading {
    text-align: center;
    margin: 20px 0;
    display: none;
    padding: 20px;
}

.csv-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #F56B2A;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.csv-loading-text {
    color: #F56B2A;
    font-weight: 600;
}

/* ================================================
   COLONNE DROITE - RÉSULTATS
   ================================================ */
.csv-results-column {
    background: #ffffff;
    padding: 35px;
    border-radius: 0;
    box-shadow: none;
    border: none;
    min-height: 400px;
}

/* Message vide par défaut */
.csv-empty-message {
    text-align: center;
    padding: 80px 20px;
}

.csv-empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.csv-empty-message h3 {
    color: #333;
    font-size: 24px;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.csv-empty-message p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

/* Contenu des résultats */
.csv-results-content {
    display: none;
}

/* Header des résultats */
.csv-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.csv-results-header h3 {
    color: #333;
    margin: 0;
    font-size: 22px;
}

.csv-results-header h3 span {
    color: #F56B2A;
    font-weight: bold;
}

.csv-btn-danger {
    padding: 10px 20px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.csv-btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

/* Container de la liste avec scrolling */
#all-results-list {
    max-height: 550px;
    overflow-y: auto;
    padding: 5px;
    margin-bottom: 25px;
}

/* Scrollbar personnalisée */
#all-results-list::-webkit-scrollbar {
    width: 10px;
}

#all-results-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

#all-results-list::-webkit-scrollbar-thumb {
    background: #F56B2A;
    border-radius: 10px;
}

#all-results-list::-webkit-scrollbar-thumb:hover {
    background: #E55A19;
}

/* Carte de résultat */
.csv-result-item {
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 6px;
    position: relative;
    border: 1px solid #e0e0e0;
    background: #fafafa;
    transition: all 0.2s ease;
}

.csv-result-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    border-color: #d0d0d0;
}

.csv-result-found {
    border-left: 5px solid #5A8F15;
    background: #f8fff4;
}

.csv-result-pending {
    border-left: 5px solid #ffc107;
    background: #fffef5;
}

.csv-result-content {
    padding-right: 80px;
}

.csv-result-isbn {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #666;
    font-family: monospace;
    font-weight: 600;
}

.csv-result-titre {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

.csv-result-prix {
    margin: 0;
    font-size: 24px;
    font-weight: bold;
    color: #5A8F15;
}

.csv-result-pending-text {
    margin: 0;
    font-size: 14px;
    color: #856404;
    font-style: italic;
}

/* Bouton supprimer */
.csv-delete-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    background: #dc3545;
    color: white;
    border: none;
    padding: 7px 14px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.csv-delete-btn:hover {
    background: #c82333;
    transform: scale(1.05);
}

.csv-delete-pending {
    background: #ffc107;
    color: #333;
}

.csv-delete-pending:hover {
    background: #e0a800;
}

/* Section Total */
.csv-total-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 30px;
    border-radius: 8px;
    margin-top: 25px;
    text-align: center;
    border: 2px solid #e0e0e0;
}

.csv-total-amount {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
}

.csv-total-amount strong {
    display: block;
    margin-bottom: 12px;
    font-size: 17px;
    color: #555;
}

.csv-total-amount span {
    display: block;
    color: #F56B2A;
    font-weight: bold;
    font-size: 36px;
    margin: 15px 0;
}

.csv-total-amount p {
    font-size: 13px;
    color: #666;
    margin: 10px 0 0 0;
    font-style: italic;
}

/* Bouton CTA pour afficher le formulaire de contact */
.csv-btn-request-buyback {
    width: 100%;
    max-width: 100%;
    margin: 20px 0 0 0;
    display: block;
    padding: 18px 30px;
    background: #5A8F15;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(90, 143, 21, 0.3);
}

.csv-btn-request-buyback:hover:not(:disabled) {
    background: #4A7A10;
    box-shadow: 0 8px 16px rgba(90, 143, 21, 0.4);
    transform: translateY(-3px);
}

.csv-btn-request-buyback:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #ccc;
}

.csv-btn-request-buyback:active:not(:disabled) {
    transform: translateY(0);
}

.csv-minimum-products-text {
    text-align: center;
    color: #dc3545;
    font-size: 13px;
    margin-top: 10px;
    font-weight: 600;
    display: none;
}

.csv-minimum-products-text.active {
    display: block;
}

/* ================================================
   SECTION CONTACT - FORMULAIRE DE CONTACT (BLOC 3)
   ================================================ */
.csv-contact-section {
    display: none;
    max-width: 1800px;
    margin: 30px 0 20px 0;
    padding: 0;
}

/* Formulaire de contact - BLOC 3 DISTINCT */
.csv-contact-form {
    background: #ffffff;
    padding: 25px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(245, 107, 42, 0.15);
    border: 2px solid #F56B2A;
    display: none;
    max-width: 100%;
}

.csv-contact-form.active {
    display: block;
}

.csv-contact-form h3 {
    color: #F56B2A;
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 24px;
    text-align: center;
    font-weight: bold;
}

.csv-contact-form > p {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
    text-align: center;
}

/* Grille pour les champs du formulaire - TOUJOURS 3 COLONNES SUR MÊME LIGNE */
.csv-contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 20px;
}

.csv-form-group {
    margin-bottom: 0;
}

.csv-form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.csv-form-group label .required {
    color: #dc3545;
    font-size: 16px;
}

.csv-form-group input {
    width: 100%;
    padding: 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s ease;
    background-color: #ffffff;
    color: #333;
}

.csv-form-group input:focus {
    outline: none;
    border-color: #F56B2A;
    box-shadow: 0 0 0 3px rgba(245, 107, 42, 0.1);
}

.csv-form-group input.error {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.csv-error-message {
    color: #dc3545;
    font-size: 13px;
    margin-top: 5px;
    display: none;
}

.csv-error-message.active {
    display: block;
}

/* Section CGU */
.csv-cgu-section {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    text-align: center;
}

.csv-cgu-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    gap: 12px;
}

.csv-cgu-label input[type="checkbox"] {
    width: 24px;
    height: 24px;
    cursor: pointer;
    flex-shrink: 0;
}

.csv-cgu-label span {
    font-size: 16px;
    color: #333;
    line-height: 1.5;
}

.csv-cgu-label a {
    color: #F56B2A;
    text-decoration: underline;
    font-weight: 600;
}

.csv-cgu-label a:hover {
    color: #E55A19;
}

/* Bouton Envoyer - GRAND ET VISIBLE */
.csv-btn-success {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: block;
    padding: 16px 30px;
    background: #5A8F15;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 17px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(90, 143, 21, 0.3);
}

.csv-btn-success:hover:not(:disabled) {
    background: #4A7A10;
    box-shadow: 0 8px 16px rgba(90, 143, 21, 0.4);
    transform: translateY(-3px);
}

.csv-btn-success:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #ccc;
}

.csv-btn-success:active:not(:disabled) {
    transform: translateY(0);
}

.csv-info-text {
    text-align: center;
    color: #666;
    font-size: 12px;
    margin-top: 12px;
    line-height: 1.4;
}

/* ================================================
   ALERTES
   ================================================ */
.csv-alert {
    padding: 18px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 2px solid;
}

.csv-alert-warning {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.csv-alert-info {
    background: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

.csv-alert-error {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

/* ================================================
   RESPONSIVE - TABLETTE
   ================================================ */
@media (max-width: 1200px) {
    .csv-main-section {
        padding: 40px 15px;
    }
    
    .csv-main-grid {
        grid-template-columns: 600px 1fr;
        gap: 40px;
        padding-left: 0;
        margin-left: 0;
    }
    
    .csv-search-column {
        padding: 30px;
    }
    
    .csv-results-column {
        padding: 30px;
    }
    
    #all-results-list {
        max-height: 450px;
    }
    
    .csv-contact-section {
        margin: 25px 15px 20px 15px;
    }
    
    .csv-contact-form {
        padding: 25px 30px;
    }
    
    /* MODIFICATION : Les 3 blocs restent sur la même ligne en tablette */
    .csv-contact-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

/* ================================================
   RESPONSIVE - MOBILE
   ================================================ */
@media (max-width: 768px) {
    .csv-main-section {
        padding: 20px 10px;
    }
    
    .csv-main-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding-left: 0;
        margin-left: 0;
    }
    
    .csv-search-column {
        position: static;
        padding: 20px;
        box-shadow: none;
        border: none;
    }
    
    .csv-search-title {
        font-size: 18px;
    }
    
    #search-term {
        min-height: 100px;
        font-size: 14px;
    }
    
    .csv-btn-primary {
        font-size: 16px;
        padding: 16px 30px;
        width: auto;
        min-width: 120px;
    }
    
    .csv-results-column {
        padding: 20px;
        box-shadow: none;
        border: none;
    }
    
    .csv-empty-icon {
        font-size: 60px;
    }
    
    .csv-empty-message h3 {
        font-size: 20px;
    }
    
    .csv-empty-message p {
        font-size: 15px;
    }
    
    .csv-results-header {
        flex-direction: column;
        gap: 15px;
        padding-bottom: 15px;
    }
    
    .csv-results-header h3 {
        text-align: center;
        font-size: 18px;
    }
    
    .csv-btn-danger {
        width: 100%;
    }
    
    #all-results-list {
        max-height: 400px;
        padding: 5px;
    }
    
    .csv-result-item {
        padding: 15px;
        margin-bottom: 12px;
    }
    
    .csv-result-content {
        padding-right: 55px;
    }
    
    .csv-result-titre {
        font-size: 15px;
    }
    
    .csv-result-prix {
        font-size: 22px;
    }
    
    .csv-delete-btn {
        padding: 6px 12px;
        font-size: 11px;
        top: 12px;
        right: 12px;
    }
    
    .csv-total-section {
        padding: 25px;
        margin-top: 20px;
    }
    
    .csv-total-amount span {
        font-size: 32px;
    }
    
    .csv-contact-section {
        margin: 25px 10px 20px 10px;
        padding: 0;
    }
    
    .csv-contact-form {
        padding: 20px 15px;
    }
    
    .csv-contact-form h3 {
        font-size: 20px;
    }
    
    .csv-contact-form > p {
        font-size: 13px;
        margin-bottom: 18px;
    }
    
    /* MODIFICATION : Les 3 blocs restent sur la même ligne en mobile */
    .csv-contact-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .csv-form-group input {
        padding: 12px 8px;
        font-size: 14px;
    }
    
    .csv-form-group label {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .csv-cgu-section {
        padding: 15px;
        margin: 12px 0;
    }
    
    .csv-btn-success {
        padding: 15px 25px;
        font-size: 16px;
        max-width: 100%;
    }
    
    .csv-btn-request-buyback {
        padding: 16px 25px;
        font-size: 16px;
    }
    
    .csv-minimum-products-text {
        font-size: 12px;
        margin-top: 8px;
    }
}

/* ================================================
   ANIMATIONS ET TRANSITIONS
   ================================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.csv-result-item {
    animation: fadeIn 0.3s ease-out;
}

/* ================================================
   UTILITAIRES
   ================================================ */
.csv-hidden {
    display: none !important;
}

.csv-visible {
    display: block !important;
}

/* Force background blanc pour les inputs */
input[type="text"],
input[type="email"],
textarea {
    background-color: #ffffff !important;
    color: #333 !important;
}

/* ================================================
   AJUSTEMENTS SPÉCIFIQUES
   ================================================ */
#search-result {
    margin-top: 20px;
}