/* =====================================================
   AMFROM 2026 - Frontend (Inscription publique)
   ===================================================== */

:root {
    --amfrom-green: #159238;
    --amfrom-green-dark: #0f6b28;
    --amfrom-green-light: #1db34a;
    --amfrom-red: #E1071B;
    --amfrom-red-dark: #b00515;
    --amfrom-white: #ffffff;
    --amfrom-off-white: #f8faf9;
    --amfrom-gray-50: #f3f4f6;
    --amfrom-gray-100: #e5e7eb;
    --amfrom-gray-200: #d1d5db;
    --amfrom-gray-400: #9ca3af;
    --amfrom-gray-600: #4b5563;
    --amfrom-gray-800: #1f2937;
    --amfrom-black: #111827;
    --font-main: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.06);
    --shadow-lg: 0 10px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.08);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.25s ease;
}

/* ========== RESET ========== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-main);
    background: #533aae;
    color: var(--amfrom-gray-800);
    line-height: 1.5;
    min-height: 100vh;
}

/* ========== HEADER ========== */
.fe-header {
    background: var(--amfrom-white);
    border-bottom: 3px solid transparent;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
}

.fe-header img {
    height: 110px;
    width: auto;
}

/* ========== MAIN ========== */
.fe-main {
    max-width: 920px;
    margin: 0 auto;
    padding: 3rem 1rem 1.5rem 3rem;
}

.fe-banner {
    width: 100%;
    border-radius: var(--radius) var(--radius) 0 0;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.fe-banner img {
    width: 100%;
    height: auto;
    display: block;
}

.fe-card {
    background: var(--amfrom-white);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--amfrom-gray-100);
    overflow: hidden;
}

.fe-card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--amfrom-gray-100);
}

.fe-card-header h1 {
    font-size: 1.39rem;
    font-weight: 700;
    color: #24136f;
    margin-bottom: 0.25rem;
    text-align: center;
}

.fe-card-header .sub {
    font-size: 0.9rem;
    color: var(--amfrom-gray-600);
}

.fe-card-body {
    padding: 1.5rem;
}

/* ========== NOTES ========== */
.fe-notes {
    background: #f6f6fc;
    border-left: 4px solid var(--amfrom-green);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 1rem 1.15rem;
    margin-bottom: 1.5rem;
}

.fe-notes strong {
    color: var(--amfrom-green);
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.fe-notes ul {
    margin: 0;
    padding-left: 1.2rem;
    font-size: 0.85rem;
    color: var(--amfrom-gray-600);
}

.fe-notes li {
    margin-bottom: 0.3rem;
}

/* ========== FORM ========== */
.fe-form-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--amfrom-green);
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    display: inline-block;
}

.fe-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.fe-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.fe-field label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--amfrom-gray-800);
}

.fe-field label .req {
    color: var(--amfrom-red);
}

.fe-field input[type="text"],
.fe-field input[type="email"],
.fe-field input[type="tel"],
.fe-field select {
    width: 100%;
    padding: 0.7rem 0.9rem;
    font-size: 0.9rem;
    border: 1.5px solid var(--amfrom-gray-200);
    border-radius: var(--radius-sm);
    background: var(--amfrom-white);
    color: var(--amfrom-gray-800);
    outline: none;
    transition: var(--transition);
    font-family: inherit;
}

.fe-field input:focus,
.fe-field select:focus {
    border-color: var(--amfrom-green);
    box-shadow: 0 0 0 3px rgba(21, 146, 56, 0.12);
}

.fe-field input.err,
.fe-field select.err {
    border-color: var(--amfrom-red) !important;
    box-shadow: 0 0 0 3px rgba(225, 7, 27, 0.12);
}

.fe-field select {
    padding: 0.7rem 0.7rem;
}

.fe-field .extra-input {
    display: none;
    margin-top: 0.4rem;
}

/* ========== CHECKBOX ========== */
.fe-check {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 1rem 0;
    font-size: 0.875rem;
    color: var(--amfrom-gray-600);
}

.fe-check input[type="checkbox"],
.fe-check input[type="radio"] {
    width: 17px;
    height: 17px;
    accent-color: var(--amfrom-green);
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
}

/* ========== SECTIONS ========== */
.fe-section {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--amfrom-gray-100);
}

.fe-section h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--amfrom-gray-800);
    margin-bottom: 0.75rem;
}

.fe-section-desc {
    font-size: 0.9rem;
    color: var(--amfrom-gray-600);
    margin-bottom: 1rem;
}

.fe-section-disabled {
    opacity: 0.45;
    pointer-events: none;
    user-select: none;
}

/* ========== CHOICE CARDS ========== */
.fe-choice-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.fe-choice-card {
    background: var(--amfrom-white);
    border: 2px solid var(--amfrom-gray-200);
    border-radius: var(--radius-sm);
    padding: 1.25rem 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    user-select: none;
}

.fe-choice-card:hover:not(.selected) {
    border-color: var(--amfrom-green);
    background: rgba(21, 146, 56, 0.04);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.fe-choice-card.selected {
    border-color: var(--amfrom-green);
    background: rgba(21, 146, 56, 0.06);
    box-shadow: 0 0 0 3px rgba(21, 146, 56, 0.12);
}

.fe-choice-card .fe-choice-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(21, 146, 56, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--amfrom-green);
    flex-shrink: 0;
    transition: var(--transition);
}

.fe-choice-card.selected .fe-choice-icon {
    background: var(--amfrom-green);
    color: white;
}

.fe-choice-card .fe-choice-content {
    flex: 1;
    min-width: 0;
}

.fe-choice-card .fe-choice-content h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--amfrom-gray-800);
    margin: 0 0 0.15rem 0;
}

.fe-choice-card .fe-choice-content p {
    font-size: 0.8rem;
    color: var(--amfrom-gray-600);
    margin: 0;
}

.fe-choice-card .fe-choice-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--amfrom-gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
    color: transparent;
    font-size: 1rem;
}

.fe-choice-card.selected .fe-choice-check {
    border-color: var(--amfrom-green);
    background: var(--amfrom-green);
    color: white;
}

.fe-section-disabled .fe-choice-card {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.fe-section-disabled .fe-choice-card.selected {
    opacity: 0.5;
}

/* ========== NIGHTS ========== */
.fe-nights {
    display: none;
    margin-top: 1.25rem;
    padding: 1.25rem;
    background: var(--amfrom-gray-50);
    border-radius: var(--radius-sm);
    border: 1px solid var(--amfrom-gray-100);
    transition: all 0.3s ease;
}

.fe-nights.active {
    display: block;
    animation: feFadeIn 0.3s ease;
}

.fe-nights-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--amfrom-gray-800);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fe-night-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0.6rem 0;
}

.fe-night-row:last-child {
    border-bottom: none;
}

.fe-night-row .date {
    font-weight: 600;
    font-size: 0.875rem;
    min-width: 130px;
    color: var(--amfrom-gray-800);
}

.fe-night-or {
    text-align: center;
    font-size: 0.8rem;
    color: var(--amfrom-gray-400);
    margin: 0.35rem 0;
}

/* ========== ROOM OPTIONS ========== */
.fe-room-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.fe-room-option {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    border: 2px solid var(--amfrom-gray-200);
    transition: var(--transition);
    background: white;
    user-select: none;
}

.fe-room-option:hover:not(.active):not(.disabled) {
    border-color: var(--amfrom-green);
    background: rgba(21, 146, 56, 0.04);
    transform: translateY(-1px);
}

.fe-room-option:active:not(.active) {
    transform: scale(0.95);
}

.fe-room-option input[type="radio"] {
    display: none;
}

.fe-room-option .fe-room-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--amfrom-gray-600);
    cursor: pointer;
}

.fe-room-option.active {
    border-color: var(--amfrom-green);
    background: rgba(21, 146, 56, 0.08);
    box-shadow: 0 0 0 3px rgba(21, 146, 56, 0.12);
}

.fe-room-option.active .fe-room-label {
    color: var(--amfrom-green);
    font-weight: 600;
}

.fe-room-option.disabled,
.fe-section-disabled .fe-room-option {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* ========== TRANSFER DETAILS ========== */
.fe-transfer-detail {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--amfrom-gray-600);
    background: var(--amfrom-gray-50);
    padding: 0.15rem 0.6rem;
    border-radius: 20px;
    margin-left: 0.25rem;
}

.fe-route-detail {
    display: block;
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--amfrom-gray-400);
    margin-top: 0.1rem;
}

/* ========== FEEDBACK ========== */
.fe-selection-feedback {
    margin-top: 0.75rem;
    padding: 0.6rem 1rem;
    background: rgba(21, 146, 56, 0.06);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--amfrom-green);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    animation: feFadeIn 0.3s ease;
}

.fe-selection-feedback strong {
    color: var(--amfrom-green);
}

/* ========== SUBMIT ========== */
.fe-actions {
    margin-top: 1.75rem;
    display: flex;
    justify-content: center;
}

.btn-submit {
    padding: 0.85rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--amfrom-green) 0%, var(--amfrom-green-dark) 100%);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(21, 146, 56, 0.25);
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-submit:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--amfrom-green-light) 0%, var(--amfrom-green) 100%);
    transform: translateY(-1px);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ========== FOOTER ========== */
.fe-footer {
    background: #1c1f4b;
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2rem;
}

.fe-footer p {
    margin: 0;
    font-size: 0.85rem;
}

.fe-footer a {
    color: white;
    text-decoration: none;
}

.fe-footer a:hover {
    text-decoration: underline;
}

.fe-social {
    display: flex;
    gap: 0.5rem;
}

.fe-social a {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    transition: var(--transition);
}

.fe-social a:hover {
    transform: scale(1.1);
}

/* ========== LOADER ========== */
.fe-loader {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
}

.fe-loader.active {
    display: flex;
}

.fe-loader img {
    width: 80px;
    height: 80px;
}

.fe-loader h2 {
    font-size: 1.1rem;
    color: #533aae;
}

/* ========== MODALS ========== */
.fe-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: feModalFadeIn 0.3s ease;
}

.fe-modal-overlay.active {
    display: flex;
}

.fe-modal-overlay:not(.active) {
    display: none;
}

.fe-modal {
    background: white;
    border-radius: var(--radius);
    padding: 2rem 2rem 1.5rem;
    max-width: 440px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: feModalSlideIn 0.4s ease;
    position: relative;
}

.fe-modal .fe-modal-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2.5rem;
}

.fe-modal-success .fe-modal-icon {
    background: rgba(21, 146, 56, 0.1);
    color: var(--amfrom-green);
}

.fe-modal-error .fe-modal-icon {
    background: rgba(225, 7, 27, 0.1);
    color: var(--amfrom-red);
}

.fe-modal-icon-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.fe-modal h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--amfrom-gray-800);
    margin-bottom: 0.5rem;
}

.fe-modal p {
    color: var(--amfrom-gray-600);
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.fe-modal .fe-modal-sub {
    color: var(--amfrom-gray-400);
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
}

.fe-modal-btn {
    padding: 0.6rem 2.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    background: var(--amfrom-green);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    margin-top: 0.5rem;
}

.fe-modal-btn:hover {
    background: var(--amfrom-green-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(21, 146, 56, 0.3);
}

.fe-modal-btn-error {
    background: var(--amfrom-red);
}

.fe-modal-btn-error:hover {
    background: var(--amfrom-red-dark);
    box-shadow: 0 4px 12px rgba(225, 7, 27, 0.3);
}

/* ========== ANIMATIONS ========== */
@keyframes feFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes feModalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes feModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .fe-main {
        padding: 1.5rem 1rem 1rem;
    }

    .fe-row {
        grid-template-columns: 1fr;
    }

    .fe-header img {
        height: 58px;
    }

    .fe-card-header h1 {
        font-size: 1.15rem;
    }

    .fe-choice-cards {
        grid-template-columns: 1fr;
    }

    .fe-choice-card {
        padding: 1rem;
    }

    .fe-night-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
        padding: 0.8rem 0;
    }

    .fe-night-row .date {
        min-width: auto;
    }

    .fe-room-options {
        width: 100%;
    }

    .fe-room-option {
        flex: 1;
        justify-content: center;
        padding: 0.5rem 0.8rem;
    }

    .fe-footer {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .fe-choice-card .fe-choice-content h4 {
        font-size: 0.85rem;
    }

    .fe-choice-card .fe-choice-content p {
        font-size: 0.75rem;
    }

    .fe-choice-card .fe-choice-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .fe-transfer-detail {
        display: block;
        margin-left: 0;
        margin-top: 0.2rem;
        font-size: 0.75rem;
    }

    .fe-modal {
        padding: 1.5rem 1.25rem 1.25rem;
    }

    .fe-modal .fe-modal-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .fe-modal h4 {
        font-size: 1.1rem;
    }
}