/* === Fonts === */
@font-face {
    font-family: 'Gulax';
    src: url('../fonts/Gulax-Regular.woff2') format('woff2'), /* новый формат и загружается быстрее */
        url('../fonts/Gulax-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Open Sans Custom';
    src: url('../fonts/Exo2-VariableFont_wght.ttf') format('truetype'); /* ttf - старый формат шрифта, как запасной вариант если wolff2 не запустится */
    font-weight: normal;
    font-style: normal;
}

/* === All styles === */
body {
    font-family: 'Open Sans Custom', 'Segoe UI', Arial, sans-serif;
    background-image: url('../img/background.png');
    backdrop-filter: blur(15px); /* Размывает фон, чтобы получился градиент */ 
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    background-color: #000000;
    color: #E0E0E0;
    margin: 0;
    padding: 0;
    padding-bottom: 60px;
    line-height: 1.6;
    cursor: url('../img/cursor-main.png'), auto; /* cursor-main */
}

a, a.button, button, .btn, .btn:hover, .btn-primary, .btn-primary:hover, .profile-picture, .profile-picture:hover {
    cursor: url('../img/cursor-pointer.png'), auto; /* cursor-pointer */
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* === ШАПКА (HEADER) === */
.header-main {
    background-color: rgba(30, 30, 30, 0.3);
    backdrop-filter: blur(12px); /* Для Chrome, потому что он и так понимает эту команду */
    -webkit-backdrop-filter: blur(12px); /* Для Safari (iOS, macOS) я использовал именно вебкит  */
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); 
    color: #FFFFFF;
    padding: 25px 20px;
    text-align: center;
    font-size: 26px;
    margin-bottom: 35px;
    border-bottom: 3px solid #b4b4b4;
    animation: fadeInDown 1s ease-out;
}

/* H titres */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Gulax', sans-serif;
    color: #FFFFFF;
    margin-top: 25px;
    margin-bottom: 15px;
}

h1 {
    font-size: 2.8rem;
}

h2 {
    font-size: 2.2rem;
}

h3 {
    font-size: 1.8rem;
}

/* === Сетка для всех проектов === */
.sae-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* это прием для адаптивности без медиа запросов, то есть колонка должна быть минимум 280px, но если места больше она растянется - 1fr */
    gap: 25px; /* и auto-fit выше говорит браузеру поместить столько колонок в строку, сколько влезет. То есть на больших экранах будет 3-4 колонки, а на телефоне они сами перестроятся в одну */
}

/* === Card for SAE === */
.sae-card {
    background-color: rgba(30, 30, 30, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out, background-color 0.2s ease-in-out;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Animations l'escalier  */
.sae-card:nth-child(1) {
    animation-delay: 0.1s;
}

.sae-card:nth-child(2) {
    animation-delay: 0.2s;
}

.sae-card:nth-child(3) {
    animation-delay: 0.3s;
}

.sae-card:nth-child(4) {
    animation-delay: 0.4s;
}

.sae-card:nth-child(5) {
    animation-delay: 0.5s;
}

.sae-card:nth-child(6) {
    animation-delay: 0.6s;
}

.sae-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    background-color: rgba(0, 0, 0, 0.557);
}

.sae-card h2 {
    font-size: 1.6rem;
    color: #FFFFFF;
    margin-top: 0;
    margin-bottom: 10px;
}

.sae-card p {
    font-family: 'Open Sans Custom', sans-serif;
}

.sae-card .preview-image {
    width: 100%;
    height: 180px;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #AAAAAA;
    border-radius: 6px;
}

.sae-card .preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

/* === КНОПКИ (Красные, как ты хотел) === */
.btn,
.btn-primary {
    display: inline-block;
    background-color: #8C1805;
    color: #f9f9f9;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    margin-top: 15px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    letter-spacing: 0.5px;
    font-family: 'Open Sans Custom', sans-serif;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn:hover,
.btn-primary:hover {
    background-color: #9d1000;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Увеличенная кнопка для главной */
.btn-primary {
    font-size: 1.3rem;
    padding: 18px 40px;
    opacity: 0;
    animation: scaleIn 1s ease-out 0.6s forwards;
}

/* === PAGE SAE === */
.sae-detail-content {
    background-color: rgba(30, 30, 30, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 30px;
    min-height: 400px;

    opacity: 0;
    animation: fadeInUp 1s ease-out 0.3s forwards;
}

.sae-detail-content h2,
.sae-detail-content h3 {
    color: #FFFFFF;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
}

.sae-detail-content strong {
    color: #FFFFFF;
}

.sae-detail-content em {
    color: #CCCCCC;
    font-style: italic;
    display: block;
    margin-top: 5px;
}

.sae-detail-content ul {
    padding-left: 25px;
}

.sae-detail-content li {
    margin-bottom: 12px;
}

/* === PAGE D'ACCUEIL === */
.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: rgba(30, 30, 30, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 70px 40px;
    margin-top: 60px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    animation: fadeInDown 1s ease-out;

}

.hero-title {
    font-size: 4rem;
    margin: 0 0 20px 0;
    animation: fadeInDown 1.2s ease-out;
}

.hero-subtitle {
    font-size: 1.4rem;
    max-width: 750px;
    margin: 25px 0 50px 0;
    animation: fadeInUp 1.2s ease-out 0.3s forwards;
    opacity: 0;
}

/* === ФОТО ПРОФИЛЯ + ЭФФЕКТ === */
.profile-picture {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    border: 6px solid #E0E0E0;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
    margin-bottom: 40px;
}

.profile-picture:hover {
    transform: scale(1.03);
}

.profile-picture a {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
}

.profile-picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Текст подсказки */
.overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #FFFFFF;
    font-weight: bold;
    font-size: 1.1rem;
    text-align: center;
    width: 100%;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    pointer-events: none;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.profile-picture a:hover img {
    filter: brightness(0.5);
}

.profile-picture a:hover .overlay-text {
    opacity: 1;
}


/* === ЗАГОЛОВКИ СЕМЕСТРОВ (ЦЕНТРИРОВАННЫЕ) === */
.semestre-titre {
    font-family: 'Gulax', sans-serif;
    font-size: 2.5rem;
    color: #FFFFFF;
    border-bottom: 2px solid #777777;
    padding-bottom: 10px;
    margin-top: 50px;
    margin-bottom: 30px;
    text-align: center;
    background-color: rgba(30, 30, 30, 0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeInDown 1s ease-out;
}

.semestre-titre:first-of-type {
    margin-top: 10px;
}


/* === ИКОНКИ (НАВИГАЦИЯ И СОЦСЕТИ) === */

/* Общий стиль кнопок-иконок */
.icon-bar a,
.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: rgba(30, 30, 30, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease-in-out;
}

/* Иконки соцсетей чуть больше */
.social-links a {
    width: 50px;
    height: 50px;
}

/* SVG внутри */
.icon-bar a svg,
.social-links a svg {
    width: 28px;
    height: 28px;
    fill: #E0E0E0;
    transition: fill 0.2s ease-in-out;
}

/* Ховер эффект */
.icon-bar a:hover,
.social-links a:hover {
    background-color: rgba(50, 50, 50, 1);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.icon-bar a:hover svg,
.social-links a:hover svg {
    fill: #FFFFFF;
}

/* Расположение навигации (верхний левый угол) */
.icon-bar {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    gap: 12px;
    z-index: 1000;
    animation: fadeInDown 1s ease-out;
}

/* Расположение соцсетей (под кнопкой на главной) */
.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 50px;
    opacity: 0;
    animation: fadeInUp 1.2s ease-out 0.9s forwards;
}

/* === АНИМАЦИИ === */
@keyframes fadeInDown {       /* это правило в CSS, которое описывает сценарий анимации */
    from {
        opacity: 0;     /* не видимо и ниже делаем чтобы было видно */
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;   
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;       
        transform: scale(0.7);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

footer.container { /* он применяет стиль к футеру, у которого есть класс контейнер */
    text-align: center;
    margin-top: 40px;
}

.erreur {
    color: #E74C3C;
    padding: 18px;
    background-color: rgba(40, 20, 20, 0.8);
    border-radius: 8px;
    text-align: center;
}

/* Video */
#video-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out, visibility 0.5s; 
}

#intro-video {
    width: 90%; 
    max-width: 800px; 
    height: auto; 
    border-radius: 12px; 
    box-shadow: 0 0 30px rgba(0,0,0,0.7); 
    display: block; 
}

.loader-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}


