/* =====================================================================
 * L'agence (accueil) : le tableau des prochaines étapes du visiteur
 * (templates/home/index.html.twig, assets/kanban.js). Trois colonnes,
 * « À faire », « En cours », « Fait », chacune avec sa couleur (filet
 * gauche des cartes et pastille d'état) : gris, bleu électrique, jaune.
 * Empilées sur téléphone, côte à côte dès 40em. La carte déplacée porte
 * l'ombre franche décalée de la charte, seulement pendant le trajet.
 * ===================================================================== */
.kanban__title {
    margin-bottom: var(--af-space-4);
    font-family: var(--af-font-ui);
    font-size: var(--af-text-lg);
    font-style: normal;
    font-weight: var(--af-weight-ui);
}

.kanban__board {
    display: grid;
    gap: var(--af-space-3);
}

.kanban__lane {
    --lane-color: var(--af-slate-500);
    padding: var(--af-space-3);
    border-radius: var(--af-radius-md);
    background-color: var(--af-color-bg-alt);
}

.kanban__lane--doing {
    --lane-color: var(--af-blue-500);
}

.kanban__lane--done {
    --lane-color: var(--af-yellow-400);
}

.kanban__lane-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--af-space-2);
    margin: 0;
    padding: var(--af-space-1) var(--af-space-1) var(--af-space-3);
    font-family: var(--af-font-ui);
    font-size: var(--af-text-sm);
    font-weight: var(--af-weight-ui);
    line-height: var(--af-leading-snug);
}

.kanban__count {
    min-width: 1.75rem;
    padding: 0.125rem var(--af-space-2);
    border-radius: var(--af-radius-xs);
    background-color: var(--af-color-bg);
    color: var(--af-color-text-muted);
    font-size: var(--af-text-xs);
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.kanban__list {
    display: grid;
    gap: var(--af-space-3);
    margin: 0;
    padding: 0;
    list-style: none;
}

/* hauteur commune : les cartes s'échangent entre colonnes sans faire bouger la page */
.kanban__card {
    position: relative;
    display: grid;
    align-content: start;
    gap: var(--af-space-2);
    min-height: 8.5rem;
    padding: var(--af-space-4) var(--af-space-4) var(--af-space-4) var(--af-space-5);
    border: var(--af-border-hairline) solid var(--af-color-border);
    border-radius: var(--af-radius-sm);
    background-color: var(--af-color-bg);
    box-shadow: inset 3px 0 0 var(--lane-color);
}

.kanban__card.is-moving {
    z-index: 1;
    box-shadow: inset 3px 0 0 var(--lane-color), var(--af-shadow-offset);
}

.kanban__card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--af-space-2);
}

.kanban__tag {
    padding: 0.125rem var(--af-space-2);
    border-radius: var(--af-radius-xs);
    background-color: var(--af-color-bg-tint);
    color: var(--af-navy-950);
    font-size: var(--af-text-xs);
    line-height: var(--af-leading-snug);
}

/* pastille d'état : anneau gris (à faire), à moitié bleu (en cours), jaune coché (fait) */
.kanban__state {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.kanban__state-ring {
    stroke: var(--lane-color);
}

.kanban__lane--doing .kanban__state-ring {
    stroke-dasharray: 25.1 50.3;
    transform: rotate(-90deg);
    transform-origin: center;
}

.kanban__lane--done .kanban__state-ring {
    fill: var(--af-yellow-400);
}

.kanban__state-check {
    stroke: none;
}

.kanban__lane--done .kanban__state-check {
    stroke: var(--af-navy-950);
}

.kanban__card-title {
    font-family: var(--af-font-ui);
    font-weight: var(--af-weight-ui);
    line-height: var(--af-leading-snug);
}

.kanban__card-text {
    color: var(--af-color-text-muted);
    font-size: var(--af-text-sm);
    line-height: var(--af-leading-snug);
}

/* carte « Nous solliciter » : toute la carte mène à la page Contact (le titre est le seul arrêt clavier) */
.kanban__card-link {
    color: inherit;
    text-decoration: none;
}

.kanban__card-link::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: var(--af-radius-sm);
}

.kanban__card-link:focus-visible {
    outline: none;
}

.kanban__card-link:focus-visible::after {
    outline: var(--af-focus-width) solid var(--af-color-focus);
    outline-offset: var(--af-focus-offset);
}

.kanban__card--link:hover .kanban__card-link,
.kanban__card-link:focus-visible {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.2em;
}

.kanban__card--link:hover {
    border-color: var(--lane-color);
}

/* pastille « 1 action à faire » : seulement dans la colonne En cours, posée sur le coin de la carte */
.kanban__badge {
    position: absolute;
    top: -0.7rem;
    right: var(--af-space-3);
    z-index: 2;
    display: none;
    align-items: center;
    gap: var(--af-space-2);
    padding: 0.2rem var(--af-space-3) 0.2rem var(--af-space-2);
    border-radius: var(--af-radius-md);
    background-color: var(--af-yellow-400);
    color: var(--af-navy-950);
    font-family: var(--af-font-ui);
    font-size: var(--af-text-xs);
    font-weight: var(--af-weight-ui);
    line-height: 1.3;
    white-space: nowrap;
    box-shadow: 0 0 0 3px var(--af-color-bg);
}

.kanban__badge::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 2px;
    background-color: var(--af-navy-950);
}

.kanban__lane--doing .kanban__badge {
    display: inline-flex;
}

/* elle surgit une fois la carte posée dans la colonne (après son trajet) */
@media (prefers-reduced-motion: no-preference) {
    .kanban__lane--doing .kanban__badge {
        animation: kanban-badge 0.45s cubic-bezier(0.2, 0, 0, 1.4) 0.9s both;
    }
}

@keyframes kanban-badge {
    from {
        opacity: 0;
        transform: scale(0.4);
    }
}

@media (min-width: 40em) {
    .kanban__board {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .kanban__card {
        min-height: 9rem;
    }
}

/* à droite du texte, colonnes étroites : les textes prennent plus de lignes */
@media (min-width: 80em) {
    .kanban__card {
        min-height: 11rem;
    }
}
