/* =========================
   RESET
========================= */

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

html{
    scroll-behavior:smooth;
}

body{
    font-family:Arial,Helvetica,sans-serif;
    background:#f4f7fb;
    color:#1e293b;
    line-height:1.6;
}

img{
    max-width:100%;
    display:block;
}

a{
    text-decoration:none;
}

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

section{
    padding:80px 0;
}

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

.header{
    background:#fff;
    box-shadow:0 2px 15px rgba(0,0,0,.05);
    position:sticky;
    top:0;
    z-index:1000;
}

.navbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:20px;
    padding:20px 0;
}

.logo-container{
    display:flex;
    align-items:center;
    gap:15px;
    color:#0f172a;
}

.logo{
    width:55px;
    height:55px;
    object-fit:contain;
}

.logo-text h2{
    font-size:20px;
    font-weight:700;
}

.logo-text span{
    font-size:13px;
    color:#64748b;
}

.nav-menu ul{
    display:flex;
    gap:25px;
    list-style:none;
}

.nav-menu a{
    color:#0f172a;
    font-weight:600;
    transition:.3s;
}

.nav-menu a:hover{
    color:#2563eb;
}

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

.hero{
    background:linear-gradient(
        135deg,
        #2563eb,
        #1d4ed8
    );
    color:#fff;
    text-align:center;
    padding:90px 0;
}

.badge{
    display:inline-block;
    background:#dbeafe;
    color:#2563eb;
    padding:8px 18px;
    border-radius:999px;
    font-size:14px;
    font-weight:700;
    margin-bottom:20px;
}

.hero h1{
    font-size:50px;
    font-weight:800;
    margin-bottom:20px;
    line-height:1.2;
}

.hero p{
    max-width:850px;
    margin:auto;
    font-size:18px;
    opacity:.95;
}

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

.hero-buttons{
    display:flex;
    justify-content:center;
    align-items:center;
    flex-wrap:wrap;
    gap:15px;
    margin-top:35px;
}

.btn-primary,
.btn-secondary{
    display:flex;
    align-items:center;
    justify-content:center;
    min-height:52px;
    padding:14px 26px;
    border:none;
    border-radius:12px;
    font-weight:700;
    cursor:pointer;
    transition:.3s;
}

.btn-primary{
    background:#2563eb;
    color:#fff;
}

.btn-primary:hover{
    background:#1d4ed8;
    transform:translateY(-2px);
}

.btn-secondary{
    background:#fff;
    color:#2563eb;
}

.btn-secondary:hover{
    transform:translateY(-2px);
}

/* =========================
   TITRES
========================= */

.section-title{
    text-align:center;
    margin-bottom:40px;
}

.section-title span{
    display:inline-block;
    background:#dbeafe;
    color:#2563eb;
    padding:6px 14px;
    border-radius:999px;
    font-size:13px;
    font-weight:700;
    margin-bottom:10px;
}

.section-title h2{
    font-size:38px;
    margin-bottom:10px;
}

.section-title p{
    max-width:700px;
    margin:auto;
    color:#64748b;
}

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

.hero-card{
    background:#fff;
    padding:35px;
    border-radius:22px;
    box-shadow:0 10px 35px rgba(0,0,0,.08);
    margin-bottom:30px;
}

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

@media(max-width:992px){

    .navbar{
        flex-direction:column;
    }

    .nav-menu ul{
        flex-wrap:wrap;
        justify-content:center;
        gap:15px;
    }
}

@media(max-width:768px){

    section{
        padding:50px 0;
    }

    .container{
        width:95%;
    }

    .hero{
        padding:60px 0;
    }

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

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

    .section-title h2{
        font-size:28px;
    }

    .hero-buttons{
        flex-direction:column;
    }

    .hero-buttons a,
    .hero-buttons button{
        width:100%;
        max-width:320px;
    }

    .nav-menu ul{
        gap:12px;
    }

    .logo{
        width:48px;
        height:48px;
    }
}
/* =========================
   UPLOAD ZONE
========================= */

.upload-zone{
    width:100%;
    text-align:center;
}

.upload-box{
    min-height:230px;
    border:3px dashed #cbd5e1;
    border-radius:22px;
    background:#f8fafc;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    cursor:pointer;
    padding:40px 20px;
    transition:.3s;
}

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

.upload-box h3{
    font-size:30px;
    margin-bottom:10px;
    color:#0f172a;
}

.upload-box p{
    color:#64748b;
}

/* =========================
   TOOLBAR
========================= */

.editor-toolbar,
.text-toolbar{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    margin-bottom:20px;
}

.tool-btn,
.text-toolbar button,
.text-toolbar select,
.text-toolbar input{
    min-height:46px;
    padding:12px 18px;
    border:none;
    border-radius:12px;
    background:#f1f5f9;
    color:#0f172a;
    font-weight:600;
    cursor:pointer;
    transition:.3s;
}

.tool-btn:hover,
.text-toolbar button:hover{
    background:#2563eb;
    color:#fff;
}

.text-toolbar input[type="color"]{
    width:60px;
    padding:4px;
}

/* =========================
   PDF PREVIEW
========================= */

.pdf-preview-wrapper{
    background:#e2e8f0;
    border-radius:20px;
    padding:25px;
    overflow:auto;
    min-height:700px;
}

#pdfPreview{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:30px;
}

.preview-placeholder{
    color:#64748b;
    font-size:18px;
    margin-top:50px;
}

.pdf-page{
    position:relative;
    background:#fff;
    border-radius:12px;
    overflow:hidden;
    box-shadow:0 15px 40px rgba(0,0,0,.15);
    margin:auto;
}

.pdf-page canvas{
    display:block;
    max-width:100%;
}

/* =========================
   ELEMENTS
========================= */

.editor-text,
.editor-signature,
.editor-image,
.editor-white-box,
.editor-shape,
.editor-highlight{
    position:absolute;
    z-index:200;
}

.editor-text{
    min-width:120px;
    min-height:35px;
    padding:8px 12px;
    background:rgba(255,255,255,.9);
    border-radius:8px;
    font-size:18px;
    cursor:move;
}

.editor-signature{
    min-width:120px;
    padding:8px;
    background:rgba(255,255,255,.9);
    border-radius:8px;
    font-family:cursive;
    font-size:32px;
    cursor:move;
}

.editor-image{
    cursor:move;
}

.editor-image img{
    display:block;
    max-width:100%;
}

.editor-white-box{
    background:#fff;
    border:2px solid #cbd5e1;
    cursor:move;
}

.editor-shape{
    border:3px solid #2563eb;
    background:transparent;
    cursor:move;
}

.editor-highlight{
    background:rgba(255,255,0,.45);
    cursor:move;
}

/* =========================
   SELECTED
========================= */

.selected{
    outline:2px solid #2563eb;
    outline-offset:2px;
}

/* =========================
   RESIZE HANDLE
========================= */

.resize-handle{
    position:absolute;
    width:16px;
    height:16px;
    right:-8px;
    bottom:-8px;
    border-radius:50%;
    background:#2563eb;
    cursor:nwse-resize;
    z-index:300;
}

/* =========================
   DRAW LAYER
========================= */

.drawing-layer{
    position:absolute;
    top:0;
    left:0;
    z-index:100;
    pointer-events:none;
}

/* =========================
   TOAST
========================= */

.toast{
    position:fixed;
    right:20px;
    bottom:20px;
    background:#0f172a;
    color:#fff;
    padding:15px 20px;
    border-radius:12px;
    font-size:14px;
    line-height:1.5;
    max-width:320px;
    word-break:break-word;
    opacity:0;
    transform:translateY(20px);
    transition:.3s;
    z-index:99999;
}

.toast.show{
    opacity:1;
    transform:translateY(0);
}

/* =========================
   SCORE BOX
========================= */

.cv-score-box{
    background:#fff;
    padding:30px;
    border-radius:20px;
    box-shadow:0 10px 35px rgba(0,0,0,.08);
    text-align:center;
}

#letterScore{
    font-size:48px;
    font-weight:800;
    color:#2563eb;
    margin-bottom:10px;
}
/* =========================
   FOOTER
========================= */

footer,
.footer{
    background:#0f172a;
    color:#fff;
    text-align:center;
    padding:50px 20px;
    margin-top:50px;
}

footer .container,
.footer .container{
    width:90%;
    max-width:1200px;
    margin:auto;
}

footer img,
.footer img,
.footer-logo{
    height:60px;
    width:auto;
    max-width:120px;
    display:block;
    margin:0 auto 15px;
}

.footer-links{
    display:flex;
    justify-content:center;
    align-items:center;
    flex-wrap:wrap;
    gap:20px;
    margin:25px 0;
}

.footer-links a,
footer a{
    color:#cbd5e1;
    text-decoration:none;
    transition:.3s;
}

.footer-links a:hover,
footer a:hover{
    color:#fff;
}

footer p,
.footer p{
    color:#cbd5e1;
    line-height:1.7;
    margin-bottom:10px;
}

/* =========================
   EXPORT MODE
========================= */

.export-mode .selected{
    outline:none !important;
}

.export-mode .resize-handle{
    display:none !important;
}

.export-mode .editor-text,
.export-mode .editor-signature{
    border:none !important;
    box-shadow:none !important;
}

.export-mode .tool-btn,
.export-mode .editor-toolbar,
.export-mode .text-toolbar{
    display:none !important;
}

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

@media(max-width:768px){

    .footer-links{
        flex-direction:column;
        gap:12px;
    }

    footer img,
    .footer img,
    .footer-logo{
        height:50px;
    }

    .editor-toolbar,
    .text-toolbar{
        justify-content:center;
    }

    .tool-btn,
    .text-toolbar button,
    .text-toolbar select,
    .text-toolbar input{
        width:calc(50% - 8px);
        font-size:14px;
    }

    .pdf-preview-wrapper{
        padding:10px;
        min-height:500px;
    }

    .upload-box{
        min-height:180px;
        padding:30px 15px;
    }

    .upload-box h3{
        font-size:24px;
    }

    .upload-box p{
        font-size:14px;
    }

    .pdf-page{
        transform-origin:top center;
    }
}

/* =========================
   SMALL PHONE
========================= */

@media(max-width:480px){

    .tool-btn,
    .text-toolbar button,
    .text-toolbar select,
    .text-toolbar input{
        width:100%;
    }

    .hero-card{
        padding:20px;
    }

    .pdf-preview-wrapper{
        min-height:400px;
    }

    .toast{
        left:15px;
        right:15px;
        bottom:15px;
        max-width:none;
    }
}

/* =========================
   PRINT
========================= */

@media print{

    body{
        background:#fff;
    }

    header,
    footer,
    .hero,
    .hero-buttons,
    .editor-toolbar,
    .text-toolbar,
    .upload-zone,
    .cv-score-box{
        display:none !important;
    }

    .pdf-preview-wrapper{
        background:#fff;
        padding:0;
    }

    .pdf-page{
        box-shadow:none !important;
        border:none !important;
        margin:0 !important;
    }

    .selected,
    .resize-handle{
        display:none !important;
    }
}