/* Thème clair par défaut */
:root {
    --primary-color: #EDD3BC;
    --secondary-color: #6D071A;

    --primary-hover: #eedccd;
    --secondary-hover: #640113;

    --primary-secondary: #FFEEDF;
    --secondary-secondary: #41000C;

    /* Format fixe des modals « panneau » (recherche…) : ratio 4:3, le contenu s'adapte au
       cadre et non l'inverse. À réutiliser pour tout futur modal du même gabarit. */
    --gv-panel-w: min(720px, 92vw);
    --gv-panel-h: min(540px, 80dvh);
}

/* Onglets génériques (modal de recherche, préférences de document…) : barre + trait animé.
   Le comportement (sticky, panneaux) reste propre à chaque composant. */
.gv-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 2px;
    padding: 4px 0 0;
    border-bottom: 1px solid color-mix(in srgb, var(--primary-color) 14%, transparent);
}

.gv-tab {
    position: relative;
    border: 0;
    background: transparent;
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 12px 10px;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    opacity: .55;
    transition: opacity .15s ease, background .15s ease;
    white-space: nowrap;
}

.gv-tab:hover {
    opacity: .9;
    background: color-mix(in srgb, var(--primary-color) 6%, transparent);
}

/* Trait de sélection : discret mais net, animé */
.gv-tab::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 0;
    height: 2.5px;
    border-radius: 999px;
    background: var(--primary-color);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .18s ease;
}

.gv-tab.is-active {
    opacity: 1;
}

.gv-tab.is-active::after {
    transform: scaleX(1);
}

/* Cacher complètement les inputs désactivés dans les modals de confirmation */
.gv-confirm-input-disabled {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Bouton de fermeture global (inspiré de gv-history-close) */
.gv-close-btn {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--primary-color);
    cursor: pointer;
    display: grid;
    place-items: center;
    opacity: .75;
    transition: all .12s;
}

.gv-close-btn:hover {
    opacity: 1;
    background: color-mix(in srgb, var(--primary-color) 10%, transparent);
}

.gv-close-btn svg {
    width: 18px;
    height: 18px;
}

/* Transition douce lors du toggle de thème */
body.theme-transitioning,
body.theme-transitioning *,
body.theme-transitioning *::before,
body.theme-transitioning *::after {
    transition: background-color .2s ease,
                background .2s ease,
                color .2s ease,
                border-color .2s ease,
                fill .2s ease,
                stroke .2s ease,
                outline-color .2s ease,
                box-shadow .2s ease !important;
}

/* Préserver les animations du toggle thème pendant la transition */
body.theme-transitioning .theme-toggle .slider {
    transition: transform 0.5s cubic-bezier(.34, 1.56, .64, 1),
                background-color .2s ease !important;
}
body.theme-transitioning .theme-toggle .icon {
    transition: opacity .3s ease,
                transform .5s cubic-bezier(.34, 1.56, .64, 1),
                color .2s ease !important;
}

/* Thème inversé */
:root[data-theme="secondary"] {
    --primary-color: #6D071A;
    --secondary-color: #EDD3BC;

    --primary-hover: #640113;
    --secondary-hover: #eedccd;

    --primary-secondary: #41000C;
    --secondary-secondary: #FFEEDF;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    position: relative;
    display: flex;
    flex-direction: column;
    background-color: var(--primary-color);
    font-family: "Inter", sans-serif;
    font-optical-sizing: auto;
    font-weight: medium;
    font-style: normal;
    box-sizing: border-box;
    overflow: hidden;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    padding: 0;
}

input {
    font-family: "Inter", sans-serif;
}

header {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border-bottom: 3px solid var(--secondary-color);
    padding-bottom: 3px;
}

header section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--secondary-color);
    padding: 15px 50px;
    color: var(--primary-color);
    transition: padding .35s cubic-bezier(.4,0,.2,1);
}

header section div img {
    height: 100%;
}

header section > div:first-child {
    transition: height .35s cubic-bezier(.4,0,.2,1);
}

body.gv-conv-active header section {
    padding-top: 11px;
    padding-bottom: 11px;
}
body.gv-conv-active header section > div:first-child {
    height: 35px !important;
}

.header-logo-dark {
    display: none;
}

html[data-theme="secondary"] .header-logo-dark {
    display: block;
}

html[data-theme="secondary"] .header-logo-light {
    display: none;
}

header nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

header nav a {
    text-decoration: none;
    font-size: 18px;
    color: var(--primary-color);
    outline: none;
    transition: font-size .35s cubic-bezier(.4,0,.2,1);
}
body.gv-conv-active header nav a#nav-redacteur {
    font-size: 16px;
}

.theme-toggle {
    width: 50px;
    height: 25px;
    background: var(--primary-color);
    border-radius: 30px;
    position: relative;
    cursor: pointer;
    transition: background 0.4s ease, transform .15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    transform: scale(1.06);
}

.theme-toggle:active {
    transform: scale(.94);
}

.theme-toggle .slider {
    width: 21px;
    height: 21px;
    background: var(--secondary-color);
    border-radius: 50%;
    position: absolute;
    left: 2px;
    top: 2px;
    transition: transform 0.5s cubic-bezier(.34, 1.56, .64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.theme-toggle .icon {
    position: absolute;
    opacity: 0;
    transition: opacity .3s ease, transform .5s cubic-bezier(.34, 1.56, .64, 1);
    transform: scale(.5) rotate(-90deg);
}

.theme-toggle .icon svg {
    display: flex;
    fill: currentColor;
    color: var(--primary-color);
    width: 13px;
    height: 13px;
}

.theme-toggle .sun {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

html[data-theme="secondary"] .theme-toggle .slider {
    transform: translateX(25px);
}

html[data-theme="secondary"] .theme-toggle .sun {
    opacity: 0;
    transform: scale(.5) rotate(90deg);
}

html[data-theme="secondary"] .theme-toggle .moon {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}


.scroll-custom-bar::-webkit-scrollbar,
.scroll-custom-bar-inverse::-webkit-scrollbar {
    width: 6px;
    /* finesse */
}

.scroll-horizontal-custom-bar::-webkit-scrollbar,
.scroll-horizontal-custom-bar-inverse::-webkit-scrollbar {
    height: 6px;
}

.scroll-custom-bar-thin::-webkit-scrollbar,
.scroll-custom-bar-thin-inverse::-webkit-scrollbar {
    width: 4px;
    /* plus fin */
}

.scroll-custom-bar-thin::-webkit-scrollbar:horizontal,
.scroll-custom-bar-thin-inverse::-webkit-scrollbar:horizontal {
    height: 4px;
}

.scroll-custom-bar::-webkit-scrollbar-track,
.scroll-custom-bar-inverse::-webkit-scrollbar-track,
.scroll-horizontal-custom-bar::-webkit-scrollbar-track,
.scroll-horizontal-custom-bar-inverse::-webkit-scrollbar-track,
.scroll-custom-bar-thin::-webkit-scrollbar-track,
.scroll-custom-bar-thin-inverse::-webkit-scrollbar-track {
    background: transparent;
    /* pas de fond */
}

.scroll-custom-bar::-webkit-scrollbar-thumb,
.scroll-horizontal-custom-bar::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
    /* arrondi stylé */
}

.scroll-custom-bar-inverse::-webkit-scrollbar-thumb,
.scroll-horizontal-custom-bar-inverse::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 10px;

}

.scroll-custom-bar::-webkit-scrollbar-thumb:hover,
.scroll-horizontal-custom-bar::-webkit-scrollbar-thumb:hover {
    background: var(--primary-secondary);
}

.scroll-custom-bar-inverse::-webkit-scrollbar-thumb:hover,
.scroll-horizontal-custom-bar-inverse::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-secondary);
}

.scroll-custom-bar-thin::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
    /* plus fin mais toujours stylé */
}

.scroll-custom-bar-thin-inverse::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 10px;
    /* version inversée */
}

.scroll-custom-bar-thin::-webkit-scrollbar-thumb:hover {
    background: var(--primary-secondary);
}

.scroll-custom-bar-thin-inverse::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-secondary);
}


header nav a svg {
    width: 25px;
    height: 25px;
    fill: var(--primary-color);
}

.head-logo {
    width: 35px;
    height: 35px;
    color: var(--primary-color);
}

.icon-fill-color {
    color: var(--secondary-color);
    fill: currentColor;
}

.icon-fill-color-inverse {
    color: var(--primary-color);
    fill: currentColor;
}

.icon-stroke-color {
    color: var(--secondary-color);
    stroke: currentColor;
}

.icon-stroke-color-inverse {
    color: var(--primary-color);
    stroke: currentColor;
}

.container {
    display: flex;
    flex: 1;
    flex-direction: column;
    margin: 0 10%;
}

.modal-background {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    transform: blur(5px);
    z-index: 19;
}

.modal-position {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
}

.btn {
    display: flex;
    padding: 8px 12px;
    border-radius: 99px;
    font-weight: 600;
    font-size: 14px;
    outline: none;
    border: none;
    cursor: pointer;
    transition: all .1s ease-in-out;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

.btn-primary-2 {
    background-color: var(--primary-secondary);
    color: var(--secondary-color);
}

.btn-primary:hover,
.btn-primary-2:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.btn-secondary-2 {
    background-color: var(--secondary-secondary);
    color: var(--primary-color);
}

.btn-secondary:hover,
.btn-secondary-2:hover {
    background-color: var(--secondary-hover);
}

/* �.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.�
   NOTIFICATIONS
   �.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.��.� */

#gv-notification-container {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 999999;
    pointer-events: none;
    /* ne bloque jamais la page */
}

.gv-notif {
    background: var(--secondary-color);
    color: var(--primary-color);
    padding: 18px 20px;
    border-radius: 16px;
    /* border: 2px solid var(--primary-color); */
    backdrop-filter: blur(4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);

    display: flex;
    flex-direction: column;
    gap: 10px;

    opacity: 0;
    transform: translateY(15px);
    pointer-events: auto;

    /* On **désactive** l'animation initiale */
    transition: opacity .25s ease, transform .25s ease;
}

/* Apparition */
.gv-notif.show {
    opacity: 1;
    transform: translateY(0);
}

/* Fermeture */
.gv-notif.close {
    opacity: 0;
    transform: translateY(15px);
}

/* Ligne principale contenant l�?Ticon et le texte */
.gv-notif-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

/* Icones */
.gv-notif-icon {
    font-size: 24px;
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gv-notif-icon svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.gv-notif-title {
    font-weight: bold;
    font-size: 17px;
}

.gv-notif-content {
    font-size: 15px;
    line-height: 1.4;
}

/* Boutons */
.gv-notif-buttons {
    display: flex;
    gap: 10px;
    margin-top: 5px;
    justify-content: end;
}

.gv-notif-btn {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: 0.2s ease;
}

.gv-notif-btn.primary {
    background: var(--primary-color);
    color: var(--secondary-color);
}

.gv-notif-btn.primary:hover {
    background: var(--primary-hover);
}

.gv-notif-btn.secondary {
    background: var(--secondary-secondary);
    color: var(--primary-color);
}

.gv-notif-btn.secondary:hover {
    background: var(--secondary-hover);
}

/* Loading spinner */
.gv-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    /* border: 3px solid var(--primary-color);
    border-top-color: transparent; */
    /* border-radius: 50%; */
    animation: spin 2s linear infinite;
}

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

@keyframes notif-appear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes notif-disappear {
    to {
        opacity: 0;
        transform: translateY(15px);
    }
}


.home-title {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.home-logo-wrap {
    position: relative;
    display: flex;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(6px);
    animation: homeIn .25s ease-out .02s both;
}
.home-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    user-select: none;
    pointer-events: none;
}
.home-logo {
    transition: opacity .35s ease;
}
.home-logo--light { opacity: 0; position: absolute; }
.home-logo--dark { opacity: 1; }
[data-theme="secondary"] .home-logo--light { opacity: 1; }
[data-theme="secondary"] .home-logo--dark { opacity: 0; }

/* Fix 1: Guest mode — forbidden cursor + disabled look */
body.gv-guest-mode [data-gv="prompt-type"] article,
body.gv-guest-mode [data-gv="shortcut-prompt-type"] article,
body.gv-guest-mode [data-gv="prompt-type-search"],
body.gv-guest-mode [data-gv="prompt-setting"],
body.gv-guest-mode [data-gv="prompt-send"],
body.gv-guest-mode [data-gv="prompt-attachment"],
body.gv-guest-mode [data-gv="assistant-zone"],
body.gv-guest-mode .recherche-area-container {
    cursor: not-allowed !important;
    opacity: .78 !important;
    pointer-events: auto;
}
body.gv-guest-mode [data-gv="prompt-input"] {
    cursor: not-allowed !important;
    /* opacity: .75; */
}
body.gv-guest-mode [data-gv="gv-ph-overlay"] {
    color: transparent; /* masque le texte original */
}

body.gv-guest-mode [data-gv="gv-ph-overlay"]::before {
    content: "Connectez-vous pour utiliser Sol°Arch";
    color: var(--primary-color);
}

.primary-title {
    font-size: 40px;
    font-weight: bold;
    text-align: center;
    color: var(--secondary-color);
    opacity: 0;
    transform: translateY(6px);
    animation: homeIn .25s ease-out .06s both;
}

@keyframes homeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.primary-title-secondary {
    color: var(--primary-secondary);
}

.primary-title-bold {
    font-weight: bolder;
}

.home-content {
    flex: 1.5;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* important */
    align-items: center;
}

.home-content-action {
    flex: 1 1 auto;
    min-height: 0; /* ultra important en flex */
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: center;
    gap: 50px;
    width: 100%;
    /* overflow: hidden; empêche la box de pousser dans l’alerte */
}

.raccourcis-action {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 20px;
    row-gap: 30px;
    max-width: 95%;

    opacity: 0;
    transform: translateY(6px);
    animation: homeIn .25s ease-out .16s both;
}

.raccourcis-action article {
    cursor: pointer;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    padding: 15px 20px;
    font-size: 15px;
    text-align: center;
    border-radius: 999px;
    width: auto;
    min-width: 180px;
    max-width: 270px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-sizing: border-box;
    transition: all .1s;
}

.raccourcis-action article:hover {
    background: var(--secondary-hover);
}

/* Force le texte à tenir sur une ligne + points de suspension */
.raccourcis-action article h3 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ═══ Tooltip global (gv-tooltip.js) ═══ */
.gv-tooltip {
    position: fixed;
    z-index: 99999;
    pointer-events: none;

    max-width: 260px;
    width: max-content;
    white-space: normal;

    padding: 4px 8px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.35;
    text-align: center;

    background: var(--secondary-secondary);
    color: var(--primary-secondary);
    border: 1px solid color-mix(in srgb, var(--primary-color) 18%, transparent);
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);

    opacity: 0;
    visibility: hidden;
    transition: opacity .12s ease, visibility 0s linear .12s;
}

.gv-tooltip--visible {
    opacity: 1;
    visibility: visible;
    transition: opacity .12s ease, visibility 0s;
}

@media (prefers-reduced-motion: reduce) {
    .gv-tooltip { transition: none; }
}


.recherche-raccourcis-action {
    width: 100%;
    max-width: 100%;
    display: grid;

    /* 3 colonnes sur desktop, adaptables */
    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 12px;
    /* ton gap désiré */
    box-sizing: border-box;
}

/* Responsive clean */
@media (max-width: 900px) {
    .recherche-raccourcis-action {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .recherche-raccourcis-action>article:nth-child(n+5) {
        display: none;
    }
}

/* Petit: on reste en 2 colonnes mais on coupe à 2 items (2x1) */
@media (max-width: 520px) {
    .recherche-raccourcis-action {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* .recherche-raccourcis-action > article:nth-child(n+3) {
    display: none;
  } */
}

.recherche-raccourcis-action article {
    width: 100%;
    min-width: 0;
    /* important pour ellipsis */

    cursor: pointer;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 999px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;

    height: 43px;
    box-sizing: border-box;
    transition: all .1s;
}

.recherche-raccourcis-action article:hover {
    background: var(--primary-hover);
}

.recherche-raccourcis-action article svg {
    flex: 0 0 auto;
    /* icône fixe */
    width: 14px;
    height: 14px;
    fill: var(--secondary-color);
}

.recherche-raccourcis-action article h3 {
    font-size: 16px;
    font-weight: bold;

    /* �o. ellipsis */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

    /* �o. important en flex: autorise le shrink */
    flex: 1;
    min-width: 0;
}


.raccourcis-action article p {
    font-size: 14px;
}

.recherche-bloc {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
    max-width: 1200px;
    max-height: 100%;
    min-height: 0;
}

.search-alert {
    /* position: absolute; */
    text-align: center;
    /* bottom: 10px;
    left: 50%; */
    color: var(--secondary-color);
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
    margin: 13px 0 10px;

    opacity: 0;
    transform: translateY(6px);
    animation: homeIn .25s ease-out .2s both;

    flex: 0 0 auto;
}

.recherche-inside {
    display: flex;
    flex-direction: column;
    min-height: 0;
    gap: 15px;
    max-height: 100%;

    justify-content: center;
    background-color: var(--secondary-color);
    border: 3px solid var(--primary-color);
    outline: 3px solid var(--secondary-color);
    border-radius: 999px;
    padding: 5px 5px 5px 15px;
    box-sizing: border-box;

    opacity: 0;
    transform: translateY(6px);
    animation: homeIn .25s ease-out .1s both;
}

.recherche-inside.writing {
    border-radius: 20px !important;
}

@keyframes searchHomeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.recherche-inside.writing {
    border-radius: 20px !important;
}

.recherche-area-container {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-height: 0;
}

.recherche-inside textarea,
textarea[data-gv="prompt-input"] {
    display: block;
    width: 100%;
    border: none;
    outline: none;
    background-color: transparent;
    color: var(--primary-color);
    font-size: 17px;
    font-family: "Inter", sans-serif;
    font-weight: 500;
    resize: none;
    overflow-y: hidden;
    box-sizing: border-box;

    min-height: 23px;
    height: 23px;
    max-height: none;
    padding: 4px 0;
}

.recherche-inside textarea::placeholder {
    color: var(--primary-color);
    opacity: 0.9;
    font-size: 18px;
    font-weight: bold;
}

.action-button-container {
    display: flex;
    flex-direction: row;
    gap: 10px;
    justify-content: end;
    align-items: center;
    width: fit-content;
}

.action-button-container.column {
    align-items: end;
    gap: 15px;
}

.column {
    flex-direction: column !important;
}

.action-button {
    height: 50px;
    aspect-ratio: 1 / 1;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    outline: none;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    font-size: 16px;
    border-radius: 999px;
    cursor: pointer;
}

.action-button svg {
    display: flex;
    width: 20px;
    height: 20px;
    fill: var(--secondary-color);
}

.action-button.little {
    height: 43px;
}

.action-button.little svg {
    width: 18px;
    height: 18px;
}

.action-button.invisible {
    display: none;
}









.selected-type {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}

.selected-type .label {
    flex-grow: 1;
}

/* ---- Superposition des icônes ---- */
.icon-wrapper {
    position: relative;
    width: 16px;
    height: 16px;
}

.icon-wrapper svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 16px;
    height: 16px;
    stroke: var(--secondary-color);
}

/* check visible par défaut */
.icon-check {
    opacity: 1;
}

.icon-close {
    opacity: 0;
}

/* ----- Swap simple au hover : pas d�?Tanimation, pas de mouvement ----- */
.selected-type:hover .icon-check {
    opacity: 0;
}

.selected-type:hover .icon-close {
    opacity: 1;
}

.selected-type.invisible {
    display: none;
}























/* =========================================================
   PATCH FINITIONS ZONE IA
   À COLLER TOUT EN BAS DU CSS
========================================================= */

/* 1) Empêche le flash des raccourcis internes du mode writing au chargement */
.recherche-raccourcis-action[data-gv="prompt-type"] {
    display: none;
}

/* 2) La row du bas doit être une vraie row flex */
.recherche-bottom-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    min-width: 0;
}

/* 3) Les raccourcis internes du mode writing prennent la place dispo */
.recherche-bottom-row .recherche-raccourcis-action {
    flex: 1 1 auto;
    min-width: 0;
}

/* 4) Le type sélectionné ne doit jamais s'étirer sur toute la largeur */
.recherche-bottom-row .selected-type {
    flex: 0 0 auto;
    width: fit-content;
    max-width: 100%;
    align-self: flex-start;
    height: stretch;
}

.recherche-bottom-row .selected-type .label {
    flex: 0 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 5) Transition writing / non-writing */
.recherche-inside {
    transition:
        padding .18s ease,
        border-color .18s ease,
        outline-color .18s ease,
        background-color .18s ease,
        box-shadow .18s ease;
}

.action-button-container,
.action-button,
.selected-type,
.gv-ph-overlay,
.recherche-bottom-row {
    transition:
        opacity .16s ease,
        transform .16s ease,
        gap .16s ease,
        height .16s ease;
}

/* 6) En mode NON writing :
      - la zone devient une mini grille 2 colonnes
      - textarea à gauche
      - bouton PJ à droite
*/
.recherche-inside:not(.writing) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 10px;
    row-gap: 0;
}

.recherche-inside:not(.writing) .recherche-area-container {
    min-width: 0;
}

.recherche-inside:not(.writing) .recherche-bottom-row {
    width: auto;
    min-width: auto;
    justify-content: flex-end;
    gap: 0;
}

.recherche-inside:not(.writing) .action-button-container {
    width: auto;
}

.recherche-inside:not(.writing) .action-button-container.column {
    flex-direction: row;
    align-items: center;
    gap: 0;
}

/* 7) Placeholder overlay :
      visible par défaut avec animation,
      masqué uniquement quand il y a de la valeur dans le textarea
*/
.gv-ph-overlay {
    opacity: 0;
    transform: translateX(-2px);
}

.gv-ph-overlay.is-ready,
.gv-ph-overlay.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Masquer uniquement si le textarea contient du texte */
.recherche-inside.has-value .gv-ph-overlay {
    opacity: 0 !important;
    transform: translateX(-2px) !important;
    pointer-events: none;
}



















/* Le modal de sélection de type */
.type-command-modal {
    position: absolute;
    bottom: calc(100% + 10px);
    /* s'ouvre AU-DESSUS */
    left: 0%;

    width: fit-content;
    /* largeur élégante */
    background: var(--secondary-color);
    padding: 10px;
    border-radius: 24px;
    z-index: 1050;

    max-height: 200px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);

    transition: opacity .15s ease, transform .15s ease;
}

/* invisible = fade-out clean */
.type-command-modal.invisible {
    opacity: 0;
    pointer-events: none;
}

.type-command-modal-inside {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    /* padding: 10px; */
    max-height: 180px;
    height: fit-content;
}

/* Scrollbar Webkit (Chrome, Edge, Safari) */
.type-command-modal-inside::-webkit-scrollbar {
    width: 6px;
    /* finesse */
}

.type-command-modal-inside::-webkit-scrollbar-track {
    background: transparent;
    /* pas de fond */
}

.type-command-modal-inside::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
    /* arrondi stylé */
}

.type-command-modal-inside::-webkit-scrollbar-thumb:hover {
    background: var(--primary-secondary);
}

/* Firefox */
.type-command-modal-inside {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}


/* Liste */
.type-command-modal ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* �?lément */
.type-command-modal li {
    padding: 8px 14px;
    cursor: pointer;
    border-radius: 99px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* raccourci auto */
    max-width: 350px;
    margin: 2px 10px 2px 5px;
    position: relative;
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 600;
    width: 250px;
}

/* wrapper interne */
.command-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 5px;
}

/* texte */
.command-item span:first-child {
    flex: 1;
}

/* couleur auto (hérite du style du modal) */
.command-icon svg {
    color: var(--primary-color);
    height: 13px;
    width: 13px;
    display: block;
    fill: currentColor;
}

.command-icon {
    flex: 0 0 22px;
    /* �o. même largeur pour chaque ligne */
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

/* Hover & active */
.type-command-modal li:hover,
.type-command-modal li.active {
    background: var(--secondary-secondary);
}







.type-command-modal li {
    /* important: sinon ton ::after tooltip se fait couper */
    overflow: visible;

    width: 320px;
    /* �o. largeur fixe pour aligner les icônes */
    padding: 8px 14px;
    margin: 2px 10px 2px 5px;
    border-radius: 99px;
    position: relative;

    color: var(--primary-color);
    font-size: 16px;
    font-weight: 600;
}

.command-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

/* �o. le secret du ellipsis en flex */
.command-label {
    flex: 1 1 auto;
    min-width: 0;
    /* sinon ça tronque jamais */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}




































/* BACKDROP */
.gv-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20000;
    transition: opacity .25s ease;
}

.gv-modal-backdrop.invisible {
    opacity: 0;
    pointer-events: none;
}

/* MODAL */
.gv-modal {
    display: flex;
    flex-direction: column;
    position: relative;
    width: 80%;
    max-width: 750px;
    max-height: 80%;
    background: var(--secondary-color);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 24px;
    padding: 25px 35px;
    outline: 2px solid var(--secondary-color);
}

/* HEADER */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    color: var(--primary-color);
}

.modal-header h2 {
    margin: 0;
    color: var(--primary-color);
    font-weight: 700 !important;
}

.modal-header h2 span {
    font-weight: 700;
}


.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 38px;
    cursor: pointer;
    color: var(--primary-color);
}


.modal-input-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* INPUT */
.modal-input-wrapper input {
    width: 100%;
    margin-top: 20px;
    padding: 10px 12px;
    border-radius: 99px;
    background-color: var(--primary-color);
    border: 2px solid var(--secondary-color);
    font-size: 1rem;
    color: var(--secondary-color);
    outline: 2px solid var(--primary-color);
    font-weight: 500;
}

.modal-input-wrapper input::placeholder {
    color: var(--secondary-color);
    opacity: 0.9;
    font-size: 14px;
    font-weight: bold;
}


/* GRID */
.modal-grid {
    margin-top: 25px;
    padding-right: 10px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;

    /* la magie */
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
    /* indispensable sinon flex refuse de réduire */
    scrollbar-width: thin;
    /* Firefox */
    scrollbar-color: var(--primary-color) transparent;
}

/* Chrome / Edge / Safari */
.modal-grid::-webkit-scrollbar {
    width: 6px;
}

.modal-grid::-webkit-scrollbar-track {
    background: transparent;
}

.modal-grid::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.modal-grid::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

.modal-grid article {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: var(--primary-color);
    color: var(--secondary-color);
    border-radius: 99px;
    padding: 8px 13px;
    font-size: 14px;
    text-align: center;
    cursor: pointer;
    transition: all .1s;
}

.modal-grid article:hover {
    background: var(--primary-hover);
    /* transform: translateY(-0.5px); */
}

.modal-no-result {
    grid-column: 1 / -1;
    text-align: center;
    padding: 25px 0;
    font-size: 1.1rem;
    opacity: 0.85;
    color: var(--primary-color);
    font-weight: 500;
}








































/* --- DESIGN STYLE "SMARTPHONE SETTINGS" --- */

.settings-page-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    max-width: 600px;
    /* Largeur type mobile/tablette */
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.settings-main-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--secondary-color);
    margin-bottom: 30px;
    text-align: center;
    user-select: none;
}

/* Le titre de la section (ex: NOTIFICATIONS) */
.settings-section-label {
    width: 100%;
    padding-left: 15px;
    margin-bottom: 8px;
    margin-top: 25px;
    font-size: 13px;
    text-transform: uppercase;
    color: var(--secondary-color);
    opacity: 0.8;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* La "Bulle" qui regroupe les options */
.settings-group {
    width: 100%;
    background-color: var(--primary-color);
    /* Couleur des séparateurs (bordures) */
    border-radius: 16px;
    /* Arrondi global */
    overflow: hidden;
    /* Coupe le contenu qui dépasse */
    display: flex;
    flex-direction: column;
    gap: 1px;
    /* Crée l'espace pour le séparateur */
    /* border: 2px solid var(--secondary-color); */
    /* Contour propre */
}

/* Chaque ligne d'option */
.settings-row {
    background-color: var(--secondary-color);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-decoration: none;
    user-select: none;
}

.settings-row:hover {
    background-color: var(--secondary-hover);
}

/* Typo des options */
.settings-row span {
    font-size: 17px;
    font-weight: 500;
    color: var(--primary-color);
}

/* La petite flèche à droite */
.settings-arrow {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.6;
}

/* --- NOTIFICATION CONTAINER (Nécessaire pour le test) --- */
/* (J'ai repris ton CSS de notification pour que ça marche ici) */
#gv-notification-container {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 999999;
    pointer-events: none;
}









































.modal-type-item {
    position: relative;
    text-align: start;
    justify-content: start !important;
    overflow: hidden;
}
.modal-type-item .modal-type-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 36px);
}

.modal-info-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    background: var(--primary-color);
    color: var(--secondary-color);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;

    box-shadow: -12px 0px 11px 2px var(--primary-color);
}

.modal-info-btn svg {
    color: var(--secondary-color);
}

.modal-info-btn:hover svg {
    color: var(--secondary-hover);
}

.modal-info-btn:hover {
    pointer-events: all;
}

.modal-info-btn {
    z-index: 5;
}

.modal-header {
    margin-bottom: 20px;
}

.modal-header h2 {
    font-weight: 600;
}

.modal-content {
    color: var(--primary-color);
}




































/* ========== GV Attachments ========== */

.gv-attachments {
    margin-top: 10px;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    padding: 0 0 5px 0;
}

.gv-attachment {
    flex: 0 0 auto;
    width: 220px;
    max-width: 240px;
    height: justify-content;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--primary-color);
    border-top-right-radius: 30px;
    border-bottom-right-radius: 30px;
    border-top-left-radius: 15px;
    border-bottom-left-radius: 15px;
    cursor: pointer;
}

.gv-attachment-badge {
    flex: 0 0 auto;
    width: 35px;
    height: 35px;
    margin: 6px 0 6px 6px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--primary-secondary);
    color: var(--secondary-color);
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    font-size: 8px;
}

.gv-attachment-main {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.gv-attachment-name {
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gv-attachment-meta {
    color: var(--secondary-color);
    opacity: 0.8;
    font-size: 9px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gv-notif-content {
    white-space: pre-line;
}


.gv-attachment-trash {
    flex: 0 0 auto;
    width: 42px;
    height: 100%;
    display: grid;
    place-items: center;
    background: var(--secondary-secondary);
    border: 0;
    outline: 0;
    border-top-right-radius: 15px;
    border-bottom-right-radius: 15px;
    padding: 0;
    cursor: pointer;
}

.gv-attachment-trash svg {
    width: 19px;
    height: 19px;
    fill: var(--primary-color);
    transition: transform 0.15s ease-out;
}

.gv-attachment-trash:hover svg {
    transform: translateY(-1.5px);
}

.gv-attachment-trash:focus,
.gv-attachment-trash:focus-visible {
    outline: none;
}

/* ========== Preview Modal ========== */
.gv-preview-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 22px;

    z-index: 20000;
    transition: opacity .25s ease;
}

.gv-preview-backdrop.invisible {
    opacity: 0;
    pointer-events: none;
}

.gv-preview-modal {
    position: relative;
    width: min(980px, 100%);
    height: min(720px, 100%);
    background: var(--secondary-color);
    padding: 0 10px 10px;
    border: 3px solid var(--primary-color);
    outline: 3px solid var(--secondary-color);
    border-radius: 24px;
    overflow: hidden;

    display: flex;
    flex-direction: column;
}

.gv-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    padding: 20px 14px;
}

.gv-preview-title {
    color: var(--primary-color);
    font-weight: 800;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gv-preview-close {
    position: absolute;
    top: 5px;
    right: 5px;
    background: transparent;
    border: none;
    font-size: 38px;
    cursor: pointer;
}

.gv-preview-close svg {
    width: 30px;
    height: 30px;
    fill: var(--primary-color);
}




.gv-preview-body {
    flex: 1;
    overflow: hidden;
    /* on délègue le scroll au contenu */
    flex: 1 1 auto;
}

.gv-preview-image-wrapper {
    max-height: 100%;
    overflow-y: auto;
    display: flex;
    justify-content: center;
    padding: 0 10px 0 0;
}

.gv-preview-image-wrapper img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.gv-preview-body iframe,
.gv-preview-body img {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
    border-radius: 10px;
    transition: all 0.2s ease-in-out;
}

.gv-preview-body:hover img,
.gv-preview-body:hover iframe {
    border-radius: 0px;
}

.gv-preview-body img {
    object-fit: contain;
}
















































/* SETTINGS MODAL */
#gv-settings-modal .modal-header {
    padding-right: 25px;
}

.gv-settings-subtitle {
    margin-top: 6px;
    opacity: .8;
    font-size: 14px;
}

.gv-settings-body {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 35px;
    max-height: 55vh;
    overflow: auto;
    padding-right: 6px;
    color: var(--primary-color);
}

.gv-settings-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gv-settings-section-title {
    font-weight: 800;
    margin-bottom: 10px;
    font-size: 15px;
}

.gv-field {
    /* Empilé : intitulé au-dessus, interaction (textarea / toggle / input) en dessous. */
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
    margin-top: 14px;
}

.gv-field:first-child {
    margin-top: 0;
}

.gv-field-label {
    font-weight: 500;
    font-size: 14px;
}

/* Intitulé + outils du champ (supprimer / réinitialiser) : icônes seules, sans contour */
.gv-field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.gv-field-tools {
    display: flex;
    align-items: center;
    gap: 2px;
}

.gv-field-tool {
    display: grid;
    place-items: center;
    padding: 3px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--primary-color);
    opacity: .45;
    cursor: pointer;
    transition: opacity .15s ease, transform .15s ease;
}

.gv-field-tool[hidden] {
    display: none;
}

.gv-field-tool:hover,
.gv-field-tool:focus-visible {
    opacity: 1;
    transform: scale(1.15);
}

.gv-field-tool svg {
    width: 16px;
    height: 16px;
    transition: transform .3s ease;
}

.gv-field-tool--reset:hover svg {
    transform: rotate(-200deg);
}

.gv-field-label .req {
    font-weight: 900;
    opacity: .8;
    margin-left: 6px;
}

.gv-input,
.gv-textarea {
    width: 100%;
    box-sizing: border-box;
    background: var(--secondary-color);
    color: var(--primary-color);
    border: none;
    border-bottom: 1.5px solid var(--primary-color);
    outline: none;
    font-size: 14px;
    padding-bottom: 3px;
}

.gv-textarea {
    /* Pleine largeur, redimensionnable UNIQUEMENT en hauteur, bornée en hauteur max. */
    min-height: 84px;
    max-height: 240px;
    resize: vertical;
    padding: 8px 10px;
    border: 1.5px solid var(--primary-color);
    border-radius: 5px;
    line-height: 1.45;
}

.gv-radio-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.gv-radio-pill,
.gv-check-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 3px;
    border: 2px solid var(--primary-color);
    border-radius: 999px;
    cursor: pointer;
    user-select: none;
}

.gv-radio-pill input,
.gv-check-pill input {
    accent-color: var(--primary-color);
}

/* .gv-field.is-missing .gv-input,
.gv-field.is-missing .gv-textarea{
    box-shadow: 0 0 0 3px rgba(255, 90, 90, .25);
} */

.gv-settings-footer {
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
}

.gv-settings-hint {
    opacity: .75;
    font-size: 13px;
    color: var(--primary-color);
    margin-right: 25px;
}

.gv-field.is-missing .gv-radio-pill,
.gv-field.is-missing .gv-check-pill {
    box-shadow: 0 0 0 3px rgba(255, 90, 90, .25);
}

.gv-radio-pill input,
.gv-check-pill input {
    display: none;
}

.gv-radio-pill span,
.gv-check-pill span {
    padding: 6px 10px;
    border-radius: 999px;
}

.gv-radio-pill input:checked+span,
.gv-check-pill input:checked+span {
    background: var(--primary-color);
    color: var(--secondary-color);
}

.gv-settings-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.gv-field-error {
    display: none;
    margin-top: 6px;
    font-size: 12px;
    opacity: .95;
}

.gv-field.is-missing .gv-field-error {
    display: block;
}

.gv-settings-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.gv-confirm-modal {
    max-width: 520px;
}

.gv-confirm-body {
    margin-top: 12px;
    line-height: 1.4;
    opacity: .9;
    color: var(--primary-color);
}

.gv-confirm-subbody {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid color-mix(in srgb, var(--primary-color) 12%, transparent);
}

.gv-confirm-subbody p {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    opacity: .7;
    color: var(--primary-color);
    font-style: italic;
}

.gv-confirm-input-wrap {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gv-confirm-input-wrap[hidden],
.gv-confirm-input-wrap[aria-hidden="true"],
.gv-confirm-input-label[hidden] {
    display: none !important;
}

.gv-confirm-input-label {
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 600;
}

.gv-confirm-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 2px solid var(--secondary-color);
    background: var(--primary-color);
    outline: 2px solid var(--primary-color);
    color: var(--secondary-color);
    font-size: 14px;
    font-weight: 500;
    box-sizing: border-box;
    transition: all .18s ease;
}

.gv-confirm-input::placeholder {
    color: rgba(109, 7, 26, 0.48);
}

.gv-confirm-input:focus {
    border-bottom-right-radius: 2px;
}

/* Compteur de caractères pour le modal de renommage */
.gv-confirm-input-wrap .gv-char-counter {
    font-size: 11px;
    font-weight: 600;
    opacity: .5;
    text-align: right;
    margin-top: -4px;
    line-height: 1.4;
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition: all 0.2s ease;
    transform-origin: center;
    will-change: transform, color;
}

.gv-confirm-input-wrap .gv-char-counter.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.gv-confirm-input-wrap .gv-char-counter.is-warning {
    opacity: 0.95;
}

.gv-confirm-input-wrap .gv-char-counter.is-limit {
    opacity: 1;
    font-weight: 700;
    color: var(--primary-secondary);
}

.gv-confirm-input-wrap .gv-char-counter.is-limit-hit {
    animation: gvCounterLimitHit .3s ease;
    color: var(--primary-color);
}

.gv-confirm-input-counter {
    font-size: 11px;
    font-weight: 600;
    opacity: .5;
    text-align: right;
    margin-top: -4px;
}

.gv-confirm-input-counter.is-over {
    color: #b92f26;
    opacity: 1;
}

.gv-confirm-input-counter.is-under {
    color: #d97706;
    opacity: .8;
}

/* Compteur de caractères pour les commentaires */
.gv-comment-char-counter {
    font-size: 11px;
    font-weight: 600;
    opacity: .5;
    color: var(--primary-color);
    margin-top: 4px;
    text-align: right;
    transition: opacity .18s ease, color .18s ease;
    will-change: transform, color;
}

.gv-comment-char-counter.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.gv-comment-char-counter.is-warning {
    opacity: 0.95;
}

.gv-comment-char-counter.is-limit {
    opacity: 1;
    font-weight: 700;
    color: var(--primary-secondary);
}

.gv-comment-char-counter.is-limit-hit {
    animation: gvCounterLimitHit .3s ease;
    color: var(--primary-color);
}

.gv-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}

.gv-ph-wrap {
    position: relative;
    min-height: 0;
    width: 100%;
}

textarea[data-gv="prompt-input"] {
    display: block;
    width: 100%;
    min-height: 23px;
    height: 23px;
    max-height: none;
    resize: none;
    overflow-y: hidden;
    box-sizing: border-box;
}

.gv-char-counter,
.gv-attachments,
.recherche-bottom-row {
    flex: 0 0 auto;
}

.recherche-bottom-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
}

.recherche-raccourcis-action,
.selected-type {
    min-width: 0;
}

.gv-ph-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    user-select: none;
    display: flex;
    align-items: center;
    padding: 4px 0;
    margin: 0;
    font: inherit;
    line-height: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--primary-color);
    font-size: 18px;
    font-weight: bold;
    opacity: 0;
    transform: translateX(-2px);
    transition: opacity .12s ease-out, transform .12s ease-out;
}

.gv-ph-overlay.is-ready {
  opacity: .75;
  transform: translateX(0);
}

/* IMPORTANT: pas de display:none sinon pas d'anim */
.gv-ph-overlay.is-hidden {
  opacity: 0;
  transform: translateX(-2px);
}

[data-gv="prompt-input"]::placeholder {
    color: transparent;
}



































/* ===== GV SUBMIT RESULT PANEL ===== */
.gv-submit-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 99999;
    transition: opacity .25s ease;
}

.gv-submit-backdrop.invisible {
    opacity: 0;
    pointer-events: none;
}




.gv-submit-panel {
    width: min(980px, 96vw);
    max-height: min(78vh, 720px);
    background: var(--secondary-color);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    outline: 2px solid var(--secondary-color);
    border-radius: 18px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 10px;

    opacity: 0;
    transform: translateY(8px);
    animation: gvSubmitIn .18s ease forwards;
}

@keyframes gvSubmitIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gv-submit-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.gv-submit-head h2 {
    font-size: 18px;
    margin: 0;
}

.gv-submit-close {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    border: 1px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

.gv-submit-body {
    padding: 5px;
    overflow: auto;
    font-size: 14px;
    line-height: 1.35;
}

.gv-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--primary-color);
    font-size: 13px;
    margin: 4px 6px 4px 0;
}

.gv-pill.ok {
    opacity: 1;
}

.gv-pill.ko {
    opacity: .95;
}

.gv-code {
    margin-top: 10px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(0, 0, 0, .15);
    overflow: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    white-space: pre-wrap;
}






































.recherche-area-container {
    position: relative;
}

.gv-char-counter {
    font-size: 12px;
    user-select: none;
    display: none;
    justify-content: flex-end;
    gap: 2px;
    color: var(--primary-color);

    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition: all 0.2s ease;
    transform-origin: center;
    will-change: transform, color;
}

.gv-char-counter.is-visible {
    opacity: 0.75;
    transform: translateY(0);
    pointer-events: auto;
    display: flex;
}

.gv-char-counter.is-warning {
    opacity: 0.95;
}

.gv-char-counter.is-limit {
    opacity: 1;
    font-weight: 700;
    color: var(--primary-secondary);
}

.gv-char-counter.is-limit-hit {
    animation: gvCounterLimitHit .3s ease;
    color: var(--primary-color);
}

@keyframes gvCounterLimitHit {
    0% {
        transform: translateX(0);
        color: inherit;
    }
    18% {
        transform: translateX(-0.8px);
        color: var(--primary-color);
    }
    36% {
        transform: translateX(0.8px);
        color: var(--primary-color);
    }
    54% {
        transform: translateX(-0.4px);
        color: var(--primary-color);
    }
    72% {
        transform: translateX(0.4px);
        color: var(--primary-color);
    }
    100% {
        transform: translateX(0);
        color: inherit;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gv-char-counter.is-limit-hit {
        animation: none;
        color: var(--primary-color);
    }
}









































.gv-pricing {
    background: var(--bg);
    padding: 60px 16px 80px;

    /* Important chez toi: body overflow hidden, donc on scroll ici */
    flex: 1;
    overflow: auto;
}

.gv-pricing-hero {
    max-width: 1100px;
    margin: 0 auto 28px;
}

.gv-pricing-hero-inner {
    background: linear-gradient(180deg,
            color-mix(in srgb, var(--primary-secondary) 70%, transparent),
            transparent);
    border: 2px solid color-mix(in srgb, var(--secondary-color) 18%, transparent);
    border-radius: 18px;
    padding: 28px;
}

.gv-kicker {
    margin: 0 0 8px;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--secondary-color) 50%, transparent);
}

.gv-title {
    margin: 0;
    font-size: 34px;
    line-height: 1.08;
    color: var(--secondary-color);
}

.gv-subtitle {
    margin: 10px 0 0;
    max-width: 70ch;
    color: color-mix(in srgb, var(--secondary-color) 70%, transparent);
    font-size: 15px;
    line-height: 1.5;
}

.gv-pricing-wrap {
    max-width: 1100px;
    margin: 0 auto;
}

.gv-pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.gv-plan {
    background: var(--secondary-color);
    border: 2px solid color-mix(in srgb, var(--primary-color) 18%, transparent);
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 520px;
}

.gv-plan.is-featured {
    border-color: color-mix(in srgb, var(--primary-color) 55%, color-mix(in srgb, var(--secondary-color) 18%, transparent));
    box-shadow: 0 14px 45px color-mix(in srgb, var(--secondary-color) 18%, transparent);
    transform: translateY(-8px);
}

.gv-plan-head {
    padding: 18px 18px 14px;
    border-bottom: 2px solid color-mix(in srgb, var(--primary-color) 18%, transparent);
    background: linear-gradient(180deg, color-mix(in srgb, var(--primary-color) 5%, transparent), transparent);
}

.gv-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 2px solid color-mix(in srgb, var(--primary-color) 18%, transparent);
    background: color-mix(in srgb, var(--secondary-color) 60%, transparent);
    font-size: 12px;
    color: color-mix(in srgb, var(--primary-color) 70%, transparent);
    margin-bottom: 10px;
}

.gv-plan-title {
    margin: 0;
    font-size: 20px;
    color: var(--primary-color);
}

.gv-plan-tagline {
    margin: 6px 0 0;
    color: color-mix(in srgb, var(--primary-color) 70%, transparent);
    font-size: 13px;
    line-height: 1.4;
}

.gv-price {
    margin-top: 14px;
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.gv-price-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary-color);
}

.gv-price-period {
    font-size: 13px;
    color: color-mix(in srgb, var(--primary-color) 70%, transparent);
}

.gv-btn {
    margin-top: 14px;
    width: 100%;
    border-radius: 12px;
    padding: 12px 14px;
    border: 2px solid color-mix(in srgb, var(--primary-color) 18%, transparent);
    cursor: pointer;
    font-weight: 700;
    transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease, border-color .12s ease;
}

.gv-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 30px color-mix(in srgb, var(--primary-color) 12%, transparent);
}

.gv-btn.is-primary {
    background: var(--primary-color);
    color: var(--secondary-color);
    border-color: color-mix(in srgb, var(--primary-color) 60%, transparent);
}

.gv-btn.is-primary:hover {
    background: var(--primary-hover);
}

.gv-btn.is-secondary {
    background: var(--secondary-secondary);
    color: var(--primary-color);
    border-color: color-mix(in srgb, var(--primary-color) 25%, transparent);
}

.gv-btn.is-secondary:hover {
    background: var(--secondary-hover);
}

.gv-cta-note {
    margin: 10px 0 0;
    font-size: 12px;
    color: color-mix(in srgb, var(--primary-color) 50%, transparent);
    text-align: center;
}

.gv-plan-body {
    padding: 16px 18px 18px;
    flex: 1;
}

.gv-section-title {
    margin: 0 0 10px;
    font-size: 12px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--primary-color) 50%, transparent);
}

.gv-section-title-muted {
    margin-top: 14px;
}

.gv-list {
    margin: 0;
    padding-left: 18px;
    color: var(--primary-color);
    font-size: 13px;
    line-height: 1.55;
}

.gv-list li {
    margin: 6px 0;
}

.gv-list-muted {
    color: color-mix(in srgb, var(--primary-color) 70%, transparent);
}

.gv-pricing-footnote {
    margin-top: 16px;
    padding: 14px 16px;
    border: 2px solid color-mix(in srgb, var(--secondary-color) 18%, transparent);
    border-radius: 14px;
    background: color-mix(in srgb, var(--primary-secondary) 65%, transparent);
    color: color-mix(in srgb, var(--secondary-color) 70%, transparent);
    font-size: 13px;
    line-height: 1.5;
}

.gv-faq {
    margin-top: 20px;
}

.gv-faq-title {
    margin: 0 0 10px;
    font-size: 18px;
    color: var(--secondary-color);
}

.gv-faq-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.gv-faq-item {
    background: color-mix(in srgb, var(--primary-secondary) 70%, transparent);
    border: 2px solid color-mix(in srgb, var(--secondary-color) 18%, transparent);
    border-radius: 14px;
    padding: 12px 14px;
}

.gv-faq-q {
    cursor: pointer;
    font-weight: 800;
    color: var(--secondary-color);
    list-style: none;
}

.gv-faq-q::-webkit-details-marker {
    display: none;
}

.gv-faq-a {
    margin-top: 10px;
    color: color-mix(in srgb, var(--secondary-color) 70%, transparent);
    font-size: 13px;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 980px) {
    .gv-pricing-grid {
        grid-template-columns: 1fr;
    }

    .gv-faq-grid {
        grid-template-columns: 1fr;
    }

    .gv-title {
        font-size: 28px;
    }
}

/* ═══════════════════════════════════════════
   DEBUG FAB
   ═══════════════════════════════════════════ */

.gv-dfab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 8px;
}

.gv-dfab-toggle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--secondary-color);
    background: var(--primary-color);
    color: var(--secondary-color);
    font-size: 20px;
    cursor: pointer;
    display: grid;
    place-items: center;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
    transition: transform .15s ease, box-shadow .15s ease;
    user-select: none;
    line-height: 1;
}

.gv-dfab-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

.gv-dfab[data-open="true"] .gv-dfab-toggle {
    transform: rotate(20deg) scale(1.05);
}

/* Menu */
.gv-dfab-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--primary-color);
    border: 2px solid var(--secondary-color);
    border-radius: 16px;
    padding: 6px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    min-width: 200px;
    opacity: 0;
    transform: translateY(8px) scale(0.95);
    pointer-events: none;
    transition: opacity .15s ease, transform .15s ease;
}

.gv-dfab[data-open="true"] .gv-dfab-menu {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Item */
.gv-dfab-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    font-family: "Inter", sans-serif;
    color: var(--secondary-color);
    text-decoration: none;
    cursor: pointer;
    transition: background .1s ease;
    white-space: nowrap;
}

.gv-dfab-item:hover {
    background: color-mix(in srgb, var(--secondary-color) 10%, transparent);
}

.gv-dfab-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    font-size: 14px;
    flex-shrink: 0;
}

.gv-dfab-item-label {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

/* Status dot */
.gv-dfab-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #888;
    transition: background .2s ease;
}

.gv-dfab-dot.is-connected {
    background: #34c759;
    box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.25);
}

.gv-dfab-dot.is-disconnected {
    background: #ff3b30;
    box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.25);
}

.gv-dfab-dot.is-pending {
    background: #ff9500;
    animation: gvDfabPulse 1s ease-in-out infinite alternate;
}

@keyframes gvDfabPulse {
    0%   { opacity: .5; }
    100% { opacity: 1; }
}

/* ── Étincelles « Automatique » : élément graphique à droite du libellé.
   Trait 2.5 (le CSS prime sur l'attribut SVG) et taille calées sur la
   graisse/le corps de la police des libellés. ── */
.gv-bolt-inline {
    width: 15px;
    height: 15px;
    margin-left: 6px;
    vertical-align: middle;
    flex-shrink: 0;
    stroke-width: 2.5;
}

/* Raccourcis de la page d'accueil (grandes cartes) : police 15px bold → icône 17px. */
.raccourcis-action article h3 .gv-bolt-inline {
    width: 17px;
    height: 17px;
}

/* Raccourcis à côté de l'input : neutralise la règle générique
   `.recherche-raccourcis-action article svg` (fill plein + 14px) qui
   écrasait l'étincelle ; on reste en trait, calé sur la police 16px. */
.recherche-raccourcis-action article h3 .gv-bolt-inline {
    width: 16px;
    height: 16px;
    fill: none;
}

.command-item .gv-bolt-wrap {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
}

.command-item .gv-bolt-wrap .gv-bolt-inline {
    margin-left: 0;
    width: 14px;
    height: 14px;
}

/* Chip du type sélectionné : éclair entre le libellé et le check,
   avec un écart plus marqué côté check. */
.selected-type .gv-bolt-slot {
    display: inline-flex;
    align-items: center;
    margin-right: 6px;
}

.selected-type .gv-bolt-slot[hidden] {
    display: none;
}

.selected-type .gv-bolt-slot svg {
    width: 15px;
    height: 15px;
    stroke: var(--secondary-color);
    stroke-width: 2.5;
}
