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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    min-height: 100vh;
    color: #333;
}

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

.header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.main-content {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    padding: 40px;
    margin-bottom: 30px;
}

.tabs-container {
    margin-bottom: 30px;
}

.tabs {
    display: flex;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 5px;
    margin-bottom: 30px;
    overflow-x: auto;
}

.tab-button {
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: fit-content;
}

.tab-button.active {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.3);
}

.tab-button:hover:not(.active) {
    background: #e9ecef;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.form-section h2 {
    color: #0284c7;
    font-size: 1.5rem;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.tab-helper {
    margin-bottom: 20px;
    color: #4b5563;
    font-size: 0.95rem;
    line-height: 1.5;
}

.section-intro {
    margin-bottom: 20px;
    color: #4b5563;
    font-size: 1rem;
    line-height: 1.6;
}

.hidden {
    display: none !important;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.checkbox-item:hover {
    background: #e9ecef;
}

.checkbox-item input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
    transform: scale(1.2);
}

.remise-checklist {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 15px;
    margin: 25px 0 15px;
}

.remise-checklist .checkbox-item {
    margin: 0;
}

.locataire-item, .piece-item, .compteur-item, .cle-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
}

.single-index-container {
    margin-top: 15px;
}

.dual-index-container {
    margin-top: 15px;
    padding: 15px;
    background: #f0f9ff;
    border-radius: 10px;
    border: 1px dashed #0284c7;
}

.dual-index-info {
    margin-bottom: 12px;
    color: #0369a1;
    font-size: 0.9rem;
}

.remove-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.add-button {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.add-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

.signature-section {
    margin-top: 40px;
}

.signatures-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.signature-canvas {
    border: 2px dashed #0284c7;
    border-radius: 10px;
    cursor: crosshair;
    display: block;
    margin: 20px auto;
    background: #fafafa;
    width: 100%;
    max-width: 400px;
    height: 150px;
}

.signature-buttons {
    text-align: center;
    margin-top: 15px;
}

.btn {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 10px;
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(2, 132, 199, 0.4);
}

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

.btn-secondary {
    background: #6c757d;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.4);
}

.btn-generate {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    font-size: 18px;
    padding: 15px 40px;
    margin-top: 30px;
    box-shadow: 0 4px 20px rgba(40, 167, 69, 0.3);
}

.btn-generate:hover {
    box-shadow: 0 8px 30px rgba(40, 167, 69, 0.4);
}

.date-location {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.photo-section {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px dashed #0284c7;
}

.photo-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 10px;
}

.photo-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.photo-preview img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    border: 2px solid #ddd;
    cursor: pointer;
}

.photo-preview img:hover {
    border-color: #0284c7;
    transform: scale(1.05);
    transition: all 0.3s ease;
}

.equipement-photo-section {
    margin-top: 15px;
    padding: 10px;
    background: #e8f4f8;
    border-radius: 8px;
    border: 1px solid #b3d9e6;
}

.equipement-photo-section h4 {
    color: #0284c7;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.keys-photo-section h4 {
    color: #0284c7;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .main-content {
        padding: 20px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .date-location {
        grid-template-columns: 1fr;
    }

    .signatures-grid {
        grid-template-columns: 1fr;
    }

    .tabs {
        flex-direction: column;
    }

    .tab-button {
        text-align: center;
    }

    /* Styles pour les boutons d'action sur mobile */
    #newEtatBtn, #saveEtatBtn, #generatePdfBtn {
        margin: 0 auto 15px auto !important;
        width: 100%;
        max-width: 280px;
        display: block;
    }

    /* Container des boutons d'action */
    .main-content > div[style*="text-align: center"]:last-child {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0;
    }

    /* Afficher le lien d'installation sur mobile même sans prompt */
    #installLink {
        display: inline !important;
    }

    /* Correction du sélecteur de date sur iOS */
    input[type="date"] {
        max-width: 100% !important;
        box-sizing: border-box !important;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }

    /* Style personnalisé pour le sélecteur de date sur iOS */
    input[type="date"]::-webkit-calendar-picker-indicator {
        width: 20px;
        height: 20px;
        cursor: pointer;
    }
}

.required {
    color: #dc3545;
}

/* Styles pour validation en temps réel */
.field-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

.field-success {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1) !important;
}

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

.error-message.show {
    display: block;
}

.validation-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
}

.form-group {
    position: relative;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: none;
}

.piece-etat-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 3fr;
    gap: 15px;
    align-items: end;
}

.piece-elements-section {
    margin-top: 20px;
    padding: 15px;
    background: #f0f4f8;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.piece-elements-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.piece-element-item {
    position: relative;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
}

.piece-element-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
}

.add-element-button {
    align-self: flex-start;
    background: linear-gradient(135deg, #0d6efd 0%, #38bdf8 100%);
    color: #ffffff;
    border: none;
    border-radius: 20px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.25);
}

.add-element-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.35);
}

/* Styles pour les animations et modals */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#confirmModal button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

#confirmSave:hover {
    background: linear-gradient(135deg, #047857 0%, #059669 100%) !important;
}

#confirmContinue:hover {
    background: #4b5563 !important;
}

#confirmCancel:hover {
    background: #b91c1c !important;
}

/* Classes pour remplacer les styles inline */
.text-center {
    text-align: center;
}

.intro-section {
    text-align: center;
    margin-bottom: 30px;
}

.intro-title {
    color: #0284c7;
    font-size: 1.8rem;
}

/* Section de gestion des codes d'accès */
.code-management-section {
    margin-bottom: 25px;
}

.code-status-card {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    margin-top: 15px;
}

.code-status-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.code-status-card.has-code {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-color: #059669;
}

.code-status-card.no-code {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #d97706;
}

.code-status-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #374151;
}

.code-status-card.has-code .code-status-title {
    color: #059669;
}

.code-status-card.no-code .code-status-title {
    color: #d97706;
}

.code-status-info {
    margin-bottom: 15px;
    color: #6b7280;
    font-size: 0.9rem;
}

.code-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.code-action-btn {
    background: #0ea5e9;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.code-action-btn:hover {
    background: #0284c7;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.code-action-btn.secondary {
    background: #6b7280;
}

.code-action-btn.secondary:hover {
    background: #4b5563;
}

.code-action-btn.success {
    background: #059669;
}

.code-action-btn.success:hover {
    background: #047857;
}

.code-display {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: bold;
    color: #059669;
    background: rgba(255,255,255,0.7);
    padding: 8px 16px;
    border-radius: 6px;
    display: inline-block;
    margin: 5px 0;
}

/* Responsive pour la gestion des codes */
@media (max-width: 600px) {
    .code-actions {
        flex-direction: column;
        align-items: center;
    }

    .code-action-btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }

    .code-status-info {
        font-size: 0.85rem;
    }

    .code-display {
        font-size: 1rem;
        padding: 6px 12px;
    }
}

.signature-title {
    text-align: center;
    margin-bottom: 15px;
}

.equipment-section {
    margin-top: 30px;
}

.action-buttons {
    text-align: center;
}

.btn-spacing {
    margin-right: 15px;
}

.install-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.install-text {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.install-link {
    color: #0284c7;
    text-decoration: none;
    font-weight: 500;
}

.historique-section {
    margin-top: 30px;
}

.historique-title {
    color: #0284c7;
    margin-bottom: 20px;
    text-align: center;
}

.historique-empty {
    text-align: center;
    color: #666;
    font-style: italic;
}
.historique-actions {
    margin-top: 16px;
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.historique-actions-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.historique-helper {
    color: #64748b;
    font-size: 0.85rem;
    margin: 0;
}

.historique-action-btn {
    background: #e2e8f0;
    color: #1f2937;
    border: 1px solid #cbd5f5;
    box-shadow: none;
    padding: 6px 14px;
    font-size: 0.85rem;
}

.historique-action-btn:hover {
    background: #dbeafe;
    box-shadow: none;
    color: #1e293b;
}


/* Styles pour la card d'installation PWA */
.install-card {
    margin-top: 30px;
}

.install-card-title {
    color: #0284c7;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.install-card-content {
    text-align: center;
}

.install-card-text {
    font-size: 1.1rem;
    margin-bottom: 25px;
    color: #666;
}

.install-button {
    display: inline-block;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    padding: 15px 35px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.3);
}

.install-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(2, 132, 199, 0.4);
}

.install-button:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .install-button {
        width: 100%;
        max-width: 280px;
        padding: 18px 25px;
    }
}

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

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    max-width: 400px;
    text-align: center;
}

.modal-title {
    color: #0284c7;
    margin-bottom: 20px;
}

.modal-text {
    margin-bottom: 20px;
}

.access-code-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    margin-bottom: 20px;
    text-align: center;
    text-transform: uppercase;
}

.purchase-link-section {
    margin-top: 15px;
}

.purchase-link {
    color: #0284c7;
}

.preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 10000;
    overflow-y: auto;
}

.preview-container {
    max-width: 800px;
    margin: 20px auto;
    background: white;
    border-radius: 10px;
    position: relative;
}

.preview-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-title {
    margin: 0;
    color: #0284c7;
}

.preview-close-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
}

.preview-content {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

.preview-footer {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    background: #f8f9fa;
    border-radius: 0 0 10px 10px;
}

.preview-footer-text {
    color: #666;
    margin-bottom: 15px;
}

.confirm-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 10001;
    align-items: center;
    justify-content: center;
}

.confirm-content {
    background: white;
    border-radius: 20px;
    max-width: 500px;
    margin: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

.confirm-header {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    padding: 25px;
    text-align: center;
}

.confirm-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.confirm-title {
    margin: 0;
    color: white;
    font-size: 1.4rem;
    font-weight: 600;
}

.confirm-body {
    padding: 30px;
}

.confirm-message {
    color: #374151;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 25px;
    text-align: center;
}

.confirm-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.confirm-btn-save {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    border: none;
    padding: 12px 25px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.confirm-btn-continue {
    background: #6b7280;
    border: none;
    padding: 12px 25px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.confirm-btn-cancel {
    background: #dc2626;
    border: none;
    padding: 12px 25px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ========================================
   STYLES POUR LE NOUVEAU SYSTÈME DE PAIEMENT
   ======================================== */

/* Modal de sélection de produits */
#productModal .modal-content {
    max-width: 700px;
    width: 95%;
}

.products-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.product-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 15px;
    padding: 25px;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.product-card:hover {
    border-color: #0ea5e9;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.15);
}

.product-card.popular {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.product-card.popular:hover {
    border-color: #d97706;
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.2);
}

.popular-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.product-name {
    margin: 0;
    color: #1f2937;
    font-size: 1.3rem;
    font-weight: 700;
}

.product-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: #0ea5e9;
}

.product-description {
    color: #6b7280;
    margin-bottom: 20px;
    font-size: 14px;
}

.product-features {
    margin-bottom: 25px;
}

.product-feature {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    color: #374151;
    font-size: 14px;
}

.product-select-btn {
    width: 100%;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    border: none;
    padding: 15px 20px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-select-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(2, 132, 199, 0.4);
}

.product-card.popular .product-select-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.product-card.popular .product-select-btn:hover {
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

.email-section {
    background: #f8fafc;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.email-section label {
    color: #374151;
}

.email-section input[type="email"] {
    margin-top: 8px;
}

.email-section input[type="email"]:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* Responsive design pour les produits */
@media (max-width: 768px) {
    .products-list {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    #productModal .modal-content {
        width: 95%;
        margin: 10px auto;
        max-height: 95vh;
        overflow-y: auto;
        padding: 20px;
        display: flex;
        flex-direction: column;
    }

    #productModal .modal-title {
        font-size: 1.3rem;
        margin-bottom: 15px;
        text-align: center;
    }

    #productModal .products-list {
        flex: 1;
        overflow-y: auto;
        margin: 15px 0;
        padding-right: 5px;
    }

    .product-card {
        padding: 20px;
        margin-bottom: 0;
    }

    .product-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .popular-badge {
        right: 15px;
        font-size: 11px;
        padding: 4px 12px;
    }

    .product-name {
        font-size: 1.1rem;
    }

    .product-price {
        font-size: 1.5rem;
    }

    .product-description {
        font-size: 13px;
        line-height: 1.4;
    }

    .product-feature {
        font-size: 13px;
    }

    .product-select-btn {
        padding: 12px 16px;
        font-size: 14px;
    }
}

/* Styles pour le modal de paiement intégré */
.payment-modal {
    max-width: 900px !important;
    width: 95% !important;
}

.payment-modal .email-section {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 25px;
}

.payment-modal .email-section label {
    color: #374151;
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
}

.payment-modal .email-section input[type="email"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.payment-modal .email-section input[type="email"]:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.payment-modal .email-section input[type="email"].valid {
    border-color: #10b981;
    background-color: #f0fdf4;
}

.payment-modal .email-section input[type="email"].invalid {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.validation-message {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 500;
}

.validation-message.valid {
    color: #10b981;
}

.validation-message.invalid {
    color: #ef4444;
}

.products-grid.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.product-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.product-card:hover {
    border-color: #0ea5e9;
    box-shadow: 0 10px 25px rgba(14, 165, 233, 0.15);
    transform: translateY(-2px);
}

.product-card.popular {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.product-card.popular::before {
    content: "⭐ Le plus populaire";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #f59e0b;
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.product-name {
    font-size: 20px;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 8px;
}

.product-price {
    font-size: 32px;
    font-weight: bold;
    color: #0ea5e9;
    margin-bottom: 12px;
}

.product-description {
    color: #6b7280;
    margin-bottom: 20px;
    line-height: 1.5;
}

.product-select-btn {
    width: 100%;
    padding: 12px 24px;
    background: #0ea5e9;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-select-btn:hover {
    background: #0284c7;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.3);
}

.product-card.popular .product-select-btn {
    background: #f59e0b;
}

.product-card.popular .product-select-btn:hover {
    background: #d97706;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
}

@media (max-width: 768px) {
    .payment-modal {
        width: 98% !important;
        margin: 10px auto !important;
        max-height: 95vh !important;
        overflow-y: auto !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .payment-modal .modal-title {
        font-size: 1.3rem !important;
        margin-bottom: 15px !important;
        flex-shrink: 0 !important;
    }

    .payment-modal .email-section {
        flex-shrink: 0 !important;
        margin-bottom: 20px !important;
        padding: 15px !important;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        flex: 1 !important;
        overflow-y: auto !important;
        padding-right: 5px !important;
    }

    .product-card {
        padding: 18px !important;
        margin-bottom: 0 !important;
    }

    .product-card.popular::before {
        font-size: 11px !important;
        padding: 4px 12px !important;
        top: -8px !important;
    }
}

/* Styles spécifiques pour très petits écrans (smartphones) */
@media (max-width: 480px) {
    #productModal .modal-content {
        width: 98% !important;
        margin: 5px auto !important;
        max-height: 98vh !important;
        padding: 15px !important;
    }

    .payment-modal {
        width: 98% !important;
        margin: 5px auto !important;
        max-height: 98vh !important;
        padding: 15px !important;
    }

    .products-list,
    .products-grid {
        gap: 12px !important;
        max-height: calc(100vh - 200px) !important;
        overflow-y: auto !important;
    }

    .product-card {
        padding: 15px !important;
        border-radius: 12px !important;
    }

    .product-name {
        font-size: 1rem !important;
    }

    .product-price {
        font-size: 1.3rem !important;
    }

    .product-description {
        font-size: 12px !important;
        line-height: 1.3 !important;
        margin-bottom: 15px !important;
    }

    .product-features {
        margin-bottom: 15px !important;
    }

    .product-feature {
        font-size: 12px !important;
        margin-bottom: 6px !important;
    }

    .product-select-btn {
        padding: 10px 14px !important;
        font-size: 13px !important;
    }

    .modal-title {
        font-size: 1.2rem !important;
        margin-bottom: 10px !important;
    }

    .email-section {
        padding: 12px !important;
        margin-bottom: 15px !important;
    }

    .email-section input[type="email"] {
        padding: 10px 12px !important;
        font-size: 14px !important;
    }
}
.checkbox-field {
    display: flex;
    align-items: center;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #374151;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #0ea5e9;
    cursor: pointer;
}
