/* =======================================================
   style.css - Design exact du formulaire ISM
   ======================================================= */

/* ===== VARIABLES ===== */
:root {
    --orange-900: #7a3a12;
    --orange-700: #c0591f;
    --orange-600: #d97a3f;
    --orange-500: #e8823a;
    --orange-200: #f3caa0;
    --orange-100: #fbe4d1;
    --dark-box: #2b1810;
    --gray-700: #2d3748;
    --gray-600: #4a5568;
    --gray-500: #718096;
    --gray-400: #a0aec0;
    --gray-300: #cbd5e0;
    --gray-200: #e9e3dd;
    --gray-100: #faf8f6;
    --white: #ffffff;
    --interest-border: #e67e22;
    --interest-bg: #f8f9fc;
    --chaud-color: #e67e22;
    --chaud-bg: #fef3e8;
    --tiede-color: #f39c12;
    --tiede-bg: #fef9e7;
    --froid-color: #3498db;
    --froid-bg: #ebf5fb;
}

/* ===== RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f7f1eb;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 20px;
}

/* ===== CONTENEUR (deux colonnes) ===== */
.container {
    max-width: 960px;
    width: 100%;
    background: var(--white);
    display: grid;
    grid-template-columns: 320px 1fr;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(43, 24, 16, 0.08);
}

@media (max-width: 800px) {
    .container {
        grid-template-columns: 1fr;
        border-radius: 12px;
    }
}

/* =======================================================
   COLONNE GAUCHE : SIDEBAR
   ======================================================= */
.sidebar {
    position: relative;
    overflow: hidden;
    background: var(--gray-100);
    padding: 36px 28px;
    border-right: 1px solid var(--gray-200);
}

.sidebar > .logo-box,
.sidebar > .sidebar-title,
.sidebar > .sidebar-text {
    position: relative;
    z-index: 1;
}

.logo-box {
    width: 90px;
    height: 90px;
    background: var(--dark-box);
    border-radius: 14px;
    color: var(--orange-500);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 10px;
    margin-bottom: 24px;
}

.logo-text {
    font-weight: 800;
    font-size: 16px;
    margin-bottom: 4px;
}

.logo-building {
    width: 60px;
    height: 48px;
}

.sidebar-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--gray-700);
    line-height: 1.3;
    margin-bottom: 14px;
}

.sidebar-title .accent {
    color: var(--orange-600);
}

.sidebar-text {
    font-size: 13px;
    color: var(--gray-500);
    line-height: 1.6;
    margin-bottom: 28px;
}

/* ===== ILLUSTRATION DÉCORATIVE ===== */
.sidebar-illustration {
    position: absolute;
    left: -20px;
    bottom: -10px;
    width: 180px;
    z-index: 0;
    pointer-events: none;
    opacity: 0.6;
}

.sidebar-illustration svg {
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 800px) {
    .sidebar-illustration {
        width: 140px;
    }
}

@media (max-width: 480px) {
    .sidebar-illustration {
        display: none;
    }
}

/* =======================================================
   COLONNE DROITE : FORMULAIRE
   ======================================================= */
.form-panel {
    padding: 36px 44px 28px;
}

.form-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.form-header-icon {
    width: 34px;
    height: 34px;
    background: var(--orange-100);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--orange-600);
}

.form-header-icon svg {
    width: 17px;
    height: 17px;
}

.form-header-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--orange-600);
    letter-spacing: 0.5px;
}

.form-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.form-title .accent {
    color: var(--orange-600);
}

.form-mandatory {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 20px;
}

/* ===== CHAMPS ===== */
.field-group {
    margin-bottom: 16px;
}

.field-label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.field-label .optional {
    font-weight: 400;
    color: var(--gray-500);
}

.field-highlight {
    border: 2px solid var(--orange-500);
    border-radius: 12px;
    padding: 14px;
    background: #fffaf5;
}

/* ===== ICÔNE À L'INTÉRIEUR DES CHAMPS ===== */
.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    display: flex;
    color: var(--gray-400);
    pointer-events: none;
}

.input-icon svg {
    width: 16px;
    height: 16px;
}

.field-group input,
.field-group select {
    width: 100%;
    padding: 12px 14px 12px 40px;
    font-size: 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: 10px;
    background: var(--white);
    transition: border-color 0.3s ease;
    font-family: inherit;
    appearance: none;
}

.field-group select {
    padding-right: 36px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23718096'><path d='M5.5 7.5l4.5 4.5 4.5-4.5' stroke='%23718096' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    cursor: pointer;
}

.field-group select:invalid {
    color: var(--gray-400);
}

.field-group input:focus,
.field-group select:focus {
    outline: none;
    border-color: var(--orange-500);
    box-shadow: 0 0 0 3px rgba(232, 130, 58, 0.15);
}

/* ===== STYLE DES PLACEHOLDERS ===== */
.field-group input::placeholder {
    color: var(--gray-400);
    font-weight: 400;
    opacity: 1;
}

.field-group input::-moz-placeholder {
    color: var(--gray-400);
    font-weight: 400;
    opacity: 1;
}

/* ===== LIGNE 2 COLONNES ===== */
.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 600px) {
    .field-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* ===== WHATSAPP ===== */
.whatsapp-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.whatsapp-row .input-icon-wrapper {
    flex: 1;
}

.toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--gray-600);
    white-space: nowrap;
    cursor: pointer;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
    z-index: 1;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--gray-300);
    border-radius: 999px;
    transition: background 0.25s ease;
}

.toggle-slider::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: var(--white);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    transition: transform 0.25s ease;
}

.toggle-switch input[type="checkbox"]:checked + .toggle-slider {
    background: var(--orange-600);
}

.toggle-switch input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(20px);
}

.toggle-switch input[type="checkbox"]:focus-visible + .toggle-slider {
    box-shadow: 0 0 0 3px rgba(232, 130, 58, 0.3);
}

.toggle-label-text {
    line-height: 1.3;
}

@media (max-width: 600px) {
    .whatsapp-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* =======================================================
   SECTION INTÉRÊT
   ======================================================= */
.interest-section {
    margin: 24px 0 10px 0;
    padding: 24px 24px 18px;
    background: var(--white);
    border-radius: 16px;
    border: 1.5px solid var(--gray-200);
    transition: border-color 0.3s ease;
}

.interest-section:hover {
    border-color: var(--orange-200);
}

.interest-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.interest-title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e67e22' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><rect x='4' y='11' width='16' height='11' rx='2' ry='2'/><path d='M7 11V7a5 5 0 0 1 10 0v4'/></svg>") no-repeat center;
    background-size: contain;
}

.interest-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-700);
    margin: 0;
}

.interest-badge {
    background: var(--orange-500);
    color: white;
    font-size: 10px;
    padding: 3px 12px;
    border-radius: 20px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    margin-left: auto;
}

.interest-subtext {
    font-size: 14px;
    color: var(--gray-500);
    margin: 0 0 18px 32px;
    line-height: 1.5;
}

.interest-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.interest-option {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 18px;
    background: var(--white);
    border-radius: 12px;
    border: 1.5px solid var(--gray-200);
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
}

.interest-option:hover {
    border-color: #b8c0d0;
    background: #fafbfc;
}

.interest-option input[type="radio"] {
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--orange-600);
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.interest-option-chaud:has(input:checked) {
    border-color: var(--chaud-color);
    background: var(--chaud-bg);
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.12);
}

.interest-option-tiede:has(input:checked) {
    border-color: var(--tiede-color);
    background: var(--tiede-bg);
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.12);
}

.interest-option-froid:has(input:checked) {
    border-color: var(--froid-color);
    background: var(--froid-bg);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.12);
}

.interest-option-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.interest-emoji {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.interest-option-chaud .interest-emoji {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23e67e22'><path d='M12 23a6.5 6.5 0 0 0 6.5-6.5c0-3.3-2.5-6-5-8.5-2.5 2.5-5 5.2-5 8.5A6.5 6.5 0 0 0 12 23z'/><path d='M12 2c-1.5 3-4 6.5-4 9.5a4 4 0 0 0 8 0c0-3-2.5-6.5-4-9.5z'/></svg>");
}

.interest-option-tiede .interest-emoji {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f39c12' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M14 14.8V4a2 2 0 0 0-4 0v10.8a4 4 0 1 0 4 0z'/><circle cx='12' cy='18' r='2.5'/></svg>");
}

.interest-option-froid .interest-emoji {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233498db' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 2v20M12 6l-3-3M12 6l3-3M12 18l-3 3M12 18l3 3M18 8l-3 3M18 8l3 3M6 8l3 3M6 8l-3 3M18 16l-3-3M18 16l3-3M6 16l3-3M6 16l-3-3'/></svg>");
}

.interest-option-label {
    font-weight: 700;
    font-size: 15px;
    color: var(--gray-700);
}

.interest-option-desc {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.5;
    flex: 1;
    padding-left: 4px;
}

.interest-option-desc br {
    display: block;
    content: "";
    margin-top: 2px;
}

@media (max-width: 700px) {
    .interest-option {
        flex-wrap: wrap;
        gap: 6px 14px;
        padding: 12px 14px;
    }

    .interest-option-content {
        width: 100%;
    }

    .interest-option-desc {
        padding-left: 32px;
        font-size: 13px;
        width: 100%;
    }

    .interest-subtext {
        margin-left: 0;
        font-size: 13px;
    }

    .interest-badge {
        margin-left: 0;
        font-size: 9px;
    }

    .interest-title {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .interest-section {
        padding: 16px 14px 12px;
    }

    .interest-option {
        padding: 10px 12px;
        gap: 4px 10px;
    }

    .interest-option-desc {
        padding-left: 28px;
        font-size: 12.5px;
    }

    .interest-option-label {
        font-size: 14px;
    }

    .interest-emoji {
        width: 20px;
        height: 20px;
    }

    .interest-title-icon {
        width: 18px;
        height: 18px;
    }
}

/* =======================================================
   BADGES DE CONFIANCE
   ======================================================= */
.badges-row {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 20px 0;
}

.badge-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    padding: 18px 20px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.badge-item:hover {
    border-color: var(--orange-200);
    box-shadow: 0 4px 16px rgba(43, 24, 16, 0.06);
    transform: translateY(-1px);
}

.badge-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin-top: 2px;
}

.badge-icon svg {
    width: 100%;
    height: 100%;
}

.badge-icon-success { color: #2f9e58; }
.badge-icon-warning { color: var(--orange-600); }
.badge-icon-neutral { color: var(--gray-500); }

.badge-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: 3px;
}

.badge-desc {
    font-size: 13px;
    color: var(--gray-500);
    line-height: 1.4;
}

/* =======================================================
   BOUTON
   ======================================================= */
.button-wrapper {
    margin-top: 8px;
    text-align: center;
}

.button-wrapper button {
    width: 100%;
    background: linear-gradient(135deg, var(--orange-500), var(--orange-700));
    color: var(--white);
    border: none;
    padding: 14px 36px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 14px rgba(192, 89, 31, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.button-wrapper button:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--orange-700), var(--orange-900));
    transform: translateY(-2px);
}

.button-wrapper button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.send-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.spinner {
    display: inline-flex;
    animation: spin 0.8s linear infinite;
}

.spinner svg {
    width: 18px;
    height: 18px;
}

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

.icon-inline {
    display: inline-flex;
    vertical-align: -3px;
    margin-right: 5px;
}

.confidential {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 12px;
}

/* =======================================================
   MESSAGES
   ======================================================= */
.message {
    margin-top: 16px;
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
}

.message.success {
    background: #f0fff4;
    border: 2px solid #48bb78;
    color: #22543d;
    display: block;
}

.message.error {
    background: #fff5f5;
    border: 2px solid #fc8181;
    color: #9b2c2c;
    display: block;
}

.message ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.message li {
    padding: 3px 0;
}

/* =======================================================
   PIED DE PAGE
   ======================================================= */
.footer {
    text-align: center;
    font-size: 13px;
    color: var(--gray-500);
    padding-top: 16px;
    margin-top: 8px;
    border-top: 1px solid var(--gray-200);
}

.footer strong {
    color: var(--orange-600);
}