/* =========================================================================
   Prodecta — section « Intégrations » : les cartes de plateformes.

   Chaque carte est un petit jeu : au survol, elle se soulève et s'incline
   vers le curseur (relief 3D piloté par integrations.js), un reflet suit la
   souris, et le bloc « Où placer votre lien » se charge ligne par ligne —
   des barres grises deviennent du vrai texte, coché à mesure. Au doigt, un
   appui déclenche la même séquence ; la carte centrée se charge d'elle-même.

   Les couleurs de marque passent par --c, posée sur chaque carte dans le
   HTML : lueur, coches et barre de chargement en héritent.
   ========================================================================= */

#integrations {
    text-align: center;
    overflow: clip;
    overflow-clip-margin: 40px;
}

.int-carousel-wrap {
    position: relative;
    margin-top: 48px;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    -webkit-mask-image: linear-gradient(to right, transparent, black 3%, black 97%, transparent);
    mask-image: linear-gradient(to right, transparent, black 3%, black 97%, transparent);
}

.int-carousel {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Marge haute et basse : la carte soulevée et son ombre ne doivent pas
       être rognées par le conteneur défilant (l'ombre la plus longue
       descend d'environ 60 px sous la carte). */
    padding: 32px max(24px, calc((100vw - 1152px) / 2)) 72px;
    scroll-behavior: smooth;
    /* La perspective vient du parent : chaque carte s'incline dans le même
       espace, comme des cartes posées sur une table. */
    perspective: 900px;
}

.int-carousel::-webkit-scrollbar {
    display: none;
}

/* ------------------------------------------------------------ la carte */
.int-card {
    --c: #2BDE73;
    --mx: 50%;
    --my: 30%;
    position: relative;
    isolation: isolate;
    flex: 0 0 316px;
    min-height: 412px;
    display: flex;
    flex-direction: column;
    scroll-snap-align: center;
    padding: 26px 24px 22px;
    border-radius: 22px;
    overflow: hidden;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, .08);
    /* Ombre courte et très diffuse : elle doit se fondre dans le crème,
       jamais dessiner un rectangle sous la carte. */
    box-shadow:
        0 1px 2px rgba(20, 30, 24, .12),
        0 14px 30px -18px rgba(20, 30, 24, .32);
    transform-style: preserve-3d;
    will-change: transform;
    cursor: default;
    /* Au repos, les cartes sont de profil, comme posées en éventail sur
       une table ; au survol, celle qu'on vise se redresse face à soi. */
    transform: rotateY(var(--rest-ry, -30deg)) rotateX(4deg);
    transition:
        transform .6s cubic-bezier(.22, 1, .36, 1),
        box-shadow .45s ease;
}

/* Reflet qui suit le curseur : une lumière posée sur du verre sombre. */
.int-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background: radial-gradient(
        320px circle at var(--mx) var(--my),
        rgba(255, 255, 255, .16),
        rgba(255, 255, 255, .04) 40%,
        transparent 65%
    );
    opacity: 0;
    transition: opacity .45s ease;
    pointer-events: none;
}

/* Liseré à la couleur de la marque, allumé au survol. */
.int-card::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 38%, transparent);
    opacity: 0;
    transition: opacity .45s ease;
    pointer-events: none;
}

.int-card > * {
    position: relative;
    z-index: 1;
}

.int-card.is-on {
    box-shadow:
        0 2px 4px rgba(20, 30, 24, .14),
        0 24px 44px -24px rgba(20, 30, 24, .42);
}

.int-card.is-on::before,
.int-card.is-on::after {
    opacity: 1;
}

/* Sans script (ou avant lui) : le survol redresse et soulève la carte. */
@media (hover: hover) and (pointer: fine) {
    .int-card:hover {
        transform: translateY(-10px) rotateY(0) rotateX(0);
    }
}

/* Au doigt, pas de survol : la carte chargée se redresse aussi. */
.int-card.is-on {
    z-index: 2;
    transform: translateY(-6px) rotateY(0) rotateX(0);
}

/* Tant que la souris la tient, la carte doit la suivre sans traîner :
   transition courte, puis retour souple au profil de repos. */
@media (hover: hover) and (pointer: fine) {
    .int-card.is-on {
        transition:
            transform .16s ease-out,
            box-shadow .45s ease;
    }
}

/* Fonds : un dégradé profond par plateforme. */
.int-card.c-gmaps { background: linear-gradient(160deg, #1a3a5c 0%, #0d1f33 40%, #0a1520 100%); }
.int-card.c-insta { background: linear-gradient(160deg, #4a1942 0%, #2a0e28 40%, #1a0818 100%); }
.int-card.c-tiktok { background: linear-gradient(160deg, #0a2a2a 0%, #0a1a1a 40%, #080e0e 100%); }
.int-card.c-web { background: linear-gradient(160deg, #0a2a1a 0%, #0a1a12 40%, #080e0a 100%); }
.int-card.c-linkedin { background: linear-gradient(160deg, #0a2040 0%, #081830 40%, #050e1a 100%); }
.int-card.c-facebook { background: linear-gradient(160deg, #1a2a50 0%, #101a38 40%, #0a1020 100%); }
.int-card.c-multi { background: linear-gradient(160deg, #1a1040 0%, #120a2a 40%, #0a0618 100%); }

/* ------------------------------------------------------------ en-tête */
.int-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.int-logo {
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 15.5px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -.1px;
}

.int-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(255, 255, 255, .12);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
    transform: translateZ(30px);
}

.int-icon svg {
    width: 20px;
    height: 20px;
}

/* Le pictogramme rebondit à l'ouverture : c'est lui qu'on est venu voir. */
.int-card.is-on .int-icon {
    /* Le dépassement est dans les images-clés (1 → 1,2 → 1,08), pas dans
       la courbe : le mouvement décélère franchement, sans élastique. */
    animation: intIconPop .55s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes intIconPop {
    0% { transform: translateZ(30px) scale(1); }
    45% { transform: translateZ(30px) scale(1.22) rotate(-6deg); }
    100% { transform: translateZ(30px) scale(1.08); }
}

.int-arrow {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .35s ease, transform .5s cubic-bezier(.22, 1, .36, 1);
}

.int-arrow svg {
    width: 14px;
    height: 14px;
    stroke: rgba(255, 255, 255, .85);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.int-card.is-on .int-arrow {
    background: var(--c);
    transform: rotate(45deg);
}

.int-card.c-tiktok.is-on .int-arrow svg,
.int-card.c-web.is-on .int-arrow svg {
    stroke: #06221a;
}

.int-desc {
    font-size: 13.5px;
    color: rgba(255, 255, 255, .74);
    line-height: 1.65;
    margin-bottom: 18px;
}

.int-desc strong {
    color: #fff;
    font-weight: 700;
}

/* ------------------------------------------ « Où placer votre lien » */
.int-where {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.int-where-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .55);
    white-space: nowrap;
}

/* Barre de chargement : elle se remplit pendant que les lignes arrivent. */
.int-where-bar {
    flex: 1;
    height: 3px;
    border-radius: 3px;
    background: rgba(255, 255, 255, .12);
    overflow: hidden;
}

.int-where-bar b {
    display: block;
    height: 100%;
    width: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, color-mix(in srgb, var(--c) 70%, #fff), var(--c));
    box-shadow: 0 0 12px color-mix(in srgb, var(--c) 70%, transparent);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 1.15s cubic-bezier(.22, 1, .36, 1);
}

.int-card.is-on .int-where-bar b {
    transform: scaleX(1);
}

.int-where-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.int-where-list li {
    --d: 0s;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 6px 0;
    font-size: 13px;
    line-height: 1.45;
    color: rgba(255, 255, 255, .92);
}

/* Les lignes se chargent l'une après l'autre. */
.int-card.is-on .int-where-list li:nth-child(1) { --d: .12s; }
.int-card.is-on .int-where-list li:nth-child(2) { --d: .42s; }
.int-card.is-on .int-where-list li:nth-child(3) { --d: .72s; }

.iw-check {
    width: 18px;
    height: 18px;
    margin-top: 1px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, .28);
    display: grid;
    place-items: center;
    flex-shrink: 0;
    transition: background .3s ease var(--d), border-color .3s ease var(--d), transform .35s cubic-bezier(.22, 1, .36, 1) var(--d);
}

.iw-check svg {
    width: 10px;
    height: 10px;
    fill: none;
    stroke: #06221a;
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.int-card.c-insta .iw-check svg,
.int-card.c-linkedin .iw-check svg,
.int-card.c-facebook .iw-check svg,
.int-card.c-multi .iw-check svg,
.int-card.c-gmaps .iw-check svg {
    stroke: #fff;
}

.iw-check svg path {
    stroke-dasharray: 20;
    stroke-dashoffset: 20;
    transition: stroke-dashoffset .35s ease calc(var(--d) + .12s);
}

.int-card.is-on .iw-check {
    background: var(--c);
    border-color: var(--c);
    transform: scale(1.08);
}

.int-card.is-on .iw-check svg path {
    stroke-dashoffset: 0;
}

/* Au repos, le texte est une barre grise qui scintille : le contenu
   « n'est pas encore chargé ». Au survol, la barre s'efface et le texte
   prend sa place. */
.iw-txt {
    position: relative;
    display: block;
    flex: 1;
    min-width: 0;
    /* Replié sur une ligne tant qu'il n'est pas chargé : la carte reste
       compacte, puis chaque ligne prend sa vraie hauteur en arrivant. */
    max-height: 19px;
    overflow: hidden;
    color: transparent;
    transition: color .4s ease var(--d), max-height .45s cubic-bezier(.22, 1, .36, 1) var(--d);
}

.int-card.is-on .iw-txt {
    max-height: 64px;
}

.iw-txt::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    height: 11px;
    width: var(--w, 76%);
    border-radius: 6px;
    background: linear-gradient(90deg, rgba(255, 255, 255, .1) 0%, rgba(255, 255, 255, .24) 50%, rgba(255, 255, 255, .1) 100%);
    background-size: 220% 100%;
    animation: intShimmer 1.6s linear infinite;
    transition: opacity .35s ease var(--d), transform .35s ease var(--d);
}

@keyframes intShimmer {
    from { background-position: 120% 0; }
    to { background-position: -120% 0; }
}

.int-card.is-on .iw-txt {
    color: rgba(255, 255, 255, .92);
}

.int-card.is-on .iw-txt::before {
    opacity: 0;
    transform: scaleX(.6);
    transform-origin: left center;
}

/* ------------------------------------------------------------ réglages */
@media (max-width: 900px) {
    .int-card {
        flex: 0 0 292px;
        min-height: 396px;
        padding: 22px 20px 20px;
    }
}

/* Au doigt : cartes à plat et défilement libre. Le profil 3D et
   l'aimantation freinaient le balayage sur téléphone. */
@media (hover: none), (pointer: coarse) {
    .int-carousel {
        scroll-snap-type: none;
        scroll-behavior: auto;
        perspective: none;
    }

    .int-card,
    .int-card.is-on {
        transform: none;
        transform-style: flat;
        will-change: auto;
        transition: box-shadow .35s ease;
    }
}

@media (max-width: 600px) {
    .int-carousel {
        gap: 14px;
        padding-top: 16px;
        padding-bottom: 32px;
    }

    /* Moins de texte : la description tient en trois lignes, la carte
       prend la hauteur de son contenu. */
    .int-card {
        flex: 0 0 min(272px, 80vw);
        min-height: 0;
        padding: 20px 18px 18px;
    }

    .int-header { margin-bottom: 12px; }

    .int-desc {
        font-size: 13px;
        line-height: 1.55;
        margin-bottom: 14px;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .int-where { padding-top: 12px; }
    .int-where-head { margin-bottom: 6px; }
    .int-where-list li { padding: 5px 0; font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
    .int-card,
    .int-arrow,
    .iw-check,
    .iw-txt,
    .iw-txt::before,
    .int-where-bar b {
        transition-duration: .01ms;
        transition-delay: 0s;
    }

    .int-card.is-on .int-icon {
        animation: none;
    }

    .iw-txt::before {
        animation: none;
    }
}
