/* balises */

body {
    background-color: #cceced;
    color: rgba(0, 0, 0, 0.8);
    font-size: 18px;
    font-family :inter;
}
h1{
    font-weight: 900;
    font-size : 3em;
}
h1, h2, h3, button, nav {
    font-family : quicksand;
}
button {
    border: none;
    background : linear-gradient(145deg, #00c9c9, #009999);
    color: white;
    
    padding: 12px 20px;
    border-radius: 15px;
    
    font-family: quicksand;
    font-size: 1em;
    
    cursor: pointer;
    
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    -webkit-tap-highlight-color: transparent;
    transition: all 0.2s ease;
}

button:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
    transform: translateY(-2px);
}

button:active {
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
    transform: translateY(1px);
}

.image img {
    width :10em;
    border: double 3px #636363;
    border-radius: 50%;
}

#photoID {
    margin-left : 2em;
}

/* mise en page paragraphes */

section{
  padding-top: 3em;
  padding-bottom: 3em;
} 

#first, #second, #third {
  border-bottom : solid 2px #cceced ;
}

#main {
    background-color: #ffffff;
    color: #636363;
    width: 90%;
    box-shadow: 
        0 10px 30px rgba(0,0,0,0.2),
        inset 0 0 20px rgba(255,255,255,0.2);
    margin : 1em;
    padding: 1em;
    border-radius: 10px;
}

.grid {
    display: grid;
    grid-template-areas:
        "circle"
        "gridR"
        "gridB";
    
    grid-template-columns: 1fr;
    gap: 1em;
    
    text-align: center;
}
#gridR {
    grid-area: gridR;
}

#gridB {
    grid-area: gridB;
}
.centre{
    text-align: center ;
    align-items: center ;
    justify-content: center ;
    justify-items: center;
} 
.gauche{
    text-align: start;
}

#patientList {
    margin-left: auto;
    margin-right: auto;
    line-height: 2;
    display: flex;
    flex-direction: column-reverse;
}

/* Overlay (fond sombre) */
#annonce {
    position: fixed;
    z-index: 1000;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    
    display: flex;
    justify-content: center;
    align-items: center;

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}


#annonce.show {
    opacity: 1;
    pointer-events: auto;
}

.annonce-box {
    position: relative;
    background: white;
    padding: 25px 35px;
    border-radius: 12px;
    max-width: 400px;
     width: 90%;

    box-shadow: 0 20px 60px rgba(0,0,0,0.25);

    transform: translateY(-100vh);
    opacity: 0;
    transition: all 0.5s cubic-bezier(.22,1,.36,1); 
}

#annonce.show .annonce-box {
    transform: translateY(0);
    opacity: 1;
}

#annonce:not(.show) .annonce-box {
    transform: translateY(-100vh);
    opacity: 0;
}

/* Bouton fermer */
.close-btn {
    position: absolute;
    top: 10px;
    right: 12px;
    padding: 0 15px 0 15px;

    background: transparent;
    border: none;
    font-size: 2.5em;
    cursor: pointer;
    color: #666;

    transition: transform 0.2s ease, color 0.2s ease;
}

.close-btn:hover {
    transform: scale(1.2);
    color: #000;
}

/* flexbox */
.flexouille {
    display: flex;
    flex-direction: column;
}

.flexif {
    display: flex;
    flex-direction: row;
}

#footerDiv {
    display: flex;
    flex-direction: column;
    text-align: center;
}
#footerDiv div {
    border-bottom: solid 1px #ffffff;
}

/* barre nav */
#nav {
    position: sticky;
    top: 0;
    width: 98%;
    z-index: 900;

    margin: 1em 0;
}
#nav ul {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px;
    margin: 0;
    list-style: none;

    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    border-radius: 25px;

    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

#nav li {
    flex: 1;
    text-align: center;
}

#nav a {
    display: block;
    padding: 10px 5px;
    text-decoration: none;
    color: #636363;
    font-size: 0.85em;
    position: relative;
    transition: all 0.3s ease;
}

/* effet hover / tap */
#nav a:active {
    transform: scale(0.9);
}

/* actif stylé */
#nav a.active {
    color: #00a8a8;
    font-weight: bold;
}

/* petit indicateur en dessous */
#nav a.active::after {
    content: "";
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: #00a8a8;
    border-radius: 10px;
} 

/* éléments uniques*/

#circle {
    width: 10em;
    height: 10em;
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;
    justify-self: center ;
    grid-area: circle;
 
    margin: auto;

    color: black;

    box-shadow: 
        0 10px 30px rgba(0,0,0,0.2),
        inset 0 0 20px rgba(255,255,255,0.2);
}

.vert {
    background: linear-gradient(145deg, lightgreen, green);
}

.rouge {
    background: linear-gradient(145deg, #ff7f7f, #ff4c4c);
}

#circle p {
    font-size : 3em;
    color: white;
    font-family: quicksand;
}

.logo img {
    padding-top: 10px;
    animation: logoExplosion 1.2s ease-out;
}

@keyframes logoExplosion {
    
    0% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }
    
     70% {
        transform: scale(1.5) rotate(400deg);
    }
    90% {
        transform: scale(1.1) rotate(360deg);
    }
    
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 1;
    }
} 
#titre{
    animation: titreShow 2s ease ;
    color: #009999;
}

@keyframes titreShow {
    0% {
        opacity: 0;
        transform: translateY(-1em);
    }
    100%{
        opacity : 1;
        transform: translateY(0);
    }
}

#listePatients {
    text-align: left;
    max-width: 300px;
    margin: 1em auto;
}
/*tablets*/
@media (min-width: 768px) {

    #main {
        width: 80%;
        margin: 2em auto;
        padding: 2em;
    }

    .flexif {
        flex-direction: row;
        gap: 2em;
    }

    #first {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    #first .image img {
        width: 15em;
    }

    h1 {
        font-size: 3.5em;
    }

    #circle {
        width: 15em;
        height: 15em;
    }

    #listePatients {
        text-align: left;
        max-width: 400px;
        margin: 1em auto;
    }
}

/*ordi*/
@media (min-width: 1024px) {
    html{
    font-size: 20px;
    }
    #main {
        width: 70%;
        max-width: 1200px;
    }

    h1 {
        font-size: 4em;
    }

    #nav ul {
        max-width: 800px;
        margin: auto;
    }

    #circle {
        width: 15em;
        height: 15em;
    }

    section {
        padding: 4em 0 4em 0;
    }

    #listePatients {
        text-align: left;
        max-width: 400px;
        margin: 1em auto;
    }

    .grid {
        display: grid;
        grid-template-areas:
          "circle gridR"
          "gridB gridB";
        grid-template-columns: 1fr 1fr;
        gap: 1.5em;
        align-items: center;
    }
    #footerDiv {
        display: flex;
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        text-align: center;
    }
    #footerDiv div {
        border-bottom: none;
        padding: 0 3em;
    }
} 
/*énorme ecran*/
@media (min-width: 1400px) {

    #main {
        width: 60%;
    }

    h1 {
        font-size: 4.5em;
    }

    #circle {
        width: 15em;
        height: 15em;
    }
    .grid {
    display: grid;
    grid-template-areas:
        "circle gridR"
        "gridB gridB";
    
    grid-template-columns: 1fr 1fr;
    gap: 1.5em;
    
    align-items: center;
}
    #listePatients {
        max-width: 500px;
        margin: 1em auto;
        text-align: left;
    }
    #footerDiv {
        display: flex;
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        text-align: center;
    }
    #footerDiv div {
        border-bottom: none;
    }
}