/**
 * STYLES POUR LA MODALE DE VENTE DE LIVRES
 * 
 * À inclure dans books.html avec :
 * <link rel="stylesheet" href="/assets/css/books-modal.css">
 */

/* === MODALE PRINCIPALE === */
.livre-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.livre-modal.active {
    display: block;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
}

.modal-container {
    position: relative;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    margin: 5vh auto;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.8);
    overflow-y: auto;
    animation: slideUp 0.4s ease;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 2em;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* === CONTENU === */
.modal-content {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 40px;
    padding: 40px;
}

/* === COLONNE GAUCHE (Couverture) === */
.modal-left {
    position: sticky;
    top: 0;
    align-self: start;
}

.modal-cover {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    margin-bottom: 20px;
}

.modal-title {
    font-size: 2em;
    font-weight: 800;
    color: #fbbf24;
    text-align: center;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* === COLONNE DROITE (Formulaire) === */
.modal-right {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.modal-argumentaire {
    background: rgba(15, 23, 42, 0.6);
    padding: 25px;
    border-radius: 12px;
    border-left: 4px solid #fbbf24;
    line-height: 1.8;
    font-size: 1.05em;
    color: #cbd5e1;
    white-space: pre-line;
}

/* === FORMULAIRE === */
.modal-form {
    background: rgba(15, 23, 42, 0.6);
    padding: 30px;
    border-radius: 12px;
}

.modal-form h3 {
    color: #fbbf24;
    font-size: 1.5em;
    margin: 0 0 10px 0;
    text-align: center;
}

.form-subtitle {
    text-align: center;
    color: #94a3b8;
    margin: 0 0 25px 0;
    font-size: 0.95em;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #94a3b8;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95em;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px;
    background: rgba(30, 41, 59, 0.8);
    border: 2px solid #334155;
    border-radius: 8px;
    color: white;
    font-size: 1em;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #fbbf24;
    background: rgba(30, 41, 59, 1);
}

.phone-input {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 10px;
}

.form-info {
    background: rgba(59, 130, 246, 0.1);
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 3px solid #3b82f6;
    color: #93c5fd;
    font-size: 0.95em;
}

.bonus-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.1));
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

.bonus-title {
    font-weight: 700;
    color: #fbbf24;
    margin-bottom: 10px;
    font-size: 1.05em;
}

.bonus-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bonus-info li {
    padding: 8px 0;
    color: #cbd5e1;
    font-size: 0.95em;
}

/* === BOUTONS === */
.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn {
    padding: 18px;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
    display: block;
}

.btn-sample {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.btn-sample:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
}

.btn-acheter {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #0f172a;
}

.btn-acheter:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(251, 191, 36, 0.4);
}

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

.btn-kdp {
    background: linear-gradient(135deg, #ff9900, #ff7700);
    color: white;
}

.btn-kdp:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 153, 0, 0.4);
}

/* === MESSAGE DE SUCCÈS === */
.modal-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.1));
    padding: 40px;
    border-radius: 12px;
    border: 2px solid #10b981;
    text-align: center;
}

.modal-success h3 {
    color: #10b981;
    font-size: 2em;
    margin: 0 0 15px 0;
}

.modal-success p {
    color: #10b981;
    font-size: 1.2em;
    margin: 0;
}

/* === OVERLAY PAYPAL === */
.paypal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 20000;
    align-items: center;
    justify-content: center;
}

.paypal-overlay.active {
    display: flex;
}

.paypal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    position: relative;
}

.paypal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2em;
    cursor: pointer;
    color: #666;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s;
}

.paypal-close:hover {
    background: #f3f4f6;
    transform: rotate(90deg);
}

.paypal-content h2 {
    color: #0f172a;
    margin: 0 0 20px 0;
    text-align: center;
    font-size: 1.5em;
}

/* === ANIMATIONS === */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === RESPONSIVE === */
@media (max-width: 968px) {
    .modal-container {
        width: 95%;
        margin: 2vh auto;
        max-height: 96vh;
    }
    
    .modal-content {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 30px 20px;
    }
    
    .modal-left {
        position: relative;
    }
    
    .modal-title {
        font-size: 1.5em;
    }
    
    .modal-close {
        width: 40px;
        height: 40px;
        font-size: 1.5em;
    }
}

@media (max-width: 640px) {
    .modal-content {
        padding: 20px 15px;
    }
    
    .modal-form {
        padding: 20px;
    }
    
    .btn {
        padding: 16px;
        font-size: 1em;
    }
}
