/* =====================================================
   Nestor Contact — CSS Front-end
   Palette NESTOR M WINE : #1a1a1a (noir), #c8b898 (sable), #fff (blanc)
   ===================================================== */

:root {
    --nc-dark:        #1a1a1a;
    --nc-field-bg:    #c8b898;
    --nc-field-bd:    #b5a07e;
    --nc-field-dark:  #a08060;
    --nc-white:       #fff;
    --nc-grey-text:   #777;
    --nc-opt-text:    #8a7a6a;
    --nc-error:       #c0392b;
    --nc-success:     #2e9e5a;
    --nc-radius:      4px;
    --nc-font:        'Helvetica Neue', Arial, sans-serif;
}

/* ── Wrapper ── */
.nc-wrapper {
    font-family: var(--nc-font);
    color: var(--nc-dark);
    max-width: 680px;
    width: 100%;
}

/* ── Alerte erreur ── */
.nc-alert {
    padding: 14px 18px;
    border-radius: var(--nc-radius);
    margin-bottom: 20px;
    font-size: 15px;
    line-height: 1.5;
}
.nc-alert--error {
    background: #fdecea;
    border-left: 4px solid var(--nc-error);
    color: #9c1a1a;
}

/* ── Form ── */
.nc-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ── Rows ── */
.nc-row {
    display: flex;
    gap: 10px;
}
.nc-row--2col {
    flex-direction: row;
}
.nc-row--rgpd {
    align-items: flex-start;
    margin-top: 4px;
}
.nc-row--submit {
    margin-top: 8px;
}

/* ── Fields ── */
.nc-field {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.nc-field--full {
    flex: 1 1 100%;
}

/* ── Field inner container (label + input dans le même bloc bordé) ── */
.nc-field-inner {
    background: var(--nc-field-bg);
    border: 1px solid var(--nc-field-bd);
    border-radius: var(--nc-radius);
    padding: 8px 14px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    transition: border-color 0.2s;
}
.nc-field-inner:focus-within {
    border-color: var(--nc-dark);
}
.nc-field-inner.nc-error {
    border-color: var(--nc-error);
}

/* ── Labels (à l'intérieur du bloc) ── */
.nc-field-inner label {
    font-size: 11px;
    font-weight: 600;
    color: var(--nc-dark);
    letter-spacing: 0.04em;
    text-transform: none;
    line-height: 1.2;
    pointer-events: none;
}
.nc-req {
    color: var(--nc-dark);
}
.nc-opt {
    color: var(--nc-opt-text);
    font-weight: 400;
    font-style: italic;
}

/* ── Inputs & Textarea ── */
.nc-form input[type="text"],
.nc-form input[type="email"],
.nc-form input[type="tel"],
.nc-form textarea {
    background: transparent;
    border: none;
    padding: 0;
    font-size: 14px;
    color: var(--nc-dark);
    font-family: var(--nc-font);
    outline: none;
    width: 100%;
    box-sizing: border-box;
}
.nc-form input::placeholder,
.nc-form textarea::placeholder {
    color: rgba(26, 26, 26, 0.4);
}
.nc-form textarea {
    resize: vertical;
    min-height: 110px;
    margin-top: 2px;
}

/* ── Champ désactivé (objet avant sélection de Vous êtes) ── */
.nc-field-inner--disabled {
    opacity: 0.45;
    pointer-events: none;
}
.nc-field-inner--disabled select {
    cursor: not-allowed;
}

/* ── Selects ── */
.nc-select-wrap {
    position: relative;
}
.nc-select-wrap::after {
    content: '';
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--nc-dark);
    pointer-events: none;
}
.nc-form select {
    background: transparent;
    border: none;
    padding: 0;
    padding-right: 18px;
    font-size: 14px;
    color: var(--nc-dark);
    font-family: var(--nc-font);
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    outline: none;
    box-sizing: border-box;
    width: 100%;
}
.nc-form select option[value=""][disabled] {
    color: rgba(26, 26, 26, 0.4);
}

/* ── Autocomplete adresse ── */
.nc-ac-wrap {
    position: relative;
}
#nc-addr-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--nc-field-bd);
    border-radius: var(--nc-radius);
    box-shadow: 0 6px 20px rgba(0,0,0,.12);
    list-style: none;
    margin: 0;
    padding: 4px 0;
    z-index: 9999;
    max-height: 260px;
    overflow-y: auto;
}
.nc-ac-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    font-size: 13.5px;
    color: var(--nc-dark);
    cursor: pointer;
    transition: background 0.12s;
}
.nc-ac-item:hover,
.nc-ac-item.nc-ac-active {
    background: #f0ebe3;
}
.nc-ac-item.nc-ac-active {
    background: #e8ddd0;
}
.nc-ac-icon {
    font-size: 14px;
    flex-shrink: 0;
    opacity: .6;
}
.nc-ac-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Checkbox RGPD ── */
.nc-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 12px;
    color: #555;
    line-height: 1.5;
}
.nc-checkbox-label input[type="checkbox"] {
    display: none;
}
.nc-checkmark {
    display: inline-block;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: 2px solid var(--nc-field-bd);
    border-radius: 3px;
    margin-top: 1px;
    position: relative;
    transition: border-color 0.2s, background 0.2s;
    background: var(--nc-field-bg);
}
.nc-checkbox-label input[type="checkbox"]:checked + .nc-checkmark {
    background: var(--nc-dark);
    border-color: var(--nc-dark);
}
.nc-checkbox-label input[type="checkbox"]:checked + .nc-checkmark::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}
.nc-checkbox-text a {
    color: var(--nc-dark);
    text-decoration: underline;
}

/* ── Bouton submit ── */
.nc-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--nc-dark);
    color: var(--nc-white);
    border: none;
    padding: 14px 36px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: var(--nc-radius);
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    font-family: var(--nc-font);
}
.nc-btn:hover  { background: #333; }
.nc-btn:active { transform: scale(0.98); }
.nc-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Loader spinner */
.nc-btn-loader svg {
    animation: nc-spin 0.8s linear infinite;
}
@keyframes nc-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════
   MODAL DE CONFIRMATION
═══════════════════════════════════════════════════ */
body.nc-modal-open {
    overflow: hidden;
}

#nc-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(10, 10, 10, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    align-items: center;
    justify-content: center;
}
#nc-modal.shown,
#nc-modal[style*="display: block"],
#nc-modal[style*="display:block"] {
    display: flex !important;
}

.nc-modal-box {
    background: #fff;
    border-radius: 8px;
    max-width: 480px;
    width: calc(100% - 40px);
    padding: 48px 40px 40px;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0,0,0,.18);
    position: relative;
    animation: nc-modal-in 0.28s cubic-bezier(.34,1.3,.64,1) both;
}
@keyframes nc-modal-in {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.nc-modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    color: #aaa;
    cursor: pointer;
    padding: 4px;
    transition: color 0.15s;
}
.nc-modal-close:hover { color: var(--nc-dark); }

.nc-modal-icon {
    width: 64px;
    height: 64px;
    background: #f0faf5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}
.nc-modal-icon svg {
    width: 32px;
    height: 32px;
    stroke: var(--nc-success);
    stroke-width: 2.5;
    fill: none;
}

.nc-modal-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--nc-dark);
    margin: 0 0 12px;
    line-height: 1.3;
}

.nc-modal-msg {
    font-size: 15px;
    color: #555;
    line-height: 1.65;
    margin: 0 0 32px;
}

.nc-modal-cta {
    display: inline-block;
    background: var(--nc-dark);
    color: var(--nc-white);
    text-decoration: none;
    font-weight: 700;
    font-size: 13.5px;
    letter-spacing: .07em;
    text-transform: uppercase;
    padding: 13px 34px;
    border-radius: var(--nc-radius);
    transition: background 0.2s;
}
.nc-modal-cta:hover { background: #333; color: var(--nc-white); }

/* ── Responsive ── */
@media (max-width: 600px) {
    .nc-row--2col { flex-direction: column; }
    .nc-modal-box { padding: 36px 24px 30px; }
    .nc-modal-title { font-size: 19px; }
}
