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

:root {
    --primary-color: #467886;
    --primary-dark: #355d6a;
    --secondary-color: #0f172a;
    --accent-color: #467886;
    --success-color: #10b981;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --border-color: #e2e8f0;
    --input-border: #cbd5e1;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    padding: 2rem 1rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    letter-spacing: -0.025em;
}

.subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (max-width: 968px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
}

.form-section,
.preview-section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

h2 {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.025em;
}

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

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.875rem;
}

input[type="text"],
input[type="email"],
input[type="tel"] {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    font-family: inherit;
    background: var(--card-bg);
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="tel"]:hover {
    border-color: var(--text-light);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(70, 120, 134, 0.08);
}

.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 0;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 0.625rem;
    cursor: pointer;
    accent-color: var(--accent-color);
}

.checkbox-group span {
    font-weight: 400;
    font-size: 0.9375rem;
    color: var(--text-color);
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    background: var(--accent-color);
    color: white;
    width: 100%;
}

.btn-secondary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(70, 120, 134, 0.2);
}

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

.signature-preview {
    min-height: 200px;
    padding: 1.5rem;
    background: var(--bg-color);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.signature-preview.has-content {
    background: white;
}

.placeholder {
    color: var(--text-light);
    text-align: center;
    padding: 3rem 1rem;
    font-style: italic;
}

.actions {
    margin-top: 1.5rem;
}

.copy-success {
    margin-top: 1rem;
    padding: 0.75rem;
    background: var(--success-color);
    color: white;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    font-size: 0.9375rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.instructions {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.instructions h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.025em;
}

.instructions ol {
    padding-left: 1.5rem;
}

.instructions li {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.9375rem;
}

/* Style pour la signature générée */
#preview table {
    font-family: Verdana, sans-serif;
}

@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    header h1 {
        font-size: 2rem;
    }

    .form-section,
    .preview-section,
    .instructions {
        padding: 1.5rem;
    }
}
