@import url(./base.css);

/* Masquer scrollbar */
html,
body {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none;
}

body {
    color: green;
    font-family: 'Anonymous Pro', monospace;
}

/* Header - Spécifique page d'accueil */
header .header-left {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

header .header-left .name {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--border-green);
    text-shadow: 0 0 15px rgba(0, 255, 65, 0.5);
    letter-spacing: 1px;
}

header .header-left .title {
    margin: 0;
    font-size: 1rem;
    font-weight: 400;
    color: #888;
    letter-spacing: 2px;
    text-transform: uppercase;
}

header a,
header h2 {
    text-decoration: none;
    color: var(--text-color);
    font-weight: bold;
}

/* Main grid */
main {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 30px;
    padding: 40px;
    box-sizing: border-box;
    min-height: calc(100vh - 100px);
}

/* Style commun pour toutes les sections */
main section {
    background-color: rgba(48, 48, 48, 0.6);
    border-radius: 15px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: auto;
}

main .aboutMe {
    color: white;
    line-height: 1.8;
    grid-column: 1;
    grid-row: 1;
    position: relative;
    overflow: hidden;
}

main .aboutMe h3 {
    background-color: rgba(0, 0, 0, 0.5);
    font-size: 1.5em;
    padding: 25px;
}

main .aboutMe .background-images {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

main .aboutMe .background-images img {
    position: absolute;
    height: 100%;
    width: 50%;
    object-fit: cover;
    opacity: 0.3;
}

main .aboutMe .background-images .bg-left {
    left: 0;
    top: 0;
}

main .aboutMe .background-images .bg-right {
    right: 0;
    top: 0;
}

main .aboutMe .content {
    position: relative;
    z-index: 1;
}

main .aboutMe .content p {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    margin-top: 0;
    margin: 25px;
}

main .contact {
    padding: 25px;
    grid-column: 2;
    grid-row: 1;
    background-color: rgba(0, 0, 0, 0.8);
}

main .contact h3 {
    margin-bottom: 10px;
    font-size: 1.5em;
}

main .skillXp {
    grid-column: 1;
    grid-row: 2;
    padding: 25px;
    color: white;
}

main .skillXp p {
    text-align: justify;
    font-weight: 300;
    line-height: 1.6;
    font-size: 0.8em;
}

main .skillXp h3 {
    margin-bottom: 20px;
}

main .skillXp-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    height: 100%;
}

main .skillXp .skills,
main .skillXp .experience {
    display: flex;
    flex-direction: column;
}

main .skillXp h4 {
    color: var(--text-color);
    margin: 0 0 15px 0;
    font-size: 1.1em;
    border-bottom: 2px solid var(--text-color);
    padding-bottom: 8px;
}

main .skillXp .subsection {
    margin-bottom: 20px;
}

main .skillXp h5 {
    color: var(--text-color);
    margin: 0 0 10px 0;
    font-size: 1.05em;
    font-weight: 700;
    padding-left: 10px;
    border-left: 3px solid var(--text-color);
}

main .skillXp ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

main .skillXp ul li {
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
}

main .skillXp ul li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--text-color);
}

main .skillXp .stage-title {
    margin: 0 0 5px 0;
}

main .skillXp .stage-date {
    color: var(--text-color);
    font-style: italic;
    margin: 0 0 10px 0;
    font-size: 0.9em;
}

main .projects {
    grid-column: 2;
    grid-row: 2;
    position: relative;
    overflow: hidden;
}

main .projects h3 {
    padding: 25px;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    font-size: 1.5em;
}

main .projects a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: bold;
    position: relative;
    z-index: 2;
}

main .projects .background-images-projects {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

main .projects .background-images-projects::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background-color: rgba(76, 175, 80, 0.5);
    transform: translateX(-50%);
    z-index: 1;
}

main .projects .background-images-projects::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: rgba(76, 175, 80, 0.5);
    transform: translateY(-50%);
    z-index: 1;
}

main .projects .background-images-projects img {
    position: absolute;
    height: 50%;
    width: 50%;
    object-fit: cover;
}

main .projects .background-images-projects .bg-left-top {
    left: 0;
    top: 0;
}

main .projects .background-images-projects .bg-right-top {
    right: 0;
    top: 0;
}

main .projects .background-images-projects .bg-left-bottom {
    left: 0;
    bottom: 0;
}

main .projects .background-images-projects .bg-right-bottom {
    right: 0;
    bottom: 0;
}

main section h3 {
    color: var(--text-color);
    margin: 0;
    font-size: 1.2em;
    font-weight: normal;
}

main .projects:hover {
    transform: scale(1.05);
    background-color: rgba(128, 128, 128, 0.3);
    z-index: 1;
}

main section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

main section.visible {
    opacity: 1;
    transform: translateY(0);
}

main section a {
    width: 100%;
    height: 100%;
}

main .mail {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: auto;
    height: 100%;
    grid-template-rows: auto auto 1fr auto;
}

main .mail input,
main .mail textarea {
    background-color: rgba(48, 48, 48, 0.8);
    border: none;
    color: white;
    padding: 15px;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

main .mail input::placeholder,
main .mail textarea::placeholder {
    font-family: 'Montserrat', sans-serif;
}

/* honeypot */
.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

main .mail textarea {
    resize: vertical;
    min-height: 150px;
    height: 100%;
}

#send {
    background-color: var(--text-color);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#send:hover {
    background-color: #45a049;
}

/**** Responsive ****/
@media (max-width: 1100px) {
    main {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, auto);
        max-width: 800px;
        margin: 0 auto;
        gap: 20px;
        padding: 20px;
        min-height: auto;
    }

    main .aboutMe,
    main .contact,
    main .skillXp,
    main .projects {
        grid-column: 1;
        grid-row: auto;
    }

    main section {
        min-height: 500px;
    }
}

@media (max-width: 768px) {
    main {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, auto);
        height: auto;
        gap: 15px;
        padding: 15px;
        max-width: 100%;
    }

    main .aboutMe,
    main .contact,
    main .skillXp,
    main .projects {
        grid-column: 1;
        grid-row: auto;
    }

    main section {
        min-height: 300px;
    }
}

/**** matrix animation ****/
#matrix {
    position: fixed;
    width: 100%;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: 100;
}

.character {
    font-weight: 600;
    position: absolute;
    font-size: 16px;
    user-select: none;
    transition: all 0.3s ease;
}

/**** Toast notifications ****/
#toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.toast {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(26, 26, 26, 0.95) 100%);
    border: 2px solid var(--border-green);
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 255, 65, 0.3), 0 0 20px rgba(0, 255, 65, 0.2);
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideInRight 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
}

.toast::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--border-green);
    animation: progressBar 4s linear;
}

.toast.toast-loading::before {
    animation: progressBarLoading 2s linear infinite;
}

.toast-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.toast-message {
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    line-height: 1.4;
    flex: 1;
}

.toast-success .toast-icon {
    color: var(--border-green);
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.6);
}

.toast-loading .toast-icon {
    color: var(--border-green);
    animation: spin 1s linear infinite;
}

.toast-error {
    border-color: #ff4444;
    box-shadow: 0 8px 32px rgba(255, 68, 68, 0.3), 0 0 20px rgba(255, 68, 68, 0.2);
}

.toast-error::before {
    background: #ff4444;
}

.toast-error .toast-icon {
    color: #ff4444;
}

.toast.fade-out {
    animation: slideOutRight 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

@keyframes progressBar {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

@keyframes progressBarLoading {
    0% {
        width: 0%;
        left: 0;
    }
    50% {
        width: 100%;
        left: 0;
    }
    100% {
        width: 0%;
        left: 100%;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive toast */
@media (max-width: 768px) {
    #toast-container {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }
    
    .toast {
        min-width: auto;
        max-width: 100%;
    }
}