/****************************************************************************************************************/
/*                                                  Général                                                     */
/****************************************************************************************************************/


body {
    margin: 0;
    font-family: "Helvetica", "Arial", sans-serif;
    background: url("https://www.toptal.com/designers/subtlepatterns/uploads/what-the-hex.png") repeat 0 0;
    animation: animate-bg 0.92s infinite linear;
}

h1 {
    font-size: 5em;
    text-align: center;
    color: #1E2A38;
}

h2 {
    font-size: 2em;
    color: #1E2A38;
}

h3 {
    font-size: 1.5em;
    color: #1E2A38;

}

p {
    font-size: 1em;
    color: #4B5563;
    text-align: justify;
}

main {
    background-color: #F3F4F6;
    width: 75%;
    margin: 0px auto;
    padding: 5%;
}

@keyframes  animate-bg {
    100% {
      background-position: 50px 50px;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5em;
    }
    h2 {
        font-size: 1.5em;
    }
    h3 {
        font-size: 1.2em;
    }

    main {
        width: 90%;
        padding: 1em;
    }

    header nav a {
        text-align: center;
        font-size: 1.1em;
    }
}



/****************************************************************************************************************/
/*                                                  Header                                                      */
/****************************************************************************************************************/

header {
    background-color: #FFFFFF;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0px;
    z-index: 1;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    height: 3em;
}

header nav {
    display: flex;
    gap: 20px;
    align-items: center;
    flex: 1;
}

header nav button {
    margin-left: auto;
    background-color: #4A90E2;
    color: white;
    padding: 8px 12px;
    border-radius: 1.5em;
    font-weight: bold;
    border: none;
    transition: background-color 0.3s;
}

header a {
    text-decoration: none;
    color: #1E2A38;
    font-weight: bold;
    padding: 10px 14px;
    border-radius: 1.5em;
    transition: background-color 0.3s;
}

header a:hover {
    background-color: #4A90E2;
    color: white;
}

header nav button,
header nav a:nth-child(4) {
    background-color: #4A90E2;
    color: white;
    padding: 10px 14px;
    border-radius: 1.5em;
    font-weight: bold;
    transition: background-color 0.3s;
    border: none;
}

header nav button:hover,
header nav a:nth-child(4):hover {
    background-color: #1E2A38;
    border: none;
}

header > button {
    display: none;
    font-size: 2em;
    background: none;
    border: none;
    color: #1E2A38;
    cursor: pointer;
    position: absolute;
    top: 0.5em;
    left: 0.5em;
    z-index: 2;
}

header select {
    left: 0;
}


@media (max-width: 768px) {

    header > button {
        display: block;
    }

    header > nav {
        flex-direction: column;
        position: fixed;
        top: 0;
        left: -120%;
        height: 100vh;
        width: 50%;
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        padding-top: 60px;
        gap: 1.5em;
        transition: left 0.3s ease-in-out;
        z-index: 1;
        display: flex;
        border: 1px solid #1E2A38;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);


    }

    header[data-open="true"] > nav {
        left: 0;
    }

    header nav a {
        width: 6em;
        padding: auto;
    }
    header nav {
        padding: 1em;
    }
    header nav a:first-child {
        margin-top: 5em;
    }

    header nav button {
        margin-right: auto;
        width: 10em;
        padding: auto;
        
    }

}

/****************************************************************************************************************/
/*                                              Page Index                                                      */
/****************************************************************************************************************/

#index > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2em;
}

#index section {
    background-color: #ffffff;
    border-radius: 1.5em;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 2em;
    transform: scale(1);
    transition: background-color 0.4s ease, 
                color 0.4s ease, 
                transform 0.4s ease;
    cursor: default;
}

#index section:hover {
    transform: scale(1.03);
}

#index > section:first-child h1 {
    text-align: center;
}

#index > section:nth-child(2) {
    margin: 3em 0;
}

#index section:nth-of-type(2) h3 {
    margin-top: 15px;
}

#index section:nth-of-type(2) p {
    line-height: 1.6;
}

#index section h1,
#index section h2,
#index section h3 {
    margin-bottom: 10px;
    transition: color 0.4s ease;
}

#index section h2 {
    text-align: center;
}

#index section p {
    transition: color 0.4s ease;
}

#index section:nth-last-of-type(-n+3) p {
    max-width: 700px;
    margin: 0 auto;
}

#index section[onclick] {
    cursor: pointer;
}

#index section[onclick]:hover {
    background: linear-gradient(140deg, #4A90E2, #1E2A38);
   
}

#index section[onclick]:hover h1,
#index section[onclick]:hover h2,
#index section[onclick]:hover h3,
#index section[onclick]:hover p {
    color: white;
}

#index div a {
    position: relative;
    text-decoration: none;
    color: inherit;
}

#index > div a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 0;
    background: currentColor;
    transition: width 0.3s ease;
}

#index div a:hover::after {
    width: 100%;
}


#index > div section:first-child h1,
#index > div section:first-child p {
    color: white;
}
#index > div section:first-child {
    grid-column: 1 / 3;
    grid-row: 1;
    text-align: center;
    background: linear-gradient(75deg, #4A90E2, #1E2A38);
    position: relative;
    overflow: hidden;
}
#index > div section:first-child::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 200"><path fill="rgba(255,255,255,0.1)" d="M0,100 C150,200 350,0 500,100 C650,200 850,0 1000,100 L1000,200 L0,200 Z"/></svg>') no-repeat bottom;
    background-size: cover;
}

#index > div section:nth-child(2) {
    grid-column: 1;
    grid-row: 2 / 3;
}

#index > div section:nth-child(3) {
    grid-column: 2;
    grid-row: 2 / 4;
}

#index > div section:nth-child(4) {
    grid-column: 1;
    grid-row: 3 / 4;
}

#index > div section:nth-child(5) {
    grid-column: 1;
    grid-row: 4 / 6;
}

#index > div section:nth-child(6) {
    grid-column: 2;
    grid-row: 4;
}

#index > div section:nth-child(7) {
    grid-column: 2;
    grid-row: 5;
}

/****************************************************************************************************************/
/*                                                  Projet                                                      */
/****************************************************************************************************************/

#projet > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2em;
}

#projet > div > section {
    background-color: white;
    border-radius: 1.5em;
    padding: 1.25em;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 1em;
    transition: transform 0.3s, background-color 0.3s;
    cursor: default;
}
#projet > div > section:not(:nth-child(1)):not(:nth-child(15)) {
    cursor: pointer;
}
#projet > div > section:not(:nth-child(1)):not(:nth-child(15)):hover {
    background: linear-gradient(140deg, #4A90E2, #1E2A38);
    transform: scale(1.02);

}

#projet > div > section:not(:nth-child(1)):not(:nth-child(15)):hover h2,
#projet > div > section:not(:nth-child(1)):not(:nth-child(15)):hover p {
    color: white;
}

#projet > div > section img {
    width: 100%;
    border-radius: 1em 1em 0px 0px;
    object-fit: cover;
}

#projet > div > section a img {
    width: 2.2em;
    margin-right: 0.5em;
    transition: transform 0.3s;
}

#projet > div > section a img:hover {
    transform: scale(1.2);
}

#projet > div > section:nth-child(1),
#projet > div > section:nth-child(15) {
    grid-column: 1 / -1;
}

#projet > div > section > div:nth-child(3) {
    display: flex;
    flex-direction: row ;
}

#projet h2 {
    margin-top: 0px;
    margin-bottom: 0px;
}


@media (max-width: 768px) {
    #projet > div > section {
        padding: 1em;
    }

    #projet > div > section a img {
        width: 1.8em;
    }


    #index > div section {
        grid-column: auto !important;
        grid-row: auto !important;
    }

    #index > div {
        display: flex;
        flex-direction: column;
        gap: 2em;
    }


}



/****************************************************************************************************************/
/*                                                  Contact                                                     */
/****************************************************************************************************************/



#contact section {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1em;
}

#contact section a {
    display: flex;
    align-items: center;
    gap: 1em;
    background-color: #F3F4F6;
    padding: 0.75em 1em;
    border-radius: 1.5em;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    color: #1E2A38;
    font-weight: bold;
    text-decoration: none;
    transition: transform 0.3s, background-color 0.3s;
}

#contact section img {
    width: 1em;
    height: 1em;
}

#contact section a:hover {
    background-color: #4A90E2;
    color: white;
    transform: scale(1.05);
}

#contact form {
    padding: 0em 2em 2em 2em;
    display: flex;
    flex-direction: column;
    gap: 1em;
}

#contact form label {
    display: flex;
    flex-direction: column;
    color: #1E2A38;
    font-weight: bold;
}

#contact form input,
#contact form textarea {
    padding: 0.8em;
    border-radius: 1.5em;
    border: 1px solid #1E2A38;
    margin-top: 0.25em;
    resize: vertical;
}

#contact form input:focus,
#contact form textarea:focus {
    border-color: #4A90E2;
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

#contact form button {
    background-color: #4A90E2;
    color: white;
    padding: 0.8em;
    border: none;
    border-radius: 1.5em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#contact form button:hover {
    background-color: #1E2A38;
}

#contact iframe {
    width: 100%;
    height: 15em;
    border: none;
    border-radius: 1.5em;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

#contact iframe:hover {
    transform: scale(1.05);
}

#contact > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2em;
}

#contact > div > div:first-child {
    grid-column: 1;
    grid-row: 1;
}
#contact > div > div:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
}
#contact > div > div:nth-child(3) {
    grid-column: 1 / 3;
    grid-row: 2;
}

#contact > div > div {
    background-color: #ffffff;
    border-radius: 1.5em;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 2em;
}


@media (max-width: 768px) {

    #contact > div > div:first-child,
    #contact > div > div:nth-child(2),
    #contact > div > div:nth-child(3) {
        grid-column: auto;
        grid-row: auto;
    }

    #contact form {
        padding: 1em;
    }   

    #contact > div {
        display: flex;
        flex-direction: column;
        gap: 1em;
    }
}


/****************************************************************************************************************/
/*                                          Les pages Projets                                                   */
/****************************************************************************************************************/

#proj > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2em;
}

#proj section:first-child {
    grid-row: 1;
    grid-column: 1;
}

#proj section:nth-child(2) {
    grid-row: 1;
    grid-column: 2;
}

#proj section:nth-child(3) {
    grid-row: 2;
    grid-column: 1 / 3;
}
#proj section {
    background-color: white;
    border-radius: 1.5em;
    padding: 2em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    
}

#proj section > button {
    background-color: #1E2A38;
    color: white;
    cursor: pointer;
    padding: 1em;
    width: 100%;
    text-align: left;
    font-size: 1.1rem;
    border: none;
    border-radius: 1.5em;
    margin: 0.5em 0 0;
    transition: background-color 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);

}

#proj section > button:hover {
    background-color: #4A90E2;
}

#proj section > div {
    padding: 0 1em;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background-color: #f0f4f8;
    border-radius: 1.5em;
    margin-bottom: 1em;
}

#proj section > div p {
    padding-top: 1em;
}
#proj section > div video,
#proj section > div img {
    max-width: 60em;
    max-height: 30em;
    display: block;
    margin: 1em auto;
    border-radius: 1.5em;
}

#proj section:nth-child(2) ul li {
  list-style: none;
  margin: 1em 0;
  display: flex;
  align-items: center;
  gap: 0.5em;
}

#proj section:nth-child(2) ul li a {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    position: relative;
    text-decoration: none;
    color: inherit;
}

#proj section:nth-child(2) ul li a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.3s ease-in-out;
}

#proj section:nth-child(2) ul li a:hover::after {
    width: 100%;
}


#proj > div section:first-child() p a:nth-child(4) {
    position: relative;
    text-decoration: none;
    color: inherit;
}

#proj > div section:first-child() p a:nth-child(4)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 0;
    background: currentColor;
    transition: width 0.3s ease;
}

#proj > div section:first-child() p a:nth-child(4):hover::after {
    width: 100%;
}



#proj section:nth-child(2) ul li img {
    width: 1.5em;
    height: auto;
}
#proj section p a {
    position: relative;
    text-decoration: none;
    color: inherit;
}

#proj section p a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 0;
    background: currentColor;
    transition: width 0.3s ease;
}

#proj section p a:hover::after {
    width: 100%;
}
   #proj section > div img,
.carousel-container img {
    max-width: 100%;
    height: auto;
}
@media (max-width: 768px) {
    #proj section:first-child,
    #proj section:nth-child(2),
    #proj section:nth-child(3) {
        grid-column: auto;
        grid-row: auto;
    }

 
}



/****************************************************************************************************************/
/*                                                  Footer                                                      */
/****************************************************************************************************************/

footer {
background: linear-gradient(135deg,
  #1E2A38 0%, 
  #1E2A38 50%, 
  #4A90E2 100%);
    color: white;
    padding-top: 2em;
    padding-bottom: 1em;
}

footer > div:first-child {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1100px;
    margin: 0 auto;
    gap: 30px;
}

footer > div div {
    flex: 1 1 250px;
    min-width: 200px;
}

footer > div div h3 {
    margin-bottom: 10px;
    color: #ffffff;
}

footer > div div ul {
    list-style: none;
    padding: 0;
}

footer > div div li {
    margin-bottom: 8px;
}

footer > div div:first-child ul a,
footer > div div:nth-child(2) ul a {
    position: relative;
    text-decoration: none;
    color: inherit;
}

footer > div div:first-child ul a::after,
footer > div div:nth-child(2) ul a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 0;
    background: currentColor;
    transition: width 0.3s ease;
}

footer > div div:first-child ul a:hover::after,
footer > div div:nth-child(2) ul a:hover::after {
    width: 100%;
}


footer > div > div ul {
    margin: 1em;
}

footer > div div:nth-child(3) a {
    background-color: #E5E7EB;
    padding: 0.5em;
    border-radius: 1.5em;
    margin: 0.5em;
}
footer > div div:nth-child(3) a img {
    width: 24px;
    height: 24px;
    vertical-align: middle;
}
footer > div div:nth-child(3) li {
    margin-top: 1em;
}


footer p, 
footer h2, 
footer a {
    color: white;
    text-decoration: none;
}

footer > div:nth-child(2) {
    margin-top: 30px;
    border-top: 1px solid #E5E7EB;
    padding-top: 15px;
}

footer > div:nth-child(2) p {
    text-align: center;
}



/* === FOOTER RESPONSIVE === */
@media (max-width: 768px) {
    footer > div:first-child {
        flex-direction: column;
        gap: 2em;
        padding: 1em;
    }

    footer > div div {
        flex: 1 1 100%;
    }

    footer > div:nth-child(2) p {
        font-size: 0.9em;
    }
    footer > div div h3 {
    font-size: 1.2em;
  }
}

* {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}


.carousel-container {
    width: 50em;
    overflow: hidden;

    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0px auto; /* centrer avec auto + ajouter un peu d'espace */
    max-width: 100%; /* s'assurer qu'il ne dépasse pas */
}



.slides2 {
    display: flex;
    width: 100%;
    animation: slide2 10s infinite;
}

.slide2 {
    width: 100%;
    flex-shrink: 0;
}

.slides3 {
    display: flex;
    width: 100%;
    animation: slide3 10s infinite;
}

.slide3 {
    width: 100%;
    flex-shrink: 0;
}

.slides4 {
    display: flex;
    width: 100%;
    animation: slide4 16s infinite;
}

.slide4 {
    width: 100%;
    flex-shrink: 0;
}
.slides5 {
    display: flex;
    width: 100%;
    animation: slide5 20s infinite;
}

.slide5 {
    width: 100%;
    flex-shrink: 0;
}


.slides11 {
    display: flex;
    width: 100%;
    animation: slide11 33s infinite;
}

.slide11 {
    width: 100%;
    flex-shrink: 0;
}   




@keyframes slide2 {
    0%    { transform: translateX(0%); }
    45%   { transform: translateX(0%); }
    50%   { transform: translateX(-100%); }
    95%   { transform: translateX(-100%); }
    100%  { transform: translateX(0%); }
}

@keyframes slide3 {
  0%    { transform: translateX(0%); }
  30%   { transform: translateX(0%); }
  33.33% { transform: translateX(-100%); }
  63.33% { transform: translateX(-100%); }
  66.66% { transform: translateX(-200%); }
  96.66% { transform: translateX(-200%); }
  100%  { transform: translateX(0%); }
}

@keyframes slide4 {
  0%    { transform: translateX(0%); }
  25%   { transform: translateX(0%); }

  26%   { transform: translateX(-100%); }
  50%   { transform: translateX(-100%); }

  51%   { transform: translateX(-200%); }
  75%   { transform: translateX(-200%); }

  76%   { transform: translateX(-300%); }
  100%  { transform: translateX(-300%); }
}


@keyframes slide5 {
    0%    { transform: translateX(0%); }
    20%   { transform: translateX(0%); }
    25%   { transform: translateX(-100%); }
    40%   { transform: translateX(-100%); }
    45%   { transform: translateX(-200%); }
    60%   { transform: translateX(-200%); }
    65%   { transform: translateX(-300%); }
    80%   { transform: translateX(-300%); }
    85%   { transform: translateX(-400%); }
    100%  { transform: translateX(-400%); }
}



@keyframes slide11 {
  0%     { transform: translateX(0%); }
  9.09%  { transform: translateX(0%); }

  9.1%   { transform: translateX(-100%); }
  18.18% { transform: translateX(-100%); }

  18.2%  { transform: translateX(-200%); }
  27.27% { transform: translateX(-200%); }

  27.3%  { transform: translateX(-300%); }
  36.36% { transform: translateX(-300%); }

  36.4%  { transform: translateX(-400%); }
  45.45% { transform: translateX(-400%); }

  45.5%  { transform: translateX(-500%); }
  54.54% { transform: translateX(-500%); }

  54.6%  { transform: translateX(-600%); }
  63.63% { transform: translateX(-600%); }

  63.7%  { transform: translateX(-700%); }
  72.72% { transform: translateX(-700%); }

  72.8%  { transform: translateX(-800%); }
  81.81% { transform: translateX(-800%); }

  81.9%  { transform: translateX(-900%); }
  90.90% { transform: translateX(-900%); }

  91.0%  { transform: translateX(-1000%); }
  100%   { transform: translateX(-1000%); }
}
