:root {
    /* Fond et texte */
    --color-white: #FFFFFF;
    --color-black: #000000;

    /* Accents (à adapter aux codes exacts de votre maquette) */
    --color-blue:  #1A237E;   /* Bleu profond extrait de la capture */
    --color-green: #388E3C;   /* Vert modéré extrait de la capture */
    --color-pink:  #D81B60;   /* Rose vif extrait de la capture */
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--color-white);
    color: var(--color-black);
    line-height: 1.5;
}
.upload-section {
    text-align: center;
    margin: 2rem 0;
}

.upload-section #uploadBtn, #resetBtn, #cropBtn, #downloadBtn, #newImageBtn, #retourHome {
    background-color: var(--color-white);
    color: var(--color-black);
    border: 2px solid var(--color-green);
    border-radius: 4px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.upload-section #uploadBtn:hover, #resetBtn:hover, #cropBtn:hover, #downloadBtn:hover, #newImageBtn:hover, #retourHome:hover {
    background-color: var(--color-green);
    color: var(--color-white);
}
#retourHome {
    text-decoration:none;
}
.button {
    margin-top:10px
}
.file-info {
    margin-top: 20px;
    font-size: 14px;
    color: #2E7D32;
    background: #E8F5E8;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #4CAF50;
}
.container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(76, 175, 80, 0.2);
    overflow: hidden;
}

header {
    background: var(--color-green);
    color: var(--color-white);
    padding: 30px;
    text-align: center;
    position: relative;
}

.intro {
    margin:30px;
}

.intro h3 {
    padding:10px 0;
}

.intro p {
    margin-bottom:15px;
}

.steps li {
    font-style: italic;
}

.upload-section {
    padding: 40px;
    text-align: center;
    border-bottom: 1px solid #E8F5E8;
    background: #FAFFFE;
}
.editor-section {
    padding: 40px;
    text-align: center;
    background: #FAFFFE;
}

.canvas-container {
    position: relative;
    display: inline-block;
    margin-bottom: 30px;
    border: 2px solid #C8E6C9;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.15);
}

#originalCanvas {
display: block;
max-width: 100%;
max-height: 500px;
}

.crop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(46, 125, 50, 0.4);
    cursor: move;
}

.crop-box {
    position: absolute;
    border: 3px solid #4CAF50;
    background: transparent;
    cursor: move;
    min-width: 50px;
    min-height: 64px;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8);
}

.crop-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    box-shadow: 0 0 0 9999px rgba(46, 125, 50, 0.4);
}

.resize-handle {
    position: absolute;
    width: 14px;
    height: 14px;
    background: #4CAF50;
    border: 3px solid white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.4);
    transition: all 0.2s ease;
}

.resize-handle:hover {
    background: #45a049;
    transform: scale(1.1);
    box-shadow: 0 3px 12px rgba(76, 175, 80, 0.6);
}

.resize-handle.top-left {
    top: -7px;
    left: -7px;
    cursor: nw-resize;
}

.resize-handle.top-right {
    top: -7px;
    right: -7px;
    cursor: ne-resize;
}

.resize-handle.bottom-left {
    bottom: -7px;
    left: -7px;
    cursor: sw-resize;
}

.resize-handle.bottom-right {
    bottom: -7px;
    right: -7px;
    cursor: se-resize;
}

.controls {
    text-align: center;
    margin-top: 25px;
    padding: 20px;
    background: #E8F5E8;
    border-radius: 12px;
}

.result-section {
    padding: 40px;
    text-align: center;
    border-top: 1px solid #C8E6C9;
    background: linear-gradient(135deg, #E8F5E8 0%, #F1F8E9 100%);
}

.result-section h3 {
    margin-bottom: 25px;
    color: #2E7D32;
    font-size: 1.6em;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
}

#resultCanvas {
border: 3px solid #4CAF50;
border-radius: 12px;
margin-bottom: 25px;
background: white;
box-shadow: 0 8px 25px rgba(76, 175, 80, 0.2);
}

.download-controls {
    margin-top: 25px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.1);
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 10px;
    }

    header {
        padding: 25px 20px;
    }

    header h1 {
        font-size: 2em;
    }

    .upload-section, .editor-section, .result-section {
        padding: 25px 20px;
    }

    .btn-primary, .btn-secondary, .btn-success {
        padding: 12px 24px;
        font-size: 14px;
        margin: 8px;
    }

    .controls, .download-controls {
        padding: 15px;
    }
}

/* Animation d'entrée pour les sections */
.editor-section, .result-section {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Style pour les messages d'information */
.info-message {
    background: #E8F5E8;
    border: 1px solid #C8E6C9;
    border-left: 4px solid #4CAF50;
    color: #2E7D32;
    padding: 12px 16px;
    border-radius: 4px;
    margin: 10px 0;
    font-size: 14px;
}
