:root{
    --color-principal:rgb(79 70 229);
    --color-principal-hover:rgba(78, 70, 229, 0.8);
    --color-footer-texte: rgb(156 163 175);
}
html{
    background-color: whitesmoke;
}
header .container {
    display: flex
;
    justify-content: space-between;
    align-items: center;
    padding-left: 5rem;
    background-color: white;
    width: calc(100% - 40px);
}
.container-header {
    max-width: auto;
    margin: 10px auto;
    background: white;
    padding: 13px !important;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-left: 20px;
    margin-right: 20px;
    margin-bottom: 10px;
}
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #333;
}

footer {
    background: rgb(17 24 39);
    padding: 1rem;
}

nav a {
    margin-right: 15px;
    color: #333;
}


.btn {
    display: inline-block;
    padding: 10px 20px;
    background: #007BFF;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
}

.features,
.languages {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

/* .feature,
.language {
    flex: 1;
    background: #fafafa;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
} */

.dashboard .section {
    margin-bottom: 30px;
}

.card {
    background: #fafafa;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
}

.progress {
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    height: 12px;
    margin: 8px 0;
}

.progress div {
    height: 100%;
    background: #28a745;
}


*{
    transition-duration: 150ms;
    text-decoration: none;
    box-sizing: border-box;
}

/* ==========Header========== */

.navlogo{
    display: flex;
    align-items: center;
}
.navlogo-a:hover{
    scale: 1.05;
    opacity: .8;
}

nav a:hover{
    color:var(--color-principal-hover);    
}
.login,
.register,.logout{
    color: var(--color-principal);
    text-decoration: none;
    padding: 0.7rem;
    border-radius: 5px;
    border: 0px;
    white-space: nowrap;
}

.login{    
    border: 1px solid var(--color-principal);
}
.register,.logout{
    background-color: var(--color-principal);
    color:white;
}

.login:hover{    
    background: #f4f4f483;
}
.register:hover,.logout:hover{
    color:white;
    background-color: var(--color-principal-hover);
}

.logo{
    /* width: 2.5rem; */
    height: 2.5rem;
}

.header-danger{
    background-color: rgba(255, 0, 0, 0.251);
    border-radius:10px;
    
}
.header-danger:hover{
    background-color: rgba(232, 1, 1, 0.432) !important;
}

/* ==========Footer========== */

footer *,footer p{
    color:var(--color-footer-texte)
}

footer h4{
    color:white;
}
.logoReseauIcon{
    color: var(--color-footer-texte); ;
}

footer .container2{
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}
footer .container2 >div{
    max-width: 25%;
}

footer ul{
    list-style: none;
    margin: 0;
    padding: 0;
}

footer ul li i{
    margin: 10px;
}

.containerBasPage{
    display: flex;
    justify-content: space-between;
    text-align: center;
    margin-top: 20px;
    color: var(--color-footer-texte);
border-top: 1px solid rgb(31 41 55 );
}

.containerBasPage .droit{
    display: flex;
    gap:1rem;
}

footer a:hover{
    color:whitesmoke;    
}


footer .container {
    width: 90%;
    /* max-width: 1200px; */
    margin: 20px auto;
}



.logo-footer{
    background: #f1F1F1;
    border-radius: 10px;
    padding: 2px;
    width: min-content;
    height: min-content;
    display: flex;
}

.logo-footer .logo{
    margin: 0;
    padding: 0;
}




/* ==========Main========== */

.popUp-general {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    overflow-x: hidden;
    z-index: 9;
}

.alert {
    position: relative;
    padding: 10px 15px;
    max-width: 300px;
    color: white;
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
    opacity: 1;
    transform: translateX(0);
    animation-fill-mode: forwards;
}

.alert::after {
    content: "";
    position: absolute;
    height: 5px;
    bottom: 0;
    left: 0;
    width: 100%;
    
}

/* SUCCESS */
.alert-success {
    background-color: #28a745;
    animation: hide-alert 5s forwards;
}
.alert-success::after {
    background-color: #b7f0a1;
    animation: shrink-alert 5s linear forwards;
}

/* ERROR */
.alert-error {
    background-color: #e74c3c;
    animation: hide-alert 7s forwards;
}
.alert-error::after {
    background-color: #f5a6a0;
    animation: shrink-alert 7s linear forwards;
}

/* INFO */
.alert-info {
    background-color: #3867d6;
    animation: hide-alert 4s forwards;
}
.alert-info::after {
    background-color: #85b0f9;
    animation: shrink-alert 4s linear forwards;
}

@keyframes shrink-alert {
    0% { width: 100%; opacity: 1; transform: translateX(0); }
    100% { width: 0%; opacity: 0; transform: translateX(120%); }
}

@keyframes hide-alert {
    0%   { opacity: 1; transform: translateX(0); max-height: 200px; margin-bottom: 10px; padding: 10px 15px; }
    80%  { opacity: 1; transform: translateX(0); max-height: 200px; margin-bottom: 10px; padding: 10px 15px;}
    90% { transform: translateX(120%); max-height: 0; max-height: 200px; margin-bottom: 10px; padding: 10px 15px;}
    100% { opacity: 0; transform: translateX(120%); max-height: 0; margin-bottom: 0; padding: 0; }
}


.hero {
    position: relative;
/* TODO remplacer l'image ia ici car pas bien*/
/*    background-image: url(https://readdy.ai/api/search-image?query=A%20modern%20abstract%20tech%20background%20with%20subtle%20code%20patterns%20and%20programming%20symbols.%20The%20left%20side%20has%20a%20smooth%20gradient%20transitioning%20to%20a%20clean%20white%20space%20for%20text.%20The%20right%20side%20features%20elegant%20visualization%20of%20programming%20concepts%20with%20blue%20and%20purple%20accents.%20The%20image%20has%20a%20minimalist%2C%20professional%20aesthetic%20suitable%20for%20a%20coding%20education%20platform.%20The%20transition%20between%20left%20and%20right%20must%20be%20seamless%20and%20natural.&width=1600&height=800&seq=hero123&orientation=landscape);
*/  background-size: cover;
  background-position: center;
  overflow: hidden;
  padding: 6rem 1rem;

  border-radius: 14px;
  margin: 20px;
}

.bg-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.1));
  z-index: 1;
  pointer-events: none;
}

.content {
  position: relative;
  z-index: 2;
  max-width: 90%;
  margin: 0 auto;
  padding: 0 1rem;
}

.text-container {
  max-width: 700px;
}

h1 {
  font-size: 2.5rem;
  font-weight: bold;
  color: #111827;
  margin-bottom: 1rem;
}

p {
  font-size: 1.25rem;
  color: #374151;
  margin-bottom: 2rem;
}

.buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary {
  background-color: #5b3df9;
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
  height: min-content;
  white-space: nowrap;
}

.btn-primary:hover {
  background-color: #4930cc;
}
.btn-primary:disabled {
    background-color: #4a30ccb0;
    cursor: not-allowed;
}
.btn-primary:disabled:hover {
    background-color: #4a30ccb0;
    cursor: not-allowed;
}

.btn-secondary {
  background-color: white;
  color: #1f2937;
  border: 1px solid #d1d5db;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn-secondary:hover {
  background-color: #f9fafb;
}

.btn-danger{
    background-color: rgb(252, 0, 0);
    color: #f7f8f9;
    border: 1px solid #f9052a;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}


.btn-danger:hover {
    background-color: #f20808;
}

.btn-a{
    padding: 7px 14px !important;
    margin: 0px !important;
}


/* feature */

.text-center{
    text-align: center;
    padding-top: 3rem;
    padding-bottom: 3rem;
}
.text-center p{
    max-width: 40rem;
    margin-left: auto;
    margin-right: auto;
}

.features-flex{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.feature,.card-cours{
    --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --tw-ring-offset-shadow: 0 0 #0000;
    --tw-ring-shadow: 0 0 #0000;
    flex: 1;
    /* background-color: rgb(249 250 251); */
    background-color: white;
    padding: 1.5rem;
    border-radius: 16px;

}

.feature:hover, .card-cours:hover{
    /* box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px; */
    box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
}

.feature-icon, .icon-cours{
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgb(79 70 229 / 0.1);
    width: 3.5rem;
    height: 3.5rem;
    margin-bottom: 1rem;
    border-radius: 50%;
    color: rgb(79 70 229);
}


/* commencer mtn */

.cta {
  background-color: #f5f6ff; /* Fond clair légèrement bleuté */
  text-align: center;
  padding: 4rem 1rem;
}

.cta h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 1rem;
}

.cta p {
  font-size: 1.125rem;
  color: #4b5563;
  margin-bottom: 2rem;
}

.cta .btn-primary {
  display: inline-block;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  background-color: #5b3cc4;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.cta .btn-primary:hover {
  background-color: #4b30a3;
}




/* login & register */
.login-container,
.register-container {
  max-width: 400px;
  margin: 3rem auto;
  background-color: #ffffff;
  padding: 2rem;
  border-radius: 1.25rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.login-container h1,
.register-container h1 {
  text-align: center;
  font-size: 1.8rem;
  color: #111827;
  margin-bottom: 1.5rem;
}

.login-container form label,
.register-container form label {
  display: block;
  margin-bottom: 1rem;
  font-weight: 500;
  color: #374151;
}

.login-container input,
.register-container input {
  width: 100%;
  padding: 0.65rem;
  margin-top: 0.3rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 1rem;
}

.login-container button,
.register-container button {
  background-color: #5b3cc4;
  color: #fff;
  border: none;
  padding: 0.75rem;
  width: 100%;
  border-radius: 0.5rem;
  font-weight: bold;
  font-size: 1rem;
  margin-top: 1.2rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.login-container button:hover,
.register-container button:hover {
  background-color: #4b30a3;
}

.login-container p,
.register-container p{
  text-align: center;
  margin-top: 1rem;
}

 
.continueWith {
    display: flex;
    gap: 10px;
    margin: 20px;
    justify-content: space-around;
    position: relative;
    border-top: 1px solid #d1d5db;
    padding-top: 20px;
}

 
.continueWith a{
    border: 1px solid rgb(191, 191, 191);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
}
.continueWith a:hover{
    background-color: #f3f4f6;
}

.separateur{
    position: absolute;
    top: 0;
    translate: 0 -50%;
    display: flex;
    margin: 0 !important;
    background-color: white;
    padding: 5px;
    padding-top: 0px;
}

.login-container a,
.register-container a {
  color: #5b3cc4;
  text-decoration: none;
}

.login-container a:hover,
.register-container a:hover {
  text-decoration: underline;
}

.login-container .auth-errors,
.register-container .auth-errors {
  background-color: #fee2e2;
  color: #b91c1c;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.conditions-utilisation{
    display: flex;
}
.conditions-utilisation input{
    width: min-content;
    height: min-content;
    margin-right: 10px;
}



/* page cours index */
.container-cours{
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: flex-start;
    margin: 2rem;
}

.exo-dispo-texte{
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-cours{
    min-width: 250px;
    max-width: 25%;
    width: 24%;
    flex: auto;
}
.card-cours a{
    color:black;
}
.card-cours h3{
    margin: 0;
    margin-bottom: .5rem;
}
.card-cours p{
    color:rgb(75 85 99);
    margin: 0;
    margin-bottom: 1rem;
}

.icon-cours{
    border-radius: 16px;
    width: 4rem;
    height: 4rem;
    color:rgb(37 99 235);
}

.card-cours:hover .icon-cours{
    background-color: rgba(78, 70, 229, 0.211);
}



/* scroll bar */

::-webkit-scrollbar {
    width: 6px;              
    height: 6px;             
}

::-webkit-scrollbar-track {
    background: #f1f1f1;     
}

::-webkit-scrollbar-thumb {
    background-color: #aaa;  
    border-radius: 3px;      
}

::-webkit-scrollbar-thumb:hover {
    background-color: #888;
}


* {
    scrollbar-width: thin;
    scrollbar-color: #aaa #f1f1f1; 
}



body {
    background: #f4f6f9;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.container-create {
    max-width: 800px;
    margin: 40px auto;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

h2 {
    /* text-align: center; */
    margin-bottom: 30px;
    font-weight: 600;
    color: #333;
}

.form-label {
    font-weight: 500;
    margin-bottom: 8px;
    color: #444;
    width: 80px;
}
.form-label-large {
    width: 150px;
}

.form-control,
.form-select {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 15px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus,
.form-select:focus {
    border-color: #4b7bec;
    box-shadow: 0 0 0 3px rgba(75, 123, 236, 0.2);
    outline: none;
}

.form-control.mt-2 {
    margin-top: 10px;
}


textarea.form-control {
    resize: vertical;
    width: calc(100% - 100px);
    min-height: 50px;
    max-height: 500px;
}

.mb-3 {
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
}
.btn{
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 8px;
    transition: background-color 0.3s ease;
    border: none;
    white-space: nowrap;
}

.btn-primary {
    background-color: #4b7bec;
    border-color: #4b7bec;
}

.btn-primary:hover {
    background-color: #3867d6;
    border-color: #3867d6;
}

.loader-dots::after {
    content: '...';
    animation: dots 1.5s steps(3, end) infinite;
}

@keyframes dots {
    0%, 20% {
        color: rgba(0,0,0,0);
        text-shadow:
            .25em 0 0 rgba(0,0,0,0),
            .5em 0 0 rgba(0,0,0,0);
    }
    40% {
        color: #000;
        text-shadow:
            .25em 0 0 rgba(0,0,0,0),
            .5em 0 0 rgba(0,0,0,0);
    }
    60% {
        text-shadow:
            .25em 0 0 #000,
            .5em 0 0 rgba(0,0,0,0);
    }
    80%, 100% {
        text-shadow:
            .25em 0 0 #000,
            .5em 0 0 #000;
    }
}

.import-label {
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 0.9rem;
    background: #f0f0f0;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    color: #333;
    transition: background 0.2s;
}

.import-label:hover {
    background: #ddd;
}

.d-none{
    display:none;
}



.fondView{
    width: 100%;
    background: #dbdbdb;
    padding: 10px;
    border-radius: 12px;
}
a.fondView:hover{
  color:#333 !important;
}





/* about */


.aboutSection > *{
    margin-top: 20px;
    margin-bottom: 20px;
}

.aboutPart:nth-child(2n),
.featurePart:nth-child(2n){
    flex-direction: row-reverse;
}
.aboutPart,
.featurePart{
    display:flex;
    justify-content: space-around;
    align-items: center;
}

.aboutPart .text,
.featurePart .text{
    /* background-color: white; */
    border-radius: 15px;
    padding: 15px;
    width: 40%;    
}

.aboutPart .image,
.featurePart .image{
    width: 40%;
    height: auto;
    display: flex;
    justify-content: center;
}

.aboutPart .text li,
.featurePart .text li{
    text-decoration: none;
    list-style: none;
    line-height: 30px;
}


.aboutPart .imgAbout,
.featurePart .imgFeature{
    /* width: 100%;
    border-radius: 10px; */
max-width: 100%;
    border-radius: 10px;
    max-height: 15rem;
}


/* .aboutPart .contact{
    display: flex;
    flex-direction: column;
    gap: 10px;
} */
.aboutPart .imgContact{
    width: 50%;
    align-items: center;
}


/* menu déroulant general */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    z-index: 1;
}

.dropdown-content a {
    display: block;
    padding: 8px 12px;
    text-decoration: none;
    color: black;
    margin:0px;
}

.dropdown-content a:hover {
    background: #ddd;
    border-radius:10px;
}

.dropdown:hover .dropdown-content {
    display: block;
    border-radius:10px;
}




@media(max-width: 1224px) {
    
    
    .exo-list {
        grid-template-columns: repeat(2, minmax(300px, 1fr))!important;
    }
    footer .container2, .containerBasPage{
        flex-direction: column;
    }

    footer .container2 >div {
        max-width: inherit;
    }
}


@media(max-width: 700px) {
    
    
    .exo-list {
        grid-template-columns: repeat(1, minmax(300px, 1fr)) !important;   
    }

    .info-cours{
        flex-direction: column;
    }

    .container-header{
        display: block !important;
    }

    .aboutPart{
        flex-direction: column;
    }
    
    .aboutPart:nth-child(2n) {
        flex-direction: column;
    }

    .aboutPart .image, .aboutPart .text{
        width: 90%;
    }
    .container-header nav{

        line-height: 2.2rem;
    }


    .container-cours .card-cours{
        width: 100%;
        max-width: 100%;
    }

    main{
        margin: 10px !important;
    }
    .separatorCursor{
        display: none;
    }


    .container-exo{
        flex-direction: column;
    }
    .container-exo > div{
        width: 100%;
    }

    .textBouton{
        display: none !important;
    }

    .menu-deroulant .contenu-menu{
        left: 50%;
        translate: -50%;
    }
}




.lien-setting{
    margin: 15px 0;
    cursor: pointer;
}
.lien-setting a{
    color: rgb(75 85 99) !important;
}
.lien-setting:hover a{
    color: var(--color-principal) !important;
}
    



/* page droit */
.site-policy-droit{
    margin: 2rem;
    background: whitesmoke;
    padding: 2rem;
    border-radius: 29px;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}

.site-policy-droit a:hover{
    color:var(--color-principal-hover);    
}

.site-policy-droit a{
    color: var( --color-footer-texte);
}
