/* ================================
   GLOBAL
================================ */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, Arial, sans-serif;
    background: #f6f8fc;
    color: #172033;
    line-height: 1.6;
}

button,
textarea,
select,
input {
    font: inherit;
}

.hidden {
    display: none !important;
}


/* ================================
   HEADER
================================ */

header {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid #e8edf5;
    padding: 18px 7%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}

.brand {
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -0.6px;
    color: #172033;
}

.brand span {
    color: #2563eb;
}

.tag {
    color: #64748b;
    font-size: 14px;
}


/* ================================
   MAIN
================================ */

main {
    max-width: 1150px;
    margin: auto;
    padding: 60px 24px 50px;
}


/* ================================
   HERO
================================ */

.hero {
    text-align: center;
    margin-bottom: 42px;
}

.hero h1 {
    font-size: 42px;
    line-height: 1.15;
    letter-spacing: -1.2px;
    margin: 0 0 15px;
    font-weight: 850;
}

.hero p {
    margin: 0 auto;
    max-width: 650px;
    color: #64748b;
    font-size: 16px;
}


/* ================================
   INPUT GRID
================================ */

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}


/* ================================
   CARDS
================================ */

.card {
    background: #ffffff;
    border: 1px solid #e8edf5;
    border-radius: 20px;
    padding: 26px;
    box-shadow: 0 10px 35px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 45px rgba(15, 23, 42, 0.09);
}

.card > label {
    font-weight: 750;
    font-size: 15px;
    color: #1e293b;
    display: block;
    margin-bottom: 14px;
}

.card > p {
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
    margin: 14px 0;
}


/* ================================
   UPLOAD AREA
================================ */

.upload-area {
    border: 1.5px dashed #cbd5e1;
    background: #f8fafc;
    border-radius: 15px;
    padding: 22px;
    text-align: center;
    transition: all 0.2s ease;
}

.upload-area:hover {
    border-color: #2563eb;
    background: #f5f8ff;
}

.upload-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    background: #ffffff;
    border: 1px solid #dbe3ef;
    color: #2563eb;

    border-radius: 10px;
    padding: 10px 18px;

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;

    transition: all 0.2s ease;
}

.upload-button:hover {
    background: #eff6ff;
    border-color: #2563eb;
}

.file-name {
    margin-top: 10px;
    font-size: 13px;
    color: #64748b;
}


/* ================================
   TEXTAREA
================================ */

textarea {
    width: 100%;
    min-height: 280px;

    border: 1px solid #dbe3ef;
    border-radius: 14px;

    background: #fbfcfe;

    padding: 16px;

    resize: vertical;

    font: inherit;
    font-size: 14px;
    line-height: 1.6;

    color: #172033;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

textarea::placeholder {
    color: #94a3b8;
}

textarea:focus {
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}


/* ================================
   BUTTONS
================================ */

button {
    border: 0;
    border-radius: 12px;

    background: #2563eb;
    color: #ffffff;

    padding: 14px 26px;

    font-weight: 750;
    font-size: 14px;

    cursor: pointer;

    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.20);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

button:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 9px 24px rgba(37, 99, 235, 0.25);
}

button:active {
    transform: translateY(0);
}


/* Main analyze button */

#analyze {
    display: block;
    margin: 30px auto;
    min-width: 210px;
    font-size: 15px;
}


/* ================================
   ERROR
================================ */

.error {
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;

    border-radius: 12px;

    padding: 12px 16px;

    text-align: center;

    font-size: 14px;

    margin: 15px auto;
    max-width: 700px;
}

.error:empty {
    display: none;
}


/* ================================
   RESULT
================================ */

.result {
    margin-top: 30px;

    background: #ffffff;

    border: 1px solid #e8edf5;

    border-radius: 22px;

    padding: 32px;

    box-shadow: 0 14px 45px rgba(15, 23, 42, 0.07);
}


/* ================================
   OVERALL SCORE
================================ */

.overall-score {
    text-align: center;
    margin: 10px 0 35px;
}

.score-circle {
    width: 155px;
    height: 155px;

    border: 9px solid #2563eb;

    border-radius: 50%;

    margin: 0 auto 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        radial-gradient(
            circle,
            #f8fbff 0%,
            #ffffff 70%
        );

    box-shadow:
        0 0 0 8px rgba(37, 99, 235, 0.06),
        0 12px 30px rgba(37, 99, 235, 0.10);
}

.score-circle strong {
    font-size: 34px;
    font-weight: 850;
    color: #2563eb;
}

.overall-score h2 {
    margin: 10px 0 5px;

    font-size: 25px;
    letter-spacing: -0.4px;
}

.overall-score p {
    margin: 0;

    color: #64748b;

    font-size: 14px;
}


/* ================================
   CATEGORY SCORES
================================ */

.category-scores {
    display: grid;

    grid-template-columns:
        repeat(5, 1fr);

    gap: 14px;

    margin-bottom: 35px;
}

.category {
    background: #f8fafc;

    border: 1px solid #e8edf5;

    border-radius: 15px;

    padding: 17px 12px;

    text-align: center;

    transition: all 0.2s ease;
}

.category:hover {
    background: #f4f7ff;
    border-color: #d7e3ff;
    transform: translateY(-2px);
}

.category span {
    display: block;

    color: #64748b;

    font-size: 12px;

    margin-bottom: 7px;
}

.category strong {
    display: block;

    color: #2563eb;

    font-size: 20px;

    font-weight: 800;
}


/* ================================
   COLUMNS / MATCH
================================ */

.columns {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 22px;

    margin-top: 10px;
}

.columns > div {
    background: #f8fafc;

    border: 1px solid #e8edf5;

    border-radius: 16px;

    padding: 20px;
}

.columns h3 {
    margin: 0 0 15px;

    font-size: 16px;
}


/* ================================
   CHIPS
================================ */

.chips {
    display: flex;

    flex-wrap: wrap;

    gap: 8px;
}

.chip {
    background: #eef4ff;

    color: #1d4ed8;

    border: 1px solid #dbe7ff;

    border-radius: 999px;

    padding: 7px 12px;

    font-size: 13px;

    font-weight: 600;
}


/* Missing chips */

#missing .chip {
    background: #fff7ed;

    color: #c2410c;

    border-color: #fed7aa;
}


/* ================================
   TIP
================================ */

.tip {
    background: linear-gradient(
        135deg,
        #f8fafc,
        #f4f7ff
    );

    border: 1px solid #e5eaf3;

    padding: 16px 18px;

    border-radius: 13px;

    color: #475569;

    font-size: 14px;

    margin-top: 25px;
}


/* ================================
   COVER LETTER
================================ */

.cover-letter-section {
    margin-top: 35px;

    padding-top: 30px;

    border-top: 1px solid #edf0f5;
}

.cover-letter-section > button {
    margin: 0 auto 20px;
}

#letter-loading {
    text-align: center;

    color: #64748b;

    font-size: 14px;

    padding: 15px;
}

#letter-result {
    margin-top: 20px;
}

#letter-result h3 {
    font-size: 20px;

    margin: 0 0 15px;
}

#cover-letter {
    min-height: 400px;

    background: #fbfcfe;

    line-height: 1.7;
}


/* ================================
   IMPROVE OPTIONS
================================ */

.improve-options {
    margin-top: 18px;

    background: #f8fafc;

    border: 1px solid #e8edf5;

    border-radius: 14px;

    padding: 16px;
}

.improve-options label {
    font-size: 13px;

    color: #475569;

    margin-bottom: 8px;
}

select {
    width: 100%;

    padding: 11px 13px;

    border-radius: 10px;

    border: 1px solid #dbe3ef;

    background: #ffffff;

    color: #172033;

    outline: none;

    cursor: pointer;
}

select:focus {
    border-color: #2563eb;

    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}


/* ================================
   LETTER ACTIONS
================================ */

.letter-actions {
    display: flex;

    justify-content: center;

    flex-wrap: wrap;

    gap: 10px;

    margin-top: 18px;
}

.letter-actions button {
    margin: 0;

    padding: 11px 17px;

    font-size: 13px;
}


/* ================================
   INTERVIEW
================================ */

.interview-section {
    margin-top: 12px;
    padding-top: 0;
    border-top: none;
    text-align: center;
}

/* Bouton Interview */

.interview-section > button {
    display: block;
    margin: 0 auto 22px;
}


/* Résultat de l'interview */

#interview-result {
    margin-top: 0;

    text-align: left;

    background: #f8fafc;

    border: 1px solid #e8edf5;

    border-radius: 17px;

    padding: 22px;
}

#interview-result h3 {
    margin: 0 0 18px;

    font-size: 20px;
}

/* Interview question */

.interview-question {
    background: #ffffff;

    border: 1px solid #dbe3ef;

    border-left: 4px solid #2563eb;

    border-radius: 12px;

    padding: 17px;

    margin-bottom: 15px;

    font-weight: 650;

    color: #1e293b;
}


/* Interview answer */

#interview-answer {
    min-height: 180px;

    background: #ffffff;
}

#send-answer {
    margin: 14px 0 0;
}


/* Interview feedback */

#interview-feedback {
    margin-top: 20px;

    background: #ffffff;

    border: 1px solid #e2e8f0;

    border-radius: 14px;

    padding: 18px;

    color: #475569;
}

#interview-feedback h4 {
    margin-top: 0;
}


/* ================================
   FOOTER
================================ */

footer {
    text-align: center;

    color: #94a3b8;

    font-size: 12px;

    padding: 30px 20px;

    border-top: 1px solid #e8edf5;

    background: #ffffff;
}


/* ================================
   RESPONSIVE TABLET
================================ */

@media (max-width: 900px) {

    .category-scores {
        grid-template-columns:
            repeat(3, 1fr);
    }

    .hero h1 {
        font-size: 36px;
    }
}


/* ================================
   RESPONSIVE MOBILE
================================ */

@media (max-width: 750px) {

    header {
        display: block;

        padding: 16px 20px;

        text-align: center;
    }

    .tag {
        margin-top: 4px;
    }

    main {
        padding: 40px 16px;
    }

    .hero {
        margin-bottom: 30px;
    }

    .hero h1 {
        font-size: 30px;

        letter-spacing: -0.7px;
    }

    .hero p {
        font-size: 14px;
    }

    .grid,
    .columns {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 20px;
    }

    .result {
        padding: 20px;
    }

    .category-scores {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .score-circle {
        width: 135px;
        height: 135px;
    }

    .score-circle strong {
        font-size: 30px;
    }

    .letter-actions {
        flex-direction: column;
    }

    .letter-actions button {
        width: 100%;
    }

    button {
        max-width: 100%;
    }
}
/* ================================
   THREE MAIN ACTIONS
================================ */

.main-actions {
    display: flex;

    flex-direction: column;

    align-items: center;

    gap: 12px;

    margin: 30px 0 10px;
}

.main-actions button {
    width: 250px;

    margin: 0;

    text-align: center;
}

#adapt-cv {
    background: #0f766e;
}

#adapt-cv:hover {
    background: #0d625b;
}

/* ================================
   SMALL MOBILE
================================ */

@media (max-width: 450px) {

    .brand {
        font-size: 22px;
    }

    .hero h1 {
        font-size: 27px;
    }

    .category-scores {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .category {
        padding: 14px 8px;
    }

    .category span {
        font-size: 11px;
    }

    .category strong {
        font-size: 18px;
    }

    .score-circle {
        width: 125px;
        height: 125px;
    }

    .result {
        border-radius: 17px;
    }
}
/* ================================
   ADAPTED CV
================================ */

.adapted-cv-section {
    margin-top: 35px;
    padding: 28px;

    background: #ffffff;

    border: 1px solid #e8edf5;
    border-radius: 20px;

    box-shadow: 0 10px 35px rgba(15, 23, 42, 0.06);
}

.adapted-cv-section h3 {
    margin: 0 0 6px;

    text-align: center;

    font-size: 21px;
}

.adapted-cv-description {
    margin: 0 0 20px;

    text-align: center;

    color: #64748b;

    font-size: 14px;
}

#adapted-cv {
    min-height: 450px;

    background: #fbfcfe;
}

.adapted-cv-actions {
    display: flex;

    justify-content: center;

    margin-top: 18px;
}

.adapted-cv-actions button {
    margin: 0;
}
/* ================================
   CV DESIGNS
================================ */

.cv-designs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.design-card {
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    padding: 15px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.design-card:hover {
    border-color: #9ca3af;
    transform: translateY(-2px);
}

.design-card.active {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.design-card h3 {
    margin: 12px 0 4px;
    font-size: 16px;
}

.design-card p {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
}

.design-preview {
    height: 170px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    padding: 12px;
    box-sizing: border-box;
    background: #f9fafb;
}

.preview-header {
    height: 28px;
    width: 60%;
    margin-bottom: 12px;
    border-radius: 4px;
}

.preview-line {
    height: 6px;
    width: 90%;
    background: #d1d5db;
    margin-bottom: 7px;
    border-radius: 3px;
}

.preview-line.short {
    width: 55%;
}

.preview-section {
    height: 10px;
    width: 35%;
    margin-top: 15px;
    margin-bottom: 10px;
    border-radius: 3px;
}

/* MODERN */

.modern-preview {
    background: white;
}

.modern-preview .preview-header {
    background: #14532D;
    width: 100%;
    height: 38px;
}

.modern-preview .preview-section {
    background: #14532D;
}


/* PROFESSIONAL */

.professional-preview {
    background: white;
}

.professional-preview .preview-header {
    background: #172033;
    width: 100%;
    height: 42px;
}

.professional-preview .preview-section {
    background: #172033;
}


/* MINIMAL */

.minimal-preview {
    background: white;
}

.minimal-preview .preview-header {
    background: #111827;
    width: 45%;
    height: 10px;
    margin-top: 5px;
}

.minimal-preview .preview-section {
    background: #111827;
}


@media (max-width: 700px) {

    .cv-designs {
        grid-template-columns: 1fr;
    }

}

/* ==========================================
   PREMIUM MODAL
========================================== */

.premium-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;
}

.premium-modal.hidden {
    display: none;
}


/* Fond sombre */

.premium-overlay {
    position: absolute;
    inset: 0;

    background: rgba(0, 0, 0, 0.65);

    backdrop-filter: blur(4px);
}


/* Carte */

.premium-card {
    position: relative;
    z-index: 2;

    width: 100%;
    max-width: 520px;

    background: white;

    border-radius: 20px;

    padding: 35px;

    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.30);

    text-align: center;

    animation: premiumAppear 0.25s ease-out;
}


/* Animation */

@keyframes premiumAppear {

    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

}


/* Bouton fermer */

.close-premium {

    position: absolute;

    top: 12px;
    right: 16px;

    width: 38px;
    height: 38px;

    border: none;
    border-radius: 50%;

    background: transparent;

    font-size: 28px;

    cursor: pointer;

    color: #666;

    display: flex;
    align-items: center;
    justify-content: center;
}

.close-premium:hover {
    background: #f2f2f2;
    color: #111;
}


/* Icône */

.premium-icon {

    font-size: 42px;

    margin-bottom: 10px;
}


/* Titre */

.premium-card h2 {

    margin: 0 0 10px;

    font-size: 28px;

}


/* Sous-titre */

.premium-subtitle {

    margin: 0 auto 25px;

    color: #666;

    font-size: 16px;

    line-height: 1.5;

}


/* Avantages */

.premium-benefits {

    text-align: left;

    margin: 25px 0;

}


.premium-benefits > div {

    display: flex;

    align-items: flex-start;

    gap: 12px;

    margin-bottom: 14px;

    font-size: 15px;

    line-height: 1.4;

}


.premium-benefits .check {

    font-weight: bold;

    font-size: 18px;

    flex-shrink: 0;

}


/* Bloc Premium */

.premium-price {

    margin: 25px 0;

    padding: 18px;

    border-radius: 12px;

    background: #f5f7fa;

    display: flex;

    flex-direction: column;

    gap: 5px;

}


.premium-price strong {

    font-size: 20px;

}


.premium-price span {

    color: #666;

    font-size: 14px;

}


/* Boutons */

.premium-modal-actions {

    display: flex;

    flex-direction: column;

    gap: 10px;

}


/* Inscription */

.premium-main-button {

    display: block;

    width: 100%;

    box-sizing: border-box;

    padding: 13px 20px;

    border-radius: 10px;

    text-decoration: none;

    font-weight: 600;

    text-align: center;

    background: #111827;

    color: white;

    transition: 0.2s;

}


.premium-main-button:hover {

    transform: translateY(-1px);

    opacity: 0.9;

}


/* Connexion */

.premium-login-button {

    display: block;

    width: 100%;

    box-sizing: border-box;

    padding: 12px 20px;

    border-radius: 10px;

    text-decoration: none;

    font-weight: 600;

    text-align: center;

    background: white;

    color: #111827;

    border: 1px solid #d1d5db;

    transition: 0.2s;

}


.premium-login-button:hover {

    background: #f5f5f5;

}


/* Note */

.premium-note {

    margin: 20px 0 0;

    font-size: 12px;

    color: #777;

    line-height: 1.5;

}


/* Bloquer le scroll derrière le modal */

body.modal-open {

    overflow: hidden;
}


/* Mobile */

@media (max-width: 600px) {

    .premium-card {

        padding: 28px 22px;

        border-radius: 16px;

    }

    .premium-card h2 {

        font-size: 24px;

    }

    .premium-benefits > div {

        font-size: 14px;

    }

}
/* ==========================================
   HEADER ACCOUNT
========================================== */

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-email {
    font-size: 14px;
    color: #555;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-badge {
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.free-badge {
    background: #f1f1f1;
    color: #555;
}

.premium-badge {
    background: #fff3cd;
    color: #8a6200;
}

.logout-button {
    text-decoration: none;
    padding: 9px 14px;
    border-radius: 8px;
    border: 1px solid #ddd;
    color: #333;
    font-size: 14px;
    background: white;
}

.logout-button:hover {
    background: #f5f5f5;
}

.login-button {
    text-decoration: none;
}
.letter-design-selector {
    margin-top: 25px;
    margin-bottom: 20px;
}

.letter-design-selector h3 {
    margin-bottom: 12px;
    font-size: 16px;
    color: #14532D;
}

.design-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.design-option {
    padding: 10px 18px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    color: #374151;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.design-option:hover {
    border-color: #14532D;
}

.design-option.active {
    background: #14532D;
    color: white;
    border-color: #14532D;
}