/* =====================================================================
   EASY SCHOOL — En-tête & pied de page des connexions Parents / Professeurs
   (app/views/auth/_portal_nav.php, _portal_foot.php). Chargé après
   parents.css / teachers.css ; thème par espace via les variables --pc-*.
   ===================================================================== */
.pp-auth-body { --pc-navy: #0b2463; --pc-ink: #12204a; --pc-blue: #1565e0; --pc-gold: #f2b11e; --pc-soft: #e9f1fe; }
.tl-body      { --pc-navy: #0b1f5c; --pc-ink: #141b4d; --pc-blue: #1677ff; --pc-gold: #f2b01e; --pc-soft: #eaf2ff; }

/* ---------------------------------------------------------- En-tête */
.pc-header {
    background: rgba(255, 255, 255, .9);
    -webkit-backdrop-filter: blur(14px) saturate(1.5); backdrop-filter: blur(14px) saturate(1.5);
    box-shadow: 0 1px 0 rgba(11, 36, 99, .05), 0 10px 30px -18px rgba(11, 36, 99, .28);
}
.pc-header::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; pointer-events: none;
    background: linear-gradient(90deg, transparent 0%, var(--pc-blue) 22%, var(--pc-blue) 58%, var(--pc-gold) 82%, transparent 100%);
    opacity: .55;
}
[dir="rtl"] .pc-header::after { background: linear-gradient(270deg, transparent 0%, var(--pc-blue) 22%, var(--pc-blue) 58%, var(--pc-gold) 82%, transparent 100%); }
.pc-header .pl-logo, .pc-header .tb-brand { transition: transform .45s cubic-bezier(.22, .8, .3, 1); }
.pc-header .pl-logo:hover, .pc-header .tb-brand:hover { transform: translateY(-2px); }

.pc-nav { display: flex; align-items: center; gap: clamp(12px, 1.6vw, 22px); }

/* Liens : pastille « encre » qui glisse vers le lien survolé (portal-chrome.js) */
.pc-links { position: relative; display: flex; align-items: center; gap: 4px; }
.pc-link {
    position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 9px;
    height: 46px; padding: 0 18px; border-radius: 12px; white-space: nowrap;
    color: var(--pc-ink); text-decoration: none; font-size: 16px; font-weight: 600; letter-spacing: -.005em;
    transition: color .3s, background .3s;
}
.pc-link i { font-size: 19px; color: var(--pc-navy); transition: transform .4s cubic-bezier(.34, 1.56, .64, 1), color .3s; }
.pc-link:hover { color: var(--pc-blue); }
.pc-link:hover i { color: var(--pc-blue); transform: translateY(-2px); }
.pc-link.on { color: var(--pc-navy); font-weight: 700; background: var(--pc-soft); }   /* sans JS */
.pc-links.has-ink .pc-link.on { background: transparent; }
.pc-link:focus-visible { outline: 3px solid rgba(21, 101, 224, .4); outline-offset: 1px; }
.pc-ink {
    position: absolute; z-index: 0; top: 0; left: 0; height: 46px; width: var(--w, 0); border-radius: 12px; opacity: 0;
    background: var(--pc-soft); box-shadow: inset 0 0 0 1px rgba(21, 101, 224, .1);
    transform: translateX(var(--x, 0));
    transition: transform .5s cubic-bezier(.34, 1.3, .5, 1), width .5s cubic-bezier(.34, 1.3, .5, 1), opacity .3s;
}
.pc-ink::after {
    content: ''; position: absolute; left: 32%; right: 32%; bottom: 5px; height: 3px; border-radius: 3px;
    background: linear-gradient(90deg, var(--pc-blue), var(--pc-gold));
}
.pc-links.has-ink .pc-ink { opacity: 1; }

.pc-vsep { width: 1px; height: 34px; background: linear-gradient(180deg, transparent, #cdd6e5 25%, #cdd6e5 75%, transparent); }

/* Sélecteur de langue segmenté à curseur glissant (--n options, --i active) */
.pc-seg {
    --dir: 1; --pad: 4px;
    position: relative; isolation: isolate; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    padding: var(--pad); border-radius: 14px;
    background: linear-gradient(180deg, #f2f5fa 0%, #ecf0f7 100%);
    border: 1px solid #e0e6f0; box-shadow: inset 0 1px 2px rgba(11, 36, 99, .06), 0 1px 0 #fff;
}
[dir="rtl"] .pc-seg { --dir: -1; }
.pc-seg::before {
    content: ''; position: absolute; z-index: -1; top: var(--pad); bottom: var(--pad); inset-inline-start: var(--pad);
    width: calc((100% - var(--pad) * 2) / var(--n, 3)); border-radius: 10px; background: #fff;
    box-shadow: 0 0 0 1px rgba(21, 101, 224, .16), 0 1px 2px rgba(11, 36, 99, .08), 0 6px 14px -6px rgba(11, 36, 99, .3);
    transform: translateX(calc(var(--i, 0) * 100% * var(--dir)));
    transition: transform .5s cubic-bezier(.34, 1.36, .5, 1);
}
.pc-seg a {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    min-height: 38px; padding: 0 14px; border-radius: 10px; white-space: nowrap;
    color: #5b6780; text-decoration: none; font-size: 13.5px; font-weight: 700; letter-spacing: .03em;
    transition: color .3s;
}
.pc-seg a:hover, .pc-seg a.on { color: var(--pc-navy); }
.pc-seg a:focus-visible { outline: 3px solid rgba(21, 101, 224, .4); outline-offset: -2px; }
.pc-flag {
    width: 21px; height: 15px; border-radius: 3px; object-fit: cover; flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .1), 0 1px 2px rgba(0, 0, 0, .12);
    filter: saturate(.55); opacity: .82; transition: filter .3s, opacity .3s, transform .3s;
}
.pc-seg a:hover .pc-flag, .pc-seg a.on .pc-flag { filter: none; opacity: 1; }
.pc-seg a:hover .pc-flag { transform: scale(1.08); }

/* ---------------------------------------------------------- Pied de page */
.pc-foot {
    display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 14px 20px;
    color: rgba(255, 255, 255, .82);
}
.pc-foot-brand { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pc-foot-copy { font-size: 14px; line-height: 1.4; }
.pc-foot-copy b { color: #fff; font-weight: 700; letter-spacing: .01em; }
.pc-foot-rights { color: rgba(255, 255, 255, .62); }
.pc-foot-tag {
    display: inline-flex; align-items: center; gap: 8px; font-style: italic; font-size: 13px; letter-spacing: .02em; color: #f7cd6a;
}
.pc-foot-tag::before { content: ''; width: 18px; height: 2px; border-radius: 2px; background: var(--pc-gold); }

.pc-foot-links {
    display: flex; align-items: center; gap: 4px; padding: 5px; border-radius: 14px;
    background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset;
}
.pc-foot-links a {
    position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 10px;
    color: #fff; text-decoration: none; font-size: 14px; font-weight: 500; white-space: nowrap;
    transition: background .25s, color .25s;
}
.pc-foot-links a + a::before {
    content: ''; position: absolute; inset-inline-start: -3.5px; top: 50%; width: 3px; height: 3px; margin-top: -1.5px;
    border-radius: 50%; background: rgba(255, 255, 255, .3);
}
.pc-foot-links a i { font-size: 15px; color: rgba(255, 255, 255, .6); transition: color .25s, transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.pc-foot-links a:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.pc-foot-links a:hover i { color: var(--pc-gold); transform: translateY(-1px) scale(1.08); }
.pc-foot-links a:focus-visible, .pc-secure:focus-visible { outline: 3px solid rgba(242, 177, 30, .7); outline-offset: 2px; }

.pc-secure {
    justify-self: end; display: inline-flex; align-items: center; gap: 9px; padding: 5px 14px 5px 5px; border-radius: 12px;
    background: rgba(34, 197, 94, .1); border: 1px solid rgba(74, 222, 128, .28);
    color: #c6f6d5; font-size: 13.5px; font-weight: 700; letter-spacing: .01em; text-decoration: none; white-space: nowrap;
    transition: background .25s, border-color .25s, transform .25s, box-shadow .25s;
}
[dir="rtl"] .pc-secure { padding: 5px 5px 5px 14px; }
.pc-secure:hover { color: #dcfce7; background: rgba(34, 197, 94, .16); border-color: rgba(74, 222, 128, .5); transform: translateY(-1px); box-shadow: 0 10px 22px -12px rgba(34, 197, 94, .7); }
.pc-secure-ic {
    width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; flex: none;
    background: linear-gradient(135deg, #22c55e 0%, #0a853d 100%); color: #fff; font-size: 14px;
    box-shadow: 0 4px 12px -4px rgba(34, 197, 94, .8), 0 1px 0 rgba(255, 255, 255, .3) inset;
}

/* ---------------------------------------------------------- Responsive */
@media (max-width: 1199.98px) {
    .pc-link { padding: 0 14px; font-size: 15px; }
    .pc-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 16px; }
    .pc-foot-brand { flex: 1 0 100%; align-items: center; text-align: center; }
}
@media (max-width: 991.98px) {
    .pc-link { height: 42px; padding: 0 12px; }
    .pc-ink { height: 42px; }
    .pc-link span { display: none; }
    .pc-link i { font-size: 20px; }
}
@media (max-width: 575.98px) {
    .pc-nav { width: 100%; justify-content: center; gap: 10px; }
    .pc-seg a { min-height: 34px; padding: 0 9px; font-size: 12.5px; gap: 5px; }
    .pc-vsep { height: 26px; }
    .pc-foot-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; max-width: 420px; }
    .pc-foot-links a { flex-direction: column; justify-content: center; gap: 5px; padding: 9px 4px; font-size: 12px; line-height: 1.25; white-space: normal; text-align: center; }
    .pc-foot-links a i { font-size: 18px; }
    .pc-foot-links a + a::before { top: 22%; bottom: 22%; width: 1px; height: auto; margin-top: 0; border-radius: 0; background: rgba(255, 255, 255, .14); }
}

@media (prefers-reduced-motion: reduce) {
    .pc-ink, .pc-seg::before, .pc-link i, .pc-foot-links a i, .pc-secure, .pc-header .pl-logo, .pc-header .tb-brand { transition: none; }
}
