/**
 * AM Portfolio - Timeline Styles
 * Style cartoon pour les shortcodes [am_experiences] et [am_formations]
 *
 * @since 1.1.0
 */

/* ================================
   CONTAINER (element racine du shortcode)
   ================================ */
.am-timeline__container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
    box-sizing: border-box;
}

/* ================================
   ITEM
   ================================ */
.am-timeline__item {
    position: relative;
    padding-left: 2rem;
    padding-bottom: 2rem;
    border-left: 4px solid var(--anthracite, #2f3542);
}

@media (min-width: 768px) {
    .am-timeline__item {
        padding-left: 3rem;
        padding-bottom: 2.5rem;
    }
}

.am-timeline__item:last-child {
    border-left-color: transparent;
    padding-bottom: 0;
}

/* Variantes de couleur pour le border-left */
.am-timeline--red .am-timeline__item {
    border-left-color: #ff6b6b;
}

.am-timeline--red .am-timeline__item:last-child {
    border-left-color: transparent;
}

/* ================================
   DOT
   ================================ */
.am-timeline__dot {
    position: absolute;
    left: -11px;
    top: 0;
    width: 18px;
    height: 18px;
    background: white;
    border: 3px solid var(--anthracite, #2f3542);
    border-radius: 50%;
    z-index: 1;
}

@media (min-width: 768px) {
    .am-timeline__dot {
        left: -14px;
        width: 24px;
        height: 24px;
        border-width: 4px;
    }
}

.am-timeline__dot--yellow {
    border-color: var(--jaune, #feca57);
}

.am-timeline__dot--red {
    border-color: #ff6b6b;
}

/* ================================
   CARD (style cartoon)
   ================================ */
.am-timeline__card {
    background: white;
    border: 3px solid var(--anthracite, #2f3542);
    box-shadow: 5px 5px 0px var(--anthracite, #2f3542);
    border-radius: 1.25rem;
    padding: 1rem 1.15rem;
    margin-left: 0.25rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@media (min-width: 768px) {
    .am-timeline__card {
        border-width: 4px;
        box-shadow: 8px 8px 0px var(--anthracite, #2f3542);
        border-radius: 2rem;
        padding: 1.5rem;
        margin-left: 0.5rem;
    }
}

.am-timeline__card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 7px 7px 0px var(--anthracite, #2f3542);
}

@media (min-width: 768px) {
    .am-timeline__card:hover {
        box-shadow: 10px 10px 0px var(--anthracite, #2f3542);
    }
}

/* ================================
   CARD TITLE
   ================================ */
.am-timeline__card-title {
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    margin: 0 0 0.35rem 0;
    line-height: 1.3;
}

@media (min-width: 768px) {
    .am-timeline__card-title {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }
}

.am-timeline__card-title--blue {
    color: var(--bleu, #4facfe);
}

.am-timeline__card-title--yellow {
    color: var(--jaune, #d4a017);
}

.am-timeline__card-title--red {
    color: #ff6b6b;
}

/* ================================
   CARD HEADER (titre + badge date)
   ================================ */
.am-timeline__card-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.35rem;
}

@media (min-width: 768px) {
    .am-timeline__card-header {
        gap: 0.75rem;
        margin-bottom: 0.5rem;
    }
}

/* ================================
   META (subtitle + tag apprentissage)
   ================================ */
.am-timeline__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

/* ================================
   SUBTITLE (entreprise / ecole)
   ================================ */
.am-timeline__subtitle {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--anthracite, #334155);
    margin: 0;
}

@media (min-width: 768px) {
    .am-timeline__subtitle {
        font-size: 0.875rem;
    }
}

/* ================================
   BADGE (dates)
   ================================ */
.am-timeline__badge {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.2rem 0.5rem;
    margin: 0 0 0.35rem auto;
    border-radius: 0.25rem;
    white-space: nowrap;
}

.am-timeline__badge--blue {
    background-color: #dbeafe;
    color: #2563eb;
}

.am-timeline__badge--yellow {
    background-color: #fef9c3;
    color: #a16207;
}

.am-timeline__badge--red {
    background-color: #fee2e2;
    color: #dc2626;
}

/* ================================
   TAG APPRENTISSAGE
   ================================ */
.am-timeline__tag-apprentissage {
    display: inline-block;
    font-family: 'Fredoka', sans-serif;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.2rem 0.55rem;
    border-radius: 2rem;
    border: 2px solid var(--anthracite, #2f3542);
    background-color: var(--jaune, #feca57);
    color: var(--anthracite, #2f3542);
    white-space: nowrap;
}

/* ================================
   DESCRIPTION
   ================================ */
.am-timeline__description {
    font-size: 0.875rem;
    opacity: 0.7;
    line-height: 1.6;
    margin: 0;
}

.am-timeline__description p {
    margin: 0;
}
