/* ==========================================
   ARRIERE-PLAN ISLAMIQUE DECORATIF
   MAISON DU SAVOIR ET DE L'EXCELLENCE
   ========================================== */

html {
    min-height: 100%;
    background-color: #f5f1e6;
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    color: #24352c;

    /* Fond creme avec motifs geometriques */
    background-color: #f5f1e6;

    background-image:
        radial-gradient(
            circle at center,
            transparent 0 30px,
            rgba(183, 145, 62, 0.12) 31px 33px,
            transparent 34px
        ),
        repeating-conic-gradient(
            from 0deg,
            rgba(24, 92, 66, 0.045) 0deg 10deg,
            transparent 10deg 20deg
        ),
        linear-gradient(
            135deg,
            #fffdf7 0%,
            #f4efdf 50%,
            #eee8d5 100%
        );

    background-size:
        100px 100px,
        80px 80px,
        100% 100%;

    background-attachment: fixed;
}

/* Cartes de contenu */
section,
.service,
.enseignant {
    background-color: rgba(255, 253, 247, 0.94);
    border: 1px solid rgba(183, 145, 62, 0.22);
    border-radius: 16px;
    box-shadow: 0 6px 22px rgba(41, 65, 49, 0.08);
}

/* Garder le contenu au-dessus du fond */
main {
    position: relative;
}

/* Adaptation aux telephones */
@media screen and (max-width: 600px) {
    body {
        background-attachment: scroll;
    }

    section,
    .service,
    .enseignant {
        border-radius: 12px;
    }
}

header {
    background-color: #5971da;
    color: rgb(237, 230, 230);
    text-align: center;
    padding: 5px 10px;
    width: 98%;
    margin: 0 auto;
    box-sizing: border-box;
    border-radius: 12px;
}

nav a{
    color: rgb(255, 239, 19);
    text-decoration: none;
    margin: 15px;
    font-weight: bold;
}

main{
    width: 80%;
    margin: auto;
    padding: 20px;
}

section{
    background-color:white;
    padding: 20px;
    margin-top: 20px;
    border-radius: 10px;
}

h2{
    color: #08a958c2;
}

header img{
    width: 180px;
    border-radius: 50%;
    margin: 20px 0;
}

button,
.btn-inscription,
.btn-deconnexion {
    display: inline-block;
    background: linear-gradient(90deg, #6b3515, #0b9b70);
    color: white;
    border: none;
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.20);
    transition: 0.3s ease;
    display: block;
    width: fit-content;
    margin: 20px auto;
    padding: 14px 30px;
    border-radius: 50px;
}

button:hover,
.btn-inscription:hover,
.btn-deconnexion:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.30);
}

button:hover{
    background-color: hsl(152, 73%, 29%);
}

.services {
    display: flex;
    gap: 20px;
}

.service {
    flex: 1;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.service img {
    width: 70%;
    height: 150px;
    object-fit: cover;
    display: block;
    margin: 0 auto 15px auto;
    border-radius: 10px;
}

.enseignants {
    display: flex;
    gap: 20px;
}

.enseignant {
    flex: 1;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.enseignant img {
    width: 70%;
    height: 150px;
    object-fit: cover;
    display: block;
    margin: 0 auto 15px auto;
    border-radius: 50%;
} 

footer {
    background-color: #057215;
    color: white;
    text-align: center;
    padding: 30px;
    margin: 40px 20px 0;
    border-radius: 200px 200px 0 0;
}

.footer h3 {
    margin-bottom: 15px;
}

.footer p {
    margin: 8px 0;
}

body{
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
}

form{
    background-color: white;
    padding: 30px;
    border-radius:10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    margin: 50px auto;
    width:350px;
}

h1{
    text-align: center;
    color: #07482d;
}

label{
    font-weight: bold;
}

input{
    width:100%;
    padding:12px;
    margin-top:5px;
    margin-bottom: 15px;
    border:1px solid #ccc;
    border-radius:50px;
    box-sizing:border-box;
}

button{
    background-color: #0b5d3b;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 200px 200px 0 0;
    width: 100%;
    cursor: pointer;
    font-size: 18px;
}

button:hover{
    background-color: #bda75f;
}

.videos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 20px;
}

.video-card video {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
}

@media (max-width: 768px) {
    .videos-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 10px;
    }

    .videos-container video {
        height: 100px;
    }
}

.btn-inscription {
    display: inline-block;
    background: linear-gradient(135deg, #5d280b, #149b77);
    color: white;
    text-decoration: none;
    padding: 14px 30px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.btn-inscription:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.form-inscription {
    position: relative;
    max-width: 600px;
    margin: 50px auto;
    padding: 45px;
    background:
        radial-gradient(circle at 0% 0%, rgba(20, 155, 103, 0.18), transparent 30%),
        radial-gradient(circle at 100% 100%, rgba(11, 93, 59, 0.18), transparent 30%),
        linear-gradient(145deg, #ffffff, #f3faf7);

    border: 2px solid rgba(11, 93, 59, 0.18);
    border-radius: 28px;

    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.12),
        0 0 0 8px rgba(11, 93, 59, 0.03);

    overflow: hidden;
}

.form-inscription::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 7px;
    height: 100%;

    background: linear-gradient(
        to bottom,
        #0b5d3b,
        #149b67,
        #0b5d3b
    );

    border-radius: 28px 0 0 28px;
}

.form-inscription::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    width: 7px;
    height: 100%;

    background: linear-gradient(
        to bottom,
        #149b67,
        #0b5d3b,
        #149b67
    );

    border-radius: 0 28px 28px 0;
}

.form-inscription > * {
    position: relative;
    z-index: 2;
}

.form-inscription h1 {
    text-align: center;
    color: #0b5d3b;
    font-size: 32px;
    margin-bottom: 35px;
}

.form-inscription label {
    display: block;
    margin-top: 20px;
    margin-bottom: 8px;

    color: #123c2c;
    font-size: 16px;
    font-weight: bold;
}

.form-inscription input {
    width: 100%;
    box-sizing: border-box;

    padding: 15px 18px;

    border: 2px solid #dce8e3;
    border-radius: 14px;

    background: rgba(255, 255, 255, 0.9);

    font-size: 16px;

    outline: none;

    transition: all 0.3s ease;
}

.form-inscription input:focus {
    border-color: #149b67;

    box-shadow:
        0 0 0 4px rgba(20, 155, 103, 0.12);

    transform: translateY(-1px);
}

.btn-continuer {
    width: 100%;

    margin-top: 30px;
    padding: 16px;

    border: none;
    border-radius: 30px;

    background: linear-gradient(
        135deg,
        #0b5d3b,
        #149b67
    );

    color: white;

    font-size: 19px;
    font-weight: bold;

    cursor: pointer;

    box-shadow:
        0 8px 20px rgba(11, 93, 59, 0.25);

    transition: all 0.3s ease;
}

.btn-continuer:hover {
    transform: translateY(-4px);

    box-shadow:
        0 14px 28px rgba(11, 93, 59, 0.30);
}

@media (max-width: 768px) {

    .form-inscription {
        margin: 25px 15px;
        padding: 30px 22px;
        border-radius: 22px;
    }

    .form-inscription h1 {
        font-size: 27px;
    }
}

#connexion {
    width: 90%;
    max-width: 500px;
    margin: 60px auto;
    padding: 40px;
    background: white;
    border-radius: 25px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    text-align: center;
    border: 2px solid rgba(11, 91, 59, 0.15);
}

#connexion h1 {
    color: #0b5b3b;
    font-size: 32px;
    margin-bottom: 30px;
}

#connexion label {
    display: block;
    text-align: left;
    margin: 18px 0 8px;
    font-weight: bold;
    color: #333;
}

#connexion input {
    width: 100%;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 14px;
    font-size: 16px;
    box-sizing: border-box;
    outline: none;
    transition: 0.3s;
}

#connexion input:focus {
    border-color: #0b5b3b;
    box-shadow: 0 0 10px rgba(11, 91, 59, 0.15);
}

#connexion button {
    width: 100%;
    margin-top: 25px;
    padding: 15px;
    border: none;
    border-radius: 30px;
    background: linear-gradient(135deg, #0b5b3b, #159b72);
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
    transition: 0.3s;
}

#connexion button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.25);
}

#connexion a {
    color: #0b5b3b;
    font-weight: bold;
    text-decoration: none;
}

#connexion a:hover {
    text-decoration: underline;
}

#mot-de-passe-oublie a {
    color: #0b5b3b;
    font-weight: bold;
    text-decoration: none;
    transition: 0.3s;
}

#mot-de-passe-oublie a:hover {
    color: #159b72;
    text-decoration: underline;
}

.password-box {
    position: relative;
    width: 100%;
}

.password-box input {
    width: 100%;
    box-sizing: border-box;
    padding-right: 55px;
}

.password-box button {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    color: #087f5b;
    font-size: 22px;
    cursor: pointer;
    box-shadow: none;
}

.password-box button:hover {
    background: transparent;
    transform: translateY(-50%) scale(1.15);
    box-shadow: none;
}

.services {
    display: flex;
    gap: 25px;
    justify-content: center;
    flex-wrap: wrap;
}

.service {
    flex: 1;
    min-width: 250px;
    text-align: center;
}

.service img {
    width: 100%;
    max-width: 250px;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
}

.btn-service {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 18px;
    background: #2e9d68;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
}

.btn-service:hover {
    opacity: 0.85;
}

/* PROFESSEURS */
.enseignants {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

.enseignant {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.enseignant img {
    display: block;
    width: 70%;
    max-width: 180px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto 15px;
}

/* ADAPTATION AUX TÉLÉPHONES */
@media (max-width: 600px) {

    main {
        width: auto;
        max-width: 100%;
        margin: 0;
        padding: 10px;
        box-sizing: border-box;
    }

    section {
        padding: 12px;
        margin-top: 12px;
    }

    /* Deux vidéos par ligne */
    .videos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 8px;
    }

    .video-card {
        padding: 5px;
        margin: 0;
    }

    .video-card video {
        width: 100%;
        height: auto;
        aspect-ratio: 4 / 3;
        object-fit: contain;
    }

    .video-card h2 {
        font-size: 14px;
        line-height: 1.4;
        overflow-wrap: anywhere;
    }

    /* Deux professeurs par ligne :
       les cinq restent visibles en descendant la page. */
    .enseignants {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .enseignant {
        padding: 10px;
        overflow-wrap: anywhere;
    }

    .enseignant img {
        width: 85%;
        max-width: 150px;
        height: 120px;
        object-fit: cover;
    }

    nav a {
        display: inline-block;
        margin: 6px;
    }

    header {
        padding: 12px;
    }

    header img {
        max-width: 130px;
        width: 45%;
        height: auto;
    }

    footer {
        margin: 25px 8px 0;
        padding: 20px 10px;
        border-radius: 40px 40px 0 0;
    }
}

/* TABLETTES */
@media (min-width: 601px) and (max-width: 900px) {
    .videos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .enseignants {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    main {
        width: 92%;
        box-sizing: border-box;
    }
}


/* CORRECTION DE LA LARGEUR SUR TÉLÉPHONE */
@media screen and (max-width: 600px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    main {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 10px;
        box-sizing: border-box;
    }

    header,
    section,
    footer {
        max-width: 100%;
        box-sizing: border-box;
    }

    img,
    video {
        max-width: 100%;
    }
}