/* PHOTOS ARTISAN */
.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 14px;
    margin-top: 16px;
}
.photo-card {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.photo-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-card.photo-en-attente img { filter: grayscale(60%) blur(1px); opacity: .7; }
.photo-badge {
    position: absolute; bottom: 6px; left: 6px; right: 6px;
    text-align: center; font-size: 10.5px; font-weight: 700;
    padding: 4px 6px; border-radius: 6px;
}
.photo-badge-free { background: #2f9e44; color: #fff; }
.photo-badge-attente { background: #f1c40f; color: #333; }

/* GRILLE D'EMPLACEMENTS SUGGERES (facon Leboncoin "Deposer une annonce")
   -- chaque case propose un type de photo precis plutot qu'un simple
   ajout generique, avec le prix (ou "Offerte") toujours visible avant
   meme de cliquer. */
.photo-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 18px;
}
.photo-slot {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    display: flex;
}
.photo-slot-vide {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #fafafa;
    border: 1.5px dashed #ddd;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, transform .15s ease;
    text-align: center;
    padding: 10px;
    box-sizing: border-box;
}
.photo-slot-vide:hover { border-color: var(--orange); background: #fff9f4; transform: translateY(-2px); }
.photo-slot-icone { font-size: 26px; }
.photo-slot-label { font-size: 12px; font-weight: 700; color: var(--gray-dark); line-height: 1.25; }
.photo-slot-prix { font-size: 10.5px; font-weight: 700; color: var(--orange-dark); background: #fff3e8; padding: 2px 8px; border-radius: 999px; }
.photo-slot-prix-offerte { color: #2f9e44; background: #eafaf0; }

.photo-slot-remplie { overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.photo-slot-remplie img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Prechargement visuel pendant l'envoi -- apercu de la photo recadree
   avec superposition "en cours", facon Leboncoin. */
.photo-slot-en-envoi {
    position: relative;
    overflow: hidden;
    border: 1.5px solid #eee !important;
    cursor: default !important;
    pointer-events: none;
}
.photo-slot-en-envoi img { width: 100%; height: 100%; object-fit: cover; display: block; filter: brightness(.7); }
.photo-slot-overlay-envoi {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    color: #fff; font-size: 11px; font-weight: 700;
    background: rgba(0,0,0,.15);
}
/* Etat intermediaire "prete a envoyer" -- distinct visuellement de
   "envoi en cours" (vert + coche plutot que spinner), pour que
   l'artisan comprenne que la photo est chargee et attend juste sa
   confirmation, avant meme d'avoir clique sur le bouton final. */
.photo-slot-overlay-prete { background: rgba(47,158,68,.35); }
.photo-slot-check {
    width: 22px; height: 22px; border-radius: 50%;
    background: #2f9e44; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 800;
}
.photo-spinner {
    width: 22px; height: 22px; border-radius: 50%;
    border: 3px solid rgba(255,255,255,.4); border-top-color: #fff;
    animation: photoSpin .7s linear infinite;
}
@keyframes photoSpin { to { transform: rotate(360deg); } }
.photo-slot-caption {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0,0,0,.6), transparent);
    color: #fff; font-size: 10.5px; font-weight: 600;
    padding: 14px 8px 6px; text-align: center;
}

/* BOOSTS -- cartes façon Leboncoin, habillées SOBASO */
.boosts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 18px;
}
.boost-card {
    background: #fff;
    border: 1.5px solid #eee;
    border-radius: 14px;
    padding: 20px;
    position: relative;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.boost-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,0,0,.08); border-color: var(--orange); }
.boost-card.boost-recommande { border-color: var(--orange); box-shadow: 0 6px 18px rgba(255,107,0,.15); }
.boost-card-tag {
    position: absolute; top: -11px; left: 16px;
    background: var(--orange); color: #fff; font-size: 10.5px; font-weight: 800;
    padding: 4px 10px; border-radius: 999px; letter-spacing: .03em;
}
.boost-card-icon {
    width: 42px; height: 42px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; margin-bottom: 12px;
}
.boost-card-titre { font-weight: 800; font-size: 15.5px; color: var(--gray-dark); margin: 0 0 4px; }
.boost-card-desc { font-size: 12.5px; color: var(--gray-medium); margin: 0 0 14px; line-height: 1.4; min-height: 34px; }
.boost-card-options { display: flex; flex-direction: column; gap: 8px; }
.boost-option {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 12px; border: 1.5px solid #eee; border-radius: 9px;
    cursor: pointer; transition: border-color .15s ease, background .15s ease;
    position: relative;
}
.boost-option:hover { border-color: var(--orange); background: #fff9f4; }
.boost-option-input { position: absolute; opacity: 0; width: 0; height: 0; }

.boost-option-check {
    width: 18px; height: 18px; flex-shrink: 0;
    border: 2px solid #ccc; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: border-color .15s ease;
}
.boost-option-check::after {
    content: ''; width: 9px; height: 9px; border-radius: 50%;
    background: var(--orange); transform: scale(0); transition: transform .15s ease;
}
.boost-option-input:checked ~ .boost-option-check { border-color: var(--orange); }
.boost-option-input:checked ~ .boost-option-check::after { transform: scale(1); }
.boost-option-input:checked ~ .boost-option-label { font-weight: 700; color: var(--orange-dark); }

.boost-option-label { font-size: 13px; font-weight: 600; flex: 1; }
.boost-option-price { font-weight: 800; color: var(--orange-dark); font-size: 13.5px; }

.boost-active-banner {
    display: flex; align-items: center; gap: 10px;
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    border: 1.5px solid #fed7aa;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 18px;
    font-size: 13px;
    color: #9a3412;
}

/* BADGES SUR LES CARTES ARTISAN COTE CLIENT */
.artisan-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.artisan-badge-une { background: linear-gradient(135deg, var(--orange), #ff8c3d); color: #fff; }
.artisan-badge-remonte { background: #eaf2fd; color: var(--blue-dark); }

/* ZONE DE DEPOT DE PHOTO */
.photo-empty-state {
    text-align: center;
    padding: 36px 20px;
    background: #fafafa;
    border: 1.5px dashed #ddd;
    border-radius: 14px;
    margin-top: 16px;
}
.photo-empty-icon { font-size: 38px; margin-bottom: 10px; }
.photo-empty-state p { margin: 4px 0; }

.photo-upload-form { margin-top: 22px; }

.photo-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
    padding: 28px 20px;
    border: 2px dashed #ffcfa3;
    border-radius: 14px;
    background: #fff9f4;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}
.photo-dropzone:hover { border-color: var(--orange); background: #fff3e8; }
.photo-dropzone.photo-dropzone-filled { border-color: #2f9e44; background: #f3fbf3; }
.photo-dropzone.photo-dropzone-dragover { border-color: var(--orange); background: #fff3e8; transform: scale(1.01); box-shadow: 0 4px 14px rgba(255,107,0,.15); }
.photo-dropzone-icon { font-size: 28px; margin-bottom: 4px; }
.photo-dropzone-text { font-weight: 700; font-size: 14px; color: var(--gray-dark); }
.photo-dropzone-sub { font-size: 11.5px; color: var(--gray-medium); }
.photo-filename { display: block; text-align: center; font-size: 12.5px; color: #2f9e44; font-weight: 600; margin-top: 8px; }

/* RECADRAGE PHOTO */
.crop-canvas-wrap {
    display: flex;
    justify-content: center;
    padding: 20px 26px 0;
}
#crop-canvas {
    border-radius: 50%;
    cursor: grab;
    box-shadow: 0 0 0 4px #fff, 0 0 0 5px #eee, 0 8px 24px rgba(0,0,0,.15);
    touch-action: none;
}
#crop-canvas:active { cursor: grabbing; }
