:root {
    /* Couleurs héritées du thème Astra / de la charte Greenco
       (--gc-green / --gc-lime définies dans astra-child/style.css) */
    --wct-primary:   var(--gc-green, #0f4a33);
    --wct-bg:        #ffffff;
    --wct-white:     #ffffff;
    --wct-border:    var(--gc-border, #e4e8e5);
    --wct-text:      #000000;
    --wct-muted:     var(--gc-green, #0f4a33);
    --wct-danger:    #C0151A;
    --wct-radius:    10px;
    --wct-shadow:    0 4px 24px rgba(15, 74, 51, 0.14);
    --wct-gray-bg:          #f8f8f8;
    --wct-gray-border-soft: #eee;
    --wct-placeholder:      #b0bec5;
    --wct-success:        #48bb78;
    --wct-success-border: #9ae6b4;
    --wct-success-text:   #276749;
    --wct-success-glow:   rgba(72, 187, 120, .12);
}

.wct-container {
    max-width: 640px;
    margin: 0 auto;
    font-family: inherit;
    color: var(--wct-text);
}

.wct-container *,
.wct-container *::before,
.wct-container *::after {
    box-sizing: border-box !important;
}

.wct-section {
    background: var(--wct-white);
    border: 1px solid var(--wct-border);
    border-radius: var(--wct-radius);
    box-shadow: var(--wct-shadow);
    padding: 28px 32px;
}

.wct-section-header {
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--wct-border);
}

.wct-section-header h3 {
    margin: 0;
    font-size: 1.19em;
    font-weight: 500;
    color: var(--wct-text);
}

.wct-form-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px 24px;
}

.wct-third-width { grid-column: span 2; }
.wct-half-width  { grid-column: span 3; }
.wct-full-width  { grid-column: span 6; }

.wct-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wct-form-group label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.94em;
    font-weight: 600;
    color: var(--wct-text);
}

.wct-form-group label svg {
    width: 15px;
    height: 15px;
    color: var(--wct-text);
    flex-shrink: 0;
}

.wct-form-group input,
.wct-form-group textarea {
    border-radius: var(--wct-radius) !important;
    font-family: inherit;
    width: 100%;
    padding: 10px 13px;
    border: 1px solid var(--wct-border);
    font-size: 0.94em;
    color: var(--wct-text);
    background: var(--wct-white);
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
}

.wct-form-group textarea {
    resize: vertical;
    min-height: 110px;
    border: 0.1rem solid var(--wct-border);
    background-color: var(--wct-gray-bg);
}

.wct-form-group input::placeholder,
.wct-form-group textarea::placeholder { color: var(--wct-placeholder); }

.wct-form-group input:focus,
.wct-form-group textarea:focus {
    border-color: var(--wct-primary);
    box-shadow: var(--wct-shadow);
    outline: none;
}

.wct-required { color: var(--wct-danger); font-weight: 700; }

.wct-required-note {
    font-size: 1em;
    color: var(--wct-muted);
    margin: 0;
}

.wct-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--wct-border);
    flex-wrap: wrap;
    gap: 12px;
}

/* Forme (radius, padding, police, ombre) ET couleurs (normal + hover)
   entièrement héritées du style "Boutons" du thème Astra (Personnalisation
   ▸ Boutons) : on ne fixe ici que la mise en page (flex/gap). */
.wct-submit-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    cursor: pointer;
    transition: background-color .25s ease, color .25s ease, border-color .25s ease, transform .15s ease;
}

.wct-submit-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none !important;
}

.wct-submit-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.wct-submit-btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

/* currentColor : suit la couleur de texte du bouton, quelle qu'elle soit
   (gérée depuis Personnalisation ▸ Boutons). */
.wct-spinner {
    display: inline-block;
    width: 14px; height: 14px;
    border: 2px solid color-mix(in srgb, currentColor 35%, transparent);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: wct-spin .6s linear infinite;
    vertical-align: middle;
}

@keyframes wct-spin { to { transform: rotate(360deg); } }

.wct-success-banner {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: var(--wct-white);
    border: 1px solid var(--wct-success-border);
    border-left: 5px solid var(--wct-success);
    border-radius: var(--wct-radius);
    padding: 22px 26px;
    color: var(--wct-success-text);
    box-shadow: 0 4px 18px var(--wct-success-glow);
}

.wct-success-icon {
    font-size: 2.13em;
    line-height: 1;
    color: var(--wct-success);
    flex-shrink: 0;
    margin-top: 2px;
}

.wct-success-banner strong { font-size: 1.19em; display: block; margin-bottom: 4px; }
.wct-success-banner p { margin: 0; }

#wct-toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 360px;
    pointer-events: none;
}

.wct-toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 16px;
    border-radius: var(--wct-radius);
    box-shadow: var(--wct-shadow);
    font-size: 0.88em;
    line-height: 1.4;
    pointer-events: all;
    min-width: 240px;
    background: var(--wct-white);
    color: var(--wct-text);
    border-left: 4px solid var(--wct-danger);
}

/* ==========================================================
   ESPACE DE TÉLÉVERSEMENT DE FICHIER (champ type "file")
========================================================== */
.wct-file-drop {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 90px;
    padding: 16px;
    border: 2px dashed var(--wct-border);
    border-radius: var(--wct-radius);
    background: var(--wct-gray-bg);
    transition: border-color .15s, background .15s;
}

.wct-file-drop.wct-file-drop-over {
    border-color: var(--wct-primary);
    background: var(--wct-white);
}

.wct-file-input:focus-visible + .wct-file-drop-text {
    outline: 2px solid var(--wct-primary);
    outline-offset: 2px;
}

.wct-file-drop-text {
    font-size: 0.88em;
    color: var(--wct-muted);
    pointer-events: none;
}

.wct-file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

@media (max-width: 640px) {
    .wct-section { padding: 18px 16px; }
    .wct-form-grid { grid-template-columns: 1fr; }
    .wct-third-width,
    .wct-half-width,
    .wct-full-width { grid-column: 1; }
    .wct-form-footer { flex-direction: column; align-items: stretch; }
    .wct-submit-btn { justify-content: center !important; width: 100%; }
    #wct-toast-container { bottom: 12px; right: 12px; left: 12px; max-width: unset; }
}
