/* ================================================
   Storage Payment - Style Storeganise
   Palette Orange/Bleu - Storage Del Norte
   ================================================ */

/* Variables de couleur basées sur Storage Del Norte */
:root {
    /* Couleurs principales - Orange Storage Del Norte */
    --primary-color: #ff6b35;
    --primary-dark: #e55a2b;
    --primary-light: #ff8c61;
    /* Couleurs secondaires - Bleu */
    --secondary-color: #004aad;
    --secondary-light: #1a5fc7;
    /* Couleurs d'état */
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    /* Couleurs neutres */
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --border-color: #dee2e6;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    /* Ombres */
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 4px 12px rgba(255, 107, 53, 0.2);
}

/* Reset et base */
html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-primary);
    background-color: var(--light-bg);
    margin-bottom: 80px;
    line-height: 1.6;
}

/* Header et Navigation */
.storage-header {
    background: var(--white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.storage-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.storage-brand-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
}

.storage-brand-logo {
    max-height: 50px;
    width: auto;
}

/* Conteneur principal */
.payment-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Carte de paiement */
.payment-card {
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}

.payment-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Formulaire */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: block;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

    .form-control:focus {
        border-color: var(--primary-color);
        outline: 0;
        box-shadow: 0 0 0 0.2rem rgba(255, 107, 53, 0.15);
    }

    .form-control:disabled {
        background-color: var(--light-bg);
        opacity: 0.7;
    }

/* Boutons */
.btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 6px;
    transition: all 0.15s ease-in-out;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    color: var(--white);
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(255, 107, 53, 0.2);
}

    .btn-primary:hover {
        background-color: var(--primary-dark);
        border-color: var(--primary-dark);
        box-shadow: var(--shadow-hover);
        transform: translateY(-1px);
    }

    .btn-primary:active {
        transform: translateY(0);
    }

.btn-secondary {
    color: var(--white);
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

    .btn-secondary:hover {
        background-color: var(--secondary-light);
        border-color: var(--secondary-light);
    }

.btn-block {
    display: block;
    width: 100%;
}

/* Informations de session */
.session-info {
    background: linear-gradient(135deg, #fff5f0 0%, #ffeee6 100%);
    border: 1px solid var(--primary-light);
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.session-info-title {
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.session-info-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 107, 53, 0.1);
}

    .session-info-item:last-child {
        border-bottom: none;
    }

.session-info-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.session-info-value {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
}

/* Messages d'erreur */
.error-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.error-icon {
    text-align: center;
    font-size: 4rem;
    color: var(--danger-color);
    margin-bottom: 1rem;
}

.error-title {
    text-align: center;
    color: var(--danger-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.error-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
    color: #721c24;
}

.error-code {
    text-align: center;
    margin: 1rem 0;
}

    .error-code small {
        color: var(--text-secondary);
    }

.technical-details {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.75rem;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    max-height: 100px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* Footer */
.storage-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    min-height: 60px;
    padding: 0.75rem 0;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #003d8f 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.storage-footer-content {
    color: var(--white);
    font-size: 0.875rem;
}

    .storage-footer-content b {
        color: var(--primary-light);
    }

.storage-footer-support {
    margin-top: 0.25rem;
}

.footer-support-link {
    color: var(--primary-light);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.2s ease;
}

    .footer-support-link:hover {
        color: var(--white);
        text-decoration: underline;
    }

/* Lien email support sur page d'erreur */
.support-email-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    border: 2px solid var(--secondary-color);
    border-radius: 25px;
    transition: all 0.2s ease;
}

    .support-email-link:hover {
        background-color: var(--secondary-color);
        color: var(--white);
        text-decoration: none;
    }

/* Grid pour mise en page de cartes */
.row-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .row-cards {
        grid-template-columns: 1fr 1fr;
    }
}

/* Champs groupés (ex: mois/année d'expiration) */
.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 576px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

/* Badge de sécurité */
.security-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #e8f7e8 0%, #d4f1d4 100%);
    border: 1px solid var(--success-color);
    border-radius: 20px;
    font-size: 0.85rem;
    color: #155724;
    margin-top: 1rem;
}

.security-icon {
    color: var(--success-color);
    font-size: 1.2rem;
}

/* Accent orange pour certains éléments */
.accent-bar {
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: 2px;
    margin-bottom: 1rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.4);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(255, 107, 53, 0);
    }
}

.btn-primary:focus {
    animation: pulse 1.5s infinite;
}

/* Validation */
.text-danger {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.validation-error {
    color: var(--danger-color);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 4px;
    display: none;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.is-invalid {
    border-color: var(--danger-color) !important;
    background-color: #fffbfb;
}

    .is-invalid:focus {
        border-color: var(--danger-color);
        box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15);
    }

/* Style pour les champs valides */
.is-valid {
    border-color: var(--success-color);
}

    .is-valid:focus {
        border-color: var(--success-color);
        box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.15);
    }

/* Utilitaires */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-secondary);
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Textarea */
textarea {
    resize: none;
}

/* Effets au survol pour améliorer l'interactivité */
.form-control:hover:not(:disabled) {
    border-color: var(--primary-light);
}

/* Style spécial pour les inputs importants */
input[type="password"],
input#card {
    background-image: linear-gradient(to right, transparent, rgba(255, 107, 53, 0.03));
}

/* Responsive */
@media (max-width: 767px) {
    .payment-card {
        padding: 1.5rem 1rem;
    }

    .payment-title {
        font-size: 1.5rem;
    }

    .storage-brand-text {
        font-size: 1.25rem;
    }

    .btn {
        padding: 0.65rem 1.25rem;
    }
}

/* Print styles */
@media print {
    .storage-header,
    .storage-footer {
        display: none;
    }

    body {
        background: white;
    }
}