/* =====================================================================
   EASY SCHOOL — Connexion de l'Application Professeur
   Scène en couches avec perspective (cartes flottantes, parallaxe au
   pointeur), carte de connexion « verre », en-tête et pied de page.
   Respecte prefers-reduced-motion. Mobile d'abord.
   ===================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
.tl-body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif; -webkit-font-smoothing: antialiased; color: #e8ecff;
    background: #070d29; min-height: 100vh; overflow-x: hidden;
}
.tl-body a { color: inherit; text-decoration: none; }
.tl :focus-visible { outline: 3px solid #ffd57a; outline-offset: 2px; border-radius: 8px; }
[lang="ar"] { font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif; }

.tl {
    --a: #5b7cff; --a2: #8fa6ff; --gold: #e0b252; --ar: #10916b;
    position: relative; min-height: 100vh; display: flex; flex-direction: column; isolation: isolate;
    background:
        radial-gradient(1100px 700px at 85% -10%, rgba(91, 124, 255, .35), transparent 60%),
        radial-gradient(900px 600px at -10% 110%, rgba(16, 145, 107, .28), transparent 60%),
        linear-gradient(160deg, #070d29 0%, #0d1850 50%, #0a1233 100%);
}

/* ---------------------------------------------------------------- en-tête */
.tl-head { position: relative; z-index: 5; display: flex; align-items: center; gap: 1rem; padding: 1rem 1rem; max-width: 1320px; width: 100%; margin: 0 auto; }
.tl-brand { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.tl-logo { width: 46px; height: 46px; border-radius: 14px; background: #fff; display: grid; place-items: center; overflow: hidden; flex-shrink: 0; box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .6); }
.tl-logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.tl-brand-t { min-width: 0; line-height: 1.15; }
.tl-brand-t b { display: block; font-size: .95rem; font-weight: 800; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 52vw; }
.tl-brand-t small { color: #a9b8ff; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.tl-head-nav { margin-inline-start: auto; display: flex; align-items: center; gap: .35rem; }
.tl-head-nav a { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .7rem; border-radius: 11px; font-size: .8rem; font-weight: 700; color: #cdd6ff; border: 1px solid transparent; transition: background .2s, border-color .2s; }
.tl-head-nav a:hover { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .12); color: #fff; }
.tl-head-nav a span { display: none; }
.tl-head-nav a i { font-size: 1.05rem; }
.tl-head-nav .tl-lang { padding: .4rem .5rem; font-size: .72rem; letter-spacing: .05em; }
.tl-head-nav .tl-lang.on { background: rgba(255, 255, 255, .12); color: #fff; }
@media (min-width: 768px) { .tl-head { padding: 1.2rem 2rem; } .tl-head-nav a span { display: inline; } }

/* ------------------------------------------------------------- scène 3D */
.tl-scene { position: absolute; inset: 0; z-index: -1; overflow: hidden; perspective: 1400px; pointer-events: none; }
.tl-blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; will-change: transform; }
.tl-blob.b1 { width: 520px; height: 520px; background: #3c5bff; top: -160px; right: -120px; animation: tlDrift 18s ease-in-out infinite alternate; }
.tl-blob.b2 { width: 420px; height: 420px; background: #0f9d6b; bottom: -160px; left: -120px; opacity: .35; animation: tlDrift 22s ease-in-out infinite alternate-reverse; }
.tl-blob.b3 { width: 300px; height: 300px; background: #e0b252; top: 40%; left: 45%; opacity: .16; animation: tlDrift 26s ease-in-out infinite alternate; }
.tl-grid { position: absolute; inset: -20%; background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px); background-size: 46px 46px; transform: rotateX(62deg) translateY(28%); transform-origin: center bottom; mask-image: radial-gradient(closest-side, #000, transparent); -webkit-mask-image: radial-gradient(closest-side, #000, transparent); }
.tl-stage { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(var(--tl-rx, 8deg)) rotateY(var(--tl-ry, -12deg)); transition: transform .6s cubic-bezier(.2, .8, .2, 1); display: none; }
@keyframes tlDrift { to { transform: translate3d(40px, 30px, 0) scale(1.08); } }

.tl-orbit { position: absolute; left: 22%; top: 50%; width: 460px; height: 460px; margin: -230px 0 0 -230px; transform-style: preserve-3d; }
.tl-orbit span { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(143, 166, 255, .22); transform: rotateX(70deg); animation: tlSpin 30s linear infinite; }
.tl-orbit span:nth-child(2) { inset: 50px; border-color: rgba(224, 178, 82, .25); animation-duration: 22s; animation-direction: reverse; }
.tl-orbit span:nth-child(3) { inset: 110px; border-color: rgba(16, 145, 107, .3); animation-duration: 16s; }
.tl-orbit span::after { content: ""; position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; border-radius: 50%; background: #ffd57a; box-shadow: 0 0 18px #ffd57a; }
@keyframes tlSpin { to { transform: rotateX(70deg) rotateZ(360deg); } }

.tl-card3d {
    position: absolute; border-radius: 18px; padding: .8rem .9rem; color: #fff;
    background: linear-gradient(150deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .05));
    border: 1px solid rgba(255, 255, 255, .18); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .2);
    will-change: transform; animation: tlFloat 7s ease-in-out infinite;
}
@keyframes tlFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -14px; } }
.tl-card3d .h { display: flex; align-items: center; gap: .45rem; font-size: .8rem; margin-bottom: .55rem; }
.tl-card3d .h i { color: #ffd57a; }
.tl-card3d .h em { margin-inline-start: auto; font-style: normal; font-size: .7rem; color: #a9f0cf; font-weight: 800; }
.c-sheet { left: 6%; top: 24%; width: 270px; transform: translateZ(60px) rotateY(10deg); }
.c-sheet .r { display: flex; align-items: center; gap: .5rem; padding: .35rem .1rem; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .78rem; }
.c-sheet .av { width: 24px; height: 24px; border-radius: 8px; background: rgba(143, 166, 255, .3); display: grid; place-items: center; font-weight: 800; font-size: .7rem; }
.c-sheet .n { flex: 1; color: #dfe5ff; }
.c-sheet .v { font-weight: 800; padding: .1rem .45rem; border-radius: 7px; font-size: .76rem; }
.c-sheet .v.ok { background: rgba(52, 211, 153, .22); color: #a9f0cf; }
.c-sheet .v.warn { background: rgba(251, 191, 36, .22); color: #ffe39a; }
.c-sheet .v.top { background: rgba(255, 213, 122, .3); color: #fff2c9; }
.c-chart { left: 30%; top: 14%; width: 200px; transform: translateZ(140px) rotateY(-6deg); animation-delay: -2s; }
.c-chart .bars { display: flex; align-items: flex-end; gap: 6px; height: 74px; }
.c-chart .bars i { flex: 1; height: var(--h); border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, #8fa6ff, #3c5bff); animation: tlGrow 1.4s cubic-bezier(.2, .8, .2, 1) both; }
.c-chart .bars i:last-child { background: linear-gradient(180deg, #ffe3a3, #e0b252); }
@keyframes tlGrow { from { height: 4%; } }
.c-ring { left: 31%; top: 58%; width: 150px; text-align: center; transform: translateZ(100px) rotateY(-14deg); animation-delay: -4s; }
.c-ring .ring { width: 84px; height: 84px; margin: 0 auto .45rem; border-radius: 50%; display: grid; place-items: center; position: relative; background: conic-gradient(#34d399 0 92%, rgba(255, 255, 255, .14) 0); }
.c-ring .ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: #13205f; }
.c-ring .ring span { position: relative; font-weight: 800; font-size: 1.15rem; }
.c-ring .ring small { font-size: .65rem; }
.c-ring b { font-size: .76rem; color: #dfe5ff; }
.c-ar { left: 4%; top: 66%; width: 210px; text-align: right; transform: translateZ(180px) rotateY(12deg); animation-delay: -1s;
    background: linear-gradient(150deg, rgba(16, 145, 107, .5), rgba(6, 53, 42, .45)); border-color: rgba(236, 213, 156, .35); }
.c-ar b { display: block; font-size: 1.25rem; color: #ecd59c; }
.c-ar small { color: #d5f3e7; font-size: .8rem; }
.c-cal { left: 16%; top: 8%; display: flex; align-items: center; gap: .6rem; transform: translateZ(40px); animation-delay: -3s; }
.c-cal i { font-size: 1.4rem; color: #8fa6ff; }
.c-cal b { display: block; font-size: 1rem; }
.c-cal small { font-size: .7rem; color: #c8d2ff; }
.tl-glyph { position: absolute; font-weight: 800; color: rgba(255, 255, 255, .1); will-change: transform; }
.tl-glyph.g1 { left: 40%; top: 36%; font-size: 7rem; font-family: 'Cairo', sans-serif; color: rgba(236, 213, 156, .14); }
.tl-glyph.g2 { left: 2%; top: 46%; font-size: 3.4rem; }
.tl-glyph.g3 { left: 25%; top: 82%; font-size: 3rem; }

/* ------------------------------------------------------------- contenu */
.tl-main { position: relative; z-index: 2; flex: 1; width: 100%; max-width: 1320px; margin: 0 auto; padding: .5rem 1rem 1.5rem; display: grid; gap: 1.5rem; align-items: center; grid-template-columns: minmax(0, 1fr); }
.tl-pitch { text-align: center; }
.tl-eyebrow { display: inline-flex; align-items: center; gap: .45rem; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #ffe3a3; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); padding: .35rem .75rem; border-radius: 999px; }
.tl-pitch h1 { font-size: clamp(1.7rem, 6vw, 3.4rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.07; margin: .9rem 0 .6rem; color: #fff; }
.tl-pitch h1 span { background: linear-gradient(90deg, #ffe3a3, #e0b252 40%, #8fa6ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tl-pitch p { color: #c3cdf5; font-size: .95rem; max-width: 540px; margin: 0 auto; line-height: 1.55; }
.tl-its { list-style: none; padding: 0; margin: 1.2rem auto 0; display: none; gap: .7rem; max-width: 520px; }
.tl-its li { display: flex; align-items: center; gap: .75rem; padding: .75rem .9rem; border-radius: 16px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); text-align: start; backdrop-filter: blur(8px); }
.tl-its li > i { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.1rem; background: rgba(91, 124, 255, .3); color: #fff; flex-shrink: 0; }
.tl-its li.ar > i { background: linear-gradient(145deg, #ecd59c, #c9a35a); color: #06352a; }
.tl-its b { display: block; font-size: .88rem; color: #fff; }
.tl-its b em { font-style: normal; color: #ecd59c; margin-inline-start: .3rem; }
.tl-its small { color: #b7c3ef; font-size: .76rem; }

/* carte de connexion */
.tl-card {
    position: relative; width: 100%; max-width: 440px; margin: 0 auto; padding: 1.5rem 1.25rem 1.2rem; border-radius: 26px; color: #0f1a3d;
    background: rgba(255, 255, 255, .96); box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .75), 0 0 0 1px rgba(255, 255, 255, .5) inset;
    animation: tlIn .8s cubic-bezier(.2, .8, .2, 1) both;
}
@supports (backdrop-filter: blur(1px)) { .tl-card { background: rgba(255, 255, 255, .9); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); } }
.tl-card::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: linear-gradient(140deg, rgba(224, 178, 82, .9), rgba(91, 124, 255, .6), rgba(16, 145, 107, .7)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
@keyframes tlIn { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; transform: none; } }
.tl-card-logo { width: 64px; height: 64px; border-radius: 20px; margin: -3rem auto .7rem; background: #fff; display: grid; place-items: center; box-shadow: 0 14px 30px -10px rgba(20, 34, 102, .45); overflow: hidden; }
.tl-card-logo img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.tl-card h2 { text-align: center; font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.tl-sub { text-align: center; color: #6b7699; font-size: .86rem; margin: .3rem 0 1.1rem; }
.tl-flash { display: grid; gap: .45rem; margin-bottom: .9rem; }
.tl-alert { display: flex; gap: .55rem; align-items: flex-start; padding: .65rem .8rem; border-radius: 12px; font-size: .82rem; font-weight: 600; }
.tl-alert.danger { background: #fdecee; color: #a61b2b; } .tl-alert.success { background: #e6f7f0; color: #0b6b4a; }
.tl-alert.warning { background: #fff4dc; color: #7a4f00; } .tl-alert.info { background: #eef1ff; color: #24358f; }
.tl-field { margin-bottom: .85rem; }
.tl-field label { display: block; font-size: .74rem; font-weight: 800; color: #34406a; margin-bottom: .35rem; letter-spacing: .01em; }
.tl-input { position: relative; display: flex; align-items: center; }
.tl-input > i { position: absolute; inset-inline-start: .95rem; color: #8a94b8; font-size: 1.05rem; pointer-events: none; transition: color .2s; }
.tl-input input, .tl-input select {
    width: 100%; height: 52px; border-radius: 15px; border: 1.5px solid #e0e4f2; background: #f7f8fd; padding: 0 1rem 0 2.75rem;
    font: inherit; font-size: .95rem; color: #0f1a3d; transition: border-color .2s, box-shadow .2s, background .2s; appearance: none;
}
[dir="rtl"] .tl-input input, [dir="rtl"] .tl-input select { padding: 0 2.75rem 0 1rem; }
.tl-input input:focus, .tl-input select:focus { outline: none; border-color: #5b7cff; background: #fff; box-shadow: 0 0 0 4px rgba(91, 124, 255, .16); }
.tl-input:focus-within > i { color: #2f49d1; }
.tl-field.bad .tl-input input, .tl-field.bad .tl-input select { border-color: #dc3b4b; background: #fff7f8; }
.tl-eye { position: absolute; inset-inline-end: .45rem; width: 40px; height: 40px; border: 0; border-radius: 11px; background: transparent; color: #6b7699; cursor: pointer; font-size: 1.05rem; }
.tl-eye:hover { background: #eef1ff; color: #2f49d1; }
.tl-err { color: #c42a3b; font-size: .76rem; font-weight: 700; margin: .35rem 0 0; }
.tl-caps[hidden] { display: none; }
.tl-caps { color: #a86a00; font-size: .74rem; font-weight: 700; margin: .35rem 0 0; display: flex; gap: .3rem; align-items: center; }
.tl-row { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; margin: .2rem 0 1rem; font-size: .82rem; }
.tl-row a { color: #2f49d1; font-weight: 700; }
.tl-check { display: inline-flex; align-items: center; gap: .45rem; cursor: pointer; color: #34406a; font-weight: 600; }
.tl-check input { width: 18px; height: 18px; accent-color: #2f49d1; }
.tl-submit {
    position: relative; width: 100%; height: 54px; border: 0; border-radius: 16px; cursor: pointer; overflow: hidden;
    display: inline-flex; align-items: center; justify-content: center; gap: .55rem; font: inherit; font-weight: 800; font-size: .98rem; color: #fff;
    background: linear-gradient(135deg, #2f49d1, #5b7cff 60%, #7c8dff); box-shadow: 0 16px 30px -12px rgba(47, 73, 209, .8);
    transition: transform .2s, box-shadow .2s;
}
.tl-submit::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent); transform: skewX(-20deg); animation: tlShine 4.5s ease-in-out infinite; }
@keyframes tlShine { 0%, 70% { left: -60%; } 100% { left: 130%; } }
.tl-submit:hover { transform: translateY(-1px); box-shadow: 0 20px 36px -12px rgba(47, 73, 209, .9); }
.tl-submit:active { transform: scale(.99); }
.tl-submit[disabled] { opacity: .85; cursor: progress; }
.tl-submit .spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .4); border-top-color: #fff; animation: tlRot .8s linear infinite; }
@keyframes tlRot { to { transform: rotate(360deg); } }
.tl-alt { display: flex; align-items: center; justify-content: center; gap: .45rem; margin-top: .7rem; height: 46px; border-radius: 14px; border: 1.5px solid #e0e4f2; color: #34406a !important; font-weight: 700; font-size: .86rem; transition: background .2s; }
.tl-alt:hover { background: #f4f6fb; }
.tl-secure { display: flex; align-items: center; justify-content: center; gap: .4rem; margin-top: 1rem; font-size: .72rem; color: #6b7699; font-weight: 600; text-align: center; }
.tl-secure i { color: #0f9d6b; }

/* pied de page */
.tl-foot { position: relative; z-index: 2; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .4rem .7rem; padding: 1rem; font-size: .76rem; color: #93a1d6; }
.tl-foot a { display: inline-flex; align-items: center; gap: .3rem; color: #c3cdf5; }
.tl-foot a:hover { color: #fff; }
.tl-foot .sep { opacity: .4; }

@media (min-width: 992px) {
    .tl-main { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); padding: 1rem 2rem 2rem; gap: 2rem; align-items: start; }
    .tl-pitch { text-align: start; padding-top: 1rem; }
    .tl-pitch p { margin: 0; }
    .tl-its { display: grid; grid-template-columns: 1fr 1fr; margin-inline-start: 0; max-width: 620px; }
    .tl-card { margin-inline-end: 0; margin-top: 2.2rem; padding: 2rem 1.9rem 1.5rem; }
    /* la scène 3D occupe le bas de la colonne gauche, sous le texte */
    .tl-stage { display: block; left: 0; width: 56%; top: 56%; bottom: 0; }
    .c-cal { left: 27%; top: -2%; }
    .c-sheet { left: 8%; top: 16%; }
    .c-chart { left: 46%; top: 4%; }
    .c-ring { left: 50%; top: 42%; }
    .c-ar { left: 72%; top: 20%; }
    .tl-orbit { left: 40%; top: 40%; }
    .tl-glyph.g1 { left: 62%; top: 2%; }
    .tl-glyph.g2 { left: 0; top: 62%; }
    .tl-glyph.g3 { left: 38%; top: 74%; }
}
@media (min-width: 992px) and (max-height: 720px) { .c-sheet .r:nth-child(n+4) { display: none; } .tl-stage { top: 60%; } }
@media (min-width: 1400px) { .tl-stage { width: 58%; } }

/* ---------------------------------------------------- mouvement réduit */
@media (prefers-reduced-motion: reduce) {
    .tl *, .tl *::before, .tl *::after { animation: none !important; transition: none !important; }
    .tl-stage { transform: rotateX(6deg) rotateY(-10deg) !important; }
}

/* petits écrans : en-tête compact */
@media (max-width: 520px) {
    .tl-head { gap: .5rem; }
    .tl-brand-t small { display: none; }
    .tl-brand-t b { max-width: 46vw; }
    .tl-head-nav .tl-lang:not(.on) { display: none; }
    .tl-head-nav a { padding: .45rem .5rem; }
}

/* ---------------------------------------- diaporama plein écran (arrière-plan) */
.tl-bg { position: fixed; inset: 0; z-index: -2; overflow: hidden; background: #070d29; }
.tl-slide { position: absolute; inset: -2%; background-size: cover; background-position: center; opacity: 0; transform: scale(1.02); transition: opacity 1.6s ease-in-out; will-change: opacity, transform; }
.tl-slide.on { opacity: 1; animation: tlKen 8s ease-out both; }
.tl-slide.out { opacity: 0; transform: scale(1.12); }
@keyframes tlKen { from { transform: scale(1.02); } to { transform: scale(1.12); } }
/* voile sombre dégradé : lisibilité du texte et de la carte */
.tl-bg::after { content: ""; position: absolute; inset: 0;
    background:
        radial-gradient(900px 600px at 85% -10%, rgba(60, 91, 255, .35), transparent 60%),
        linear-gradient(110deg, rgba(5, 9, 32, .93) 0%, rgba(9, 17, 60, .82) 45%, rgba(9, 17, 60, .6) 70%, rgba(5, 9, 32, .78) 100%); }
@media (max-width: 991.98px) { .tl-bg::after { background: linear-gradient(180deg, rgba(5, 9, 32, .78), rgba(9, 17, 60, .9) 55%, rgba(5, 9, 32, .96)); } }
/* quand des photos sont présentes, le fond uni de .tl devient transparent */
.tl:has(.tl-bg) { background: transparent; }
@media (prefers-reduced-motion: reduce) { .tl-slide.on { animation: none; transform: none; } .tl-slide { transition: none; } }
