/* =================================================================================
   Variables Globales
   ================================================================================= */
   :root {
    /* Couleurs */
    --primary-blue: #03087b;
    --secondary-blue: #4a90e2;
    --accent-green: #24a62b68;
    --text-dark: #000000;
    --text-gray: #555;
    --background-light: #f0f4f8;
    --white: #ffffff;
    
    /* Tailles de la navbar */
    --navbar-height-desktop: 80px;
    --navbar-height-tablet: 70px;
    --navbar-height-mobile: 60px;
    --navbar-height-small: 50px;
    
    /* Espacements */
    --spacing-xs: 5px;
    --spacing-sm: 10px;
    --spacing-md: 20px;
    --spacing-lg: 30px;
    --spacing-xl: 40px;
    --spacing-xxl: 50px;

    
    /* Border Radius */
    --border-radius-sm: 8px;
    --border-radius-md: 10px;
    --border-radius-lg: 15px;
    
    /* Box Shadows */
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.2);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.6s ease;
    
    /* Font Sizes */
    --font-size-xs: 14px;
    --font-size-sm: 16px;
    --font-size-md: 18px;
    --font-size-lg: 20px;
    --font-size-xl: 24px;
    --font-size-xxl: 36px;
    --font-size-huge: 48px;
}

/* =================================================================================
   Reset & Base Styles
   ================================================================================= */
   body {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: Lato, sans-serif;
    background-color: var(--background-light);
    color: var(--text-dark);
    overflow-x: hidden;
}

/* Study Guide specific body styles */
body.study-guide {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    min-height: 100vh; /* Ajouté pour garantir la hauteur minimale */
    margin: 0; /* Réinitialiser la marge */
    padding: 0; /* Réinitialiser le padding */
    background-color: var(--background-light); /* Ajouté pour cohérence */
}


/* Background shapes container */
.background-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.shape {
    position: absolute;
    opacity: 0.1;
    transition: transform var(--transition-normal);
}

/* Shapes Positioning */
.shape:nth-child(1) { top: 5%; left: 5%; }
.shape:nth-child(2) { top: 20%; right: 10%; }
.shape:nth-child(3) { bottom: 15%; left: 15%; }
.shape:nth-child(4) { bottom: 10%; right: 5%; }

/* Optional: Animation for shapes on scroll */
@media (prefers-reduced-motion: no-preference) {
    .shape {
        animation: floatAnimation 6s infinite ease-in-out;
    }
    
    .shape:nth-child(2) {
        animation-delay: 1s;
    }
    
    .shape:nth-child(3) {
        animation-delay: 2s;
    }
    
    .shape:nth-child(4) {
        animation-delay: 3s;
    }
}

@keyframes floatAnimation {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Ensure content stays above background */
.main-content {
    position: relative;
    z-index: 1;
}


/* =================================================================================
   Utility Classes
   ================================================================================= */
.flex {
    display: flex;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.flex-column {
    display: flex;
    flex-direction: column;
}

/* =================================================================================
   Animations
   ================================================================================= */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes drawBorder {
    from {
        border-color: transparent;
    }
    to {
        border-color: var(--primary-blue);
    }
}

/* =================================================================================
   Common Transitions
   ================================================================================= */
.transition-all {
    transition: all var(--transition-normal);
}

.hover-scale {
    transition: transform var(--transition-normal);
}

.hover-scale:hover {
    transform: scale(1.1);
}


/* =================================================================================
   Navbar Styles
   ================================================================================= */
   .Navbar {
    width: 100%;
    box-sizing: border-box;
    height: var(--navbar-height-desktop);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    padding: var(--spacing-xs) 10px; /* Réduire le padding horizontal */
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(5px);
    transition: all var(--transition-normal);

}

/* Navigation Links Container */
.NavBar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(20px, 5vw, 90.5px); /* Responsive gap */
    height: 100%;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* Navigation Links */
.NavBar a {
    color: var(--text-dark);
    font-size: clamp(var(--font-size-xs), 3vw, var(--font-size-xl));
    font-weight: 400;
    text-decoration: none;
    padding: var(--spacing-xs) clamp(4px, 1vw, var(--spacing-sm));
    position: relative;
    transition: 
        color var(--transition-normal),
        transform var(--transition-normal),
        text-shadow var(--transition-normal);
    white-space: nowrap;
}

/* Hover Effects - Only on non-touch devices */
@media (hover: hover) {
    .NavBar a:hover {
        color: var(--primary-blue);
        transform: scale(1.1);
        text-shadow: 
            0 0 5px rgba(255, 255, 255, 0.5),
            0 0 8px rgba(3, 8, 123, 0.6),
            0 0 15px rgba(3, 8, 123, 0.8);
    }
}

/* Active State */
.NavBar a.active {
    color: var(--primary-blue);
    font-weight: 500;
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
    .Navbar {
        height: var(--navbar-height-tablet);
        padding: var(--spacing-xs) var(--spacing-sm);
    }
}

@media screen and (max-width: 768px) {
    .Navbar {
        height: var(--navbar-height-mobile);
    }

    .NavBar {
        justify-content: space-around; /* Change to space-around for better mobile distribution */
        padding: 0 var(--spacing-xs);
    }
}

@media screen and (max-width: 480px) {
    .Navbar {
        height: var(--navbar-height-small);
    }

    .NavBar {
        padding: 0 var(--spacing-xs);
    }
}

/* Optional: Sticky Navbar Animation */
.Navbar.sticky {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
    height: var(--navbar-height-small); /* Reduce height when sticky */
}

/* Touch Device Optimization */
@media (hover: none) {
    .NavBar a {
        padding: var(--spacing-sm); /* Larger touch target on mobile */
    }
    
    .NavBar {
        touch-action: manipulation; /* Optimize touch interactions */
    }
}



/* =================================================================================
   Study Guide Section
   ================================================================================= */


/* Main Container */
.StudyGuideSection {
    padding: 120px 20px 90px;
    width: calc(100% - 20px);
    max-width: 1200px;
    margin: 8vh auto;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    flex: 1; /* Ajouté pour que la section prenne l'espace disponible */
}

/* Header */
.StudyGuideHeader {
    text-align: center;
    margin-bottom: 40px;
}

.StudyGuideHeader h1 {
    font-size: 48px;
    color: var(--primary-blue);
    margin-bottom: 10px;
}

.StudyGuideSubTitle {
    font-size: 20px;
    color: #555;
    font-weight: 300;
}

/* Category Navigation */
.CategoryTabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.CategoryTab {
    background-color: #8bb7ee;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.CategoryTab:hover,
.CategoryTab.active {
    background-color: #24a62b68;
    color: var(--primary-blue);
    box-shadow: 0 0 0 2px var(--primary-blue);
}


/* Cards Grid */
.FlashcardsContainer {
    padding: 20px;
    margin-top: 30px;
}

.CategorySection {
    display: none;
    grid-template-columns: repeat(3, 1fr); /* 3 cards per row by default */
    gap: 25px;
    opacity: 0;
    transition: opacity 0.3s ease;
    max-width: 1200px;
    margin: 0 auto;
}

.CategorySection.active {
    display: grid;
    opacity: 1;
    animation: fadeIn 0.4s ease-out forwards;
}

























/* Flashcard Components */
.Flashcard {
    height: 200px;
    perspective: 1000px;
    position: relative;
    transform-style: preserve-3d;
    width: 100%;
}

.FlashcardInner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Desktop hover effect */
@media (hover: hover) {
    .Flashcard {
        cursor: pointer;
    }

    .Flashcard:hover .FlashcardInner {
        transform: rotateY(180deg);
    }
}

/* Mobile touch effect */
@media (hover: none) {
    .FlashcardInner.flipped {
        transform: rotateY(180deg);
    }
}

/* Common Card Face Styles */
.FlashcardFront,
.FlashcardBack {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    border: 2px solid var(--primary-blue);
    background-color: white;
    transform-style: preserve-3d;
}

.FlashcardFront {
    color: var(--primary-blue);
    font-size: 22px;
    font-weight: 500;
}

.FlashcardBack {
    transform: rotateY(180deg);
    color: #000000;
    font-size: 18px;
    line-height: 1.6;
    letter-spacing: 0.3px;
    font-weight: 400;
}

/* Card Content */
.FlashcardFront h3,
.FlashcardBack p {
    margin: 0;
    width: 100%;
    text-align: center;
    transform: translateZ(1px);
    padding: 20px 25px; /* Add more padding around the content */
    box-sizing: border-box;
}

/* Adjust back side text specifically for better readability */
.FlashcardBack p {
    font-size: 16px; /* Slightly smaller font size to accommodate more text */
    padding: 25px 30px; /* Even more padding for the definition text */
    line-height: 1.5;
    max-height: 100%;
    overflow-y: auto; /* Add scroll if content is too long */
}

/* Optional: Add custom scrollbar styling */
.FlashcardBack p::-webkit-scrollbar {
    width: 4px;
}

.FlashcardBack p::-webkit-scrollbar-thumb {
    background-color: var(--primary-blue);
    border-radius: 4px;
}

.FlashcardBack p::-webkit-scrollbar-track {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .CategorySection {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
        margin-bottom: 5vh;
    }
    
    .StudyGuideSection {
        padding: var(--spacing-xl);
        width: calc(100% - 40px);
        margin: 2vh 0;
    }
}

@media (max-width: 768px) {
    .StudyGuideSection {
        padding: var(--spacing-lg);
        width: calc(100% - 30px);
        margin: 10vh 0;
    }

    .StudyGuideHeader h1 {
        font-size: var(--font-size-xxl);
    }

    .CategoryTabs {
        flex-wrap: wrap;
        gap: var(--spacing-sm);
    }

    .CategoryTab {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: var(--font-size-xs);
        flex: 1 1 calc(50% - 15px);
    }

    .FlashcardsContainer {
        padding: var(--spacing-sm);
    }

    .CategorySection {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .Flashcard {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .StudyGuideSection {
        padding: var(--spacing-md);
        width: calc(100% - 20px);
        margin: 8vh 0;
    }

    .StudyGuideHeader h1 {
        font-size: calc(var(--font-size-xxl) - 8px);
    }

    .CategoryTabs {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .CategoryTab {
        width: 100%;
    }
}


/* =================================================================================
   Contact Section
   ================================================================================= */
   .contact-section {
    width: 100%;
    padding: var(--spacing-xxl) var(--spacing-md);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50vh;
}

.contact-container {
    width: calc(100% - 16vw);
    max-width: 1200px;
}

/* Contact Card */
.contact-card {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--spacing-xl);
    text-align: center;
    transition: transform var(--transition-normal);
}

.contact-card:hover {
    transform: translateY(-5px);
}

.contact-card h2 {
    font-size: var(--font-size-huge);
    color: var(--primary-blue);
    margin-bottom: var(--spacing-md);
}

.contact-card p {
    font-size: var(--font-size-lg);
    color: var(--text-gray);
    font-weight: 300;
    margin-bottom: var(--spacing-xl);
}

/* Buttons Container */
.buttons-wrapper {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

/* Common Button Styles */
.back-btn,
.connect-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius-md);
    font-size: var(--font-size-md);
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-normal);
    position: relative;
}

/* Back Button Specific */
.back-btn {
    background: var(--white);
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
}

/* Connect Button Specific */
.connect-btn {
    background: var(--primary-blue);
    border: 2px solid var(--primary-blue);
    color: var(--white);
}

/* Hover Effects */
.back-btn:hover,
.connect-btn:hover {
    transform: scale(1.1);
}

.back-btn:hover {
    background: var(--primary-blue);
    color: var(--white);
}

.connect-btn:hover {
    background: var(--white);
    color: var(--primary-blue);
}

/* SVG Icon Transitions */
.back-btn svg,
.connect-btn svg {
    transition: transform var(--transition-normal);
}

.back-btn:hover svg,
.connect-btn:hover svg {
    transform: scale(1.1);
}

/* Button Border Animation */
.back-btn::before,
.connect-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-radius: var(--border-radius-md);
    pointer-events: none;
    transition: border var(--transition-slow);
}

.back-btn:hover::before,
.connect-btn:hover::before {
    border-color: var(--primary-blue);
    animation: drawBorder 0.4s forwards;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .contact-container {
        width: calc(100% - 40px);
        padding: 50px;
    }
    
    .contact-card h2 {
        font-size: var(--font-size-xxl);
    }
}

@media (max-width: 768px) {
    .contact-container {
        width: calc(100% - 30px);
    }
    
    .buttons-wrapper {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .contact-card {
        padding: var(--spacing-lg);
    }
    
    .contact-card h2 {
        font-size: calc(var(--font-size-xxl) - 8px);
    }
    
    .contact-card p {
        font-size: var(--font-size-md);
    }
}

@media (max-width: 480px) {
    .contact-container {
        width: calc(100% - 20px);
    }
    
    .contact-card {
        padding: var(--spacing-md);
    }
    
    .back-btn,
    .connect-btn {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: var(--font-size-sm);
    }
}







/* =================================================================================
   Footer Section
   ================================================================================= */
   .footer {
    width: 100%;
    padding: var(--spacing-lg) 0;
    background: transparent;
    color: var(--text-dark);
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 10;
}

/* Footer Container */
.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 var(--spacing-md);
    max-width: 1200px;
    margin: 0 auto;
}

/* Social Media Section */
.footer-social {
    display: flex;
    justify-content: center;
    margin-bottom: var(--spacing-md);
}

.social-icons {
    display: flex;
    gap: var(--spacing-md);
}

/* Social Icons */
.social-icon {
    width: 36px;
    height: 36px;
    background-color: var(--white);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: transform var(--transition-fast), 
                box-shadow var(--transition-normal);
    text-decoration: none;
    background-size: cover;
    background-position: center;
    position: relative;
}

/* Specific Social Icons */
.Github {
    background-image: url('/public/assets/main/github.png');
}

.LinkedIn {
    background-image: url('/public/assets/main/linkedin.png');
}

/* Social Icon Hover Effects */
.social-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(var(--primary-blue-rgb), 0.3);
}

/* Social Icon Active State */
.social-icon:active {
    transform: scale(0.95);
}

/* Footer Information */
.footer-info {
    text-align: center;
}

.footer-info p {
    margin: 0;
    font-size: var(--font-size-xs);
    line-height: 1.5;
    color: black;
}

/* Optional: Year Highlight */
.footer-info .year {
    color: var(--primary-blue);
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .footer {
        padding: var(--spacing-md) 0;
    }

    .social-icon {
        width: 32px;
        height: 32px;
    }

    .social-icons {
        gap: var(--spacing-sm);
    }
}

@media (max-width: 480px) {
    .footer-container {
        padding: 0 var(--spacing-sm);
    }

    .social-icon {
        width: 28px;
        height: 28px;
    }

    .footer-info p {
        font-size: calc(var(--font-size-xs) - 2px);
        color: black;
    }
}

/* Animation for Footer Entry */
@keyframes footerFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.footer {
    animation: footerFadeIn 0.6s ease-out;
}

/* Optional: Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .footer {
        background: rgba(255, 255, 255, 0.03);
    }

    .social-icon {
        background-color: rgba(255, 255, 255, 0.9);
    }

    .footer-info p {
        color: black;
    }
}





