/* Carte d'Identité Alam - Styles */

.card-generator {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.form-section,
.preview-section {
    padding: 2rem;
    border: 1px solid var(--border-color);
}

.form-section h3,
.preview-section h3 {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
    background: var(--bg-primary);
}

.btn-primary,
.btn-secondary {
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-primary:hover {
    opacity: 0.8;
}

.btn-secondary {
    background: var(--bg-primary);
    color: var(--accent);
    margin-right: 0.5rem;
}

.btn-secondary:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Carte d'Identité */
.identity-card {
    width: 100%;
    aspect-ratio: 1.586;
    border: 2px solid var(--accent);
    background: var(--bg-primary);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.card-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--accent);
}

.card-logo {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    margin-bottom: 0.25rem;
}

.card-title {
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.1em;
}

.card-subtitle {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.card-body {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.5rem;
    flex: 1;
}

.card-left {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.photo-container {
    width: 120px;
    height: 140px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.8rem;
}

#photoPreview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qr-container {
    width: 120px;
    height: 120px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
}

.qr-container canvas {
    max-width: 100%;
    max-height: 100%;
}

.card-right {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.field {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.field-label {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.field-value {
    font-size: 0.85rem;
    font-weight: 500;
}

.card-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--accent);
}

.signature {
    text-align: center;
}

.signature-label {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.signature-value {
    font-size: 0.7rem;
    font-family: 'Courier New', monospace;
    word-break: break-all;
    line-height: 1.3;
}

.actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.5rem;
}

/* Informations de sécurité */
.security-info {
    padding: 2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.security-info h3 {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.security-info ul {
    list-style: none;
}

.security-info li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

/* Responsive */
@media (max-width: 1024px) {
    .card-generator {
        grid-template-columns: 1fr;
    }

    .identity-card {
        max-width: 600px;
        margin: 0 auto;
    }
}

@media print {

    .nav,
    .form-section,
    .actions,
    .security-info,
    .footer {
        display: none;
    }

    .card-generator {
        grid-template-columns: 1fr;
    }

    .identity-card {
        border: 2px solid black;
        page-break-inside: avoid;
    }
}