@import url('https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap');

@layer theme, base, components, utilities;

@import "tailwindcss/base" layer(base);
@import "tailwindcss/components" layer(components);
@import "tailwindcss/utilities" layer(utilities);

@layer base {
    html {
        font-size: 1rem;
        font-family: 'Lato', sans-serif;
    }
    * {
        color: var(-tw--color-black);
        box-sizing: border-box;
        margin: 0;
        padding: 0;
    }
    *::before, *::after{
        box-sizing: border-box;
    }
    a {
        text-decoration: none;
    }

    h1, h2, h3, h4, h5, h6 {
        font-family: 'Ubuntu Sans', sans-serif;
        margin: 0;
    }
}

@layer components {
    /* Mobile : barre fixe en bas, scroll horizontal */
    @media (max-width: 63.99rem) {
        #sidebar {
            overflow-x: auto;
        }
    }

    .text-anchor-middle {
        text-anchor: middle;
    }

    /* --messages */
    .customer-portal-text-editor--messages trix-toolbar {
        border-radius: 6px 6px 0 0;
    }
    .customer-portal-text-editor--messages trix-editor.customer-portal-text-editor__input {
        border-radius: 0 0 6px 6px;
        padding-right: 8rem;
    }
    .customer-portal-text-editor--compact {
        border-radius: 8px;
    }
    .customer-portal-text-editor--compact trix-toolbar {
        padding: 0.25rem 0.5rem 0.125rem;
    }
    .customer-portal-text-editor--compact trix-toolbar .trix-button-row {
        gap: 0.0625rem;
    }
    .customer-portal-text-editor--compact trix-toolbar .trix-button {
        height: 1.625rem;
        min-width: 1.625rem;
    }
    .customer-portal-text-editor--compact trix-editor.customer-portal-text-editor__input {
        min-height: 72px;
        padding: 0.375rem 0.75rem 0.625rem;
        color: #282828;
    }

    /* Desktop : sticky classique */
    @media (min-width: 64rem) {
        #sidebar {
            position:   sticky;
            top:        83px;
            align-self: flex-start;
            z-index:    auto;
        }
    }

    #show-basket .active svg path{
        fill: var(--pink);
    }

    .header-container{
        box-shadow: 0 2px 10px 0 rgba(0, 0, 0, .1);
    }

    .sidebar-right-slider-viewport {
        display: grid;
    }

    .sidebar-right-slider .sidebar-right-slide {
        grid-area: 1 / 1;
        opacity: 0;
        pointer-events: none;
        transform: translateX(12px);
        transition: opacity 220ms ease, transform 220ms ease;
        visibility: hidden;
    }

    .sidebar-right-slider:has(.sidebar-right-slider-input:nth-of-type(1):checked) .sidebar-right-slide:nth-child(1),
    .sidebar-right-slider:has(.sidebar-right-slider-input:nth-of-type(2):checked) .sidebar-right-slide:nth-child(2),
    .sidebar-right-slider:has(.sidebar-right-slider-input:nth-of-type(3):checked) .sidebar-right-slide:nth-child(3),
    .sidebar-right-slider:has(.sidebar-right-slider-input:nth-of-type(4):checked) .sidebar-right-slide:nth-child(4),
    .sidebar-right-slider:has(.sidebar-right-slider-input:nth-of-type(5):checked) .sidebar-right-slide:nth-child(5) {
        opacity: 1;
        pointer-events: auto;
        transform: translateX(0);
        visibility: visible;
    }

    .sidebar-right-slider-dot {
        width: 8px;
        background: #D9D9D9;
    }

    .sidebar-right-slider:has(.sidebar-right-slider-input:nth-of-type(1):checked) .sidebar-right-slider-dot:nth-child(1),
    .sidebar-right-slider:has(.sidebar-right-slider-input:nth-of-type(2):checked) .sidebar-right-slider-dot:nth-child(2),
    .sidebar-right-slider:has(.sidebar-right-slider-input:nth-of-type(3):checked) .sidebar-right-slider-dot:nth-child(3),
    .sidebar-right-slider:has(.sidebar-right-slider-input:nth-of-type(4):checked) .sidebar-right-slider-dot:nth-child(4),
    .sidebar-right-slider:has(.sidebar-right-slider-input:nth-of-type(5):checked) .sidebar-right-slider-dot:nth-child(5) {
        width: 18px;
        background: #00526B;
    }

    .secondary-sidebar-right-viewport {
        pointer-events: none;
    }

    /* Sidebar Right Responsive */
    @media (min-width: 40rem) and (max-width: 79.99rem) {
        .sidebar-right-main {
            display: none !important;
        }
    }

    /* Sidebar Right Tablette - barre réduite 50px */
    .sidebar-right-tablet-overlay {
        position: fixed;
        inset: 0;
        z-index: 109;
        background: rgba(40, 40, 40, 0.5);
        cursor: pointer;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        visibility: hidden;
    }

    .sidebar-right-tablet-strip {
        transition: opacity 0.2s ease, visibility 0.2s ease;
    }

    .sidebar-right-tablet-strip-arrow {
        transition: transform 320ms ease;
    }

    .sidebar-right-tablet-panel {
        pointer-events: none;
        transform: translate3d(100%, 0, 0);
        transition: transform 320ms ease;
        will-change: transform;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
    }

    .sidebar-right-tablet-close-btn {
        opacity: 0;
        pointer-events: none;
        transition: opacity 200ms ease 0ms;
        background-color: #034A5E;
    }

    .sidebar-right-tablet-toggle:checked ~ .sidebar-right-tablet-overlay {
        opacity: 1;
        pointer-events: auto;
        visibility: visible;
    }

    .sidebar-right-tablet-toggle:checked ~ .sidebar-right-tablet-strip {
        opacity: 0;
        pointer-events: none;
        visibility: hidden;
    }

    .sidebar-right-tablet-toggle:checked ~ .sidebar-right-tablet-strip .sidebar-right-tablet-strip-arrow {
        transform: rotate(180deg);
    }

    .sidebar-right-tablet-toggle:checked ~ .sidebar-right-tablet-panel {
        pointer-events: auto;
        transform: translate3d(0, 0, 0);
    }

    .sidebar-right-tablet-toggle:checked ~ .sidebar-right-tablet-panel .sidebar-right-tablet-close-btn {
        opacity: 1;
        pointer-events: auto;
        transition-delay: 200ms;
    }

    /* Sidebar Right Mobile - barre flottante en bas */
    .sidebar-right-mobile-fab {
        transition: opacity 0.2s ease, visibility 0.2s ease;
    }

    .sidebar-right-mobile-overlay {
        position: fixed;
        inset: 0;
        z-index: 109;
        background: rgba(40, 40, 40, 0.5);
        cursor: pointer;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        visibility: hidden;
    }

    .sidebar-right-mobile-panel {
        pointer-events: none;
        transform: translate3d(0, 100%, 0);
        transition: transform 320ms ease;
        will-change: transform;
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.2);
    }

    .sidebar-right-mobile-close-btn {
        opacity: 0;
        pointer-events: none;
        transition: opacity 200ms ease 0ms;
        background-color: #034A5E;
    }

    .sidebar-right-mobile-toggle:checked ~ .sidebar-right-mobile-overlay {
        opacity: 1;
        pointer-events: auto;
        visibility: visible;
    }

    .sidebar-right-mobile-toggle:checked ~ .sidebar-right-mobile-fab {
        opacity: 0;
        pointer-events: none;
        visibility: hidden;
    }

    .sidebar-right-mobile-toggle:checked ~ .sidebar-right-mobile-panel {
        pointer-events: auto;
        transform: translate3d(0, 0, 0);
    }

    .sidebar-right-mobile-toggle:checked ~ .sidebar-right-mobile-panel .sidebar-right-mobile-close-btn {
        opacity: 1;
        pointer-events: auto;
        transition-delay: 200ms;
    }

    .secondary-sidebar-right-overlay {
        position: fixed;
        inset: 0;
        z-index: 1021;
        background: rgba(40, 40, 40, 0.5);
        cursor: pointer;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        visibility: hidden;
    }

    .secondary-sidebar-right-panel {
        pointer-events: none;
        transform: translate3d(100%, 0, 0);
        transition: transform 320ms ease;
        will-change: transform;
    }

    @media (max-width: 39.99rem) {
        .secondary-sidebar-right-viewport {
            top: 150px !important;
            bottom: 0 !important;
            right: 0 !important;
            left: 0 !important;
            width: 100% !important;
            height: calc(100vh - 150px) !important;
            border-radius: 32px 32px 0 0 !important;
        }

        .secondary-sidebar-right-panel {
            transform: translate3d(0, 100%, 0);
            border-radius: 32px 32px 0 0;
        }

        .secondary-sidebar-right-toggle:checked + .secondary-sidebar-right-layer .secondary-sidebar-right-viewport .secondary-sidebar-right-panel {
            transform: translate3d(0, 0, 0);
        }
    }

    .secondary-sidebar-right-close :where(svg, svg *) {
        color: currentColor;
        fill: currentColor;
        stroke: currentColor;
    }

    .secondary-sidebar-right-toggle:checked + .secondary-sidebar-right-layer .secondary-sidebar-right-overlay {
        opacity: 1;
        pointer-events: auto;
        visibility: visible;
    }

    .secondary-sidebar-right-toggle:checked + .secondary-sidebar-right-layer .secondary-sidebar-right-viewport {
        pointer-events: auto;
    }

    .secondary-sidebar-right-toggle:checked + .secondary-sidebar-right-layer .secondary-sidebar-right-viewport .secondary-sidebar-right-panel {
        pointer-events: auto;
        transform: translate3d(0, 0, 0);
    }

    .quote-confirmation-modal {
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        visibility: hidden;
        z-index: 600;
    }

    .quote-confirmation-modal.is-open {
        opacity: 1;
        pointer-events: auto;
        visibility: visible;
    }

    .quote-confirmation-modal-panel {
        transform: translate3d(100%, 0, 0);
        transition: transform 320ms ease;
        will-change: transform;
    }

    .quote-confirmation-modal.is-open .quote-confirmation-modal-panel {
        transform: translate3d(0, 0, 0);
    }

    /* Modal validation devis - Mobile : slide depuis le bas */
    @media (max-width: 39.99rem) {
        .quote-confirmation-modal-panel {
            transform: translate3d(0, 100%, 0);
            top: 150px !important;
            height: calc(100vh - 150px) !important;
        }

        .quote-confirmation-modal.is-open .quote-confirmation-modal-panel {
            transform: translate3d(0, 0, 0);
        }
    }

    @media (prefers-reduced-motion: reduce) {
        .secondary-sidebar-right-panel,
        .quote-confirmation-modal,
        .quote-confirmation-modal-panel {
            transition: none;
        }
    }
}
@layer utilities {
    /* Sidebar : label blanc au hover et sur le lien actif */
    a:hover .sidebar-label,
    a.active .sidebar-label {
        color: white !important;
    }
}

/* ── TextEditor — hors layer pour ne pas être écrasé par trix.min.css (injecté sans layer via JS) ── */
.customer-portal-text-editor {
    overflow: hidden;
    width: 100%;
    border: 1.5px solid #33A0BE !important;
    border-radius: 8px !important;
    background: #F2F8FF !important;
    outline: none !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.customer-portal-text-editor:focus-within {
    box-shadow: 0 0 0 3px rgba(51, 160, 190, 0.18) !important;
}
.customer-portal-text-editor trix-toolbar {
    display: block !important;
    padding: 0.375rem 0.625rem 0.25rem !important;
    border: 0 !important;
    border-bottom: none !important;
    background: #E4F7FC !important;
    box-shadow: none !important;
}
.customer-portal-text-editor trix-toolbar .trix-button-row {
    align-items: center;
    justify-content: flex-start;
    gap: 24px !important;
    overflow-x: auto;
}
.customer-portal-text-editor trix-toolbar .trix-button-group {
    margin: 0 !important;
    border: 0 !important;
    border-radius: 6px !important;
    background: transparent !important;
    gap: 4px !important;
    box-shadow: none !important;
}
.customer-portal-text-editor trix-toolbar .trix-button {
    height: 1.875rem !important;
    min-width: 1.875rem !important;
    padding: 0 0.3rem;
    border: 0 !important;
    border-radius: 6px !important;
    background: transparent !important;
    color: #33A0BE !important;
    transition: background 0.15s ease, color 0.15s ease;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0 !important;
}
.trix-button.trix-button--underline{
    padding:0 !important;
}
.customer-portal-text-editor trix-toolbar .trix-button:not(:disabled):hover,
.customer-portal-text-editor trix-toolbar .trix-button.trix-active {
    background: rgba(51, 160, 190, 0.12) !important;
    color: #1a7a96 !important;
}
.customer-portal-text-editor trix-toolbar .trix-button:disabled {
    color: rgba(51, 160, 190, 0.35) !important;
}
.customer-portal-text-editor trix-toolbar .trix-button-group-spacer {
    display: none !important;
}
.customer-portal-text-editor trix-toolbar .trix-dialog {
    border: 0 !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 24px rgba(51, 160, 190, 0.18) !important;
}
.customer-portal-text-editor trix-editor.customer-portal-text-editor__input {
    min-height: 87px;
    width: 100%;
    margin: 0 !important;
    padding: 0.5rem 0.875rem 0.875rem !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #F2F8FF !important;
    line-height: 1.5rem;
    outline: none !important;
    box-shadow: none !important;
}
.customer-portal-text-editor .customer-portal-text-editor__actions:empty {
    display: none;
}
/* --messages */
.customer-portal-text-editor--messages trix-toolbar {
    border-radius: 6px 6px 0 0 !important;
}
.customer-portal-text-editor--messages trix-editor.customer-portal-text-editor__input {
    border-radius: 0 0 6px 6px !important;
    padding-right: 8rem !important;
}

.customer-portal-text-editor--messages trix-editor.customer-portal-text-editor__input ul,
.customer-portal-text-editor--messages trix-editor.customer-portal-text-editor__input ol {
    padding-left: 1.1rem !important;
    border-radius: 0 0 6px 6px !important;
    padding-right: 8rem !important;
}

.customer-portal-text-editor--compact trix-editor.customer-portal-text-editor__input ul,
.customer-portal-text-editor--compact trix-editor.customer-portal-text-editor__input ol {
    padding-left: 1.1rem !important;
    border-radius: 0 0 6px 6px !important;
    padding-right: 8rem !important;
}
/* --compact */
.customer-portal-text-editor--compact {
    border-radius: 8px !important;
}
.customer-portal-text-editor--compact trix-toolbar {
    padding: 0.25rem 0.5rem 0.125rem !important;
}
.customer-portal-text-editor--compact trix-toolbar .trix-button-row {
    gap: 0.0625rem;
    scrollbar-width: none;
}
.customer-portal-text-editor--compact trix-toolbar .trix-button-row::-webkit-scrollbar {
    display: none;
}
.customer-portal-text-editor--compact trix-toolbar .trix-button {
    height: 1.625rem !important;
    min-width: 1.625rem !important;
    font-size: 0 !important;
}
.customer-portal-text-editor--compact trix-editor.customer-portal-text-editor__input {
    min-height: 72px;
    padding: 0.375rem 0.75rem 0.625rem !important;
    color: #282828;
}

turbo-frame#events-list .events-list-loading {
    display: none;
}

turbo-frame#events-list[busy] .events-list-loading {
    display: block;
}

turbo-frame#events-list[busy] .events-list-content {
    display: none;
}

@theme {
    --color-duck-blue: #034A5E;
    --color-primary: #33A0BE;
    --color-black: #282828;
    --color-pink: #ff9894;

    --z-index-above-crisp: ;

    /* ── Gradient de fond de page ── */
    --gradient-duck-blue-180: 180deg, var(--color-duck-blue) 36.06%, var(--color-primary) 100%;

    /* ── Shadow card ── */
    --cp-shadow-card: 0px 8px 24px 0px rgba(51, 38, 174, 0.08);

    /* ── Border radius ── */
    --cp-radius-card: 32px;

    /* ── Sidebar ── */
    --cp-sidebar-width:          5rem;
    --cp-sidebar-width-expanded: 16.5rem;
}


.sidebar-right-main .tw\:overflow-y-auto,
.sidebar-right-tablet-panel .tw\:overflow-y-auto,
.secondary-sidebar-right-panel .tw\:overflow-y-auto,
.secondary-sidebar-right-panel [class*="overflow-y-auto"] {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
}
.sidebar-right-main .tw\:overflow-y-auto::-webkit-scrollbar,
.sidebar-right-tablet-panel .tw\:overflow-y-auto::-webkit-scrollbar,
.secondary-sidebar-right-panel .tw\:overflow-y-auto::-webkit-scrollbar,
.secondary-sidebar-right-panel [class*="overflow-y-auto"]::-webkit-scrollbar {
    width: 4px;
}
.sidebar-right-main .tw\:overflow-y-auto::-webkit-scrollbar-track,
.sidebar-right-tablet-panel .tw\:overflow-y-auto::-webkit-scrollbar-track,
.secondary-sidebar-right-panel .tw\:overflow-y-auto::-webkit-scrollbar-track,
.secondary-sidebar-right-panel [class*="overflow-y-auto"]::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-right-main .tw\:overflow-y-auto::-webkit-scrollbar-thumb,
.sidebar-right-tablet-panel .tw\:overflow-y-auto::-webkit-scrollbar-thumb,
.secondary-sidebar-right-panel .tw\:overflow-y-auto::-webkit-scrollbar-thumb,
.secondary-sidebar-right-panel [class*="overflow-y-auto"]::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.35);
    border-radius: 9999px;
}
.sidebar-right-main .tw\:overflow-y-auto::-webkit-scrollbar-thumb:hover,
.sidebar-right-tablet-panel .tw\:overflow-y-auto::-webkit-scrollbar-thumb:hover,
.secondary-sidebar-right-panel .tw\:overflow-y-auto::-webkit-scrollbar-thumb:hover,
.secondary-sidebar-right-panel [class*="overflow-y-auto"]::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.6);
}

/* ── Stepper : halo pulse aller-retour ──────────────────────────────────── */
@keyframes etapier-throb {
    from { transform: scale(1);   opacity: .8; }
    to   { transform: scale(1.5); opacity: .5; }
}
.etapier-halo {
    animation: etapier-throb 2s ease-in-out infinite alternate;
}

/* ── Brief update : checkboxes grilles ── */
.brief-grid-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    cursor: pointer;
    border: 1px solid #33a0be;
    border-radius: 1px;
    background-color: #ffffff;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 70%;
    transition: background-color 0.1s, border-color 0.1s;
}
.brief-grid-checkbox:checked {
    background-color: #33a0be;
    border-color: #33a0be;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' d='M2.5 8.5l3.5 3.5 7.5-8'/%3E%3C/svg%3E");
}

/* ── Brief providers : radios circulaires colorés (vert / gris / rouge) ── */
.brief-radio {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    cursor: pointer;
    border-radius: 9999px;
    border: 1.5px solid currentColor;
    background-color: #ffffff;
    transition: box-shadow 0.12s ease, background-color 0.12s ease, opacity 0.12s ease;
}
.brief-radio:checked {
    background-color: currentColor;
    box-shadow: inset 0 0 0 3px #ffffff;
}
.brief-radio:focus-visible {
    outline: 2px solid #33a0be;
    outline-offset: 2px;
}
.brief-radio:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.brief-radio--green { color: #32BA55; }
.brief-radio--grey  { color: #9E9E9E; }
.brief-radio--red   { color: #D33E36; }
