/* Styles spécifiques à la page À propos - Section Présentation de l'entreprise */

/* Variables pour la page about */
:root {
    --about-primary: #1832ad; /* Bleu mis à jour - #1832ad */
    --about-secondary: #008E39; /* Vert mis à jour - #008E39 */
    --about-accent: #ff7e5f;
    --about-dark: #2c3e50;
    --about-light: #f9f9f9;
    --about-gradient: linear-gradient(135deg, var(--about-primary) 0%, var(--about-secondary) 100%);
    --about-text-gradient: linear-gradient(135deg, var(--about-dark) 0%, #405a85 100%);
    --about-box-shadow: 0 10px 30px rgba(24, 50, 173, 0.15);
    --about-border-radius: 16px;
    --about-transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Réinitialisation du style pour la section histoire uniquement dans about.html */
.history-section {
    background-color: var(--about-light) !important;
    padding: 100px 0 !important;
    position: relative;
    overflow: hidden;
}

/* Effet de fond avec particules et points lumineux */
.history-section::before,
.history-section::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--about-primary);
    opacity: 0.05;
    animation: float 15s infinite ease-in-out;
}

.history-section::before {
    top: 15%;
    left: 10%;
    width: 300px;
    height: 300px;
    animation-delay: 0s;
}

.history-section::after {
    bottom: 10%;
    right: 5%;
    width: 250px;
    height: 250px;
    animation-delay: 5s;
}

/* Ajout de points lumineux décoratifs */
.history-section .container {
    position: relative;
}

.history-section .container::before,
.history-section .container::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: var(--about-secondary);
    opacity: 0.05;
    z-index: 0;
    animation: float 20s infinite ease-in-out alternate;
}

.history-section .container::before {
    width: 150px;
    height: 150px;
    top: 60%;
    left: 5%;
    animation-delay: 2s;
}

.history-section .container::after {
    width: 180px;
    height: 180px;
    top: 20%;
    right: 15%;
    animation-delay: 7s;
}

/* Points lumineux additionnels pour effet visuel */
.history-section .dot {
    position: absolute;
    border-radius: 50%;
    background: var(--about-gradient);
    opacity: 0.05; /* Opacité réduite de 0.1 à 0.05 */
    filter: blur(5px);
    z-index: 1;
    animation: pulse 4s infinite alternate;
}

.history-section .dot:nth-child(1) {
    width: 12px;
    height: 12px;
    top: 25%;
    left: 15%;
    animation-delay: 0s;
}

.history-section .dot:nth-child(2) {
    width: 18px;
    height: 18px;
    top: 40%;
    right: 20%;
    animation-delay: 1.5s;
}

.history-section .dot:nth-child(3) {
    width: 15px;
    height: 15px;
    bottom: 30%;
    left: 30%;
    animation-delay: 2.5s;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.2;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-20px) scale(1.05);
    }
}

/* Titre principal avec style amélioré */
.history-section h2 {
    text-align: center;
    margin-bottom: 40px; /* Réduit de 60px à 40px */
    font-size: 2.5rem; /* Réduit de 2.8rem à 2.5rem */
    font-weight: 800;
    background: var(--about-text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
    padding-bottom: 15px;
}

.history-section h2::after {
    content: '';
    position: absolute;
    width: 120px;
    height: 4px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: var(--about-gradient);
    border-radius: 4px;
}

.history-section h2::before {
    content: '✦';
    position: absolute;
    font-size: 1.5rem;
    color: var(--about-accent);
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

/* Style du conteneur principal */
.history-content {
    display: flex;
    align-items: stretch;
    gap: 0;
    max-width: 1200px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: var(--about-border-radius) !important;
    box-shadow: var(--about-box-shadow) !important;
    padding: 0 !important;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transform: translateZ(0);
    min-height: 480px;
    height: auto; /* Permet au conteneur de s'adapter à son contenu */
}

/* Effet de verre (glass morphism) avec opacité très réduite */
.history-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at bottom right, rgba(0, 210, 255, 0.02), transparent 70%),
        radial-gradient(circle at top left, rgba(24, 50, 173, 0.02), transparent 70%);
    z-index: -1;
}

/* Animation d'apparition avec décalage */
.history-content {
    opacity: 0;
    animation: fadeInUp 1s forwards 0.5s;
}

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

/* Section de texte */
.history-text {
    flex: 1.1; /* Réduit de 1.3 à 1.1 pour s'adapter à l'image davantage agrandie */
    padding: 40px !important;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 2;
    height: 100%;
    width: 58%; /* Réduit de 62% à 58% pour correspondre à la nouvelle répartition */
}

.history-text::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 30px;
    width: 60px;
    height: 60px;
    border: 2px solid rgba(24, 50, 173, 0.1);
    border-radius: 12px;
    z-index: -1;
    opacity: 0.5;
    transform: rotate(-15deg);
}

.history-text::after {
    content: '';
    position: absolute;
    bottom: 40px;
    right: 30px;
    width: 80px;
    height: 80px;
    border: 2px solid rgba(0, 142, 57, 0.1);
    border-radius: 12px;
    z-index: -1;
    opacity: 0.5;
    transform: rotate(15deg);
}

/* Style des paragraphes */
.history-text p.main-text {
    margin-bottom: 16px; /* Réduit de 24px à 16px */
    font-size: 1rem; /* Réduit de 1.05rem à 1rem */
    line-height: 1.6; /* Réduit de 1.8 à 1.6 */
    color: #546e7a;
    transition: var(--about-transition);
    position: relative;
    max-width: 100%;
}

.history-text p.main-text:hover {
    transform: translateX(5px);
    color: #334a52; /* Couleur plus foncée au survol */
}

.history-text p.main-text::before {
    content: '';
    position: absolute;
    left: -15px;
    top: 12px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--about-primary);
    opacity: 0;
    transition: var(--about-transition);
}

.history-text p.main-text:hover::before {
    opacity: 1;
    transform: scale(1.5);
}

/* Mise en valeur des marques avec effet de surlignage */
.brand-blue {
    color: var(--about-primary);
    font-weight: 700;
    position: relative;
    display: inline-block;
    padding: 0 3px;
    transition: var(--about-transition);
}

.brand-blue::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, rgba(24, 50, 173, 0.2), rgba(0, 142, 57, 0.2));
    border-radius: 2px;
    transition: var(--about-transition);
}

.brand-blue:hover {
    transform: translateY(-2px);
}

.brand-blue:hover::after {
    height: 8px;
    bottom: -2px;
}

.brand-green {
    color: #38b2ac;
    font-weight: 700;
    position: relative;
    display: inline-block;
    padding: 0 3px;
    transition: var(--about-transition);
}

.brand-green::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, rgba(56, 178, 172, 0.2), rgba(72, 202, 228, 0.2));
    border-radius: 2px;
    transition: var(--about-transition);
}

.brand-green:hover {
    transform: translateY(-2px);
}

.brand-green:hover::after {
    height: 8px;
    bottom: -2px;
}

/* Effet de brillance pour les noms de marque NEO et NEOPOLIS */
.brand-highlight {
    position: relative;
    overflow: hidden;
}

.brand-highlight::before {
    content: '';
    position: absolute;
    top: 0;
    width: 30px;
    height: 100%;
    background: linear-gradient(90deg, 
      rgba(255,255,255,0) 0%, 
      rgba(255,255,255,0.4) 50%, 
      rgba(255,255,255,0) 100%
    );
    z-index: 1;
    animation: shineEffect 3s infinite;
    transform: skewX(-20deg);
    opacity: 0;
}

@keyframes shineEffect {
    0% {
        left: -100px;
        opacity: 0;
    }
    10% {
        opacity: 0.1;
    }
    20% {
        opacity: 0.5;
    }
    100% {
        left: 120%;
        opacity: 0;
    }
}

/* Style des listes avec animations */
.simple-list {
    margin: 16px 0 24px; /* Réduit de 24px 0 30px à 16px 0 24px */
    padding-left: 0;
    list-style-type: none;
}

.simple-list li {
    margin-bottom: 12px; /* Réduit de 16px à 12px */
    line-height: 1.5; /* Réduit de 1.6 à 1.5 */
    position: relative;
    padding-left: 30px; /* Réduit de 35px à 30px */
    color: #546e7a;
    transition: var(--about-transition);
    transform-origin: left center;
}

.simple-list li:hover {
    transform: translateX(8px) scale(1.02);
    color: var(--about-dark);
}

.simple-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    background: var(--about-gradient);
    opacity: 0.15;
    border-radius: 50%;
    transition: var(--about-transition);
}

.simple-list li::after {
    content: "✓";
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--about-primary);
    font-size: 0.85rem;
    font-weight: bold;
    transition: var(--about-transition);
}

.simple-list li:hover::before {
    transform: translateY(-50%) scale(1.2);
    opacity: 0.3;
}

.simple-list li:hover::after {
    transform: translateY(-50%) rotate(360deg);
}

/* Animation séquentielle des éléments de liste */
.simple-list li:nth-child(1) {
    animation: fadeIn 0.5s forwards 0.8s;
    opacity: 0;
}

.simple-list li:nth-child(2) {
    animation: fadeIn 0.5s forwards 1s;
    opacity: 0;
}

.simple-list li:nth-child(3) {
    animation: fadeIn 0.5s forwards 1.2s;
    opacity: 0;
}

.simple-list li:nth-child(4) {
    animation: fadeIn 0.5s forwards 1.4s;
    opacity: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Styles des éléments forts */
.history-text strong {
    position: relative;
    color: var(--about-dark);
    font-weight: 700;
    z-index: 1;
}

.history-text strong::before {
    content: '';
    position: absolute;
    left: -2px;
    right: -2px;
    bottom: 0;
    height: 8px;
    background: rgba(24, 50, 173, 0.15);
    z-index: -1;
    border-radius: 4px;
    transition: var(--about-transition);
}

.history-text strong:hover::before {
    height: 80%;
    bottom: -2px;
}

/* Style spécial pour les liens avec animation de défilement */
.dynamic-link {
    display: inline-flex;
    align-items: center;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    background: var(--about-gradient);
    padding: 12px 24px;
    border-radius: 30px;
    margin-top: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(24, 50, 173, 0.3);
    transition: var(--about-transition);
    z-index: 1;
}

.dynamic-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    z-index: -1;
}

.dynamic-link::after {
    content: '→';
    margin-left: 8px;
    transition: transform 0.3s ease;
    display: inline-block;
}

.dynamic-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(24, 50, 173, 0.4);
}

.dynamic-link:hover::before {
    transform: translateX(100%);
}

.dynamic-link:hover::after {
    transform: translateX(4px);
}

.dynamic-link:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(24, 50, 173, 0.4);
}

/* Section image avec effet de superposition moderne */
.history-image {
    flex: 0.9; /* Augmenté de 0.7 à 0.9 pour agrandir davantage la taille relative */
    min-height: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    width: 42%; /* Augmenté de 38% à 42% */
    max-width: 42% !important; /* Augmenté de 38% à 42% */
}

.history-image::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: transparent; /* Suppression du dégradé */
    z-index: 1;
    clip-path: polygon(0% 0%, 100% 0%, 85% 100%, 0% 100%);
    transition: var(--about-transition);
}

.history-image:hover::before {
    clip-path: polygon(0% 0%, 100% 0%, 90% 100%, 0% 100%);
}

.history-image img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: scale(1.05); /* Augmenté davantage pour une présence plus forte */
    transition: var(--about-transition);
    z-index: 0;
    mix-blend-mode: multiply;
    filter: grayscale(0%) contrast(110%) opacity(0.98); /* Contraste augmenté et quasiment pas de gris */
}

.history-image:hover img {
    transform: scale(1.08); /* Effet de zoom plus marqué au survol */
    filter: grayscale(0%) contrast(112%) opacity(1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2) !important;
}

/* Effet de superposition sur l'image avec texte - désactivé car remplacé par l'élément brand-overlay */
.history-image::after {
    content: none; /* Désactivation du contenu par défaut */
}

/* Nouvel élément de marque en blanc */
.brand-overlay {
    position: absolute;
    bottom: 25px; /* Décalé un peu plus vers le bas */
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.2rem; /* Taille ajustée */
    font-weight: 900; /* Ultra-gras pour un impact visuel plus fort */
    color: rgba(255, 255, 255, 0.95); /* Blanc légèrement translucide */
    z-index: 2;
    text-shadow: 0px 2px 6px rgba(0, 0, 0, 0.65), 0px 0px 20px rgba(24, 50, 173, 0.5); /* Ombre bleue élégante */
    opacity: 1; /* Totalement visible */
    letter-spacing: 3px; /* Espacement accru pour l'élégance */
    transition: var(--about-transition);
    font-family: 'Arial', sans-serif;
    background-color: rgba(0, 0, 0, 0.2); /* Fond subtil */
    padding: 3px 10px; /* Ajout d'un peu de padding pour l'espace */
    border-radius: 4px; /* Coins arrondis */
    border: 1px solid rgba(255, 255, 255, 0.2); /* Bordure subtile */
    backdrop-filter: blur(1px); /* Effet de flou léger */
    animation: brandEntrance 1.2s ease-out forwards; /* Animation améliorée */
    padding: 4px 10px; /* Padding augmenté pour plus d'espace */
    border-radius: 3px; /* Coins arrondis plus prononcés */
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3); /* Bordure subtile */
    animation: brandEntrance 1.2s ease-out forwards; /* Animation d'entrée élégante */
}

/* Animation pour l'apparition du texte NEOPOLIS */
@keyframes brandEntrance {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px) scale(0.9);
        letter-spacing: 1px;
    }
    40% {
        opacity: 0.6;
        transform: translateX(-50%) translateY(-5px) scale(1.05);
        letter-spacing: 4px;
    }
    60% {
        opacity: 0.9;
        transform: translateX(-50%) translateY(-2px) scale(1.02);
        letter-spacing: 3px;
    }
    80% {
        transform: translateX(-50%) translateY(1px);
    }
    100% {
        opacity: 0.97;
        transform: translateX(-50%) translateY(0);
    }
}

/* Effet au survol de l'overlay */
.history-image:hover .brand-overlay {
    transform: translateX(-50%) translateY(-5px) scale(1.08); /* Effet de flottement plus prononcé */
    opacity: 1;
    text-shadow: 0 3px 10px rgba(24, 50, 173, 0.8), 0 0 25px rgba(255, 255, 255, 0.3); /* Ombre bleue plus intense */
    background-color: rgba(24, 50, 173, 0.3); /* Fond légèrement bleuté au survol */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3), 0 0 20px rgba(24, 50, 173, 0.2); /* Ombre plus prononcée */
    border: 1px solid rgba(255, 255, 255, 0.6); /* Bordure plus visible au survol */
    letter-spacing: 5px; /* Espacement des lettres augmenté */
    padding: 5px 12px; /* Padding augmenté pour un meilleur effet visuel */
}

/* Badge de fondation */
.foundation-badge {
    position: absolute;
    top: 35px;
    right: 35px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--about-primary);
    padding: 10px 18px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.92rem;
    z-index: 3;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: rotate(5deg);
}

.foundation-badge::before {
    content: '';
    position: absolute;
    width: calc(100% + 10px);
    height: calc(100% + 10px);
    top: -5px;
    left: -5px;
    border: 1px dashed rgba(24, 50, 173, 0.5);
    border-radius: 25px;
    animation: spin 20s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Styles responsifs */
@media (max-width: 992px) {
    .history-content {
        flex-direction: column-reverse;
        height: auto;
    }
    
    .history-image {
        width: 100%;
        max-width: 100% !important;
        height: 350px;
    }
    
    .history-text {
        width: 100%;
        height: auto;
    }
    
    .history-image::before {
        clip-path: polygon(0% 0%, 100% 0%, 100% 85%, 0% 100%);
    }
    
    .history-text {
        padding: 40px 30px !important;
    }
    
    .history-section h2 {
        font-size: 2.2rem;
    }
    
    .foundation-badge {
        top: 20px;
        right: 20px;
    }
}

@media (max-width: 768px) {
    .history-section {
        padding: 80px 0 !important;
    }
    
    .history-image {
        height: 280px;
        width: 100%;
    }
    
    .history-image::after {
        bottom: 30px;
        left: 20px;
        font-size: 1.5rem;
    }
    
    .history-section h2 {
        font-size: 1.8rem;
    }
    
    .history-text p.main-text {
        font-size: 1rem;
    }
    
    .simple-list li {
        padding-left: 30px;
    }
    
    .simple-list li::before {
        width: 18px;
        height: 18px;
    }
    
    .simple-list li::after {
        left: 5px;
        font-size: 0.75rem;
    }
}

/* Animation de surbrillance pour simuler une activité */
@keyframes highlight {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Ajouter un peu d'interactivité supplémentaire */
.interaction-hint {
    position: absolute;
    bottom: 15px;
    right: 15px;
    font-size: 0.75rem;
    color: var(--about-accent);
    opacity: 0.7;
    font-style: italic;
}

/* Styles pour la fenêtre modale d'histoire */
.history-modal-content {
    max-width: 800px;
    width: 90%;
    max-height: 85vh;
}

.history-modal-content .modal-header {
    background: var(--about-gradient);
    padding: 20px 30px;
    border-radius: var(--about-border-radius) var(--about-border-radius) 0 0;
}

.history-modal-content .modal-header h3 {
    color: #fff;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    text-align: center;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.history-modal-content .modal-body {
    padding: 30px;
    background: #fff;
    overflow-y: auto;
    max-height: calc(85vh - 80px);
}

.modal-text {
    font-size: 1rem;
    line-height: 1.6;
    color: #444;
    margin-bottom: 16px;
    text-align: justify;
}

.history-modal-content h4 {
    color: var(--about-primary);
    font-size: 1.4rem;
    margin: 30px 0 15px;
    position: relative;
    padding-left: 18px;
    font-weight: 700;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}

.history-modal-content h4::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--about-gradient);
    border-radius: 50%;
    transition: all 0.3s ease-out;
    box-shadow: 0 0 0 rgba(24, 50, 173, 0.2);
}

.history-modal-content h4:hover {
    transform: translateX(5px);
    color: #001F5B;
}

.history-modal-content h4:hover::before {
    transform: translateY(-50%) scale(1.5);
    box-shadow: 0 0 10px rgba(24, 50, 173, 0.5);
}

.section-title {
    position: relative;
    overflow: hidden;
    padding-bottom: 5px;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, rgba(24, 50, 173, 0), rgba(24, 50, 173, 0.3), rgba(24, 50, 173, 0));
    bottom: 0;
    left: 0;
}

.history-modal-content h5 {
    color: var(--about-dark);
    font-size: 1.2rem;
    margin: 20px 0 10px;
    font-weight: 600;
}

.vision-block, .team-block, .founder, .alliance {
    background: rgba(248, 250, 252, 0.6);
    padding: 20px;
    border-radius: var(--about-border-radius);
    margin: 20px 0;
    border-left: 3px solid var(--about-primary);
}

.founder {
    background: rgba(248, 250, 252, 0.3);
    border-left: 3px solid var(--about-secondary);
    padding: 15px 20px;
    margin: 15px 0;
}

.alliance {
    background: linear-gradient(135deg, rgba(24, 50, 173, 0.05) 0%, rgba(0, 142, 57, 0.05) 100%);
    border: 1px solid rgba(24, 50, 173, 0.1);
    border-left: 3px solid var(--about-accent);
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #fff;
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    z-index: 10;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.close:hover {
    opacity: 1;
    transform: rotate(90deg);
}