
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

h1 {
    color: #1a1a1a;
    font-size: 2.2rem;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.cart-icon {
    position: relative;
    cursor: pointer;
    padding: 10px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.cart-icon:hover {
    background-color: #f0f0f0;
}

.cart-icon svg {
    width: 24px;
    height: 24px;
    fill: #333;
}

.cart-count {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #000;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.search-section {
    background: white;
    padding: 30px;
    border: 1px solid #e1e5e9;
    margin-bottom: 40px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.search-form {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

label {
    font-size: 1rem;
    font-weight: 500;
    color: #333;
}

.input-container {
    position: relative;
    display: inline-block;
}

input[type="text"] {
    padding: 12px 16px;
    padding-right: 40px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    width: 300px;
    transition: border-color 0.2s ease;
    outline: none;
}

input[type="text"]:focus {
    border-color: #000;
}

.clear-input {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: none !important;
}

.clear-input.visible {
    opacity: 1;
    visibility: visible;
}

.clear-input:hover {
    background: none !important;
    transform: translateY(-50%) !important;
    box-shadow: none !important;
    color: #999 !important;
    transition: none !important;
}

button {
    background: #000;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

button:hover {
    background: #333;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.results-title {
    color: #1a1a1a;
    font-size: 1.8rem;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 600;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.book-card {
    background: white;
    border: 1px solid #e1e5e9;
    padding: 20px;
    text-align: center;
    transition: box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.book-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.book-image {
    width: 100%;
    height: auto;
    max-height: 280px;
    object-fit: contain;
    margin-bottom: 15px;
    border: 1px solid #f0f0f0;
    transition: opacity 0.3s ease;
}

.book-image[data-loaded="false"] {
    opacity: 0.3;
}

.book-image[data-loaded="true"] {
    opacity: 1;
}

.book-image[data-loaded="error"] {
    opacity: 0.5;
    filter: grayscale(1);
}

.book-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
    line-height: 1.3;
}

.book-author {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
    flex-grow: 1;
}

.image-link {
    display: inline-block;
    background: #000;
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
    margin-top: auto;
    cursor: pointer;
}

.image-link:hover {
    background: #333;
}

.no-results {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    background: white;
    padding: 40px;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
}

/* Loader styles */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(2px);
}

.loader {
    text-align: center;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e5e9;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

.loader p {
    margin: 0;
    color: #666;
    font-size: 1rem;
    font-weight: 500;
}

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

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(3px);
}

.modal-content {
    background: white;
    border-radius: 8px;
    max-width: 95vw;
    max-height: 95vh;
    width: 90vw;
    height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e1e5e9;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.3rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #e9ecef;
    color: #333;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.preview-page {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.watermark-line {
    user-select: none;
}

.book-group {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.book-cover {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.book-separator {
    box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.1);
}

/* Styles pour le panier */
.back-link {
    color: #666;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: #000;
}

.cart-section {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.cart-header {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #e1e5e9;
    font-weight: 600;
    color: #333;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.cart-item:hover {
    background-color: #fafafa;
}

.cart-item:last-child {
    border-bottom: none;
}

.item-image {
    width: 80px;
    height: 120px;
    object-fit: contain;
    border: 1px solid #f0f0f0;
    margin-right: 20px;
    border-radius: 4px;
}

.item-details {
    flex-grow: 1;
}

.item-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 5px;
}

.item-author {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    background: #f0f0f0;
    color: #333;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:hover {
    background: #e0e0e0;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.quantity-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.quantity-display {
    font-weight: 600;
    min-width: 30px;
    text-align: center;
    font-size: 1.1rem;
    color: #333;
}

.remove-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

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

.empty-cart {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-cart h2 {
    margin-bottom: 20px;
    color: #333;
}

.cart-footer {
    background: #f8f9fa;
    padding: 20px;
    border-top: 1px solid #e1e5e9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-actions {
    display: flex;
    gap: 10px;
}

.total-items {
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
}

.preview-btn {
    background: #000;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preview-btn:hover {
    background: #333;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.preview-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.buy-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.buy-btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.buy-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Styles pour les pages de paiement */
.payment-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 30px;
}

.order-summary {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.order-summary h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.3rem;
}

.cart-items {
    margin-bottom: 20px;
}

.cart-items .cart-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cart-items .cart-item:last-child {
    border-bottom: none;
}

.cart-items .item-image {
    width: 60px;
    height: 90px;
    object-fit: contain;
    border: 1px solid #f0f0f0;
    margin-right: 15px;
    border-radius: 4px;
}

.cart-items .item-details {
    flex: 1;
}

.cart-items .item-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.cart-items .item-author {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.cart-items .item-quantity {
    color: #999;
    font-size: 0.8rem;
}

.cart-items .item-price {
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
}

.order-total {
    border-top: 2px solid #e1e5e9;
    padding-top: 20px;
    margin-top: 20px;
}

.total-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 600;
}

.total-amount {
    color: #007bff;
    font-size: 1.4rem;
}

.payment-form {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.payment-form h2 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.3rem;
}

.payment-form p {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

.checkout-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.checkout-btn:hover {
    background: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* Styles pour la page de succès */
.success-section {
    text-align: center;
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 50px 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-top: 30px;
}

.success-icon {
    color: #28a745;
    margin-bottom: 20px;
}

.success-section h1 {
    color: #28a745;
    margin-bottom: 15px;
    font-size: 2rem;
}

.success-message {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.order-details {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 25px;
    margin: 30px 0;
    text-align: left;
}

.order-details h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.2rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row span:first-child {
    color: #666;
    font-weight: 500;
}

.detail-row span:last-child {
    color: #333;
    font-weight: 600;
}

.next-steps {
    text-align: left;
    margin: 30px 0;
}

.next-steps h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.next-steps ul {
    color: #666;
    line-height: 1.8;
    padding-left: 20px;
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

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

.btn-secondary:hover {
    background: #545b62;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

@media (max-width: 768px) {
    .search-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    input[type="text"] {
        width: 100%;
        font-size: 16px; /* Évite le zoom sur iOS */
    }

    .input-container {
        width: 100%;
    }
    
    .books-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
    
    h1 {
        font-size: 1.6rem;
    }
    
    .container {
        padding: 12px;
    }

    .cart-item {
        flex-direction: row;
        text-align: left;
        padding: 15px;
        align-items: center;
    }

    .item-image {
        margin-right: 15px;
        margin-bottom: 0;
        width: 70px;
        height: 105px;
        flex-shrink: 0;
    }

    .item-details {
        flex: 1;
        min-width: 0;
    }

    .quantity-controls {
        justify-content: flex-end;
        margin: 0;
        gap: 8px;
        flex-shrink: 0;
    }

    .quantity-btn {
        width: 28px;
        height: 28px;
        font-size: 1rem;
    }

    .remove-btn {
        width: 32px;
        height: 32px;
        padding: 6px;
    }

    .cart-footer {
        flex-direction: column;
        gap: 12px;
        padding: 15px;
    }

    .cart-actions {
        flex-direction: column;
        width: 100%;
    }

    .preview-btn,
    .download-btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 1rem;
    }

    .payment-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .order-summary,
    .payment-form {
        padding: 20px;
    }

    .success-section {
        padding: 30px 20px;
    }

    .action-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        text-align: center;
    }

    .preview-btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 1rem;
    }

    .search-section {
        padding: 20px;
        margin-bottom: 30px;
    }

    .book-card {
        padding: 15px;
    }

    .book-title {
        font-size: 0.9rem;
    }

    .book-author {
        font-size: 0.8rem;
    }

    .loader {
        padding: 20px;
        margin: 20px;
    }

    .loader-spinner {
        width: 32px;
        height: 32px;
    }

    .loader p {
        font-size: 0.9rem;
    }

    .modal-content {
        width: 95vw;
        height: 95vh;
        max-width: 95vw;
        max-height: 95vh;
    }

    .modal-header {
        padding: 15px;
    }

    .modal-header h2 {
        font-size: 1.1rem;
    }

    .modal-body {
        padding: 15px;
    }

    .preview-page {
        transform: scale(0.8);
        transform-origin: top center;
    }

    .preview-page::before {
        font-size: 14px;
        letter-spacing: 1px;
        line-height: 35px;
    }
}

/* Ajout pour les très petits écrans */
@media (max-width: 480px) {
    .container {
        padding: 8px;
    }
    
    .books-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    
    h1 {
        font-size: 1.4rem;
    }
    
    .cart-item {
        padding: 12px;
        flex-direction: row;
        align-items: center;
    }
    
    .item-image {
        width: 60px;
        height: 90px;
        margin-right: 12px;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .item-details {
        flex: 1;
        min-width: 0;
    }

    .quantity-controls {
        justify-content: flex-end;
        margin: 0;
        flex-shrink: 0;
    }

    /* Masquer le bouton preview sur mobile */
    .preview-btn {
        display: none !important;
    }
}

/* Masquer le bouton preview sur les écrans moyens aussi */
@media (max-width: 674px) {
    .preview-btn {
        display: none !important;
    }
}

/* Classes Bootstrap de base */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.justify-content-center {
    justify-content: center;
}

.col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding-right: 15px;
    padding-left: 15px;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding-right: 15px;
    padding-left: 15px;
}

.col-md-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
    padding-right: 15px;
    padding-left: 15px;
}

.col-md-12 {
    flex: 0 0 100%;
    max-width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

/* Classes de margin et padding */
.mb-4 {
    margin-bottom: 1.5rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mt-3 {
    margin-top: 1rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mt-1 {
    margin-top: 0.25rem;
}

.p-4 {
    padding: 1.5rem;
}

.p-3 {
    padding: 1rem;
}

.p-2 {
    padding: 0.5rem;
}

.p-1 {
    padding: 0.25rem;
}

/* Classes de texte */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

/* Classes de display */
.d-flex {
    display: flex;
}

.d-block {
    display: block;
}

.d-none {
    display: none;
}

/* Classes de flex */
.flex-column {
    flex-direction: column;
}

.flex-row {
    flex-direction: row;
}

.align-items-center {
    align-items: center;
}

.justify-content-between {
    justify-content: space-between;
}

.justify-content-start {
    justify-content: flex-start;
}

.justify-content-end {
    justify-content: flex-end;
}

/* Classes de border */
.border {
    border: 1px solid #dee2e6;
}

.border-dark {
    border: 1px solid #343a40;
}

.border-0 {
    border: 0;
}

/* Classes de background */
.bg-light {
    background-color: #f8f9fa;
}

.bg-white {
    background-color: #fff;
}

.bg-dark {
    background-color: #343a40;
}

/* Classes de couleur de texte */
.text-dark {
    color: #343a40;
}

.text-light {
    color: #f8f9fa;
}

.text-muted {
    color: #6c757d;
}

/* Styles pour les alertes flash */
.alert {
    padding: 16px 20px;
    margin: 20px auto;
    max-width: 800px;
    border: 1px solid transparent;
    border-radius: 8px;
    position: relative;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: slideInDown 0.3s ease-out;
}

.alert-success {
    color: #0f5132;
    background: linear-gradient(135deg, #d1e7dd 0%, #badbcc 100%);
    border-color: #a3cfbb;
    border-left: 4px solid #198754;
}

.alert-danger {
    color: #721c24;
    background: linear-gradient(135deg, #f8d7da 0%, #f1b0b7 100%);
    border-color: #f5c2c7;
    border-left: 4px solid #dc3545;
}

.alert-warning {
    color: #664d03;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-color: #ffecb5;
    border-left: 4px solid #ffc107;
}

.alert-info {
    color: #055160;
    background: linear-gradient(135deg, #cff4fc 0%, #b6effb 100%);
    border-color: #b6effb;
    border-left: 4px solid #0dcaf0;
}

.alert-dismissible {
    padding-right: 60px;
}

.btn-close {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    z-index: 2;
    width: 30px;
    height: 30px;
    background: rgba(0, 0, 0, 0.1);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    color: #666;
    opacity: 0.7;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.2);
    color: #333;
    transform: translateY(-50%) scale(1.1);
}

.btn-close::before {
    content: "×";
    font-size: 20px;
    font-weight: bold;
}

/* Animation pour l'apparition des alertes */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive pour les alertes */
@media (max-width: 768px) {
    .alert {
        margin: 15px;
        padding: 14px 16px;
        font-size: 13px;
    }
    
    .alert-dismissible {
        padding-right: 50px;
    }
    
    .btn-close {
        right: 10px;
        width: 25px;
        height: 25px;
    }
}

/* Styles pour le séparateur "or" */
.or-separator {
    text-align: center;
    margin: 30px 0;
    position: relative;
    color: #6c757d;
    font-weight: 600;
    font-size: 16px;
}

.or-separator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #dee2e6 50%, transparent 100%);
    z-index: 1;
}

.or-separator span {
    background: white;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

/* Styles pour la section email */
.email-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 30px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.email-form {
    text-align: center;
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    display: block;
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 16px;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
    outline: none;
}

.input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.input-group .form-control {
    flex: 1;
}

.input-group .btn {
    border-radius: 8px;
    padding: 12px 20px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.form-text {
    font-size: 14px;
    color: #6c757d;
    margin-top: 8px;
}

/* Responsive pour l'email */
@media (max-width: 768px) {
    .email-section {
        padding: 20px;
        margin: 15px;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .input-group .btn {
        width: 100%;
    }
}

/* Styles pour le header avec actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Styles pour la carte premium */
.premium-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border: 2px solid #ffc107;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: #333;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.premium-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.4);
    background: linear-gradient(135deg, #ffed4e 0%, #ffd700 100%);
}

.premium-icon {
    width: 20px;
    height: 20px;
    fill: #333;
}

/* Styles pour la modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fff;
    margin: auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px 12px 0 0;
}

.modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.close:hover {
    color: #333;
}

.modal-body {
    padding: 24px;
}

.modal-body p {
    margin-bottom: 20px;
    color: #666;
    line-height: 1.5;
}

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

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

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.btn-primary {
    background: #007bff;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #545b62;
    transform: translateY(-1px);
}

/* Responsive pour la modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-header {
        padding: 16px 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .header-actions {
        gap: 10px;
    }
    
    .premium-card {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .premium-card span {
        display: none;
    }
    
    /* Responsive pour les cartes premium */
    .premium-card { 
        transform: none; 
    }
    .premium-card:hover { 
        transform: none; 
    }
    
    .already-premium-card { 
        transform: none; 
    }
    .already-premium-card:hover { 
        transform: none; 
    }
    
    .premium-icon-large .premium-icon {
        width: 30px;
        height: 30px;
    }
}

/* Styles pour la carte Premium */
.premium-card {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    border: 2px solid #000 !important;
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
}

/* Styles pour la carte "I'm already premium" */
.already-premium-card {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #ffc107 !important;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.2);
    max-width: 200px;
    margin: 0 auto;
}

.already-premium-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(255, 193, 7, 0.3);
    background: linear-gradient(135deg, #ffeaa7 0%, #fff3cd 100%);
}

.premium-icon-large {
    margin-bottom: 10px;
}

.premium-icon-large .premium-icon {
    width: 30px;
    height: 30px;
    fill: #ffc107;
    filter: drop-shadow(0 2px 4px rgba(255, 193, 7, 0.3));
}

.already-premium-card .card-title {
    color: #856404;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
}

.already-premium-card .card-text {
    color: #856404;
    font-size: 12px;
    margin-bottom: 12px;
}

.already-premium-card .btn-warning {
    background: #ffc107;
    border-color: #ffc107;
    color: #333;
    font-weight: 600;
    transition: all 0.2s ease;
    font-size: 12px;
    padding: 6px 12px;
}

.already-premium-card .card-body {
    padding: 15px 10px;
}

.already-premium-card .btn-warning:hover {
    background: #e0a800;
    border-color: #e0a800;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 193, 7, 0.3);
}

.premium-card::before {
    background: linear-gradient(90deg, #000 0%, #000 50%, #333 100%);
    height: 6px;
}

.premium-card:hover {
    transform: scale(1.08);
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
}

/* Responsive pour les colonnes */
@media (max-width: 768px) {
    .col-md-3,
    .col-md-4,
    .col-md-6,
    .col-md-8,
    .col-md-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .premium-card {
        transform: none;
    }
    
    .premium-card:hover {
        transform: none;
    }
}

/* Styles pour les cartes de plans */
.card {
    border: 1px solid #e1e5e9;
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #000 0%, #333 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.card:hover::before {
    transform: scaleX(1);
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    border-color: #000;
}

.card.border-dark {
    border: 2px solid #000;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
}

.card.border-dark::before {
    background: linear-gradient(90deg, #000 0%, #000 50%, #333 100%);
    height: 6px;
}

.card.border-dark:hover {
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    transform: translateY(-10px) scale(1.03);
}

.card-body {
    padding: 40px 30px;
    position: relative;
}

.card-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #000;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
}

.card-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background: #000;
    border-radius: 2px;
}

.card-price {
    font-size: 3.5rem;
    font-weight: 900;
    color: #000;
    margin-bottom: 5px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1;
}

.card-price::before {
    content: '$';
    font-size: 1.5rem;
    font-weight: 600;
    vertical-align: top;
    margin-right: 4px;
}

.card-text {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 30px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card ul {
    margin-bottom: 35px;
    list-style: none;
}

.card li {
    padding: 12px 0;
    color: #333;
    font-weight: 500;
    font-size: 1rem;
    position: relative;
    padding-left: 30px;
    border-bottom: 1px solid #f5f5f5;
}

.card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 12px;
    color: #000;
    font-weight: 900;
    font-size: 1.1rem;
}

.card li:last-child {
    border-bottom: none;
}

.btn {
    padding: 16px 40px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-outline-dark {
    background: transparent;
    color: #000;
    border-color: #000;
}

.btn-outline-dark:hover {
    background: #000;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.btn-dark {
    background: linear-gradient(135deg, #000 0%, #333 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn-dark:hover {
    background: linear-gradient(135deg, #333 0%, #000 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}

/* Responsive pour les cartes de plans */
@media (max-width: 768px) {
    .card-body {
        padding: 25px 15px;
    }
    
    .card-title {
        font-size: 1.3rem;
    }
    
    .card-price {
        font-size: 2rem;
    }
    
    .card-text {
        font-size: 1rem;
    }
    
    .btn {
        padding: 10px 25px;
        font-size: 0.9rem;
    }
}