.editor-container {
    display: flex;
    height: 100vh;
    background-color: var(--bg-light);
}

.editor-sidebar {
    width: 450px;
    background-color: var(--bg-white);
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.editor-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    text-decoration: none;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.back-link:hover {
    color: var(--primary-color);
}

.editor-header h2 {
    font-size: 1.5rem;
    color: var(--text-dark);
}

.editor-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-light);
}

.tab-btn {
    flex: 1;
    padding: 0.75rem 0.25rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.75rem;
    color: var(--text-light);
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.tab-btn i {
    font-size: 1.1rem;
}

.tab-btn:hover {
    background-color: rgba(14, 165, 233, 0.05);
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background-color: var(--bg-white);
}

.editor-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.tab-header h3 {
    margin: 0;
}

.tab-description {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.9rem;
}

/* Checkbox alignment */
.form-group label input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
    vertical-align: middle;
    cursor: pointer;
}

/* Label containing checkbox should be inline-flex */
.form-group label:has(input[type="checkbox"]) {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Photo upload */
.photo-upload-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.photo-preview {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 2px dashed var(--border-color);
    display: none;
}

.photo-preview:has(img) {
    display: block;
    border-style: solid;
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-remove {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background-color: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.photo-remove:hover {
    background-color: #dc2626;
}

/* Radio group */
.radio-group {
    display: flex;
    gap: 1rem;
}

.radio-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
    background-color: var(--bg-white);
}

.radio-label:hover {
    border-color: var(--primary-color);
    background-color: rgba(14, 165, 233, 0.05);
}

.radio-label input[type="radio"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.radio-label:has(input[type="radio"]:checked) {
    border-color: var(--primary-color);
    background-color: rgba(14, 165, 233, 0.1);
    color: var(--primary-color);
    font-weight: 500;
}

/* Section position control for modern template */
.section-position-control {
    background-color: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.section-position-control label:first-child {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.section-position-control .radio-group {
    gap: 0.75rem;
    display: flex;
    align-items: stretch;
}

.section-position-control .radio-label {
    display: flex;
    flex: 1 1 0;
    min-width: 0;
    height: 44px;
    padding: 0.75rem 1rem;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 0.875rem;
    box-sizing: border-box;
}

.section-position-control .radio-label input[type="radio"] {
    display: none;
}

.section-position-control .radio-label i {
    display: none;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-block {
    width: 100%;
    display: block;
}

.editor-actions {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-white);
}

.editor-actions .btn {
    margin-bottom: 0.75rem;
}

.editor-actions .btn:last-child {
    margin-bottom: 0;
}

/* Experience/Education Items */
.experience-item,
.education-item,
.skill-item,
.skill-group-item,
.other-item {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

.item-remove {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 1.2rem;
}

.item-remove:hover {
    color: #dc2626;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.skill-item input[type="text"] {
    flex: 1;
}

.skill-item input[type="range"] {
    width: 100px;
}

.skill-level {
    min-width: 50px;
    text-align: center;
    font-weight: 600;
    color: var(--text-dark);
}

/* Skill Groups */
.skill-group-item {
    background-color: #f8fafc;
    border: 2px solid var(--border-color);
    padding: 1.5rem;
}

.skill-group-item .form-group {
    margin-bottom: 1rem;
}

.skills-in-group {
    background: white;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

.skill-in-group-item {
    padding: 0.75rem;
    background: var(--bg-light);
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border-color);
}

.skill-in-group-item:last-child {
    margin-bottom: 0;
}

/* Ligne du haut : nom + bouton supprimer */
.skill-row-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.skill-name-input {
    flex: 1;
    min-width: 0;
}

/* Ligne du bas : checkbox + contrôle de notation */
.skill-row-bottom {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Contrôle de notation (slider + valeur) */
.skill-rating-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    max-width: 200px;
}

.skill-rating-control input[type="range"] {
    flex: 1;
    min-width: 80px;
}

.skill-rating-control .skill-level {
    flex-shrink: 0;
    min-width: 35px;
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .skill-row-bottom {
        gap: 0.75rem;
    }
    
    .skill-rating-control {
        flex: 1 1 100%;
        max-width: none;
    }
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
    white-space: nowrap;
    color: var(--text-light);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.skill-remove-btn {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.2s;
}

.skill-remove-btn:hover {
    background-color: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.skill-group-item .btn-sm {
    width: 100%;
}

/* Preview Area */
.editor-preview {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.preview-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.template-select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background-color: var(--bg-white);
    font-size: 0.95rem;
}

.color-picker-group {
    display: flex;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background-color: var(--bg-light);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.color-picker-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.color-picker-item label {
    font-size: 0.7rem;
    color: var(--text-light);
    white-space: nowrap;
}

.color-picker-item input[type="color"] {
    width: 40px;
    height: 35px;
    border: 2px solid var(--border-color);
    border-radius: 0.4rem;
    cursor: pointer;
    transition: all 0.2s;
}

.color-picker-item input[type="color"]:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.preview-label {
    color: var(--text-light);
    font-size: 0.9rem;
}

.preview-container {
    background-color: var(--bg-white);
    box-shadow: var(--shadow-xl);
    min-height: 842px;
    width: 595px;
    margin: 0 auto;
    padding: 2rem;
    overflow: hidden;
    position: relative;
}

/* Watermark for non-premium users */
.watermark {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    pointer-events: none;
    overflow: hidden;
}

.watermark::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 70px,
        rgba(14, 165, 233, 0.12) 70px,
        rgba(14, 165, 233, 0.12) 71px
    );
    pointer-events: none;
}

.watermark-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 1rem;
    font-weight: 600;
    color: rgba(14, 165, 233, 0.45);
    text-transform: lowercase;
    letter-spacing: 0.15rem;
    user-select: none;
    white-space: nowrap;
}

.watermark-subtext {
    display: none;
}

/* ============================================
   PDF Export - Pleine page sans marges
   ============================================ */

/* ============================================
   PDF Export - Pleine page sans marges
   ============================================ */

#cv-content.pdf-export {
    width: 210mm !important;
    max-height: 297mm !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
    box-shadow: none !important;
    overflow: hidden !important;
}

#cv-content.pdf-export .watermark {
    display: none !important;
}

/* Fix pour template moderne dans le PDF */
#cv-content.pdf-export .cv-moderne {
    margin: 0 !important;
    padding: 0 !important;
}

#cv-content.pdf-export .cv-moderne .cv-sidebar {
    padding: 8mm 6mm !important;
}

#cv-content.pdf-export .cv-moderne .cv-main {
    padding: 8mm 6mm !important;
}

/* Fix pour templates classique, créatif, minimaliste dans le PDF */
#cv-content.pdf-export .cv-classique,
#cv-content.pdf-export .cv-creatif,
#cv-content.pdf-export .cv-minimaliste {
    padding: 8mm !important;
    margin: 0 !important;
}

/* CV Templates Styles */
.cv-template {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 11pt;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.cv-template * {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.cv-header {
    border-bottom: 2px solid var(--text-dark);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.cv-header-content {
    flex: 1;
}

.cv-photo {
    flex-shrink: 0;
}

.cv-photo img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 0.5rem;
    border: 2px solid var(--text-dark);
}


.cv-name {
    font-size: 28pt;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.cv-title {
    font-size: 14pt;
    color: var(--text-light);
}

.cv-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.75rem;
    font-size: 9pt;
    color: var(--text-dark);
}

.cv-section {
    margin-bottom: 1.5rem;
}

.cv-section-title {
    font-size: 14pt;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.cv-item {
    margin-bottom: 1rem;
}

.cv-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.cv-item-title {
    font-weight: 600;
    font-size: 12pt;
}

.cv-item-subtitle {
    color: var(--text-light);
}

.cv-item-date {
    color: var(--text-light);
    font-size: 9pt;
}

.cv-item-description {
    font-size: 10pt;
    line-height: 1.6;
    margin-top: 0.5rem;
}

.cv-other-content {
    font-size: 10pt;
    line-height: 1.6;
    white-space: pre-line;
}

.cv-skills-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.cv-skill {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.cv-skill span::before {
    content: '• ';
    color: currentColor;
    margin-right: 0.3rem;
}

.cv-skill-dots {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}
    gap: 0.25rem;
}

.cv-skill-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--border-color);
}

.cv-skill-dot.filled {
    background-color: var(--text-dark);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: 1rem;
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-light);
}

.modal-close:hover {
    color: var(--text-dark);
}

.modal-content h2 {
    margin-bottom: 1rem;
}

.modal-content p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.modal-note {
    font-size: 0.85rem;
    text-align: center;
    margin-top: 1rem !important;
}

/* Confirm Modal */
.modal-confirm {
    text-align: center;
    max-width: 450px;
}

.modal-icon-warning {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #fef3c7;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.modal-icon-warning i {
    font-size: 2.5rem;
    color: #f59e0b;
}

.modal-confirm h2 {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.modal-confirm p {
    margin-bottom: 2rem;
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-modal {
    flex: 1;
    max-width: 200px;
    transition: all 0.3s ease;
    border: none;
    font-weight: 500;
}

.btn-modal:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-modal:active {
    transform: translateY(0);
}

.btn-secondary.btn-modal {
    background-color: #f3f4f6;
    color: #374151;
}

.btn-secondary.btn-modal:hover {
    background-color: #e5e7eb;
    color: #1f2937;
}

.btn-danger {
    background-color: #ef4444;
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* ==========================================
   TEMPLATE STYLES - Différents designs de CV
   ========================================== */

/* === TEMPLATE CLASSIQUE === */
.cv-classique .cv-header {
    border-bottom: 3px solid var(--template-color, #1f2937);
    padding-bottom: 1.2rem;
    margin-bottom: 1.5rem;
}

.cv-classique .cv-name {
    color: var(--template-color, #1f2937);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cv-classique .cv-title {
    font-style: italic;
    color: var(--template-accent, #4b5563);
}

.cv-classique .cv-section-title {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--template-color, #1f2937);
    padding-bottom: 0.3rem;
    margin-bottom: 1rem;
    color: var(--template-color, #1f2937);
}

.cv-classique .cv-item {
    border-left: 2px solid #e5e7eb;
    padding-left: 1rem;
    margin-left: 0.5rem;
}

.cv-classique .cv-item-title {
    color: var(--template-color, #1f2937);
}

.cv-classique .cv-skills-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cv-classique .cv-skill span::before {
    content: '• ';
    margin-right: 0.3rem;
    color: var(--template-accent, #1f2937);
}

.cv-classique .cv-skill-dot.filled {
    background-color: var(--template-color, #1f2937);
}

.cv-classique .cv-photo img {
    border-radius: 0.3rem;
}

/* === TEMPLATE MODERNE === */
.cv-moderne {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 0;
    margin: -2rem;
    padding: 0;
    min-height: 842px;
}

.cv-moderne .cv-sidebar {
    background: linear-gradient(180deg, var(--template-color, #1e3a5f) 0%, var(--template-color, #152d47) 100%);
    padding: 2rem 1.5rem;
    color: white;
}

.cv-moderne .cv-photo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.cv-moderne .cv-photo img {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 4px solid white;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.cv-moderne .cv-name {
    color: white;
    font-size: 18pt;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.cv-moderne .cv-title {
    color: var(--template-accent, #bfdbfe);
    font-size: 11pt;
    text-align: center;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.cv-moderne .sidebar-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.cv-moderne .sidebar-section:last-child {
    border-bottom: none;
}

.cv-moderne .cv-sidebar .cv-section-title {
    color: white;
    font-size: 11pt;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    border-left: none;
    padding-left: 0;
}

.cv-moderne .contact-item {
    color: #e0f2fe;
    font-size: 8.5pt;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.4;
}

.cv-moderne .contact-item i {
    color: var(--template-accent, #93c5fd);
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.cv-moderne .cv-skills-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cv-moderne .cv-sidebar .cv-skill {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.cv-moderne .cv-sidebar .cv-skill .skill-name {
    color: white;
    font-size: 9pt;
    font-weight: 500;
}

.cv-moderne .cv-sidebar .cv-skill .skill-name::before {
    content: '• ';
    color: var(--template-accent, #93c5fd);
}

.cv-moderne .cv-sidebar .cv-skill-dots {
    display: flex;
    gap: 0.2rem;
}

.cv-moderne .cv-sidebar .cv-skill-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
}

.cv-moderne .cv-sidebar .cv-skill-dot.filled {
    background-color: var(--template-accent, #60a5fa);
}

.cv-moderne .cv-other-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.cv-moderne .cv-other-item {
    color: #e0f2fe;
    font-size: 9pt;
    line-height: 1.4;
}

.cv-moderne .cv-other-item::before {
    content: '▸ ';
    color: var(--template-accent, #93c5fd);
    margin-right: 0.3rem;
}

.cv-moderne .cv-main {
    padding: 2rem 2.5rem;
    background: white;
    overflow: hidden;
    word-wrap: break-word;
}

.cv-moderne .cv-main .cv-section {
    margin-bottom: 1.5rem;
}

.cv-moderne .cv-main .cv-section-title {
    color: var(--template-color, #1e3a5f);
    font-size: 13pt;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--template-color, #1e3a5f);
    border-left: none;
    padding-left: 0;
}

.cv-moderne .cv-summary {
    font-size: 10pt;
    line-height: 1.6;
    color: #374151;
    text-align: justify;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.cv-moderne .cv-item {
    margin-bottom: 1.25rem;
}

.cv-moderne .cv-item-title {
    color: var(--template-color, #1e3a5f);
    font-weight: 600;
}

.cv-moderne .cv-item-subtitle {
    color: #6b7280;
}

.cv-moderne .cv-item-date {
    color: #9ca3af;
    font-style: italic;
}

/* Override styles for personal info when in main section (right) */
.cv-moderne .cv-main .cv-name {
    color: var(--template-color, #1e3a5f);
    text-align: left;
}

.cv-moderne .cv-main .cv-title {
    color: #6b7280;
    text-align: left;
}

.cv-moderne .cv-main .cv-photo {
    text-align: left;
    margin-bottom: 1rem;
}

.cv-moderne .cv-main .cv-photo img {
    border: 4px solid var(--template-color, #1e3a5f);
}

/* Photo carrée centrée à droite */
.cv-moderne .cv-photo-right {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.cv-moderne .cv-photo-right img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    border: 4px solid var(--template-color, #1e3a5f);
}

.cv-moderne .cv-main .cv-section-title {
    color: var(--template-color, #1e3a5f);
}

.cv-moderne .cv-main .contact-item {
    color: #374151;
}

.cv-moderne .cv-main .contact-item i {
    color: var(--template-color, #1e3a5f);
}

/* Override styles for skills when in main section (right) */
.cv-moderne .cv-main .cv-skills-grid,
.cv-moderne .cv-main .cv-skills-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.cv-moderne .cv-main .cv-skill {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #374151;
}

.cv-moderne .cv-main .cv-skill .skill-name {
    color: #374151;
}

.cv-moderne .cv-main .cv-skill-dots {
    display: flex;
    gap: 0.25rem;
}

.cv-moderne .cv-main .cv-skill-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #e5e7eb;
}

.cv-moderne .cv-main .cv-skill-dot.filled {
    background-color: var(--template-color, #1e3a5f);
}

/* Override styles for others when in main section (right) */
.cv-moderne .cv-main .cv-other-content {
    color: #374151;
}

.cv-moderne .cv-main .cv-other-item {
    color: #374151;
}

.cv-moderne .cv-item-description {
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.cv-moderne p,
.cv-moderne .cv-other-content {
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

/* === TEMPLATE CRÉATIF === */
.cv-creatif {
    background: #f8fafc;
    padding: 2rem;
    margin: -2rem;
    position: relative;
    overflow: hidden;
}

/* Formes décoratives en arrière-plan - Subtiles et professionnelles */
.cv-creatif::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--template-color, #1e3a8a) 0%, transparent 60%);
    opacity: 0.04;
    border-radius: 0 0 0 100%;
}

.cv-creatif::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 250px;
    height: 250px;
    background: linear-gradient(45deg, var(--template-accent, #64748b) 0%, transparent 60%);
    opacity: 0.03;
    border-radius: 0 100% 0 0;
}

.cv-creatif .cv-header {
    background: white;
    border-radius: 20px;
    border: none;
    padding: 2.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    position: relative;
    overflow: visible;
    border-left: 4px solid var(--template-color, #1e3a8a);
}

/* Barre décorative subtile */
.cv-creatif .cv-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100%;
    background: linear-gradient(180deg, var(--template-color, #1e3a8a) 0%, transparent 100%);
    opacity: 0.03;
    border-radius: 0 20px 20px 0;
}

.cv-creatif .cv-name {
    color: var(--template-color, #1e3a8a);
    font-size: 32pt;
    font-weight: 800;
    position: relative;
    display: inline-block;
}

.cv-creatif .cv-title {
    color: var(--template-accent, #64748b);
    font-weight: 600;
    font-size: 15pt;
    position: relative;
}

.cv-creatif .cv-contact {
    color: #6b7280;
}

.cv-creatif .cv-section {
    background: white;
    border-radius: 16px;
    padding: 1.8rem;
    margin-bottom: 1.2rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    position: relative;
    overflow: hidden;
    border-left: 3px solid var(--template-color, #1e3a8a);
}

/* Forme décorative subtile dans chaque section */
.cv-creatif .cv-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 100%;
    background: linear-gradient(180deg, var(--template-color, #1e3a8a) 0%, transparent 100%);
    opacity: 0.02;
    border-radius: 0 16px 16px 0;
}

.cv-creatif .cv-section-title {
    color: var(--template-color, #1e3a8a);
    font-size: 15pt;
    position: relative;
    padding-left: 1.2rem;
    font-weight: 700;
}

/* Icône moderne avant les titres */
.cv-creatif .cv-section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: var(--template-accent, #64748b);
    border-radius: 2px;
}

.cv-creatif .cv-item {
    background: rgba(30, 58, 138, 0.02);
    padding: 1.2rem;
    border-radius: 12px;
    border: 1px solid rgba(30, 58, 138, 0.08);
    margin-bottom: 0.75rem;
    position: relative;
    overflow: hidden;
}

.cv-creatif .cv-item-title {
    color: var(--template-color, #1e3a8a);
    font-weight: 600;
}

.cv-creatif .cv-skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.cv-creatif .cv-skill {
    background: white;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    border: 1px solid rgba(30, 58, 138, 0.15);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
    min-width: fit-content;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    position: relative;
}



    font-weight: 500;
}

.cv-creatif .cv-skill-dot {
    width: 10px;
    height: 10px;
    background: #e5e7eb;
    border-radius: 50%;
}

.cv-creatif .cv-skill-dot.filled {
    background: var(--template-color, #1e3a8a);
}

.cv-creatif .cv-photo img {
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 4px 16px rgba(30, 58, 138, 0.15);
    position: relative;
}

/* Photo sans décorations superflues */
.cv-creatif .cv-photo {
    position: relative;
}

/* === TEMPLATE MINIMALISTE === */
.cv-minimaliste {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: #374151;
}

.cv-minimaliste .cv-header {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 2rem;
    margin-bottom: 2.5rem;
}

.cv-minimaliste .cv-name {
    font-size: 32pt;
    font-weight: 300;
    letter-spacing: -1px;
    color: #111827;
    margin-bottom: 0.5rem;
}

.cv-minimaliste .cv-title {
    font-size: 13pt;
    font-weight: 400;
    color: #6b7280;
}

.cv-minimaliste .cv-contact {
    gap: 1.5rem;
    margin-top: 1.5rem;
    color: #6b7280;
}

.cv-minimaliste .cv-section {
    margin-bottom: 2.5rem;
}

.cv-minimaliste .cv-section-title {
    font-size: 11pt;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--template-color, #111827);
    margin-bottom: 1.5rem;
}

.cv-minimaliste .cv-item {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f3f4f6;
}

.cv-minimaliste .cv-item:last-child {
    border-bottom: none;
}

.cv-minimaliste .cv-item-title {
    font-weight: 600;
    color: var(--template-color, #111827);
    font-size: 12pt;
}

.cv-minimaliste .cv-item-subtitle {
    color: #6b7280;
    font-size: 11pt;
    margin-top: 0.2rem;
}

.cv-minimaliste .cv-item-date {
    font-size: 10pt;
    color: #9ca3af;
}

.cv-minimaliste .cv-item-description {
    color: #4b5563;
    margin-top: 0.75rem;
}

.cv-minimaliste .cv-skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.cv-minimaliste .cv-skill {
    background: #f9fafb;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 10pt;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: fit-content;
}

.cv-minimaliste .cv-skill span::before {
    content: '• ';
    margin-right: 0.2rem;
    color: var(--template-accent, #111827);
}

.cv-minimaliste .cv-skill-dots {
    display: none;
}

.cv-minimaliste .cv-photo img {
    border-radius: 0;
    border: 1px solid #e5e7eb;
}

.cv-minimaliste .cv-other-content {
    color: #4b5563;
}


/* Responsive */
@media (max-width: 1024px) {
    .editor-container {
        flex-direction: column;
    }

    .editor-sidebar {
        width: 100%;
        max-height: 60vh;
    }

    .editor-preview {
        padding: 1rem;
    }

    .preview-container {
        transform: scale(0.8);
        transform-origin: top center;
    }
    
    .cv-moderne {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .preview-container {
        transform: scale(0.6);
    }
}
