/* =============================================================================
   Trottin Widgets — trottin-widgets.css
   Mobile-first | Breakpoints : 768px, 1200px | Préfixe : .trottin-widget-*
   ============================================================================= */

:root {
    --tw-green-deep: #0f1a10;
    --tw-green-mid:  #1e3a1f;
    --tw-green-neon: #76ff7a;
    --tw-cream:      #f5f0e8;
    --tw-muted:      #8ca88d;
    --tw-font:       'Montserrat', sans-serif;
    --tw-radius:     14px;
    --tw-transition: 0.25s ease;
}

/* =============================================================================
   WIDGET 1 — FORMULAIRE DE CONTACT v2  (layout 2 colonnes)
   ============================================================================= */

.trottin-widget-contact {
    font-family: var(--tw-font);
    border-radius: var(--tw-radius);
    overflow: hidden;
    border: 1px solid rgba(118, 255, 122, 0.1);
    background: var(--tw-green-deep);
}

/* ── Layout grille ─────────────────────────────────────────────────────────── */

.trottin-contact-layout {
    display: grid;
    grid-template-columns: 1fr; /* mobile : colonne unique */
}

/* ── Sidebar ───────────────────────────────────────────────────────────────── */

.trottin-contact-sidebar {
    background: var(--tw-green-mid);
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
}

.trottin-sidebar-block {
    margin-bottom: 32px;
}

.trottin-sidebar-block:last-child {
    margin-bottom: 0;
}

.trottin-sidebar-label {
    display: block;
    font-family: var(--tw-font);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--tw-green-neon);
    margin-bottom: 14px;
    opacity: 0.85;
}

/* Contact items (phone / email) — partagés avec widget map */
.trottin-contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--tw-cream);
    padding: 10px 0;
    border-bottom: 1px solid rgba(118, 255, 122, 0.08);
    transition: color var(--tw-transition);
    font-family: var(--tw-font);
}

.trottin-contact-item:last-of-type {
    border-bottom: none;
}

.trottin-contact-item:hover {
    color: var(--tw-green-neon);
}

.trottin-item-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    background: rgba(118, 255, 122, 0.08);
    border: 1px solid rgba(118, 255, 122, 0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tw-green-neon);
    flex-shrink: 0;
}

.trottin-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.trottin-item-info strong {
    font-family: var(--tw-font);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--tw-muted);
}

/* ── Horaires ──────────────────────────────────────────────────────────────── */

.trottin-hours-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px solid rgba(118, 255, 122, 0.06);
    font-family: var(--tw-font);
    font-size: 13px;
}

.trottin-hours-row:last-of-type {
    border-bottom: none;
}

.trottin-hours-day {
    color: var(--tw-muted);
    font-weight: 400;
}

.trottin-hours-val {
    color: var(--tw-cream);
    font-weight: 600;
}

.trottin-hours-note {
    font-size: 11px;
    color: var(--tw-muted);
    font-style: italic;
    margin: 10px 0 0;
    font-family: var(--tw-font);
    line-height: 1.5;
}

/* ── Spots ─────────────────────────────────────────────────────────────────── */

.trottin-spots-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.trottin-spot-item {
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: var(--tw-font);
    font-size: 12px;
    font-weight: 500;
    color: var(--tw-muted);
}

.trottin-spot-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.trottin-spot-dot--active {
    background: var(--tw-green-neon);
    box-shadow: 0 0 7px var(--tw-green-neon);
}

.trottin-spot-dot--inactive {
    background: rgba(255, 255, 255, 0.15);
}

/* ── Réseaux sociaux ───────────────────────────────────────────────────────── */

.trottin-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.trottin-social-btn {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(118, 255, 122, 0.2);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tw-muted);
    text-decoration: none;
    transition: all var(--tw-transition);
}

.trottin-social-btn:hover {
    background: rgba(118, 255, 122, 0.15);
    border-color: var(--tw-green-neon);
    color: var(--tw-green-neon);
    transform: translateY(-2px);
}

.trottin-social-btn svg {
    display: block;
}

/* ── Colonne formulaire ────────────────────────────────────────────────────── */

.trottin-widget-contact__form-wrap {
    background: var(--tw-green-deep);
    padding: 28px 24px;
    position: relative;
}

.trottin-widget-contact__form-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(118, 255, 122, 0.03) 0%, transparent 60%);
    pointer-events: none;
}

.trottin-widget-contact__title,
.trottin-widget-title {
    font-family: var(--tw-font);
    font-size: 22px;
    font-weight: 700;
    color: var(--tw-cream);
    margin: 0 0 8px;
}

.trottin-widget-contact__subtitle {
    font-size: 13px;
    color: var(--tw-muted);
    line-height: 1.6;
    margin: 0 0 28px;
    font-family: var(--tw-font);
}

/* ── Champs formulaire ─────────────────────────────────────────────────────── */

.trottin-widget-field {
    margin-bottom: 16px;
    position: relative;
}

.trottin-widget-field label,
.trottin-form-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--tw-muted);
    margin-bottom: 6px;
    font-family: var(--tw-font);
}

.trottin-widget-field input:not([type="checkbox"]),
.trottin-widget-field select,
.trottin-widget-field textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(118, 255, 122, 0.15);
    border-radius: 10px;
    color: var(--tw-cream);
    font-family: var(--tw-font);
    font-size: 14px;
    font-weight: 400;
    padding: 11px 14px;
    outline: none;
    transition: border-color var(--tw-transition), background var(--tw-transition);
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.trottin-widget-field input:not([type="checkbox"]):focus,
.trottin-widget-field select:focus,
.trottin-widget-field textarea:focus {
    border-color: var(--tw-green-neon);
    background: rgba(118, 255, 122, 0.05);
}

.trottin-widget-field input.tw-error,
.trottin-widget-field select.tw-error,
.trottin-widget-field textarea.tw-error {
    border-color: #e05555;
}

.trottin-widget-field textarea {
    resize: vertical;
    min-height: 110px;
}

.trottin-widget-field select option {
    background: var(--tw-green-mid);
    color: var(--tw-cream);
}

/* Messages d'erreur */
.trottin-widget-error {
    display: none;
    font-size: 11px;
    color: #e07070;
    margin-top: 5px;
    font-weight: 500;
    font-family: var(--tw-font);
}

.trottin-widget-error.tw-visible {
    display: block;
}

/* Select avec flèche */
.trottin-widget-select-wrap {
    position: relative;
}

.trottin-widget-select-wrap::after {
    content: '▾';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--tw-green-neon);
    pointer-events: none;
    font-size: 13px;
}

/* ── Pills sujet ───────────────────────────────────────────────────────────── */

.trottin-widget-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.trottin-widget-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(118, 255, 122, 0.2);
    border-radius: 50px;
    color: var(--tw-muted);
    font-family: var(--tw-font);
    font-size: 0.82rem;
    font-weight: 600;
    min-height: 44px;
    padding: 10px 16px;
    cursor: pointer;
    transition: all var(--tw-transition);
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.trottin-widget-pill:hover {
    border-color: var(--tw-green-neon);
    color: var(--tw-cream);
}

.trottin-widget-pill.tw-active {
    background: rgba(118, 255, 122, 0.15);
    border-color: var(--tw-green-neon);
    color: var(--tw-green-neon);
}

/* ── Bloc conditionnel groupe ──────────────────────────────────────────────── */

.trottin-widget-group-fields {
    display: none;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(118, 255, 122, 0.1);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
}

/* ── Checkbox RGPD ─────────────────────────────────────────────────────────── */

.trottin-widget-field--check .trottin-widget-check-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 12px;
    color: var(--tw-muted);
    line-height: 1.6;
    font-family: var(--tw-font);
}

.trottin-widget-field--check input[type="checkbox"] {
    width: 18px;
    min-width: 18px;
    height: 18px;
    margin-top: 1px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: var(--tw-green-neon);
}

.trottin-widget-field--check a {
    color: var(--tw-green-neon);
    text-decoration: none;
}

.trottin-widget-field--check a:hover {
    text-decoration: underline;
}

/* ── Bouton envoi ──────────────────────────────────────────────────────────── */

.trottin-widget-submit,
.trottin-btn-submit {
    width: 100%;
    background: var(--tw-green-mid);
    border: 1px solid rgba(118, 255, 122, 0.3);
    border-radius: 10px;
    color: var(--tw-cream);
    font-family: var(--tw-font);
    font-size: 0.9rem;
    font-weight: 700;
    min-height: 52px;
    padding: 14px 24px;
    cursor: pointer;
    transition: background var(--tw-transition), transform var(--tw-transition);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 4px;
    overflow: hidden;
    position: relative;
}

.trottin-widget-submit:hover,
.trottin-btn-submit:hover {
    background: #2a5c2e;
    transform: translateY(-1px);
}

.trottin-widget-submit:active,
.trottin-btn-submit:active {
    transform: translateY(0);
}

.trottin-widget-submit:disabled,
.trottin-btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.trottin-widget-submit__text {
    transition: opacity var(--tw-transition);
}

.trottin-widget-submit__spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: tw-spin 0.7s linear infinite;
    flex-shrink: 0;
}

.trottin-widget-submit.tw-loading .trottin-widget-submit__text {
    opacity: 0.3;
}

.trottin-widget-submit.tw-loading .trottin-widget-submit__spinner {
    display: block;
}

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

/* ── Bloc succès ───────────────────────────────────────────────────────────── */

.trottin-widget-contact__success {
    text-align: center;
    padding: 56px 24px;
    background: var(--tw-green-deep);
}

.trottin-widget-success-icon {
    width: 64px;
    height: 64px;
    background: rgba(118, 255, 122, 0.1);
    border: 2px solid var(--tw-green-neon);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: tw-popin 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.trottin-widget-success-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--tw-green-neon);
    fill: none;
}

@keyframes tw-popin {
    from { transform: scale(0); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.trottin-widget-success-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--tw-cream);
    margin: 0 0 10px;
    font-family: var(--tw-font);
}

.trottin-widget-success-msg {
    font-size: 14px;
    color: var(--tw-muted);
    line-height: 1.6;
    margin: 0 0 28px;
    font-family: var(--tw-font);
}

.trottin-widget-reset {
    background: transparent;
    border: 1.5px solid rgba(118, 255, 122, 0.35);
    border-radius: 8px;
    color: var(--tw-green-neon);
    font-family: var(--tw-font);
    font-size: 13px;
    font-weight: 600;
    padding: 10px 24px;
    cursor: pointer;
    transition: all var(--tw-transition);
}

.trottin-widget-reset:hover {
    background: rgba(118, 255, 122, 0.1);
}

/* ── Toast d'erreur ────────────────────────────────────────────────────────── */

.trottin-widget-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #2d0f0f;
    border: 1px solid #e05555;
    border-radius: 10px;
    color: #f5c6c6;
    font-family: var(--tw-font);
    font-size: 13px;
    font-weight: 500;
    padding: 14px 20px;
    z-index: 99999;
    max-width: 340px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    animation: tw-slide-in 0.3s ease;
}

.trottin-widget-toast.tw-dismissing {
    animation: tw-slide-out 0.3s ease forwards;
}

@keyframes tw-slide-in {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes tw-slide-out {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(16px); }
}

/* =============================================================================
   WIDGET 2 — FAQ ACCORDION
   ============================================================================= */

.trottin-widget-faq {
    font-family: var(--tw-font);
    background: var(--tw-green-deep);
    border-radius: var(--tw-radius);
    border: 1px solid rgba(118, 255, 122, 0.1);
    padding: 28px 24px;
}

.trottin-widget-faq__title {
    font-size: 24px;
    font-weight: 700;
    color: var(--tw-cream);
    margin: 0 0 28px;
    font-family: var(--tw-font);
}

.trottin-widget-faq__list {
    display: flex;
    flex-direction: column;
}

/* .trottin-faq-item est la classe CSS scopable */
.trottin-widget-faq__item,
.trottin-faq-item {
    border-bottom: 1px solid rgba(118, 255, 122, 0.1);
}

.trottin-widget-faq__item:first-child,
.trottin-faq-item:first-child {
    border-top: 1px solid rgba(118, 255, 122, 0.1);
}

/* Questions */
.trottin-widget-faq__question,
.trottin-faq-q {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--tw-cream);
    font-family: var(--tw-font);
    font-size: 15px;
    font-weight: 600;
    padding: 18px 0;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    transition: color var(--tw-transition);
}

.trottin-widget-faq__question:hover,
.trottin-faq-q:hover,
.trottin-widget-faq__question[aria-expanded="true"],
.trottin-faq-q[aria-expanded="true"] {
    color: var(--tw-green-neon);
}

/* Icône (texte customisable via contrôle) */
.trottin-widget-faq__icon {
    width: 26px;
    height: 26px;
    min-width: 26px;
    background: rgba(118, 255, 122, 0.08);
    border: 1.5px solid rgba(118, 255, 122, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tw-green-neon);
    font-size: 16px;
    font-weight: 300;
    line-height: 1;
    transition: background var(--tw-transition), color var(--tw-transition);
    flex-shrink: 0;
    user-select: none;
}

.trottin-widget-faq__question[aria-expanded="true"] .trottin-widget-faq__icon,
.trottin-faq-q[aria-expanded="true"] .trottin-widget-faq__icon {
    background: rgba(118, 255, 122, 0.18);
}

/* Réponse avec transition max-height */
.trottin-widget-faq__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.trottin-widget-faq__answer.tw-open {
    max-height: 1000px;
}

.trottin-widget-faq__answer-inner,
.trottin-faq-a {
    padding: 0 0 20px;
    font-size: 14px;
    color: var(--tw-muted);
    line-height: 1.75;
    font-family: var(--tw-font);
}

.trottin-widget-faq__answer-inner p,
.trottin-faq-a p {
    margin: 0 0 10px;
}

.trottin-widget-faq__answer-inner p:last-child,
.trottin-faq-a p:last-child {
    margin-bottom: 0;
}

/* =============================================================================
   WIDGET 3 — CARTE & LOCALISATION
   ============================================================================= */

.trottin-widget-map {
    font-family: var(--tw-font);
    background: var(--tw-green-deep);
    border-radius: var(--tw-radius);
    border: 1px solid rgba(118, 255, 122, 0.1);
    padding: 28px 24px;
}

/* Grille mobile : info en haut, map en bas */
.trottin-widget-map__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.trottin-map-info {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.trottin-widget-map__title {
    font-size: 24px;
    font-weight: 700;
    color: var(--tw-cream);
    margin: 0 0 20px;
    font-family: var(--tw-font);
}

.trottin-map-address {
    font-size: 14px;
    color: var(--tw-cream);
    line-height: 1.6;
    margin: 0 0 6px;
    font-family: var(--tw-font);
}

.trottin-address-note {
    font-size: 12px;
    color: var(--tw-muted);
    font-style: italic;
    margin: 0 0 18px;
    font-family: var(--tw-font);
}

/* Les .trottin-contact-item dans le widget map réutilisent les styles définis plus haut */

.trottin-map-embed {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(118, 255, 122, 0.15);
}

.trottin-widget-map__placeholder {
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.02);
    color: var(--tw-muted);
    font-size: 13px;
    font-family: var(--tw-font);
    text-align: center;
    padding: 20px;
}

/* Alias de compatibilité (ancienne classe) */
.trottin-widget-map__info { display: flex; flex-direction: column; gap: 18px; }
.trottin-widget-map__iframe-wrap { border-radius: 10px; overflow: hidden; border: 1px solid rgba(118,255,122,0.15); }

/* =============================================================================
   CLASSES PARTAGÉES (body-text, widget-title)
   ============================================================================= */

.trottin-body-text {
    font-family: var(--tw-font);
    font-size: 14px;
    color: var(--tw-cream);
    line-height: 1.65;
}

/* Legal */
.tc-legal {
    font-size: 10px;
    color: var(--muted);
    line-height: 1.6;
    font-weight: 400;
    margin-top: 28px;
}

@media (max-width: 768px) {
    .tc-legal {
        margin-top: 6px;
    }
}

/* ── Spots SVG logo ────────────────────────────────────────────────────────── */

.tc-spot {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 0.85rem;
    color: var(--trottin-cream, #f5f0e8);
    border-bottom: 1px solid rgba(76, 175, 80, 0.1);
    transition: color 0.2s ease;
}

.tc-spot:last-child {
    border-bottom: none;
}

.tc-spot:hover {
    color: var(--trottin-neon, #76ff7a);
}

.logo-s {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    color: #5cb85c;
    transition: color 0.2s ease;
}

.tc-spot:hover .logo-s {
    color: var(--trottin-neon, #76ff7a);
}

/* =============================================================================
   MOBILE (max-width: 767px)
   ============================================================================= */

@media (max-width: 767px) {

    /* Ordre colonnes : formulaire en premier, sidebar en second */
    .trottin-contact-layout {
        display: flex;
        flex-direction: column;
    }

    .trottin-contact-sidebar {
        order: 2;
    }

    .trottin-widget-contact__form-wrap {
        order: 1;
    }

    /* Pills : grille 2 colonnes */
    .trottin-widget-pills {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .trottin-widget-pill {
        width: 100%;
        text-align: center;
        justify-content: center;
        white-space: normal;
    }

    /* Champs : touch target + pas de zoom iOS */
    .trottin-widget-field input:not([type="checkbox"]),
    .trottin-widget-field select,
    .trottin-widget-field textarea {
        min-height: 48px;
        font-size: 16px;
        padding: 12px 14px;
    }

    /* Spots SVG mobile */
    .tc-spot {
        padding: 10px 0;
        font-size: 0.9rem;
    }

    .logo-s {
        width: 32px;
        height: 32px;
    }
}

/* =============================================================================
   BREAKPOINTS
   ============================================================================= */

@media (min-width: 768px) {

    /* ── Contact : 2 colonnes ── */
    .trottin-contact-layout {
        grid-template-columns: 40% 60%;
    }

    .trottin-contact-sidebar {
        padding: 40px 32px;
    }

    .trottin-widget-contact__form-wrap {
        padding: 40px 36px;
    }

    .trottin-widget-contact__title,
    .trottin-widget-title {
        font-size: 24px;
    }

    /* ── FAQ ── */
    .trottin-widget-faq {
        padding: 40px;
    }

    .trottin-widget-faq__title {
        font-size: 30px;
    }

    .trottin-widget-faq__question,
    .trottin-faq-q {
        font-size: 16px;
    }

    /* ── Map : grille 2 colonnes — info gauche, iframe droite ── */
    .trottin-widget-map {
        padding: 40px;
    }

    .trottin-widget-map__title {
        font-size: 28px;
    }

    .trottin-widget-map__grid {
        grid-template-columns: 1fr 2fr;
        align-items: start;
    }
}

@media (min-width: 1200px) {

    .trottin-contact-sidebar {
        padding: 48px 36px;
    }

    .trottin-widget-contact__form-wrap {
        padding: 48px 44px;
    }

    .trottin-widget-faq {
        padding: 48px;
    }

    .trottin-widget-map {
        padding: 48px;
    }
}
