
/* ////////////////////////////////////////////////// GÉNÉRAL ////////////////////////////////////////////////// */

h1, h2, h3, h4, h5, h6, p, strong, em, a {
    margin-top: 0;
    color: #21154d;
}

body {
    max-width: 670px;
    margin: 3vw 3vw;
    text-align: center;
    font-family: 'ubuntu', "Trebuchert MS", sans-serif;
    font-size: 18px;
    background-color: #e1e4ed;
    background-image: url("images/motif.png");
    background-position: center;
    background-size: 80px;
    background-attachment:fixed;
}

section {
    padding: 20px;
    border-radius: 30px;
    box-shadow: 1.5px 1.5px 0 #d2cee0;
}
@media all and (min-width: 360px) {
    #form-ajout-msg {
        padding: 30px;
        padding-bottom: 32.5px;
    }
    #messages {
        padding: 40px 15px;
    }
}
@media all and (min-width: 720px) {
    body {
        margin: 5vw  auto;
    } 
    #form-ajout-msg {
        padding: 40px;
    }
    #messages {
        padding: 50px 40px;
    }
}
@media all and (min-width: 1080px) {
    body {
        max-width: 800px;
        margin: 5vw auto;
    } 
}

.bouton {
    position: relative;
    top: -3px;
    border: 0;
    font-size: 9vw;
    border-radius: 100%;
    background: white;
    box-shadow: 0 5px 0 #aca7c1;
    transition: 0.3s;
}
@media all and (min-width: 360px) {
    .bouton{
        font-size: 25px;
    }
}
.bouton:hover {
    cursor: pointer;
    top: -1px;
    box-shadow: 0 3px 0 #aca7c1;
    transition: 0.15s;
}


/* ////////////////////////////////////////////////// HEADER ////////////////////////////////////////////////// */

header h1 {
    font-size: 28vw;
    line-height: 28vw;
    margin: 11vw 0 8vw;
    color: #21154d;
}
@media all and (min-width: 360px) {
    header h1 {
        font-size: 85px;
        line-height: 85px;
        margin: 40px 0 30px;
    }
}
@media all and (min-width: 720px) {
    header h1 {
        font-size: 100px;
        margin: 90px 0 50px;
    }
}

header span {
    display: inline-block;
    -webkit-transform: rotate(2.5deg);
    transform: rotate(2.5deg);
    margin: 0 3px 0 -3px;
}
header span:first-child {
    color: #00F2B8;
    text-shadow: 4px 4px 0 #008d7f, -1.5px -1.5px 0 white;
}
header span:nth-child(2) {
    color: #ff3e44;
    text-shadow: 4px 4px 0 #9a181b, -1.5px -1.5px 0 white;
}

header span:last-child {
    margin: 0 10px;
    -webkit-transform: rotate(-2.5deg);
    transform: rotate(-2.5deg);
    color: #21154d;
}


/* ////////////////////////////////////////////////// SECTION FORMULAIRE  ////////////////////////////////////////////////// */

#form-ajout-msg {
    color: white;
    background-color: #534685;
}

#form-ajout-msg form {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: flex-start;
    height: 325px;
}
@media all and (min-width: 720px) {
    #form-ajout-msg form {
        flex-direction: row;
        justify-content: space-around;
        height: 150px;
    }
}
#form-ajout-msg form > div {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 100%;
}

#message {
    margin-top: 10px;
    margin-right: 15px;
}
@media all and (min-width: 720px) {
    #message {
        margin-top: 0;
    }
}
#pseudo-et-envoi {
    margin-top: 40px;
}
@media all and (min-width: 720px) {
    #pseudo-et-envoi {
        margin-top: 0;
        width: 400px !important;
        margin-left: 15px;
        align-items: flex-end!important;
    }
}
#pseudo {
    width: 100%;
}
#envoi {
    width: 66.66%;
}

#form-ajout-msg form label {
    display: block;
    margin: -15px 0 10px;
}

#form-ajout-msg textarea, #form-ajout-msg input {
    width: 100%;
    height: 100%;
    padding: 15px 20px;
    border: none;
    font-size: 18px;
    color: #21154d;
    border-radius: 15px;
    box-sizing: border-box;   
    resize:none;
    transition: 0.3s;
}
#form-ajout-msg input {
    padding: 12.5px 20px;
}

#form-ajout-msg textarea:focus, #form-ajout-msg input:focus {
    outline: 0;
    background: #fefac3;
    transition: 0.15s;
}

#envoi input:focus {
    background: #a7f7bf;
}

#pseudo input {
    text-align: center;
}
#envoi input {
    position: relative;
    top: -3px;
    background: #00f2b8;
    font-weight: bold;
    box-shadow: 0 6px 0 #008d7f;
    transition: 0.3s;
}
#envoi input:hover {
    top: -1px;
    background: #00f2b8;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 0 #008d7f;
    transition: 0.15s;
}



/* ////////////////////////////////////////////////// SECTION MESSAGES ////////////////////////////////////////////////// */

#messages {
    background-color: white;
}

/* zone-message */
.zone-message {
    display: flex;
    justify-content: flex-start;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    margin: 0 0 40px 0;
}
.zone-message.msg-pseudo {
    align-items: flex-end;
}
@media all and (min-width: 360px) {
    .zone-message {
        flex-direction: row;
        margin: 0px 0px 25px 0;
    }
    .zone-message.msg-pseudo {
        flex-direction: row-reverse;
        align-items: flex-start;
        margin: 0px 0 25px 0px;
    }
    .zone-message:last-child {
        margin-bottom: 0px;
    }
}
@media all and (min-width: 720px) {
    .zone-message {
        margin: 0px 150px 25px 0;
    }
    .zone-message.msg-pseudo {
        margin: 0px 0 25px 150px;
    }
}



/* photo-et-pseudo */
.photo-et-pseudo {
    display: flex;
    text-align: left;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
}
.zone-message.msg-pseudo .photo-et-pseudo {
    flex-direction:row-reverse;
    text-align: right;
}
.photo-message {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 60px;
        height: 60px;
        border-radius: 100%;
        background: #ff3e44;
}
.zone-message.msg-pseudo .photo-message {
    background: #00F2B8;
}
@media all and (min-width: 360px) {
    .photo-et-pseudo {
        align-items: center;
        flex-direction: column;
        text-align: center !important;
        margin-right: 15px;
    }
    .zone-message.msg-pseudo .photo-et-pseudo {
        flex-direction: column;
        margin-left: 15px;
        margin-right: 0;
    }
}
@media all and (min-width: 720px) {
    .photo-et-pseudo {
        margin-right: 30px;
    }
    .zone-message.msg-pseudo .photo-et-pseudo {
        margin-left: 30px;
    }
    .photo-message {
        width: 80px;
        height: 80px;
    }
}
.photo-message img {
    max-height: 65%;
    max-width: 65%;
}

/* pseudo */
.pseudo {
    position: relative;
    top: 6px;
    padding-top: 5px;
    margin-top: 7.5px;
    margin-bottom: -5px;
    font-size: 17.5px;
    line-height: 17.5px;
    max-width: calc(100vw - 120px);
    overflow: hidden;
    text-overflow: ellipsis;
   
}
@media all and (min-width: 360px) {
    .pseudo {
        top: -5px;
        width: 90px;     
    }
}
@media all and (min-width: 720px) {
    .pseudo {
        margin-top: 10px;
        font-size: 20px;
        line-height: 20px;
        width: 120px;   
    }
}


/* texte-message */
.texte-message {
    position: relative;
    margin-top: 16px;
    padding: 15px 20px;
    text-align: left;
    border-radius: 0 30px 30px;
    background-color: #f8c8c4;
    max-width: calc(100% - 40px);
    word-wrap: break-word;
    hyphens: auto;
}

.texte-message > div {
    overflow-y: auto;
    max-height: 400px;
}

@media all and (min-width: 360px) {
    .texte-message {
        max-width: calc(100% - 160px);
    }
}

@media all and (min-width: 720px) {
    .texte-message {
        padding: 20px 25px;
        font-size: 20px;
        max-width: calc(100% - 200px);
    }
}

.zone-message.msg-pseudo .texte-message {
    border-radius: 30px 0 30px 30px;
    background: #d1eee7;
}

/* texte message p */
.texte-message p {
    margin: 0;
    color: cyan;
}

.zone-message.msg-pseudo .texte-message p, .zone-message.msg-pseudo em {
    color: #187375;
}

/* date et heure */
.zone-message em {
    position: absolute;
    min-width: 80px;
    height: 30px;
    left: 25px;
    bottom: -35px;
    font-size: 12px;
    opacity: 0.33;
}
.zone-message.msg-pseudo em {
    left: auto;
    right: 25px;
    text-align: right;
}

/* triangles bulles */
.texte-message:before {
    content:url(images/triangle-rouge.svg);
    position: absolute;
    width: 12.25px;
    height: 12.25px;
    top: -12.25px;
    left: 0;
}

.zone-message.msg-pseudo .texte-message:before {
    content:url(images/triangle-vert.svg);
    left: auto;
    right: 0;
}
@media all and (min-width: 360px) {
    .texte-message:before {
        -webkit-transform: rotate(90deg);
        transform: rotate(90deg);
        width: 15px;
        height: 15px;
        top: 0;
        left: 2.5px;
    }
    .zone-message.msg-pseudo .texte-message:before {
        -webkit-transform: rotate(-90deg);
        transform: rotate(-90deg);
        right: 2.5px;
    }
}

@media all and (min-width: 720px) {
    .texte-message:before {
        -webkit-transform: rotate(90deg);
        transform: rotate(90deg);
        width: 20px;
        height: 20px;
    }
}


.zone-message.code_coul_1 .photo-message {
    background: #ffc937;
}
.zone-message.code_coul_2 .photo-message {
    background: #ffa037;
}
.zone-message.code_coul_3 .photo-message {
    background: #ff6837;
}
.zone-message.code_coul_4 .photo-message {
    background: #ff363c;
}
.zone-message.code_coul_5 .photo-message {
    background: #e43f99;
}
.zone-message.code_coul_6 .photo-message {
    background: #cd4ecf;
}
.zone-message.code_coul_7 .photo-message {
    background: #675cde;
}


.zone-message.code_coul_1 .texte-message {
    background: #fbefcb;
}
.zone-message.code_coul_2 .texte-message {
    background: #fbe5cb;
}
.zone-message.code_coul_3 .texte-message {
    background: #fbd9cb;
}
.zone-message.code_coul_4 .texte-message {
    background: #fbcccb;
}
.zone-message.code_coul_5 .texte-message {
    background: #f4cbde;
}
.zone-message.code_coul_6 .texte-message {
    background: #efceed;
}
.zone-message.code_coul_7 .texte-message {
    background: #e1d4f1;
}


.zone-message.code_coul_1 .texte-message p, .zone-message.code_coul_1 em {
    color: #9f7531;
}
.zone-message.code_coul_2 .texte-message p, .zone-message.code_coul_2 em {
    color: #9f6031;
}
.zone-message.code_coul_3 .texte-message p, .zone-message.code_coul_3 em {
    color: #9f4331;
}
.zone-message.code_coul_4 .texte-message p, .zone-message.code_coul_4 em {
    color: #9f313c;
}
.zone-message.code_coul_5 .texte-message p, .zone-message.code_coul_5 em {
    color: #91346d;
}
.zone-message.code_coul_6 .texte-message p, .zone-message.code_coul_6 em {
    color: #843b8d;
}
.zone-message.code_coul_7 .texte-message p, .zone-message.code_coul_7 em {
    color: #574b86;
}


.zone-message.code_coul_1 .texte-message:before {
    content:url(images/triangle-coul-0.svg);
}
.zone-message.code_coul_2 .texte-message:before {
    content:url(images/triangle-coul-1.svg);
}
.zone-message.code_coul_3 .texte-message:before {
    content:url(images/triangle-coul-2.svg);
}
.zone-message.code_coul_4 .texte-message:before {
    content:url(images/triangle-coul-3.svg);
}
.zone-message.code_coul_5 .texte-message:before {
    content:url(images/triangle-coul-4.svg);
}
.zone-message.code_coul_6 .texte-message:before {
    content:url(images/triangle-coul-5.svg);
}
.zone-message.code_coul_7 .texte-message:before {
    content:url(images/triangle-coul-6.svg);
}

/* ////////////////////////////////////////////////// NAV ////////////////////////////////////////////////// */

nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: relative;
    margin: 20px 0;
}
@media all and (min-width: 360px) {
    nav {
        justify-content: center;
    }
}
@media all and (min-width: 720px) {
    nav {
        margin: 30px 0;
    }
}

@media all and (min-width: 1080px) {
    nav {
        margin: 40px 0;
    }
}

nav button, nav p, #actualiser {
    width: 15vw;
    height: 15vw;
    font-weight: bold; 
}
.nav-reduit {
    width: 12vw;
    height: 12vw;
    font-size: 4vw;
}

nav button:disabled {
    top: -1px;
    color: #c4cadc;
    background: #f2f1f7;
    box-shadow: 0 1.5px 0 #d2cee0;
}
nav button:disabled:hover {
    cursor: initial;
    box-shadow: 0 1.5px 0 #d2cee0;
}
nav button:focus {
    outline: none;
}

@media all and (min-width: 360px) {
    nav button, nav p, #actualiser {
        width: 50px;
        height: 50px;
        margin: 0 7.5px;
        font-weight: bold; 
    }
    .nav-reduit {
        width: 40px;
        height: 40px;
        font-size: 12px;
    }
}

nav button:before {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    left:0;
    width: 100%;
    height: 100%;
    background-size: 66%;
    background-repeat: no-repeat;
    background-position: center;
}
nav form:nth-of-type(1) button:before {
    background-image: url("images/fleche-double.svg");
    -webkit-transform: scaleX(-1);
    transform: scaleX(-1);
}
nav form:nth-of-type(2) button:before {
    background-image: url("images/fleche.svg");
    -webkit-transform: scaleX(-1);
    transform: scaleX(-1);
}
nav form:nth-of-type(3) button:before {
    background-image: url("images/fleche.svg");
}
nav form:nth-of-type(4) button:before {
    background-image: url("images/fleche-double.svg");
}
nav button:disabled:before {
    opacity: 0.2;
}

nav p {
    position: relative;
    margin: auto 0;
    width: 18vw;
    font-size: 7vw;
    line-height: 8vw;
}
@media all and (min-width: 360px) {
    nav p {
        width: 100px;
        font-size: 20px;
        line-height: 50px;
        vertical-align: center;
    }
}

#actualiser {
    background: #fefac3;
    margin: -5px auto 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}
@media all and (min-width: 360px) {
    #actualiser {
        margin: -15px auto 25px;
    }
}
@media all and (min-width: 720px) {
    #actualiser {
        margin: -25px auto 25px;
    }
}

#actualiser {
    transition: top 0.3s, box-shadow 0.3s ;
}
#actualiser:hover {
    transition: top 0.15s, box-shadow 0.15s ;
}

#actualiser img {
    width: 80%;
    transition: transform 1s;
}
#actualiser:hover img {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
    transition: transform 0.5s;
}
#actualiser:focus {
    outline: none;
}
