cv-generator / frontend /styles.css
Liantsoaxx08's picture
correction en back hobbies list front
6aa6276
Raw
History Blame Contribute Delete
18.4 kB
/* ========================================
CV Generator - Styles avec Responsive Design
======================================== */
:root {
--primary-color: #4f46e5;
--primary-dark: #4338ca;
--primary-light: #818cf8;
--secondary-color: #10b981;
--background: #f8fafc;
--card-bg: #ffffff;
--text-primary: #1e293b;
--text-secondary: #64748b;
--border-color: #e2e8f0;
--error-color: #ef4444;
--success-color: #22c55e;
--shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html {
font-size: 16px;
}
body {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
color: var(--text-primary);
line-height: 1.6;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.container {
max-width: 900px;
margin: 0 auto;
padding: 20px;
width: 100%;
}
/* Header */
.header {
text-align: center;
padding: 40px 20px;
color: white;
}
.header h1 {
font-size: clamp(1.5rem, 5vw, 2.5rem);
font-weight: 700;
margin-bottom: 10px;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}
.header p {
font-size: clamp(0.9rem, 3vw, 1.1rem);
opacity: 0.9;
}
/* Progress Bar */
.progress-container {
background: var(--card-bg);
border-radius: 16px;
padding: 20px;
margin-bottom: 20px;
box-shadow: var(--shadow-lg);
overflow: hidden;
}
.progress-bar {
height: 6px;
background: var(--border-color);
border-radius: 3px;
overflow: hidden;
margin-bottom: 20px;
}
.progress {
height: 100%;
background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
width: 20%;
transition: width 0.5s ease;
border-radius: 3px;
}
.steps {
display: flex;
justify-content: space-between;
gap: 8px;
}
.step {
display: flex;
flex-direction: column;
align-items: center;
gap: 6px;
flex: 1;
min-width: 0;
}
.step-number {
width: 32px;
height: 32px;
border-radius: 50%;
background: var(--border-color);
color: var(--text-secondary);
display: flex;
align-items: center;
justify-content: center;
font-weight: 600;
font-size: 0.85rem;
transition: all 0.3s ease;
flex-shrink: 0;
}
.step.active .step-number {
background: var(--primary-color);
color: white;
transform: scale(1.1);
}
.step.completed .step-number {
background: var(--secondary-color);
color: white;
}
.step-label {
font-size: 0.7rem;
color: var(--text-secondary);
text-align: center;
line-height: 1.2;
word-break: break-word;
}
.step.active .step-label {
color: var(--primary-color);
font-weight: 600;
}
/* Form Container */
.form-container {
background: var(--card-bg);
border-radius: 16px;
padding: 24px;
box-shadow: var(--shadow-lg);
}
.form-step {
display: none;
}
.form-step.active {
display: block;
animation: fadeIn 0.4s ease;
}
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.form-step h2 {
color: var(--text-primary);
font-size: clamp(1.2rem, 4vw, 1.5rem);
margin-bottom: 20px;
padding-bottom: 12px;
border-bottom: 2px solid var(--primary-light);
display: flex;
align-items: center;
gap: 8px;
flex-wrap: wrap;
}
/* Form Elements */
.form-group {
margin-bottom: 16px;
flex: 1;
min-width: 0;
}
.help-text {
display: block;
font-size: 0.75rem;
color: var(--text-secondary);
margin-top: 4px;
font-style: italic;
}
.form-row {
display: flex;
gap: 16px;
flex-wrap: wrap;
}
.form-row > .form-group {
flex: 1 1 200px;
}
label {
display: block;
font-weight: 500;
margin-bottom: 6px;
color: var(--text-primary);
font-size: 0.875rem;
}
input, select, textarea {
width: 100%;
padding: 10px 14px;
border: 2px solid var(--border-color);
border-radius: 8px;
font-size: 1rem;
font-family: inherit;
transition: all 0.3s ease;
background: var(--card-bg);
-webkit-appearance: none;
appearance: none;
}
select {
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
background-position: right 10px center;
background-repeat: no-repeat;
background-size: 20px;
padding-right: 40px;
}
input:focus, select:focus, textarea:focus {
outline: none;
border-color: var(--primary-color);
box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}
input::placeholder, textarea::placeholder {
color: var(--text-secondary);
opacity: 0.7;
}
textarea {
resize: vertical;
min-height: 80px;
}
/* Entry Cards */
.entry-card {
background: var(--background);
border-radius: 12px;
padding: 16px;
margin-bottom: 16px;
border: 1px solid var(--border-color);
position: relative;
}
.entry-card:hover {
border-color: var(--primary-light);
}
/* Skill/Language Entry */
.skill-entry, .language-entry {
display: flex;
align-items: flex-end;
gap: 12px;
background: var(--background);
padding: 12px;
border-radius: 8px;
margin-bottom: 12px;
flex-wrap: wrap;
}
.skill-entry .form-group, .language-entry .form-group {
margin-bottom: 0;
flex: 1 1 150px;
}
/* Buttons */
.btn-add {
background: transparent;
border: 2px dashed var(--primary-color);
color: var(--primary-color);
padding: 10px 20px;
border-radius: 8px;
font-size: 0.9rem;
font-weight: 500;
cursor: pointer;
transition: all 0.3s ease;
margin-top: 8px;
width: 100%;
}
.btn-add:hover {
background: rgba(79, 70, 229, 0.1);
}
.btn-remove {
background: var(--error-color);
color: white;
border: none;
width: 32px;
height: 32px;
min-width: 32px;
border-radius: 50%;
font-size: 1.2rem;
cursor: pointer;
transition: all 0.3s ease;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.btn-remove:hover {
background: #dc2626;
transform: scale(1.1);
}
.btn-ai {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border: none;
padding: 8px 14px;
border-radius: 6px;
font-size: 0.8rem;
cursor: pointer;
margin-top: 8px;
transition: all 0.3s ease;
white-space: nowrap;
}
.btn-ai:hover {
transform: translateY(-2px);
box-shadow: var(--shadow);
}
.btn-ai:disabled {
opacity: 0.6;
cursor: not-allowed;
transform: none;
}
/* Navigation Buttons */
.form-navigation {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 24px;
padding-top: 20px;
border-top: 1px solid var(--border-color);
gap: 12px;
flex-wrap: wrap;
}
.btn-nav {
padding: 12px 24px;
border-radius: 8px;
font-size: 0.95rem;
font-weight: 500;
cursor: pointer;
transition: all 0.3s ease;
white-space: nowrap;
flex: 1;
max-width: 200px;
text-align: center;
}
.btn-prev {
background: var(--card-bg);
border: 2px solid var(--border-color);
color: var(--text-secondary);
}
.btn-prev:hover {
border-color: var(--primary-color);
color: var(--primary-color);
}
.btn-next {
background: var(--primary-color);
border: none;
color: white;
margin-left: auto;
}
.btn-next:hover {
background: var(--primary-dark);
transform: translateY(-2px);
box-shadow: var(--shadow);
}
/* Generate Button */
.generate-section {
text-align: center;
margin-top: 24px;
}
.btn-generate {
background: linear-gradient(135deg, var(--secondary-color), #059669);
color: white;
border: none;
padding: 16px 40px;
border-radius: 12px;
font-size: 1.1rem;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
width: 100%;
max-width: 350px;
}
.btn-generate:hover {
transform: translateY(-3px);
box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}
.btn-generate:disabled {
opacity: 0.6;
cursor: not-allowed;
transform: none;
}
.btn-loading {
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
}
/* Preview Section */
.preview-container {
background: var(--background);
border-radius: 12px;
padding: 16px;
}
.preview-section {
margin-bottom: 16px;
padding-bottom: 12px;
border-bottom: 1px solid var(--border-color);
}
.preview-section:last-child {
border-bottom: none;
margin-bottom: 0;
}
.preview-section h3 {
color: var(--primary-color);
font-size: 0.9rem;
margin-bottom: 10px;
}
.preview-item {
margin-bottom: 6px;
color: var(--text-secondary);
font-size: 0.9rem;
word-break: break-word;
}
.preview-item strong {
color: var(--text-primary);
}
/* Section Headers */
.section {
margin-bottom: 28px;
}
.section h3 {
color: var(--text-primary);
font-size: 1rem;
margin-bottom: 14px;
}
/* Modal */
.modal {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
padding: 20px;
}
.modal-content {
background: var(--card-bg);
padding: 30px;
border-radius: 16px;
text-align: center;
max-width: 450px;
width: 100%;
box-shadow: var(--shadow-lg);
}
.modal-content h2 {
color: var(--secondary-color);
margin-bottom: 12px;
font-size: clamp(1.2rem, 4vw, 1.5rem);
}
.modal-content p {
color: var(--text-secondary);
margin-bottom: 20px;
font-size: 0.95rem;
}
.modal-buttons {
display: flex;
gap: 12px;
justify-content: center;
flex-wrap: wrap;
}
.btn-download {
background: var(--primary-color);
color: white;
padding: 12px 24px;
border-radius: 8px;
text-decoration: none;
font-weight: 500;
transition: all 0.3s ease;
flex: 1;
max-width: 200px;
text-align: center;
}
.btn-download:hover {
background: var(--primary-dark);
}
.btn-close {
background: var(--card-bg);
border: 2px solid var(--border-color);
color: var(--text-secondary);
padding: 12px 24px;
border-radius: 8px;
cursor: pointer;
font-weight: 500;
transition: all 0.3s ease;
flex: 1;
max-width: 200px;
}
.btn-close:hover {
border-color: var(--text-secondary);
}
/* Loading Overlay */
.loading-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(255, 255, 255, 0.95);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
z-index: 1001;
padding: 20px;
}
.spinner {
width: 50px;
height: 50px;
border: 4px solid var(--border-color);
border-top-color: var(--primary-color);
border-radius: 50%;
animation: spin 1s linear infinite;
margin-bottom: 16px;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
.loading-overlay p {
color: var(--text-primary);
font-size: 1rem;
text-align: center;
}
/* Utility Classes */
.hidden {
display: none !important;
}
/* ========================================
RESPONSIVE DESIGN - TABLETS
======================================== */
@media (max-width: 768px) {
html {
font-size: 15px;
}
.container {
padding: 12px;
}
.header {
padding: 24px 16px;
}
.header h1 {
font-size: 1.6rem;
}
.header p {
font-size: 0.9rem;
}
.progress-container {
padding: 16px;
border-radius: 12px;
}
.steps {
gap: 4px;
}
.step-number {
width: 28px;
height: 28px;
font-size: 0.75rem;
}
.step-label {
font-size: 0.6rem;
}
.form-container {
padding: 16px;
border-radius: 12px;
}
.form-step h2 {
font-size: 1.15rem;
margin-bottom: 16px;
}
.form-row {
flex-direction: column;
gap: 0;
}
.form-row > .form-group {
flex: 1 1 100%;
}
.entry-card {
padding: 14px;
}
.skill-entry, .language-entry {
flex-direction: column;
align-items: stretch;
gap: 8px;
}
.skill-entry .btn-remove,
.language-entry .btn-remove {
align-self: flex-end;
}
.btn-nav {
padding: 10px 16px;
font-size: 0.9rem;
flex: 1;
max-width: none;
}
.form-navigation {
gap: 10px;
}
.btn-generate {
padding: 14px 24px;
font-size: 1rem;
}
.modal-content {
padding: 24px 20px;
margin: 10px;
}
.modal-buttons {
flex-direction: column;
}
.btn-download, .btn-close {
max-width: none;
width: 100%;
}
}
/* ========================================
RESPONSIVE DESIGN - MOBILE SMALL
======================================== */
@media (max-width: 480px) {
html {
font-size: 14px;
}
.container {
padding: 8px;
}
.header {
padding: 20px 12px;
}
.header h1 {
font-size: 1.4rem;
}
.progress-container {
padding: 12px;
margin-bottom: 12px;
}
.progress-bar {
margin-bottom: 12px;
}
.step-label {
display: none;
}
.step-number {
width: 30px;
height: 30px;
font-size: 0.8rem;
}
.form-container {
padding: 14px;
}
.form-step h2 {
font-size: 1.1rem;
padding-bottom: 10px;
}
.form-group {
margin-bottom: 14px;
}
label {
font-size: 0.8rem;
margin-bottom: 4px;
}
input, select, textarea {
padding: 10px 12px;
font-size: 16px; /* Prevents zoom on iOS */
}
.entry-card {
padding: 12px;
margin-bottom: 12px;
}
.btn-add {
padding: 10px 16px;
font-size: 0.85rem;
}
.btn-ai {
width: 100%;
justify-content: center;
}
.btn-remove {
width: 28px;
height: 28px;
min-width: 28px;
font-size: 1rem;
}
.form-navigation {
margin-top: 16px;
padding-top: 16px;
}
.btn-nav {
padding: 10px 12px;
font-size: 0.85rem;
}
.btn-generate {
padding: 12px 20px;
font-size: 0.95rem;
}
.preview-container {
padding: 12px;
}
.preview-section h3 {
font-size: 0.85rem;
}
.preview-item {
font-size: 0.85rem;
}
.modal {
padding: 12px;
}
.modal-content {
padding: 20px 16px;
}
.modal-content h2 {
font-size: 1.1rem;
}
.modal-content p {
font-size: 0.9rem;
}
.spinner {
width: 40px;
height: 40px;
}
.loading-overlay p {
font-size: 0.9rem;
}
}
/* ========================================
RESPONSIVE DESIGN - VERY SMALL SCREENS
======================================== */
@media (max-width: 360px) {
.header h1 {
font-size: 1.2rem;
}
.step-number {
width: 26px;
height: 26px;
font-size: 0.7rem;
}
.form-container {
padding: 12px;
}
.form-step h2 {
font-size: 1rem;
}
input, select, textarea {
padding: 8px 10px;
}
}
/* ========================================
LARGE SCREENS
======================================== */
@media (min-width: 1200px) {
.container {
max-width: 1000px;
}
.form-container {
padding: 40px;
}
.step-number {
width: 40px;
height: 40px;
}
}
/* ========================================
TOUCH DEVICE IMPROVEMENTS
======================================== */
@media (hover: none) and (pointer: coarse) {
.btn-add:hover,
.btn-remove:hover,
.btn-ai:hover,
.btn-nav:hover,
.btn-generate:hover,
.btn-download:hover,
.btn-close:hover {
transform: none;
}
.btn-add:active,
.btn-remove:active,
.btn-ai:active,
.btn-nav:active,
.btn-generate:active {
transform: scale(0.98);
}
}
/* ========================================
LANDSCAPE MODE ON MOBILE
======================================== */
@media (max-height: 500px) and (orientation: landscape) {
.header {
padding: 12px;
}
.header h1 {
font-size: 1.3rem;
margin-bottom: 4px;
}
.header p {
font-size: 0.8rem;
}
.progress-container {
padding: 10px;
margin-bottom: 10px;
}
.form-container {
padding: 16px;
}
.modal-content {
max-height: 90vh;
overflow-y: auto;
}
}
/* ========================================
PRINT STYLES
======================================== */
@media print {
body {
background: white;
}
.header,
.progress-container,
.form-navigation,
.btn-ai,
.btn-add,
.btn-remove {
display: none;
}
.form-container {
box-shadow: none;
padding: 0;
}
}
/* ========================================
ACCESSIBILITY - REDUCED MOTION
======================================== */
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
.progress {
transition: none;
}
}