/* LA Galerie Client — Front-end v2 */

.la-gallery-wrapper {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 16px 130px;
    font-family: Georgia, serif;
}

.la-gallery-wrapper img {
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
}

/* ===== Écran mot de passe ===== */
.la-password-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding-bottom: 40px;
}
.la-password-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 14px;
    padding: 48px 40px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    box-shadow: 0 6px 30px rgba(0,0,0,.07);
}
.la-password-icon svg { width: 44px; height: 44px; stroke: #1a1a2e; margin-bottom: 14px; }
.la-password-title { font-size: 24px; font-weight: 400; margin: 0 0 10px; color: #1a1a2e; line-height: 1.3; }
.la-password-subtitle { color: #777; font-size: 14px; font-family: Arial, sans-serif; line-height: 1.6; margin-bottom: 26px; }
.la-password-help { color: #aaa; font-size: 12px; font-family: Arial, sans-serif; margin-top: 20px; }

.la-alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-family: Arial, sans-serif;
    margin-bottom: 18px;
}
.la-alert-error { background: #fff0f0; border: 1px solid #fcc; color: #c0392b; }

.la-field-group { margin-bottom: 14px; }
.la-password-input {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
    text-align: center;
    letter-spacing: 1px;
    transition: border-color .2s, box-shadow .2s;
}
.la-password-input:focus { outline: none; border-color: #1a1a2e; box-shadow: 0 0 0 3px rgba(26,26,46,.08); }

.la-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-family: Arial, sans-serif;
    font-weight: 600;
    transition: all .2s;
    text-decoration: none;
}
.la-btn-primary { background: #1a1a2e; color: #fff; width: 100%; }
.la-btn-primary:hover { background: #2d2d4e; }
.la-btn-light { background: #fff; color: #1a1a2e; }
.la-btn-light:hover:not(:disabled) { background: #eaeaf5; }
.la-btn:disabled { opacity: .45; cursor: not-allowed; }

/* ===== En-tête galerie ===== */
.la-gallery-header { padding: 40px 0 8px; text-align: center; }
.la-gallery-title {
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 400;
    color: #1a1a2e;
    margin: 0 0 14px;
    line-height: 1.2;
}
.la-welcome-message {
    max-width: 680px;
    margin: 0 auto 8px;
    color: #555;
    font-size: 16px;
    line-height: 1.75;
    font-style: italic;
}
.la-welcome-message p { margin: 0 0 8px; }

/* ===== Explicatif fonctionnement ===== */
.la-how-it-works {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    max-width: 880px;
    margin: 28px auto 8px;
    padding: 24px;
    background: #fafafa;
    border: 1px solid #efefef;
    border-radius: 14px;
}
.la-how-step {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.la-step-num {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #1a1a2e;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    font-family: Arial, sans-serif;
}
.la-step-content { display: flex; flex-direction: column; gap: 3px; }
.la-step-content strong { font-size: 14px; color: #1a1a2e; font-family: Arial, sans-serif; }
.la-step-content span { font-size: 12.5px; color: #777; font-family: Arial, sans-serif; line-height: 1.5; }

/* ===== Notice quota ===== */
.la-quota-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    max-width: 680px;
    margin: 14px auto 8px;
    padding: 12px 20px;
    background: #f4f6fb;
    border-radius: 10px;
    color: #44507a;
    font-size: 13.5px;
    font-family: Arial, sans-serif;
    line-height: 1.5;
}
.la-quota-notice svg { width: 18px; height: 18px; flex-shrink: 0; stroke: #44507a; }

/* ===== Sélection déjà envoyée ===== */
.la-already-submitted {
    max-width: 560px;
    margin: 28px auto;
    padding: 36px 32px;
    background: #f3faf3;
    border: 1px solid #d4ecd4;
    border-radius: 14px;
    text-align: center;
}
.la-submitted-icon svg { width: 44px; height: 44px; stroke: #276727; margin-bottom: 10px; }
.la-already-submitted h2 { font-size: 20px; font-weight: 400; color: #276727; margin: 0 0 8px; }
.la-already-submitted p { color: #557755; font-size: 14px; font-family: Arial, sans-serif; line-height: 1.6; margin: 0; }

/* ===== Grille ===== */
.la-photo-grid.front-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
    margin-top: 28px;
}

.la-photo-item.front-item { margin: 0; }

.la-photo-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    aspect-ratio: 4/3;
    background: #f0f0f0;
    cursor: zoom-in;
}
.la-photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
    pointer-events: none;
}
.la-photo-wrap:hover img { transform: scale(1.04); }

.la-zoom-hint {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .2s;
}
.la-zoom-hint svg { width: 15px; height: 15px; stroke: #1a1a2e; }
.la-photo-wrap:hover .la-zoom-hint { opacity: 1; }

/* Badge sélectionnée */
.la-selected-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    background: #1a1a2e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(.5);
    transition: all .22s cubic-bezier(.34,1.56,.64,1);
}
.la-selected-badge svg { width: 17px; height: 17px; fill: #fff; }
.la-photo-item.is-selected .la-selected-badge { opacity: 1; transform: scale(1); }
.la-photo-item.is-selected .la-photo-wrap { outline: 3px solid #1a1a2e; outline-offset: -3px; }

/* Footer photo : numéro + bouton + */
.la-photo-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 4px 0;
    margin: 0;
}
.la-photo-num { font-size: 12px; color: #bbb; font-family: Arial, sans-serif; }
.la-select-footer-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid #ccc;
    background: #fff;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    padding: 0;
}
.la-select-footer-btn:hover { border-color: #1a1a2e; color: #1a1a2e; background: #f3f3fa; transform: scale(1.08); }
.la-photo-item.is-selected .la-select-footer-btn { background: #1a1a2e; border-color: #1a1a2e; color: #fff; }

/* ===== Lightbox ===== */
.la-lightbox { display: none; position: fixed; inset: 0; z-index: 99999; }
.la-lightbox.is-open { display: block; }
.la-lightbox-backdrop { position: absolute; inset: 0; background: rgba(8,8,16,.94); cursor: pointer; }

.la-lightbox-inner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 56px 80px 90px;
    box-sizing: border-box;
    pointer-events: none;
}
.la-lightbox-inner > * { pointer-events: auto; }

.la-lb-img-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    max-height: calc(100vh - 170px);
}
#la-lb-img {
    max-width: 100%;
    max-height: calc(100vh - 170px);
    object-fit: contain;
    border-radius: 6px;
    user-select: none;
    -webkit-user-drag: none;
    transition: opacity .15s;
}
.la-lb-spinner {
    position: absolute;
    width: 34px; height: 34px;
    border: 3px solid rgba(255,255,255,.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: la-spin .7s linear infinite;
    display: none;
}
.la-lightbox.is-loading .la-lb-spinner { display: block; }
.la-lightbox.is-loading #la-lb-img { opacity: 0; }
@keyframes la-spin { to { transform: rotate(360deg); } }

.la-lb-close {
    position: absolute; top: 14px; right: 14px;
    background: rgba(255,255,255,.1);
    border: none; border-radius: 50%;
    width: 42px; height: 42px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .2s;
    z-index: 2;
}
.la-lb-close:hover { background: rgba(255,255,255,.22); }
.la-lb-close svg { width: 20px; height: 20px; stroke: #fff; }

.la-lb-nav {
    position: absolute; top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,.1);
    border: none; border-radius: 50%;
    width: 46px; height: 46px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .2s;
    z-index: 2;
}
.la-lb-nav:hover { background: rgba(255,255,255,.22); }
.la-lb-nav svg { width: 22px; height: 22px; stroke: #fff; }
.la-lb-prev { left: 14px; }
.la-lb-next { right: 14px; }

.la-lb-footer {
    display: flex; align-items: center; gap: 18px;
    margin-top: 18px;
}
.la-lb-counter { color: rgba(255,255,255,.6); font-family: Arial, sans-serif; font-size: 13px; min-width: 56px; }
.la-lb-select-btn {
    display: flex; align-items: center; gap: 8px;
    padding: 11px 26px;
    background: #fff; color: #1a1a2e;
    border: none; border-radius: 8px;
    cursor: pointer;
    font-size: 14px; font-family: Arial, sans-serif; font-weight: 700;
    transition: all .2s;
}
.la-lb-select-btn:hover { background: #e8e8f5; }
.la-lb-select-btn.is-selected { background: #1a1a2e; color: #fff; outline: 1px solid rgba(255,255,255,.4); }
.la-lb-select-icon { font-size: 18px; line-height: 1; }

/* ===== Sticky bar ===== */
.la-sticky-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 9999;
    background: #1a1a2e;
    color: #fff;
    transform: translateY(110%);
    transition: transform .3s ease;
    box-shadow: 0 -4px 24px rgba(0,0,0,.25);
}
.la-sticky-bar.is-visible { transform: translateY(0); }

.la-sticky-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 13px 24px;
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}
.la-sticky-count { display: flex; align-items: baseline; gap: 7px; min-width: 150px; }
.la-count-number { font-size: 30px; font-weight: 300; line-height: 1; font-family: Georgia, serif; }
.la-count-label { font-family: Arial, sans-serif; font-size: 12.5px; color: rgba(255,255,255,.65); }

.la-sticky-pricing {
    display: flex; align-items: center; gap: 14px;
    flex: 1;
    font-family: Arial, sans-serif;
    font-size: 14px;
    flex-wrap: wrap;
}
.la-quota-info { color: rgba(255,255,255,.85); }
.la-extra-price {
    color: #ffb38a;
    font-weight: 700;
    padding: 5px 14px;
    background: rgba(255,100,30,.16);
    border-radius: 6px;
    border: 1px solid rgba(255,120,50,.35);
    animation: la-pulse .4s ease;
}
@keyframes la-pulse { 0% { transform: scale(.92); } 100% { transform: scale(1); } }

.la-send-btn { flex-shrink: 0; font-size: 14px; padding: 11px 24px; width: auto; }
.la-send-btn svg { width: 15px; height: 15px; }

/* ===== Toast ===== */
.la-toast {
    position: fixed;
    top: 24px; left: 50%;
    transform: translateX(-50%) translateY(-90px);
    background: #1a1a2e;
    color: #fff;
    padding: 15px 30px;
    border-radius: 10px;
    font-family: Arial, sans-serif;
    font-size: 15px;
    z-index: 999999;
    transition: transform .35s cubic-bezier(.34,1.3,.64,1);
    box-shadow: 0 6px 26px rgba(0,0,0,.25);
    max-width: 90vw;
    text-align: center;
}
.la-toast.is-visible { transform: translateX(-50%) translateY(0); }
.la-toast.is-success { background: #276727; }
.la-toast.is-error { background: #a03030; }

.la-empty-gallery {
    text-align: center;
    color: #999;
    font-family: Arial, sans-serif;
    padding: 60px 0;
}

/* ===== Responsive ===== */
@media (max-width: 860px) {
    .la-how-it-works { grid-template-columns: 1fr; gap: 14px; padding: 18px; }
}
@media (max-width: 768px) {
    .la-photo-grid.front-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
    .la-lightbox-inner { padding: 56px 12px 90px; }
    .la-lb-prev { left: 6px; }
    .la-lb-next { right: 6px; }
    .la-sticky-inner { padding: 11px 14px; gap: 10px; }
    .la-count-number { font-size: 24px; }
    .la-send-btn { width: 100%; }
    .la-password-card { padding: 34px 24px; }
}
@media (max-width: 480px) {
    .la-photo-grid.front-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .la-sticky-pricing { font-size: 12.5px; }
}
