/* =============================================================================
   TEACHER PROFILE PAGE — teacher-profile.css
   Styles spécifiques à la page de profil public d'un enseignant (author.php).
   ============================================================================= */

/* ── Tokens (alignés sur la page d'accueil — main.css) ── */
:root {
    --tp-navy:        #1a2c64;
    --tp-navy-dark:   #0F1A2E;
    --tp-cream:       #edf1f8;
    --tp-warm-gray:   #edf1f8;
    --tp-paper:       #f7f9fd;
    --tp-accent:      #264d91;
    --tp-gold:        #C9A84C;
    --tp-text:        #1a2c64;
    --tp-muted:       rgba(26, 44, 100, .55);
    --tp-border:      rgba(26, 44, 100, .12);
}

.tp-profile {
    background-color: var(--tp-cream);
}

/* =============================================================================
   SECTION 1 — HERO
   ============================================================================= */

.tp-hero {
    background-color: var(--tp-cream);
    padding: 144px 0 48px;
    overflow: hidden;
}

.tp-hero__inner {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 64px;
    align-items: start;
}

/* Colonne texte */
.tp-hero__tagline {
    font-family: var(--font-sans, 'Noto Sans', sans-serif);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--tp-accent);
    margin-bottom: 12px;
}

.tp-hero__name {
    font-family: var(--font-heading, 'Goudy Bookletter 1911', serif);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 400;
    color: var(--tp-navy-dark);
    line-height: 1.1;
    margin-bottom: 12px;
}

.tp-hero__location {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: var(--tp-muted);
    margin-bottom: 20px;
}

.tp-hero__location-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--tp-accent);
}

.tp-hero__bio {
    max-width: 42rem;
    margin-bottom: 28px;
    padding: 20px 24px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--tp-border);
}

/* Texte long formaté (bio, formation, spécialité) */
.tp-prose {
    font-family: var(--font-sans, 'Noto Sans', sans-serif);
    font-size: 1rem;
    line-height: 1.85;
    color: var(--tp-text);
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.tp-prose--lead {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: rgba(26, 44, 100, .88);
}

/* =============================================================================
   SECTION 1b — PARCOURS & PRATIQUE
   ============================================================================= */

.tp-about {
    background: #fff;
    padding: 56px 0 64px;
    border-top: 1px solid var(--tp-border);
}

.tp-about__header {
    max-width: 42rem;
    margin-bottom: 36px;
}

.tp-about__label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--tp-accent);
    margin-bottom: 8px;
}

.tp-about__title {
    font-family: var(--font-heading, 'Goudy Bookletter 1911', serif);
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 400;
    color: var(--tp-navy-dark);
    line-height: 1.2;
    margin: 0;
}

.tp-about__grid {
    display: block;
}

.tp-about__grid--split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
    gap: 40px;
    align-items: start;
}

.tp-about__main {
    min-width: 0;
}

.tp-about__blocks {
    display: flex;
    flex-direction: column;
    gap: 28px;
    max-width: 48rem;
}

.tp-about__grid--split .tp-about__blocks {
    max-width: none;
}

.tp-about__locations {
    position: sticky;
    top: 120px;
    padding: 24px;
    background: var(--tp-paper);
    border: 1px solid var(--tp-border);
    border-radius: 14px;
}

.tp-about__block {
    padding: 28px 32px;
    background: var(--tp-paper);
    border: 1px solid var(--tp-border);
    border-radius: 14px;
}

.tp-about__block-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--tp-border);
}

.tp-about__block-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(38, 77, 145, .1);
    color: var(--tp-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

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

.tp-about__block-title {
    font-family: var(--font-heading, 'Goudy Bookletter 1911', serif);
    font-size: 1.35rem;
    font-weight: 400;
    color: var(--tp-navy-dark);
    margin: 0;
    line-height: 1.2;
}

/* Organisation publique */
.tp-hero__organization {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading, 'Goudy Bookletter 1911', serif);
    font-size: clamp(1.25rem, 2.5vw, 1.625rem);
    font-weight: 400;
    line-height: 1.3;
    color: var(--tp-navy-dark);
    margin-bottom: 24px;
}

.tp-hero__organization-icon {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    color: var(--tp-accent);
}

/* Liens sociaux */
.tp-hero__links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 0;
}

.tp-hero__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 100px;
    border: 1.5px solid var(--tp-border);
    background: white;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--tp-navy);
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.tp-hero__link:hover {
    border-color: var(--tp-accent);
    background: var(--tp-accent);
    color: white;
}

.tp-hero__link svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Contact public (email + téléphone) */
.tp-hero__contacts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    padding-bottom: 0;
}

.tp-hero__contact-item {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-radius: 12px;
    background: var(--tp-navy);
    color: white;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
    min-width: 200px;
}

.tp-hero__contact-item:hover {
    background: var(--tp-accent);
    transform: translateY(-1px);
}

.tp-hero__contact-item--static {
    cursor: default;
}

.tp-hero__contact-item--static:hover {
    background: var(--tp-navy);
    transform: none;
}

.tp-hero__contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

.tp-hero__contact-icon svg {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    stroke: white;
}

.tp-hero__contact-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.tp-hero__contact-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.7;
    line-height: 1;
}

.tp-hero__contact-value {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
}

/* Photo */
.tp-hero__photo-wrap {
    position: relative;
    align-self: start;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-bottom: 24px;
}

.tp-hero__photo {
    width: 100%;
    max-width: 420px;
    height: auto;
    object-fit: cover;
    border-radius: 16px 16px 0 0;
    display: block;
    box-shadow: 0 20px 60px rgba(15,26,46,.18);
}

.tp-hero__photo--placeholder {
    width: 100%;
    max-width: 420px;
    aspect-ratio: 5/6;
    background: #f3f4f6;
    border-radius: 16px 16px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tp-navy);
}

.tp-hero__photo--placeholder svg {
    width: 80px;
    height: 80px;
    opacity: .4;
}

/* =============================================================================
   SECTION 1b — TAGS (public, cours, format)
   ============================================================================= */

.tp-tags {
    background-color: var(--tp-navy);
    padding: 32px 0;
}

.tp-tags__inner {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px 28px;
}

.tp-tags__group {
    min-width: 0;
}

.tp-tags__group-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .5);
    margin: 0 0 8px;
}

.tp-tags__list {
    list-style: none;
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

.tp-tags__item {
    display: inline;
    font-size: 0.875rem;
    font-weight: 400;
    color: rgba(255, 255, 255, .92);
}

.tp-tags__item + .tp-tags__item::before {
    content: '·';
    margin: 0 0.55em;
    color: rgba(255, 255, 255, .35);
    font-weight: 700;
}

/* =============================================================================
   LIEUX DE COURS (colonne droite ou pleine largeur)
   ============================================================================= */

.tp-locations__title {
    font-family: var(--font-heading, 'Goudy Bookletter 1911', serif);
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-weight: 400;
    color: var(--tp-navy-dark);
    margin: 0 0 20px;
    line-height: 1.2;
}

.tp-locations__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tp-about__grid:not(.tp-about__grid--split) .tp-locations__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.tp-locations__item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--tp-border);
}

.tp-locations__icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: var(--tp-accent);
    margin-top: 2px;
}

.tp-locations__text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.tp-locations__label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--tp-navy-dark);
    line-height: 1.3;
}

.tp-locations__address,
.tp-locations__postal {
    display: block;
    font-size: 0.9rem;
    color: var(--tp-muted);
    line-height: 1.5;
}

/* =============================================================================
   SECTION 3 — PLANNING
   ============================================================================= */

.tp-planning {
    background: var(--tp-cream);
    padding: 80px 0;
}

/* En-tête texte centré au-dessus du calendrier */
.tp-planning__header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 48px;
}

.tp-planning__label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--tp-accent);
    margin-bottom: 12px;
}

.tp-planning__title {
    font-family: var(--font-heading, 'Goudy Bookletter 1911', serif);
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    font-weight: 400;
    color: var(--tp-navy-dark);
    line-height: 1.15;
    margin-bottom: 16px;
}

.tp-planning__text {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--tp-muted);
}

/* ── Semainier ── */

.tp-semainier {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
}

.tp-semainier__day-name {
    font-family: var(--font-heading, 'Goudy Bookletter 1911', serif);
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--tp-navy-dark);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--tp-border);
}

.tp-semainier__slots {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tp-semainier__slot {
    background: var(--tp-paper);
    border-left: 4px solid #4a7c59;
    border-radius: 0 8px 8px 0;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tp-semainier__time {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--tp-navy);
    white-space: nowrap;
    line-height: 1.4;
}

.tp-semainier__time span {
    font-weight: 400;
    margin: 0 2px;
    color: var(--tp-muted);
}

.tp-semainier__info {
    width: 100%;
}

.tp-semainier__title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--tp-navy-dark);
    margin: 0 0 4px;
    line-height: 1.3;
}

.tp-semainier__location {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    font-size: 0.78rem;
    color: var(--tp-muted);
    margin: 0 0 2px;
    line-height: 1.4;
}

.tp-semainier__location svg {
    flex-shrink: 0;
    margin-top: 1px;
    color: var(--tp-accent);
}

.tp-semainier__notes {
    font-size: 0.78rem;
    color: var(--tp-muted);
    margin: 2px 0 0;
    font-style: italic;
}

/* =============================================================================
   SECTION 4 — ACTIVITÉS
   ============================================================================= */

.tp-activities {
    background: var(--tp-cream);
    padding: 80px 0;
}

.tp-activities__header {
    margin-bottom: 48px;
}

.tp-activities__label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--tp-accent);
    margin-bottom: 8px;
}

.tp-activities__title {
    font-family: var(--font-heading, 'Goudy Bookletter 1911', serif);
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 400;
    color: var(--tp-navy-dark);
    margin-bottom: 12px;
}

.tp-activities__subtitle {
    font-size: 1rem;
    color: var(--tp-muted);
    max-width: 600px;
}

.tp-activities__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.tp-activities__more {
    margin-top: 48px;
    text-align: center;
}

/* =============================================================================
   SECTION 5 — GALERIE
   ============================================================================= */

.tp-gallery {
    background: var(--tp-cream);
    padding: 80px 0;
}

.tp-gallery__header {
    text-align: center;
    margin-bottom: 48px;
}

.tp-gallery__title {
    font-family: var(--font-heading, 'Goudy Bookletter 1911', serif);
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 400;
    color: var(--tp-navy-dark);
    margin-bottom: 12px;
}

.tp-gallery__subtitle {
    font-size: 1rem;
    color: var(--tp-muted);
}

.tp-gallery__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 280px;
    gap: 16px;
}

/* 1re image prend 2 colonnes sur 2 lignes (grand format) */
.tp-gallery__item:first-child {
    grid-column: span 2;
    grid-row: span 2;
}

/* 2e et 3e images côte à côte */
.tp-gallery__item:nth-child(2),
.tp-gallery__item:nth-child(3) {
    grid-column: span 1;
    grid-row: span 1;
}

/* 4e+ en dessous */
.tp-gallery__item {
    overflow: hidden;
    border-radius: 12px;
    margin: 0;
    background: var(--tp-paper);
}

.tp-gallery__link {
    display: block;
    width: 100%;
    height: 100%;
}

.tp-gallery__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.tp-gallery__item:hover .tp-gallery__img {
    transform: scale(1.05);
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */

@media (max-width: 1024px) {
    .tp-hero__inner {
        grid-template-columns: 1fr 340px;
        gap: 40px;
    }

    .tp-activities__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .tp-hero {
        padding: 96px 0 64px;
    }

    .tp-hero__inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .tp-hero__photo-wrap {
        order: -1;
        align-items: stretch;
    }

    .tp-hero__photo,
    .tp-hero__photo--placeholder {
        max-width: 100%;
        border-radius: 12px;
        aspect-ratio: 4/3;
        object-position: top;
    }

    .tp-about__block {
        padding: 22px 20px;
    }

    .tp-about__grid--split {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .tp-about__locations {
        position: static;
    }

    .tp-tags__inner {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .tp-planning__header {
        margin-bottom: 32px;
    }

    .tp-semainier {
        grid-template-columns: 1fr;
    }

    .tp-semainier {
        grid-template-columns: 1fr;
    }

    .tp-activities__grid {
        grid-template-columns: 1fr;
    }

    .tp-gallery__grid {
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: 200px;
    }

    .tp-gallery__item:first-child {
        grid-column: span 2;
        grid-row: span 1;
    }
}

@media (max-width: 480px) {
    .tp-gallery__grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 240px;
    }

    .tp-gallery__item:first-child {
        grid-column: span 1;
    }
}
