/*SPECIFICATION ET COMMENTAIRES POUR JEAN-MARC*/



/*VARIABLES ET STYLE GLOBAL*/
:root {
    --bg-dark: #d7e4ed;
    --blue-glow: #0058A2;
    --blue-bright: #0058A2;
    --text-primary: #162640;
    --text-secondary: #000000;
    --title-news: #0058A2;
    --border-color: #B4C8DE;
    --alert-color: #ff0000c4;
    --box-color: rgba(255, 255, 255, 0.6);
    --font-heading: 'Chakra Petch', sans-serif;
    --font-body: 'Roboto', sans-serif;
    --moon-color: #0058A2;
}

body.dark-mode {
    --bg-dark: #0D1117;
    --blue-glow: #2F81F7;
    --blue-bright: #58A6FF;
    --text-primary: #E6EDF3;
    --text-secondary: #8B949E;
    --title-news: #8B949E;
    --border-color: rgba(88, 166, 255, 0.2);
    --alert-color: #F78166;
    --box-color: rgba(22, 27, 34, 0.6);
    --font-heading: 'Chakra Petch', sans-serif;
    --font-body: 'Roboto', sans-serif;
    --moon-color: #0058A2;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

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



/* ANIMATION ETOILES FILANTES */
#stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.star {
    position: absolute;
    width: 150px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--blue-bright));
    opacity: 0;
    transform-origin: left center;
}

#feature-toggle {
    cursor: pointer;
}

#feature-toggle:hover {
    transform: scale(1.1);
}

#feature-toggle.active {
    background-color: #007bff;
}

body.interactive-mode {
    cursor: crosshair;
}

.shot-star {
    background: linear-gradient(90deg, transparent, #FFD700);
}



/*EN TETE*/
.main-header {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    width: 100px;
    padding-top: 5px;
}

.header-title h1 {
    font-family: var(--font-heading);
    color: var(--title-news);
    font-size: 1.2rem;
    letter-spacing: 2px;
}



/* BOUTONS JOUR / NUIT */
.checkcolor {
    width: 100%;
    max-width: 1100px;
    padding: 0 20px;
    margin-bottom: 6px;
}

.theme-switch {
    display: inline-block;
    height: 34px;
    width: 60px;
    position: relative;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: var(--box-color);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    cursor: pointer;
    border-radius: 34px;
    transition: .4s;
}

.slider::before {
    content: "";
    position: absolute;
    z-index: 2;
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.4s ease;
}

.slider i {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: var(--moon-color);
    z-index: 1;
}

.slider .fa-sun {
    right: 8px;
}

.slider .fa-moon {
    left: 8px;
}

input:checked + .slider::before {
    transform: translateX(26px);
}


/*SECTION HEROS & FORMULAIRE*/
.hero-section {
    padding: 15px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 30px;
    align-items: stretch;
}

.feedback-panel, .welcome-panel {
    background: var(--box-color);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
}

.feedback-panel h2 {
    color: var(--blue-bright);
    font-family: var(--font-heading);
    margin-bottom: 1rem;
}

.feedback-panel p {
    color: var(--text-secondary);
}

.small-text {
    font-size: 0.8rem;
    margin-top: 1rem;
}

.small-text .mailCFAO
{
    color:#1241ff ;
}

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

.manager-info {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 1rem;
}

.manager-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid var(--blue-bright);
    object-fit: cover;
}

.manager-info h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
}

.manager-info p {
    margin: 0;
    color: var(--text-secondary);
}

.welcome-text {
    margin-top: auto;
    font-size: 1rem;
}



/*BOUTONS*/
.btn {
    display: inline-block;
    border: 1px solid var(--blue-glow);
    background: transparent;
    color: var(--blue-bright);
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-family: var(--font-heading);
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
    margin-top: 1.5rem;
    font-size: 1.1rem;
}

.btn:hover {
    background-color: var(--blue-glow);
    color: var(--bg-dark);
    box-shadow: 0 0 20px var(--blue-glow);
}

/*TIMELINE*/
.timeline-section {
    padding: 80px 0;
}

.timeline {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 3px;
    background-color: var(--border-color);
    top: 0; bottom: 0;
    left: 50%;
    margin-left: -1.5px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--bg-dark);
    border: 3px solid var(--blue-glow);
    top: 25px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(even)::after {
    left: 0px;
}

.timeline-item:nth-child(odd)::after {
    right: 0px;
}



/*BOITES TIMELINE*/
.timeline-content {
    padding: 25px;
    position: relative;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.card-glass {
    background: var(--box-color);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.card-glass:hover {
    border-color: var(--blue-bright);
    box-shadow: 0 0 25px rgba(88, 166, 255, 0.2);
}

.timeline-tag {
    display: inline-block;
    font-family: var(--font-heading);
    padding: 4px 10px;
    font-size: 0.8rem;
    background: var(--blue-glow);
    color: var(--bg-dark);
    border-radius: 4px;
    margin-bottom: 1rem;
    font-weight: bold;
    align-self: flex-start;
}

.timeline-content h3 {
    font-family: var(--font-heading);
    color: var(--blue-bright);
    font-size: 1.5rem;
}

.timeline-content p {
    color: var(--text-secondary);
}

.inline-img {
    max-width: 250px;
    margin-top: -30px;
    margin-bottom: -15px;
    align-self: center;
}

.split-content {
    display: flex;
    gap: 20px;
    margin: 1rem 0;
}

.status {
    color: var(--blue-bright);
    font-weight: bold;
}

.card-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--blue-bright);
    text-decoration: none;
    font-weight: bold;
    align-self: flex-start;
}

.card-link i{
    transition: transform 0.3s;
}

.card-link:hover i{
    transform: translateX(5px);
}

.card-link .fa-solid {
    position: relative;
    top: 1.5px;
}

.card-link #i2 {
    position: relative;
    top: 1px;
}


/*ALERTE SECU*/
.alert-border {
    border-left: 4px solid var(--alert-color);
}

.alert-tag {
    background: var(--alert-color);
}

.alert-box {
    background: rgba(247, 129, 102, 0.1);
    padding: 10px;
    border-radius: 4px;
    margin: 1rem 0;
}
.alert-box p {
    color: var(--text-primary); margin: 0;
}



/*LE COPYRIGHT ET FLECHE POUR REMONTER*/
.main-footer {
    text-align: center;
    padding: 30px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-family: var(--font-heading);
}
.back-to-top {
    position: fixed;
    bottom: 25px; right: 25px;
    width: 45px; height: 45px;
    background: var(--blue-glow);
    color: var(--bg-dark);
    border-radius: 50%;
    text-align: center;
    line-height: 45px;
    font-size: 1.2rem;
    opacity: 0; visibility: hidden;
    transition: all 0.4s;
    transform: translateY(20px);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover,
.back-to-top.is-animated {
    box-shadow: 0 0 20px var(--blue-glow);
    transform: scale(1.1);
}



/* LES ANIMATIONS */
.anim-on-load {
    opacity: 0;
    animation: fadeIn 1s 0.2s forwards ease-out;
}

.anim-from-left, .anim-from-right {
    opacity: 0;
    transition: opacity 0.6s, transform 0.6s;
}

.anim-from-left {
    transform: translateX(-50px);
}

.anim-from-right {
    transform: translateX(50px);
}

.anim-from-left.visible, .anim-from-right.visible {
    opacity: 1;
    transform: translateX(0);
}

@keyframes fadeIn {

    to {
        opacity: 1;
    }

}

#feature-toggle:hover {
    transform: scale(1.1);
}

#feature-toggle.active {
    background-color: #007bff;
}

body.interactive-mode {
    cursor: crosshair;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}




/* DESIGN RESPONSIVE (ADAPTE AUX DIFFERENTES TAILLES D'ECRAN)
DANS LE MEDIA CI DESSOUS LE NOUVEAU CSS EST APPLIQUE QUAND LA TAILLE DE L'ECRAN 
PASSE EN DESSOUS DE 950 PIXELS ET REPREND LE CSS D'ORIGINE SI ON PASSE AU
DESSUS DE 950 PIXELS*/
@media(max-width: 950px) {

    .hero-grid {
        grid-template-columns: 1fr;
    }

    .timeline::after {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 60px;
        padding-right: 15px;
    }

    .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-item::after {
        left: 10px; 
    }

    .anim-from-right {
        transform: translateX(-50px);
    }

    .timeline-item:nth-child(even)::after, .timeline-item:nth-child(odd)::after {
        left: 7px;
    }
}



/* CSS ADAPTE POUR MOBILE (ECRAN < 540 PIXELS) */
@media (max-width: 540px) {
    .header-title h1 {
        font-size: 13px;
    }

    .logo {
        width: 80px;
        height: auto;
    }

    .feedback-panel h2 {
    font-size: 20px;
    }

    .feedback-panel p {
        font-size: 14px;
    }

    .feedback-panel .small-text {
        font-size: 11.5px;
    }

    .manager-info h3 {
    font-size: 20px;
    }

    .manager-info p {
        font-size: 15px;
    }

    .welcome-text {
        font-size: 14px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 1rem;
    }

    .timeline-tag {
        font-size: 0.7rem;
    }

    .timeline-content h3 {
        font-size: 1.2rem;
    }

    .timeline-content p {
        font-size: 0.8rem;
    }

    .split-content {
        flex-direction: column;
    }

    .card-glass h4 {
        font-size: 0.85rem;
    }

    .card-link {
        font-size: 0.85rem;
    }

    .main-footer {
        font-size: 0.8rem;
    }

    .back-to-top {
        bottom: 25px; right: 25px;
        width: 38px; height: 38px;
        line-height: 38px;
        font-size: 1.05rem;
    }

    .inline-img {
        max-width: 200px;
        margin-top: -10px;
        margin-bottom: -15px;
        align-self: center;
    }

    .manager-photo {
        width: 70px;
        height: 70px;
        border-radius: 50%;
        border: 2px solid var(--blue-bright);
        object-fit: cover;
    }

    .timeline-item::after {
        width: 13px;
        height: 13px;
    }

    .timeline-item:nth-child(even)::after, .timeline-item:nth-child(odd)::after {
        left: 0px;
    }

    .timeline::after {
        left: 0px;
    }

    .timeline-item {
        padding-left: 25px;
        padding-right: 0px;
    }

}