

/* ========================================
   GÉNÉRATEUR DE CV - STYLES CSS
   Phase 1 : 40% - Structure de base et Layout
   ======================================== */

/* RESET & GLOBAL STYLES */
   *{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
   }
   body{
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(to bottom,#000000 ,#3e0577 ,#760404);
    color: white;
    min-height: 100vh;
    padding: 20px;
   }

/*LAYOUT CONTAINER*/
   .container{
    min-width: 1400px;            /*crée un conteneur centré, large, organisé en deux colonnes égales, avec un espace de 30px entre elles.*/
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
   }
/*PANELS*/
   .panel{
    background: white;
    color: #000;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(78, 5, 235, 0.2);
   }
/*TYPOGRAPHY*/
   h1{
    color: #250794;
    margin-bottom: 10px;
    font-size: 28px;
   }
   .subtitle{
    color: #3d0575;
    margin-bottom: 20px;
    font-weight: 500;
   }
   h2{
    color: #6b0404;
    margin: 25px 0 15px 0;
    font-size: 20px ;
    border-bottom: 2px solid #6e0606;
    padding-bottom: 8px;
   }
/*FORM ELEMENTS*/
   .form-group{
    margin-bottom: 20px;
   }
   label{
    display: block;
    margin-bottom: 8px;
    color: #000;
    font-weight: 600;
    font-size: 14px;
   }
   input,
   textarea,
   select{
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    font-family: inherit;
   }
   input:focus,
   textarea:focus,
   select:focus{
    outline: none;
    border-color: #6e0606;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
   }
   textarea{
    resize: vertical;
    min-height: 80px;
   }
/*BUTTONS- Base styles only(40%)*/
    .btn{
        padding: 12px 24px;
        border: none;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0,3s;
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }   
    .btn-primary{
        background: #250794;
        color: white;
    }
    btn-secondary {
    background: #48bb78;
    color: white;
    margin-top: 10px;
    }
    .btn-danger {
    background: #f56565;
    color: white;
    padding: 8px 16px;
    font-size: 12px;
    } 
/*CV PREVIEW-HEADER*/
    #cv-preview{
        background: white;
        min-height: 800px;
        position: relative;
    }
    .cv-header{
        background: linear-gradient(135deg, #e6e6e6 0%, #3a3a3a 50%, #0d0d0d 100%);
        color: whitesmoke;
        padding: 40px 30px;
        border-radius: 10px 10px 0 0;
    }
    .cv-name {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 8px;
    }
    .cv-title {
    font-size: 18px;
    opacity: 0.95;
    margin-bottom: 20px;
    }
    .cv-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 14px;
    }
/*CV PREVIEW - BODY*/
    .cv-body{
        padding: 30px;
    }
    .cv-section{
        margin-bottom: 30px;
    }
    .cv-section-title {
    font-size: 22px;
    color: #000;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 3px solid #000;
    font-weight: bold;
    }
    .cv-summary-text {
    line-height: 1.8;
    color: #4a5568;
    }
/*RESPONSIVE DESIGN - BASIC*/
    @media (max-width: 1024px) {
        .container {
            grid-template-columns: 1fr;
        }
    }


/* ========================================
   Phase 2:60% -Animation et styles avancés
   ======================================== */

/*Animation*/
    @keyframes slideIn{
        from{
            opacity:0;
            transform: translateY(30px);
        }
        to{
            opacity: 1;
            transform: translateY(0);
        }
    }

    @keyframes fadeIn{
        from{
            opacity: 0;
            transform: scale(0.95);
        }
        to{
            opacity: 1;
            transform: scale(1);
        }
    }
    @keyframes slideUp{
        from{
            opacity:0;
            transform:translateY(20px);
        }
        to{
            opacity: 1;
            transform: translateY(0);
        }
    }
    @keyframes popIn{
        0%{
            transform: scale(0);
        }
        50%{
            transform: scale(1.1);
        }
        100%{
            transform: scale(1);
        }
    }

/*Appliquer l'animation aux panels*/
    .panel{
        animation: slideIn 0.5s ease-out;
    }
    .cv-section{
        animation: slideIn 0.4s ease-out;
    }

/*BUTTONS - Effets hover et interactions */

    .btn-primary:hover{
        background: #5568d3;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(2, 12, 63, 0.3);
    }
    .btn-secondary:hover{
        background: #0eb45b;
        transform: translateY(-2px);
    }
    .btn-danger:hover{
        background: #e53e3e;
    }
    .btn:active {
    transform: translateY(0);
    }
/* DYNAMIC SECTIONS*/
    .dynamic-section{
        background: #b2dbf7;
        padding: 15px;
        border-radius: 8px;
        margin-bottom: 15px;
        border: 2px solid #e2e8f0;
        position: relative;
        animation: fadeIn 0.3s ease-out;

    }
    .dynamic-section .btn-danger{
        position: absolute;
        top: 10px;
        right: 10px;
    }
/*ACTIONS SECTION*/
    .actions{
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
        margin-top: 20px;
    }
/* CV ITEMS (Experiences & Education)*/
    .cv-item{
        margin-bottom: 20px;
        padding-left: 20px;
        border-left: 3px solid #3b0a3b;
        transition: border-color 0.3s;
    }
    .cv-item:hover {
    border-left-color: #667eea;
    }

    .cv-item-title {
        font-weight: bold;
        font-size: 16px;
        color: #2d3748;
        margin-bottom: 5px;
    }

    .cv-item-subtitle {
        color: #092f67;
        font-size: 14px;
        margin-bottom: 5px;
    }

    .cv-item-date {
        color: #031a38;
        font-size: 13px;
        font-style: italic;
        margin-bottom: 8px;
    }

    .cv-item-description {
        color: #0a285c;
        line-height: 1.6;
        font-size: 14px;
    }
/* SKILLS SECTION*/
    .skills-grid{
        display: grid;
        grid-template-columns: repeat(auto-fill,minmax(150px,1fs));
        gap: 10px;

    }
    .skill-tag {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        padding: 8px 16px;
        border-radius: 20px;
        text-align: center;
        font-size: 13px;
        font-weight: 600;
        animation: popIn 0.3s ease-out;
        transition: transform 0.2s;
    }
    .skill-tag:hover{
        transform: scale(1.05);
    }
/*EMPTY STATE*/
    .empty-state{
        text-align: center;
        color: #1355ac;
        padding: 40px;
        font-style: italic;
    }
/*SCROLLBAR PERSONNALISÉE*/
    ::-webkit-scrollbar {
        width: 10px;
    }

    ::-webkit-scrollbar-track {
        background: #b3b1bc;
        border-radius: 10px;
    }

    ::-webkit-scrollbar-thumb {
        background: #4d0457;
        border-radius: 10px;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: #710d10;
    }
/* RESPONSIVE DESIGN - Mobile*/
    @media (max-width: 768px) {
        body {
            padding: 10px;
        }

        .panel {
            padding: 20px;
        }

        h1 {
            font-size: 24px;
        }

        .cv-name {
            font-size: 28px;
        }

        .cv-title {
            font-size: 16px;
        }

        .cv-contact {
            flex-direction: column;
            gap: 10px;
        }

        .skills-grid {
            grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        }

        .actions {
            flex-direction: column;
        }

        .btn {
            width: 100%;
            justify-content: center;
        }
    }

/*PRINT STYLES */
@media print {
    body.printing .no-print {
        display: none;
    }
    body {
        background: white;
        padding: 0;
    }

    .form-panel {
        display: none;
    }

    .container {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .panel {
        box-shadow: none;
        padding: 0;
        border-radius: 0;
    }

    .cv-section {
        page-break-inside: avoid;
    }

    .cv-header {
        border-radius: 0;
    }

    /* Éviter les sauts de page au milieu des items */
    .cv-item {
        page-break-inside: avoid;
    }

    /* Masquer les éléments non imprimables */
    button {
        display: none !important;
    }
}
/*TRANSITIONS GLOBALES*/
* {
    transition: color 0.2s, background-color 0.2s, border-color 0.2s;
}

button,
input,
textarea {
    transition: all 0.3s ease;
}

/*FOCUS VISIBLE (Accessibilité) */
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}


/* Tout aligner à gauche dans le CV preview */
#cv-preview {
    text-align: left;
}

.cv-header,
.cv-body,
.cv-section,
.cv-section-title,
.cv-name,
.cv-title,
.cv-contact,
.cv-summary-text,
.cv-item,
.cv-item-title,
.cv-item-subtitle,
.cv-item-date,
.cv-item-description,
.skills-grid,
.skill-tag {
    text-align: left;
}
.cv-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: flex-start; /* <-- à gauche */
}
.dynamic-section,
.cv-item {
    text-align: left;
}
.skills-grid {
    justify-items: start; /* force les skills à partir de la gauche */
}

@media print {
    /* Header du CV en noir et fond blanc */
    .cv-header,
    .cv-header * {
        color: #000 !important;
    }
    .cv-header {
        background: #fff !important;
    }

    /* Compétences en noir et fond blanc */
    .skills-grid,
    .skills-grid .skill-tag {
        color: #000 !important;
        background: #fff !important;
    
    }
}

